An optimization method for request timeout, a terminal and a storage medium

By dynamically calculating timeout parameters and employing a two-layer timeout judgment mechanism, the resource waste and request failure issues caused by traditional static timeout configuration are resolved, achieving high efficiency and stability in API calls and improving the overall success rate.

CN122179464APending Publication Date: 2026-06-09FUJIAN TQ ONLINE INTERACTIVE INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUJIAN TQ ONLINE INTERACTIVE INC
Filing Date
2026-01-21
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, traditional static timeout configurations cannot adapt to dynamic changes in request duration, making it difficult to balance resource utilization and request success rate. Especially in request scenarios with long-tail distribution characteristics, fixed timeout settings lead to resource waste or request failure.

Method used

By monitoring the distribution of request timeout data for the target interface, dynamically calculating the preset timeout time, maximum timeout time, and the number of times the maximum timeout time is supported, a two-layer timeout judgment mechanism is established to achieve fine-grained management of request timeouts.

Benefits of technology

It significantly improved the success rate of API calls, optimized the efficiency of system resource utilization, resolved the contradiction between resource utilization and request success rate under the long tail effect, and ensured the high efficiency and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179464A_ABST
    Figure CN122179464A_ABST
Patent Text Reader

Abstract

This invention discloses an optimization method, terminal, and storage medium for request timeout. The method includes: monitoring a target interface to obtain the request timeout data distribution of the target interface within a preset statistical period; dynamically calculating a preset timeout time, a maximum timeout time, and the number of times the maximum timeout time is supported based on the request timeout data distribution; when initiating a request to the target interface, determining whether the current request is completed within the preset timeout time; if so, the request is considered successful; otherwise, determining whether the current request timeout time exceeds the maximum timeout time; if it does, the request is considered failed; if it does not exceed the maximum timeout time, and the number of times the maximum timeout time is used exceeds the number of supported times, the request is considered failed; if the number of times the maximum timeout time is used does not exceed the number of supported times, the request is considered successful. This invention solves the problem of difficulty in balancing resource utilization and request success rate under static timeout settings, significantly improving the overall success rate of interface calls.
Need to check novelty before this filing date? Find Prior Art