Protocol message uploading rate control method and electronic device
By constructing and refining the feature matrix and combining it with a deep learning model, the uploading rate of protocol messages is dynamically adjusted, solving the problem of inflexible protocol message control in existing technologies and improving processor resource utilization and network device stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2026-01-29
- Publication Date
- 2026-04-17
AI Technical Summary
In the existing technology, the method for controlling the uploading rate of protocol messages cannot be flexibly and accurately controlled, resulting in insufficient or overloaded processor resources, which affects the stable operation of network devices.
By constructing an initial feature matrix, normalizing it, and correcting it based on processor utilization, the input is used to a pre-trained deep learning model to generate control vectors, calculate the target uploading rate, and dynamically adjust the uploading rate of protocol messages.
It enables real-time, accurate, and differentiated control of protocol messages, improves processor resource utilization, and ensures the stability and performance of network devices.
Smart Images

Figure CN121644004B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to a method for controlling the uploading rate of protocol messages and an electronic device. Background Technology
[0002] In network devices, the processor, as the core of the control plane, is responsible for processing various protocol messages. These messages are crucial for routing calculations, topology maintenance, and network management, and need to be promptly sent to the processor for processing. However, continuously sending messages to the processor at a high rate can affect the stable operation of the network device. On the other hand, excessively restricting the sending of protocol messages will prevent the full utilization of processing resources. Therefore, controlling the sending rate of protocol messages is crucial for network devices.
[0003] In related technologies, the rate limiting mechanism based on a fixed threshold is generally used to control the upload rate of protocol messages. However, the control methods in these technologies cannot flexibly control the upload rate of protocol messages. Therefore, how to flexibly and accurately control the upload rate of protocol messages in order to make full use of processor resources is an urgent problem to be solved. Summary of the Invention
[0004] This application provides a method and electronic device for controlling the upload rate of protocol messages, so as to at least solve the problem in the related art of how to flexibly and accurately control the upload rate of protocol messages in order to make full use of processor resources.
[0005] This application provides a method for controlling the uplink rate of protocol messages, including:
[0006] Based on the various message data corresponding to various protocols within multiple consecutive historical periods prior to the current period, an initial feature matrix is constructed, and the initial feature matrix is normalized to obtain a normalized feature matrix.
[0007] In response to the processor's current utilization rate being greater than a preset utilization rate threshold in the current cycle, the normalized feature matrix is corrected based on the current utilization rate to obtain the corrected feature matrix;
[0008] The modified feature matrix is input into a pre-trained deep learning model for data processing to obtain a control vector, where each element of the control vector indicates the uplink rate ratio corresponding to each of the various protocol messages.
[0009] Data calculations are performed based on the control vector and the preset rate vector to obtain the target upload rate for each of the various protocol messages in the current period. Each element of the preset rate vector indicates the highest upload rate for each of the various protocol messages.
[0010] This application also provides a protocol message uplink rate control device, including:
[0011] The construction unit is used to construct an initial feature matrix based on the various message data corresponding to various protocol messages in multiple consecutive historical periods before the current period.
[0012] The processing unit is used to normalize the initial feature matrix to obtain a normalized feature matrix;
[0013] The correction unit is used to correct the normalized feature matrix according to the current utilization rate of the processor in the current cycle when the current utilization rate is greater than a preset utilization rate threshold, so as to obtain the corrected feature matrix.
[0014] The input unit is used to input the modified feature matrix into a pre-trained deep learning model for data processing to obtain a control vector, wherein each element of the control vector indicates the uplink rate ratio corresponding to each of the various protocol messages.
[0015] The calculation unit is used to perform data calculations based on the control vector and the preset rate vector to obtain the target uploading rate corresponding to each of the various protocol messages in the current period. Each element of the preset rate vector indicates the highest uploading rate corresponding to each of the various protocol messages.
[0016] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the above-described protocol message uplink rate control method.
[0017] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the above-described protocol message uplink rate control method.
[0018] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described protocol message uplink rate control method.
[0019] This application discloses a method and electronic device for controlling the upload rate of protocol messages. It constructs a feature matrix by collecting feature data of various protocol messages within a historical period and normalizing it to form a comprehensive and standardized feature representation of message status. The normalized feature matrix is dynamically corrected based on the current processor utilization, ensuring the data fully reflects the real-time load status. The corrected feature matrix is then input into a deep learning model for analysis, outputting a control vector reflecting the optimal rate ratio for various protocol messages. Finally, the target upload rate for each type of message is determined based on this control vector and a preset maximum rate. This method can control the upload rate of different protocol messages in real-time, accurately, and differentiatedly according to the actual processor load and message data characteristics, thereby significantly improving resource utilization efficiency and the overall performance of the control plane while fully ensuring processor stability. Therefore, it solves the problem of how to flexibly and accurately control the upload rate of protocol messages to fully utilize processor resources, achieving the effect of improving the processing efficiency, response speed, and overall operational stability of the network device control plane. Attached Figure Description
[0020] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a protocol message uplink rate control method provided in an embodiment of this application;
[0022] Figure 2 A schematic diagram of an initial feature matrix provided in an embodiment of this application;
[0023] Figure 3 A control flowchart for protocol message rate is provided for an embodiment of this application;
[0024] Figure 4 A schematic diagram of the structure of a protocol message uplink rate control device provided in an embodiment of this application;
[0025] Figure 5 A schematic diagram of another protocol message uploading rate control device provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0027] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0028] This application discloses a method for controlling the uploading rate of protocol messages, which is mainly used to dynamically manage the uploading rate of various protocol messages to the central processing unit (CPU) in network devices such as switches and routers. This enables the rational use of processor resources, avoids processor overload or idleness due to improper message uploading rate, and ensures the stable operation of various management functions of the switch control plane.
[0029] Protocol messages refer to specific types of data packets used in a network to control, manage, and maintain network functions. Examples include routing protocol messages (such as Open Shortest Path First (OSPF) and Border Gateway Protocol (BGP)), Layer 2 protocol messages (such as Spanning Tree Protocol (STP) and Link Aggregation Control Protocol (LACP)), and management and maintenance messages (such as Internet Control Message Protocol (ICMP) and Address Resolution Protocol (ARP)). These messages need to be sent to the processor's control plane for processing to ensure normal network operation and state updates. Upload rate control refers to dynamically adjusting the rate at which these protocol messages are sent to the processor through a series of calculations and adjustments, thereby avoiding processor overload or resource idleness.
[0030] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] Figure 1 This document provides a flowchart illustrating a protocol message uploading rate control method as an embodiment of this application. The method is described in detail below, taking into account the execution flow of the protocol message uploading rate control method.
[0032] Step 101: Based on the various message data corresponding to various protocol messages in multiple consecutive historical periods before the current period, construct an initial feature matrix and normalize the initial feature matrix to obtain a normalized feature matrix.
[0033] In the embodiments of this application, the current period refers to a preset time interval used to periodically perform rate control calculations, such as one period per millisecond or second. Multiple consecutive historical periods represent several consecutive time intervals preceding the current period; these historical periods are used to provide dynamic trend data of protocol messages. Multiple protocol messages refer to different types of protocol messages that need to be processed in the network device, such as STP, LACP, and Link Layer Discovery Protocol (LLDP), each with unique characteristics and processing requirements. Multiple message data includes, but is not limited to, attributes such as average packet length, transmission rate, rate growth trend, transmission duration, buffer occupancy, and message priority; this multiple message data reflects the traffic characteristics and resource consumption of the protocol messages.
[0034] The initial feature matrix is a multi-dimensional data structure, with rows corresponding to different protocol message types, columns corresponding to various message data attributes, and depth corresponding to multiple historical periods, thus forming a data set that comprehensively describes the historical state of protocol messages.
[0035] Normalization refers to converting the data in the initial feature matrix into values of a uniform scale. For example, by dividing by a preset maximum value, the data is mapped to the range [0, 1] to eliminate dimensional differences between different attributes and improve the accuracy and stability of subsequent data processing. The normalized feature matrix is the feature matrix after normalization, and its data has comparability and consistency, facilitating model calculation and analysis.
[0036] Step 102: In response to the processor's current utilization rate being greater than a preset utilization rate threshold in the current cycle, the normalized feature matrix is corrected based on the current utilization rate to obtain a corrected feature matrix.
[0037] In the embodiments of this application, the processor typically refers to the central processing unit (CPU) in a network device, which is responsible for handling control plane tasks, such as protocol calculation and state maintenance.
[0038] Current utilization represents the percentage of processor resources used in the current cycle, reflecting the processor's real-time workload. A preset utilization threshold is a pre-defined critical value, such as 50%, used to determine if the processor is under high load. If the current utilization exceeds this threshold, a data correction mechanism is triggered.
[0039] Data correction refers to scaling or adjusting specific attributes in the normalized feature matrix based on the current utilization rate to simulate the impact of protocol messages on the processor under high load. For example, increasing the values of attributes such as packet length and transmission rate through mathematical functions (such as logarithmic functions) can more accurately reflect processor stress. The corrected feature matrix is the feature matrix after data correction, which contains the dynamic impact of processor utilization on protocol message characteristics, enabling subsequent models to respond more intelligently to changes in processor state.
[0040] Step 103: Input the corrected feature matrix into the pre-trained deep learning model for data processing to obtain the control vector, where each element of the control vector indicates the uplink rate ratio corresponding to each of the various protocol messages.
[0041] In the embodiments of this application, the pre-trained deep learning model refers to a deep learning model trained using a large amount of historical message data, processor utilization data, and corresponding message upload rate adjustment data before the actual application of protocol message upload rate control. The core of the training process is to enable the model to learn the correlation between message data, processor utilization, and reasonable message upload rate, ensuring that the model can output processing results that meet actual needs when receiving input data such as the correction feature matrix. The structural design of this deep learning model will comprehensively consider computational efficiency and control accuracy, avoiding excessive computation time due to too many model layers and overly complex parameters, thereby ensuring that data processing and output results can be completed within a current cycle, meeting the real-time requirements of message upload rate adjustment.
[0042] Data processing refers to the process by which a pre-trained deep learning model, after receiving the modified feature matrix, analyzes, calculates, and maps the data in the modified feature matrix according to the algorithm logic within the model and the rules learned during the training process. This process fully utilizes the model's learning results on the relationship between message data and transmission rate, and transforms the message status information and processor status information contained in the modified feature matrix into intermediate results that can be directly used to determine the message transmission rate.
[0043] The control vector is a multi-dimensional vector with the same number of protocol message types as its dimensions. Each element has a value between 0 and 1, representing the recommended upload rate percentage for the corresponding protocol message type within the current period. For example, 0.5 indicates a recommendation to upload at half the maximum rate. The upload rate percentage refers to the ratio of the actual allowed upload rate to the maximum allowed rate, used to achieve fine-grained rate control.
[0044] Step 104: Perform data calculation based on the control vector and the preset rate vector to obtain the target uploading rate corresponding to each of the various protocol messages in the current period. Each element of the preset rate vector indicates the highest uploading rate corresponding to each of the various protocol messages.
[0045] In the embodiments of this application, the preset rate vector is a vector structure pre-defined based on factors such as the hardware performance of the switch, the maximum processing capability of the processor, the importance of different protocol packets, and processing requirements. The dimension of this vector is consistent with the dimension of the control vector, that is, it corresponds to the number of types of various protocol packets. Its function is to set an upper limit for the upload rate of each protocol packet, so as to avoid the upload rate of a single protocol packet being too high and occupying too much processor resources, affecting the processing of other important protocol packets. Each element corresponds to the maximum allowed upload rate of a protocol packet type, for example: 4000 packets / second for STP packets, 8000 packets / second for LLDP packets, etc.
[0046] The maximum upload rate refers to the value indicated by each element in the preset rate vector. This value represents the maximum rate at which the corresponding protocol message can be uploaded to the processor under normal switch operation. Its setting needs to take into account a variety of factors. For example, for protocol messages that perform critical routing calculations, the maximum upload rate may be set relatively high to ensure that routing information can be updated in a timely manner; while for some non-critical maintenance messages, the maximum upload rate may be set relatively low to avoid consuming too many unnecessary processor resources.
[0047] Data calculation refers to the process of coordinating the control vector and the preset rate vector according to the preset calculation rules. The core of this calculation process is to correlate the proportion of the uploading rate represented by each element in the control vector with the highest uploading rate represented by the corresponding element in the preset rate vector, thereby converting the proportional relationship into a specific rate value, ensuring that the calculated rate meets the requirements of the uploading rate proportion and does not exceed the limit of the highest uploading rate.
[0048] The target upload rate is the actual control value obtained by multiplying the control vector element by element with the preset rate vector. It directly determines the specific rate at which each protocol message is allowed to be uploaded to the processor in the current cycle, thereby achieving precise and dynamic management of the protocol message stream.
[0049] This application achieves adaptive and intelligent control of the upload rate by combining historical protocol message data, real-time processor utilization, and a deep learning model. Compared with traditional static threshold methods, this application can respond more accurately to changes in network status and differentiate the processing of different protocol messages, thereby effectively improving processor resource utilization, preventing processor overload, and enhancing the stability and reliability of network devices. Furthermore, due to the application of the deep learning model, this application possesses excellent generalization and learning capabilities, enabling it to adapt to complex and ever-changing network environments.
[0050] This application constructs an initial feature matrix by collecting diverse data from various protocol messages across multiple consecutive historical periods and normalizing it to form a feature base capable of comprehensively and systematically representing network traffic status. In response to processor utilization exceeding a preset threshold, the normalized feature matrix is dynamically and specifically corrected, ensuring the feature data accurately reflects the processor's current load pressure in real time. Subsequently, the corrected feature matrix, rich in dynamic load information, is input into a pre-trained deep learning model for intelligent analysis. This model delves into the complex nonlinear relationships between different protocol messages and processor status, outputting a control vector that precisely indicates the optimal upload rate ratio for each type of protocol message. Finally, by combining the control vector with a preset maximum upload rate vector for each type of message, a target upload rate is dynamically determined for each protocol message that maximizes processor resource utilization while ensuring stable processor operation within the current period.
[0051] In one possible implementation of this application embodiment, the initial feature matrix can be constructed in the following manner, but is not limited to: averaging the first message data corresponding to various unknown type messages within multiple consecutive historical periods according to the number of unknown types in the various unknown type messages, to obtain multiple average message data representing the characteristics of the various unknown type messages; constructing the initial feature matrix based on the multiple second message data corresponding to various known type messages within multiple consecutive historical periods, and the multiple average message data; wherein, the various protocol messages include various unknown type messages and various known type messages, and the multiple matrix data of the initial feature matrix respectively correspond to the various second message data and the various average message data.
[0052] In the embodiments of this application, the purpose of constructing the initial feature matrix is to systematically organize and characterize the state of different protocol messages over multiple historical periods. Unknown type messages refer to messages detected in network traffic but not pre-classified into a specific known protocol type. These unknown type messages may correspond to new network protocols, proprietary protocols, or temporarily unidentifiable communication traffic. In contrast, known type messages refer to protocol messages that have been clearly identified and defined, such as common network protocol messages like STP, LACP, and LLDP. In real-world network environments, the simultaneous existence of known and unknown type messages is a common phenomenon; therefore, it is crucial to handle both uniformly and reasonably when constructing the feature matrix.
[0053] To effectively characterize unknown message types, we first aggregate the first message data corresponding to various unknown message types across multiple consecutive historical periods. These multiple first message data refer to characteristic attributes collected from unknown message types, such as average packet length, transmission rate, rate increase, and transmission duration. Since unknown message types may contain multiple different subtypes, processing them individually would lead to a sharp expansion of feature dimensions and data sparsity. Therefore, we need to use an averaging method to integrate them.
[0054] Specifically, the average calculation is performed based on the number of unknown types in various unknown message types. The number of unknown types can refer to the number of different unknown protocol message types observed, or more simply, it refers to the set of all messages not marked as known types. By performing an average calculation, that is, taking the arithmetic mean of the same type of characteristic data (such as the average packet length of all unknown messages) of all unknown message types, a set of representative average message data is obtained. The average message data, as a whole, characterizes the typical behavioral features of the unknown message type group, such as average packet length, average transmission rate, and average rate growth. This avoids creating separate features for each unknown subtype, greatly simplifies the complexity of the data structure, and ensures the effective preservation of feature information.
[0055] After obtaining the average representation of unknown message types, an initial feature matrix is constructed based on multiple second message data corresponding to various known message types over multiple consecutive historical periods, as well as multiple average message data. Multiple second message data refers to detailed feature data collected from each known message type. The multiple matrix data of the initial feature matrix correspond to multiple second message data and multiple average message data, respectively. This means that the rows of this feature matrix consist of two parts: one part is the detailed feature data row corresponding to each known message type, and the other part is the average feature data row obtained by aggregating unknown message types. This constructed initial feature matrix can comprehensively cover the protocol message ecosystem in the current network, including both the precise real-time status of known protocols and incorporating the overall impact of unknown protocols through aggregation and averaging. This ensures that the deep learning model can make decisions based on a more comprehensive view of network traffic, rather than relying solely on preset protocol types.
[0056] The protocol message uploading rate control method proposed in this application significantly improves adaptability to complex and ever-changing network environments. For unknown message types, its features are incorporated into the model through average calculation. This allows for more reasonable rate control based on aggregated behavioral characteristics, rather than simply ignoring or applying a uniform, brute-force strategy when facing unforeseen protocol traffic. This effectively enhances the generalization ability and robustness of uploading rate control, avoiding control blind spots or performance degradation caused by incomplete protocol type identification. Simultaneously, it maintains the stability of the feature matrix dimension, which helps ensure the training efficiency and inference speed of the deep learning model, thereby supporting real-time rate control decisions in network devices.
[0057] In one possible implementation of this application embodiment, when constructing the initial feature matrix, it is further necessary to adopt, but not limited to, the following methods: constructing a three-dimensional structure based on multiple consecutive historical periods, multiple protocol messages, and multiple message data; filling the three-dimensional structure with multiple second message data and multiple average message data to obtain the initial feature matrix, wherein the initial feature matrix includes at least a first dimension, a second dimension, and a third dimension; wherein, the first dimension is the message type of multiple protocol messages, used to characterize the known types corresponding to each of multiple known message types and a preset type used to aggregate multiple unknown message types; the second dimension is the data type of multiple message data, and the third dimension is multiple consecutive historical periods.
[0058] In the embodiments of this application, the core of constructing the initial feature matrix lies in integrating information from multiple dimensions into a unified data structure. A three-dimensional structure is a data container commonly used in computer science and data processing, capable of storing and associating information from three different dimensions within a single logical unit. Using a three-dimensional structure, rather than a simple two-dimensional table or array, allows for a more natural and efficient characterization of the complex relationships between protocol message data in terms of message type, data type, and time series.
[0059] Specifically, the three-dimensional structure contains three distinct dimensions. The first dimension is the message type of various protocol messages. This first dimension is used to distinguish and index the sources of different protocol messages. Its key feature is that it not only includes the known types corresponding to each of the various known message types (e.g., assigning an independent index position to each known protocol such as STP, LACP, and LLDP), but also specifically sets up a preset type for aggregating various unknown message types. This preset type (e.g., marked as "Other" or "unknown message" in the matrix) acts as a unified bucket, gathering all unrecognized unknown protocol messages within it. This design allows the feature matrix to maintain a fixed size in its first dimension, ensuring that the matrix structure does not dynamically change regardless of the actual number of unknown protocols appearing in the network, thus guaranteeing the stability of the deep learning model's input layer.
[0060] The second dimension is the data type of various message data. This second dimension defines a set of characteristic attributes used to describe the state of each protocol message. Typical data types may include, but are not limited to, average packet length, instantaneous transmission rate, rate growth trend, transmission duration, buffer occupancy, and message priority. Each data type reveals the traffic characteristics of the protocol message and its potential impact on system resources from different perspectives. Fixing this second dimension means that for any protocol message (whether known or unknown), the same standardized set of features is used for description, which greatly facilitates subsequent normalization processing and model calculation.
[0061] The third dimension consists of multiple consecutive historical periods. This third dimension introduces the concept of time series, recording data snapshots from multiple consecutive time segments preceding the current period. By preserving continuous historical period data, this three-dimensional structure can not only reflect the instantaneous state of protocol messages but also capture their dynamic behavior patterns over time, such as whether traffic is trending upwards or downwards, or whether it is sudden or continuous. This embedding of time-series information is crucial for accurate prediction and decision-making by deep learning models.
[0062] After defining the framework of the three-dimensional structure, the final initial feature matrix is obtained by filling this three-dimensional structure with various second message data (i.e., detailed data of known type messages) and various average message data (i.e., aggregated data of unknown type messages). The filling process involves filling the corresponding data values into the corresponding positions of the structure according to the three coordinates of message type, data type, and historical period. For example, the element with coordinates [known type i, data type j, historical period k] is filled with the value of the j-th data type of the i-th known type message in the k-th historical period; while the element with coordinates [preset type, data type j, historical period k] is filled with the average value of all unknown type messages in the j-th data type in the k-th historical period.
[0063] Furthermore, to facilitate understanding of the initial feature matrix construction of this application, an example is provided in this embodiment for illustration: (e.g.) Figure 2 As shown, Figure 2 This application provides a schematic diagram of an initial feature matrix, in which N-1 known message types are selected and one row of unknown message types is reserved, totaling N rows of data. The average packet length, protocol message rate, protocol message rate growth, message transmission duration, buffer occupancy, and message priority within one period are selected as features, totaling 6 columns. In terms of depth, 10 periods of data are selected. At this point, the initial feature matrix is an N×6×10 data matrix. For feature acquisition of the preset type, i.e., other packets, all unknown type messages not in N-1 are included in "other packets," and can be considered as the same message, with the average value taken.
[0064] This application utilizes a three-dimensional structure-based construction method to obtain an initial feature matrix with high structure and information density. It systematically integrates known and unknown protocol messages, various feature attributes, and temporal dynamic information to form a data cube that comprehensively describes the historical state of network protocol messages. This makes data relationships clear and access efficient, providing rich, well-organized input information with spatiotemporal correlations for subsequent deep learning models. This greatly enhances the model's ability to learn and understand complex network traffic patterns, thus providing reliable data support for ultimately achieving precise and adaptive rate control.
[0065] In one possible implementation of this application embodiment, when normalizing the initial feature matrix, the following method can be used, but is not limited to: dividing the multiple matrix data in the initial feature matrix by the preset reference values corresponding to the various message data to obtain the normalized feature matrix.
[0066] In the embodiments of this application, the initial feature matrix contains feature data of various protocol messages from multiple historical periods. This data originates from real-time collection by network devices, including, for example, average packet length, transmission rate, rate increase, transmission duration, buffer occupancy, and priority. These data typically have different physical meanings and numerical ranges; for example, packet length may be measured in bytes, ranging from tens to hundreds, while transmission rate may be measured in packets per second, reaching thousands. If these heterogeneous data are directly input into the model, features with larger numerical ranges may dominate the model calculations, thus masking the influence of features with smaller numerical ranges that may be equally important. Therefore, normalization is an essential step.
[0067] Normalization is a process of mapping raw data to a uniform scale using a mathematical transformation. Specifically, it involves dividing multiple matrix data points in the initial feature matrix by their respective preset reference values for various message types. The multiple matrix data points refer to each specific numerical element in the initial feature matrix, representing observations of a specific protocol message, a specific historical period, and a specific data type. The various message types refer to the different types of feature attributes collected, such as packet length and rate, as mentioned earlier. For each message type, a fixed preset reference value is pre-defined. This value is typically determined based on the theoretical processing capacity of the network device, the maximum value of historical observation data, or empirical values. For example, the preset reference value for packet length might be 512 bytes, and the preset reference value for transmission rate might be 1024 packets / second. Through this division operation, each raw data value is converted into a ratio to its corresponding preset reference value, thereby scaling most data to a relatively consistent range (e.g., around the [0, 1] interval).
[0068] The resulting matrix after calculation is called the normalized feature matrix. This normalized feature matrix preserves all relative relationships and change patterns in the original data, but all its elements are in a dimensionless or uniform dimension state, with similar numerical scales. This makes different protocol messages and different feature attributes comparable, providing a fair and standardized input environment for deep learning models. The weight parameters in the model can learn the importance of all features more evenly, without having to passively adapt to the inherent numerical biases of the original data.
[0069] This application improves the training dynamics of deep learning models by employing normalization through division based on preset reference values, accelerating the convergence process and helping to prevent numerical instability issues such as gradient explosion or vanishing gradients. Secondly, it enhances the model's generalization ability because the model learns the relative relationships between features rather than absolute values, making it less sensitive to normal fluctuations in overall network traffic levels and better able to focus on identifying dynamic patterns that truly impact processor load. Finally, the normalization method is computationally simple and highly deterministic, making it ideal for applications in network devices requiring fast, real-time processing, ensuring the overall efficiency and response speed of the rate control method.
[0070] In one possible implementation of this application embodiment, when correcting the data of the normalized feature matrix, the following methods may be used, but are not limited to: calculating an adjustment factor based on the current utilization rate using a preset calculation function; correcting the data to be corrected in the normalized feature matrix according to the adjustment factor to obtain a corrected feature matrix, wherein the multiple matrix data include the data to be corrected and other data, the data to be corrected includes at least packet length, uploading rate, rate increase amount and transmission duration, and the other data includes at least buffer occupancy and message priority.
[0071] In the embodiments of this application, the purpose of data correction is to simulate and amplify the pressure on the processor caused by protocol message traffic by adjusting specific key data in the feature matrix when the processor is under high load, thereby guiding the deep learning model to output a more conservative and cautious upload rate control strategy. The preset calculation function is a predefined mathematical formula whose input is the current utilization rate of the processor, and whose output is a coefficient used to scale the feature data, i.e., an adjustment factor. This preset calculation is typically designed to be non-linear to ensure that the adjustment factor increases significantly with increasing utilization after the utilization rate exceeds a threshold, thus more sensitively reflecting the increased processor load. The current utilization rate is the criterion for triggering the entire correction process, reflecting the processor's workload in real time.
[0072] After calculating the adjustment factor, the data to be corrected in the normalized feature matrix is scaled according to the adjustment factor to obtain the corrected feature matrix. Here, the multiple matrix data in the normalized feature matrix are clearly distinguished into two categories: data to be corrected and other data. This distinction is based on the sensitivity and contribution of different feature data to processor utilization. Data to be corrected refers to features that are directly and significantly related to processor computing load and input / output processing pressure, such as packet length, upload rate, rate increase, and transmission duration. Packet length directly affects the clock cycles required for parsing and processing a single message; upload rate and rate increase together determine the amount of task arriving at the processor per unit time; transmission duration reflects the continuity of the data flow, and long-term stable traffic may also lead to continuous occupation of processor resources. Therefore, when processor utilization is too high, targeted amplification of these feature values can effectively predict potential overload risks at the feature level.
[0073] In contrast, other data refers to data whose impact on the processor's immediate load is relatively indirect, or whose impact is already covered by other characteristics. Examples include buffer occupancy and message priority. Buffer occupancy primarily reflects the state of the data buffer; although related to memory resources, it is not directly equivalent to the processor's computational load. Message priority, on the other hand, is mainly used to distinguish the importance of business operations; its value itself does not directly represent resource consumption. Therefore, during the data correction phase, these data remain unchanged, ensuring that the correction operation focuses on the most critical influencing factors.
[0074] The modified feature matrix obtained through selective modification in this application is a data representation that more closely reflects the current operating state. It not only includes historical behavior patterns of protocol messages but also embeds information about the constraints of the processor's current load level on message processing capabilities. This allows the deep learning model to learn more complex mapping relationships closely related to the processor state, thereby enabling more intelligent and realistic control decisions. When the processor load is high, the model, through the modified features, tends to limit the message upload rate; when the load is low, the original features are retained, and the model can make fuller use of idle resources. This significantly improves the context-awareness and adaptive adjustment accuracy of rate control, ultimately ensuring the stability and high performance of network devices under varying loads.
[0075] In one possible implementation of this application embodiment, when calculating the adjustment factor based on the current utilization rate using a preset calculation function, it can be implemented in the following ways, but not limited to: using the natural logarithm function as a basis, the current utilization rate is used as a variable for data calculation to obtain the adjustment factor, wherein the adjustment factor increases as the current utilization rate increases.
[0076] In the embodiments of this application, the preset calculation function is specifically defined as a mathematical expression based on the natural logarithm function. The natural logarithm function is a logarithmic function with the mathematical constant e (approximately equal to 2.71828) as its base, and is usually denoted as [equation missing]. It is widely used in engineering and scientific computing to describe growth, decay, and many nonlinear relationships. A computational model is constructed using the specific mathematical properties of the natural logarithm function, with the current utilization rate as the input variable for data calculation; the direct output is the adjustment factor.
[0077] A key characteristic of this natural logarithm function is that the calculated adjustment factor increases with the current utilization rate. This means that as processor workload increases, the scaling factor calculated by this function will also increase accordingly. This positive correlation aligns with intuitive logic and system control theory: the higher the processor load, the more limited its ability to process protocol message traffic. Therefore, at the feature level, it is necessary to more significantly warn of potential overload risks, thereby guiding the deep learning model to make decisions that more significantly limit the upload rate. For example, when the current utilization rate increases from 60% to 80%, the adjustment factor calculated by this natural logarithm function will increase from a small value to a large value, thus implementing a stronger amplification correction on the data to be corrected in the normalized feature matrix (such as packet length, upload rate, etc.).
[0078] Specifically, the adjustment factor can also be calculated using, but is not limited to, the following formula:
[0079]
[0080] in, This represents the current utilization rate.
[0081] Furthermore, regarding the correction of the normalized feature matrix, this application provides an example for illustration: CPU utilization is the key to controlling the transmission of protocol messages. If the CPU utilization is too high, the transmission rate should be reduced regardless of the type of protocol message to prevent the CPU from being unable to handle it; conversely, if the CPU utilization is too low, the control over protocol messages should be relaxed to achieve efficient CPU utilization.
[0082] Therefore, CPU utilization needs to be used as a correction to the feature matrix. That is, the data in the feature matrix is adjusted to simulate high / low CPU utilization. Clearly, CPU utilization increases when the packet length, packet sending rate, rate growth, and packet duration of the protocol message increase. Therefore, CPU growth can be simulated by increasing these four feature values. Assuming the data has been normalized, when CPU utilization exceeds 50%, these four feature values for all protocol messages can be increased. The increase factor, i.e., the adjustment factor, is used using a function. Calculation. Furthermore, the adjustment factors can be constructed into a correction matrix to correct the normalized feature matrix. It can be represented in the following ways:
[0083]
[0084] The correction to the normalized eigenma matrix can be expressed as follows:
[0085]
[0086] in, The corrected feature matrix is the modified feature matrix. It is the normalized characteristic matrix. It is a correction matrix.
[0087] This application employs a calculation method based on the natural logarithm function, providing a smooth, non-linear growth relationship. When the processor utilization just exceeds a preset threshold, the adjustment factor grows relatively slowly, avoiding sudden and drastic changes in the control strategy and contributing to system stability. However, as the utilization continues to climb to a higher level, the function ensures that the adjustment factor increases at an appropriate rate, thus providing a sufficiently sensitive and powerful response to high load conditions. This non-linear characteristic allows the data correction process to more finely match the actual change curve of the processor load, avoiding control oscillations or insufficient response caused by overly aggressive or conservative corrections. It effectively transforms continuous, analog processor state information into a reasonable digital adjustment factor suitable for feature enhancement, providing a reliable mathematical guarantee for the subsequent generation of an accurate correction feature matrix, thereby improving the adaptive capability of the entire rate control system.
[0088] In one possible implementation of this application embodiment, when inputting the modified feature matrix into a pre-trained deep learning model for data processing, it can be implemented in the following ways, but not limited to: extracting spatial dimension features of packet length, uploading rate, rate increase, transmission duration, buffer occupancy, and message priority from the modified feature matrix through a convolutional layer to obtain a first vector representing the local correlation between multiple matrix data; inputting the first vector into a recurrent neural network layer according to a time series to obtain a second vector representing the time-dimensional dependency of multiple matrix data, wherein the time series is determined based on multiple consecutive historical periods; inputting the second vector into an attention layer for weighted fusion to obtain a control vector, wherein the pre-trained deep learning model includes a convolutional layer, a recurrent neural network layer, and an attention layer.
[0089] In the embodiments of this application, the pre-trained deep learning model is a neural network that has been trained on a large amount of historical data with fixed parameters, and it possesses efficient forward inference capabilities. This pre-trained deep learning model first performs preliminary feature extraction on the input modified feature matrix through its convolutional layers. Convolutional layers are a commonly used network layer in deep learning, particularly adept at processing data with a grid-like topology, such as images or matrix data.
[0090] The main function of the convolutional layer is to scan and operate on all feature data in the modified feature matrix, including packet length, transmission rate, rate increment, transmission duration, buffer usage, and message priority, in a spatial dimension. Here, the spatial dimension mainly refers to the dimensions in the feature matrix related to message type and data type. Through its local connectivity and weight sharing characteristics, the convolutional operation can effectively capture the local correlations between different feature attributes of different protocol messages. For example, it may discover a specific cooperative change pattern between the packet length and transmission rate of a certain protocol message, or that the buffer usage of several protocol messages exhibits similar characteristics. Through this layer's processing, the original modified feature matrix is transformed into a set of high-level feature maps that better reveal the local patterns between its internal features. These feature maps are integrated and flattened to form the first vector. This first vector is a condensation and sublimation of the original data spatial features; it characterizes the complex intrinsic relationships between various attributes of various protocol messages under one or more historical period snapshots.
[0091] Subsequently, the first vector is input into the recurrent neural network layer of the model according to a time series. The time series is determined based on multiple consecutive historical periods, meaning the first vector is input into the network layer sequentially according to the historical periods. A recurrent neural network layer is a type of neural network specifically designed for processing sequential data. It has a recurrent connection structure that maintains a memory state, thereby capturing the dynamic changes of data over time. This recurrent neural network layer is responsible for analyzing the first vector sequence, learning the patterns and trends of protocol message characteristics evolving over time, i.e., the dependencies in the time dimension. For example, it can identify that the rate increase of a certain protocol message is consistently positive over several consecutive periods, indicating that it is in a period of rising traffic; or it can detect a periodic fluctuation pattern in buffer occupancy. By modeling these temporal patterns, the recurrent neural network layer outputs a context-aware feature that comprehensively reflects historical and current trends—the second vector. This vector not only contains the current state information but also incorporates historical context information from the past period, enabling the model to dynamically track and predict.
[0092] Finally, the second vector is fed into the model's attention layer for further processing. The attention layer is a mechanism that dynamically allocates computational resources based on the importance of the input data. In this attention layer, different parts of the second vector are assigned different weights; this process is called weighted fusion. Its purpose is to allow the model to automatically focus on the information most critical to the current cycle's upload rate decision. For example, the model might consider recent historical data more important than older data, or a particular protocol message might exhibit unusual characteristics at a certain moment that require special attention. Through selective focusing, the attention layer ultimately generates a control vector that condenses the most critical information. Each dimension of this control vector corresponds to a protocol message type, with values between 0 and 1, precisely indicating the proportion of upload rate that each message should be allowed in the current cycle.
[0093] This application achieves a complex mapping from multi-dimensional, context-rich state inputs to precise control commands through the collaborative work of convolutional layers, recurrent neural network layers, and attention layers. The hierarchical processing structure enables the model to capture local spatial relationships between features, understand their evolution over time, and ultimately focus on the most critical information for decision-making. This significantly improves the intelligence and adaptability of the upload rate control strategy, effectively ensuring the balanced and efficient utilization of network device processor resources.
[0094] In one possible implementation of this application embodiment, when performing data calculation based on the control vector and the preset rate vector, the following method can be used, but is not limited to: multiplying each element in the control vector with each element in the corresponding preset rate vector to obtain the target uploading rate; wherein, the target uploading rate includes the first uploading rate corresponding to each of the various known types of messages and the second uploading rate corresponding to the preset type.
[0095] In the embodiments of this application, the target upload rate is an actual control value obtained through calculation. It directly determines the specific rate at which each protocol message is allowed to be uploaded to the processor in the current cycle and is the final output of the rate control strategy.
[0096] The specific process of data computation involves multiplying each element of the control vector with each element of the corresponding preset rate vector. Multiplication is an element-wise mathematical operation, meaning that elements at the same index position in both the control vector and the preset rate vector are multiplied. This method is simple, direct, and computationally efficient, quickly converting the proportionality recommendations output by the model into specific rate limits. It is well-suited for real-time control scenarios in network devices requiring low-latency responses. Through multiplication, the proportionality coefficient in the control vector is combined with the maximum rate value in the preset rate vector to generate a target upload rate vector with practical physical meaning.
[0097] The target upload rate is further distinguished into two types: the first upload rate corresponding to each of the various known packet types, and the second upload rate corresponding to the preset type. Known packet types refer to specific protocol packets that have been identified and defined by network devices, such as OSPF, BGP, and STP, each with its own clear protocol identifier and processing rules. For these known packet types, the first upload rate, i.e., the target upload rate for each known packet type, is obtained through product processing, enabling fine-grained rate control based on the specific characteristics and real-time requirements of each protocol. The preset type refers to the unified classification used to aggregate various unknown packet types when constructing the initial feature matrix, such as "Other" or "Unknown Packet Category," representing the set of all protocol packets not individually identified. For this preset type, the second upload rate is obtained through product processing, representing the allowed upload rate for all unknown packet types as a whole. This differentiated processing mechanism allows the system to implement differentiated management strategies for known and unknown protocol messages. Known messages can obtain personalized rate limits based on their specific behavior and historical data, while unknown messages are aggregated to obtain a unified control value. This ensures control coverage while avoiding the computational complexity and management overhead caused by the dynamic changes in unknown message types.
[0098] Furthermore, the calculation of the target upload rate can be achieved in, but is not limited to, the following ways:
[0099] For N types of protocol messages (including N-1 known types and preset types), the maximum transmission rate vector of the regulator, i.e., the preset rate vector, is: ,For example: = (4000, 4000, 4000, 4000, ..., 8000). The final result given by deep learning is an n-dimensional vector P, i.e., the control vector. The elements in the control vector P are all between (0, 1). The target upload rate of the final protocol message to the CPU is... The calculation is as follows:
[0100]
[0101] in, This represents the mathematical operation of element-wise multiplication, i.e., for control vectors. and preset rate vector Multiplication is performed on elements at the same index position.
[0102] This application achieves intelligent and adaptive protocol message upload rate control through the calculation of the target upload rate. By combining the control vector with the preset rate vector through multiplication, the abstract decisions of the deep learning model can be directly and efficiently transformed into specific network device control parameters, thereby achieving precise adjustment of the protocol message flow. Distinguishing between the first upload rate and the second upload rate ensures that, in the face of complex and ever-changing network protocol environments, both fine-grained optimization of known protocols and effective constraints on unknown protocol groups can be performed. This improves the overall utilization efficiency of processor resources, prevents processor overload or resource idleness caused by improper rate control, and enhances the stability and reliability of network devices. It balances the accuracy, real-time performance, and scalability of control, providing effective technical support for dynamic resource management of modern high-performance network devices.
[0103] In one possible implementation of this application embodiment, after obtaining the target upload rate corresponding to each of the multiple protocol messages in the current period, the following methods can also be used, but are not limited to: transmitting multiple known type messages to the processor at their respective first upload rates; transmitting multiple unknown type messages to the processor at the same second upload rate.
[0104] In the embodiments of this application, the first upload rate is a specific rate value that is allowed to be uploaded to the processor within the current cycle, determined by a deep learning model and computational process for each known type of message. This first upload rate is customized and reflects the model's accurate assessment of the resource consumption required for that specific protocol message based on historical data, real-time traffic characteristics, and processor status.
[0105] Transmitting known protocol messages to the processor at their respective first upload rates means implementing independent rate-limiting policies for each known protocol message stream at the physical or logical interface. For example, STP messages might be limited to 800 messages per second, while LACP messages might be allowed to be uploaded at 600 messages per second. This differentiated transmission control enables fine-grained resource allocation based on the actual importance of each protocol, its real-time behavior patterns, and its expected impact on processor resources. This ensures timely response from critical protocols while preventing non-critical protocols from excessively consuming processing power.
[0106] On the other hand, unknown type messages are uniformly aggregated into preset types for unified management. The second upload rate is a unified target upload rate calculated for this preset type, representing the maximum shared rate at which all unknown type messages as a whole are allowed to be uploaded to the processor. Transmitting multiple unknown type messages to the processor at the same second upload rate means that regardless of how many specific subtypes an unknown message contains, they all share this rate cap. For example, the total upload rate of all message streams marked as unknown is limited to 400 messages per second.
[0107] This application achieves final closed-loop control of the protocol message uploading process through transmission execution. For known message types, a personalized first uploading rate is adopted, enabling the control system to fully utilize the fine-grained insights provided by the deep learning model, achieving on-demand resource allocation and priority protection, thus optimizing processor utilization efficiency. For unknown message types, a uniform second uploading rate is adopted, which is an efficient and robust strategy. This avoids the complex identification and individual control overhead caused by the dynamic changes of unknown protocols. By setting an overall safety threshold, it effectively prevents the risk of processor overload that may be caused by sudden bursts of unknown traffic, while ensuring basic capacity to accommodate unforeseen traffic. This approach balances control precision and system simplicity, significantly enhancing the adaptability and reliability of network devices in complex and changing environments, ultimately improving the overall network service quality and operational stability.
[0108] In one possible implementation of this application embodiment, to facilitate understanding of the flow of the protocol message uplink rate control method in this application embodiment, an example is provided for illustration:
[0109] refer to Figure 3 , Figure 3 This application provides a flowchart for controlling the protocol message rate, which includes the processes of constructing a historical feature matrix, dynamically correcting based on CPU utilization, making intelligent decisions using a deep learning model, and outputting a differentiated rate.
[0110] Furthermore, assuming the protocol messages of interest are STP, LACP, LLDP, ARP, and BGP, a 6x6x10 feature matrix (including the preset type "other") is constructed over 10 detection cycles. The feature matrix for the first cycle is shown in Table 1.
[0111] Table 1
[0112]
[0113] First, normalize the columns, using a fixed maximum value as shown in Table 2:
[0114] Table 2
[0115]
[0116] After normalization, the data matrix is compared with the maximum value in the table above to obtain the normalized matrix for the first period, as shown in Table 3.
[0117] Table 3
[0118]
[0119] The data is adjusted based on CPU utilization. Assuming the current CPU utilization is 75%, then... The calculation requires increasing the packet length, data rate, data rate growth, and doubling the transmission duration. The corrected matrix for the first cycle is shown in Table 4.
[0120] Table 4
[0121]
[0122] The 10 preprocessed data matrices are fed into the deep learning network, and calculations are performed using the trained parameters. The specific calculation process is not detailed here. The calculation yields a 6-dimensional vector with values in the range [0,1], for example: (0.20, 0.15, 0.08, 0.16, 0.14, 0.05). If the preset rate vector is (4000, 4000, 4000, 4000, 4000, 8000), then the final result, up to the next cycle, shows the CPU protocol message rate control as (800, 600, 320, 640, 560, 400).
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0124] Embodiments of this application also provide a protocol message uplink rate control device. Figure 4 A schematic diagram of a protocol message uplink rate control device provided in this application is shown below. Figure 4 As shown, it includes:
[0125] Construction unit 41 is used to construct an initial feature matrix based on the various message data corresponding to various protocol messages in multiple consecutive historical periods before the current period.
[0126] Processing unit 42 is used to normalize the initial feature matrix to obtain a normalized feature matrix;
[0127] Correction unit 43 is used to correct the normalized feature matrix according to the current utilization rate of the processor in the current cycle when the current utilization rate is greater than a preset utilization rate threshold, so as to obtain a corrected feature matrix.
[0128] Input unit 44 is used to input the modified feature matrix into a pre-trained deep learning model for data processing to obtain a control vector, wherein each element of the control vector indicates the uplink rate ratio corresponding to each of the various protocol messages.
[0129] The calculation unit 45 is used to perform data calculation based on the control vector and the preset rate vector to obtain the target uploading rate corresponding to each of the various protocol messages in the current period. Each element of the preset rate vector indicates the highest uploading rate corresponding to each of the various protocol messages.
[0130] In one embodiment of this application, the construction unit 41 is specifically used for:
[0131] The average message data corresponding to the various unknown types of messages within multiple consecutive historical periods is calculated by averaging the number of unknown types in the messages to obtain the average message data representing the characteristics of the various unknown types of messages.
[0132] An initial feature matrix is constructed based on multiple second message data corresponding to multiple known message types within multiple consecutive historical periods, as well as multiple average message data.
[0133] Among them, the various protocol messages include various unknown types of messages and various known types of messages, and the multiple matrix data of the initial feature matrix correspond to various second message data and various average message data respectively.
[0134] In one embodiment of this application, the construction unit 41 is specifically used for:
[0135] A three-dimensional structure is constructed based on multiple consecutive historical periods, multiple protocol messages, and multiple message data.
[0136] Multiple types of second message data and multiple types of average message data are filled into a three-dimensional structure to obtain an initial feature matrix. The initial feature matrix includes at least a first dimension, a second dimension, and a third dimension.
[0137] The first dimension is the message type of various protocol messages, which is used to represent the known types corresponding to various known message types and a preset type used to aggregate various unknown message types.
[0138] The second dimension is the data types of various message data, and the third dimension is multiple consecutive historical periods.
[0139] In one embodiment of this application, the processing unit 42 is specifically used for:
[0140] The normalized feature matrix is obtained by dividing the multiple matrix data in the initial feature matrix by the preset reference values corresponding to the various message data.
[0141] In one embodiment of this application, the correction unit 43 is specifically used for:
[0142] The adjustment factor is calculated based on the current utilization rate using a preset calculation function;
[0143] Based on the adjustment factor, the data to be corrected in the normalized feature matrix is corrected to obtain the corrected feature matrix. The matrix data includes the data to be corrected and other data. The data to be corrected includes at least packet length, uploading rate, rate increase and transmission duration. The other data includes at least buffer occupancy and message priority.
[0144] In one embodiment of this application, the correction unit 43 is specifically used for:
[0145] Based on the natural logarithm function, the current utilization rate is used as a variable to calculate the adjustment factor, which increases as the current utilization rate increases.
[0146] In one embodiment of this application, the input unit 44 is specifically used for:
[0147] By using convolutional layers to extract spatial features from the packet length, uploading rate, rate increase, transmission duration, buffer usage, and message priority in the modified feature matrix, a first vector representing the local correlation between multiple matrix data is obtained.
[0148] The first vector is input into the recurrent neural network layer in time series order to obtain a second vector that represents the dependence of multiple matrix data in the time dimension, wherein the time series is determined based on multiple consecutive historical periods;
[0149] The second vector is input into the attention layer for weighted fusion to obtain the control vector. The pre-trained deep learning model includes convolutional layers, recurrent neural network layers, and attention layers.
[0150] In one embodiment of this application, the computing unit 45 is specifically used for:
[0151] The target upfeed rate is obtained by multiplying each element in the control vector with each element in the corresponding preset rate vector.
[0152] The target uploading rate includes the first uploading rate corresponding to each of the various known types of messages and the second uploading rate corresponding to the preset type.
[0153] In one embodiment of this application, such as Figure 5 As shown, the protocol message uplink rate control device further includes a transmission unit 46, which is used for:
[0154] Transmit multiple known message types to the processor at their respective first upload rates;
[0155] All unknown message types are transmitted to the processor at the same second upload rate.
[0156] For a description of the features of the protocol message uploading rate control device in the corresponding embodiment, please refer to the relevant description of the protocol message uploading rate control method in the corresponding embodiment, which will not be repeated here.
[0157] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described embodiments of the protocol message uplink rate control method.
[0158] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in the embodiments of the above-described protocol message uplink rate control method when running.
[0159] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0160] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in the embodiments of the above-described protocol message uplink rate control method.
[0161] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the embodiments of the above-described protocol message uplink rate control method.
[0162] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0163] The above provides a detailed description of a protocol message uploading rate control method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for controlling the rate of submitting protocol packets, characterized in that, include: Based on the various message data corresponding to various protocol messages in multiple consecutive historical periods prior to the current period, an initial feature matrix is constructed, and the initial feature matrix is normalized to obtain a normalized feature matrix. In response to the processor’s current utilization rate in the current cycle being greater than a preset utilization rate threshold, the normalized feature matrix is corrected according to the current utilization rate to obtain a corrected feature matrix. The modified feature matrix is input into a pre-trained deep learning model for data processing to obtain a control vector, wherein each element of the control vector indicates the uplink rate ratio corresponding to each of the various protocol messages. Data calculations are performed based on the control vector and the preset rate vector to obtain the target uploading rate corresponding to each of the various protocol messages in the current period. Each element of the preset rate vector indicates the highest uploading rate corresponding to each of the various protocol messages. Constructing the initial feature matrix includes: A three-dimensional structure is constructed based on the multiple consecutive historical periods, the multiple protocol messages, and the multiple message data. The initial feature matrix is obtained by filling the three-dimensional structure with the second message data corresponding to the various known types of messages in the multiple consecutive historical periods, as well as the average message data. The initial feature matrix includes at least a first dimension, a second dimension, and a third dimension. The average message data is used to represent the features of various unknown types of messages. Wherein, the first dimension is the message type of the multiple protocol messages, used to characterize the known types corresponding to each of the multiple known type messages and a preset type used to aggregate the multiple unknown type messages; The second dimension is the data type of the various message data, and the third dimension is the multiple continuous historical periods.
2. The protocol message uploading rate control method according to claim 1, wherein, The step of constructing an initial feature matrix based on the various message data corresponding to various protocol messages within multiple consecutive historical periods prior to the current period includes: The average message data corresponding to the various unknown types of messages within the various consecutive historical periods is calculated by averaging the data according to the number of unknown types of the various unknown types of messages, to obtain the average message data representing the characteristics of the various unknown types of messages. The initial feature matrix is constructed based on the various second message data and the various average message data; The multiple protocol messages include multiple unknown type messages and multiple known type messages, and the multiple matrix data of the initial feature matrix correspond to the multiple second message data and the multiple average message data, respectively.
3. The protocol message uploading rate control method according to claim 2, wherein, The normalization process of the initial feature matrix to obtain the normalized feature matrix includes: The normalized feature matrix is obtained by dividing the multiple matrix data in the initial feature matrix by the preset reference value corresponding to each of the various message data.
4. The protocol message uploading rate control method of claim 2, wherein, The step of correcting the normalized feature matrix based on the current utilization rate to obtain the corrected feature matrix includes: The adjustment factor is calculated based on the current utilization rate using a preset calculation function; According to the adjustment factor, the data to be corrected in the normalized feature matrix is corrected to obtain the corrected feature matrix. The plurality of matrix data includes the data to be corrected and other data. The data to be corrected includes at least packet length, uploading rate, rate increase and transmission duration. The other data includes at least buffer occupancy and message priority.
5. The protocol message uploading rate control method according to claim 4, wherein, The calculation of the adjustment factor based on the current utilization rate using a preset calculation function includes: Based on the natural logarithm function, the current utilization rate is used as a variable to calculate the adjustment factor, which increases as the current utilization rate increases.
6. The protocol message uploading rate control method according to claim 4, wherein, The step of inputting the corrected feature matrix into a pre-trained deep learning model for data processing to obtain the control vector includes: By using convolutional layers to extract spatial features from the packet length, transmission rate, rate increase, transmission duration, buffer occupancy, and message priority in the modified feature matrix, a first vector representing the local correlation between the multiple matrix data is obtained. The first vector is input into a recurrent neural network layer according to the time series to obtain a second vector representing the dependence of the multiple matrix data in the time dimension, wherein the time series is determined based on the multiple consecutive historical periods; The second vector is input into the attention layer for weighted fusion to obtain the control vector, wherein the pre-trained deep learning model includes the convolutional layer, the recurrent neural network layer, and the attention layer.
7. The method for controlling the uplink rate of protocol messages according to claim 2, characterized in that, The step of calculating the target upload rate for each of the various protocol messages within the current period based on the control vector and the preset rate vector includes: The target upload rate is obtained by multiplying each element of the control vector with each element of the corresponding preset rate vector. The target uploading rate includes the first uploading rate corresponding to each of the various known message types and the second uploading rate corresponding to the preset type.
8. The protocol message uploading rate control method according to claim 7, wherein, The method further includes: The various known types of messages are transmitted to the processor at their respective first upload rates; All of the various unknown types of messages are transmitted to the processor at the same second upload rate.
9. An electronic device, comprising: include: Memory, used to store computer programs; A processor, configured to implement the steps of the protocol message uplink rate control method as described in any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Anti-attack method and device for uploading message to CPU
CN113904835A
Enhanced protection method for CPU management message and data message
CN117834541A