Message traffic control method, device and equipment and readable storage medium

By using the prediction network to predict the target message traffic of the message queue, the traffic fluctuation problem caused by existing stream finite processing is solved, and the stability and throughput of system traffic are improved.

CN119449725AActive Publication Date: 2025-02-14CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When facing instantaneous traffic, existing message queue current limiting processing can easily cause severe traffic fluctuations and cannot effectively stabilize system traffic.

Method used

By obtaining the last predicted message traffic and historical traffic characteristics, the target message traffic is predicted using a prediction network (such as a long and short-term memory network), and current limit or de-current limit based on the prediction results.

Benefits of technology

This method can more accurately predict message traffic in the future, avoid the impact of instantaneous traffic, ensure the stability of system traffic, and improve the system throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449725A_ABST
    Figure CN119449725A_ABST
Patent Text Reader

Abstract

The invention provides a message traffic control method, device and equipment and a readable storage medium, and relates to the technical field of communication. The method comprises the following steps: acquiring a last predicted message traffic and a first historical traffic feature; predicting target message traffic according to the last predicted message traffic and the first historical traffic feature; and carrying out flow limiting or flow delimiting according to the target message flow. According to the scheme of the invention, the problem of severe flow fluctuation in current message queue flow limiting processing is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message flow control method, device, equipment and readable storage medium. Background Art

[0002] Message queue is an asynchronous communication method between services. It mainly solves problems such as asynchronous decoupling of the system, peak shaving and valley filling, asynchronous messaging, etc., and realizes a high-performance, high-availability, scalable and eventually consistent system architecture. Message queue is an indispensable middleware for large-scale distributed systems and the cornerstone middleware for high-concurrency systems. Message queue can cope with high-concurrency systems and provide highly available services, thanks to its inherent message caching, asynchronous sending and other features, as well as its elegant design. In order to cope with high concurrency and achieve high throughput, current limiting technology is essential.

[0003] However, the existing flow limiting process is to monitor the flow in real time, and limit the flow when the flow is higher than the threshold, and stop limiting the flow when the flow is lower than the threshold. In this way, when facing instantaneous flow, if this processing method is used to limit or release the flow based on the instantaneous flow, it will cause drastic fluctuations in flow. Summary of the invention

[0004] The purpose of the present application is to provide a message flow control method, device, equipment and readable storage medium to avoid the problem of severe flow fluctuations in current message queue flow limiting processing.

[0005] To achieve the above object, an embodiment of the present application provides a message flow control method, which is executed by a network device and includes:

[0006] Obtain the last predicted message traffic and the first historical traffic characteristics;

[0007] Predicting target message traffic based on the last predicted message traffic and the first historical traffic feature;

[0008] The flow is limited or released according to the target message flow.

[0009] Optionally, predicting target message traffic according to the last predicted message traffic and the first historical traffic feature includes:

[0010] Inputting the last predicted message traffic and the first historical traffic feature into a prediction network;

[0011] The output of the prediction network is used as the target message flow.

[0012] Optionally, before predicting the target message flow according to the last predicted message flow and the first historical flow feature, the method further includes:

[0013] Get training set and validation set;

[0014] The preset network is trained based on the training set and the validation set to obtain a pre-trained network, and the prediction network is determined based on the pre-trained network.

[0015] Optionally, determining the prediction network according to the pre-trained network includes:

[0016] Using the pre-trained network as the prediction network;

[0017] or,

[0018] The pre-trained network is adjusted based on the second historical traffic feature of the target user, and the adjusted pre-trained network is used as the prediction network.

[0019] Optionally, obtaining a training set and a validation set includes:

[0020] Notify multiple virtual machines with different configurations to execute target tasks;

[0021] Collecting target data generated by the target task;

[0022] The data in the first time period of the target data is used as the training set, and the data in the second time period of the target data is used as the validation set.

[0023] Optionally, the training a preset network based on the training set and the validation set to obtain a pre-trained network includes:

[0024] Inputting the first data of the training set or the validation set into the preset network; wherein the first data includes a third historical traffic feature of a third time period;

[0025] If the mean square error loss between the result output by the preset network and the actual message flow corresponding to the first data is within a specific range, determining the pre-trained network;

[0026] If the mean square error loss between the result output by the preset network and the actual message traffic corresponding to the first data is not within the specific range, the first data is updated, and the updated first data is input into the preset network until the pre-trained network is determined; wherein, the time period corresponding to the fourth historical traffic feature in the updated first data partially overlaps with the third time period, and the starting time is after the starting time of the third time period.

[0027] Optionally, the first historical traffic feature, the second historical traffic feature, the third historical traffic feature or the fourth historical traffic feature all include:

[0028] Central processing unit CPU usage, memory usage, network bandwidth usage and disk read and write rates.

[0029] Optionally, the prediction network is a long short-term memory network.

[0030] To achieve the above object, an embodiment of the present application provides a message flow control device, including:

[0031] A first acquisition module, used to acquire the last predicted message traffic and the first historical traffic feature;

[0032] A first processing module, configured to predict a target message flow according to the last predicted message flow and the first historical flow characteristics;

[0033] The second processing module is used to limit or release the flow according to the target message flow.

[0034] Optionally, the first processing module includes:

[0035] A first processing submodule, configured to input the last predicted message traffic and the first historical traffic feature into a prediction network;

[0036] The second processing submodule is used to use the output of the prediction network as the target message flow.

[0037] Optionally, the device further comprises:

[0038] The second acquisition module is used to obtain a training set and a validation set;

[0039] The training module is used to train the preset network based on the training set and the verification set to obtain a pre-trained network, and determine the prediction network based on the pre-trained network.

[0040] Optionally, the device further comprises:

[0041] A third processing module, configured to use the pre-trained network as the prediction network;

[0042] or,

[0043] The pre-trained network is adjusted based on the second historical traffic feature of the target user, and the adjusted pre-trained network is used as the prediction network.

[0044] Optionally, the first acquisition module is further used for:

[0045] Notify multiple virtual machines with different configurations to execute target tasks;

[0046] Collecting target data generated by the target task;

[0047] The data in the first time period of the target data is used as the training set, and the data in the second time period of the target data is used as the validation set.

[0048] Optionally, the training module is further used to:

[0049] Inputting the first data of the training set or the validation set into the preset network; wherein the first data includes a third historical traffic feature of a third time period;

[0050] If the mean square error loss between the result output by the preset network and the actual message flow corresponding to the first data is within a specific range, determining the pre-trained network;

[0051] If the mean square error loss between the result output by the preset network and the actual message traffic corresponding to the first data is not within the specific range, the first data is updated, and the updated first data is input into the preset network until the pre-trained network is determined; wherein, the time period corresponding to the fourth historical traffic feature in the updated first data partially overlaps with the third time period, and the starting time is after the starting time of the third time period.

[0052] Optionally, the first historical traffic feature, the second historical traffic feature, the third historical traffic feature or the fourth historical traffic feature all include:

[0053] Central processing unit CPU usage, memory usage, network bandwidth usage and disk read and write rates.

[0054] Optionally, the prediction network is a long short-term memory network.

[0055] To achieve the above object, an embodiment of the present application provides a network device, including a processor, wherein the processor is configured to:

[0056] Obtain the last predicted message traffic and the first historical traffic characteristics;

[0057] Predicting target message traffic based on the last predicted message traffic and the first historical traffic feature;

[0058] The flow is limited or released according to the target message flow.

[0059] To achieve the above-mentioned purpose, an embodiment of the present application provides a network device, including: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the message flow control method as described above is implemented.

[0060] To achieve the above-mentioned purpose, an embodiment of the present application provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps in the message flow control method as described above are implemented.

[0061] To achieve the above objective, an embodiment of the present application provides a computer program product, including computer instructions, which implement the steps of the message flow control method described above when executed by a processor.

[0062] The beneficial effects of the above technical solution of the present application are as follows:

[0063] The method of the embodiment of the present application obtains the last predicted message traffic and the first historical traffic characteristics, and uses the two to predict the target message traffic, provides reasonable judgment for flow limitation or release of flow limitation in the future, ensures the stability of system traffic, and improves the throughput of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 This is a flow chart of a message flow control method according to an embodiment of the present application;

[0065] Figure 2 This is a schematic diagram of the structure of the LSTM network in the embodiment of the present application;

[0066] Figure 3 One of the schematic diagrams generated for the experimental data;

[0067] Figure 4 The second schematic diagram for generating experimental data;

[0068] Figure 5 The third schematic diagram for generating experimental data;

[0069] Figure 6 The fourth schematic diagram for generating experimental data;

[0070] Figure 7 Schematic diagram of the training process;

[0071] Figure 8 This is a schematic diagram of the training results;

[0072] Fig. 9 This is a schematic diagram of the module structure of the message flow control device according to an embodiment of the present application;

[0073] Fig.10 A structural diagram of a network device according to an embodiment of the present application;

[0074] Fig.11 This is a structural diagram of a network device according to another embodiment of the present application. DETAILED DESCRIPTION

[0075] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0076] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0077] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0078] Additionally, the terms "system" and "network" are often used interchangeably herein.

[0079] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0080] For ease of understanding, some contents involved in the embodiments of the present application are described below:

[0081] Message queue current limiting usually occurs when the server is facing huge traffic. It is a degradation measure taken to ensure the availability and security of the system. It discards the traffic that cannot be processed and protects the server through rapid failure.

[0082] When the instantaneous flow rate is higher than the threshold, but it continues to be lower than the threshold in the next time period, there is no need to limit the flow. On the contrary, if the current flow is limited, the instantaneous flow rate is higher than the threshold, and it continues to be higher than the threshold in the next time period, the flow limit should not be lifted. Therefore, the flow limit strategy that monitors the flow in real time and controls based on the threshold will limit or lift the flow due to the influence of the instantaneous flow, resulting in drastic fluctuations in the flow. Moreover, the same set of strategies should be used for various systems, and it is impossible to adjust them according to the differences in the systems, and it is impossible to fully utilize the advantages of various application systems.

[0083] A recurrent neural network (RNN) is a neural network used to process sequence data and time series data. Unlike traditional feedforward neural networks, RNNs have feedback connections that can process each element in a sequence and retain previously processed information. Its key feature is that it can use previous calculation results to process current inputs, thereby capturing the time series information and contextual relationships in sequence data. Long Short-Term Memory (LSTM) is a commonly used feedback neural network structure that introduces a gating mechanism that can better capture and process long-term dependencies.

[0084] RNN uses the output at time t-1 as the input at time t, thereby retaining historical information. LSTM is a variant of RNN, which introduces a gating mechanism to effectively control the flow of information and the update of memory. It mainly consists of three gates (Forgetate, Input Gate, Output Gate) and a memory cell (Cell). Forget Gate uses the sigmoid activation function to determine which information in the cell state of the previous moment needs to be forgotten. Input Gate determines which information of the current input needs to be added to the Cell state, controls the update of information through the sigmoid activation function, and uses the tanh activation function to generate a candidate value vector for updating the Cell state. LSTM can better capture and process long-term dependencies in sequence data, allowing the network to effectively transmit and utilize information across time steps. In addition, LSTM is also suitable for the prediction of time series data. The traffic information of the message queue is a kind of time series data.

[0085] Usually, message traffic has certain regularity, and shows certain periodicity as time goes by. If this regularity is fully utilized, the accuracy of current limiting can be more reasonably improved, thereby further improving the stability and security of the system.

[0086] Message queues are usually composed of components such as producers, consumers, and servers. Producers send messages to servers, and consumers pull messages from servers. When the server's processing capacity reaches its upper limit or the producer produces messages too fast and the server cannot process them in time, messages on the server will accumulate, resulting in a decrease in system throughput. Message sending requests in high-concurrency systems usually show regularity over time.

[0087] like Figure 1 As shown, a message flow control method in an embodiment of the present application is executed by a network device, including:

[0088] Step 11, obtaining the last predicted message traffic and the first historical traffic characteristics;

[0089] Step 12, predicting target message traffic according to the last predicted message traffic and the first historical traffic characteristics;

[0090] Step 13: Limit or release the flow according to the target message flow.

[0091] In this embodiment, the traffic feature is the indicator information that affects the message traffic. Here, the first historical traffic feature is the traffic feature in a period of time before the current time, and the first historical traffic feature can provide guidance for the flow limiting of the message queue. The target message traffic is the message traffic in the future period of time.

[0092] In this way, the method of the embodiment of the present application takes into account the regularity of message traffic, obtains the last predicted message traffic and the first historical traffic characteristics, and uses these two to predict the target message traffic, thereby providing reasonable judgment for flow limitation or release of flow limitation in the future period, ensuring the stability of system traffic, and improving the throughput of the system.

[0093] It should be known that there is a certain ratio between the time period corresponding to the first historical traffic feature and the time period corresponding to the target message traffic, such as 720:1, that is, the first historical traffic feature is the traffic feature of 30 days (30*24 hours) before the current time, and the target message traffic is the traffic feature of the next hour.

[0094] It should also be known that, in this embodiment, the network device is a service end, such as a server.

[0095] In this embodiment, the traffic characteristics include but are not limited to central processing unit (CPU) occupancy, memory occupancy, network bandwidth occupancy and disk read / write rate. Optionally, CPU occupancy, memory occupancy or disk read / write rate is used as a device side characteristic, and network bandwidth occupancy is used as a network side characteristic.

[0096] In addition, optionally, in this embodiment, predicting the target message traffic according to the last predicted message traffic and the first historical traffic feature includes:

[0097] Inputting the last predicted message traffic and the first historical traffic feature into a prediction network;

[0098] The output of the prediction network is used as the target message flow.

[0099] That is, since the prediction network can understand the regularity of message traffic, in order to better predict message traffic, after the last predicted message traffic and the first historical traffic feature obtained in step 11 are input into the prediction network, the output of the prediction network is used as the target message traffic. For example, the last predicted message traffic and the historical traffic features of the previous 30 days are input into the prediction network, and the prediction network will output the message traffic in the next hour.

[0100] Optionally, before predicting the target message flow according to the last predicted message flow and the first historical flow feature, the method further includes:

[0101] Get training set and validation set;

[0102] The preset network is trained based on the training set and the validation set to obtain a pre-trained network, and the prediction network is determined based on the pre-trained network.

[0103] That is, a training set and a validation set are obtained by collecting data, and then a preset network is trained based on the training set and the validation set to obtain a pre-trained network, and a prediction network is determined based on the pre-trained network. In this way, the pre-trained network that has been trained can basically grasp the regularity of message traffic.

[0104] Among them, for the preset network, its input and output must be confirmed first. In this embodiment, considering that it is necessary to perform traffic prediction, the size of the message traffic is the output of the preset network. And the traffic characteristics that affect the message traffic need to be used as feature input. In this way, the implementation of the preset network is:

[0105]

[0106] O(x) represents the output at time t, that is, the message flow, which can also be understood as the number of messages processed per second (Transactions Per Second, TPS); ω is the weight matrix; x ti represents the traffic characteristics of network layer i at time t; h t-1 represents the output of the network at time t-1, which is the message flow predicted last time; b i represents the bias of network layer i; n is the number of network layers. Training the preset network, that is, determining the applicable ω and b i .

[0107] Optionally, in this embodiment, determining the prediction network according to the pre-trained network includes:

[0108] Using the pre-trained network as the prediction network;

[0109] or,

[0110] The pre-trained network is adjusted based on the second historical traffic feature of the target user, and the adjusted pre-trained network is used as the prediction network.

[0111] That is, on the one hand, the trained network is directly used as the prediction network. At this time, after training, the pre-trained network has understood the rules of message traffic and can predict message traffic.

[0112] On the other hand, considering the differences in message sending and consumption patterns of different users, the pre-trained network also needs to be adjusted for the target user based on its second historical traffic characteristics to learn the target user's message sending and receiving patterns, and use the adjusted pre-trained network as a prediction network, so as to achieve more accurate message traffic prediction and control. As an implementation method, the pre-trained network is deployed together with the message queue product. In the existing network, the second historical traffic characteristics of the target user and the last predicted message traffic of the target user are input into the pre-trained network, and then the pre-trained network is adjusted by the output results of the pre-trained network and the actual consumption traffic. In this way, the pre-trained network and the individual rules of the target user can be dynamically integrated, and accurate flow control of the target user can be achieved later.

[0113] Optionally, in this embodiment, the prediction network is a long short-term memory network.

[0114] Among them, due to the relatively simple traffic characteristics and the need for high concurrency and high throughput of the message queue, the LSTM network should adopt a relatively simple structure. As an implementation method, Figure 2 As shown, a single hidden layer is used.

[0115] Optionally, in this embodiment, obtaining a training set and a validation set includes:

[0116] Notify multiple virtual machines with different configurations to execute target tasks;

[0117] Collecting target data generated by the target task;

[0118] The data in the first time period of the target data is used as the training set, and the data in the second time period of the target data is used as the validation set.

[0119] Here, different virtual machine configurations are set in advance to obtain diverse target data. The virtual machine can adopt a one-master-one-slave setting, a two-master-one-slave setting, or a two-master-two-slave setting. As an implementation method, taking RocketMQ message queue as an example, the target task is RocketMQ service, and the virtual machine responds to the notification of executing the target task and starts RocketMQ service. In this way, the network device can collect target data and further obtain training set and verification set.

[0120] Among them, the virtual machine will simulate different traffic characteristics to generate experimental data, such as Figure 3 Shown (CPU usage), Figure 4 Shown (memory usage), Figure 5 As shown (disk read and write speed), Figure 6 As shown in (network bandwidth occupancy rate). In this way, the target data includes simulated traffic characteristics, the size of message traffic generated by different traffic characteristics, etc.

[0121] Of course, to ensure the effectiveness of training, a sufficient amount of data support is needed. Therefore, after collecting the target data, the least squares method can be used to fit the target data and generate more data to add to the training set and / or validation set.

[0122] In this embodiment, the data volume parameters of the training set and / or the validation set can be pre-set to obtain the required amount of data to meet the training requirements. For example, the data volume parameter is 60000 (6w), based on the four traffic characteristics, 4*6w training data are generated, and the time series disturbance data is added to simulate the data of the previous 32 days to obtain 32*4*6w data. Among them, 30*4*6w are used as the training set and 2*4*6w are used as the validation set.

[0123] Optionally, in this embodiment, the training of a preset network based on the training set and the validation set to obtain a pre-trained network includes:

[0124] Inputting the first data of the training set or the validation set into the preset network; wherein the first data includes a third historical traffic feature of a third time period;

[0125] If the mean square error loss between the result output by the preset network and the actual message flow corresponding to the first data is within a specific range, determining the pre-trained network;

[0126] If the mean square error loss between the result output by the preset network and the actual message traffic corresponding to the first data is not within the specific range, the first data is updated, and the updated first data is input into the preset network until the pre-trained network is determined; wherein, the time period corresponding to the fourth historical traffic feature in the updated first data partially overlaps with the third time period, and the starting time is after the starting time of the third time period.

[0127] That is, during the training process, the pre-trained network is trained based on the mean square error loss to predict the message traffic in the future period according to the historical traffic characteristics.

[0128] For example, during the training process, the traffic volume in the next hour can be predicted using the first 30 days, which is 720:1, where 720 is 30*24, that is, the output is calculated every hour for 30 days. Figure 7 As shown in the figure, the first round of calculation uses the CPU occupancy rate, memory occupancy rate, disk read / write rate, network bandwidth occupancy rate, and message flow data collected from 0h to 719h. The second round of calculation uses the attribute values ​​from 1h to 720h, and so on. In this process, data collection uses message flow data as guidance information, that is, message flow data is output data. In the process of training the entire network, it is used to adjust the weights and biases in the network.

[0129] Among them, the calculation of mean square error loss MSE is as follows:

[0130]

[0131] y i Represents the output of the preset model, o i Indicates the actual message traffic, and n is the number of output data.

[0132] As an implementation mode, for the training set and the validation set data, the specific ranges corresponding to the mean square error loss may be different, such as the specific range of the validation set is smaller than the specific range of the training set.

[0133] Specifically, the preset network training based on LSTM is as follows:

[0134] Step 1: Prepare training data, i.e. obtain training set and validation set;

[0135] Step 2: Normalize the training data to a range between [0, 1].

[0136] Step 3, input the training set data into the preset network based on LSTM;

[0137] Step 4: When the mean square error loss is within a specific range, use the validation set data to perform hyperparameter tuning, otherwise continue training.

[0138] Among them, the DROPOUT layer can also be used during the training process to prevent overfitting.

[0139] Moreover, if the training reaches the set number of epochs, the training ends. Even if the mean square error loss is not within a specific range, the validation set data needs to be used for hyperparameter tuning, otherwise the training continues. Through training, the output of the preset network can be close to the actual message flow, such as Figure 8 shown.

[0140] Optionally, in this embodiment, the limiting or releasing the limiting according to the target message flow includes:

[0141] comparing the target message flow rate with a specific flow rate threshold;

[0142] If the target message flow is greater than the specific flow threshold, flow limiting is performed;

[0143] If the target message flow is less than or equal to the specific flow threshold, the flow restriction is removed.

[0144] In this way, when the target message flow is greater than the specific flow threshold, flow limiting is performed, the request is discarded, and the pressure on the server is reduced through rapid failure, the server is protected, and the system throughput is improved. If the target message flow is less than or equal to the specific flow threshold and is currently in a flow limiting state, flow limiting is performed. In this way, even if the instantaneous flow is greater than the specific flow threshold, but the predicted message flow in the future time period continues to be lower than the specific flow threshold, there is no need to limit the flow.

[0145] Optionally, the first historical traffic feature, the second historical traffic feature, the third historical traffic feature or the fourth historical traffic feature includes:

[0146] Central processing unit CPU usage, memory usage, network bandwidth usage and disk read and write rates.

[0147] In this way, based on the correlation between message traffic and CPU occupancy, memory occupancy, network bandwidth occupancy and disk read / write rate, the causal relationship between message traffic and the above information can be learned, and the rules are general, so as to dig deeper into the factors of traffic changes. In addition, the influence of CPU occupancy, memory occupancy, network bandwidth occupancy and disk read / write rate on message traffic can be learned, so that the learning function can be used to limit and release the flow more reasonably.

[0148] In summary, the method of the embodiment of the present application can predict the message flow in the future time period, avoid the influence of instantaneous flow, make accurate judgments when the instantaneous flow is higher or lower than the threshold, and ensure the stability of the application system flow. Moreover, it can predict the message queue flow based on historical flow characteristics, learn the law of flow changes with the environment, and make more accurate predictions.

[0149] like Fig. 9 As shown, a message flow control device according to an embodiment of the present application includes:

[0150] A first acquisition module 91 is used to acquire the last predicted message traffic and the first historical traffic feature;

[0151] A first processing module 92, configured to predict a target message flow according to the last predicted message flow and the first historical flow characteristics;

[0152] The second processing module 93 is used to limit or release the flow according to the target message flow.

[0153] Optionally, the first processing module includes:

[0154] A first processing submodule, configured to input the last predicted message traffic and the first historical traffic feature into a prediction network;

[0155] The second processing submodule is used to use the output of the prediction network as the target message flow.

[0156] Optionally, the device further comprises:

[0157] The second acquisition module is used to obtain a training set and a validation set;

[0158] The training module is used to train the preset network based on the training set and the verification set to obtain a pre-trained network, and determine the prediction network based on the pre-trained network.

[0159] Optionally, the device further comprises:

[0160] A third processing module, configured to use the pre-trained network as the prediction network;

[0161] or,

[0162] The pre-trained network is adjusted based on the second historical traffic feature of the target user, and the adjusted pre-trained network is used as the prediction network.

[0163] Optionally, the first acquisition module is further used for:

[0164] Notify multiple virtual machines with different configurations to execute target tasks;

[0165] Collecting target data generated by the target task;

[0166] The data in the first time period of the target data is used as the training set, and the data in the second time period of the target data is used as the validation set.

[0167] Optionally, the training module is further used to:

[0168] Inputting the first data of the training set or the validation set into the preset network; wherein the first data includes a third historical traffic feature of a third time period;

[0169] If the mean square error loss between the result output by the preset network and the actual message flow corresponding to the first data is within a specific range, determining the pre-trained network;

[0170] If the mean square error loss between the result output by the preset network and the actual message traffic corresponding to the first data is not within the specific range, the first data is updated, and the updated first data is input into the preset network until the pre-trained network is determined; wherein, the time period corresponding to the fourth historical traffic feature in the updated first data partially overlaps with the third time period, and the starting time is after the starting time of the third time period.

[0171] Optionally, the first historical traffic feature, the second historical traffic feature, the third historical traffic feature or the fourth historical traffic feature all include:

[0172] Central processing unit CPU usage, memory usage, network bandwidth usage and disk read and write rates.

[0173] Optionally, the prediction network is a long short-term memory network.

[0174] It should be noted that the device applies the above-mentioned message flow control method, and the implementation method of the above-mentioned method embodiment is applicable to the device and can also achieve the same technical effect.

[0175] like Fig.10 As shown, a network device 1000 according to an embodiment of the present application includes a processor 1010, wherein the processor is configured to:

[0176] Obtain the last predicted message traffic and the first historical traffic characteristics;

[0177] Predicting target message traffic based on the last predicted message traffic and the first historical traffic feature;

[0178] The flow is limited or released according to the target message flow.

[0179] Optionally, the processor is further configured to:

[0180] Inputting the last predicted message traffic and the first historical traffic feature into a prediction network;

[0181] The output of the prediction network is used as the target message flow.

[0182] Optionally, the processor is further configured to:

[0183] Get training set and validation set;

[0184] The preset network is trained based on the training set and the validation set to obtain a pre-trained network, and the prediction network is determined based on the pre-trained network.

[0185] Optionally, the processor is further configured to:

[0186] Using the pre-trained network as the prediction network;

[0187] or,

[0188] The pre-trained network is adjusted based on the second historical traffic feature of the target user, and the adjusted pre-trained network is used as the prediction network.

[0189] Optionally, the processor is further configured to:

[0190] Notify multiple virtual machines with different configurations to execute target tasks;

[0191] Collecting target data generated by the target task;

[0192] The data in the first time period of the target data is used as the training set, and the data in the second time period of the target data is used as the validation set.

[0193] Optionally, the processor is further configured to:

[0194] Inputting the first data of the training set or the validation set into the preset network; wherein the first data includes a third historical traffic feature of a third time period;

[0195] If the mean square error loss between the result output by the preset network and the actual message flow corresponding to the first data is within a specific range, determining the pre-trained network;

[0196] If the mean square error loss between the result output by the preset network and the actual message traffic corresponding to the first data is not within the specific range, the first data is updated, and the updated first data is input into the preset network until the pre-trained network is determined; wherein, the time period corresponding to the fourth historical traffic feature in the updated first data partially overlaps with the third time period, and the starting time is after the starting time of the third time period.

[0197] Optionally, the first historical traffic feature, the second historical traffic feature, the third historical traffic feature or the fourth historical traffic feature all include:

[0198] Central processing unit CPU usage, memory usage, network bandwidth usage and disk read and write rates.

[0199] Optionally, the prediction network is a long short-term memory network.

[0200] The network device also includes a transceiver 1020 for receiving and sending data under the control of the processor 1010 .

[0201] A network device according to another embodiment of the present application, such as Fig.11As shown, it includes a transceiver 1110, a processor 1100, a memory 1120, and a program or instruction stored in the memory 1120 and executable on the processor 1100; when the processor 1100 executes the program or instruction, the above-mentioned message flow control method is implemented.

[0202] The transceiver 1110 is used to receive and send data under the control of the processor 1100 .

[0203] Among them, Fig.11 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1100 and memory represented by memory 1120. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1110 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 1100 is responsible for managing the bus architecture and general processing, and the memory 1120 may store data used by the processor 1100 when performing operations.

[0204] A readable storage medium of an embodiment of the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the message flow control method described above are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0205] The processor is a processor in the network device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0206] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0207] It should be further explained that many functional components described in this specification are referred to as modules in order to more particularly emphasize the independence of their implementation methods.

[0208] In the embodiment of the present application, module can be implemented with software so that it can be executed by various types of processors. For example, an executable code module of an identification can include one or more physical or logical blocks of computer instructions, for example, it can be constructed as an object, process or function. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different positions, and when these instructions are logically combined together, it constitutes a module and realizes the specified purpose of the module.

[0209] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed among different programs, and distributed across a plurality of memory devices. Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form. The operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.

[0210] When a module can be implemented by software, considering the level of existing hardware technology, a person skilled in the art can build a corresponding hardware circuit to implement the corresponding function of the module that can be implemented by software without considering the cost. The hardware circuit includes a conventional very large scale integration (VLSI) circuit or gate array and existing semiconductors such as logic chips, transistors, or other discrete components. The module can also be implemented by a programmable hardware device, such as a field programmable gate array, a programmable array logic, a programmable logic device, etc.

[0211] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present application. Therefore, the present application should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present application will be perfect and complete, and the scope of the present application will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "comprising" and / or "including" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values ​​includes the upper and lower limits of that range and any subranges therebetween.

[0212] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A message flow control method, characterized in that: Performed by network devices, including: Obtain the last predicted message traffic and the first historical traffic characteristics; Predicting target message traffic based on the last predicted message traffic and the first historical traffic feature; The flow is limited or released according to the target message flow.

2. The method according to claim 1, characterized in that The predicting target message traffic according to the last predicted message traffic and the first historical traffic feature includes: Inputting the last predicted message traffic and the first historical traffic feature into a prediction network; The output of the prediction network is used as the target message flow.

3. The method according to claim 2, characterized in that Before predicting the target message flow according to the last predicted message flow and the first historical flow feature, the method further includes: Get training set and validation set; The preset network is trained based on the training set and the validation set to obtain a pre-trained network, and the prediction network is determined based on the pre-trained network.

4. The method according to claim 3, characterized in that: The step of determining the prediction network according to the pre-trained network comprises: Using the pre-trained network as the prediction network; or, The pre-trained network is adjusted based on the second historical traffic feature of the target user, and the adjusted pre-trained network is used as the prediction network.

5. The method according to claim 3 or 4, characterized in that: The obtaining of the training set and the validation set comprises: Notify multiple virtual machines with different configurations to execute target tasks; Collecting target data generated by the target task; The data in the first time period of the target data is used as the training set, and the data in the second time period of the target data is used as the validation set.

6. The method according to claim 3 or 4, characterized in that: The step of training a preset network based on the training set and the verification set to obtain a pre-trained network includes: Inputting the first data of the training set or the validation set into the preset network; wherein the first data includes a third historical traffic feature of a third time period; If the mean square error loss between the result output by the preset network and the actual message flow corresponding to the first data is within a specific range, determining the pre-trained network; If the mean square error loss between the result output by the preset network and the actual message traffic corresponding to the first data is not within the specific range, the first data is updated, and the updated first data is input into the preset network until the pre-trained network is determined; wherein, the time period corresponding to the fourth historical traffic feature in the updated first data partially overlaps with the third time period, and the starting time is after the starting time of the third time period.

7. The method according to claim 6, characterized in that The first historical traffic feature, the second historical traffic feature, the third historical traffic feature or the fourth historical traffic feature all include: Central processing unit CPU usage, memory usage, network bandwidth usage and disk read and write rates.

8. The method according to claim 2, characterized in that: The prediction network is a long short-term memory network.

9. A message flow control device, characterized in that: include: A first acquisition module, used to acquire the last predicted message traffic and the first historical traffic feature; A first processing module, configured to predict a target message flow according to the last predicted message flow and the first historical flow characteristics; The second processing module is used to limit or release the flow according to the target message flow.

10. A network device, characterized in that: comprising a processor configured to: Obtain the last predicted message traffic and the first historical traffic characteristics; Predicting target message traffic based on the last predicted message traffic and the first historical traffic feature; The flow is limited or released according to the target message flow.

11. A network device comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; characterized in that the processor implements the message flow control method as described in any one of claims 1-8 when executing the program or instruction.

12. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by the processor, the steps in the message flow control method according to any one of claims 1 to 8 are implemented.

13. A computer program product, characterized in that It comprises computer instructions, which, when executed by a processor, implement the steps of the message flow control method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Training method and device for fault prediction neural network model

    CN112115024A

  • Load balancing method and device for heterogeneous network, equipment, storage medium and product

    CN118869605A

  • Methods, computing devices, and storage media for predicting traffic matrix

    US20210133569A1