Network request method, apparatus, device, storage medium, and product

By determining request timeout duration through multi-dimensional network dynamic indicators and reinforcement learning, and combining cache verification and decision tree models, the problems of timeout management and data consistency in network requests are solved, achieving efficient management of data integrity and task continuity.

CN119449806BActive Publication Date: 2025-11-21CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411654084.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-11-21
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Existing technologies lack a one-stop method for managing timeouts, resource management, network selection, and data consistency guarantees in network requests, leading to data loss, transmission delays, and increased system complexity during network transmission. They also lack intelligent network selection and rapid recovery mechanisms.

Method used

The system determines request timeout duration based on multi-dimensional network dynamic metrics and reinforcement learning, monitors the status, and reclaims resources when timeout occurs. It also employs cache validation and decision tree models for network evaluation and data consistency verification.

Benefits of technology

It ensures data integrity and task continuity, guarantees efficient and accurate network transmission, reduces system complexity, and improves the intelligence and recovery speed of network selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449806B_ABST
    Figure CN119449806B_ABST
Patent Text Reader

Abstract

The application discloses a network request method and device, equipment, storage medium and product, relates to the cloud computing technical field, discloses a network request method, comprising: in response to request transmission instruction, determining request timeout duration based on the multi-dimensional network dynamic index corresponding to the current connection network, reinforcement learning mode and basic timeout duration;Based on the request timeout duration, the state of the target request is monitored, and the transmission state of the target request is determined;When the transmission state is a request timeout state, the target request is recycled. Through the above-mentioned mode, the request timeout duration determined by the reinforcement learning mode, the multi-dimensional network dynamic index and the basic timeout duration is used for state monitoring of the target request, corresponding measures are taken based on the corresponding transmission state, the integrity of data and the continuity of task are guaranteed, and the reasonable management of the corresponding resources of the timeout request is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cloud computing, and particularly relates to a network request method and device, equipment, a storage medium and a product. BACKGROUND

[0002] In the network transmission process of the algorithm network service, a timeout time is generally set by a message sender. After the timeout, the sender performs abnormal processing, including system abnormality capture, retry mechanism, etc. The processing flow of the sender is as follows: 1) data sending and timer starting After the sender sends a data packet segment to a responder, a timer is started immediately to wait for an acknowledgement information (ACK packet) sent by the receiving end. The waiting time of the timer from the start to a preset time point is the timeout time. 2) timeout judgment and retransmission decision If the sender does not receive the acknowledgement information sent by the responder within the set timeout time, the sender will judge that the data packet segment may be lost in the network transmission or other errors occur. 3) data retransmission The sender retransmits the data packet that has not been acknowledged and starts the timer again to wait for the acknowledgement information of the responder. This process may be repeated multiple times until the sender receives the acknowledgement information of the responder or reaches the upper limit of the preset retransmission number. When the timeout retry mechanism is involved, the responder needs to perform anti-repetition processing. In summary, there is no one-stop and all-round method for timeout management, resource management, network selection, data consistency guarantee, etc. in the prior art.

[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The main purpose of the present application is to provide a network request method, device, equipment, storage medium and product, which aims to solve the technical problem that the prior art cannot reasonably process the timeout management, resource management, etc. in the network request.

[0005] To achieve the above purpose, the present application provides a network request method, which comprises:

[0006] In response to a request transmission instruction, a request timeout duration is determined based on a multi-dimensional network dynamic index corresponding to a current connection network, a reinforcement learning mode and a basic timeout duration;

[0007] The state of the target request is monitored based on the request timeout duration to determine the transmission state of the target request;

[0008] When the transmission state is a request timeout state, the target request is recycled.

[0009] In an embodiment, the step of determining the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the currently connected network, the reinforcement learning manner, and the basic timeout duration comprises:

[0010] determining the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators corresponding to the currently connected network and the reinforcement learning manner;

[0011] performing parameter calculation according to the target weight corresponding to each network dynamic indicator and each network dynamic indicator to determine a dynamic adjustment factor;

[0012] determining the request timeout duration based on the dynamic adjustment factor and the basic timeout duration.

[0013] In an embodiment, the step of determining the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators corresponding to the currently connected network and the reinforcement learning manner comprises:

[0014] determining the state space corresponding to each time according to the multi-dimensional network dynamic indicators corresponding to the currently connected network and the basic timeout duration;

[0015] determining the immediate reward value of each state space according to the reward function;

[0016] performing iterative learning according to the state space corresponding to each time, the immediate reward value of each state space, and the deep learning network, and determining the target weight corresponding to each network dynamic indicator according to the iterative learning result.

[0017] In an embodiment, after the step of performing state monitoring on the target request based on the request timeout duration to determine the transmission state of the target request, the method further comprises:

[0018] when the transmission state is the normal response state, verifying the cache verification data corresponding to the target request in the cache queue;

[0019] performing consistency check on the cache verification data and the downstream receiving data to obtain a data check result;

[0020] when the data check result is the data consistent result, deleting the cache verification data in the cache queue.

[0021] In an embodiment, the network request method further comprises:

[0022] obtaining the network state of the currently connected network;

[0023] when the network state is the abnormal state, obtaining a plurality of performance indicators of each candidate network;

[0024] determining the indicator weight corresponding to each performance indicator according to the task type of the target request;

[0025] inputting the performance indicators and the index weights corresponding to the performance indicators into a target decision tree model to perform network evaluation and determine network scores of the candidate networks;

[0026] determining a target transmission network according to the network scores of the candidate networks, and transmitting the target request through the target transmission network.

[0027] In an embodiment, before the step of inputting the performance indicators and the index weights corresponding to the performance indicators into a target decision tree model to perform network evaluation and determine network scores of the candidate networks, the method further comprises:

[0028] constructing an initial decision tree according to a network information training set;

[0029] determining a target splitting feature and a dynamic feature weight in a node splitting process according to a reinforcement learning manner;

[0030] training the initial decision tree according to the target splitting feature and the dynamic feature weight to obtain a to-be-tested model;

[0031] performing performance testing on the to-be-tested model according to a network information test set, and obtaining a target decision tree model according to a performance testing result.

[0032] In addition, to achieve the above object, the present application further provides a network request device, which comprises a processing module configured to determine a request timeout duration based on a plurality of network dynamic indicators corresponding to a current connection network, a reinforcement learning manner and a basic timeout duration in response to a request transmission instruction;

[0033] a monitoring module configured to monitor a transmission state of a target request based on the request timeout duration and determine the transmission state of the target request;

[0034] a recycling module configured to recycle resources of the target request when the transmission state is a request timeout state.

[0035] In addition, to achieve the above object, the present application further provides a network request device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the network request method as described above.

[0036] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, the computer program being executable by a processor to implement the steps of the network request method as described above.

[0037] In addition, to achieve the above object, the application further provides a computer program product, which comprises a computer program, and the computer program realizes the steps of the network request method when executed by a processor.

[0038] The application provides a network request method. The application determines a request timeout duration based on a multi-dimensional network dynamic index corresponding to a current connection network, a reinforcement learning mode and a basic timeout duration in response to a request transmission instruction. The application performs state monitoring on a target request based on the request timeout duration, determines a transmission state of the target request, and recycles resources of the target request when the transmission state is a request timeout state. Through the above method, the request timeout duration determined by the reinforcement learning mode, the multi-dimensional network dynamic index and the basic timeout duration is used to perform state monitoring on the target request, corresponding measures are taken based on the corresponding transmission state, the data integrity and the task continuity are ensured, and the reasonable management of resources corresponding to the timeout request is realized. BRIEF DESCRIPTION OF DRAWINGS

[0039] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0041] Figure 1 A flowchart is provided for the network request method of the application embodiment one;

[0042] Figure 2 A model structure diagram of a deep Q network (DQN) is provided for the application embodiment one;

[0043] Figure 3 A flowchart is provided for the network request method of the application embodiment two;

[0044] Figure 4 A flowchart is provided for the network request method of the application embodiment three;

[0045] Figure 5 A target decision tree model structure diagram is provided for the application embodiment three;

[0046] Figure 6 A module structure diagram of the network request device of the application is provided;

[0047] Figure 7This is a schematic diagram of the device structure of the hardware operating environment involved in the network request method in this application embodiment.

[0048] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0049] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0050] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The main solution of this application embodiment is: in response to a request transmission command, a request timeout duration is determined based on multi-dimensional network dynamic indicators, reinforcement learning methods, and basic timeout duration corresponding to the currently connected network; the status of the target request is monitored based on the request timeout duration to determine the transmission status of the target request; and when the transmission status is a request timeout status, resources are reclaimed from the target request.

[0052] In existing network transmission processes for computing services, the timeout period is typically set by the message sender. After the timeout, the sender handles any anomalies, including capturing system errors and implementing retry mechanisms. The sender's processing flow is as follows: 1) Data Transmission and Timer Start: After sending a data segment to the responder, the sender immediately starts a timer to wait for an acknowledgment (ACK) message from the receiver. The waiting time from the timer's start to the preset time point is the timeout period. 2) Timeout Judgment and Retransmission Decision: If the sender does not receive an acknowledgment message from the responder within the set timeout period, the sender determines that the data segment may have been lost or encountered other errors during network transmission. 3) Data Retransmission: The sender will retransmit the unacknowledged data segment and restart the timer to wait for the responder's acknowledgment message. This process may repeat multiple times until the sender receives an acknowledgment message from the responder or reaches the preset retransmission limit. When a timeout retry mechanism is involved, the responder needs to implement anti-retransmission measures. In summary, there is currently no one-stop, comprehensive method for addressing timeout management, resource management, network selection, and data consistency assurance in network requests.

[0053] In existing technologies, the lack of automatic synchronization mechanisms for timeout settings between upstream and downstream systems leads to timeout discrepancies, potentially causing data loss or transmission delays. Existing systems primarily rely on the sender's retry mechanism when handling network timeouts or anomalies, increasing network load and potentially triggering system errors. Ensuring data consistency between the sender and responder typically requires additional mechanisms, such as periodic data comparisons or business logic-level compensation measures, increasing system complexity. When facing network failures or instability, existing technologies often rely on manual intervention or simple retry logic, lacking intelligent network selection and rapid recovery mechanisms.

[0054] The Computing Network Intelligent Network is a highly integrated and intelligent network system that combines advanced computing resources with network technology to provide users with efficient, flexible, and secure computing services. Through integrated orchestration and intelligent scheduling, this network achieves deep integration of computing power and network products. Given the task-oriented, high-concurrency, and real-time characteristics of computing network products, it places high demands on the network's timeliness, stability, and accuracy.

[0055] This application ensures the efficiency and correctness of network services from four aspects: automatic coordination of network transmission time limits, self-management of network resources, intelligent network selection in case of network anomalies, and strong data consistency guarantee, covering each node before, during, and after a network request occurs.

[0056] This application monitors the status of target requests by using reinforcement learning, multi-dimensional network dynamic indicators, and a request timeout duration determined by a basic timeout duration. Based on the corresponding transmission status, corresponding measures are taken to ensure data integrity and task continuity, while also achieving reasonable management of resources corresponding to timeout requests.

[0057] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or network request device capable of performing the above functions. The following description uses a network request device as an example to illustrate this embodiment and the subsequent embodiments.

[0058] Based on this, embodiments of this application provide a network request method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the network request method of this application.

[0059] In this embodiment, the network request method includes steps S10 to S30:

[0060] In step S10, in response to the request transmission instruction, a request timeout duration is determined based on the multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning manner, and a basic timeout duration.

[0061] It should be noted that the multi-dimensional network dynamic indicators corresponding to the current connection network include but are not limited to network conditions, system load, and traffic volume indicators. In this embodiment, the network condition (NC) can be measured by the packet loss rate (PLR). The system load (SL) can be measured by the CPU utilization (CPUU). The traffic volume (BV) can be measured by the request rate (RR).

[0062] It can be understood that the basic timeout duration is set by relevant upstream and downstream system technicians according to the basic requirements of the upstream and downstream systems and the preliminary evaluation of the network environment. This duration is usually based on an empirical value or a default value. For example, in the task-based product call synchronization scenario, the real-time requirement of the call between the upstream and downstream systems is high, and the network bandwidth between the upstream and downstream systems reaches gigabit, and the basic timeout duration is set to 100 ms.

[0063] It can be understood that in this embodiment, a dynamic weight (W) is assigned to each network dynamic indicator to reflect the relative importance of each factor in calculating the adjustment factor. Through the multi-dimensional network dynamic indicators and the corresponding dynamic weights, a dynamic adjustment factor can be calculated. The calculation method of the dynamic adjustment factor is the weighted average method, in which the indicators and weights are normalized or standardized in appropriate units or proportions. Specifically, the calculation formula of the dynamic adjustment factor is as follows: DAF=(W NC ×PLR+W SL ×CPUU+W BV ×RR) / (W NC +W SL +W BV ). Wherein, PLR represents the packet loss rate, CPUU represents the CPU utilization, BV represents the traffic volume, W NC represents the network condition weight, W SL represents the system load weight, and W BV represents the traffic volume weight. In this embodiment, in the process of calculating the dynamic adjustment factor using the weighted average method, the weights of the indicators are determined by the reinforcement learning manner (such as deep Q network DQN). Deep Q network (Deep Q-Network, DQN for short) is an algorithm combining Q learning (a reinforcement learning method) and deep learning technology.

[0064] In a specific implementation, the base timeout duration and the dynamic adjustment factor are combined to calculate the request timeout duration, Request Timeout = Base Timeout x Dynamic Adjustment Factor (DAF). In this embodiment, the request timeout duration can be automatically updated according to the frequency of dynamically adjusting the request timeout duration. For example, in the above example, the base timeout duration is 100 ms, and the dynamic adjustment factor is 0.585. Then the request timeout duration is 58.5 ms.

[0065] It should be noted that the adjustment frequency of the request timeout duration depends on the stability requirements of the system and the update frequency of the monitoring data. When the stability requirement of the system is high, the adjustment frequency should be appropriately reduced. Moreover, the adjustment frequency should be lower than the update frequency of the monitoring data. For example, in the above-mentioned network task product call synchronization scenario, the update frequency of the monitoring data of the index is 10 ms, and the real-time requirement of the system for this business is higher than the stability requirement. Therefore, the frequency of automatically updating the request timeout duration is set to 1 s.

[0066] It can be understood that whenever the set request timeout duration is adjusted, the latest request timeout duration is synchronized to the upstream and downstream in time to ensure the real-time effectiveness of the request timeout duration and the consistency of the timeout duration of the upstream and downstream, so as to ensure that the responder responds to the sender in time during the network transmission process, thereby avoiding data loss or transmission delay caused by different synchronization of timeout duration. When the upstream system data is synchronized, the request timeout duration is passed to the downstream system as a parameter. For example, synchronization can be achieved by using the HTTP header, query parameter, message body or other mechanisms in the API request. If the upstream system and the downstream system use the same configuration data, the downstream service can also directly obtain the same request timeout duration configuration from the public configuration data.

[0067] In a feasible implementation, step S10 can include steps A11-A13.

[0068] Step A11, determining the target weight corresponding to each network dynamic index according to the multi-dimensional network dynamic index corresponding to the current connection network and the reinforcement learning mode.

[0069] It should be noted that the reinforcement learning mode will combine the multi-dimensional network dynamic index and the base timeout duration to calculate the target weight corresponding to each network dynamic index.

[0070] Step A12, performing parameter calculation according to the target weight corresponding to each network dynamic index and each network dynamic index to determine the dynamic adjustment factor.

[0071] Step A13, determining the request timeout duration based on the dynamic adjustment factor and the base timeout duration.

[0072] It should be noted that in the embodiment, the dynamic adjustment factor is calculated based on the average monitoring data of network delay, packet loss rate, CPU usage, memory occupancy, request rate and other indicators in the last 5 minutes, and the calculation method of the dynamic adjustment factor is weighted average method, wherein the indicators and weights are normalized or standardized in appropriate units or proportions. Specifically, the calculation formula of the dynamic adjustment factor is as follows: DAF=(W NC ×PLR+W SL ×CPUU+W BV ×RR) / (W NC +W SL +W BV ). The request timeout duration is calculated by combining the base timeout duration and the dynamic adjustment factor, and the request timeout duration=base timeout duration(BaseTimeout)×dynamic adjustment factor(DAF).

[0073] In a feasible implementation, step A11 can include steps B11-B13.

[0074] Step B11, determining the state space corresponding to each time according to the multi-dimensional network dynamic indicators corresponding to the current connection network and the base timeout duration.

[0075] It should be noted that a state space S is defined, and the state space S includes but is not limited to network delay, packet loss rate, CPU utilization, memory occupancy, request rate and other indicators, and the current base timeout duration setting. These states reflect the real-time situation of network and system operation.

[0076] Step B12, determining the immediate reward value of each state space according to the reward function.

[0077] It should be noted that a reward function is constructed, which can evaluate the effect of each action according to the success rate of network request, response time, resource utilization and system stability and other comprehensive indicators. For example, the adjustment of successfully transmitting data and keeping low delay and low resource consumption will get positive reward, and the action of causing retransmission or system abnormality will be negatively punished. Specifically, the reward function can be represented as: R=w1×S+w2×(-L)+w3×(-Rr)+w4×RU+w5×C. Wherein, R represents the total reward value, S represents the data transmission success rate (proportion value, between 0 and 1), w1 represents the weight of S, L represents the average network delay (unit: millisecond), w2 represents the weight of L, Rr represents the retry rate of request (proportion value, between 0 and 1), w3 represents the weight of R rThe weights are defined as follows: RU represents resource utilization, w4 represents the weight of RU, C represents the data consistency ratio (a ratio value, close to 1 indicates good data consistency), and w5 represents the weight of C. In this embodiment, w1, w2, w3, w4, and w5 need to be adjusted based on actual business needs and system characteristics, using empirical values. For example, if the immediacy of data transmission is extremely critical, the value of w2 can be increased to strengthen the preference for low latency; if data consistency is the core of the business, then the weight of w5 can be increased.

[0078] It is understandable that the instantaneous reward value of the state space at each time step can be determined based on the reward function.

[0079] Step B13 involves iterative learning based on the state space at each time step, the instantaneous reward value of each state space, and the deep learning network, and determining the target weights corresponding to the dynamic indicators of each network based on the iterative learning results.

[0080] It should be noted that, in this embodiment, the deep learning network is a deep Q-network (DQN), and its structure is as follows: Figure 2 As shown. In this embodiment, an action space A is defined, and the action is defined as adjusting the weight distribution of each indicator, such as changing W. NC (Network Status Weight), W SL (System load weight), W BV The value of (business volume weight). Define and construct the deep neural network DNN in the deep Q-network DQN, which takes S as input and outputs the expected reward (i.e., Q value) for each possible action A.

[0081] It is understandable that an experience pool is created to store information from each interaction, including the state S at time t in the state space. t Action A: Taking action space t The instant reward R obtained t+1 and the new state S at time t+1 t+1 A batch of samples is randomly selected from the information of each interaction stored in the experience pool for training. The network parameters are updated according to the Bellman equation, so that the network's predicted Q value gradually approaches the true value, i.e.: Q(S t A t )←R t+1 +γmax a′Q(S t+1 ,a';θ - ). Among them, Q(S) t A t ) indicates that in state S t Next, execute action A t The current estimated Q value. The Q value represents the expected value of the future return that may be obtained after taking a specific action in a given state. R t+1Indicates that in state S t Perform action A t Then, the immediate reward received at the next time step t+1. The reward can be positive (representing a good result) or negative (representing a bad result). γ represents the discount factor, a constant between 0 and 1, used to reduce the influence of future rewards, and can be adjusted based on empirical values. The discount factor reflects the trade-off between immediate rewards and potential future rewards. A higher γ value means the algorithm places more emphasis on long-term rewards. max a′ is an operator, representing the value for the next state S. t+1 We select the optimal action a′ that produces the highest Q value. That is, we choose the optimal action in the next state, which is the action that seems most likely to result in the maximum cumulative reward. Q(S) t+1 ,a′;θ - This is in the next state S. t+1 The Q-value predicted by the target network when the optimal action a′ is executed. First, find the next state S. t+1 We determine the optimal action a′, calculate the corresponding Q value, and then discount this Q value using a discount factor γ to obtain a discounted estimate of the future reward. This discounted future reward is then added to the immediate reward R. t+1 This constitutes the target Q-value, which is the value the network attempts to predict. θ - This represents the target network parameters used for stable learning.

[0082] In a concrete implementation, the following example illustrates the dynamic adjustment of indicator weights based on reinforcement learning: Initial state: Network state S = [50ms, 0.5] (50ms represents network latency, 0.5 represents packet loss rate). Action selection: Assume there are three preset weight configurations A1 = [0.4, 0.3, 0.3], A2 = [0.3, 0.4, 0.3], and A3 = [0.3, 0.3, 0.4], representing different weights W. NC W SL W BVDQN decision: The DQN model predicts the Q value of each configuration according to the current state S, and selects the action with the highest Q value; for example, assume that the action with the highest Q value is action A1, which represents giving more weight to network conditions. Perform action: The system adjusts the network request strategy according to A1, such as prioritizing low-latency paths. Reward feedback: If the data transmission is successful and the delay is low, the DQN model receives a positive reward, reinforcing the policy of selecting A1. Iterative learning: After multiple iterations, the DQN model continuously adjusts and learns the optimal weight configuration mode under different network conditions based on the feedback of each decision. Through the above process, the deep Q network DQN can autonomously discover and adapt to the best weight allocation strategy in different network environments, thereby combining the deep Q network DQN and the weighted average method to improve the success rate of network requests and the overall system performance.

[0083] It should be noted that in a network task product session, the real-time monitoring data of the indicators (all data are 5-minute averages) are as follows: network condition indicator: packet loss rate (PLR) = 0.05; system load indicator: CPU usage (CPUU) = 0.75; traffic indicator: request rate (RR) = 0.9; if the initial estimated traffic is 10,000 transactions per second, and the real-time monitoring finds that the traffic is 9,000 transactions per second, then the traffic indicator is normalized to 0.9. In addition, the weights determined by the deep Q network DQN are as follows: network condition dynamic weight: WNC = 0.3; system load dynamic weight: WSL = 0.4; traffic dynamic weight: WBV = 0.3; the sum of all indicator weights is 1. Therefore, using the aforementioned weighted average and deep Q network DQN method, the result of the dynamic adjustment factor calculation is: 0.05 x 0.3 + 0.75 x 0.4 + 0.9 x 0.3 = 0.585.

[0084] Step S20, monitoring the state of the target request based on the request timeout duration, and determining the transmission state of the target request.

[0085] It should be noted that all outgoing requests are monitored in real time, and each request is assigned a unique identifier (such as a request ID). A timer is also set, which corresponds to the timeout time of the request. The relevant information of the request is recorded, including the request initiation time, target address, request type, identifier, timer, and other information. After the timer is started, the system begins to count. During the operation of the timer, the system continuously monitors the state of the request. In this embodiment, the transmission state of the target request is the state of the request monitored by the system.

[0086] Step S30, when the transmission state is a request timeout state, recycling the resources of the target request.

[0087] It should be noted that if the target request is successfully completed (e.g., a response from the server is received) before the timer expires, the system cancels the timer and removes the information related to the network request from the request management table. If the system monitors that the request has not been completed when the timer expires, the system determines that the request has timed out and determines the transmission state of the target request to be a request timeout state. At this time, the system triggers a callback function, which is responsible for performing subsequent request recovery operations.

[0088] It can be understood that by executing the callback function, the system automatically closes the network connection related to the target request and releases the related socket, memory buffer and other resources. The recovered resources are placed in the resource pool for subsequent requests to reuse. After recovery is completed, the system removes the information related to the request from the request information record. In this embodiment, the self-management of the timer and the network resources is implemented by the following specific methods: first, a RequestManager class is defined to manage network requests and timers. When a request is added, a timer object (Timer) is created, and the on_timeout() method is set as the function to be called when the timer expires. When the timer expires, the request is removed from the request management table, and the on_timeout_callback() callback function is called to recover the resources.

[0089] In a specific implementation, to implement and optimize network resource management, the embodiment further includes the following operations: 1) a lock (threading.Lock) is introduced to protect shared resources, ensuring that the operations on requests and timers are safe in a multi-threaded environment; 2) a cancel_request method is provided to allow manual cancellation of the timer and release of resources when the request is completed or needs to be terminated in advance; 3) a Queue is used to manage timer threads, facilitating the control and tracking of all active timers; 4) by encapsulating the timeout processing logic in the internal method_handle_timeout, it is convenient to add more processing logic in the future, such as log recording, state updating, etc.; 5) the wait_for_all_timers method is added to ensure that all timers are correctly processed before the program exits, avoiding resource leakage. Continuously and autonomously strengthen stable connection. If a timeout occurs during network transmission, detect network anomalies and autonomously determine to automatically reconnect and retry the request to ensure smooth data transmission, and return to the normal state after the network fault is recovered.

[0090] It should be noted that the network monitoring tool (such as SolarWinds Network Performance Monitor, Zabbix, Nagios, etc.) is used to monitor the network status in real time, including the establishment of network connection, disconnection and abnormal data transmission. When detecting network disconnection or data transmission abnormality, trigger the reconnection retry mechanism. Automatic reconnection operation: after triggering the reconnection, automatically attempt to reestablish the network connection. Introduce the heartbeat detection mechanism, periodically send heartbeat packet to detect the validity of network connection. When the heartbeat detection fails, trigger the reconnection retry mechanism in advance to avoid business interruption. Set a reasonable number of retries and intervals to avoid frequent retries leading to resource waste and performance degradation. The initial retry interval can be set to a short time, and the retry interval is gradually increased as the number of retries increases, to achieve a smooth backoff mechanism. Simple backoff strategy, the waiting time between each retry will be doubled, but will not exceed the maximum waiting time set. To reduce the frequent retries when the network is temporarily unstable.

[0091] In this embodiment, the number of retries, intervals and backoff algorithm parameters can be dynamically adjusted according to the importance of the business or the change of network conditions or upstream synchronization timeout, etc. As mentioned above, in the network task type product bill synchronization scenario, the correctness and real-time requirement of data is high, so the maximum number of retries is set to be larger, which is 20 times, the initial retry time is set to 1000ms, the interval time of each retry is adjusted to increase by 500ms each time, and the maximum interval time is 2000ms.

[0092] The network request method provided in this embodiment, in response to the request transmission instruction, determines the request timeout period based on the multi-dimensional network dynamic indicators corresponding to the current connection network, reinforcement learning method and basic timeout period; based on the request timeout period, the state of the target request is monitored to determine the transmission state of the target request; when the transmission state is a request timeout state, the target request is recycled. Through the above-mentioned manner, the request timeout period determined by the reinforcement learning method, multi-dimensional network dynamic indicators and basic timeout period is used to monitor the state of the target request, and corresponding measures are taken based on the corresponding transmission state, which ensures the integrity of the data and the continuity of the task, and realizes the reasonable management of the resources corresponding to the timeout request.

[0093] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above introduction, and will not be repeated hereinafter. On this basis, please refer to Figure 3 , after step S30, the network request method further includes steps S31-S33:

[0094] Step S31, when the transmission state is the normal response state, verifying the data from the cache queue corresponding to the target request.

[0095] It should be noted that the upstream system data, data nodes, data hash values, etc. are cached so that when the upstream and downstream system data are inconsistent, the data related information can be quickly obtained from the cache queue to complete the timely synchronization of the data. In this embodiment, Redis cache is used, and other methods can also be used, and the embodiment does not limit this. The cache verification data refers to the cached upstream system data, data nodes, data hash values, and other related information.

[0096] It can be understood that when the response party successfully receives the target request and receives the response, it is determined that the transmission state is the normal response state, and the cache verification data is obtained from the cache queue.

[0097] Step S32, performing consistency check on the cache verification data and the downstream received data to obtain a data check result.

[0098] Step S33, when the data check result is the data consistent result, deleting the cache verification data in the cache queue.

[0099] It should be noted that the downstream received data and the cache verification data are consistency checked, and when the data check result is the data consistent result, the cache verification data in the cache queue is deleted after the upstream processing is completed; if the data check result is the data inconsistent result, the upstream is fed back and the cache verification data is synchronized to the downstream again.

[0100] It can be understood that in addition to the above-mentioned introduction of the cache mechanism, the embodiment also introduces a transaction record-consistency check, a strong check mechanism, and a data comparison mechanism. The transaction record consistency check is specifically: recording each data synchronization of the upstream system to generate a transaction log. And each transaction is assigned a unique transaction ID to facilitate tracking and locating problems. After the downstream system receives the data, the data is consistency checked according to the information in the transaction log. This includes checking the source, timestamp, transaction ID, etc. of the data to ensure that the data is consistent with the transaction record of the upstream system.

[0101] In a specific implementation, the strong check mechanism specifically refers to: when data is transmitted from an upstream system to a downstream system, data is intercepted, and strong check is performed on the data to ensure the integrity and accuracy of the data. The check includes data integrity check, use of a hash algorithm to generate a unique hash value of each piece of data, check on the transmitted data to ensure that the data is not tampered with or damaged in the transmission process. Data format check, check whether the format and range of the data meet the expectations, including data type, field length, encoding method, value range, and the like. Business logic check, check the data according to specific business logic and rules to ensure the consistency of the business meaning of the data. When the check fails, the system feeds back exception information to the upstream system, requiring the upstream system to synchronize the data again. For example, in the process of synchronization of the multiple-dimension data of the computing network, it is required that the tariff and the product match. When the system receives the data, it is found that the tariff and the product of the synchronized data do not match, and then the system directly feeds back exception information to the upstream system, requiring the upstream system to synchronize the correct data again.

[0102] It should be noted that the data comparison mechanism specifically refers to: by comparing the same piece of data in the upstream and downstream systems, it is checked whether there is a difference. In this embodiment, it can be realized by writing a script or using a special comparison tool. There are a large number of non-numeric data in the computing network data. In order to improve the efficiency and security of data comparison, a hash function is used to complete the comparison of data in this embodiment. The hash function used is the hash function SHA256. The hash values of the data blocks in the upstream and downstream systems that need to be compared are calculated, the fixed-length output values (hash values) of each data block are obtained, and it is checked whether the hash values of the same data blocks in different data sources are consistent. If the hash values are the same, it is considered that the corresponding data blocks are consistent; if the hash values are different, it is considered that the data blocks are inconsistent.

[0103] The embodiment provides a network request method. In the embodiment, when the transmission state is a normal response state, cache verification data corresponding to the target request is obtained from a cache queue; consistency check is performed on the cache verification data and the downstream received data to obtain a data check result; and when the data check result is a data consistent result, the cache verification data in the cache queue is deleted. Through effective data synchronization and consistency check mechanism, the consistency of the upstream and downstream data in the computing power network is ensured, so that the correct execution of the computing task and the accuracy of the result are ensured.

[0104] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned first embodiment and second embodiment can be referred to the above description, and will not be described hereinafter. On this basis, please refer to Figure 4 , step S40, the network request method further includes steps S01-S05:

[0105] Step S01, obtain the network state of the currently connected network.

[0106] It should be noted that in the present embodiment, the network state can be monitored in real time using a network monitoring tool (such as SolarWinds Network Performance Monitor, Zabbix, Nagios, etc.), and the network state of the currently connected network can also be obtained through a heartbeat detection mechanism.

[0107] Step S02, when the network state is an abnormal state, obtaining a plurality of performance indicators of each candidate network.

[0108] It should be noted that in a multi-network environment, when the network state of the currently connected network is an abnormal state such as network turbulence, a plurality of performance indicators of other candidate networks are obtained. In the present embodiment, the performance indicators include but are not limited to bandwidth, delay, packet loss rate, and availability.

[0109] Step S03, determining the indicator weight corresponding to each performance indicator according to the task type of the target request.

[0110] It should be noted that the indicator weight corresponding to each performance indicator is determined according to the task type of the target request. In the present embodiment, for applications that require low delay and high reliability (such as online games or video conferencing), delay and packet loss rate may be given higher weights. For applications that require large data transmission (such as file synchronization or backup), bandwidth and availability may be more important. For example, in the above-mentioned online task type product call synchronization scenario, the correctness and real-time requirement of data are high, and the weights of delay and packet loss rate are set to 0.4 and 0.3. The weights of bandwidth and availability are set to 0.1.

[0111] Step S04, inputting each performance indicator and the indicator weight corresponding to each performance indicator into a target decision tree model for network evaluation to determine the network score of each candidate network.

[0112] It should be noted that a target decision tree model is constructed by a decision tree algorithm, and each performance indicator and the indicator weight corresponding to each performance indicator are input into the target decision tree model to calculate the network score of each candidate network. In the present embodiment, the target decision tree model has the following advantages: simple and easy to understand: the decision tree model is composed of nodes and branches, each node represents a test of a feature, and is easy to understand and explain, without the need for deep mathematical background to understand its working principle. Low computational complexity: the prediction process of the decision tree model only needs simple calculation from the root node to the leaf node along the tree structure, and the computational complexity is relatively low, which is suitable for lightweight devices or real-time application scenarios. High training efficiency: the training process of the decision tree model usually does not need iterative optimization, but constructs the tree structure by recursively splitting the data set, and the training efficiency is high.

[0113] The model proposed in this embodiment can significantly reduce the consumption of computing resources, improve the efficiency and practicability of the model, while ensuring the accuracy of network selection. The target decision tree model is composed of nodes and branches, each node represents a test of a feature, each branch represents a path of test results, and the final leaf node represents a classification or regression result. The model structure is shown in Figure 5 The input of the target decision tree model (such as the tree root shown in Figure 5 ) includes various network performance indicators such as delay, bandwidth, packet loss rate, etc., and the corresponding indicator weights. The intermediate layer output: each node (such as the features 1 / 2 / 3 / 4 / 5 / 6 shown in Figure 5 ) is split according to a specific feature (such as the threshold value shown in Figure 5 ), and the output decision path. The output layer outputs: the output layer (such as the green node shown in Figure 5 ) outputs the prediction result of the network score or ranking, which is a real value or a classification result.

[0114] It should be noted that, for the convenience of understanding, the network evaluation process is illustrated by the following examples: network 1: packet loss rate 0.5%, available bandwidth 15 Mbps, maximum bandwidth 25 Mbps, unit cost: 0.18 yuan / M, delay 50 ms, jitter 5, converted into numerical form: packet loss rate 0.5, available bandwidth 15, maximum bandwidth 25s, unit cost 0.18, delay 50, jitter 5; network 2: packet loss rate 0.5%, available bandwidth 10 Mbps, maximum bandwidth 20 Mbps, unit cost 0.14 yuan / M, delay 100 ms, jitter 6, converted into numerical form: packet loss rate 0.5, available bandwidth 10, maximum bandwidth 20, unit cost 0.14, delay 100, jitter 6. The model: the input layer includes 6 features: packet loss rate, available bandwidth, maximum bandwidth, unit cost, delay, and jitter. The decision node: for example, the first node can test the packet loss rate, and if the packet loss rate is less than or equal to a certain threshold (0.5), it enters the next node. The output layer: the leaf node outputs the score or classification result of the network. For example: input data: network 1 feature values: [0.5, 15, 25, 0.18, 50, 5]. Decision process: the first node tests the packet loss rate: 0.5%, which is less than or equal to the threshold 0.5%, and enters the next node. The second node tests the available bandwidth: 15, which is greater than the threshold 10, and enters the next node. The third node tests the maximum bandwidth: 25, which is greater than the threshold 25, and outputs the final result, with a score of 95. Similarly, the data of network 2 also undergoes the same decision process, and outputs its score: input data: network 2 feature values: [0.5, 10, 20, 0.14, 100, 6]. Decision process: the first node tests the packet loss rate: 0.5%, which is less than or equal to the threshold 0.5%, and enters the next node. The second node tests the available bandwidth: 10, which is less than or equal to the threshold 10, and enters the next node. The third node tests the unit cost: 0.14, which is less than or equal to the threshold 0.15, and enters the next node. The fourth node tests the available bandwidth: 10, which is less than or equal to the threshold 10, and outputs the final result, with a score of 85.

[0115] In a possible implementation, step S04 can include steps C11-C14.

[0116] Step C11, constructing an initial decision tree according to the network information training set.

[0117] It should be noted that the collected network information is used as a sample set, and a certain proportion is selected according to the requirements to divide into a network information training set and a network information test set. In this embodiment, cross-validation, leave-one-out method, and other methods can be used.

[0118] It can be understood that the network information training set is used to construct an initial decision tree.

[0119] Step C12, determining the target split feature and dynamic feature weight in the node splitting process according to the reinforcement learning mode.

[0120] It can be understood that in the embodiment, the reinforcement learning mode is introduced to dynamically adjust the weights of the initial decision tree, specifically including: 1. In the preprocessing stage of the decision tree construction, the importance of the features (such as packet loss rate, available bandwidth, maximum bandwidth, unit cost, delay, jitter, etc.) is dynamically evaluated by using a reinforcement learning algorithm (such as DQN). DQN learns which features are most critical to decision-making under different network conditions through interaction with the environment, thereby automatically adjusting the degree of dependence of the decision tree on these features when constructing, and determining the corresponding dynamic feature weights. 2. The growth process of the decision tree is determined in combination with the reinforcement learning strategy, such as at each node splitting of the tree, instead of only based on the static threshold of the current feature, the optimal target split feature and split point are selected according to the strategy output by DQN. In this way, the decision tree can "intelligently" select the best path according to the real-time changes of the network state.

[0121] Step C13, training the initial decision tree according to the target split feature and the dynamic feature weight to obtain a to-be-tested model.

[0122] It should be noted that the initial decision tree is trained according to the target split feature and the dynamic feature weight information until the preset maximum depth is reached or the number of samples contained in the leaf node is insufficient for further splitting, thereby obtaining the to-be-tested model.

[0123] Step C14, testing the performance of the to-be-tested model according to the network information test set, and obtaining a target decision tree model according to the performance test result.

[0124] It should be noted that the trained to-be-tested model is tested using the network information test set, and the performance of the model is usually evaluated using indicators such as accuracy (the ratio of the number of samples correctly classified by the model to the total number of samples), precision (the proportion of true positive samples among the samples predicted as positive), recall (the proportion of samples predicted as positive among all positive samples), etc. to evaluate the performance of the model, thereby obtaining the corresponding performance test result. If the model meets the pre-set performance indicators (such as accuracy > 90%) on the test set, the performance test result is that the model test is passed, and the model can be used in actual network selection tasks, thereby obtaining the target decision tree model.

[0125] It can be understood that in the present embodiment, the target decision tree model can also be adjusted in the following manner: 1, combine multiple machine learning models to form an ensemble learning system, such as integrating decision trees with neural networks (such as lightweight RNN or LSTM for time series prediction), support vector machines (SVM) and other models, and integrating the prediction results of different models through ensemble learning algorithms (such as Stacking) to improve prediction accuracy and stability; for example, Stacking is used as an ensemble learning method to integrate decision trees with LSTM and SVM, and the steps are as follows: 1.1 basic model training: independently train decision tree, LSTM and SVM models as first layer models. 1.2 second layer model training: the output of the first layer model is used as a new feature to train a meta model (such as logistic regression, random forest) to combine the predictions of these models. The goal of the meta model is to learn how to optimally combine the outputs of the individual base models to improve overall prediction performance. For network selection problems, the meta model can be a regression model that predicts the score or probability of each network and then selects the network with the highest score. For example, the present embodiment uses logistic regression as a meta model, and its structure is described as follows: input layer: the output of the first layer model (decision tree, LSTM, SVM) is input into the logistic regression model as a new feature. Assuming that each first layer model outputs a prediction probability or classification label, the input dimension of the meta model will be 3 (if three models each output one value). Logistic regression is essentially a linear model plus a sigmoid function to convert it, used to solve binary classification problems. It learns a set of weight parameters to linearly combine the input features and then converts them to probability predictions through an activation function. The logistic regression model needs to build a linear model, that is, it assumes that there is a linear relationship between the output y and the input feature x. If the input feature is represented as a vector x = [x1, x2, …, xn], where n is the number of features, the logistic regression model tries to learn a set of weight parameters w = [w1, w2, …, wn] and an intercept term b to form a linear combination: z = w0 + w1x1 + w2x2 + … + wn xn where z is the output of the model. Output layer: output a probability value between 0 and 1, representing the probability of belonging to the positive class. According to the threshold value of the application scenario (usually 0.5), the probability can be converted to a category prediction. 1.3 train the logistic regression as a meta model, which can include the following steps: 1.3.1) integrate the output of the first layer model; in this step, the prediction outputs of the decision tree, LSTM and SVM models on the same data set need to be integrated. These outputs can be continuous scores, probabilities or category labels (if it is a classification task, it needs to be converted to a numerical form).Assuming each model outputs a value, the integrated feature vector will have three elements; 1.3.2 split the integrated dataset into a certain proportion (such as 70% training set, 30% test set); 1.3.3 use the training set data to train the logistic regression model; during the training process, the model will learn a weight vector, which will map the output of the first layer model to the final prediction result; 1.3.4 test the model using the test set, and use accuracy, precision, recall and other indicators to evaluate the test performance of the model. 1.4 Prediction and Decision: For new network performance data, first obtain the prediction results through decision tree, LSTM and SVM models respectively, then input these results into the meta-model for comprehensive analysis, and finally decide the best network selection.

[0126] In specific implementations, the model adjustment method further includes 2, introducing deep reinforcement learning (DRL) in model training and selection strategy, enabling the model to optimize its decision logic according to feedback from actual network selection (such as transmission speed, stability indicators), dynamically adjusting network selection strategy, and learning the optimal selection path under different conditions. 3, add context information such as user location, time, network usage habits, etc. in the decision tree model, so that the model can make more personalized network selection according to the specific situation of the user and the environment, and improve user experience. 4, use time series prediction technology (such as ARIMA, Prophet or LSTM) to predict future network conditions, combine the current model's decision, and make decisions on network switching or optimization configuration in advance to prevent possible network congestion or instability. 5, use edge computing technology to deploy part of the decision logic near the data source to achieve fast response and low-latency decision-making, and design a distributed decision-making architecture to allow models to work together across different network nodes to optimize network selection.

[0127] Step S05, determining a target transmission network according to the network scores of each candidate network, and transmitting the target request through the target transmission network.

[0128] It should be noted that the network scores of each candidate network are sorted, the higher the score, the better the performance of the network, the candidate network with the highest score is selected as the target transmission network, and the target request is transmitted through the target transmission network.

[0129] The embodiment provides a network request method. The embodiment obtains a network state of a currently connected network; when the network state is an abnormal state, a plurality of performance indexes of each candidate network are obtained; an index weight corresponding to each performance index is determined according to a task type of a target request; each performance index and the index weight corresponding to each performance index are input into a target decision tree model for network evaluation, and a network score of each candidate network is determined; a target transmission network is determined according to the network score of each candidate network, and the target request is transmitted through the target transmission network. In this way, the best network can be intelligently selected for connection according to network quality, stability and business requirements.

[0130] By way of example, in order to facilitate understanding of the implementation process of the network request method obtained by combining the above-mentioned embodiment one and embodiment two, the technical effects achieved by all the above-mentioned embodiments are specifically described as follows: the network timeout processing and network exception processing in the embodiment can improve the efficiency, stability and user experience of transactions in the computing power transaction service. For scenarios requiring high-frequency transactions, such as algorithmic trading, quantitative trading and other scenarios with extremely high requirements for transaction speed and stability, the data consistency guarantee in the embodiment is used to ensure that information remains accurate and consistent during transmission and processing in real-time transaction monitoring, order matching and settlement, risk management and control, cross-platform data synchronization and other scenarios in the computing power transaction service. The specific description is as follows: 1. Reducing network load and timeout retransmission times: through automatic synchronization of upstream and downstream timeout times, the data retransmission of the upstream system caused by the completion of data reception by the downstream system but the response timeout is solved. Through flexible and reasonable automatic adjustment of the timeout time, the scenarios and times of triggering the timeout retransmission are greatly reduced, thereby reducing the number of data synchronization and reducing the network load. 2. Improving network exception processing efficiency: real-time monitoring of network status, introduction of a heartbeat detection mechanism, and timely triggering of a reconnection retry mechanism. The backoff strategy is adopted to adjust the number of retries and intervals, and to reduce frequent retries when the network is temporarily unstable. 3. Decoupling the upstream and downstream systems: the upstream and downstream systems do not need to care about the results of data synchronization and additional processing of exceptions. The coupling and interaction of the upstream and downstream systems are reduced. 4. Improving data consistency: providing an efficient data synchronization and consistency checking mechanism to ensure the consistency of upstream and downstream data, reduce calculation errors caused by inconsistent data, and reduce manual offline data comparison, auditing and review work, and improve operational efficiency.

[0131] It should be noted that the above examples are only used to understand the present application and do not limit the network request method of the present application. Based on this technical concept, more forms of simple transformation are within the protection scope of the present application.

[0132] The present application also provides a network request device, which is described in detail in the following Figure 6 , and the network request device comprises:

[0133] The processing module 10 is configured to determine the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the currently connected network, the reinforcement learning manner, and the basic timeout duration in response to the request transmission instruction.

[0134] The monitoring module 20 is configured to monitor the transmission state of the target request based on the request timeout duration, and determine the transmission state of the target request.

[0135] The recycling module 30 is configured to recycle resources of the target request when the transmission state is the request timeout state.

[0136] Optionally, the processing module 10 is further configured to:

[0137] determine the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators corresponding to the currently connected network and the reinforcement learning manner, perform parameter calculation on each network dynamic indicator according to the target weight corresponding to each network dynamic indicator and each network dynamic indicator, determine the dynamic adjustment factor, and determine the request timeout duration based on the dynamic adjustment factor and the basic timeout duration.

[0138] Optionally, the processing module 10 is further configured to:

[0139] determine the state space corresponding to each time according to the multi-dimensional network dynamic indicators corresponding to the currently connected network and the basic timeout duration, determine the immediate reward value of each state space according to the reward function, perform iterative learning according to the state space corresponding to each time, the immediate reward value of each state space, and the deep learning network, and determine the target weight corresponding to each network dynamic indicator according to the iterative learning result.

[0140] Optionally, the processing module 10 is further configured to:

[0141] when the transmission state is the normal response state, obtain the cache verification data corresponding to the target request from the cache queue, perform consistency check on the cache verification data and the downstream received data to obtain a data check result, and delete the cache verification data in the cache queue when the data check result is a data consistency result.

[0142] Optionally, the processing module 10 is further configured to:

[0143] Acquire a network state of a current connection network; acquire a plurality of performance indexes of each candidate network when the network state is an abnormal state; determine an index weight corresponding to each performance index according to a task type of the target request; input each performance index and the index weight corresponding to each performance index into a target decision tree model for network evaluation, and determine a network score of each candidate network; determine a target transmission network according to the network score of each candidate network, and transmit the target request through the target transmission network.

[0144] Optionally, the processing module 10 is further configured to:

[0145] Determine a sliding window parameter according to the time sequence operation and maintenance data; perform data extraction on the time sequence operation and maintenance data according to the sliding window parameter and a target time node, to obtain to-be-drawn time sequence data; and perform image drawing according to the to-be-drawn time sequence data, to obtain time sequence information corresponding to the time sequence operation and maintenance data.

[0146] The network request device provided in the application adopts the network request method in the above embodiments, and can solve the technical problem that the timeout management and resource management in the network request cannot be reasonably processed. Compared with the prior art, the network request device provided in the application has the same beneficial effects as the network request method provided in the above embodiments, and other technical features in the network request device are the same as the features disclosed in the above embodiments, and thus will not be described herein.

[0147] The application provides a network request device, which comprises at least one processor and a memory in communication connection with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the network request method in Embodiment I.

[0148] Reference will be made to the following description of the embodiments of the application Figure 7 which shows a structural schematic diagram of a network request device suitable for implementing the embodiments of the application. The network request device in the embodiments of the application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (for example, vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 7 The network request device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the application.

[0149] As shown in Figure 7 The network request device can include a processing device 1001 (e.g., a central processor, a graphics processor, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the network request device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the network request device to communicate wirelessly or wired with other devices to exchange data. Although the network request device with various systems is shown in the figure, it should be understood that all the systems shown are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0150] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.

[0151] The network request device provided in the present application adopts the network request method in the above-mentioned embodiments, and can solve the technical problem that the timeout management and resource management in the network request cannot be reasonably processed. Compared with the prior art, the network request device provided in the present application has the same beneficial effects as the network request method provided in the above-mentioned embodiments, and other technical features in the network request device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0152] It should be understood that various aspects of the disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any appropriate manner in any one or more embodiments or examples.

[0153] The above description is merely illustrative of the application and is not intended to limit the scope of the application. Any variations and modifications that can be made by any person skilled in the art within the spirit and scope of the application are intended to be encompassed by the application. Therefore, the scope of the application should be determined by the appended claims.

[0154] The application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e., a computer program) for performing the network request method in the above embodiments.

[0155] The computer readable storage medium provided by the application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any appropriate medium, including but not limited to an electrical wire, an optical cable, an RF (Radio Frequency) cable, etc., or any appropriate combination thereof.

[0156] The above computer readable storage medium can be included in the network request device; or can exist separately and not be assembled into the network request device.

[0157] The computer readable storage medium carries one or more programs, when the one or more programs are executed by the network request device, the network request device is caused to: determine a request timeout duration based on a multi-dimensional network dynamic index corresponding to a current connection network, a reinforcement learning manner, and a basic timeout duration in response to a request transmission instruction; perform state monitoring on a target request based on the request timeout duration to determine a transmission state of the target request; and perform resource recycling on the target request when the transmission state is a request timeout state.

[0158] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0159] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified functions. It should also be noted in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks depicted in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0160] The modules involved in the embodiments of the present application can be implemented in a software manner or in a hardware manner. In some cases, the name of the module does not constitute a limitation on the module itself.

[0161] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the network request method described above, and can solve the technical problem that the problems in timeout management, resource management and the like in network request cannot be reasonably handled. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the network request method provided by the above-mentioned embodiments, and will not be described here.

[0162] The present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the network request method as described above.

[0163] The computer program product provided by the present application can solve the technical problem that the problems in timeout management, resource management and the like in network request cannot be reasonably handled. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the network request method provided by the above-mentioned embodiments, and will not be described here.

[0164] The above-mentioned is only part of the embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structural transformation, direct / indirect application in other related technical fields made by using the content of the present application specification and drawings under the technical concept of the present application are included in the patent protection scope of the present application.

Claims

1. A network request method, characterized in that, The network request method includes: In response to the request transmission command, the request timeout duration is determined based on multi-dimensional network dynamic indicators corresponding to the current connected network, reinforcement learning methods, and basic timeout duration. Based on the timeout duration of the request, the status of the target request is monitored to determine the transmission status of the target request; When the transmission status is a request timeout status, the target request is reclaimed. The step of determining the request timeout duration based on multi-dimensional network dynamic indicators, reinforcement learning methods, and basic timeout duration corresponding to the current connected network includes: Determine the target weights corresponding to each network dynamic indicator based on the multi-dimensional network dynamic indicators and reinforcement learning methods corresponding to the current network connection. Based on the target weights corresponding to each network dynamic indicator and the parameters of each network dynamic indicator, the dynamic adjustment factor is determined. The request timeout duration is determined based on the dynamic adjustment factor and the basic timeout duration.

2. The method as described in claim 1, characterized in that, The step of determining the target weights corresponding to each network dynamic indicator based on the multi-dimensional network dynamic indicators and reinforcement learning methods corresponding to the current connection network includes: The state space at each moment is determined based on the multi-dimensional network dynamic indicators and basic timeout duration corresponding to the current connected network. The instantaneous reward value for each state space is determined based on the reward function; Iterative learning is performed based on the state space corresponding to each time step, the instantaneous reward value of each state space, and the deep learning network. The target weights corresponding to the dynamic indicators of each network are determined based on the results of the iterative learning.

3. The method as described in claim 1 or 2, characterized in that, After the step of monitoring the status of the target request based on the request timeout duration to determine the transmission status of the target request, the method further includes: When the transmission status is a normal response status, retrieve the cached verification data corresponding to the target request from the cache queue; The cached verification data and the downstream received data are subjected to consistency verification to obtain the data verification result; When the data verification result is consistent, the cached verification data in the cache queue is deleted.

4. The method as described in claim 1, characterized in that, The network request method further includes: Get the network status of the currently connected network; When the network status is abnormal, obtain multiple performance metrics for each candidate network; Determine the weight of each performance metric based on the task type of the target request; Each performance index and its corresponding weight are input into the target decision tree model for network evaluation to determine the network score of each candidate network. The target transmission network is determined based on the network scores of each candidate network, and the target request is transmitted through the target transmission network.

5. The method as described in claim 4, characterized in that, Before the step of inputting each performance index and its corresponding weight into the target decision tree model for network evaluation and determining the network score of each candidate network, the method further includes: Construct an initial decision tree based on the network information training set; The target splitting features and dynamic feature weights in the node splitting process are determined based on reinforcement learning methods; The initial decision tree is trained based on the target splitting features and the dynamic feature weights to obtain the model to be tested; The model to be tested is subjected to performance testing based on the network information test set, and the target decision tree model is obtained based on the performance test results.

6. A network request device, characterized in that, The network request device includes: The processing module is used to respond to the request transmission command and determine the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the current connected network, the reinforcement learning method, and the basic timeout duration. The monitoring module is used to monitor the status of the target request based on the request timeout duration and determine the transmission status of the target request. The recycling module is used to reclaim resources from the target request when the transmission status is a request timeout status; The processing module is further configured to determine the target weights corresponding to each network dynamic indicator based on the multi-dimensional network dynamic indicators and reinforcement learning methods corresponding to the current connected network; calculate parameters based on the target weights corresponding to each network dynamic indicator and each network dynamic indicator to determine the dynamic adjustment factor; and determine the request timeout duration based on the dynamic adjustment factor and the basic timeout duration.

7. A network request device, characterized in that, The device includes: a memory, a processor, and a network request program stored on the memory and executable on the processor, the network request program being configured to implement the steps of the network request method as described in any one of claims 1 to 3 or 4 to 5.

8. A storage medium, characterized in that, The storage medium stores a network request program, which, when executed by a processor, implements the steps of the network request method as described in any one of claims 1 to 3 or 4 to 5.

9. A computer program product, characterized in that, The computer program product includes a network request program that, when executed by a processor, implements the steps of the network request method as described in any one of claims 1 to 3 or 4 to 5.

Citation Information

Patent Citations

  • Optimization method and system for processing timeout request by mobile internet, medium and equipment

    CN116828533A

  • Process monitoring method, process monitoring device, computing equipment and computer readable storage medium

    CN118733391A

  • Data transmission method and related device

    CN118785296A