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

By using multi-dimensional network dynamic indicators and reinforcement learning methods in network requests to determine the request timeout timeout timeout, and recycle resources during timeout status, the problems of network request timeout management and resource management in the existing technology are solved, and data integrity is achieved and guarantee of task continuity.

CN119449806AActive Publication Date: 2025-02-14CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology cannot effectively manage problems such as timeouts, resource management, etc. in network requests, and lacks a one-stop all-round approach.

Method used

By in response to the request transmission instruction, the request timeout time duration is determined based on the multi-dimensional network dynamic indicators, reinforcement learning methods and basic timeout time duration of the connection network, status monitoring is performed and resource recovery is performed during the timeout state.

Benefits of technology

It realizes reasonable timeout management and resource recycling of network requests, ensures data integrity and task continuity, and improves the efficiency and correctness of network services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449806A_ABST
    Figure CN119449806A_ABST
Patent Text Reader

Abstract

The invention discloses a network request method and device, equipment, a storage medium and a product, and relates to the technical field of cloud computing, the network request method comprises the following steps: in response to a request transmission instruction, determining 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; performing state monitoring on a target request based on the request timeout duration, and determining a transmission state of the target request; and when the transmission state is a request timeout state, performing resource recovery on the target request. Through the above mode, the state of the target request is monitored through the request timeout duration determined by the reinforcement learning mode, the multi-dimensional network dynamic index and the basic timeout duration, and corresponding measures are taken based on the corresponding transmission state, so that the integrity of data and the continuity of tasks are ensured, and the transmission efficiency is improved. And meanwhile, reasonable management of resources corresponding to 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 field of cloud computing technology, and in particular to network request methods, devices, equipment, storage media and products. Background Art

[0002] In the process of network transmission of computing network services, the message sender usually sets the timeout time. After the timeout, the sender performs exception processing, including capturing system exceptions and retry mechanisms. The processing flow of the sender is as follows: 1) Data transmission and timer start When the sender sends a data segment to the responder, the timer is started immediately. To wait for the confirmation information (ACK message) sent by the receiver. The waiting time from the start of the timer to the preset time point is the timeout time. 2) Timeout judgment and retransmission decision If the sender does not receive the confirmation information sent by the responder within the set timeout time, the sender will judge that the data segment may be lost in network transmission or other errors have occurred. 3) Data retransmission The sender will resend the unconfirmed data message and start the timer again to wait for the confirmation information from the responder. This process may be repeated many times until the sender receives the confirmation information from the responder or reaches the preset retransmission limit. When the timeout retry mechanism is involved, the responder needs to perform anti-retransmission processing. In summary, there is no one-stop, comprehensive method for timeout management, resource management, network selection, data consistency assurance, etc. in network requests in the prior art.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a network request method, device, equipment, storage medium and product, aiming to solve the technical problem that the existing technology cannot reasonably handle timeout management, resource management and other aspects in network requests.

[0005] To achieve the above purpose, the present application proposes a network request method, the method comprising:

[0006] In response to the request transmission instruction, determining the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning method, and the basic timeout duration;

[0007] Performing status monitoring on the target request based on the request timeout duration to determine the transmission status of the target request;

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

[0009] In one embodiment, the step of determining the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning method, and the basic timeout duration includes:

[0010] Determine the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators and reinforcement learning method corresponding to the current connection network;

[0011] Calculate parameters based on the target weights corresponding to each network dynamic indicator and each network dynamic indicator to determine the dynamic adjustment factor;

[0012] The request timeout duration is determined based on the dynamic adjustment factor and the basic timeout duration.

[0013] In one 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 current connection network and the reinforcement learning method includes:

[0014] Determine the state space corresponding to each moment according to the multi-dimensional network dynamic indicators and basic timeout duration corresponding to the current connection network;

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

[0016] Iterative learning is performed based on the state space corresponding to each moment, the immediate reward value of each state space, and the deep learning network, and the target weights corresponding to each network dynamic indicator are determined based on the iterative learning results.

[0017] In one embodiment, after the step of monitoring the state of the target request based on the request timeout duration and determining the transmission state of the target request, the method further includes:

[0018] When the transmission state is a normal response state, requesting cache verification data corresponding to the target from the cache queue;

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

[0020] When the data verification result is a data consistency result, the cache verification data in the cache queue is deleted.

[0021] In one embodiment, the network request method further includes:

[0022] Get the network status of the currently connected network;

[0023] When the network state is an abnormal state, obtaining multiple performance indicators of each candidate network;

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

[0025] Input each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model to perform network evaluation and determine the network score of each candidate network;

[0026] A target transmission network is determined according to the network scores of each candidate network, and the target request is transmitted through the target transmission network.

[0027] In one embodiment, before the step of inputting each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model for network evaluation and determining the network score of each candidate network, the step further includes:

[0028] Construct an initial decision tree based on the network information training set;

[0029] Determine the target splitting features and dynamic feature weights in the node splitting process according to the reinforcement learning method;

[0030] The initial decision tree is trained according to the target split feature and the dynamic feature weight to obtain a model to be tested;

[0031] A performance test is performed on the model to be tested according to the network information test set, and a target decision tree model is obtained according to the performance test result.

[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a network request device, the network request device comprising: a processing module, for responding to a request transmission instruction, and determining a request timeout duration based on multi-dimensional network dynamic indicators corresponding to the current connection network, a reinforcement learning method, and a basic timeout duration;

[0033] A monitoring module, used to monitor the status of the target request based on the request timeout duration, and determine the transmission status of the target request;

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

[0035] In addition, to achieve the above objectives, the present application also proposes a network request device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the network request method described above.

[0036] In addition, to achieve the above objectives, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the network request method described above are implemented.

[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the network request method described above are implemented.

[0038] The present application provides a network request method, which determines the request timeout duration based on the multi-dimensional network dynamic indicators, reinforcement learning method and basic timeout duration corresponding to the current connection network in response to the request transmission instruction; monitors the status of the target request based on the request timeout duration to determine the transmission status of the target request; and recycles resources for the target request when the transmission status is a request timeout state. Through the above-mentioned method, the status of the target request is monitored by the request timeout duration determined by the reinforcement learning method, multi-dimensional network dynamic indicators and basic timeout duration, and corresponding measures are taken based on the corresponding transmission status, thereby ensuring the integrity of the data and the continuity of the task, and realizing the reasonable management of the resources corresponding to the timeout request. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

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

[0042] Figure 2 A schematic diagram of the model structure of the deep Q network DQN provided in Example 1 of the present application;

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

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

[0045] Figure 5 A schematic diagram of the target decision tree model structure provided in Example 3 of the present application;

[0046] Figure 6 This is a schematic diagram of the module structure of the network request device according to an embodiment of the present application;

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

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

[0049] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0050] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The main solution of the embodiment of the present application is: in response to a request transmission instruction, determine the request timeout duration based on the multi-dimensional network dynamic indicators, reinforcement learning method and basic timeout duration corresponding to the currently connected network; monitor the status of the target request based on the request timeout duration to determine the transmission status of the target request; when the transmission status is a request timeout status, recycle resources for the target request.

[0052] In the existing network transmission process of computing services, the message sender generally sets the timeout time. After the timeout, the sender performs exception processing, including capturing system exceptions and retry mechanisms. The processing flow of the sender is as follows: 1) Data transmission and timer start When the sender sends a data segment to the responder, the timer is started immediately. Waiting for the confirmation information (ACK message) sent by the receiver. The waiting time from the start of the timer to the preset time point is the timeout time. 2) Timeout judgment and retransmission decision If the sender does not receive the confirmation information sent by the responder within the set timeout time, the sender will determine that the data segment may be lost in network transmission or other errors have occurred. 3) Data retransmission The sender will resend the unconfirmed data message and start the timer again to wait for the confirmation information from the responder. This process may be repeated many times until the sender receives the confirmation information from the responder or reaches the preset retransmission limit. When the timeout retry mechanism is involved, the responder needs to perform anti-retransmission processing. In summary, there is no one-stop, comprehensive method for timeout management, resource management, network selection, data consistency assurance, etc. in network requests in the prior art.

[0053] In the prior art, the timeout setting between upstream and downstream systems lacks an automatic synchronization mechanism, resulting in timeout asynchrony, which may cause data loss or transmission delay; when dealing with network timeouts or exceptions, the prior system mainly relies on the sender's retry mechanism, which increases the network burden and may cause system errors; in the prior art, ensuring data consistency between the sender and the responder usually requires additional mechanisms, such as regular data comparisons or compensation measures at the business logic level, which increases the complexity of the system; when facing network failures or instability, the prior art usually relies on manual intervention or simple retry logic, and lacks intelligent network selection and rapid recovery mechanisms.

[0054] The intelligent computing network is a highly integrated and intelligent network system that combines advanced computing resources and network technologies to provide users with efficient, flexible and secure computing services. The network achieves a deep integration of computing power and network products through integrated orchestration and intelligent scheduling. Based on the task-oriented, high-concurrency, and real-time characteristics of computing network products, it has high requirements for the timeliness, stability and correctness of the network.

[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 selection of networks for network anomalies, and strong data consistency assurance. It ensures the efficiency and correctness of network services from each node before, during, and after network requests are made.

[0056] This application monitors the status of target requests through reinforcement learning, multi-dimensional network dynamic indicators and request timeout duration determined by basic timeout duration, takes corresponding measures based on the corresponding transmission status, ensures data integrity and task continuity, and realizes reasonable management of resources corresponding to timeout requests.

[0057] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a network request device, etc. The following takes the network request device as an example to illustrate this embodiment and the following embodiments.

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

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

[0060] Step S10, in response to the request transmission instruction, determining the request timeout duration based on multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning method and the basic timeout duration.

[0061] It should be noted that the multi-dimensional network dynamic indicators corresponding to the currently connected network include but are not limited to indicators such as network status, system load and business volume. In this embodiment, network status (NC): can be measured by packet loss rate (PLR). System load (SL): can be measured by CPU utilization (CPUU). Business volume (BV): can be measured by request rate (RR).

[0062] It is understandable that the basic timeout duration is set by the relevant upstream and downstream system technicians based on the basic requirements of the upstream and downstream systems and the preliminary assessment of the network environment. This duration is usually based on empirical values ​​or default values. For example, in the scenario of call record synchronization of computing network task-based products, the real-time requirements for call records between upstream and downstream systems are high, and the network bandwidth between upstream and downstream systems reaches 1000M, and the basic timeout duration is set to 100ms.

[0063] It is understandable 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. The dynamic adjustment factor can be calculated by multi-dimensional network dynamic indicators and corresponding dynamic weights. The dynamic adjustment factor is calculated by weighted average method, in which the indicators and weights are normalized or standardized with appropriate units or ratios. 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 ). Among them, PLR represents the packet loss rate, CPUU represents the CPU usage, BV represents the traffic volume, W NC Indicates the network status weight, W SL Indicates the system load weight, W BV Indicates the traffic weight. In this embodiment, in the process of using the weighted average method to calculate the dynamic adjustment factor, the weight of each indicator is determined by a reinforcement learning method (such as a deep Q-network DQN). Deep Q-Network (DQN) is an algorithm that combines Q learning (a reinforcement learning method) with deep learning technology.

[0064] In a specific implementation, the basic timeout duration and the dynamic adjustment factor are combined to calculate the request timeout duration, and the request timeout duration = basic timeout duration (BaseTimeout) × 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 setting. For example, in the above example, the basic timeout duration = 100ms, and the dynamic adjustment factor = 0.585. Then the request timeout duration = 58.5ms.

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

[0066] It is understandable that whenever the set request timeout is adjusted, the latest request timeout is promptly synchronized to the upstream and downstream to ensure the real-time effectiveness of the request timeout and the consistency of the upstream and downstream timeouts, so as to ensure that the responder responds to the sender in a timely manner during the network transmission process, so as to avoid data loss or transmission delays caused by timeout asynchrony. When the upstream system data is synchronized, the request timeout is passed as a parameter to the downstream system. For example, synchronization is achieved through the HTTP header, query parameters, 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 obtain the same request timeout configuration directly from the public configuration data.

[0067] In a feasible implementation, step S10 may include steps A11 to A13:

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

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

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

[0071] Step A13: determining a request timeout duration based on the dynamic adjustment factor and a basic timeout duration.

[0072] It should be noted that in this embodiment, the dynamic adjustment factor is calculated based on the average monitoring data of indicators such as network delay, packet loss rate, CPU usage, memory occupancy, request rate, etc. in the past 5 minutes. The calculation method of the dynamic adjustment factor is the weighted average method, in which the indicators and weights are normalized or standardized with appropriate units or ratios. 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 is calculated by combining the basic timeout and the dynamic adjustment factor: request timeout = basic timeout (BaseTimeout) × dynamic adjustment factor (DAF).

[0073] In a feasible implementation, step A11 may include steps B11 to B13:

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

[0075] It should be noted that a state space S is defined, which includes but is not limited to indicators such as network delay, packet loss rate, CPU utilization, memory occupancy, request rate, and the current basic timeout duration setting. These states reflect the real-time status 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 based on comprehensive indicators such as the success rate of network requests, response time, resource utilization, and system stability. For example, adjustments that successfully transmit data while maintaining low latency and low resource consumption will receive positive rewards, while actions that cause retransmissions or system abnormalities will be negatively punished. Specifically, the reward function can be expressed as: R = w1×S+w2×(-L)+w3×(-Rr)+w4×RU+w5×C. Among them, R represents the total reward value, S represents the data transmission success rate (proportional value, between 0 and 1), w1 represents the weight of S, L represents the average network delay (unit: milliseconds), w2 represents the weight of L, Rr represents the retry rate of the request (proportional value, between 0 and 1), and w3 represents R r, RU represents resource utilization, w4 represents the weight of RU, C represents the data consistency ratio (proportional value, close to 1 means 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 experience values ​​according to actual business requirements and system characteristics. 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, the weight of w5 can be increased.

[0078] It can be understood that the immediate reward value of the state space at each moment can be determined according to the reward function.

[0079] Step B13, performing iterative learning according to the state space corresponding to each moment, the instantaneous 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.

[0080] It should be noted that, in this embodiment, the deep learning network is a deep Q network DQN, whose structure is as follows Figure 2 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 (traffic weight). Define and construct the deep neural network DNN in the deep Q network DQN, which accepts S as input and outputs the expected return (i.e. Q value) of each possible action A.

[0081] It can be understood that an experience pool is created to store information about each interaction, including the state S at time t in the state space. t , Action A in the action space t 、Instant reward R t+1 and the new state S at time t+1 t+1 Randomly extract a batch of samples from the information of each interaction stored in the experience pool for training, and update the network parameters according to the Bellman equation so that the Q value predicted by the network gradually approaches the true value, that is: 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 of the current state. The Q value represents the expected value of the future rewards that may be obtained after taking a specific action in a given state. t+1Indicates that in state S t Execute action A t The immediate reward received at the next time step t+1 after the state S is reached. The reward can be positive (indicating a good result) or negative (indicating a bad result). γ represents the discount factor, which is a constant between 0 and 1. It is used to reduce the impact of future rewards and can be adjusted based on experience. The discount factor reflects the trade-off between immediate rewards and potential future rewards. A higher value of γ means that the algorithm attaches more importance to long-term rewards. max a′ is an operator, which means that for the next state S t+1 , select the corresponding optimal action a′ that produces the highest Q value. That is, select the optimal action in the next state, that is, the action that seems most likely to result in the maximum cumulative reward. Q(S t+1 ,a′;θ - ): This is 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 The optimal action a′ under the action is then calculated, and the Q value corresponding to the action is finally discounted by the discount factor γ to obtain a discounted estimate of the future reward. This discounted future reward plus the immediate reward R t+1 , constitutes the target Q value, which is the value that the network is trying to predict. - Represents the target network parameters for stable learning.

[0082] In the specific implementation, the following example is used to illustrate the dynamic adjustment of indicator weights based on reinforcement learning: Initial state: network state S = [50ms, 0.5] (50ms represents network delay time, 0.5 represents packet loss rate). Action selection: Assume that there are three preset weight configurations A1 = [0.4, 0.3, 0.3], A2 = [0.3, 0.4, 0.3], A3 = [0.3, 0.3, 0.4], representing different W respectively. NC , W SL , W BVAllocation. DQN decision: The DQN model predicts the Q value of each configuration based on 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 means that the network condition is given more attention. Execution action: The system adjusts the network request strategy based on A1, such as giving priority to low-latency paths. Reward feedback: If the data transmission is successful and the latency is low, the DQN model receives a positive reward, which strengthens the strategy of selecting A1. Iterative learning: After multiple rounds of iterations, the DQN model continuously adjusts according to the feedback of each decision and learns the optimal weight configuration mode under different network conditions. Through the above process, the deep Q network DQN can autonomously discover and adapt to the optimal weight allocation strategy for 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 performance of the overall system.

[0083] It should be noted that in a scenario of call synchronization for a computing network task-based product, the real-time monitoring data of the indicators (all the following data are 5-minute averages) are as follows: network status indicator: packet loss rate (PLR) = 0.05; system load indicator: CPU usage (CPUU) = 0.75; business volume indicator: request rate (RR) = 0.9; if the business volume estimated by the initial empirical value is 10,000 transactions / second, and the business volume is found to be 9,000 transactions / second after real-time monitoring, the business volume indicator is normalized to 0.9. In addition, the weights determined by the deep Q network DQN are as follows: network status dynamic weight: WNC = 0.3; system load dynamic weight: WSL = 0.4; business volume 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×0.3+0.75×0.4+0.9×0.3=0.585.

[0084] Step S20: monitoring the status of the target request based on the request timeout duration to determine the transmission status of the target request.

[0085] It should be noted that all requests sent are monitored in real time, and unique identifiers (such as request IDs) are created for all requests, and a timer is set, which corresponds to the timeout period of the request. And the relevant information of the request is recorded, including the time of request initiation, target address, request type, identifier, timer and other information. After the timer is started, the system will start timing. During the operation of the timer, the system will continuously monitor the status of the request. In this embodiment, the transmission status of the target request is the status of the request monitored by the system.

[0086] Step S30: When the transmission state is a request timeout state, reclaim resources for the target request.

[0087] It should be noted that if the target request is successfully completed before the timer expires (for example, a response from the server is received), the system will cancel the timer and remove the relevant information of the network request from the request management table. If the system monitors that the request is still not completed when the timer expires, the system will determine that the request has timed out and determine that the transmission status of the target request is the request timeout status. At this time, the system will trigger a callback function, which is responsible for performing subsequent request recovery operations.

[0088] It is understandable that, when the callback function is executed, the system automatically closes the network connection related to the target request and releases related sockets, memory buffers and other resources. The recovered resources are placed in the resource pool for reuse by subsequent requests. After the recovery is completed, the system removes the relevant information of the request from the request information record. In this embodiment, the self-management of timers and network resources is achieved through the specific methods of the following examples: 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 used 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 recycle resources.

[0089] In the specific implementation, in order to realize and optimize network resource management, this embodiment also includes the following operations: 1) Introduce locks (threading.Lock) to protect shared resources and ensure that the operation of requests and timers in a multi-threaded environment is safe; 2) Provide a cancel_request method to allow manual cancellation of timers and release of resources when the request is completed or needs to be terminated early; 3) Use Queue to manage timer threads to facilitate 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 logging, status updates, etc.; 5) Add the wait_for_all_timers method to ensure that all timers can be processed correctly before the program exits to avoid resource leakage. Continuously and autonomously strengthen stable connections. If a timeout occurs during network transmission, detect network anomalies and autonomously determine to automatically reconnect and request retries to ensure smooth data transmission and return to normal after the network failure is restored.

[0090] It should be noted that network monitoring tools (such as SolarWinds Network PerformanceMonitor, Zabbix, Nagios, etc.) are used to monitor the network status in real time, including the establishment and disconnection of network connections and abnormal data transmission. When a network connection is disconnected or data transmission is abnormal, the reconnection retry mechanism is triggered. Automatic reconnection operation: After triggering the reconnection, automatically try to reestablish the network connection. Introduce a heartbeat detection mechanism to send heartbeat packets regularly to detect the validity of the 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 shorter time, and as the number of retries increases, the retry interval is gradually extended to achieve a smooth backoff mechanism. A simple backoff strategy doubles the waiting time between each retry, but does not exceed the set maximum waiting time. To reduce frequent retries when the network is temporarily unstable.

[0091] In this embodiment, parameters such as the number of retries, intervals, and backoff algorithms can be dynamically adjusted according to the importance of the service, changes in network conditions, or upstream synchronization timeouts. For example, in the above-mentioned network task-based product call log synchronization scenario, the accuracy and real-time requirements of the data are high, so the maximum number of retries is set to a relatively large number of 20 times, the initial retry time is set to 1000ms, and the interval time of each retry is adjusted to increase by 500ms each time, and the maximum interval time is 2000ms.

[0092] This embodiment provides a network request method, which determines the request timeout duration based on the multi-dimensional network dynamic indicators, reinforcement learning method and basic timeout duration corresponding to the current connection network in response to the request transmission instruction; monitors the status of the target request based on the request timeout duration to determine the transmission status of the target request; and recycles resources for the target request when the transmission status is a request timeout status. Through the above-mentioned method, the status of the target request is monitored based on the request timeout duration determined by the reinforcement learning method, multi-dimensional network dynamic indicators and basic timeout duration, and corresponding measures are taken based on the corresponding transmission status, thereby ensuring the integrity of the data and the continuity of the task, and realizing 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 those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 After step S30, the network request method further includes steps S31 to S33:

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

[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, which is not limited in this embodiment. Cache verification data refers to cached upstream system data, data nodes, data hash values ​​and other related information.

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

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

[0098] Step S33, when the data verification result is a data consistency result, the cache verification data in the cache queue is deleted.

[0099] When necessary, the downstream received data and cache verification data will be checked for consistency. When the data verification result is a data consistency result, the cache verification data in the cache queue will be deleted after the upstream processing is completed; if the data verification result is a data inconsistency result, feedback will be given to the upstream to synchronize the cache verification data to the downstream again.

[0100] It is understandable that in addition to the above-mentioned introduction of the cache mechanism, this embodiment also introduces transaction record-consistency verification, a strong verification mechanism, and a data comparison mechanism. The transaction record consistency verification is specifically: each data synchronization of the upstream system is recorded and a transaction log is generated. And a unique transaction ID is assigned to each transaction to facilitate tracking and locating problems. After receiving the data, the downstream system performs a consistency check on the data based on the information in the transaction log. This includes checking the source of the data, timestamp, transaction ID, etc., to ensure that the data is consistent with the transaction record of the upstream system.

[0101] In the specific implementation, the strong verification mechanism is as follows: when data is transmitted from the upstream system to the downstream system, data is intercepted and strong verification is performed on the data to ensure the integrity and accuracy of the data. Verification includes data integrity verification, using a hash algorithm to generate a unique hash value for each piece of data, and verifying the transmitted data to ensure that the data has not been tampered with or damaged during transmission. Data format verification, verifying whether the format and range of the data meet expectations, including data type, field length, encoding method, value range, etc. Business logic verification, verifying the data according to specific business logic and rules to ensure the consistency of the business meaning of the data. When the verification fails, the system feeds back abnormal information to the upstream system and requires the upstream system to synchronize the data again. For example, in the process of synchronizing multi-dimensional data in the computing network, the tariff and product are required to match. When the system receives the data, it finds that the tariff and product of the synchronized data do not match, then it directly feeds back abnormal information to the upstream system and requires the upstream system to synchronize the correct data again.

[0102] It should be noted that the data comparison mechanism is specifically as follows: by comparing the same data in the upstream and downstream systems, check whether there are any differences. In this embodiment, this can be achieved by writing a script or using a special comparison tool. There is a large amount of non-numerical data in the network data. In order to improve the efficiency and security of data comparison, a hash function is used in this embodiment to complete the data comparison. The hash function used is the hash function SHA256. The upstream and downstream data to be compared are hashed to obtain a fixed-length output value (hash value) for each data block, and the hash values ​​of the same data blocks in different data sources are compared to see if they are consistent. If the hash values ​​are the same, the corresponding data blocks are considered to be consistent; if the hash values ​​are different, the data blocks are considered to be inconsistent.

[0103] This embodiment provides a network request method, which obtains cache verification data corresponding to the target request from the cache queue when the transmission state is a normal response state; performs consistency check on the cache verification data and the downstream received data to obtain a data verification result; and deletes the cache verification data in the cache queue when the data verification result is a data consistency result. Through an effective data synchronization and consistency check mechanism, the consistency of upstream and downstream data in the computing power network is guaranteed to ensure the correct execution of computing tasks and the accuracy of results.

[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 of the above-mentioned first and second embodiments can refer to the above introduction, and will not be repeated later. Figure 4 , step S40, the network request method further includes steps S01 to S05:

[0105] Step S01, obtaining the network status of the currently connected network.

[0106] It should be noted that in this embodiment, a network monitoring tool (such as SolarWinds NetworkPerformance Monitor, Zabbix, Nagios, etc.) can be used to monitor the network status in real time, and the network status of the currently connected network can also be obtained through the heartbeat detection mechanism.

[0107] Step S02: when the network state is abnormal, obtaining multiple performance indicators of each candidate network.

[0108] It should be noted that in a multi-network environment, when the network status of the currently connected network is abnormal such as network turbulence, multiple performance indicators of other candidate networks are obtained. In this 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] If necessary, the indicator weight corresponding to each performance indicator is determined according to the task type of the target request. In this embodiment, for applications that require low latency and high reliability (such as online games or video conferencing), latency and packet loss rate may be given higher weights. For applications with large amounts of data transmission (such as file synchronization or backup), bandwidth and availability may be more important. For example, in the above-mentioned network task-based product call log synchronization scenario, high requirements are placed on the accuracy and real-time nature of the data. In actual settings, the weights of latency 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: input each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model to perform network evaluation and determine the network score of each candidate network.

[0112] It should be noted that the target decision tree model is constructed by the 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 this embodiment, the target decision tree model has the following advantages: Simple and easy to understand: The decision tree model consists of nodes and branches, and each node represents a test of a feature. It is easy to understand and explain, and its working principle can be understood without an in-depth mathematical background. Low computational complexity: The prediction process of the decision tree model only requires simple calculations 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. Efficient training: The training process of the decision tree model usually does not require iterative optimization, but instead constructs a 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 and improve the efficiency and practicality of the model while ensuring the accuracy of network selection. The target decision tree model consists of nodes and branches. Each node represents a test of a feature, each branch represents the path of the test result, and the final leaf node represents the classification or regression result. The model structure is as follows: Figure 5 As shown. The input of the target decision tree model (such as Figure 5 The tree root shown in ) includes various network performance indicators, such as delay, bandwidth, packet loss rate, etc., as well as the indicator weights corresponding to each performance indicator. Middle layer output: Each node (such as Figure 5 1 / 2 / 3 / 4 / 5 / 6) according to specific features (such as Figure 5 The output layer (as shown in the threshold) is split and the decision path is output. Figure 5 The green node shown in ) outputs the prediction result of the network score or ranking, which is a real value or classification result.

[0114] It should be noted that, for ease of understanding, the network evaluation process is now illustrated by the following example: Network 1: packet loss rate 0.5%, available bandwidth 15Mbps, maximum bandwidth 25Mbps, unit cost: 0.18 yuan / M, delay 50ms, jitter 5, converted to 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 10Mbps, maximum bandwidth 20Mbps, unit cost 0.14 yuan / M, delay 100ms, jitter 6, converted to numerical form: packet loss rate 0.5, available bandwidth 10, maximum bandwidth 20, unit cost 0.14, delay 100, jitter 6. The model: Input layer: includes 6 features: packet loss rate, available bandwidth, maximum bandwidth, unit cost, delay, and jitter. Decision nodes: 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 will enter the next node. Output layer: The leaf node outputs the score or classification result of the network. For example: Input data: Feature values ​​of network 1: [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 points. Similarly, the data of network 2 also goes through the same decision process and outputs its score: Input data: Feature values ​​of network 2: [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 of 0.15, and then proceeds to the next node. The first node tests the available bandwidth: 10, which is less than or equal to the threshold of 10, and outputs the final result, with a score of 85 points.

[0115] In a feasible implementation, step S04 may include steps C11 to C14:

[0116] Step C11, constructing an initial decision tree based on 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 demand to be divided into a network information training set and a network information test set. In this embodiment, cross-validation, holdout method and other methods can be used.

[0118] It is understandable that an initial decision tree is constructed using a training set of network information.

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

[0120] It can be understood that in this embodiment, the reinforcement learning method is introduced to dynamically adjust the weight of the initial decision tree, specifically including: 1. In the preprocessing stage of decision tree construction, the reinforcement learning algorithm (such as DQN) is used to dynamically evaluate the importance of features (such as packet loss rate, available bandwidth, maximum bandwidth, unit cost, delay, jitter, etc.). 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, thereby determining the corresponding dynamic feature weights. 2. Combined with the reinforcement learning strategy to determine the growth process of the decision tree, such as when each node of the tree splits, it is not based solely on the static threshold of the current feature, but rather selects the optimal target split feature and split point 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 in the network status.

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

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

[0123] Step C14, performing a performance test on the model to be tested 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 model to be tested is tested using the network information test set. The accuracy (the ratio of the number of samples correctly classified by the model to the total number of samples), precision (the ratio of samples predicted to be positive that are actually positive), recall (the ratio of all positive samples predicted to be positive) and other indicators are usually used to evaluate the performance of the model, thereby obtaining the corresponding performance test results. If the model reaches the pre-set performance indicators (such as accuracy>90%) on the test set, the performance test result is that the model has passed the test and can be used in the actual network selection task, thereby obtaining the target decision tree model.

[0125] It is understandable that in this embodiment, the target decision tree model can also be adjusted in the following manner: 1. Combine multiple machine learning models to form an integrated learning system, such as fusing decision trees with neural networks (such as lightweight RNN or LSTM for time series prediction), support vector machines (SVM) and other models, and integrate the prediction results of different models through integrated learning algorithms (such as Stacking) to improve prediction accuracy and stability; illustratively, Stacking is used as an integrated learning method to integrate decision trees with LSTM and SVM, and the steps are as follows: 1.1 Basic model training: Independently train decision trees, LSTM and SVM models, and use them as the first layer model. 1.2 Second layer model training: Use the output of the first layer model as a new feature, and 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 each basic model to improve the overall prediction performance. For the network selection problem, 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. Exemplarily, this 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 predicted probability or classification label, the input dimension of the meta-model will be 3 (if each of the three models outputs a value). Logistic regression is essentially a linear model plus a sigmoid function conversion, which is used to solve the binary classification problem. It learns a set of weight parameters, linearly combines the input features, and converts them into probability predictions through an activation function. The logistic regression model needs to build a linear model, that is, it is assumed 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 attempts 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 + ... + wnxn where z is the output of the model. Output layer: Output a probability value between 0 and 1, indicating the probability of belonging to the positive class. According to the threshold of the application scenario (usually 0.5), the probability can be converted into a category prediction. 1.3 Training with logistic regression as a meta-model 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 for 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 into numerical form).Assuming that each model outputs a value, the integrated feature vector will have three elements; 1.3.2 Split the integrated data set according to a certain ratio (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 Use the test set to test the model, and use indicators such as accuracy, precision, and recall to evaluate the test performance of the model. 1.4 Prediction and decision: For new network performance data, first obtain the prediction results through the decision tree, LSTM and SVM models respectively, and then use these results as input, and conduct comprehensive analysis through the meta-model to finally decide the best network selection.

[0126] In the specific implementation, the model adjustment method also includes 2. Introducing deep reinforcement learning (DRL) in model training and selection strategies, so that the model can self-optimize the decision logic according to the feedback of actual network selection (such as transmission speed, stability index), dynamically adjust the network selection strategy, and learn the optimal selection path under different conditions. 3. Adding contextual information to the decision tree model, such as user location, time, network usage habits, etc., enables the model to make more personalized network choices based on the specific conditions of the user and the environment, and improve the user experience. 4. Use time series prediction technology (such as ARIMA, Prophet or LSTM) to predict future network conditions, and combine the current model's decision to make decisions on network switching or optimized configuration in advance to prevent possible network congestion or instability. 5. Use edge computing technology to deploy part of the decision logic close to the data source to achieve fast response and low-latency decision-making. At the same time, design a distributed decision architecture to allow the model to work together between different network nodes to jointly optimize network selection.

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

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

[0129] This embodiment provides a network request method, which obtains the network status of the currently connected network; when the network status is abnormal, obtains multiple performance indicators of each candidate network; determines the indicator weight corresponding to each performance indicator according to the task type of the target request; inputs each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model for network evaluation to determine the network score of each candidate network; determines the target transmission network according to the network score of each candidate network, and transmits the target request through the target transmission network. In the above manner, the best network can be intelligently selected for connection according to network quality, stability and business needs.

[0130] Exemplarily, in order to help understand the implementation process of the network request method obtained by combining the above embodiment 1 and embodiment 2, the technical effects that can be achieved by all the above embodiments are specifically described: the network timeout processing and network exception processing in the computing power trading service can improve the efficiency, stability and user experience of the transaction. And for scenarios where high-frequency trading is required, such as algorithmic trading, quantitative trading, etc., which have extremely high requirements for trading speed and stability. The data consistency guarantee in the computing power trading service is used to ensure that the information remains accurate and consistent in the transmission and processing process in the scenarios of real-time transaction monitoring, order matching and settlement, risk management and control, cross-platform data synchronization, etc., which are specifically described as follows: 1. Reduce network load and timeout retransmission times: Through the automatic synchronization of upstream and downstream timeout times, the downstream system completes data reception, but the data retransmission of the upstream system caused by the response timeout is solved. Through the flexible and reasonable automatic adjustment of the timeout time, the scenarios and times of triggering timeout retransmission are greatly reduced, thereby reducing the number of data synchronizations and reducing the network load. 2. Improve the efficiency of handling network exceptions: monitor the network status in real time, introduce a heartbeat detection mechanism, and trigger the reconnection and retry mechanism in a timely manner. Use a backoff strategy to adjust the number of retries and intervals to reduce frequent retries when the network is temporarily unstable. 3. Decouple upstream and downstream systems: Upstream and downstream systems do not need to care about the results of data synchronization and additional processing of exceptions. Reduce the coupling and interaction of upstream and downstream systems. 4. Improve data consistency: Provide an efficient data synchronization and consistency check mechanism to ensure the consistency of upstream and downstream data, reduce calculation errors caused by data inconsistencies, and reduce manual offline data comparison, auditing, and review work, thereby improving operational efficiency.

[0131] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the network request method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0132] This application also provides a network request device, please refer to Figure 6 , the network requesting device comprises:

[0133] The processing module 10 is used to respond to the request transmission instruction and determine the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning method and the basic timeout duration.

[0134] The monitoring module 20 is used to monitor the status of the target request based on the request timeout duration to determine the transmission status of the target request.

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

[0136] Optionally, the processing module 10 is further used for:

[0137] Determine the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators and the reinforcement learning method corresponding to the current connection network; perform parameter calculation according to the target weight corresponding to each network dynamic indicator and each network dynamic indicator to determine the dynamic adjustment factor; determine the request timeout duration based on the dynamic adjustment factor and the basic timeout duration.

[0138] Optionally, the processing module 10 is further used for:

[0139] Determine the state space corresponding to each moment according to the multi-dimensional network dynamic indicators and basic timeout duration corresponding to the currently connected network; determine the instantaneous reward value of each state space according to the reward function; perform iterative learning according to the state space corresponding to each moment, the instantaneous 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 results.

[0140] Optionally, the processing module 10 is further used for:

[0141] When the transmission status is a normal response status, cache verification data corresponding to the target request is obtained from the cache queue; a consistency check is performed on the cache verification data and the downstream received data to obtain a data verification result; when the data verification result is a data consistency result, the cache verification data in the cache queue is deleted.

[0142] Optionally, the processing module 10 is further used for:

[0143] Obtain the network status of the currently connected network; when the network status is abnormal, obtain multiple performance indicators of each candidate network; determine the indicator weight corresponding to each performance indicator according to the task type of the target request; input each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model for network evaluation, and determine the network score of each candidate network; determine the 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 used for:

[0145] Determine sliding window parameters according to the time series operation and maintenance data; extract data from the time series operation and maintenance data according to the sliding window parameters and the target time node to obtain time series data to be drawn; draw an image according to the time series data to be drawn to obtain a time series information graph corresponding to the time series operation and maintenance data.

[0146] The network request device provided by the present application adopts the network request method in the above embodiment, which can solve the technical problem that it is impossible to reasonably handle timeout management, resource management and other aspects of network requests. Compared with the prior art, the beneficial effects of the network request device provided by the present application are the same as the beneficial effects of the network request method provided by the above embodiment, and other technical features in the network request device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0147] The present application provides a network request device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the network request method in the above-mentioned embodiment 1.

[0148] Reference below Figure 7 , which shows a schematic diagram of the structure of a network request device suitable for implementing an embodiment of the present application. The network request device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The network request device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0149] like Figure 7 As shown, the network request device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the network request device are also stored. The processing device 1001, ROM1002, and RAM1004 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: Liquid Crystal Display), a speaker, a vibrator, etc.; a 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 requesting device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a network requesting device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

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

[0151] The network request device provided by the present application adopts the network request method in the above embodiment, which can solve the technical problem that it is impossible to reasonably handle timeout management, resource management and other aspects of network requests. Compared with the prior art, the beneficial effects of the network request device provided by the present application are the same as the beneficial effects of the network request method provided by the above embodiment, and other technical features in the network request device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0152] It should be understood that the various parts disclosed in this application can be implemented by 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 one or more embodiments or examples in a suitable manner.

[0153] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0154] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the network request method in the above-mentioned embodiment.

[0155] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0156] The computer-readable storage medium may be included in the network request device; or may exist independently without being assembled into the network request device.

[0157] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the network request device, the network request device: responds to the request transmission instruction, determines the request timeout duration based on the multi-dimensional network dynamic indicators, reinforcement learning method and basic timeout duration corresponding to the current connection network; monitors the status of the target request based on the request timeout duration, and determines the transmission status of the target request; when the transmission status is the request timeout status, recycles resources for the target request.

[0158] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0159] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0160] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[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 above-mentioned network request method, and can solve the technical problem that it is impossible to reasonably handle timeout management, resource management, and other aspects in network requests. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the network request method provided by the above-mentioned embodiment, and will not be repeated here.

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

[0163] The computer program product provided by the present application can solve the technical problem that it is impossible to reasonably handle timeout management, resource management and other issues in network requests. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the network request method provided by the above embodiment, which will not be repeated here.

[0164] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields 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 instruction, determining the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning method, and the basic timeout duration; Performing status monitoring on the target request based on the request timeout duration to determine the transmission status of the target request; When the transmission state is a request timeout state, resources are recycled for the target request.

2. The method according to claim 1, characterized in that The step of determining the request timeout duration based on the multi-dimensional network dynamic indicators corresponding to the current connection network, the reinforcement learning method and the basic timeout duration includes: Determine the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators and reinforcement learning method corresponding to the current connection 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; The request timeout duration is determined based on the dynamic adjustment factor and the basic timeout duration.

3. The method according to claim 2, characterized in that The step of determining the target weight corresponding to each network dynamic indicator according to the multi-dimensional network dynamic indicators corresponding to the current connection network and the reinforcement learning method includes: Determine the state space corresponding to each moment according to the multi-dimensional network dynamic indicators and basic timeout duration corresponding to the current connection network; Determine the immediate reward value of each state space according to the reward function; Iterative learning is performed based on the state space corresponding to each moment, the immediate reward value of each state space, and the deep learning network, and the target weights corresponding to each network dynamic indicator are determined based on the iterative learning results.

4. The method according to any one of claims 1 to 3, characterized in that After the step of monitoring the state of the target request based on the request timeout duration and determining the transmission state of the target request, the method further includes: When the transmission state is a normal response state, requesting cache verification data corresponding to the target from the cache queue; Performing consistency check on the cache verification data and the downstream received data to obtain a data verification result; When the data verification result is a data consistency result, the cache verification data in the cache queue is deleted.

5. The method according to claim 1, characterized in that The network request method further includes: Get the network status of the currently connected network; When the network state is an abnormal state, obtaining multiple performance indicators of each candidate network; Determine the indicator weight corresponding to each performance indicator according to the task type of the target request; Input each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model to perform network evaluation and determine the network score of each candidate network; A target transmission network is determined according to the network scores of each candidate network, and the target request is transmitted through the target transmission network.

6. The method according to claim 5, characterized in that Before the step of inputting each performance indicator and the indicator weight corresponding to each performance indicator into the target decision tree model for network evaluation and determining the network score of each candidate network, the step further includes: Construct an initial decision tree based on the network information training set; Determine the target splitting features and dynamic feature weights in the node splitting process according to the reinforcement learning method; The initial decision tree is trained according to the target split feature and the dynamic feature weight to obtain a model to be tested; A performance test is performed on the model to be tested according to the network information test set, and a target decision tree model is obtained according to the performance test result.

7. A network request device, characterized in that: The network requesting device comprises: A processing module, configured to respond to a request transmission instruction and determine a request timeout duration based on multi-dimensional network dynamic indicators corresponding to a currently connected network, a reinforcement learning method, and a basic timeout duration; A monitoring module, 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 recycle resources of the target request when the transmission state is a request timeout state.

8. A network request device, characterized in that: The device comprises: a memory, a processor, and a network request program stored in the memory and executable on the processor, wherein the network request program is configured to implement the steps of the network request method according to any one of claims 1 to 4 or 5 to 6.

9. A storage medium, characterized in that: The storage medium stores a network request program, and when the network request program is executed by the processor, the steps of the network request method according to any one of claims 1 to 4 or 5 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a network request program, and when the network request program is executed by a processor, the steps of the network request method according to any one of claims 1 to 4 or 5 to 6 are implemented.

Citation Information

Patent Citations

  • 5G network quality automatic evaluation method based on machine learning

    CN114648053A

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

    CN116828533A

  • Equipment data acquisition method and system based on Internet of Things control platform

    CN118413557A

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

    CN118733391A

  • Data transmission method and related device

    CN118785296A

Cited By

  • International number invalidation judgment method and system

    CN119996574A

  • Method and system for determining invalid international numbers

    CN119996574B

  • Automatic script execution method and system, server, medium and program product

    CN120353543A

  • Transmission method of duration instruction, starting method of equipment and electronic equipment

    CN120750988A