Message control method and device, storage medium and electronic equipment
By monitoring the number of messages of the target device and implementing message flow restriction, the increased node burden and network congestion caused by target message transmission are solved, effectively protecting network resources and improving the stability of the communication network.
Patent Information
- Application Number
- CN202510130417.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-05-02
AI Technical Summary
In a communication network, the transmission of target messages causes an increase in the burden on the node and prone to network congestion. The prior art has failed to effectively solve this problem.
By obtaining the number of target messages sent by the target device in the current period, determine whether there is an abnormal transmission behavior. If there is, determine the target threshold value for message flow limit, and limit the target device to message flow.
Identify devices that send target messages excessively, and target suppress them so that the actual throughput of message transmission does not collapse due to non-essential packet transmission of individual devices, reduce the burden on nodes when sending target messages, and avoid network congestion.
Smart Images

Figure CN119922137A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a message control method, device, storage medium and electronic device. Background Art
[0002] In communication networks, network nodes involved in some messages (such as multicast messages, broadcast messages, etc.) usually take measures such as caching multicast data packets, setting traffic priorities, optimizing multicast tree structures to reduce transmission paths, and limiting the number and size of multicast groups to avoid network overload and performance degradation in the fluctuation of network traffic. Existing traffic control algorithms such as traffic shaping and congestion control algorithms of the Transmission Control Protocol (TCP) avoid network congestion by adjusting the rate at which messages are sent. However, for multicast traffic, the construction and maintenance of these methods may increase the burden on nodes, resulting in the continued existence of excessive data flows in the network. Each node device in the communication network still needs to process a large number of data packets at high pressure, and the problems of network congestion and performance degradation have not been adequately solved.
[0003] With respect to the problems of increased node burden and easy occurrence of network congestion when sending target messages in the above-mentioned related technologies, no effective solution has been proposed so far. Summary of the invention
[0004] The embodiments of the present invention provide a message control method, device, storage medium and electronic device to at least solve the technical problems in the related art of increased node burden and easy occurrence of network congestion when sending target messages.
[0005] According to one aspect of an embodiment of the present invention, there is provided a message control method, comprising: obtaining the number of target messages sent by a target device in a current time period, wherein the target message is a data packet sent from the target device to one or more other devices; based on the number of messages, determining whether the target device has abnormal sending behavior; in the case where the target device has abnormal sending behavior, determining a target threshold value for message flow limiting on the target device; and performing message flow limiting on the target device based on the target threshold value.
[0006] According to another aspect of an embodiment of the present invention, a message control device is also provided, including: a message quantity acquisition module, used to obtain the message quantity of target messages sent by the target device in the current time period, wherein the target message is a data packet sent from the target device to one or more other devices; an anomaly detection module, used to determine whether the target device has abnormal sending behavior based on the message quantity; a threshold value determination module, used to determine a target threshold value for message flow limiting to the target device when the target device has abnormal sending behavior; a message flow limiting module, used to limit the message flow to the target device based on the target threshold value.
[0007] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the message control methods.
[0008] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes any one of the message control methods when running.
[0009] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of any one of the message control methods are implemented.
[0010] In an embodiment of the present invention, by obtaining the number of target messages sent by the target device in the current time period, wherein the target message is a data packet sent from the target device to one or more other devices; based on the number of messages, determining whether the target device has abnormal sending behavior; in the case that the target device has abnormal sending behavior, determining a target threshold value for message flow limiting for the target device; and limiting the message flow for the target device based on the target threshold value, the purpose of identifying devices that excessively send target messages and suppressing them in a targeted manner is achieved, so that the actual throughput of message transmission does not collapse due to unnecessary packet sending of individual devices, thereby achieving the technical effect of reducing the node burden existing when the target message is sent and avoiding network congestion, thereby solving the technical problems of increased node burden and easy occurrence of network congestion when sending target messages in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0012] Figure 1 is a flow chart of a message control method according to an embodiment of the present invention;
[0013] Figure 2 is a schematic diagram of an optional communication network architecture according to an embodiment of the present invention;
[0014] Figure 3 is a schematic diagram of another optional communication network architecture according to an embodiment of the present invention;
[0015] Figure 4 is a logical relationship diagram between optional threshold control parameters according to an embodiment of the present invention;
[0016] Figure 5 is a schematic diagram of a message control device according to an embodiment of the present invention;
[0017] Figure 6 It is a structural schematic diagram of a message control device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:
[0021] Threshold refers to the lowest or highest value that an effect can produce, which can be understood as the highest threshold in this article. By setting reasonable thresholds, monitoring, control and decision-making of various phenomena can be achieved.
[0022] Aging time refers to the time after which an entry in the cache is considered outdated and can be replaced.
[0023] Link layer utilization is used to describe the intensity of data transmission activities on the link layer. In wired communication networks, link layer utilization can reflect the impact of link layer protocols on data transmission efficiency and the use of link resources. In wireless communication networks, link layer utilization may also be affected by channel quality, interference, and access control mechanisms defined in wireless communication standards.
[0024] Channel utilization is used to describe the percentage of information occupying the channel during information transmission. In wired communication networks, channels refer to information transmission paths on physical media (such as copper wires and optical fibers). The channels of wired communication networks can be considered as actual physical lines; in wired communication networks, channel utilization can be understood as the data transmission occupancy rate on physical media. The channels of wireless communication networks refer to the frequency bands or frequencies used for wireless signal transmission; in wireless communication networks, channel utilization refers to the proportion of wireless channels that are effectively used. That is, in wired communication networks, channels and channel utilization focus on the transmission efficiency of physical lines; while in wireless communication networks, channels and channel utilization focus on the efficiency of frequency resource use and management, as well as the access efficiency of wireless media.
[0025] Bandwidth utilization is used to describe the ratio of data traffic on a network link (whether wired or wireless) to the link's maximum transmission capacity (i.e., bandwidth). In a wired communication network, link bandwidth refers to the maximum data transmission rate that the physical medium (such as copper wire, optical fiber) can support. In a wireless communication network, link bandwidth refers to the amount of data that a wireless channel can transmit simultaneously.
[0026] Multicast packets refer to data packets sent to a specific multicast group. The member devices in the group can receive these data packets, while the devices outside the group will not receive these data packets. Multicast packets are designed to efficiently send the same data to multiple receivers.
[0027] Broadcast packets are packets sent to all devices in the network. They are received by all devices in the network, regardless of whether the devices join a specific multicast group. Broadcasting is a way to send information to all possible recipients.
[0028] The Address Resolution Protocol (ARP) broadcast message is a protocol used to determine the physical address (such as MAC address) of another device on the network that corresponds to a given IP address. When a device wants to send data to another device on the network, but only knows its IP address but not its physical address, it sends an ARP broadcast message.
[0029] Multicast DNS (MDNS) multicast messages are a protocol that allows devices to automatically discover other devices and services within a local area network. It allows devices to resolve service and device names without a central DNS server by using multicast DNS queries and multicast DNS responses. MDNS multicast messages are used to broadcast available service and device information in the network, allowing devices to automatically detect and connect to services (such as printers, media streaming services, etc.).
[0030] The Simple Service Discovery Protocol Multicast (SSDP) multicast message is part of the Universal Plug and Play (UPnP) protocol and is used to automatically discover devices and services on the network. SSDP multicast messages broadcast the existence and description of devices by using the Hyper Text Transfer Protocol (HTTP) and its multicast extensions. When a device joins or leaves a network, it sends SSDP multicast messages to notify other devices on the network. These messages enable devices to automatically detect and immediately use services on the network without manual configuration.
[0031] Counter Algorithm performs flow control by tracking the number of packets received or sent within a specific time window. When the number of packets reaches a preset threshold, the algorithm begins to drop or delay subsequent packets until the counter is reset. Counter algorithms are easy to implement, but lack fine-grained control over bursty data flows.
[0032] The Sliding Time Window Algorithm introduces the concept of time based on the counter. It maintains a continuously sliding time window and counts the number of packets in this window. When the number of packets in the window exceeds the threshold, new packets will be limited. The Sliding Time Window Algorithm can more accurately reflect the real-time data flow rate because it takes into account the time distribution of packet arrival rather than the count at a fixed time point.
[0033] The Leaky Bucket Algorithm uses a "bucket" to simulate the bandwidth limitation of the network. Packets enter this bucket, and the bucket "leaks" packets at a constant rate, which means that even if a large number of packets enter the bucket, the rate at which the bucket outputs packets will remain constant. If the bucket is full, new packets will be discarded until there is enough space in the bucket. The leaky bucket algorithm can smooth the data flow and prevent the burstiness of packets from causing instantaneous overload of network resources.
[0034] The Token Bucket Algorithm is a traffic shaping technology that uses "tokens" to control the sending of data packets. A certain number of tokens are contained in the bucket. Before a data packet is sent, a token must be obtained from the bucket. If there is no token, the data packet will be delayed or discarded. The tokens in the bucket are generated at a constant rate, but a large number of tokens can be generated instantly, which allows bursty data flows to be accepted to a certain extent while ensuring that the long-term average rate is not exceeded. The token bucket algorithm is more flexible than the leaky bucket algorithm because it allows bursty traffic to pass without affecting the long-term average rate.
[0035] Normally, when a node device in a communication network receives a specific type of message (such as a multicast message, a broadcast message, etc.), it will copy and forward it to every interface except the interface where the message arrives. In addition, in a communication network (such as a wireless LAN), the transmission rate of this type of message is usually lower than that of a unicast message, that is, per unit size of data, this type of message will occupy the communication medium for more time than a unicast message. Therefore, when clients in a communication network generate and node devices forward a large number of target messages, the occupancy rate of the communication link medium will increase, and the resource consumption of each node in the intranet will increase, thereby affecting services under other network requirements and reducing the user experience.
[0036] In some cases, such as a sudden burst of a large number of multicast messages, it may instantly cause network overload. One of the typical manifestations is that the link is fully occupied, causing serious damage to the communication functions of other devices, greatly increasing the packet loss rate, and endangering network stability. At this time, it is imperative to suppress the data source of the sudden burst of a large number of multicast messages.
[0037] In addition, in communication networks, network nodes involving multicast or broadcast messages usually cache multicast data packets, set traffic priorities, optimize the multicast tree structure to reduce the transmission path of multicast or broadcast messages, and limit the number and size of multicast groups to avoid network overload and performance degradation in the fluctuation of network traffic. Existing traffic control algorithms, such as traffic shaping and TCP-based congestion control algorithms, avoid network congestion by adjusting the rate at which messages are sent. However, for multicast traffic, the construction and maintenance of these methods may increase the burden on nodes, but no appropriate suppression measures are taken for the data source, resulting in the continued existence of excessive data flows in the network. Each node still needs to process a large number of data packets under high pressure, and the problems of network congestion and performance degradation have not been adequately solved.
[0038] In response to the above problems, an embodiment of the present invention provides a method embodiment of message control. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] Figure 1 is a flow chart of a message control method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0040] Step S102, obtaining the number of target messages sent by the target device in the current period, wherein the target message is a data packet sent from the target device to one or more other devices;
[0041] In step S102 of the present application, in order to accurately obtain whether the target device is in an abnormal message sending state, the number of target messages sent by the target device in the current period is obtained, which is used for subsequent detection of whether the target device has packet sending abnormality in the current period.
[0042] As an optional embodiment, the execution subject of the method of this embodiment can be a communication device or system in the communication network where the target device is located, and the communication network can be a wireless communication network or a wired communication network. For example, it can be a router, a switch, a network controller or a management system in the communication network, a dedicated flow control device (such as a flow control or deep packet inspection device), a multicast traffic management software, a virtual network device (such as a data center or a cloud platform, a virtual router, a virtual switch or a virtual network controller), etc. The above devices or systems can record and count the number of messages passing through their interfaces.
[0043] Optionally, the target message may be a one-to-many communication message, which refers to a data packet sent from a target device to one or more other devices in a communication network, where the other devices may be specific multicast group members or all devices in the network. The one-to-many message may be a multicast message or a broadcast message. Figure 2 It is a schematic diagram of an optional communication network architecture according to an embodiment of the present invention. When the target message sent by the target device is a broadcast message, the target device can be used as a source device, and the sent broadcast message can be broadcast to device 1, device 2, device 3 and device 4 via a communication device (such as a router); when the target message sent by the target device is a multicast message, the target device can selectively send the sent multicast message to one or more devices among device 1, device 2, device 3 and device 4 via the communication device, for example, send the multicast message to device 1 and device 2, but not to device 3 and device 4, etc.
[0044] Optionally, the target device can also serve as an intermediate device. Figure 3 is another optional communication network architecture schematic diagram according to an embodiment of the present invention, such as Figure 3 As shown, in the sending scenario where the target message sent by the target device is a multicast message, the source device can selectively send the sent multicast message to device 6 and the target device via the communication device. After receiving the multicast message, the target device can act as an intermediate device to forward the multicast message to one or more devices among device 7, device 8 and device 9. It should be noted that Figure 2 and Figure 3 These are merely implementations of two optional communication network architectures according to this embodiment. The method of this embodiment may also be applicable to other communication scenarios and networks regarding one-to-many communication message sending.
[0045] Optionally, the number of target messages may be the number of a certain type of messages sent by the target device in the current period. For example, the target message may be an Address Resolution Protocol Broadcast (ARP) broadcast message, a Multicast Domain Name System (MDNS) multicast message, or a Simple Service Discovery Protocol Multicast (SSDP) multicast message.
[0046] Optionally, in a communication network, the target device may be one or more, that is, based on the method of this embodiment, the message sending of multiple devices in the communication network can be detected and controlled. The target device may be a source device that sends the target message, or a forwarding device that forwards the target message. For example, the target device may be, but is not limited to, a user terminal (such as a personal computer, a smart phone, a tablet computer, a smart TV, a game console, an Internet of Things device, etc.), a network device (such as a router, a switch, a gateway and other network infrastructure devices), a server (such as a streaming media server, a file server, a network management server, etc.), a multicast source device, or any network component that may generate a multicast message.
[0047] Step S104, based on the number of messages, determining whether the target device has abnormal sending behavior;
[0048] In step S104 of the present application, after collecting the number of messages of the target device, it is determined whether the message sending behavior of the device exceeds the normal range. The identification of abnormal sending behavior can detect abnormal traffic in time, avoid excessive flow restriction affecting normal communication, and can suppress abnormal traffic in a targeted manner to protect network resources.
[0049] It should be noted that a large number of sudden target messages (such as multicast messages, broadcast messages, etc.) are often caused by the specific functions or abnormalities of a certain device. Suppressing the repeated target messages and obviously excessive target messages of the source device can achieve greater improvements at a lower cost. This situation is more obvious in wireless local area networks. A substantial increase in link layer utilization (such as channel utilization, bandwidth utilization, etc.) will lead to low link quality, a significant increase in random packet loss rate, and affect all communication devices, and may enter a vicious cycle of retransmission storms. By identifying devices that send excessive messages and suppressing them in a targeted manner, instead of passive packet loss, the actual transmission throughput does not collapse due to unnecessary packet transmission by individual clients, but approaches the Shannon limit as a whole. To this end, in this embodiment, based on the number of target messages sent by the target device in the current period, it is identified whether the target device has abnormal sending behavior, so as to facilitate subsequent targeted message suppression of abnormal sending behavior.
[0050] In an optional embodiment, based on the number of messages, determining whether the target device has abnormal sending behavior includes: obtaining the current link layer utilization of the communication network to which the target device belongs, wherein the current link layer utilization is the link layer utilization of the communication network in the current time period; determining the correlation between the number of messages and the current link layer utilization; based on the correlation, determining whether the target device has abnormal sending behavior.
[0051] It can be understood that by obtaining the current link layer utilization of the communication network where the target device is located and analyzing the relationship between the number of target messages sent and the network resource occupancy, it is possible to more accurately identify devices that significantly increase the network load by sending too many target messages. By calculating the correlation between the number of messages and the current link layer utilization, the impact of target message sending on network performance can be quantitatively analyzed. In addition, the correlation between the number of messages and the link layer utilization is used to dynamically determine whether the device's sending behavior is abnormal. This is more flexible and adaptable than static threshold detection, and the criteria for determining abnormal behavior can be adjusted according to the actual conditions of the communication network.
[0052] Optionally, the link layer utilization may be, but is not limited to, channel utilization or bandwidth utilization. The correlation may be a correlation score result between the number of messages and the current link layer utilization, where a higher score indicates a greater correlation between the two, and vice versa. The correlation may also be a classification result, used to characterize whether the number of messages is correlated or uncorrelated with the current link layer utilization.
[0053] In an optional embodiment, determining the correlation between the number of packets and the current link layer utilization includes: determining the Spearman correlation coefficient between the number of packets and the current link layer utilization; and determining the correlation based on the Spearman correlation coefficient.
[0054] Optionally, the Spearman correlation coefficient can detect the hierarchical correlation between the number of packets and the link layer utilization, and can accurately reflect the trend changes between them even if the relationship between these variables is not linear. This hierarchical correlation measurement is more suitable for detecting abnormal sending behavior because it is not limited by the specific form of data distribution. Through the Spearman correlation coefficient, the relationship between the number of packets and the link layer utilization can be expressed in numerical form, providing a quantitative basis for the subsequent determination of abnormal behavior. The size of the correlation coefficient can directly reflect the degree of impact of the target message sent by the device on network performance. The use of the Spearman correlation coefficient makes the determination of abnormal sending behavior more accurate, distinguishes normal traffic fluctuations from abnormal traffic, thereby avoiding misjudgment and missed judgment, and improving the accuracy of traffic control.
[0055] Optionally, when determining the Spearman correlation coefficient between the number of messages and the current link layer utilization, the historical period can be evenly divided into multiple sampling periods (e.g., 9), and the number of messages sent by the target device in each of the multiple sampling periods, as well as the link layer utilization of the communication network to which the target device belongs in each of the multiple sampling periods, are recorded; based on the number of messages sent in each of the multiple sampling periods and the corresponding link layer utilization, the Spearman correlation coefficient is determined. When the calculated correlation coefficient is greater than a certain value (e.g., 0.6), the increase in the number of such messages is considered to be strongly correlated with the increase in link layer utilization.
[0056] Optionally, taking the link layer utilization as the channel utilization as an example, the Spearman correlation coefficient can be obtained in the following manner based on the number of messages corresponding to the multiple sampling time periods and the channel utilization corresponding to the multiple sampling time periods:
[0057] Step S1041, obtain the message quantity data corresponding to multiple sampling periods, recorded as X i (i=1,2,…,n), where n is the total number of multiple sampling periods. Obtain the channel utilization data corresponding to each of the multiple sampling periods, recorded as Y i .
[0058] Step S1042, sorting and ranking: sort the data of X and Y respectively. Assign ranks to the sorted data of X and Y respectively, and obtain n pairs of observations: (X1, Y2), (X2, Y2), ..., (X n ,Y n ), which is the position of each data in the sorted list. If there are repeated values in the data, their rank is the average rank of these repeated values.
[0059] Step S1043, calculate the rank difference: for each pair of observations in X and Y, calculate the absolute value of their rank difference, denoted as di.
[0060] Step S1044, calculate Σdi2: calculate the sum of the squares of all rank differences to obtain Σdi2.
[0061] Step S1045, calculate the Spearman correlation coefficient ρ by the following formula: ρ=1-(6*Σdi2) / (n*(n2-1)), where the value of ρ is between -1 and 1, indicating the rank correlation between the two variables.
[0062] In an optional embodiment, based on the correlation, determining whether the target device has abnormal sending behavior includes: when the correlation is greater than a preset correlation threshold, determining that the target device has abnormal sending behavior; when the correlation is less than or equal to the preset correlation threshold, determining that the target device does not have abnormal sending behavior.
[0063] Optionally, in the case where the correlation is the correlation score result between the number of messages and the current link layer utilization, a preset correlation threshold can be set as a benchmark for judging abnormal behavior. When the correlation between the number of target messages sent by the target device and the current link layer utilization exceeds this threshold, the sending behavior of the target device is considered abnormal. By setting the correlation threshold, it is possible to more accurately identify devices that cause excessive consumption of network resources due to the sending of target messages, avoiding incorrect flow limiting of normal devices. It should be noted that the preset correlation threshold can be adjusted according to the actual situation of the communication network, service requirements and historical data to ensure the flexibility and adaptability of the strategy to cope with various network environments and traffic patterns, which are not specifically limited here.
[0064] Step S106, when the target device has abnormal sending behavior, determining a target threshold value for message flow limiting on the target device;
[0065] In step S106 of the present application, once the abnormal sending behavior of the target device is confirmed, a target threshold value needs to be calculated as a basis for subsequent current limiting operations.
[0066] Optionally, the threshold value can be determined based on the overall status of the network to which the target device belongs (such as link layer utilization), the severity of abnormal behavior, historical suppression effects, and one or more of other control parameters. By adjusting the threshold value, it is possible to adapt to changes in network traffic, protect network resources, and avoid interference with normal services. This not only helps to improve network stability and service quality, but also enhances the network's defense capabilities against abnormal traffic.
[0067] In an optional embodiment, determining a target threshold value for message flow limiting for a target device includes: determining a target message type of a target message; determining a threshold value corresponding to the target message type among multiple threshold values as the target threshold value, wherein the multiple threshold values correspond one-to-one to the multiple message types.
[0068] Optionally, by setting an independent threshold value for each type of multicast message, it helps to allocate network resources more reasonably. For example, for MDNS groupcast messages with high resource occupancy, a lower threshold value can be set, while for specific types of multicast messages with low resource occupancy, a higher threshold value can be set, thereby avoiding excessive consumption of resources. By identifying the type of target message, it is possible to accurately determine whether the message sending behavior of the target device generates multicast message traffic that has a greater impact on network performance without affecting other types of messages. The above method can not only improve the accuracy of flow control, but also avoid unnecessary global flow limiting. By specifically limiting the types of multicast messages with high resource occupancy, it helps to reduce network congestion, optimize link layer utilization, and thus improve the overall performance of the communication network and data transmission efficiency. By setting independent threshold values for different types of multicast messages, the network can adaptively adjust the flow limiting strategy according to the actual traffic situation and the dynamic changes of network resources, thereby improving the flexibility and effectiveness of the strategy. By identifying and limiting specific types of multicast packets, the network's ability to defend against attacks can be enhanced, such as preventing ARP broadcast storms and MDNS multicast abuse, thereby protecting the network from potential threats.
[0069] Optionally, the multiple message types may include but are not limited to ARP broadcast messages, MDNS multicast messages, SSDP multicast messages, etc.
[0070] In an optional embodiment, before determining the threshold value corresponding to the target message type among multiple threshold values as the target threshold value, the method also includes: obtaining a threshold control parameter corresponding to any message type in the current time period, wherein the threshold control parameter includes at least one of the following: the restriction intensity of restricting messages of any message type, the correlation between the number of messages and the current link layer utilization, and a reward factor, the reward factor being used to indicate the message suppression effect of any message type in a historical time period, the historical time period being the time period before the current time period, and the current link layer utilization being the link layer utilization of the communication network to which the target device belongs in the current time period; based on the threshold control parameter, determining any threshold value corresponding to any message type.
[0071] It can be understood that before determining the target threshold value, the threshold control parameters corresponding to any message type are obtained, including one or more of the restriction strength, the correlation between the number of messages and the link layer utilization, and the reward factor. These threshold control parameters can jointly drive the dynamic adjustment of the threshold value, so that the flow control strategy can respond more accurately to changes in the network environment. By considering the restriction strength, correlation and reward factor, the threshold value can be adaptively adjusted based on the current network status and historical suppression effect. This means that the flow limiting strategy can not only identify and respond to current abnormal traffic, but also optimize based on the execution effect of past strategies to improve the effectiveness of flow limiting measures. The target threshold value obtained in the above manner can be dynamically adjusted according to the actual traffic situation and resource utilization level, so it can be understood as a "dynamic threshold value."
[0072] In the above methods, by considering the threshold control parameters, the flow control strategy can be intelligently adjusted according to the actual traffic situation and resource usage level to avoid network overload, improve data transmission efficiency and network stability. The introduction of threshold control parameters can also enable the network to dynamically adjust the threshold value to avoid resource waste and excessive flow control, and ensure efficient use of network resources. For example, if the measures to limit MDNS multicast messages in the past have been effective, then its threshold value can be further lowered to reduce resource consumption. The use of reward factors, based on the message suppression effect in historical time periods, can help the network intelligently identify which types of multicast messages require stricter restrictions, thereby enhancing the defense capability against potential network attacks. The dynamic adjustment of threshold control parameters provides flexibility for network management, allowing the network to flexibly adjust the flow control threshold according to the real-time monitored message type, quantity and link layer utilization, as well as the execution of the flow control strategy in the past, to ensure the effectiveness and adaptability of the strategy.
[0073] Optionally, a static threshold value (e.g. 128) can be set in advance for each type of message regardless of the environment. With the static threshold as a fallback measure, a fixed threshold value can be automatically applied to limit the number of each type of message before the threshold value is dynamically adjusted or when the dynamic threshold strategy fails. This provides a basic safety net for the entire strategy, preventing the network link (such as the channel) from being fully occupied when a large number of multicast messages burst in, causing other important messages to be unable to pass, thereby protecting the connectivity and bandwidth resources of the communication network and ensuring that the network will not be completely paralyzed due to multicast message overload under any circumstances.
[0074] Optionally, when determining any threshold value corresponding to any message type based on the threshold control parameter, the threshold value can be determined based on one or more threshold control parameters. The threshold value can be used in any current limiting algorithm, including but not limited to a counter algorithm, a sliding time window algorithm, a leaky bucket algorithm, a token bucket algorithm, etc.
[0075] Optionally, when determining the threshold value based on a threshold parameter, any threshold value corresponding to any message type can be dynamically determined based on the restriction intensity of restricting messages of any message type in the current time period. Specifically, the restriction intensity can be divided into three modes: strong restriction, ordinary restriction, and weak restriction. Different intensity modes correspond to different threshold values. For example, when the restriction intensity is ordinary restriction, the threshold value corresponding to the ordinary mode is used as any threshold value corresponding to any message type. It is also possible to dynamically determine any threshold value corresponding to any message type based on the correlation between the number of messages and the current link layer utilization. The greater the correlation, the greater the impact of the sending of this type of message on network performance. At this time, the threshold value of this type of message is set based on the correlation. For example, if the correlation is large, a smaller threshold value is set; if the correlation is small, a larger threshold value is set, thereby avoiding network congestion while improving network resource utilization.
[0076] Optionally, any threshold value corresponding to any message type can also be dynamically determined based on the reward factor. The reward factor is used to indicate the message suppression effect of any message type in the historical period. If the reward factor is greater than 0, it indicates that the suppression is effective, otherwise the suppression is invalid. The threshold value (i.e., any threshold value) for limiting any message type in this round can be determined based on the message suppression effect of any message type in the historical period. For example, the threshold value and the duration of flow limiting for such messages can be set according to the value of the reward factor. For example, if the message suppression effect is effective suppression, the threshold value for limiting such messages can be maintained or reduced, and / or the duration of limiting such messages can be increased; if the message suppression effect is invalid suppression, it may mean that the current suppression strategy is too strict, affecting normal communication, or the current network conditions do not require such severe suppression, and the threshold value for limiting such messages can be appropriately increased, and / or the duration of limiting such messages can be reduced, thereby achieving flexible control of dynamic threshold values.
[0077] Optionally, the threshold value may be determined based on two threshold control parameters. For example, any threshold value corresponding to any message type may be determined based on a combination of restriction strength and reward factor.
[0078] In an optional embodiment, when the threshold control parameters include restriction strength and reward factor, determining any threshold value based on the threshold control parameters includes: determining a basic threshold value based on the restriction strength; and obtaining any threshold value based on the basic threshold value and reward factor.
[0079] Optionally, a basic threshold value can be obtained based on the restriction strength. For example, strong restriction, ordinary restriction, weak restriction, the restriction strength determines the global suppression strategy and the change plan of threshold increase and decrease, and different restriction strengths correspond to different basic threshold values; the basic threshold value is further modified by the reward factor, and any threshold value obtained on this basis not only takes into account the current network status, but also draws on the historical flow limiting effect, which improves the adaptability and intelligence of the threshold setting.
[0080] Optionally, any threshold value corresponding to any message type may be obtained by any of the following methods, but is not limited to, based on the basic threshold value and the reward factor:
[0081] The arbitrary threshold value is obtained by weighted average. Specifically, the reward factor can be regarded as a weight, and the basic threshold value is adjusted according to the weight. For example, if the reward factor is a positive number, it means that the suppression effect of the previous cycle is good, and a certain proportion of the basic threshold value can be reduced as the new threshold value, otherwise a certain proportion of the basic threshold value can be increased.
[0082] The threshold value is obtained by multiplication adjustment. Specifically, the reward factor is directly multiplied by the basic threshold value to obtain the adjusted threshold value. The reward factor can be a positive number less than 1, indicating a decrease in the threshold value; it can also be a positive number greater than 1, indicating an increase in the threshold value; or it can be a negative number, indicating that the threshold value needs to be adjusted in the opposite direction.
[0083] The threshold value is obtained by adjusting the algorithm logic. Specifically, a complex algorithm can be designed to take the reward factor and the basic threshold value as input, and the final threshold value can be determined by the algorithm logic. For example, a machine learning model is used to predict the future network status and adjust the threshold value accordingly.
[0084] The arbitrary threshold value is obtained based on the piecewise function adjustment method. Specifically, different threshold value adjustment functions corresponding to different reward factor thresholds can be set, and a suitable function is selected for adjustment according to the value of the current reward factor.
[0085] The arbitrary threshold value is obtained by threshold comparison and adjustment. Specifically, the reward factor is compared with a preset threshold, and the basic threshold value is adjusted according to the comparison result. For example, if the reward factor exceeds a certain positive threshold, the basic threshold value is lowered; if it is lower than a certain negative threshold, the basic threshold value is increased.
[0086] Optionally, any threshold value corresponding to any message type can also be determined comprehensively based on the restriction strength, relevance and reward factor of any message type in the current time period. For example, any threshold value corresponding to any message type can be obtained by weighted calculation based on the restriction strength, relevance and reward factor of any message type in the current time period. Specifically, the correspondence between the restriction strength mode and the threshold value, the correspondence between different relevance value ranges and the threshold value, and the correspondence between different reward factor value ranges and the threshold value can be pre-set; based on the above correspondence, the restriction strength mode, the corresponding relevance value range and the corresponding reward factor value range of any message type in the current time period can be obtained; the restriction strength mode, the corresponding relevance value range and the corresponding reward factor value range of any message type in the current time period are weightedly calculated to obtain any threshold value corresponding to any message type.
[0087] In an optional embodiment, the method further includes: obtaining a current link layer utilization of the communication network to which the target device belongs, wherein the current link layer utilization is a link layer utilization of the communication network in a current period; and determining a restriction strength based on the current link layer utilization.
[0088] It can be understood that by obtaining the current link layer utilization in real time, the network equipment can immediately respond to the use of network resources. The mechanism for determining the restriction strength based on the current link layer utilization can be adaptively changed according to the actual load of the network, rather than being fixed. By dynamically adjusting the restriction strength, resources can be managed more effectively, avoiding excessive current limiting at low loads and resulting in waste of resources, as well as network congestion caused by failure to limit the current in time at high loads.
[0089] Optionally, the current link layer utilization can be obtained by averaging multiple link layer utilizations collected during the current period, or by median filtering multiple link layer utilizations collected during the current period. Specifically, the current link layer utilization is obtained by median filtering multiple link layer utilizations collected during the current period, including: evenly dividing the current period into multiple sampling periods, and recording multiple link layer utilizations corresponding to the target device during the multiple sampling periods; sorting the multiple link layer utilizations, and selecting the middle value in the sorting result as the current link layer utilization for determining the limiting strength. When the number of multiple sampling periods is an even number, the middle value is the average of the two middle link layer utilizations in the sorting result.
[0090] Optionally, according to the monitoring results of the current link layer utilization, the restriction strength mode required for all message types is set. For example, it can be divided into strong restriction, ordinary restriction, and weak restriction. The restriction strength determines the global suppression strategy and the change plan of the threshold increase and decrease. The specific algorithm is omitted. For example, when the mean value of the link layer utilization after median filtering (that is, the current link layer utilization) is greater than 70%, the current restriction strength mode can be set to the strong restriction mode.
[0091] In an optional embodiment, the method also includes: obtaining the message discard rate and historical link layer utilization of any message type in a historical time period; determining the change in link layer utilization of the current link layer utilization in the current time period relative to the historical link layer utilization; and obtaining a reward factor based on the message discard rate and the change in link layer utilization.
[0092] It can be understood that by analyzing the packet discard rate and link layer utilization rate in the historical period, the effect of the past flow control measures can be obtained, that is, the reward factor reflects the effectiveness of the flow control strategy in the previous week. By adjusting the threshold value based on the reward factor, the network flow control strategy can be optimized, invalid or excessive flow control can be reduced, and the accuracy of the flow control can be improved. Through the adjustment of the reward factor, the flow control strategy of the communication network can better adapt to user needs, reduce the impact on normal services, and effectively suppress abnormal traffic and optimize user experience.
[0093] Optionally, based on the proportion of a certain type of message discarded in the historical period (i.e., the message discard rate) and the corresponding change in link layer utilization, a reward factor for the effect of suppressing the message of this type is obtained. The reward factor can be directly obtained based on the product of the message discard rate corresponding to the historical period and the change in link layer utilization. The historical period can also be evenly divided into multiple sampling periods, and the message discard rate and link layer utilization change corresponding to the multiple sampling periods are respectively counted to obtain the local reward factors corresponding to the multiple sampling periods; the local reward factors corresponding to the multiple sampling periods are summed and calculated to obtain the total reward factor for determining the dynamic threshold value. For example, taking the link layer utilization as the channel utilization, during a sampling period, 6% of the messages of this type in the current sampling period are discarded, and the channel utilization is increased by 2% (i.e., the change in channel utilization is 2%). At this time, the local reward factor of the sampling period can be calculated as (+6)*(+2)=12.
[0094] Step S108: performing message flow limiting on the target device based on the target threshold value.
[0095] In step S108 of the present application, after the target threshold value is determined, the message sending of the target device is limited according to the target threshold value. After the implementation of current limiting, the consumption of network resources by abnormal devices can be reduced, network congestion can be avoided, and delay and packet loss rate can be reduced, thereby optimizing network performance and improving the user experience when conducting online activities. At the same time, current limiting can be used as one of the means of network protection, reducing the chance of network attacks and enhancing the overall security of the network.
[0096] Optionally, the flow limiting measures may include but are not limited to setting a transmission rate upper limit, limiting the number of messages, adjusting the priority or filtering messages. It is also possible to limit the message flow of the target device based on the target threshold value through a corresponding flow limiting algorithm, which may include but is not limited to a counter algorithm, a sliding time window algorithm, a leaky bucket algorithm, a token bucket algorithm, etc.
[0097] In an optional embodiment, performing message flow limiting on a target device based on a target threshold value includes: determining a first flow limiting duration for performing message flow limiting on the target device based on a correlation; and performing message flow limiting on the target device based on the target threshold value and the first flow limiting duration.
[0098] It can be understood that the first flow limiting duration is dynamically determined based on the relevance, which means that the network device can flexibly adjust the flow limiting time according to the intensity of the impact of the multicast message on the link layer utilization to achieve the best suppression effect. On the basis of determining the threshold value, the flow control is further combined with the flow limiting duration, so that the two parameters of the threshold value and the flow limiting duration act together on the message flow limiting of the target device, thereby enhancing the flexibility and effectiveness of the flow limiting strategy. By implementing a longer flow limiting duration for target devices with high multicast message relevance, network resources can be more effectively protected to avoid abnormal increases in link layer utilization due to too many multicast messages, thereby avoiding network congestion.
[0099] Optionally, the first current limiting duration may be proportional to the relevance. The higher the relevance, the longer the corresponding first current limiting duration, and the longer the duration of message current limiting on the target device. The first current limiting duration may be characterized by an aging time, which is used to identify the time when message suppression is required. When an increase in the number of target messages sent by the target device is strongly correlated with an increase in link layer utilization, the target message is marked as relevant and the aging time is updated. Marking as relevant means that such messages are continuously suppressed within the aging time (e.g., 180 seconds).
[0100] In an optional embodiment, message flow limiting is performed on a target device based on a target threshold value, including: when limiting messages of any message type is effective for multiple consecutive historical time periods, determining a second flow limiting duration for message flow limiting on the target device, wherein the multiple consecutive historical time periods include a historical time period and at least one time period before the historical time period; and based on the target threshold value and the second flow limiting duration, performing message flow limiting on the target device.
[0101] Optionally, under the premise that the current limiting is effective within a continuous period, a second current limiting duration can be determined. For example, the current limiting measures can be implemented on the target device for a longer period of time to ensure the stability of the network and the effective use of resources. Long-term current limiting for persistent abnormal behavior helps to reduce network congestion, improve the overall stability of the network, and ensure service quality. By analyzing the current limiting effects of multiple continuous historical periods, the current limiting strategy can be continuously adjusted and optimized to improve the response speed and processing capabilities for abnormal message sending behaviors, thereby ensuring the long-term healthy operation of the network. The dynamic adjustment of the current limiting duration ensures the rational allocation of network resources, avoids excessive consumption of network bandwidth and other resources by abnormal messages, and improves the efficiency of resource utilization.
[0102] Optionally, the second current limiting duration can be characterized by an aging time. If the strategy of suppressing multicast messages is determined to be effective by several consecutive statistics (for example, three times), the setting of the second current limiting duration should be to ensure that this effective strategy can continue to work until the network conditions change or such strict suppression is no longer needed. Therefore, when three or more consecutive statistics show that the suppression strategy is effective, a longer aging time can be set. The extension of the aging time means that once a certain type of message is marked as relevant and a suppression measure is imposed, the suppression measure will continue to be executed for a longer period of time, even if the number of multicast messages may have decreased in the current period, or the link layer utilization has returned to normal. The purpose of this is to prevent the rapid rebound of network congestion problems and ensure network stability. Even if some effects are achieved in the early stage of the suppression measures, if the suppression is immediately canceled or weakened, it may lead to the immediate recurrence of network problems, especially for those devices that may send a large number of messages periodically or regularly. On the other hand, if the suppression measures are determined to be invalid, it may mean that the current suppression strategy is too strict, affecting normal communication, or the current network conditions do not require such severe suppression. In this case, the aging time can be set shorter to re-evaluate the network status and adjust the policy more quickly. If the network status improves in the next statistical cycle, or a more reasonable and effective suppression threshold is found, the suppression measures can be canceled or weakened more quickly to reduce the impact on normal network services.
[0103] For example, the restriction can be determined to be effective when the total reward factor is greater than 0, otherwise it can be determined to be invalid. The previous statistics (i.e., historical period) determining whether the suppression is effective / ineffective will determine whether the suppression is strengthened or weakened this time (i.e., current period). When several consecutive statistics (e.g., three times, such as the historical period and the two periods before the historical period) are all determined to be effective, such messages can be marked as having a large correlation with the link layer utilization (such as channel utilization), and such messages can be marked as relevant, and the flow of such messages can be limited by updating the aging time, where marking as relevant means that such messages are continuously suppressed within the aging time (e.g., 180 seconds).
[0104] Through the above steps S102 to S108, it is possible to identify devices that excessively send target messages and suppress them in a targeted manner, so that the actual throughput of message transmission does not collapse due to unnecessary packet sending by individual devices, thereby achieving the technical effect of reducing the node burden when sending target messages and avoiding network congestion, thereby solving the technical problems in related technologies of increased node burden and easy occurrence of network congestion when sending target messages.
[0105] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation of a message control method. In this embodiment, the link layer utilization is the channel utilization, and the corresponding application scenario is a wireless local area network scenario as an example. The method includes:
[0106] S1, a static threshold (for example, 128) is set for each of several message types (for example, ARP broadcast message, MDNS multicast message, SSDP multicast message) regardless of the environment and policy.
[0107] S2, continuously performing monitoring and statistical operations, and evenly obtaining several times (for example, 9 times) of channel utilization, the number of various messages sent by each device in the communication network, and the number of various messages passed in each statistical operation.
[0108] S3, each time a new statistics starts, set a new threshold value for each type of message. Among them, the dynamic threshold value will only change and take effect when the message type is marked as relevant. Specifically:
[0109] S31, for all messages, according to the monitoring results of channel utilization, set the intensity mode that all message types need to be restricted, for example, it can be divided into strong restriction, ordinary restriction, and weak restriction. The intensity determines the change plan of the global suppression strategy and the increase and decrease of the threshold. The specific algorithm is omitted; for example, when the mean value of the channel utilization after median filtering (i.e., the current utilization) is greater than 70%, the current restriction intensity mode is set to the strong restriction mode;
[0110] S32, for a single message:
[0111] The previous statistics (i.e., historical period) are evenly divided into several (e.g., 9) sampling phases, and the Spearman correlation coefficient is calculated for the collected data, i.e., the number of incoming multicast messages of this type and the channel utilization rate of the corresponding period. When the calculated correlation coefficient is greater than a certain value (e.g., 0.6), the increase in the number of such messages is considered to be strongly correlated with the increase in channel utilization, and the message is marked as relevant and the aging time is updated. Marking as relevant means that such messages are continuously suppressed within the aging time (e.g., 180s);
[0112] According to the proportion of a certain type of message discarded in each sampling period in the previous statistics (i.e., the message discard rate) and the corresponding channel utilization change, the reward factor of the effect of suppressing this type of message is obtained. For example, in a statistics, during the first sampling period, 6% of this type of message in this cycle was discarded, and the channel utilization rate increased by 2%. At this time, the local reward factor of this sampling period can be calculated as (+6)*(+2)=12. When the total reward factor is greater than 0, it is determined that the restriction is effective.
[0113] The restriction can be determined to be effective when the total reward factor is greater than 0, otherwise it is determined to be invalid. The previous statistical determination of whether the suppression is effective or invalid will determine whether the suppression is strengthened or weakened this time. When the statistics are determined to be effective for several consecutive times (for example, three times), such messages can be marked as relevant and the aging time can be updated;
[0114] S4, after the above steps S1 to S3, the dynamic threshold value of each type of message in the current statistical period (i.e., the current period) can be obtained. When a certain type of message is marked as relevant, the dynamic threshold value of the message of this type can play a role. For example, the threshold can be used as the number threshold of the number of messages of this type that can pass through a single device per second, that is, the single device threshold. The total number of messages of this type that can pass through all devices per second can be set to several times (for example, 5 times) the single device threshold.
[0115] It should be noted that this embodiment involves three threshold control parameters: limit intensity level, correlation coefficient, and inhibition effect (ie, reward factor). Figure 4It is a logical relationship diagram between optional threshold control parameters according to an embodiment of the present invention, wherein the channel utilization rate determines the restriction strength level for all messages, the restriction strength level, the correlation coefficient mentioned above, and the suppression effect (i.e., the reward factor) affect the threshold change limit of a single message, and the threshold of a single message affects the amount of messages of this type passing through a single device per unit time. During the detection process, the restriction strength level will be dynamically updated according to the channel utilization rate in different time periods, and a new restriction strength new level will be obtained for the dynamic update of the threshold value, and a new threshold value new limit will be obtained. Through the dynamic update of the restriction strength level, the correlation coefficient, and the suppression effect, the dynamic update of the threshold values corresponding to different types of messages is realized.
[0116] As an optional embodiment, the dynamic threshold can capture the excessive sending of typical multicast messages (such as ARP messages, MDNS messages, and SSDP messages) by some devices in the communication network.
[0117] For example, in a test, the client sends 64 bytes of 133 packets per second (pps) of MDNS type messages. Since the number is obviously correlated with the channel utilization (in this case, the correlation coefficient is greater than 0.6), the node marks it as relevant and suppresses it when the channel utilization meets the conditions. In the actual user environment, sometimes the MDNS traffic is 40 to 50 pps, which is a serious network congestion, and sometimes it takes 100 to 200 pps to show serious network congestion. This uncertainty is the significance of setting the threshold as a dynamic rather than a fixed value. In this embodiment, the single client threshold of the MDNS message is gradually reduced to the preset minimum value of 5 due to the high channel utilization (tests show that this threshold value does not affect the use experience of other clients, such as automatic devices, digital media players, Internet of Things and other devices). The channel utilization is limited to a reasonable range due to negative feedback, and the throughput is maintained at the level of no packet transmission, while the throughput of the firmware without modification drops from 409 Mbps to 339 Mbps. Therefore, the performance of this embodiment is significantly improved in this case.
[0118] Since the messages marked as relevant are set with an aging time countdown, regular burst message sending behavior or continuous multicast / broadcast messages occupying too many channels can be effectively suppressed. Figure 5 FIG. 1 is a schematic diagram showing a comparison of an optional dynamic threshold before and after it is turned on according to an embodiment of the present invention. Figure 5As shown, compared with before the dynamic threshold is opened, after the dynamic threshold is opened based on the method of this embodiment, the channel utilization is more stable and there is no excessive occupancy. This embodiment can ensure a certain memory, reduce the communication medium and network resource occupation of the intranet device from the source, protect the intranet connectivity, and also help prevent the problem of loop storm.
[0119] It is still necessary to explain that, in this embodiment, for the protection of network resources, the number of multicast messages of several specified types (for example, ARP broadcast messages, MDNS multicast messages, SSDP multicast messages) is monitored. When the number of such messages sent by a client reaches the current limiting algorithm related to the threshold value, the current limiting operation will be taken. This threshold value will be dynamically adjusted according to the current channel utilization, the correlation coefficient between the amount of such messages and the channel utilization, and the suppression effect of the previous setting of the threshold. The threshold values of different types of messages are calculated independently. Since the threshold is directly for a single client, the normal use of devices that do not endanger the connectivity of the intranet will not be affected.
[0120] In this embodiment, a communication device is also provided, and the communication device is used to execute any one of the above-mentioned message control methods.
[0121] In this embodiment, a message control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the terms "module" and "device" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0122] According to an embodiment of the present invention, there is also provided an apparatus embodiment for implementing the above-mentioned message control method. Figure 6 is a schematic diagram of the structure of a message control device according to an embodiment of the present invention. Figure 6 As shown, the message control device includes: a message quantity acquisition module 600, an abnormality detection module 602, a threshold value determination module 604, and a message flow limiting module 606, wherein:
[0123] The message quantity acquisition module 600 is used to acquire the message quantity of the target message sent by the target device in the current period;
[0124] The abnormality detection module 602 is connected to the message quantity acquisition module 600 and is used to determine whether the target device has abnormal sending behavior based on the message quantity;
[0125] The threshold value determination module 604 is connected to the abnormality detection module 602 and is used to determine the target threshold value for message flow limiting of the target device when the target device has abnormal sending behavior;
[0126] The message flow limiting module 606 is connected to the threshold value determining module 604 and is used to perform message flow limiting on the target device based on the target threshold value.
[0127] In an embodiment of the present invention, a message quantity acquisition module 600 is set to obtain the message quantity of the target message sent by the target device in the current time period; an anomaly detection module 602 is connected to the message quantity acquisition module 600, and is used to determine whether the target device has abnormal sending behavior based on the message quantity; a threshold value determination module 604 is connected to the anomaly detection module 602, and is used to determine the target threshold value for message flow limiting of the target device when the target device has abnormal sending behavior; a message flow limiting module 606 is connected to the threshold value determination module 604, and is used to limit the message flow of the target device based on the target threshold value, thereby achieving the purpose of identifying devices that excessively send target messages and suppressing them in a targeted manner, so that the actual throughput of message transmission does not collapse due to unnecessary packet sending of individual devices, thereby achieving the technical effect of reducing the node burden existing when the target message is sent and avoiding network congestion, thereby solving the technical problems of increased node burden and easy occurrence of network congestion when sending target messages in related technologies.
[0128] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0129] It should be noted that the above-mentioned message quantity acquisition module 600, anomaly detection module 602, threshold value determination module 604, and message flow limiting module 606 correspond to steps S102 to S108 in the embodiment, and the above-mentioned modules and corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned embodiment. It should be noted that the above-mentioned modules can be run in a computer terminal as part of the device.
[0130] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in the embodiment, which will not be repeated here.
[0131] The above-mentioned message control device may also include a processor and a memory. The above-mentioned message quantity acquisition module 500, anomaly detection module 502, threshold value determination module 504, message current limiting module 506, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions.
[0132] According to an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned message control methods.
[0133] According to an embodiment of the present invention, an electronic device is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein when the program is run, any one of the above-mentioned message control methods is executed.
[0134] According to an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the steps of any one of the above-mentioned message control methods.
[0135] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.
[0136] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0137] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.
[0138] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0139] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.
[0140] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0141] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A message control method, characterized in that: The method comprises: Acquire the number of target messages sent by the target device in the current time period, wherein the target message is a data packet sent from the target device to one or more other devices; Based on the number of messages, determining whether the target device has abnormal sending behavior; In the case where the target device has abnormal sending behavior, determining a target threshold value for message flow limiting for the target device; Perform message flow limiting on the target device based on the target threshold value.
2. The method according to claim 1, characterized in that The determining, based on the number of messages, whether the target device has abnormal sending behavior includes: Acquire a current link layer utilization rate of the communication network to which the target device belongs, wherein the current link layer utilization rate is a link layer utilization rate of the communication network in the current time period; Determining the correlation between the number of packets and the current link layer utilization; Based on the correlation, it is determined whether the target device has abnormal sending behavior.
3. The method according to claim 2, characterized in that The determining, based on the correlation, whether the target device has abnormal sending behavior includes: When the correlation is greater than a preset correlation threshold, determining that the target device has abnormal sending behavior; When the correlation is less than or equal to the preset correlation threshold, it is determined that the target device does not have abnormal sending behavior.
4. The method according to claim 2, characterized in that: The performing message flow limiting on the target device based on the target threshold value includes: Based on the correlation, determining a first flow limiting duration for performing message flow limiting on the target device; Based on the target threshold value and the first current limiting duration, message current limiting is performed on the target device.
5. The method according to claim 1, characterized in that The determining a target threshold value for message flow limiting on the target device includes: Determining a target message type of the target message; A threshold value corresponding to the target message type among a plurality of threshold values is determined as the target threshold value, wherein the plurality of threshold values correspond one-to-one to a plurality of message types.
6. The method according to claim 5, characterized in that Before determining the threshold value corresponding to the target message type among the multiple threshold values as the target threshold value, the method further includes: Acquire a threshold control parameter corresponding to the current time period and any message type, wherein the threshold control parameter includes at least one of the following: a restriction intensity for restricting messages of the any message type, a correlation between the number of messages and the current link layer utilization, and a reward factor, wherein the reward factor is used to indicate a message suppression effect of the any message type in a historical time period, wherein the historical time period is a time period before the current time period, and the current link layer utilization is a link layer utilization of the communication network to which the target device belongs in the current time period; Based on the threshold control parameter, any threshold value corresponding to any message type is determined.
7. The method according to claim 6, characterized in that In a case where the threshold control parameter includes the restriction strength and the reward factor, determining any threshold value based on the threshold control parameter includes: Based on the restriction strength, determining a basic threshold value; Based on the basic threshold value and the reward factor, any threshold value is obtained.
8. The method according to claim 6, characterized in that The method comprises: Acquire a current link layer utilization rate of the communication network to which the target device belongs, wherein the current link layer utilization rate is a link layer utilization rate of the communication network in a current period; Based on the current link layer utilization, the restriction strength is determined.
9. The method according to claim 6, characterized in that The method comprises: Obtaining a message discard rate and a historical link layer utilization rate of any message type in a historical period; Determine a link layer utilization change of a current link layer utilization during the current period relative to the historical link layer utilization; The reward factor is obtained based on the message discard rate and the link layer utilization change.
10. The method according to claim 6, characterized in that The performing message flow limiting on the target device based on the target threshold value includes: In a case where the restriction on the message of any message type is effective in multiple continuous historical time periods, determining a second flow limiting duration for message flow limiting on the target device, wherein the multiple continuous historical time periods include the historical time period and at least one time period before the historical time period; Based on the target threshold value and the second current limiting duration, message current limiting is performed on the target device.
11. A message control device, characterized in that: A message quantity acquisition module is used to acquire the message quantity of the target message sent by the target device in the current period; An anomaly detection module, used to determine whether the target device has abnormal sending behavior based on the number of messages; A threshold value determination module, used to determine a target threshold value for message flow limiting for the target device when the target device has abnormal sending behavior; The message flow limiting module is used to perform message flow limiting on the target device based on the target threshold value.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the message control method according to any one of claims 1 to 10.
13. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program executes the message control method described in any one of claims 1 to 10 when running.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the message control method according to any one of claims 1 to 10 are implemented.