Message flow control method, message flow control device and readable medium
By using the LSTM model in network devices to predict message traffic and adjust the acquisition cycle, the cache pressure problems caused by traffic jitter and bursts are solved, and the smooth control of traffic is achieved, and the stability of the network processor is improved.
Patent Information
- Application Number
- CN202310774727.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2025-01-03
AI Technical Summary
In network devices, jitter and bursts of traffic lead to an increase in cache pressure. How to smoothly remove jitter and bursts of traffic through message traffic control has become an urgent problem.
The long and short-term memory network (LSTM) model is used to predict the message traffic at the next moment and adjust the message acquisition period according to the prediction results, so as to achieve smooth traffic control and reduce the cache pressure when processing traffic in the later stage.
By accurately predicting message traffic and adjusting acquisition cycles, smooth control of the overall traffic is achieved, reducing the cache pressure of network equipment and improving the stability of network processors.
Smart Images

Figure CN119254697A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a message flow control method, a message flow control device and a readable medium. Background Art
[0002] Due to the increase in network users and the expansion of large-scale Internet platforms, as well as the demand for capacity expansion from a large and diverse network user group, the load from terminal network access equipment to bearer networks and core network switching and routing equipment is increasing. QoS protection is particularly important. It is a powerful means to ensure that the network lifeline remains in a stable and robust range, and traffic smoothing plays a key role in this.
[0003] Based on the above background, operators often use more extreme traffic models to test network equipment during centralized procurement testing. The most complex scenario is generally the speed-limited IMIX (Internet Mix Throughput) traffic model superimposed on Backone or Full Mesh. In this case, traffic jitter and bursts superimposed on complex networking scenarios will multiply the pressure on the network processor.
[0004] The network processor will continuously amplify the jitter and delay of the unsmoothed traffic due to the introduction of internal logic order preservation and the bursts introduced by external input traffic. The jitter and delay will become more obvious in the later stages of processing, which will increase the buffer pressure. Therefore, how to smooth out the jitter and burst of traffic through message flow control has become an urgent problem to be solved. Summary of the invention
[0005] The present disclosure provides a message flow control method, a message flow control device and a readable medium.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for controlling packet flow, the method comprising:
[0007] According to the first message flow at the current moment, a preset flow prediction model is used to predict the second message flow at the next moment; the flow prediction model is a long short-term memory network LSTM model, including N extended memory units, N is an integer greater than or equal to 1, and each of the extended memory units has a different update cycle, and each of the extended memory units is used to store the extended memory unit state value between adjacent moments according to its own update cycle; wherein, according to the first message flow at the current moment and the extended memory unit state value stored in each of the extended memory units, the second message flow is obtained through iterative calculation;
[0008] Determine a second message acquisition period at a next moment according to the second message flow;
[0009] At the next moment, the message is acquired according to the second message acquisition cycle.
[0010] On the other hand, an embodiment of the present disclosure also provides a message flow control device, comprising: one or more processors; a storage device, on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the message flow control method as described above; one or more I / O interfaces, connected between the processor and the storage device, configured to implement information interaction between the processor and the storage device.
[0011] On the other hand, an embodiment of the present disclosure further provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed, implements the message flow control method as described above.
[0012] The message flow control method provided by the embodiment of the present disclosure includes: according to the first message flow at the current moment, using a preset flow prediction model to predict the second message flow at the next moment; the flow prediction model is an LSTM model, including N extended memory units, each extended memory unit has a different update cycle, and each extended memory unit is used to store the extended memory unit state value between adjacent moments according to its own update cycle; wherein, according to the first message flow at the current moment and the extended memory unit state value stored in each extended memory unit, the second message flow is obtained through iterative calculation; according to the second message flow, the second message acquisition cycle at the next moment is determined, and the message is acquired according to the second message acquisition cycle at the next moment. The embodiment of the present disclosure uses a flow prediction model to accurately predict the size of the message flow, adjusts the message acquisition cycle based on the flow prediction result, realizes the overall flow smoothing control, and reduces the cache pressure when the later stage processes the flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of a flow chart of a message flow control method provided in an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of the structure of neurons in the LSTM neural network model provided in an embodiment of the present disclosure;
[0015] Figure 3 A schematic diagram of a process for determining a second message acquisition period according to a message transmission rate provided in an embodiment of the present disclosure;
[0016] Figure 4 A schematic diagram of a process for predicting the second message flow at the next moment provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0018] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0019] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0020] The embodiments described herein may be described with reference to plan views and / or cross-sectional views by means of idealized schematic diagrams of the present disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the accompanying drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the accompanying drawings have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.
[0021] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0022] The message flow control method and device according to the embodiment of the present disclosure are applicable to any network device with message flow control requirements. In one example, the message flow control method according to the embodiment of the present disclosure can be performed by such a network device, and the message flow control device according to the embodiment of the present disclosure can be included in the network device as a part of the network device.
[0023] The embodiment of the present disclosure proposes a method for controlling message flow. In the embodiment of the present disclosure, IMIX flow messages are used as an example for explanation. It should be noted that the embodiment of the present disclosure can also be applied to conventional random packet length scenarios of non-IMIX flow. Figure 1 As shown, the message flow control method includes the following steps:
[0024] Step S11, based on the first message flow at the current moment, a preset traffic prediction model is used to predict the second message flow at the next moment. The traffic prediction model is an LSTM model, including N extended memory units, N is an integer greater than or equal to 1, and each extended memory unit has a different update cycle, and each extended memory unit is used to store the extended memory unit state value between adjacent moments according to its own update cycle; wherein, based on the first message flow at the current moment and the extended memory unit state value stored in each extended memory unit, the second message flow is obtained through iterative calculation.
[0025] The traffic prediction model can be a neural network model. In the embodiment of the present disclosure, the LSTM (Long Short-Term Memory) model is used as an example for explanation. The traditional LSTM model includes one basic memory unit. Although it can solve the short-term memory of RNN to a certain extent, expand the structure of long-term memory storage, and ensure the retention of the correlation before and after long sequence prediction, for the traffic time series of large sample sets, there is still the problem of invalidation of the previous and next features due to the long dependency path. In order to solve the above problems, the embodiment of the present disclosure provides an LSTM model, which is combined with Figure 2 The neuron structure of the LSTM model of the embodiment of the present disclosure is described in detail. Figure 2 As shown, the LSTM model of the embodiment of the present disclosure includes (N+1) memory units, namely 1 basic memory unit and N extended memory units ( Figure 2 Only N extended memory units are shown, where N is an integer greater than or equal to 1. The N extended memory units are used to store extended memory unit state values obtained by iterative calculation between adjacent moments according to their respective update cycles.
[0026] The LSTM model of the embodiment of the present disclosure adds N extended memory units on the basis of the traditional LSTM model, and configures different update cycles for the N extended memory units respectively. Each of the N extended memory units stores the extended memory unit state value according to its own update cycle. It should be noted that the basic memory unit is not configured with an update cycle. The basic memory unit is used to store the extended memory unit state value in real time, that is, once the extended memory unit state value changes, the latest extended memory unit state value at the current moment is stored in the basic memory unit.
[0027] In this step, the first message flow at the current moment is used as the input of the traffic prediction model, and the traffic prediction model outputs the second message flow at the next moment. Among them, the interval between two adjacent moments is divided into multiple intermediate moments, and the features of each intermediate moment (i.e., the state value of the extended memory unit) are reinforced for learning, and the N extended units are used to update their respective extended memory unit state values according to their respective update cycles, so as to complete the acquisition of the maximum feature of the traffic arrangement on the IMIX input side and enhance the accuracy of traffic prediction on a long time scale.
[0028] It should be noted that the embodiment of the present disclosure uses time as the granularity and performs packet flow prediction for each time.
[0029] Step S12: determining a second message acquisition period at the next moment according to the second message flow.
[0030] The second message acquisition cycle represents the speed of acquiring messages from the cache at the next moment. In this step, the cycle for acquiring messages at the next moment (i.e., the geothermal message acquisition cycle) is determined based on the predicted message flow at the next moment (i.e., the second message flow).
[0031] Step S13, acquiring a message according to a second message acquisition cycle at the next moment.
[0032] When the next moment arrives, the message is obtained from the cache according to the second message acquisition cycle, that is, the data clock is controlled to collect the points of message fragments from the cache, so that the message always maintains a stable transmission rate during the transmission process. If the predicted second message flow is large, the corresponding second message acquisition cycle is also large, that is, the time interval for obtaining messages from the cache is longer, achieving the effect of smoothing the message flow.
[0033] The message flow control method provided by the embodiment of the present disclosure includes: according to the first message flow at the current moment, using a preset flow prediction model to predict the second message flow at the next moment; the flow prediction model is an LSTM model, including N extended memory units, each extended memory unit has a different update cycle, and each extended memory unit is used to store the extended memory unit state value between adjacent moments according to its own update cycle; wherein, according to the first message flow at the current moment and the extended memory unit state value stored in each extended memory unit, the second message flow is obtained through iterative calculation; according to the second message flow, the second message acquisition cycle at the next moment is determined, and the message is acquired according to the second message acquisition cycle at the next moment. The embodiment of the present disclosure uses a flow prediction model to accurately predict the size of the message flow, adjusts the message acquisition cycle based on the flow prediction result, realizes the overall flow smoothing control, and reduces the cache pressure when the later stage processes the flow.
[0034] The message traffic is not sent from the port to the network processor at a uniform rate on a time scale. At this time, a part of the messages can be selectively cached in advance based on traffic prediction, and then the jitter and burst of the traffic can be smoothed out by controlling the beat rate. Regardless of the peak or trough of the message transmission rate, this method can be used to adjust the message fragment transmission rate to ensure the stability of message transmission, which has a good buffering effect on the message traffic pressure of the subsequent stage.
[0035] In some embodiments, the step of determining the second message acquisition period at the next moment according to the second message flow (i.e., step S12) includes the following steps: calculating the message transmission rate at the next moment according to the second message flow, and determining the second message acquisition period at the next moment according to the message transmission rate. Exemplarily, the message transmission rate at the next moment can be obtained by calculating the ratio of the second message flow to the time difference between two adjacent moments.
[0036] In the embodiments of the present disclosure, the message acquisition period can be configured according to the message transmission rate based on the "segmentation principle". A plurality of continuous rate intervals are divided within a rate range less than the port transmission rate, and each rate interval is configured with a corresponding message acquisition period, which is the average slice arrangement period and also the slice time slot allocation period. The larger the transmission rate of the rate interval, the smaller the corresponding message acquisition period. In some embodiments, the number of rate intervals is preferably 10.
[0037] In some embodiments, Figure 3 As shown, the method of determining the second message acquisition period at the next moment according to the message transmission rate includes the following steps:
[0038] Step S21, determining a target rate interval that matches the message transmission rate.
[0039] In this step, the target rate interval for message transmission rate matching can be determined by judging whether the message transmission rate hits each divided message acquisition period. The rate interval hit by the message transmission rate is the target rate interval, and the target rate interval is one of the rate intervals. Hitting the rate interval means that the message transmission rate falls within the range of the rate interval.
[0040] Step S22: determine the message acquisition period corresponding to the target rate interval as the second message acquisition period at the next moment.
[0041] Since multiple continuous rate intervals have been pre-divided in the range of 0 to the port transmission rate, and different message acquisition periods have been configured for each rate interval, that is, a mapping relationship between the rate interval and the message acquisition period has been established, therefore, in this step, the message acquisition period corresponding to the target rate interval can be determined according to the mapping relationship, and the message acquisition period is the second message acquisition period at the next moment.
[0042] The port transmission rate reflects the size of the message flow, so the rate interval actually corresponds to the flow interval. Allocating different message acquisition cycles to each rate interval is actually allocating different message acquisition cycles to different message flow intervals. After predicting the second message flow at the next moment, the message transmission rate at the next moment is used to determine the interval in which the message transmission rate at the next moment is distributed, thereby obtaining the second message acquisition cycle corresponding to the predicted flow at the next moment. In this way, messages can be taken from the cache for slicing and beating according to the second message acquisition cycle.
[0043] In some embodiments, the determination of the target rate interval that matches the message transmission rate (i.e., step S21) includes the following steps: when the message transmission rate is less than the port transmission rate, determining the rate interval that matches the message transmission rate as the target rate interval; when the message transmission rate is greater than or equal to the port transmission rate, determining the maximum rate interval as the target rate interval. In other words, if the predicted message transmission rate does not exceed the port transmission rate, the predicted message transmission rate is matched with each rate interval, and the rate interval that matches the message transmission rate and the message acquisition period corresponding to the rate interval are found, and the message acquisition period is the second message acquisition period; if the predicted message transmission rate exceeds the port transmission rate, the message acquisition period corresponding to the maximum rate interval is used as the second message acquisition period.
[0044] The message acquisition period configured for each rate interval is determined by the system main frequency and the number of extended memory units in the LSTM model. In some embodiments, the difference between two message acquisition periods corresponding to two adjacent rate intervals is the ratio of N to the system main frequency.
[0045] like Figure 2 As shown in the figure, the neurons of the LSTM model include three gate logics: INPUT, OUTPUT, and FORGET.
[0046] The logic of the FORGET gate is implemented as follows:
[0047] f t =σ(W f `[h t-1 ,x t ]+b f) (1)
[0048] Output of FORGET gate = f t *C t-1 (2)
[0049] Among them, x t is the first message flow at the current moment, h t-1 is the output value of the hidden layer neuron at the previous moment, W f is the feature weight of the FORGET gate, b f is the bias of the FORGET gate, C t-1 is the state value of the extended memory unit at the previous moment.
[0050] The INPUT logic gate defines what necessary information the neuron needs to store. First, a filter similar to the FORGET gate logic is constructed to obtain the retained information, then a temporary state value is constructed, and then the current state value C is updated according to the output of the FORGET gate. t , output to the OUTPUT gate. The INPUT gate logic is implemented as follows:
[0051] i t =σ(W t ·[h t-1 ,x t ]+b i ) (3)
[0052]
[0053]
[0054] Among them, i t is the information after filtering, W i is the feature weight of the INPUT gate, b i is the bias of the INPUT gate, W c is the weight of the memory candidate unit, b c is the bias of the memory candidate unit, is the temporary state value of the extended memory unit at the current moment, C t It is the state value of the extended memory unit at the current moment.
[0055] The OUTPUT gate logic determines the final output content of the neuron, using o t To represent, the output result h t Combined with the current state (C t ) and the state at the previous moment (C t-1 ) and the reserved part of the current input (o t). The OUTPUT gate logic is implemented as shown in the following formulas (6) and (7):
[0056] o t =σ(W o ·[h t-1 ,x t ]+b o ) (6)
[0057] h t =o t *tanh(C t ) (7)
[0058] Among them, W o is the feature weight of the OUTPUT gate, b o is the bias of the OUTPUT gate, h t is the output value of the hidden layer neural unit at the current moment.
[0059] In the traditional LSTM model, the neuron responds to the first message flow x at the current moment. t , the output value of the hidden layer neuron at the previous moment h t-1 , the state value C of the extended memory unit at the previous moment t-1 After one operation of the three gate logics of INPUT, OUTPUT and FORGET, the output value h of the hidden layer neuron at the current moment can be obtained. t and the current state value of the extended memory unit C t .
[0060] The LSTM model of the disclosed embodiment adds N extended memory units, and calculates the output value h of the hidden layer neuron at the current moment. t and the current state value of the extended memory unit C t In the process of , it is necessary to calculate according to the extended memory unit state values stored in the N extended memory units. Therefore, in some embodiments, Figure 4 As shown, the method of predicting the second message flow at the next moment (i.e., step S11) based on the first message flow at the current moment by using a preset flow prediction model includes the following steps:
[0061] Step S41, using the traffic prediction model, calculates the hidden layer neuron output value at the current moment according to the first message traffic at the current moment, the extended memory unit state value at the previous moment, and the hidden layer neuron output value at the previous moment.
[0062] Combination Figure 2 As shown, the first message flow at the current moment (x t ) Input LSTM model, LSTM model according to the first message flow x at the current moment t, the state value C of the extended memory unit at the previous moment t-1 and the output value h of the hidden layer neuron at the previous moment t-1 , calculate the hidden layer neuron output value h at the current moment t . The memory unit state value stored in each memory unit includes the extended memory unit state value stored in the N extended memory units and the extended memory unit state value stored in the basic memory unit at the current moment. Exemplarily, the extended memory unit state value may include the extended memory unit state value C obtained by (t-n1) iterations. t-n1 , the extended memory unit state value C obtained by (t-n2) iterations t-n2 , …, (t-1) times iterative calculation of the extended memory unit state value C t-1 .
[0063] In this step, the LSTM model calculates the output value h of the hidden layer neuron at the current moment through an iterative algorithm based on the above three gate logics of INPUT, OUTPUT and FORGET t .
[0064] Step S42, calculating the second message flow at the next moment according to the output value of the hidden layer neuron at the current moment.
[0065] The second message flow at the next moment can be calculated according to the following formula (8):
[0066] y t+1 =softmax(w h ·h t +b h ) (8)
[0067] Among them, W h is the feature weight of the hidden layer, b h is the bias of the hidden layer, h t is the output value of the hidden layer neuron at the current moment, y t+1 To predict the second message flow at the next moment, Softmax represents a normalization operation.
[0068] In some embodiments, the use of the traffic prediction model to calculate the hidden layer neuron output value at the current moment (i.e., step S41) according to the first message traffic at the current moment, the extended memory unit state value at the previous moment, and the hidden layer neuron output value at the previous moment includes the following steps:
[0069] Step S411, using the traffic prediction model, calculates the first message traffic (Xt) at the current moment, the extended memory unit state value (C t-1 ) and the output value of the hidden layer neurons at the previous moment (h t-1), after (N+1) iterations, the current extended memory unit state value (C t ).
[0070] The above formulas (1)-(7) can be used to perform (N+1) iterations to obtain the current extended memory unit state value C t .
[0071] Step S412, based on the current extended memory unit state value (C t ) Calculate the output value h of the hidden layer neuron at the current moment t .
[0072] After calculating the current extended memory unit state value C t Then, using the above formulas (5), (6), and (7), the output value h of the hidden layer neuron at the current moment is calculated. t .
[0073] The number N of extended memory units can be 20-30, and the number of extended memory units can be configured according to the upper limit. Of course, it can also be configured according to actual needs. In some embodiments, N is the number of message length types in the message for flow control. Usually, the length of the transmitted message is several fixed lengths. In the embodiment of the present disclosure, the message length type refers to the type of fixed length of the message. There are several message lengths, and N is configured to the number accordingly.
[0074] In some embodiments, the update period of the N extended memory units is the period corresponding to the first N larger packet length change flip rates within a preset time length. The packet length change flip rate refers to the number of times the packet length changes without repetition within the preset time length. Within the preset time length, the packet length of the transmitted message is recorded in chronological order, and the number of times the packet length changes within different intervals (i.e., periods) is counted to obtain the packet length change flip rate. The packet length change flip rates are sorted from large to small to obtain a packet length change flip rate sequence. The first N packet length change flip rates in the packet length change flip rate sequence are selected to determine the period corresponding to the N packet length change flip rates. The determined N periods are respectively configured in the N extended memory units as the update period of the N extended memory units.
[0075] The incoming message traffic is used as the training sample set of the traffic prediction model. The data at time t-1 is forward operated to obtain the traffic prediction value. The incoming message traffic at time t is used as the result to reversely iterate and update the feature weight matrix and bias of the neural network model. Configure the convergence function, use the convergence function to derive the feature weight matrix and bias, obtain the gradient value, and use the gradient value and the preset step value to calculate the updated feature weight matrix and bias. When the convergence function converges, stop backpropagation to update the feature weight matrix and bias, and obtain the final feature weight matrix W and bias b, thereby obtaining the trained traffic prediction model.
[0076] The disclosed embodiment expands the number of memory units on the basis of the traditional LSTM model, and the maximum configurable number of the extended memory units can be determined according to the number of IMIX traffic message length types. That is to say, in addition to the basic memory units of the traditional LSTM model, the disclosed embodiment adds additional extended memory units with configurable numbers and configurable update cycles, and the update cycles of each extended memory unit are different. The extended memory unit can update the extended memory unit state value stored in the extended memory unit according to the configured update cycle. Compared with the traditional LSTM model, the input of the LSTM neuron of the LSTM model of the disclosed embodiment at time t is changed from the original input x t ,h t-1 , c t-1 becomes x t , c t-n1 , c t-n2 , ..., c t-1 ,h t-1 , the number of forward operations performed by the neuron also becomes (N+1) times, that is, the operation of each neuron is expanded from the original one operation to multiple operations, and the result of each operation (the state value of each extended memory unit) will be recorded in the extended memory unit as a retention point for iterative operations, and each extended memory unit will update data according to its own update cycle.
[0077] The disclosed embodiment can divide the IMIX traffic prediction model into multiple intermediate moments between two adjacent moments, perform reinforcement learning on the features of each intermediate moment, complete the maximization of the features of the traffic arrangement on the IMIX input side, and enhance the accuracy of traffic prediction on a long time scale.
[0078] The disclosed embodiments can be applied to high-end routers and switches to which network processor chips belong, and can perform step-by-step smoothing of internal processing traffic. For all logical points that may introduce bursts, especially at the inbound interfaces of routers and switches and the sequence-preserving exits of programmable parts, traffic prediction can be performed on messages based on packet length to smooth the inbound traffic of subsequent processing modules.
[0079] Traditional LSTM models are generally used to predict speech and text sequences, and they can handle input data of up to a hundred or so orders of magnitude, but are incapable of processing data of more than a thousand orders of magnitude. The disclosed embodiment is based on the characteristics of the IMIX traffic prediction model, adjusts the input method of the memory unit in the LSTM model, introduces a configurable extended memory unit, and divides the time between two adjacent moments into multiple intermediate moments. Each intermediate moment calculates the corresponding extended memory unit state value, thereby solving the problem of large data volume and long feature dependency between data in the traffic prediction model sequence. In addition, based on the improved LSTM model, the prediction of traffic size is realized, and the QOS strategy and smoothing behavior are adjusted based on the traffic prediction results to achieve the effect of traffic smoothing.
[0080] An embodiment of the present disclosure also provides a message flow control device, which includes: one or more processors, a storage device and one or more I / O interfaces; wherein, one or more programs are stored on the storage device, and when the one or more programs are executed by the one or more processors, the one or more processors implement the message flow control method provided in the aforementioned embodiments; the I / O interface is connected between the processor and the storage device, and is configured to implement information interaction between the processor and the storage device.
[0081] Among them, the processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the storage device is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the storage device, and can realize information exchange between the processor and the storage device, including but not limited to a data bus (Bus), etc.
[0082] The embodiments of the present disclosure further provide a computer-readable medium on which a computer program is stored, wherein when the computer program is executed, the message flow control method provided in the aforementioned embodiments is implemented.
[0083] It will be appreciated by those skilled in the art that all or some of the steps in the method disclosed above, the functional modules / units in the device may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0084] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A message flow control method, characterized in that: The method comprises: According to the first message flow at the current moment, a preset flow prediction model is used to predict the second message flow at the next moment; the flow prediction model is a long short-term memory network LSTM model, including N extended memory units, N is an integer greater than or equal to 1, and each of the extended memory units has a different update cycle, and each of the extended memory units is used to store the extended memory unit state value between adjacent moments according to its own update cycle; wherein, according to the first message flow at the current moment and the extended memory unit state value stored in each of the extended memory units, the second message flow is obtained through iterative calculation; Determine a second message acquisition period at a next moment according to the second message flow; At the next moment, the message is acquired according to the second message acquisition cycle.
2. The method according to claim 1, characterized in that The determining, according to the second message flow, a second message acquisition period at a next moment includes: Calculating a message transmission rate at a next moment according to the second message flow; A second message acquisition period at the next moment is determined according to the message transmission rate.
3. The method according to claim 2, characterized in that The determining a second message acquisition period at the next moment according to the message transmission rate includes: Determine a target rate interval that matches the message transmission rate; wherein a plurality of continuous rate intervals are divided within a rate range that is less than the port transmission rate, each of the rate intervals is configured with a corresponding message acquisition period, and the target rate interval is one of the rate intervals; Determine the message acquisition period corresponding to the target rate interval as the second message acquisition period at the next moment.
4. The method according to claim 3, characterized in that The determining a target rate interval matching the message transmission rate includes: When the message transmission rate is lower than the port transmission rate, determining a rate interval matching the message transmission rate as the target rate interval; When the message transmission rate is greater than or equal to the port transmission rate, a maximum rate interval is determined as the target rate interval.
5. The method according to claim 3, characterized in that The difference between two message acquisition periods corresponding to two adjacent rate intervals is the ratio of the system main frequency to N.
6. The method according to claim 1, characterized in that The method of predicting the second message flow at the next moment by using a preset flow prediction model according to the first message flow at the current moment includes: Utilizing the traffic prediction model, according to the first message traffic at the current moment, the extended memory unit state value at the previous moment, and the hidden layer neuron output value at the previous moment, calculating the hidden layer neuron output value at the current moment; The second message flow at the next moment is calculated according to the hidden layer neuron output value at the current moment.
7. The method according to claim 6, characterized in that The method of using the traffic prediction model to calculate the hidden layer neuron output value at the current moment according to the first message traffic at the current moment, the extended memory unit state value at the previous moment, and the hidden layer neuron output value at the previous moment includes: By using the traffic prediction model, the first message traffic at the current moment, the state value of the extended memory unit at the previous moment, and the output value of the hidden layer neuron at the previous moment are calculated after (N+1) iterations to obtain the state value of the extended memory unit at the current moment; The output value of the hidden layer neuron at the current moment is calculated according to the state value of the extended memory unit at the current moment.
8. The method according to claim 1, characterized in that N is the number of message length types in the message for flow control.
9. The method according to claim 1, characterized in that The update period of the extended memory unit is the period corresponding to the first N larger packet length change flip rates within a preset time period.
10. A message flow control device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the message flow control according to any one of claims 1 to 9; One or more I / O interfaces are connected between the processor and the storage device and are configured to implement information interaction between the processor and the storage device.
11. A computer readable medium having a computer program stored thereon, wherein: When the program is executed, the message flow control method as described in any one of claims 1-9 is implemented.
