Network request timeout control method and apparatus, medium, device and product

By performing feature statistics on network requests and dynamically updating timeout thresholds, the problem of network request timeout control is solved, achieving more accurate and efficient timeout control, reducing resource waste and request blocking, and ensuring the stability of client network requests.

CN123034928APending Publication Date: 2026-11-03BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611330985.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing technologies, network request timeout control methods have coarse granularity due to fixed timeout threshold configurations, making it difficult to differentiate between network types, error codes, request stages, etc. This leads to premature switching or invalid waiting, a single retry strategy, and an inability to effectively remedy specific faults, resulting in serious resource waste.

Method used

By dynamically updating the timeout threshold based on network type and request stage characteristic data, and using multi-dimensional evaluation scores to calculate and adjust the timeout threshold, precise control over network requests can be achieved, reducing premature retries and invalid waiting.

Benefits of technology

It improves the precision and accuracy of timeout control, reduces resource consumption, increases resource utilization efficiency, and ensures the stable operation of client network request services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123034928A_ABST
    Figure CN123034928A_ABST
Patent Text Reader

Abstract

A network request timeout control method, device, medium, equipment and product, the method comprises: obtaining a first network request; wherein the request process of the first network request comprises at least one request stage, and the first network request corresponds to a first network type; for a first request stage in the at least one request stage, updating first statistical data according to characteristic data corresponding to the first request stage; wherein the first statistical data is characteristic statistical data under a first dimension combination, and the first dimension combination comprises the first network type and the first request stage; updating a first timeout threshold based on the first statistical data, and the first timeout threshold is used for timeout control of a second network request under the first dimension combination. Thus, the accuracy and precision of the timeout control are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to the field of computer technology, and more specifically, to a method, apparatus, medium, device, and product for controlling timeouts of network requests. Background Technology

[0002] During network communication between the client and server, network fluctuations, link anomalies, and other factors can easily lead to requests remaining unresponsive or failing for extended periods. Related technologies typically use fixed timeout thresholds to control timeouts for network requests or request phases. Summary of the Invention

[0003] This content section is provided to briefly introduce the ideas, which will be described in detail in the examples section later. This content section is not intended to identify key or essential features of the claimed content, nor is it intended to limit the scope of the claimed content.

[0004] Firstly, a method for controlling timeouts in network requests is provided, including: Obtain a first network request; wherein the request process of the first network request includes at least one request stage, and the first network request corresponds to a first network type; For the first request stage in the at least one request stage, the first statistical data is updated based on the feature data corresponding to the first request stage; wherein, the first statistical data is feature statistical data under a first dimension combination, and the first dimension combination includes the first network type and the first request stage; Based on the first statistical data, the first timeout threshold is updated. The first timeout threshold is used to control the timeout of the second network request under the first dimension combination.

[0005] Secondly, a timeout control device for network requests is provided, comprising: An acquisition module is used to acquire a first network request; wherein the processing procedure of the first network request includes at least one processing stage, and the first network request corresponds to a first network type; The first update module is used to update the first statistical data for the first request processing stage in the at least one request processing stage, based on the feature data corresponding to the first request processing stage; wherein, the first statistical data is feature statistical data under a first dimension combination, and the first dimension combination includes the first network type and the first request stage; The second update module is used to update the first timeout threshold based on the first statistical data. The first timeout threshold is used to control the timeout of the second network request under the first dimension combination.

[0006] Thirdly, a computer-readable medium is provided having a computer program stored thereon, wherein the computer program, when executed by a processing device, implements the method described in the first aspect.

[0007] Fourthly, an electronic device is provided, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the method described in the first aspect.

[0008] Fifthly, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the method described in the first aspect.

[0009] Using the above method, a first network request is obtained. The request process of the first network request includes at least one request stage, and the first network request corresponds to a first network type. For the first request stage in the at least one request stage, a first statistical data point is updated based on the feature data corresponding to the first request stage. Then, based on the first statistical data point, a first timeout threshold is updated. The first statistical data point is a feature statistical data point under a first dimension combination, and the first timeout threshold is used to control the timeout of a second network request under the first dimension combination. The first dimension combination includes the first network type and the first request stage. This method can perform feature statistics on network requests according to the dimension combination of network type and request stage, and then dynamically update the timeout threshold corresponding to that dimension combination based on the statistical data. This effectively improves the accuracy and precision of timeout control. On the one hand, it can reduce the phenomenon of prematurely triggering retries, reducing resource consumption caused by repeated processing; on the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0010] Other features and advantages will be described in detail in the following examples section. Attached Figure Description

[0011] The above and other features, advantages, and aspects of this document will become more apparent when viewed in conjunction with the accompanying drawings and the following examples. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is a schematic diagram illustrating an implementation environment according to an example.

[0012] Figure 2 This is a flowchart illustrating a timeout control method for network requests, based on an example.

[0013] Figure 3This is a schematic diagram of a timeout retry control system illustrated by an example.

[0014] Figure 4 This is a schematic diagram of the structure of a network request timeout control device according to an example.

[0015] Figure 5 This is a schematic diagram of the structure of an electronic device as illustrated by an example. Detailed Implementation

[0016] The following description will be given in more detail with reference to the accompanying drawings. While certain scenarios are shown in the drawings, it should be understood that this document can be implemented in various forms and should not be construed as limited to the scenarios described herein. Rather, these scenarios are provided to provide a more thorough and complete understanding of this document. It should be understood that the accompanying drawings and the scenarios depicted are for illustrative purposes only and are not intended to limit the scope of this document.

[0017] It should be understood that the steps described in the method may be performed in different orders and / or in parallel. Furthermore, the method may include additional steps and / or omit the steps shown. The scope of this document is not limited in this respect.

[0018] The term "comprising" and its variations can be open-ended, meaning "including but not limited to". The term "based on" can mean "at least partially based on". The term "one case" means "at least one case"; the term "another case" means "at least one additional case"; the term "some cases" means "at least some cases". Definitions of other terms will be given in the following description.

[0019] It should be noted that the concepts of "first" and "second" are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions performed by these devices, modules or units or their interdependencies.

[0020] It should be noted that the modifiers “one” and “multiple” can be illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as “one or more”.

[0021] The names of messages or information exchanged between multiple devices are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0022] It is understandable that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant regulations.

[0023] In related technologies, a fixed timeout threshold is usually configured for network requests or request phases. When a network request times out or fails, it is retried according to a preset strategy, such as a fixed number of retries in place or retrying after switching domain names.

[0024] The fixed timeout configuration is coarse-grained, making it difficult to differentiate between network type, error code, request stage, connection reuse, cold start, and other factors. This can easily lead to premature switching or retries when waiting is necessary, or ineffective waiting when not required. Furthermore, the retry strategy is simplistic, failing to effectively remedy specific fault types and resulting in resource waste. Additionally, timeout and retry controls for different request stages are set separately, lacking coordination with modules such as speed-up and caching.

[0025] In view of this, this paper provides a method, apparatus, medium, device and product for controlling timeout of network requests to solve the above-mentioned technical problems.

[0026] The timeout control method for network requests provided in this article can be executed by the client. Figure 1 This is an exemplary schematic diagram illustrating an implementation environment; see [link / reference]. Figure 1 The implementation environment includes: client 101 and server 102.

[0027] For example, client 101 sends a first network request to server 102. During the request process, timeout and retry control can be performed on the first network request according to the request stage. After the request ends, for the first request stage in the request process, the first statistical data is updated according to the feature data corresponding to the stage, that is, the feature statistical data under the first dimension combination. Then, based on the first statistical data, the first timeout threshold is updated. The first dimension combination includes the first network type and the first request stage. The first timeout threshold is used to perform timeout control on the second network request under the first dimension combination. The second network request is the network request subsequently sent by client 101 to server 102.

[0028] The client 101 can be at least one of a smartphone, smartwatch, desktop computer, laptop, or similar device. The client 101 has communication capabilities and is used to execute the timeout control method for network requests provided herein. The client 101 can refer to one of multiple clients; those skilled in the art will understand that the number of clients can be more or less. The server 102 is a peer device that communicates with the client 101, specifically a physical server, cloud server, etc., used to receive and respond to network requests sent by the client 101. For example, the server 102 and the client 101 are connected directly or indirectly via wired or wireless communication, without limitation.

[0029] Figure 2This is a flowchart illustrating a timeout control method for a network request, as shown in the example. Figure 2 As shown, the method may include the following steps: In step 201, a first network request and first request information are obtained; wherein, the request process of the first network request includes at least one request stage, and the first network request corresponds to a first network type.

[0030] like Figure 3 As shown, this paper provides a timeout retry control system for clients, wherein each module can be implemented by software or partially accelerated by hardware, without limitation.

[0031] For example, a request decomposition module can be used to obtain network requests and decompose the request process into multiple request stages. Request stages may include at least one of the following: DNS (Domain Name System) resolution stage, TCP (Transmission Control Protocol) connection establishment stage, TLS (Transport Layer Security) handshake stage, first packet / TTFB (Time To First Byte) stage, download stage, etc. The specific stage is determined according to the actual business and there are no restrictions on it.

[0032] Furthermore, the signal acquisition module can obtain the request information corresponding to the network request. The request information may include the network type and the characteristic data of each request stage. The network type may include Wi-Fi (wireless network), cellular network, etc. The characteristic data may include at least one of the following: the time spent in each stage, the failure / error code in each stage, whether the request timed out in each stage, the byte growth in the download stage, etc. The specific details are determined according to the actual business and there are no restrictions on them.

[0033] In step 202, for the first request stage in at least one request stage, the first statistical data is updated according to the feature data corresponding to the first request stage; wherein, the first statistical data is the feature statistical data under the first dimension combination, and the first dimension combination includes the first network type and the first request stage.

[0034] The first dimension combination also includes the first domain name or the first domain name set, where the first domain name is the domain name requested by the first network request, and the first domain name set includes the first domain name.

[0035] For example, such as Figure 3As shown, the historical statistics maintenance module can perform bucketed statistics on the characteristic data of network requests according to preset dimension combinations, with each bucket corresponding to a dimension combination. The preset dimension combinations can include network type and request stage, and domain names or domain name groups can be added as needed. For example, when there are too many domain names, data statistics can be performed according to "network type × request stage", otherwise, data statistics can be performed according to "network type × domain name (domain name group) × request stage". The specific selection can be made according to needs, and there are no restrictions on this.

[0036] For example, the historical statistics maintenance module can also maintain sliding window statistics for the first time window and the second time window for the same dimension combination. The first time window is shorter than the second time window. The first time window is used to record short-term changes and can be a window of several seconds. The second time window is used to record long-term baselines and can be a window of several minutes. The specific time window is determined according to the actual business and there is no restriction on it.

[0037] For example, for each dimension combination, at least one of the following statistical fields can be maintained: time quantile (e.g., Q95 (95th quantile), Q50 (50th quantile), etc.), request success rate, request failure rate (failures may include timeout failures, network error failures, etc.), request timeout rate, long tail ratio (e.g., Q95 / Q50), throughput jitter metric (which may be variance or coefficient of variation), latency jitter metric, consecutive failure count, etc. The specific settings can be configured according to requirements, and there are no restrictions on them.

[0038] In step 203, based on the first statistical data, the first timeout threshold is updated. The first timeout threshold is used to control the timeout of the second network request under the first dimension combination.

[0039] The first timeout threshold is used to control the timeout of subsequent network requests under the first dimension combination, that is, the timeout control of subsequent network requests corresponding to the first network type in the first request stage. For example, if network request 1 corresponds to network type A, including request stages P1 and P2, at least one timeout threshold corresponding to "network type A × request stage P1" and "network type A × request stage P2" can be updated, while the timeout thresholds corresponding to other dimension combinations are not updated. Accordingly, subsequent network requests corresponding to network type A can use the updated timeout threshold for timeout control when in request stage P1 or request stage P2.

[0040] It should be understood that a successful network request process can include all request stages, while a failed network request process can include some or all request stages. Specifically, feature statistics should be performed based on the request stages included in the request process, and the timeout thresholds for the corresponding dimension combinations should be updated.

[0041] It should be noted that feature statistics and timeout threshold calculations can be performed in real-time for each network request, or on a subset of network requests according to a preset period. These calculations can be performed on each stage of the network request process, or on specific stages, depending on the actual business requirements; there are no restrictions on this. Furthermore, feature statistics and timeout threshold calculations can be performed after the network request has ended (including termination due to request success or failure), or after each request stage has ended, or even during subsequent network requests, focusing on request stages from historical network request processes; again, the specific implementation depends on the actual business requirements; there are no restrictions on this.

[0042] By adopting the above method, network requests can be characterized by a combination of network type and request stage dimensions. Then, the timeout threshold corresponding to the dimension combination can be dynamically updated based on the statistical data, thereby effectively improving the accuracy and precision of timeout control. On the one hand, it can reduce the phenomenon of premature retries and reduce the resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0043] In one scenario, the method further includes: in response to a first network request initiated based on a connection multiplexing method, updating a second statistical data point, wherein the second statistical data point is a feature statistical data point for a first network type and a third request stage, and the third request stage is a request stage other than the multiplexing stage in at least one request stage; and updating a third timeout threshold based on the third statistical data point, wherein the third timeout threshold is a timeout threshold corresponding to the first network type and the third request stage.

[0044] For example, if a network request uses a connection created through connection reuse, data statistics and timeout thresholds in earlier stages, such as the DNS resolution stage, TCP connection establishment stage, and TLS handshake stage, can be selectively not updated. This avoids the reuse behavior interfering with the characteristic statistics of the initial stage, thereby effectively improving the accuracy and precision of timeout control.

[0045] It is worth noting that, such as Figure 3 As shown, the storage and eviction module can be used to set expiration times for each bucket and discard expired buckets. Additionally, an upper limit on the number of buckets can be set, and LRU (Least Recently Used) eviction can be implemented. The specific settings can be customized to meet requirements and are not limited, thus avoiding waste of storage resources.

[0046] In one scenario, updating the first timeout threshold based on first statistical data includes: obtaining a multi-dimensional evaluation score based on the first statistical data, and updating the first timeout threshold based on the multi-dimensional evaluation score; wherein the multi-dimensional evaluation score includes at least one of the following: a first evaluation score, used to characterize the probability of changing a second network request from a failed state to a successful state by increasing the first timeout threshold, and the first evaluation score is positively correlated with the first timeout threshold; a second evaluation score, used to characterize the degree of performance degradation under the first dimension combination, and the second evaluation score is positively correlated with the first timeout threshold; a third evaluation score, used to characterize the quantified effect of executing a preset timeout processing strategy under the first dimension combination, and the third evaluation score is negatively correlated with the first timeout threshold; and a fourth evaluation score, used to characterize the degree of network fluctuation under the first dimension combination, and the fourth evaluation score is positively correlated with the first timeout threshold.

[0047] For example, such as Figure 3 As shown, the scoring calculation module can calculate multi-dimensional evaluation scores based on statistical data under the corresponding dimension combination, and then the dynamic timeout threshold calculation module can calculate the timeout threshold under the corresponding dimension combination. The timeout threshold under other dimension combinations is not updated.

[0048] The multi-dimensional evaluation scores can include at least one of the following: Recoverability score R (first evaluation score), representing the probability of recovering the current stage from a failed state to a successful state by relaxing the timeout threshold or increasing the waiting time without changing the network type or domain name; Remedial score S (third evaluation score), representing the quantified effect of different timeout handling strategies (e.g., retrying in place, switching domain names, switching network types); Volatility score V (fourth evaluation score), used to measure whether the network experiences severe jitter or outbreaks of failures in the short term, and to suppress ping-pong switching; Global degradation G (second evaluation score), used to determine whether global performance degradation of "overall slow / overall degradation" has occurred. The specific scores are determined based on actual business needs and are not restricted. This allows for the calculation of dynamic timeout thresholds based on the above scores, including timeout thresholds corresponding to different request stages, or the sum of the timeout thresholds for each request stage to obtain a request-level timeout threshold.

[0049] For example, for each dimension combination, a dynamic adjustment coefficient can be calculated based on the above multi-dimensional evaluation scores: Starting with 1 as the initial adjustment coefficient, the R score, V score, and G score are added to the initial adjustment coefficient, and the maximum value of the processing strategy for switching network types and the corresponding S score is subtracted. Furthermore, for each score item, a corresponding weighting coefficient can be set according to requirements; there are no restrictions on this. In other words, the dynamic adjustment coefficient is positively correlated with the R score, V score, and G score, and negatively correlated with the S score.

[0050] For example, a corresponding baseline timeout threshold and upper / lower limits can be set for each dimension combination. Taking the update of the timeout threshold for the first dimension combination as an example, the corresponding baseline timeout threshold can be multiplied by the corresponding dynamic adjustment coefficient, and the result can be limited to the preset upper and lower limits to obtain the updated timeout threshold for the first dimension combination. If a request-level timeout threshold is required, the timeout thresholds for each request stage can be directly accumulated.

[0051] For example, a preset algorithm can be used to calculate the baseline timeout threshold corresponding to different dimension combinations, and the upper and lower limits for different dimension combinations can also be set. Continuing with the example of the baseline timeout threshold corresponding to the first dimension combination, time-consuming sample data under the first dimension combination can be obtained, such as the latency jitter metric or time-consuming sample value (e.g., a certain time-consuming quantile) corresponding to the first dimension combination. Then, the baseline timeout threshold can be obtained by weighted summing of the smoothed average time-consuming data and the time-consuming jitter value calculated in the previous round. Furthermore, the baseline timeout threshold can be updated by obtaining new smoothed average time-consuming data and time-consuming jitter values ​​based on the newly obtained time-consuming sample data and the smoothed average time-consuming data and time-consuming jitter values ​​calculated in the previous round. The specific settings can be configured according to requirements and are not limited.

[0052] It should be understood that as R, V, or G increase, the timeout threshold tends to increase to prevent misjudgments that could lead to the interruption of successful network requests. When a significantly better timeout handling strategy exists, the tendency is to enter the request failure state more quickly, i.e., to decrease the timeout threshold at the current stage to initiate remedial actions (execute the timeout handling strategy) as soon as possible. In other words, R, V, and G act as tightening factors for the timeout threshold, while S acts as a relaxing factor. Furthermore, R dominates the waiting decision, S dominates the handover decision, and V dominates jitter suppression.

[0053] This allows for the calculation of timeout thresholds under different combinations of dimensions from multiple dimensions, effectively improving the precision and accuracy of timeout control. On the one hand, it can reduce the phenomenon of premature retries and reduce resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0054] In one scenario, the first evaluation score is obtained as follows: a first adjustment score is obtained based on first statistical data, and a first evaluation score is obtained based on the first adjustment score and a preset base score corresponding to the first dimension combination; wherein, the first adjustment score includes at least one of the following: a first sub-score, used to decrease the first evaluation score in response to the number of consecutive request failures corresponding to the first dimension combination exceeding a first threshold, the first statistical data including the number of consecutive request failures; a second sub-score, used to increase the first evaluation score in response to the decrease in the ratio between the first time consumption value and the second time consumption value, the first statistical data including the first time consumption value and the second time consumption value, the first time consumption value being obtained based on the first request time consumption data within a first time window of the first dimension combination, and the second time consumption value being based on the first request time consumption data within a first time window of the first dimension combination. The data is obtained from the second request timeout within the second time window under a one-dimensional combination, where the first time window is shorter than the second time window; the third sub-score is used to increase the first evaluation score in response to the successful completion of the most recent preset number of network requests under the first-dimensional combination, and the first statistical data includes the request results of the most recent preset number of network requests; the fourth sub-score is used to decrease the first evaluation score in response to the triggering of a preset abnormal event under the first-dimensional combination, and the first statistical data includes the mapping relationship between the preset abnormal event and the fourth sub-score; the fifth sub-score is used to decrease the first evaluation score in response to the increase in the ratio between the third timeout value and the fourth timeout value, and the first statistical data includes the third timeout value and the fourth timeout value, which are obtained from the first request timeout data.

[0055] For example, the first evaluation score is the recoverability score R mentioned above, used to calculate the timeout threshold from the recoverability of the network request. The value of R can be set between 0 and 1 without restriction. The corresponding base scores can be set by dimension combination. For example, under the same network type, the base scores can be set according to the order of the request stages, with the base score corresponding to an earlier request stage being less than or equal to the base score corresponding to a later request stage. For example, the base score for the DNS resolution stage = the base score for the TCP connection establishment stage = the base score for the TLS handshake stage < the base score for the first packet / TTFB stage < the base score for the download stage. The first adjustment score can include at least one of the following: consecutive failure penalty score, recovery reward score, single failure reward score, error intensity penalty score, and long-tail penalty score. The specific values ​​can be set according to requirements without restriction.

[0056] For example, the first sub-score, the consecutive failure penalty score, is used to penalize network requests under the same dimension combination that fail consecutively within a time window. Its value is determined by three parameters: consecutive failure count (the number of consecutive failures of requests under the current dimension combination maintained by buckets within the first or second time window); penalty step size (the fixed increment of the consecutive failure penalty score each time a new consecutive failure occurs); and upper threshold (the maximum allowed value of the consecutive failure penalty score, preventing infinite accumulation of penalties). The consecutive failure count can be subtracted from the first threshold (no additional penalty is triggered if the threshold is not exceeded) to obtain the number of failures exceeding the threshold; then, this number is multiplied by the penalty step size to obtain the base penalty value; finally, the base penalty value is compared with zero, and the larger value is taken, then compared with the upper threshold, and the smaller value is taken, meaning the final result does not exceed the upper threshold. For example, if the first threshold is set to 1, it means that under the same dimension combination, when network requests fail consecutively twice, a consecutive failure penalty score is generated. The specific setting depends on the requirements and is not restricted.

[0057] For example, the second sub-score, the recovery reward score, measures whether the time consumption performance of the same dimension combination within a short time window has improved compared to a longer time window, thus providing a positive incentive. Calculating this score requires maintaining the long-tail quantiles of time consumption for the first time window (short window) and the second time window (long window) for the same dimension combination, both at the same quantile level (e.g., the 95th or 90th quantile). First, the long-tail quantile of time consumption for the short window is divided by the long-tail quantile of time consumption for the long window to obtain the time consumption ratio. When this ratio is less than 1, it indicates that the request time consumption in the short window is lower than that in the long window, i.e., there are signs of recovery; when the ratio is greater than 1, it indicates that the time consumption in the short window has worsened. Then, the time consumption ratio is subtracted from the value 1 to obtain a difference. This difference is divided by a preset parameter value, and the result is truncated to the interval between 0 and 1; that is, if the value is less than 0, it is taken as 0, and if it is greater than 1, it is taken as 1. Finally, the truncated result is multiplied by an upper limit threshold to obtain the final recovery reward score. The preset parameter value can be set between 0 and 1, indicating that when the time consumption ratio of the short window to the long window is above the preset parameter value, the reward score reaches the upper limit threshold.

[0058] For example, the third sub-score, the single-failure reward score, is used to measure whether there are occasional anomalies under each dimension combination, thereby providing positive incentives. It can maintain the request results of the most recent preset number of network requests under each dimension combination. If only one of the most recent preset number of network requests fails and the rest succeed (occasional long-tail / single point of failure phenomenon), a fixed preset score for the single-failure reward score can be given; otherwise, the single-failure reward score is 0. The fixed preset score can be set according to requirements and is not restricted.

[0059] For example, the fourth sub-score, the error intensity penalty score, is used to measure whether there are abnormal events under each dimension combination, thereby imposing a penalty. Preset abnormal events can include error types and / or error codes. For example, different error intensity penalty scores can be set for offline / no network / unreachable errors, DNS resolution failure errors, TCP connection timeout errors, connection refused / TLS error / certificate error errors, read timeout / TTFB timeout / download timeout errors, server busy errors (such as returning different error codes), etc., or different error intensities can be set for different error types and / or error codes (which can be limited to the [0, 1] range), and then the error intensity penalty score is obtained by multiplying the error intensity by the upper limit threshold of the error intensity penalty score.

[0060] For example, the fifth sub-score, the long-tail penalty score, is used to measure whether there is a serious long-tail problem in the time consumption distribution within the short window for each dimension combination, thereby imposing a penalty. This score is determined based on the median time consumption and the long-tail quantile of time consumption within the short window. Specifically, the long-tail ratio is obtained by dividing the long-tail quantile of time consumption by the median time consumption. The larger the ratio, the longer the tail of the time consumption distribution, indicating a greater number of abnormal requests with high time consumption. When the long-tail ratio is less than or equal to the lower limit that triggers the long-tail penalty, the penalty score is zero. When the long-tail ratio is between the lower limit and the saturation value that triggers the long-tail penalty, the penalty score increases linearly with the increase of the long-tail ratio. The calculated result is truncated between 0 and 1, and then multiplied by the upper limit value to obtain the final long-tail penalty score. Thus, when the ratio is greater than or equal to the saturation value, the penalty score reaches the upper limit and no longer increases.

[0061] For example, for each dimension combination, the corresponding preset base score is supplemented with positive incentive scores and subtracted with negative penalty scores. The final result is truncated to the range of 0 to 1, and the final result is the recoverability score. The higher the value, the greater the possibility of recovery. The above score items can be set according to needs, and there are no restrictions on this.

[0062] By combining recoverability scores with dynamic adjustment of timeout thresholds, the precision and accuracy of timeout control can be effectively improved. On the one hand, it can reduce the phenomenon of premature retries and reduce resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0063] In one scenario, the second evaluation score is obtained as follows: based on the first indicator data in the first statistical data, the second evaluation score is obtained; wherein, the first indicator data includes request time consumption data or request throughput data of the first dimension combination in the first time window and the second time window respectively, and the first time window is shorter than the second time window.

[0064] For example, the second evaluation score is the aforementioned global degradation score G. The value of G can be set between 0 and 1; a higher value indicates a more severe overall degradation, which is more likely to trigger a network switching strategy. For each dimension combination, the long-tail quantile of latency (or throughput) within the first time window is divided by the median quantile of latency (or throughput) within the same window to obtain a long-tail ratio. The larger this long-tail ratio, the more severe the tail latency or throughput fluctuation of requests within the window compared to the median level. Furthermore, this long-tail ratio can be mapped using a normalization function. Then, the difference between the timeout rate or throughput jitter metric in the first time window and the value in the second time window is calculated. This difference is also mapped using a normalization function; a positive and larger difference indicates a more significant performance degradation in the short window compared to the long window. Finally, the long-tail ratio and the difference are multiplied by their respective configured weights and summed, and the result is truncated to the interval between 0 and 1 to obtain the global degradation score.

[0065] By dynamically adjusting the timeout threshold in conjunction with the global degradation level, the accuracy and precision of timeout control can be effectively improved. On the one hand, it can reduce the phenomenon of premature retries and reduce the resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0066] In one scenario, the preset timeout handling strategy includes a first handling strategy and a second handling strategy. The first handling strategy is used to indicate switching network types, and the second handling strategy is used to indicate switching domain names. The third evaluation score is obtained as follows: for each preset timeout handling strategy, a quantized value is obtained based on the second evaluation score; wherein, the quantized value corresponding to the first handling strategy is positively correlated with the second evaluation score, and the quantized value corresponding to the second handling strategy is negatively correlated with the second evaluation score; the maximum value among the quantized values ​​is taken as the third evaluation score.

[0067] For example, the third evaluation score, namely the remedial score S mentioned above, can be set between 0 and 1. It can evaluate the remedial effect of switching from the current network type to another network type or from the current domain name to another domain name under each dimension combination, that is, the degree of improvement of the abnormal request relative to the state before the switch. The preset timeout handling strategy can include the in-situ retry strategy (without switching domain name or network), the retry strategy after switching domain name or resolution entry (second handling strategy), and the retry strategy after switching network type (first handling strategy), etc., which can be set according to the requirements. Among them, the first handling strategy and the second handling strategy should be considered when calculating the timeout threshold.

[0068] For example, for the first processing strategy, the success rate difference and latency difference between the current network type and other network types within a long window are first calculated. The success rate difference is calculated by subtracting the success rate of the current network type within the same window from the success rate of other network types within the long window, and then normalizing the difference. The latency difference is calculated by dividing the long-tailed quantile of latency for other network types within the long window by the long-tailed quantile of latency for the current network type within the same window, taking the logarithm, and then normalizing. The smaller this ratio (i.e., the lower the latency of other networks), the better the performance. The success rate difference and latency difference are then multiplied by their respective configured weights and summed, and the result is truncated to the range of 0 to 1 to obtain the reward score for switching network types.

[0069] Furthermore, the weighted sum of the global degradation score and the reward score for switching network types, minus the cooldown penalty score, is truncated to a value between 0 and 1. This result represents the quantification of the effectiveness of the network type switching strategy. A higher value indicates a better remedial effect when switching to the corresponding network type. The cooldown penalty score is used to suppress frequent recent network type switching; its value is between 0 and 1, increasing with the number of recent switches and decreasing over time. The specific settings can be customized according to requirements; for example, the cooldown penalty score can be disregarded, and there are no restrictions on its application.

[0070] For example, regarding the second processing strategy, firstly, the timeout rate difference and failure rate difference between the domain and the global average within a short window are calculated. The timeout rate difference is calculated by subtracting the global request timeout rate (excluding the domain) for the same network type and request stage from the request timeout rate under the dimension of "network type × candidate domain × request stage". The smaller this difference, the better the candidate domain's timeout performance is compared to the global average, thus receiving a positive reward. The failure rate difference is calculated by subtracting the global request failure rate (excluding the domain) for the same network type and request stage from the request failure rate under the dimension of "network type × candidate domain × request stage". The smaller this difference, the better the candidate domain's failure performance is compared to the global average, also receiving a positive reward. The weighted sum and truncation of the timeout rate difference and failure rate difference values ​​within the range of 0 to 1 yields the domain reward score. The higher this score, the more advantageous the candidate domain is relative to the global average.

[0071] Furthermore, the domain reward score is multiplied by the corresponding configuration weight, then the product of the global degradation degree and the corresponding configuration weight is subtracted, and a cooling-off penalty score is subtracted. The result of this calculation is truncated to the range of 0 to 1, which is the quantified value of the domain switching strategy's effectiveness. The cooling-off penalty score can be set between 0 and 1, increasing with the number of recent domain switching attempts and decreasing over time. The specific value can be set according to needs; for example, the cooling-off penalty score can be disregarded, and there are no restrictions on its application.

[0072] In practical applications, the maximum value between the effectiveness quantification of the network type switching strategy and the domain name switching strategy is taken as the final remedial score. It should be understood that if multiple candidate network types and domain name strategies exist, the maximum value among all domain name strategies is also taken as the final remedial score. Therefore, when switching domain names or network types yields better results, the first timeout threshold can be reduced, allowing network requests to trigger timeouts more quickly for subsequent processing.

[0073] By combining remedial scoring with dynamic adjustment of timeout thresholds, the precision and accuracy of timeout control can be effectively improved. On the one hand, it can reduce the phenomenon of premature retries and reduce the resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0074] In one scenario, the fourth evaluation score is obtained as follows: Based on the second indicator data in the first statistical data, a multidimensional sub-score is obtained, and the fourth evaluation score is obtained based on the multidimensional sub-score. The second indicator data includes indicator data of the first dimension combination within a first time window and a second time window, respectively, where the first time window is shorter than the second time window. The multidimensional sub-score includes at least one of the following: a sixth sub-score, used to increase the fourth evaluation score in response to an increase in the first ratio between the fifth and sixth time consumption values, where the second indicator data includes the fifth and sixth time consumption values, which are obtained based on the first request time consumption data within the first time window using the first dimension combination; and a seventh sub-score, used to increase the fourth evaluation score in response to an increase in the ratio between the first and second ratios, where the second ratio is the ratio between the seventh and eighth time consumption values. The ratio, the second indicator data includes the seventh and eighth time consumption values, which are obtained based on the second request time consumption data within the second time window combined with the first dimension; the eighth sub-score is used to increase the fourth evaluation score in response to the increase in the ratio between the ninth and tenth time consumption values, the second indicator data includes the ninth and tenth time consumption values, the ninth time consumption value is obtained based on the first request time consumption data, and the tenth time consumption value is obtained based on the second request time consumption data; the ninth sub-score is used to increase the fourth evaluation score in response to the increase in the absolute difference between the first request failure rate and the second request failure rate, the second indicator data includes the first request failure rate and the second request failure rate, wherein the first request failure rate is the request failure rate within the first time window combined with the first dimension, and the second request failure rate is the request failure rate within the second time window combined with the first dimension.

[0075] For example, the fourth evaluation score, namely the volatility score V mentioned above, is used to measure whether the network experiences severe jitter, short-term drift, or failure bursts. The value of V can be set between 0 and 1 without restriction. The larger the V is, the more frequent switching actions should be avoided. At the same time, the timeout threshold should be relaxed to avoid concentrated timeouts caused by misjudgments.

[0076] For example, the volatility score V can be calculated based on multiple dimensions such as the tail fatness of the time-consuming data, the long-tail drift of the time-consuming data, the burstiness of failures, and the median drift of the time-consuming data in the first statistical data. The specific calculation can be determined according to the needs and there are no restrictions on it.

[0077] For example, the sixth sub-score measures the degree of tail bulking relative to the median in the time-consuming distribution within a short window for each dimension combination, i.e., whether the long-tail phenomenon is significant. First, the long-tail quantile of time consumption within the short window can be divided by the median quantile of time consumption within the same window to obtain a long-tail ratio. The larger this long-tail ratio, the more prominent the tail delay is relative to the median delay. Then, this long-tail ratio is compared with two adjustable thresholds: when the ratio reaches the first threshold, the long-tail effect is considered to be becoming significant; when the ratio reaches the second threshold, the long-tail effect is considered to be very significant. Finally, the relative position of the ratio between the two thresholds is truncated to the interval between 0 and 1, serving as the tail bulking score. The higher this score, the thicker the tail and the more severe the long-tail problem.

[0078] For example, the seventh sub-score measures whether the long-tail effect has worsened in the short window relative to the long window for each dimension combination, i.e., whether the long-tail phenomenon shows a worsening drift trend. The long-tail ratios for the short and long windows can be calculated separately; the long-tail ratio for each window is the long-tail quantile of the time spent within that window divided by the median quantile of the time spent. Then, the long-tail ratio of the short window is divided by the long-tail ratio of the long window to obtain a drift ratio, truncated to the range of 0 to 1. When this drift ratio is greater than a preset adjustable threshold, a strong drift is considered to have occurred, meaning the long-tail problem has significantly worsened recently. The higher the score, the more severe the long-tail drift. For example, the eighth sub-score measures whether the median request time for each dimension combination has changed significantly in the short window relative to the long window, i.e., whether the overall performance shows a drift trend. The median ratio can be obtained by dividing the median time spent in the short window by the median time spent in the long window. A median ratio greater than 1 indicates increasing processing time (deteriorating performance), while a ratio less than 1 indicates decreasing processing time (improving performance). The logarithm of this median ratio is then taken, divided by the logarithm of a preset adjustable threshold, and finally truncated to the range of 0 to 1 to obtain the median drift score. When the median ratio reaches or exceeds the preset adjustable threshold, the score approaches or reaches 1, indicating a strong drift. The higher the score, the more significant the median drift.

[0079] For example, the ninth sub-score measures whether the request failure rate within the short window shows a sudden spike relative to the long window under each dimension combination, i.e., whether failures occur in a concentrated burst within a short period. The absolute change in the failure rate can be obtained by subtracting the request failure rate within the long window from the failure rate within the short window and taking the absolute value. This change is then divided by an adjustable parameter, and the result is truncated to the range of 0 to 1 to obtain the failure burst score. The higher the score, the more drastic the sudden change in the failure rate within the short window relative to the long window, indicating a stronger burst characteristic of failures. This, combined with the volatility score, dynamically adjusts the timeout threshold, effectively improving the precision and accuracy of timeout control. On the one hand, it reduces premature retries, lowering resource consumption caused by repeated processing; on the other hand, it reduces request blocking caused by invalid long waits, improving resource utilization efficiency and ensuring the stable operation of client network request services.

[0080] It should be understood that the calculation of the timeout threshold is usually based on data statistics and timeout threshold calculation under the dimensional combination corresponding to the current network request, which will not be elaborated further. Furthermore, the above calculation formula can be adjusted according to requirements, and there are no restrictions on this.

[0081] In one scenario, the method further includes: in response to detecting a preset network state, executing a fifth processing strategy on the second network request, the fifth processing strategy being used to indicate switching network types or to indicate a failure message for sending the request; and in response to the number of times the processing strategy for the second network request is executed being greater than or equal to a fourth threshold, executing a sixth processing strategy on the second network request, the sixth processing strategy being used to indicate a failure message for sending the request.

[0082] For example, such as Figure 3 As shown, the retry strategy decision module can trigger a strategy selection process when a network request times out or fails. Hard gating conditions can be set, such as detecting offline or restricted network conditions, allowing the system to switch network type processing strategies or notify the user of request failure. A maximum number of executions for each processing strategy can also be set; once the maximum number of executions for all processing strategies is reached, no further attempts will be made, and the user will be notified of request failure. Specific settings can be customized according to requirements; no restrictions are imposed on this aspect.

[0083] This improves the precision and accuracy of timeout control while avoiding infinite retries and the waste of computing resources.

[0084] In one scenario, the method further includes: in response to a second network request having a request duration greater than a first timeout threshold, obtaining at least one candidate processing strategy from a preset timeout processing strategy; for each candidate processing strategy, obtaining a fifth evaluation score, the fifth evaluation score being used to characterize the quantitative value of the effect of executing the candidate processing strategy; and obtaining a third processing strategy based on the maximum value among the fifth evaluation scores.

[0085] For example, if a second network request times out and does not meet the aforementioned hard-gating conditions, a candidate processing strategy can be selected from all preset processing strategies. For instance, a candidate processing strategy can be selected based on the error type triggered by the current network request, without restriction. Furthermore, the priority of different candidate processing strategies can be dynamically adjusted according to the error type, and the parameters of the corresponding processing strategy when calculating the quantified effect value can be adjusted accordingly.

[0086] For example, for DNS and TLS errors, you can choose the in-place retry policy, the domain name switching policy, or the network type switching policy (low). For TCP errors, you can choose the in-place retry policy, the domain name switching policy (medium), or the network type switching policy (medium). For download errors, you can choose the in-place retry policy, the domain name switching policy (if the domain name reward score is high), or the network type switching policy (if G is high), and so on. Low and medium indicate priority, and you can set them according to your needs. There are no restrictions on this.

[0087] Then, the effect quantification value corresponding to each candidate processing strategy is calculated, and the final processing strategy is determined based on the maximum value among them.

[0088] This effectively improves the precision and accuracy of timeout control while enhancing the flexibility and accuracy of strategy selection.

[0089] Furthermore, it can dynamically adjust the priority of different candidate processing strategies based on the error type, and then adjust the parameters of the corresponding processing strategy when calculating the quantification value of the effect according to different priorities. In one scenario, obtaining the fifth evaluation score includes: obtaining a sixth evaluation score, which characterizes the degree of performance degradation under the first dimension combination; in response to the candidate processing strategy being the first processing strategy, obtaining the fifth evaluation score based on the sixth evaluation score and the third indicator data; wherein, the first processing strategy is used to indicate switching network types, and the third indicator data includes a first success rate, a second success rate, an eleventh time consumption value, and a twelfth time consumption value within a second time window, the first success rate being the request success rate under the first dimension combination, the second success rate being the request success rate under the second network type and the first request stage, the eleventh time consumption value being obtained based on the time consumption data under the first dimension combination, and the twelfth time consumption value being obtained based on the time consumption data under the second network type and the second request stage, where the second network type is the network type corresponding to the candidate switching network; Since the candidate processing strategy is the second processing strategy, a fifth evaluation score is obtained based on the sixth evaluation score and the fourth indicator data. The second processing strategy is used to indicate domain name switching. The fourth indicator data includes the first failure rate, second failure rate, first timeout rate, and second timeout rate within the first time window. The first failure rate is the request failure rate under the second dimension combination, the second failure rate is the request failure rate under the first dimension combination, the first timeout rate is the request timeout rate under the second dimension combination, and the second timeout rate is the request timeout rate under the first dimension combination. The second dimension combination includes the first network type, the candidate domain name to be switched, and the first request stage. The first time window is shorter than the second time window. In response to the candidate processing strategy being the fourth processing strategy, a fifth evaluation score is obtained based on the sixth evaluation score. The fourth processing strategy is a retry strategy that does not indicate domain name or network type switching.

[0090] Among them, policy prior scores can be set according to error type to express the preference for different policies under a specific error type. The specific settings can be set according to needs and there are no restrictions on them.

[0091] For example, the global degradation score, the switching network sub-score, the prior score of the switching network type policy, and the cooling penalty score can be weighted and summed (where the cooling penalty score is a negative term). The result can then be truncated to the interval between 0 and 1 to obtain the quantified effect value of the candidate network type. When there are multiple candidate network types, their respective quantified effect values ​​are calculated for subsequent selection.

[0092] The global degradation score is calculated based on statistical data under the current dimension combination and reflects the overall performance degradation level. The network switching sub-score, i.e., the reward score obtained by switching from the current network type to the candidate network type, is calculated in the same way as the reward score for switching network types, simply by replacing it with statistical data under the corresponding dimension combination.

[0093] Cooling penalty score, which can be set between 0 and 1, is used to suppress frequent recent switching of network types.

[0094] For example, the reward score of the candidate domain, the prior score of the domain switching strategy, the global degradation score, and the cooldown penalty score can be weighted and summed (where the global degradation score and the cooldown penalty score are negative terms), and the result can be truncated to the range of 0 to 1 to obtain the quantified effect value of the candidate domain. When there are multiple candidate domains, their respective quantified effect values ​​are calculated for subsequent selection.

[0095] The reward score for candidate domains is calculated in the same way as the domain reward score mentioned above; simply replace it with the statistical data under the corresponding dimension combination. The cooling-off penalty score, which can be set between 0 and 1, is used to suppress frequent recent domain switching. The cooling-off penalty score for switching domains and switching network types is determined based on the actual situation under the corresponding dimension combination.

[0096] For example, the value obtained by subtracting the global degradation from 1 and the prior score of the in-place retry strategy can be weighted and summed, and the result can be truncated to the interval between 0 and 1 to obtain the quantified value of the effect of the in-place retry strategy.

[0097] This effectively improves the precision and accuracy of timeout control while enhancing the flexibility and accuracy of strategy selection.

[0098] In one scenario, a third processing strategy is obtained based on the maximum value among the fifth evaluation scores, including: in response to the maximum value being greater than or equal to the second threshold, the candidate processing strategy corresponding to the maximum value is used as the third processing strategy; in response to the maximum value being less than the second threshold, a preset fallback strategy is used as the third processing strategy.

[0099] For example, if the maximum value is less than a preset threshold, a preset fallback strategy can be selected, such as a retry strategy or sending a request failure message. If the maximum value is greater than or equal to the preset threshold, the processing strategy corresponding to the maximum value will be used as the final processing strategy. Furthermore, different fallback strategies can be set for different request stages, without any restrictions.

[0100] This effectively improves the precision and accuracy of timeout control, enhances the flexibility and accuracy of strategy selection, and avoids resource waste caused by executing processing strategies.

[0101] In one scenario, the method further includes: increasing a second threshold in response to an increase in the seventh evaluation score, the seventh evaluation score representing the degree of network volatility under the first dimension combination.

[0102] For example, such as Figure 3As shown, the budget and cooling control module can dynamically adjust the second threshold based on the network volatility under the current dimensional combination. For example, the base threshold can be dynamically adjusted based on the volatility score under the current dimensional combination. That is, the product of the volatility score and the configurable weight is added to the base threshold. When the volatility score is high, the switching threshold is increased accordingly, making the conditions for triggering switching more stringent, thereby suppressing invalid switching during volatility periods. In addition, the penalty cooling score for switching domain names or networks can be set to increase as the corresponding volatility score increases, in order to suppress ping-pong switching during volatility periods.

[0103] This effectively improves the precision and accuracy of timeout control, while also enhancing the flexibility and accuracy of strategy selection and avoiding resource waste caused by frequent switching of processing strategies.

[0104] In one scenario, the method further includes: in response to the second network request meeting preset conditions during the data download phase, reducing a second timeout threshold, wherein the second timeout threshold is a timeout threshold for the second network request during the data download phase, and the preset conditions include a download data volume growth rate greater than or equal to a third threshold.

[0105] For example, during the download phase, to prevent excessive delays at the tail end from hindering the process, online signals can be introduced: Initiation phase: whether preceding phases were successfully completed (e.g., DNS completion, successful connection establishment, handshake completion, etc.); Download phase: whether there is an increase in the number of bytes. For instance, if the growth rate of downloaded data volume is lower than a threshold, it may indicate that the connection is stuck or in an unrecoverable state. In this case, the timeout threshold for the download phase can be lowered in real time, for example, by lowering the recoverability score or directly shortening the timeout threshold, to further improve the precision and accuracy of timeout control.

[0106] In addition, the racing module can use the current set of candidate network types or the current set of candidate domain names as optional action inputs for the first or second processing strategy. The caching module can bypass and trigger data statistics and threshold updates during the download phase when a cache hit occurs, or use a cache hit as an additional signal to affect the timeout threshold.

[0107] The above method enables quantitative evaluation of different request stages of a network request, adaptive adjustment of stage timeout thresholds, and selection of appropriate handling strategies when a request times out or fails. Furthermore, it maintains relative silence as much as possible when network conditions are good to avoid unnecessary switching, while achieving a balance between "fast failure + effective recovery" when network conditions are poor, and suppressing jitter amplification and additional resource waste caused by frequent switching. For example, when V and G are low, a higher threshold and a lower policy trigger probability are maintained to preserve the current state and avoid interference. When the network deteriorates, long-tail and waiting overhead are reduced, and when high S are present, rapid identification is triggered to shorten tail latency.

[0108] This paper provides a method for timeout control of network requests, including: obtaining a first network request; wherein the request process of the first network request includes at least one request stage, and the first network request corresponds to a first network type; for the first request stage in the at least one request stage, updating a first statistical data based on the feature data corresponding to the first request stage; wherein the first statistical data is feature statistical data under a first dimension combination, the first dimension combination includes a first network type, a first domain name, and a first request stage, and the first domain name is the domain name requested by the first network request; obtaining a multi-dimensional evaluation score based on the first statistical data, and updating a first timeout threshold based on the multi-dimensional evaluation score, the first timeout threshold being used to control the timeout of network requests under the first dimension combination. The second network request undergoes timeout control; wherein the multi-dimensional evaluation score includes at least one of the following: a first evaluation score, used to characterize the probability of changing the second network request from a failed state to a successful state by increasing a first timeout threshold, and the first evaluation score is positively correlated with the first timeout threshold; a second evaluation score, used to characterize the degree of performance degradation under the first dimension combination, and the second evaluation score is positively correlated with the first timeout threshold; a third evaluation score, used to characterize the quantitative value of the effect of executing the preset timeout processing strategy under the first dimension combination, and the third evaluation score is negatively correlated with the first timeout threshold; and a fourth evaluation score, used to characterize the degree of network fluctuation under the first dimension combination, and the fourth evaluation score is positively correlated with the first timeout threshold.

[0109] By adopting the above method, network requests can be characterized by a combination of network type, request domain name, and request stage. Then, the timeout threshold corresponding to the combination of dimensions can be dynamically updated based on the statistical data, thereby effectively improving the accuracy and precision of timeout control. On the one hand, it can reduce the phenomenon of premature retries and reduce the resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0110] Figure 4 This is a schematic diagram of a network request timeout control device according to an example. Figure 4 As shown, the network request timeout control device 400 includes: The acquisition module 401 is used to acquire a first network request; wherein the processing process of the first network request includes at least one processing stage, and the first network request corresponds to a first network type; The first update module 402 is used to update the first statistical data according to the feature data corresponding to the first request processing stage in the at least one request processing stage; wherein, the first statistical data is feature statistical data under a first dimension combination, and the first dimension combination includes the first network type and the first request stage; The second update module 403 is used to update the first timeout threshold based on the first statistical data. The first timeout threshold is used to control the timeout of the second network request under the first dimension combination.

[0111] Using the above-mentioned device, network requests can be statistically analyzed according to the combination of network type and request stage. Then, the timeout threshold corresponding to the combination of dimensions can be dynamically updated based on the statistical data, thereby effectively improving the accuracy and precision of timeout control. On the one hand, it can reduce the phenomenon of premature retry and reduce the resource consumption caused by repeated processing. On the other hand, it can reduce request blocking caused by invalid long waits, improve resource utilization efficiency, and ensure the stable operation of client network request services.

[0112] Optionally, the second update module 403 is used for: Based on the first statistical data, a multidimensional evaluation score is obtained, and the first timeout threshold is updated based on the multidimensional evaluation score; The multidimensional evaluation score includes at least one of the following: The first evaluation score is used to characterize the probability of changing the second network request from a failed state to a successful state by increasing the first timeout threshold, and the first evaluation score is positively correlated with the first timeout threshold. The second evaluation score is used to characterize the degree of performance degradation under the first dimension combination, and the second evaluation score is positively correlated with the first timeout threshold. The third evaluation score is used to characterize the quantitative value of the effect of executing the preset timeout processing strategy under the first dimension combination, and the third evaluation score is negatively correlated with the first timeout threshold. The fourth evaluation score is used to characterize the degree of network fluctuation under the first dimension combination, and the fourth evaluation score is positively correlated with the first timeout threshold.

[0113] Optionally, the first evaluation score is obtained in the following manner: A first adjustment score is obtained based on the first statistical data, and a first evaluation score is obtained based on a preset base score corresponding to the combination of the first adjustment score and the first dimension; wherein, the first adjustment score includes at least one of the following: The first sub-score is used to reduce the first evaluation score in response to the number of consecutive request failures corresponding to the first dimension combination being greater than a first threshold. The first statistical data includes the number of consecutive request failures. The second sub-score is used to increase the first evaluation score in response to a decrease in the ratio between the first time value and the second time value. The first statistical data includes the first time value and the second time value. The first time value is obtained based on the first request time data within a first time window combined with the first dimension. The second time value is obtained based on the second request time data within a second time window combined with the first dimension. The first time window is shorter than the second time window. The third sub-score is used to increase the first evaluation score in response to the fact that a preset number of network requests under the first dimension combination have been successfully requested. The first statistical data includes the request results of the preset number of network requests. The fourth sub-score is used to reduce the first evaluation score in response to a preset abnormal event triggered under the first dimension combination. The first statistical data includes the mapping relationship between the preset abnormal event and the fourth sub-score. The fifth sub-score is used to decrease the first evaluation score in response to an increase in the ratio between the third time consumption value and the fourth time consumption value. The first statistical data includes the third time consumption value and the fourth time consumption value, which are obtained from the first request time consumption data.

[0114] Optionally, the second evaluation score is obtained in the following manner: The second evaluation score is obtained based on the first indicator data in the first statistical data; wherein, the first indicator data includes request time consumption data or request throughput data of the first dimension combination in the first time window and the second time window respectively, and the first time window is shorter than the second time window.

[0115] Optionally, the preset timeout handling strategy includes a first handling strategy and a second handling strategy, wherein the first handling strategy is used to indicate switching network types, and the second handling strategy is used to indicate switching domain names; the third evaluation score is obtained in the following manner: For each of the preset timeout handling strategies, a quantized value is obtained based on the second evaluation score; wherein, the quantized value corresponding to the first handling strategy is positively correlated with the second evaluation score, and the quantized value corresponding to the second handling strategy is negatively correlated with the second evaluation score; The maximum value among the quantified values ​​is taken as the third evaluation score.

[0116] Optionally, the fourth evaluation score is obtained in the following manner: Based on the second indicator data in the first statistical data, a multidimensional sub-score is obtained, and based on the multidimensional sub-score, the fourth evaluation score is obtained. The second indicator data includes indicator data of the first dimension combination within a first time window and a second time window, respectively, wherein the first time window is shorter than the second time window; wherein the multidimensional sub-score includes at least one of the following: The sixth sub-score is used to increase the fourth evaluation score in response to an increase in the first ratio between the fifth time consumption value and the sixth time consumption value. The second indicator data includes the fifth time consumption value and the sixth time consumption value, which are obtained based on the first request time consumption data combined with the first dimension within the first time window. The seventh sub-score is used to increase the fourth evaluation score in response to an increase in the ratio between the first ratio and the second ratio. The second ratio is the ratio between the seventh time consumption value and the eighth time consumption value. The second indicator data includes the seventh time consumption value and the eighth time consumption value, which are obtained based on the second request time consumption data combined with the first dimension within the second time window. The eighth sub-score is used to increase the fourth evaluation score in response to an increase in the ratio between the ninth and tenth time consumption values. The second indicator data includes the ninth and tenth time consumption values. The ninth time consumption value is obtained based on the first request time consumption data, and the tenth time consumption value is obtained based on the second request time consumption data. The ninth sub-score is used to increase the fourth evaluation score in response to an increase in the absolute difference between the first request failure rate and the second request failure rate. The second indicator data includes the first request failure rate and the second request failure rate, wherein the first request failure rate is the request failure rate of the first dimension combination within the first time window, and the second request failure rate is the request failure rate of the first dimension combination within the second time window.

[0117] Optionally, the network request timeout control device 400 further includes a first response module, used for: If the duration of the second network request is greater than the first timeout threshold, at least one candidate processing strategy is obtained from the preset timeout processing strategy; For each of the candidate processing strategies, a fifth evaluation score is obtained, which is used to characterize the quantitative value of the effect of executing the candidate processing strategy. The third processing strategy is obtained based on the maximum value among the fifth evaluation scores.

[0118] Optionally, the first response module is used to: Obtain a sixth evaluation score, which is used to characterize the degree of performance degradation under the first dimension combination; In response to the candidate processing strategy being the first processing strategy, the fifth evaluation score is obtained based on the sixth evaluation score and the third indicator data; wherein, the first processing strategy is used to indicate switching network types, the third indicator data includes a first success rate, a second success rate, an eleventh time consumption value, and a twelfth time consumption value within a second time window, the first success rate is the request success rate under the first dimension combination, the second success rate is the request success rate under the second network type and the first request stage, the eleventh time consumption value is obtained based on the time consumption data under the first dimension combination, and the twelfth time consumption value is obtained based on the time consumption data under the second network type and the second request stage, the second network type being the network type corresponding to the candidate switching network; In response to the candidate processing strategy being the second processing strategy, the fifth evaluation score is obtained based on the sixth evaluation score and the fourth indicator data; wherein, the second processing strategy is used to indicate the domain name switching, the fourth indicator data includes a first failure rate, a second failure rate, a first timeout rate, and a second timeout rate within a first time window, the first failure rate being the request failure rate under the second dimension combination, the second failure rate being the request failure rate under the first dimension combination, the first timeout rate being the request timeout rate under the second dimension combination, the second timeout rate being the request timeout rate under the first dimension combination, the second dimension combination including the first network type, the candidate domain name switching, and the first request stage, and the first time window being shorter than the second time window; In response to the candidate processing strategy being the fourth processing strategy, the fifth evaluation score is obtained based on the sixth evaluation score, wherein the fourth processing strategy is a retry strategy that does not indicate switching domain names or network types.

[0119] Optionally, the first response module is used to: In response to the maximum value being greater than or equal to the second threshold, the candidate processing strategy corresponding to the maximum value is used as the third processing strategy; In response to the maximum value being less than the second threshold, a preset fallback strategy is adopted as the third processing strategy.

[0120] Optionally, the network request timeout control device 400 further includes a second response module, used for: In response to the second network request meeting preset conditions during the data download phase, the second timeout threshold is reduced. The second timeout threshold is the timeout threshold for the second network request during the data download phase. The preset conditions include a download data volume growth rate greater than or equal to a third threshold.

[0121] Optionally, the first dimension combination may further include a first domain name or a set of first domain names, wherein the first domain name is the domain name requested by the first network request, and the set of first domain names includes the first domain name.

[0122] Regarding the network request control timeout device 400 mentioned above, the method logic executed by each functional module has been explained in detail in the section on methods, and will not be repeated here.

[0123] Based on the same concept, a computer-readable medium is also provided, on which a computer program is stored, which, when executed by a processing device, implements the steps of the timeout control method for any of the above-described network requests.

[0124] This effectively improves the precision and accuracy of timeout control. On the one hand, it reduces the phenomenon of premature retries and reduces the resource consumption caused by repeated processing. On the other hand, it reduces request blocking caused by invalid long waits, improves resource utilization efficiency, and ensures the stable operation of client network request services.

[0125] Based on the same concept, an electronic device is also provided, which may include: A storage device on which computer programs are stored; A processing device for executing a computer program stored in a storage device to implement the steps of the timeout control method for any of the above-described network requests.

[0126] This effectively improves the precision and accuracy of timeout control. On the one hand, it reduces the phenomenon of premature retries and reduces the resource consumption caused by repeated processing. On the other hand, it reduces request blocking caused by invalid long waits, improves resource utilization efficiency, and ensures the stable operation of client network request services.

[0127] Based on the same concept, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the timeout control method for any of the above-described network requests.

[0128] This effectively improves the precision and accuracy of timeout control. On the one hand, it reduces the phenomenon of premature retries and reduces the resource consumption caused by repeated processing. On the other hand, it reduces request blocking caused by invalid long waits, improves resource utilization efficiency, and ensures the stable operation of client network request services.

[0129] The following is for reference. Figure 5The diagram illustrates the structure of an electronic device 500 suitable for implementing the above method. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs (Televisions), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not be construed as limiting its functionality or scope of use.

[0130] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, the ROM 502, and the RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0131] Typically, the following devices can be connected to the input / output interface 505: input devices 506 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0132] In particular, depending on certain circumstances, the processes described in the flowchart above can be implemented as computer software programs. For example, a computer program product is provided, comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. This computer program can be downloaded and installed from a network via communication device 509, or installed from storage device 508, or installed from read-only memory 502. When the computer program is executed by processing device 501, it performs the functions defined in the above-described methods.

[0133] It should be noted that the aforementioned computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In one case, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In another case, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.

[0134] In some cases, communication can be conducted using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include Local Area Networks (LANs), Wide Area Networks (WANs), Internets (e.g., the Internet), and peer-to-peer networks (e.g., ad-hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0135] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0136] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire a first network request; wherein the request process of the first network request includes at least one request stage, and the first network request corresponds to a first network type; for the first request stage in the at least one request stage, update a first statistical data based on feature data corresponding to the first request stage; wherein the first statistical data is feature statistical data under a first dimension combination, the first dimension combination including the first network type and the first request stage; and update a first timeout threshold based on the first statistical data, the first timeout threshold being used for timeout control of a second network request under the first dimension combination.

[0137] Computer program code for performing the above operations can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include, but are not limited to, object-oriented programming languages, as well as conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0138] The flowcharts and block diagrams in the accompanying figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products under various scenarios. Each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative cases, the functions indicated in the blocks may occur in a different order than those indicated in the figures. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0139] The modules mentioned above can be implemented in software or hardware. In some cases, the name of a module does not necessarily limit the functionality of that module.

[0140] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field-Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application-Specific Standard Parts (ASSPs), Systems on Chips (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0141] In this context, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0142] The above description is merely illustrative and explains the technical principles employed. Those skilled in the art should understand that the scope of this document is not limited to the specific combinations of the above-described technical features, but should also cover any combination of the above-described technical features or their equivalents without departing from the above concept.

[0143] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, while some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of this paper. Certain features described in the context of a single example can also be implemented in combination in a single example. Conversely, various features described in the context of a single example can also be implemented individually or in any suitable sub-combination in multiple examples.

[0144] Although this document has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims. Regarding the aforementioned apparatus, the specific manner in which the various modules perform their operations has already been described in detail in the section concerning the method, and will not be elaborated upon here.

Claims

1. A method for timeout control of network requests, comprising: Obtain a first network request; wherein the request process of the first network request includes at least one request stage, and the first network request corresponds to a first network type; For the first request stage in the at least one request stage, the first statistical data is updated based on the feature data corresponding to the first request stage; wherein, the first statistical data is feature statistical data under a first dimension combination, and the first dimension combination includes the first network type and the first request stage; Based on the first statistical data, the first timeout threshold is updated. The first timeout threshold is used to control the timeout of the second network request under the first dimension combination.

2. The method according to claim 1, wherein updating the first timeout threshold based on the first statistical data includes: Based on the first statistical data, a multidimensional evaluation score is obtained, and the first timeout threshold is updated based on the multidimensional evaluation score; The multidimensional evaluation score includes at least one of the following: The first evaluation score is used to characterize the probability of changing the second network request from a failed state to a successful state by increasing the first timeout threshold, and the first evaluation score is positively correlated with the first timeout threshold. The second evaluation score is used to characterize the degree of performance degradation under the first dimension combination, and the second evaluation score is positively correlated with the first timeout threshold. The third evaluation score is used to characterize the quantitative value of the effect of executing the preset timeout processing strategy under the first dimension combination, and the third evaluation score is negatively correlated with the first timeout threshold. The fourth evaluation score is used to characterize the degree of network fluctuation under the first dimension combination, and the fourth evaluation score is positively correlated with the first timeout threshold.

3. The method according to claim 2, wherein the first evaluation score is obtained in the following manner: A first adjustment score is obtained based on the first statistical data, and a first evaluation score is obtained based on a preset base score corresponding to the combination of the first adjustment score and the first dimension; wherein, The first adjustment score includes at least one of the following: The first sub-score is used to reduce the first evaluation score in response to the number of consecutive request failures corresponding to the first dimension combination being greater than a first threshold. The first statistical data includes the number of consecutive request failures. The second sub-score is used to increase the first evaluation score in response to a decrease in the ratio between the first time value and the second time value. The first statistical data includes the first time value and the second time value. The first time value is obtained based on the first request time data within a first time window combined with the first dimension. The second time value is obtained based on the second request time data within a second time window combined with the first dimension. The first time window is shorter than the second time window. The third sub-score is used to increase the first evaluation score in response to the fact that a preset number of network requests under the first dimension combination have been successfully requested. The first statistical data includes the request results of the preset number of network requests. The fourth sub-score is used to reduce the first evaluation score in response to a preset abnormal event triggered under the first dimension combination. The first statistical data includes the mapping relationship between the preset abnormal event and the fourth sub-score. The fifth sub-score is used to decrease the first evaluation score in response to an increase in the ratio between the third time consumption value and the fourth time consumption value. The first statistical data includes the third time consumption value and the fourth time consumption value, which are obtained from the first request time consumption data.

4. The method according to claim 2, wherein the second evaluation score is obtained in the following manner: The second evaluation score is obtained based on the first indicator data in the first statistical data; wherein... The first indicator data includes request time consumption data or request throughput data of the first dimension combination within the first time window and the second time window, respectively, wherein the first time window is shorter than the second time window.

5. The method according to claim 2, wherein the preset timeout handling strategy includes a first handling strategy and a second handling strategy, the first handling strategy being used to indicate switching network types, and the second handling strategy being used to indicate switching domain names; the third evaluation score is obtained in the following manner: For each of the preset timeout handling strategies, a quantified value is obtained based on the second evaluation score; wherein, The quantized value corresponding to the first processing strategy is positively correlated with the second evaluation score, and the quantized value corresponding to the second processing strategy is negatively correlated with the second evaluation score. The maximum value among the quantified values ​​is taken as the third evaluation score.

6. The method according to claim 2, wherein the fourth evaluation score is obtained in the following manner: Based on the second indicator data in the first statistical data, multidimensional sub-scores are obtained, and the fourth evaluation score is obtained based on the multidimensional sub-scores. The second indicator data includes indicator data of the first dimension combination within a first time window and a second time window, respectively, wherein the first time window is shorter than the second time window; wherein... The multidimensional sub-scores include at least one of the following: The sixth sub-score is used to increase the fourth evaluation score in response to an increase in the first ratio between the fifth time consumption value and the sixth time consumption value. The second indicator data includes the fifth time consumption value and the sixth time consumption value, which are obtained based on the first request time consumption data combined with the first dimension within the first time window. The seventh sub-score is used to increase the fourth evaluation score in response to an increase in the ratio between the first ratio and the second ratio. The second ratio is the ratio between the seventh time consumption value and the eighth time consumption value. The second indicator data includes the seventh time consumption value and the eighth time consumption value, which are obtained based on the second request time consumption data combined with the first dimension within the second time window. The eighth sub-score is used to increase the fourth evaluation score in response to an increase in the ratio between the ninth and tenth time consumption values. The second indicator data includes the ninth and tenth time consumption values. The ninth time consumption value is obtained based on the first request time consumption data, and the tenth time consumption value is obtained based on the second request time consumption data. The ninth sub-score is used to increase the fourth evaluation score in response to an increase in the absolute difference between the first request failure rate and the second request failure rate. The second indicator data includes the first request failure rate and the second request failure rate, wherein the first request failure rate is the request failure rate of the first dimension combination within the first time window, and the second request failure rate is the request failure rate of the first dimension combination within the second time window.

7. The method according to any one of claims 1-6, further comprising: If the duration of the second network request is greater than the first timeout threshold, at least one candidate processing strategy is obtained from the preset timeout processing strategy; For each of the candidate processing strategies, a fifth evaluation score is obtained, which is used to characterize the quantitative value of the effect of executing the candidate processing strategy. The third processing strategy is obtained based on the maximum value among the fifth evaluation scores.

8. The method according to claim 7, wherein obtaining the fifth evaluation score includes: Obtain a sixth evaluation score, which is used to characterize the degree of performance degradation under the first dimension combination; In response to the candidate processing strategy being the first processing strategy, the fifth evaluation score is obtained based on the sixth evaluation score and the third indicator data; wherein, the first processing strategy is used to indicate switching network types, the third indicator data includes a first success rate, a second success rate, an eleventh time consumption value, and a twelfth time consumption value within a second time window, the first success rate is the request success rate under the first dimension combination, the second success rate is the request success rate under the second network type and the first request stage, the eleventh time consumption value is obtained based on the time consumption data under the first dimension combination, and the twelfth time consumption value is obtained based on the time consumption data under the second network type and the second request stage, the second network type being the network type corresponding to the candidate switching network; In response to the candidate processing strategy being the second processing strategy, the fifth evaluation score is obtained based on the sixth evaluation score and the fourth indicator data; wherein, the second processing strategy is used to indicate the domain name switching, the fourth indicator data includes a first failure rate, a second failure rate, a first timeout rate, and a second timeout rate within a first time window, the first failure rate being the request failure rate under the second dimension combination, the second failure rate being the request failure rate under the first dimension combination, the first timeout rate being the request timeout rate under the second dimension combination, the second timeout rate being the request timeout rate under the first dimension combination, the second dimension combination including the first network type, the candidate domain name switching, and the first request stage, and the first time window being shorter than the second time window; In response to the candidate processing strategy being the fourth processing strategy, the fifth evaluation score is obtained based on the sixth evaluation score, wherein the fourth processing strategy is a retry strategy that does not indicate switching domain names or network types.

9. The method according to claim 7, wherein obtaining the third processing strategy based on the maximum value among the fifth evaluation scores includes: In response to the maximum value being greater than or equal to the second threshold, the candidate processing strategy corresponding to the maximum value is used as the third processing strategy; In response to the maximum value being less than the second threshold, a preset fallback strategy is adopted as the third processing strategy.

10. The method according to claim 7, further comprising: In response to the second network request meeting preset conditions during the data download phase, the second timeout threshold is reduced. The second timeout threshold is the timeout threshold for the second network request during the data download phase. The preset conditions include a download data volume growth rate greater than or equal to a third threshold.

11. The method according to any one of claims 1-6, wherein the first dimension combination further includes a first domain name or a first domain name set, the first domain name being the domain name requested by the first network request, and the first domain name set including the first domain name.

12. A timeout control device for network requests, comprising: An acquisition module is used to acquire a first network request; wherein the processing procedure of the first network request includes at least one processing stage, and the first network request corresponds to a first network type; The first update module is used to update the first statistical data for the first request processing stage in the at least one request processing stage, based on the feature data corresponding to the first request processing stage; wherein, the first statistical data is feature statistical data under a first dimension combination, and the first dimension combination includes the first network type and the first request stage; The second update module is used to update the first timeout threshold based on the first statistical data. The first timeout threshold is used to control the timeout of the second network request under the first dimension combination.

13. A computer-readable medium having a computer program stored thereon, wherein, When executed by a processing device, the computer program implements the method described in any one of claims 1-11.

14. An electronic device comprising: A storage device on which computer programs are stored; A processing apparatus for executing the computer program in the storage device to implement the method according to any one of claims 1-11.

15. A computer program product comprising a computer program, wherein, When executed by a processor, the computer program implements the method described in any one of claims 1-11.