Flow control method, apparatus, device, and program product
By applying the target traffic model to generate the target time window in the client gateway module, the problem of network bandwidth and server resource consumption caused by the concentrated wake-up of terminal devices is solved, and network traffic balance and cost reduction are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the instantaneous peak of network bandwidth and excessive consumption of server resources caused by the concentrated wake-up of terminal devices increase network costs and server burden.
By applying a target traffic model in the client gateway module to generate a target time window, the sending time of data requests is controlled to balance network traffic and avoid concentrated access to the server.
It effectively reduced network bandwidth and server costs, balanced network traffic distribution, and reduced peak traffic and peak server capacity.
Smart Images

Figure CN115941611B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a flow control method, apparatus, device, and program product. Background Technology
[0002] Some applications now require the server to periodically send data resources, barely perceptible to the user, to the client to ensure their proper functioning. The primary method for sending these data resources is to initiate a data request to the server immediately after the client switches to foreground mode on the terminal device.
[0003] However, many current terminal devices exhibit a concentrated wake-up characteristic. For example, mobile terminals from the same manufacturer or of the same model may have a built-in function that automatically switches from low-power mode to normal mode at a certain point in time. These mobile terminals will then be woken up collectively at that point. At this time, the clients on these mobile terminals almost simultaneously switch to foreground mode and request data resources from the server, causing a momentary traffic peak in data distribution. This results in two main problems: firstly, a sudden spike in network bandwidth, increasing the network costs for mobile terminals; and secondly, excessive consumption of server resources as the server needs to handle the peak capacity. Summary of the Invention
[0004] To address the technical problem of high network and server costs caused by a large number of clients making concentrated data requests, this disclosure provides a flow control method, apparatus, device, and program product.
[0005] In a first aspect, embodiments of this disclosure provide a flow control method applied to a client gateway module, comprising:
[0006] In response to data requests sent by client business modules, determine the target business;
[0007] Determine the target time window corresponding to the target service; wherein, the target time window is determined based on the target traffic model corresponding to the target service, and the target traffic model is used to balance network traffic;
[0008] Within the target time window, the data request is sent to the server gateway module to request the target data of the target service from the server business module corresponding to the server gateway module.
[0009] Secondly, this disclosure also provides a flow control method applied to a server gateway module, comprising:
[0010] In response to the time window request sent by the client gateway module, determine the target service;
[0011] Based on the target traffic model corresponding to the target service, a target time window is generated; wherein, the target traffic model is used to balance network traffic.
[0012] The target time window is sent to the client gateway module so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window.
[0013] Thirdly, embodiments of this disclosure also provide a flow control device configured in a client gateway module, comprising:
[0014] The data request and response unit is used to respond to data requests sent by the client business module and determine the target business.
[0015] A target time window determination unit is used to determine the target time window corresponding to the target service; wherein, the target time window is determined based on the target traffic model corresponding to the target service, and the target traffic model is used to balance network traffic;
[0016] The data request sending unit is used to send the data request to the server gateway module within the target time window, so as to request the target data of the target service from the server business module corresponding to the server gateway module.
[0017] Fourthly, embodiments of this disclosure also provide a flow control device configured in a server-side gateway module, comprising:
[0018] The target service determination unit is used to determine the target service in response to the time window request sent by the client gateway module;
[0019] The target time window generation unit is used to generate a target time window based on the target traffic model corresponding to the target service; wherein, the target traffic model is used to balance network traffic.
[0020] The target time window sending unit is used to send the target time window to the client gateway module, so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window.
[0021] Fifthly, embodiments of this disclosure also provide an electronic device, including:
[0022] A memory and a processor, wherein the memory is used to store executable instructions of the processor;
[0023] The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the flow control method provided in any embodiment of this disclosure.
[0024] Sixthly, embodiments of this disclosure also provide a computer program product for executing the flow control method provided in any embodiment of this disclosure.
[0025] The traffic control method for client gateway modules provided in this disclosure can utilize a target traffic model corresponding to the target service and having a network traffic balancing function to generate a target time window that is adapted to the target service and is unlikely to cause server access peaks. Within the target time window, the data requests generated by the client service module are sent to the server gateway module to request the target data required by the target service from the server service module. This avoids the phenomenon of many clients accessing the server at the same time, and better balances the peaks and troughs in the network traffic distribution, thereby greatly reducing the network bandwidth and server costs in the process of the client requesting data resources from the server.
[0026] The traffic control method for server gateway modules provided in this disclosure can utilize a target traffic model corresponding to the target service and having a network traffic balancing function to generate a target time window that is adapted to the target service and is unlikely to cause server access peaks. This target time window is then sent to the client gateway module, enabling the client gateway module to send data requests to the server gateway module according to the target time window. This avoids the problem of peak network requests, reduces network bandwidth and server costs for data requests, and allows for more flexible control of network traffic distribution through policy updates on the server side. It also reduces the cost of client improvements when updating traffic control policies, thereby improving the efficiency and flexibility of traffic control implementation. Attached Figure Description
[0027] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0028] Figure 1 This is a schematic diagram illustrating data interaction between the client and server in existing technologies.
[0029] Figure 2 A flowchart illustrating a traffic control method applied to a client gateway module, provided in an embodiment of this disclosure;
[0030] Figure 3 for Figure 2 The diagram shows a detailed flow chart of S220 in the flow control method applied to the client gateway module;
[0031] Figure 4This is a schematic diagram illustrating data interaction between a client and a server, provided as an embodiment of the present disclosure.
[0032] Figure 5 for Figure 2 Another detailed flowchart of S220 in the flow control method applied to the client gateway module is shown;
[0033] Figure 6 This is another schematic diagram of data interaction between a client and a server provided in an embodiment of the present disclosure;
[0034] Figure 7 A flowchart illustrating a traffic control method applied to a server gateway module provided in this embodiment of the disclosure;
[0035] Figure 8 A schematic diagram of a flow control device configured in a client gateway module, provided in an embodiment of this disclosure;
[0036] Figure 9 A schematic diagram of a flow control device configured in a server gateway module, provided in an embodiment of this disclosure;
[0037] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0038] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0039] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0040] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0041] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0042] See Figure 1 In related technologies, the process of a client requesting user-perceptible data resources from a server is roughly as follows: The upper-layer business module in the client (referred to as the client business module) generates a data request immediately after determining it has switched to foreground mode and sends it to the lower-layer gateway module (referred to as the client gateway module). The client gateway module, in response to the data request, establishes a network connection with the server gateway module and sends the data request to the lower-layer gateway module (referred to as the server gateway module). The server gateway module then transmits the data request to the upper-layer business module (referred to as the server business module). The server business module, in response to the data request, determines the data resources required for the business (i.e., the target data). Then, following the order of server business module, server gateway module, client gateway module, and client business module, the target data is transmitted to the client business module. In this way, the client business module can process the target data according to a pre-set data processing strategy.
[0043] According to the above interaction process, when many clients are woken up at the same time, these clients will send data requests to the server in a concentrated manner, resulting in a sudden surge in network bandwidth and high concurrency processing on the server side, which in turn increases the network cost of the clients and the resource consumption of the server side.
[0044] To address the aforementioned issues, a random offset time can be set in the client. When the client switches to foreground mode, it will randomly generate an offset time and only generate and send a data request to the server after reaching that offset time. Thus, with an appropriate offset time setting, multiple clients woken up at the same time can request data resources in a staggered manner. However, if the offset time is not set properly, this method's traffic control effect is poor. For example, if the offset time is set too long, the client may be switched to background mode or exit before the offset time is reached, resulting in a lower data distribution success rate; if the offset time is set too short, the network traffic distribution will still exhibit uneven peaks and valleys.
[0045] Based on the above, this disclosure provides a traffic control method that can generate a target traffic model with balanced network traffic by utilizing the traffic information generated by the normal access of the target service to the server. The target traffic model is then used to generate a target time window that adapts to the target service, and the client is controlled to access the server within the target time window. This distributes the data requests of multiple clients more evenly, thereby better smoothing out network traffic peaks and valleys, avoiding traffic peaks and server peak capacity, and thus reducing the network cost of data resource requests and the resource consumption of the server.
[0046] Based on the above flow control method, it is possible to Figure 1 Based on the interactive diagram shown, the corresponding functions described above are added to the client gateway module to implement the traffic control method applied to the client gateway module. The specific interactive process can be found in subsequent embodiments. Figure 4 And its explanation. Alternatively, it can also be found in... Figure 1 Based on the illustrated interaction diagram, a function to control data request sending based on a target time window is added to the client gateway module, and a function to generate a target time window based on a target traffic model is added to the server gateway module. This implements the traffic control method applied to the client gateway module and / or the traffic control method applied to the server gateway module. The specific interaction process can be found in the subsequent embodiments. Figure 6 And its explanation.
[0047] Figure 2 This is a flowchart illustrating a traffic control method applied to a client gateway module, provided as an embodiment of the present disclosure. This method is applicable to situations where the request and distribution of data resources are barely perceptible to the user. The traffic control method applied to the client gateway module can be executed by a traffic control device configured in the client gateway module. This device can be implemented in software and / or hardware and can be integrated into the electronic device where the client is located. This electronic device can be, for example, a mobile terminal such as a smartphone, tablet, PDA, laptop, smart wearable device, in-vehicle device, etc., or a fixed terminal such as a smart TV, desktop computer, etc.
[0048] like Figure 2 As shown, the traffic control method applied to a client gateway module provided in this disclosure embodiment may include:
[0049] S210. In response to a data request sent by the client business module, determine the target business.
[0050] Specifically, when the client switches to foreground mode, the client business module generates an access request (i.e., a data request) to request the target data required by the server and transmits it to the client gateway module.
[0051] After receiving a data request, the client gateway module parses the data request to determine the specific service (i.e., the target service) it corresponds to, so that a suitable network access time window (i.e., the target time window) can be determined accordingly.
[0052] The aforementioned time window refers to a time-based window, which is a period of time determined by a preset time granularity. For example, if the preset time granularity is 1 minute, then the time window is 1 minute, and there are 1440 time windows in a day. The target time window is a part of multiple time windows, and its specific number can be preset.
[0053] S220. Determine the target time window corresponding to the target service; the target time window is determined based on the target traffic model corresponding to the target service, and the target traffic model is used to balance network traffic.
[0054] Specifically, in order to balance network traffic and minimize excessive fluctuations in network bandwidth during network access, a corresponding traffic model can be generated for each service requiring network access. This traffic model can be used to determine the availability of network access for the corresponding service within various time windows (referred to as time window accessibility information). This accessibility information can be, for example, the probability of network access occurring within a certain time window, or the probability of future network access availability within that time window under the requirement of balanced traffic. In this way, at least one target time window that is most suitable for the target service to initiate network access without causing network traffic spikes can be determined using the traffic model corresponding to the target service (referred to as the target traffic model).
[0055] In one example, the client gateway module can generate accessibility information for the target service in each time window by loading the target traffic model. This accessibility information is then used to determine one or more target time windows.
[0056] In another example, the processes of loading the target traffic model and determining the target time window can be implemented on the server or a third-party server, while the client gateway module retrieves the target time window by accessing the server or a third-party server.
[0057] S230. Within the target time window, send a data request to the server gateway module to request the target data of the target business from the server business module corresponding to the server gateway module.
[0058] Specifically, as explained above, for the target service, when the client accesses the server within the target time window, network traffic can be balanced to avoid traffic spikes. Therefore, the client gateway module will process data requests according to the target time window.
[0059] In some embodiments, when the business that the client business module processes and requires network access is relatively simple, the client gateway module can, after determining the target time window and confirming that the first data request is not within the target time window, only receive the data request sent by the client business module within the target time window, and then send the data request to the server after receiving it.
[0060] In other embodiments, when the client service module handles a large number of services that require network access, the client gateway module can receive all data requests sent by the client service module, but it needs to determine whether the data request corresponding to the target service is within the target time window in order to determine whether to send it to the server.
[0061] If the client gateway module determines that the data request is outside the target time window, it does not need to send the data request to the server. In this case, the client gateway module can discard the data request and send feedback to the client business module indicating that the data request was not successfully sent. The client business module can then perform appropriate processing based on this feedback. For example, if the feedback only indicates that the data was not successfully sent, the client business module can continue to periodically generate data requests and repeat the above steps while in foreground mode. Similarly, if the feedback indicates that the data was not successfully sent, the client business module can generate a data request upon receiving an accessible message from the client gateway module and repeat the above steps. Furthermore, if the feedback includes both an unsuccessfully sent notification and an accessible target time window, the client business module can generate and send the data request based on the target time window.
[0062] If the client gateway module determines that the data request is within the target time window, then it sends the data request to the server.
[0063] After receiving a data request, the server-side gateway module can transmit it to the server-side business module. The server-side business module can then respond to the data request by executing the corresponding data processing flow, obtaining the target data required by the target business, and transmitting the target data to the client-side business module in the order of server-side business module, server-side gateway module, client-side gateway module, and client-side business module, so that the client-side business module can process the target data according to the pre-set data processing strategy.
[0064] In some embodiments, the client gateway module determines whether to send a data request to the server by considering the relationship between the current system time and the target time window when receiving the data request. Specifically, S230 includes: responding to a data request generated by the client business module, determining the current system time; if the current system time is within the target time window, sending the data request to the server gateway module to request the target data from the server business module.
[0065] Specifically, after receiving a data request, the client gateway module queries and determines the current system time. Then, it compares the current system time with the target time window. If the current system time is within the target time window, the data request can be sent to the server gateway module.
[0066] In some embodiments, after determining the current system time in response to a data request generated by the client service module, the flow control method applied to the client gateway module further includes: if the current system time is not within a target time window, returning the target time window to the client service module so that the client service module resends the data request to the client gateway module within the target time window.
[0067] Specifically, if the client gateway module determines that the current system time is not within the target time window, it will not send the data request. In this case, to improve data request processing efficiency and reduce client resource consumption to some extent, the client gateway module can send the target time window to the client business module. The client business module, upon determining that the current system time is within the target time window, will then regenerate the data request and send it to the client gateway module. At this point, the client gateway module can determine that the data request is within the target time window and send it to the server gateway module.
[0068] It should be noted that if there are multiple target time windows, the next target time window closest to the current system time can be sent to the client's business module. If the preset time granularity of the target time window is very small, and the next target time window is too close to the current system time, then two or three target time windows after the current system time can also be sent to ensure the success rate of subsequent data requests.
[0069] This disclosure provides a traffic control method applied to a client gateway module. The method includes: responding to a data request sent by a client service module, determining a target service; determining a target time window corresponding to the target service and based on a target traffic model corresponding to the target service; wherein the target traffic model is used to balance network traffic; and within the target time window, sending a data request to a server gateway module to request target data for the target service from the server service module corresponding to the server gateway module. This avoids the phenomenon of numerous clients accessing the server simultaneously, better balancing the peaks and troughs in network traffic distribution, thereby significantly reducing network bandwidth and server costs during the process of clients requesting data resources from the server.
[0070] In some embodiments, the target time window can be generated autonomously by the client gateway module. For example... Figure 3 As shown, Figure 2 The diagram shows a detailed flow chart of S220 in the flow control method applied to the client gateway module. (Refer to...) Figure 3 S220 "Determine the target time window corresponding to the target business" includes:
[0071] S321. Based on the target business, select the target traffic model from multiple candidate traffic models.
[0072] Here, a candidate traffic model refers to a pre-obtained traffic model adapted to a specific service. In this embodiment, the candidate traffic model can be a preset probability model or a deep learning model. The preset probability model is a traffic model obtained based on probability calculations.
[0073] Specifically, in this embodiment, the traffic distribution of each service requiring network access can be pre-calculated without traffic control intervention. A traffic model corresponding to each service can be obtained according to a traffic model construction method (such as a preset probability calculation method or a deep learning model training method), serving as a candidate traffic model for model selection of the target service. The construction process of this traffic model can be described in detail in subsequent embodiments. Furthermore, the traffic model construction process can be executed on the server or a third-party server; when the electronic device on the client has sufficient computing power, the traffic model construction process can also be executed on the client.
[0074] Once the client gateway module parses the target service, it uses the target service as an index to locate the corresponding candidate traffic model from the above correspondence between services and candidate traffic models, and then uses it as the target traffic model.
[0075] S322. Determine the window weight of each candidate time window based on the target traffic model, and randomly select a preset number of candidate time windows from each candidate time window based on the window weight, as the target time window.
[0076] The candidate time window is a time window determined based on a preset time granularity. For example, if the preset time granularity is 1 minute, then there could be 1440 candidate time windows. The window weight is the weight value of the candidate time window, which characterizes the degree to which the candidate time window is available during network access. The larger the window weight, the lower the probability that the candidate time window may generate a network access peak, and the higher the probability that it can be selected for network access. The preset quantity is a pre-set value used to determine the number of target time windows. The preset quantity can be set according to the length of time the client is in foreground mode and / or business needs (such as data delivery success rate), for example, it can be set to 5.
[0077] Specifically, the client gateway module can output the window weights of each candidate time window through the calculation of the target traffic model. Then, based on these window weights, the client gateway module performs a weight-based random selection algorithm on each candidate time window, that is, randomly selects a preset number of time windows from each candidate time window as the target time window with probability based on the window weight.
[0078] For example, as an implementation of a weighted random selection algorithm, the client gateway module can determine the target time window using numerical indices corresponding to the window weights and random numbers. The basic idea of this example is that the more numerical values a candidate time window corresponds to, the greater its probability of being selected. That is, each candidate time window is assigned a corresponding window weight value, and the indices of these values are recorded. Subsequently, the selected candidate time window is located using the index of the random number that was hit.
[0079] Suppose there are three candidate time windows 21, 22 and 23, with window weights of 5, 5 and 3 respectively. Then, we can assign 5 numbers to candidate time window 21 (for example), and record its index from 0 to 4; assign 5 numbers to candidate time window 22 (for example), and record its index from 5 to 9; and assign 3 numbers to candidate time window 23 (for example), and record its index from 10 to 12, as shown in Table 1.
[0080] When a target time window needs to be selected, a preset number (e.g., 2) of random numbers can be generated within the range of index 0 to 12, such as random = 5 and 3. Then, when selecting a time window based on the numerical index in Table 1, it can be determined that random number 5 and random number 3 correspond to candidate time window 21 and candidate time window 22, respectively. These two candidate time windows can then be used as the target time window.
[0081]
[0082] By applying the target traffic model described above, a window weight can be determined for each candidate time window, thus providing a reliable data basis for the selection of the target time window and ensuring that the selected target time window is a time window for traffic peak shifting. Furthermore, by randomly selecting candidate time windows based on window weights, the randomness of the selection of the target time window within the candidate time window for traffic peak shifting can be further ensured, avoiding the situation where multiple clients compete for the same candidate time window, causing new traffic peaks, thereby further improving the uniformity of network traffic distribution.
[0083] In some embodiments, when the candidate traffic model is a preset probability model, the candidate traffic model can be pre-generated through the following steps A to B:
[0084] Step A: Obtain the business traffic distribution at a preset time granularity corresponding to the target business, and determine the business request probability for each candidate time window based on the business traffic distribution.
[0085] The candidate time window is determined based on a preset time granularity.
[0086] Specifically, the traffic control in this embodiment is network access control for a specific service. Therefore, when constructing the traffic model, the traffic data of the service normally accessing the network can be used as the basic data, that is, the traffic information of the target service under conditions where it is not subject to traffic control interference can be obtained, for example, through log data recorded in the gateway. Then, the traffic information is statistically analyzed according to a preset time granularity (such as minute granularity) to obtain the service traffic distribution (C1, C2, ..., C...). n ), where C i This represents the number of traffic flows at the i-th (i = 1 to n) preset time granularity / candidate time window.
[0087] Then, the probability of business requests (P1, P2, ..., P) for each candidate time window is calculated from the business traffic distribution using the following formula. n ):
[0088]
[0089] Where Pi represents the probability of generating business access traffic in the i-th candidate time window.
[0090] Step B: Based on the probability of each service request, and in accordance with the strategy of balancing network traffic, determine the window weight of each candidate time window, and construct a candidate traffic model from the candidate time windows and window weights.
[0091] Specifically, based on the strategy of balancing network traffic, the window weights of candidate time windows corresponding to peak areas of traffic distribution are reduced to decrease the likelihood of these candidate time windows being selected later, while the window weights of candidate time windows corresponding to undervalued areas of traffic distribution are increased to increase the likelihood of these candidate time windows being selected later. Using the business request probabilities of each candidate time window, the window weight (w1, w2, ..., w) of each candidate time window is calculated according to the following formula. n ):
[0092]
[0093] Therefore, each candidate time window and its corresponding window weight constitute the candidate traffic model for the target business.
[0094] In another embodiment, when the candidate traffic model is a deep learning model, the candidate traffic model is pre-trained through the following step C:
[0095] Step C: Use the business traffic distribution corresponding to the target business at a preset time granularity as the input data for model training, the window weight of the candidate time window as the output data for model training, and the minimum standard deviation of the business access volume statistics within the candidate time window as the objective function to train the deep learning model and generate a candidate traffic model.
[0096] Specifically, when electronic devices have sufficient computing resources and the accuracy requirements for traffic models are high, candidate traffic models can also be obtained by training deep learning models.
[0097] Based on the above explanation, the traffic model can use the user activity distribution data / business traffic distribution of the target business as the basic data and the window weights of the candidate time windows as the output data. Therefore, in the process of training the deep learning model, the business traffic distribution of the target business at a preset time granularity can be collected as the input data for model training, and the preset window weights of each candidate time window at the preset time granularity can be used as the reference standard for model training to verify and correct the window weights output by the model training.
[0098] Furthermore, given that the role of the traffic model is to assist in deciding the allocation of time windows accessible to clients, thereby reducing overall traffic fluctuations and keeping network traffic stable, the optimization objective during the training of the deep learning model can be set as minimizing the standard deviation of the user access statistics / business access statistics within the candidate time window. This can be used to construct the objective function for model training.
[0099] Based on the input data, output data, reference standard, and objective function determined above for model training, the deep learning model can be iteratively trained to obtain the candidate traffic model corresponding to the target business.
[0100] For the traffic control methods applied to the client gateway module in the above embodiments, the corresponding data interaction process between the client and the server can be illustrated as follows: Figure 4 As shown. See also Figure 4 The data interaction process between the client and the server specifically includes:
[0101] S410: After the client business module switches to foreground mode, it generates a data request and sends the data request to the client gateway module.
[0102] S420: The client gateway module parses data requests to determine the target service and, based on the target traffic model corresponding to the target service, determines the target time window.
[0103] S430. If the client gateway module determines that the current system time corresponding to the data request is within the target time window, it sends the data request to the server gateway module and continues to execute S440-S460. Otherwise, it executes S470-S480.
[0104] S440, the server gateway module transmits data requests to the server business module.
[0105] S450: The server-side business module responds to the data request, determines the target data corresponding to the target business, and transmits the target data to the server-side gateway module.
[0106] S460: The server-side gateway module sends the target data to the client-side gateway module. The client-side gateway module then transmits the target data to the client-side business module. The client-side business module processes the target data according to its predetermined processing logic.
[0107] S470. If the client gateway module determines that the current system time corresponding to the data request is not within the target time window, then the target time window will be sent to the client business module.
[0108] S480: When the client service module determines that the new current system time is within the target time window, it regenerates the data request and returns to execute the steps in S410 that send the data request to the client gateway module and the subsequent steps.
[0109] In some embodiments, the target time window may be generated by the server-side gateway module or a third-party server and then distributed to the client-side gateway module. For example... Figure 5 As shown, Figure 2The diagram shows a detailed flow chart of S220 in the flow control method applied to the client gateway module. (Refer to...) Figure 5 S220 "Determine the target time window corresponding to the target business" includes:
[0110] S521. Generate a time window request based on the target business and send the time window request to the target end.
[0111] The time window request is used to trigger the target end to generate a target time window based on the target traffic model. The target end includes the server gateway module or a third-party server.
[0112] Specifically, after the client gateway module determines the target service, it generates an access request to the server for the target time window, i.e., a time window request. Then, the time window request is sent to the target end.
[0113] S522, Receive the target time window returned by the target end.
[0114] Specifically, after receiving a time window request, the target end can parse it to obtain the target service. Then, the target end determines the target traffic model corresponding to the target service, calculates the target time window using the target traffic model, and feeds it back to the client gateway module. In this way, the client gateway module can obtain the target time window.
[0115] It should be noted that the determination of the target traffic model and the calculation process of the target time window in the target end can be referred to the description in the corresponding embodiments above.
[0116] The above embodiments, by deploying the calculation of the target traffic model and the generation of the target time window at the target end, can reduce the amount of data processing on the client side and improve the client's processing efficiency. On the other hand, it can change the traffic control strategy more quickly at the target end without requiring much software and hardware change on the client side, thereby reducing the client cost in the process of changing the traffic control strategy and improving the efficiency and flexibility of changing the traffic control strategy.
[0117] For the traffic control method applied to the client gateway module in the above embodiments, when the target is the server gateway module, the corresponding data interaction process between the client and the server can be illustrated as follows: Figure 6 As shown. See also Figure 6 The data interaction process between the client and the server specifically includes:
[0118] S610. When the client gateway module receives a data request from the client business module, or when it receives the target data for the target business from the server, it generates a time window request based on the target business and sends it to the server gateway module.
[0119] S620: Upon receiving the time window request, the server gateway module determines the target traffic model corresponding to the target service, generates the target time window corresponding to the target service based on the target traffic model, and sends it to the client gateway module.
[0120] After the S630 client business module switches to foreground mode, it generates a data request and sends the data request to the client gateway module.
[0121] S640. If the client gateway module determines that the current system time corresponding to the data request is within the target time window, it sends the data request to the server gateway module and continues to execute S650-S670. Otherwise, it executes S680-S690.
[0122] The S650 server gateway module transmits data requests to the server business module.
[0123] S660: The server-side business module responds to the data request, determines the target data corresponding to the target business, and transmits the target data to the server-side gateway module.
[0124] S670: The server-side gateway module sends the target data to the client-side gateway module. The client-side gateway module then transmits the target data to the client-side business module. The client-side business module processes the target data according to its predetermined processing logic.
[0125] S680. If the client gateway module determines that the current system time corresponding to the data request is not within the target time window, then the target time window will be sent to the client business module.
[0126] S690. When the client service module determines that the new current system time is within the target time window, it regenerates the data request and returns to execute the step in S630 of sending the data request to the client gateway module and the subsequent steps.
[0127] Figure 7This is a flowchart illustrating a traffic control method applied to a server-side gateway module, provided in an embodiment of this disclosure. It is applicable to scenarios involving requests and distribution of data resources that are barely perceptible to the user. This traffic control method applied to the server-side gateway module can be executed by a traffic control device configured within the server-side gateway module. This device can be implemented in software and / or hardware and can be integrated into the electronic device where the server resides. This electronic device can be, for example, a desktop computer, a mobile workstation, or a server.
[0128] Understandably, the traffic control method applied to the server-side gateway module simply integrates the construction of the target traffic model and the generation of the target time window into the server-side gateway module; it still operates through methods such as... Figure 6 Traffic control is achieved through data interaction between the server-side gateway module and the client-side gateway module shown. Therefore, the explanations of the same or similar terms and steps in this embodiment as in the above embodiments can be found in the descriptions of the above embodiments, and will not be repeated here.
[0129] like Figure 7 As shown in the embodiments of this disclosure, the traffic control method applied to the server-side gateway module may include:
[0130] S710: In response to the time window request sent by the client gateway module, determine the target service.
[0131] Specifically, when the client gateway module receives a data request from the client business module, or when it receives the target data from the server regarding the previous target business, it generates a time window request based on the target business and sends it to the server gateway module. The server gateway module then parses the time window request to determine the target business.
[0132] S720: Generate a target time window based on the target traffic model corresponding to the target business.
[0133] The target traffic model is used to balance network traffic.
[0134] Specifically, the server-side gateway module constructs a target traffic model based on the target business, or selects a target traffic model from multiple candidate traffic models based on the target business. Then, the target time window is determined through the calculation of the target traffic model.
[0135] S730. Send the target time window to the client gateway module so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window.
[0136] In some embodiments, S720 includes:
[0137] Based on the target business, a target traffic model is selected from multiple candidate traffic models; among them, the candidate traffic models are either pre-defined probability models or deep learning models.
[0138] The window weights of each candidate time window are determined based on the target traffic model, and a preset number of candidate time windows are randomly selected from each candidate time window based on the window weights, which are then used as the target time windows.
[0139] In some embodiments, when the candidate traffic model is a preset probability model, the candidate traffic model is pre-generated in the following manner:
[0140] Obtain the business traffic distribution corresponding to the target business at a preset time granularity, and determine the business request probability of each candidate time window based on the business traffic distribution; wherein, the candidate time window is determined based on the preset time granularity;
[0141] Based on the probability of each service request and in accordance with the strategy of balancing network traffic, the window weight of each candidate time window is determined, and the candidate time window and the window weight constitute the candidate traffic model.
[0142] In other embodiments, when the candidate traffic model is a deep learning model, the candidate traffic model is pre-trained in the following manner:
[0143] The deep learning model is trained using the business traffic distribution at a preset time granularity corresponding to the target business as the input data for model training, the window weights of the candidate time windows as the output data for model training, and the objective function is to minimize the standard deviation of the business access volume statistics within the candidate time window, thereby generating a candidate traffic model.
[0144] In some embodiments, after S730, the flow control method applied to the server gateway module further includes:
[0145] In response to a data request sent by the client gateway module, the data request is sent to the server-side business module. The data request is regenerated by the client business module within a target time window and sent to the client gateway module. The target time window is when the client gateway module determines that the current system time is not within the target time window and sends the data to the client business module. The current system time is the system time when the client gateway module first receives the data request.
[0146] The target data returned by the server-side business module in response to the data request is sent to the client gateway module, so that the client gateway module can send the target data to the client business module.
[0147] Figure 8 This is a schematic diagram of a flow control device configured in a client gateway module, provided as an embodiment of this disclosure. Figure 8As shown, the traffic control device 800 configured in the client gateway module provided in this embodiment of the disclosure may include:
[0148] The data request response unit 810 is used to respond to data requests sent by the client business module and determine the target business.
[0149] The target time window determination unit 820 is used to determine the target time window corresponding to the target service; wherein, the target time window is determined based on the target traffic model corresponding to the target service, and the target traffic model is used to balance network traffic;
[0150] The data request sending unit 830 is used to send a data request to the server gateway module within the target time window, so as to request the target data of the target business from the server business module corresponding to the server gateway module.
[0151] In some embodiments, the target time window determination unit 820 is specifically used for:
[0152] Based on the target business, a target traffic model is selected from multiple candidate traffic models; among them, the candidate traffic models are either pre-defined probability models or deep learning models.
[0153] The window weights of each candidate time window are determined based on the target traffic model, and a preset number of candidate time windows are randomly selected from each candidate time window based on the window weights, which are then used as the target time windows.
[0154] In some embodiments, the traffic control device 800 configured in the client gateway module further includes a traffic model generation unit, used to pre-generate a candidate traffic model in the following manner when the candidate traffic model is a preset probability model:
[0155] Obtain the business traffic distribution corresponding to the target business at a preset time granularity, and determine the business request probability of each candidate time window based on the business traffic distribution; wherein, the candidate time window is determined based on the preset time granularity;
[0156] Based on the probability of each service request and in accordance with the strategy of balancing network traffic, the window weight of each candidate time window is determined, and the candidate time window and the window weight constitute the candidate traffic model.
[0157] In other embodiments, the traffic model generation unit is further configured to pre-generate a candidate traffic model when the candidate traffic model is a deep learning model, in the following manner:
[0158] The deep learning model is trained using the business traffic distribution at a preset time granularity corresponding to the target business as the input data for model training, the window weights of the candidate time windows as the output data for model training, and the objective function is to minimize the standard deviation of the business access volume statistics within the candidate time window, thereby generating a candidate traffic model.
[0159] In some embodiments, the target time window determination unit 820 is specifically used for:
[0160] A time window request is generated based on the target business and sent to the target end; the time window request is used to trigger the target end to generate a target time window based on the target traffic model, and the target end includes a server gateway module or a third-party server.
[0161] Receive the target time window returned by the target end.
[0162] In some embodiments, the data request sending unit 830 is specifically used for:
[0163] In response to data requests generated by client business modules, determine the current system time;
[0164] If the current system time is within the target time window, the data request will be sent to the server gateway module to request the target data from the server business module.
[0165] Furthermore, the data request sending unit 830 is also specifically used for:
[0166] After responding to a data request generated by the client business module and determining the current system time, if the current system time is not within the target time window, the target time window is returned to the client business module so that the client business module can resend the data request to the client gateway module within the target time window.
[0167] The flow control device configured in the client gateway module provided in this disclosure can execute the flow control method applied to the client gateway module provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution. Content not described in detail in the device embodiments of this disclosure can be referred to the description in any method embodiment of this disclosure.
[0168] Figure 9 This is a schematic diagram of a flow control device configured in a server-side gateway module, provided as an embodiment of this disclosure. Figure 9 As shown, the traffic control device 900 configured in the server gateway module provided in this embodiment of the disclosure may include:
[0169] The target service determination unit 910 is used to determine the target service in response to the time window request sent by the client gateway module;
[0170] The target time window generation unit 920 is used to generate a target time window based on the target traffic model corresponding to the target service; wherein, the target traffic model is used to balance network traffic.
[0171] The target time window sending unit 930 is used to send the target time window to the client gateway module, so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window.
[0172] In some embodiments, the target time window generation unit 920 is specifically used for:
[0173] Based on the target business, a target traffic model is selected from multiple candidate traffic models; among them, the candidate traffic models are either pre-defined probability models or deep learning models.
[0174] The window weights of each candidate time window are determined based on the target traffic model, and a preset number of candidate time windows are randomly selected from each candidate time window based on the window weights, which are then used as the target time windows.
[0175] In some embodiments, the traffic control device 900 configured in the server gateway module further includes a traffic model generation unit, used to pre-generate a candidate traffic model in the following manner when the candidate traffic model is a preset probability model:
[0176] Obtain the business traffic distribution corresponding to the target business at a preset time granularity, and determine the business request probability of each candidate time window based on the business traffic distribution; wherein, the candidate time window is determined based on the preset time granularity;
[0177] Based on the probability of each service request and in accordance with the strategy of balancing network traffic, the window weight of each candidate time window is determined, and the candidate time window and the window weight constitute the candidate traffic model.
[0178] In other embodiments, the traffic model generation unit is further configured to pre-generate a candidate traffic model when the candidate traffic model is a deep learning model, in the following manner:
[0179] The deep learning model is trained using the business traffic distribution at a preset time granularity corresponding to the target business as the input data for model training, the window weights of the candidate time windows as the output data for model training, and the objective function is to minimize the standard deviation of the business access volume statistics within the candidate time window, thereby generating a candidate traffic model.
[0180] In some embodiments, the traffic control device 900 configured in the server gateway module further includes a data request response unit, used for:
[0181] After sending the target time window to the client gateway module so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window, the server responds to the data request sent by the client gateway module by sending the data request to the server service module. The data request is regenerated by the client service module within the target time window and sent to the client gateway module. The target time window is sent to the client service module when the client gateway module determines that the current system time is not within the target time window. The current system time is the system time when the client gateway module first receives the data request.
[0182] The target data returned by the server-side business module in response to the data request is sent to the client gateway module, so that the client gateway module can send the target data to the client business module.
[0183] The flow control device configured in the server gateway module provided in this disclosure can execute the flow control method applied to the server gateway module provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution. Content not described in detail in the device embodiments of this disclosure can be referred to the description in any method embodiment of this disclosure.
[0184] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. It is used to exemplarily illustrate an electronic device that implements the traffic control method applied to a client gateway module or the traffic control method applied to a server gateway module in any embodiment of the present disclosure, and should not be construed as a specific limitation on the embodiments of the present disclosure.
[0185] like Figure 10 As shown, the electronic device 1000 may include a processor (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processor 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0186] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although an electronic device 1000 with various devices is shown, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0187] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processor 1001, it can perform the functions defined in the flow control method for a client gateway module or the flow control method for a server gateway module provided in any embodiment of this disclosure.
[0188] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0189] In some implementations, the client and server can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0190] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0191] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the flow control method for a client gateway module or the flow control method for a server gateway module provided in any embodiment of this disclosure.
[0192] In embodiments of this disclosure, computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0193] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0194] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0195] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0196] In the context of this disclosure, a computer-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of computer-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0197] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0198] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0199] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A flow control method, characterized in that, Applied to the client gateway module, including: In response to data requests sent by client business modules, determine the target business; Determine the target time window corresponding to the target service; wherein, the target time window is determined based on the target traffic model selected from multiple candidate traffic models corresponding to the target service, and the target traffic model is a preset probability model or a deep learning model, used to balance network traffic; Within the target time window, the data request is sent to the server gateway module to request the target data of the target service from the server business module corresponding to the server gateway module.
2. The method according to claim 1, wherein, Determining the target time window corresponding to the target service includes: Based on the target service, the target traffic model is selected from multiple candidate traffic models; The window weight of each candidate time window is determined based on the target traffic model, and a preset number of candidate time windows are randomly selected from each candidate time window based on the window weight, and used as the target time window.
3. The method according to claim 2, wherein, When the candidate traffic model is the preset probability model, the candidate traffic model is pre-generated in the following manner: Obtain the service traffic distribution at a preset time granularity corresponding to the target service, and determine the service request probability of each candidate time window based on the service traffic distribution; wherein, the candidate time window is determined based on the preset time granularity; Based on the probability of each service request, and in accordance with the strategy of balancing network traffic, the window weight of each candidate time window is determined, and the candidate traffic model is formed by the candidate time window and the window weight.
4. The method according to claim 2, wherein, When the candidate traffic model is the deep learning model, the candidate traffic model is pre-trained in the following manner: The deep learning model is trained using the business traffic distribution at a preset time granularity corresponding to the target business as the input data for model training, the window weights of the candidate time windows as the output data for model training, and the objective function being to minimize the standard deviation of the business access volume statistics within the candidate time window, thereby generating the candidate traffic model.
5. The method according to claim 1, wherein, Determining the target time window corresponding to the target service includes: A time window request is generated based on the target service, and the time window request is sent to the target end; wherein, the time window request is used to trigger the target end to generate a target time window based on the target traffic model, and the target end includes the server gateway module or a third-party server; Receive the target time window returned by the target terminal.
6. The method according to any one of claims 1 to 5, wherein, The step of sending the data request to the server gateway module within the target time window to request the target data of the target service from the server service module corresponding to the server gateway module includes: In response to a data request generated by the client service module, determine the current system time; If the current system time is within the target time window, the data request is sent to the server gateway module to request the target data from the server business module.
7. The method according to claim 6, wherein, After determining the current system time in response to the data request generated by the client service module, the method further includes: If the current system time is not within the target time window, the target time window is returned to the client service module so that the client service module can resend the data request to the client gateway module within the target time window.
8. A flow control method, characterized in that, Applied to the server-side gateway module, including: In response to the time window request sent by the client gateway module, determine the target service; Based on the target traffic model selected from multiple candidate traffic models corresponding to the target service, a target time window is generated; wherein, the target traffic model is a preset probability model or a deep learning model, used to balance network traffic; The target time window is sent to the client gateway module so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window.
9. The method according to claim 8, wherein, The process of generating the target time window based on the target traffic model corresponding to the target service includes: Based on the target service, the target traffic model is selected from multiple candidate traffic models; The window weight of each candidate time window is determined based on the target traffic model, and a preset number of candidate time windows are randomly selected from each candidate time window based on the window weight, and used as the target time window.
10. The method according to claim 8, wherein, After sending the target time window to the client gateway module, so that the client gateway module determines whether to send the data request corresponding to the target service to the server gateway module based on the target time window, the method further includes: In response to the data request sent by the client gateway module, the data request is sent to the server-side business module; wherein, the data request is regenerated by the client business module within the target time window and sent to the client gateway module, the target time window is when the client gateway module determines that the current system time is not within the target time window and sends it to the client business module, the current system time is the system time when the client gateway module first receives the data request; The target data returned by the server-side business module in response to the data request is sent to the client gateway module, so that the client gateway module sends the target data to the client business module.
11. A flow control device, characterized in that, Configured in the client gateway module, including: The data request and response unit is used to respond to data requests sent by the client business module and determine the target business. A target time window determination unit is used to determine the target time window corresponding to the target service; wherein, the target time window is determined based on the target traffic model selected from multiple candidate traffic models corresponding to the target service, and the target traffic model is a preset probability model or a deep learning model, used to balance network traffic; The data request sending unit is used to send the data request to the server gateway module within the target time window, so as to request the target data of the target service from the server service module corresponding to the server gateway module.
12. A flow control device, characterized in that, Configured in the server-side gateway module, including: The target service determination unit is used to determine the target service in response to the time window request sent by the client gateway module; The target time window generation unit is used to generate a target time window based on the target traffic model selected from multiple candidate traffic models corresponding to the target service; wherein the target traffic model is a preset probability model or a deep learning model, used to balance network traffic. The target time window sending unit is used to send the target time window to the client gateway module, so that the client gateway module can determine whether to send the data request corresponding to the target service to the server gateway module based on the target time window.
13. An electronic device, characterized in that, include: A memory and a processor, wherein the memory is used to store executable instructions of the processor; The processor is configured to read the executable instructions from the memory and execute the executable instructions to implement the flow control method as described in any one of claims 1 to 10.
14. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, are used to implement the flow control method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Task scheduling method and device, computer equipment and storage medium
CN113821330A
Business flow peak shifting scheduling method and related equipment
CN114827041A