Equipment control method, electronic equipment and computer readable storage medium
By analyzing the number of handshake messages in the messages received by the network device, predicting future workloads, and waking up the data transmission unit when the wake-up condition is met, the problem that the network device cannot respond to burst data transmission needs in a timely manner, and achieving the effect of avoiding packet loss and improving the energy-saving effect of the equipment.
Patent Information
- Application Number
- CN202311581126.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2025-05-23
AI Technical Summary
Existing network devices cannot wake up the shutdown hardware in time when the burst data transmission volume arrives, resulting in the inability to respond to data transmission needs in time, resulting in packet loss and other problems.
By analyzing the number of handshake messages in the received message, predicting the future workload of the network device. When the number of handshake messages reaches the wake-up condition, the data transmission unit is awakened to avoid packet loss.
It realizes the timely wake-up of the data transmission unit in the network device when the peak of the transmitted data arrives, avoiding packet loss problems, and at the same time, the data transmission unit is turned off when the data volume is small, improving the energy-saving effect of the equipment.
Smart Images

Figure CN120034891A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a device control method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the explosive growth of communication data, the energy consumption of network devices such as routers and switches is increasing. At present, in order to reduce the energy consumption of network devices, network devices can shut down some hardware (such as switching network boards, optical modules, etc.) when the amount of data transmitted is low to achieve energy saving, and wake up this part of the hardware when the amount of data transmitted increases to restore normal working state and perform normal data transmission.
[0003] Currently, when a burst of transmission data arrives, network equipment cannot wake up the shut-down hardware in time, and thus cannot respond to the burst of data transmission needs in time, resulting in problems such as packet loss. Summary of the invention
[0004] The present application provides a device control method, an electronic device and a computer-readable storage medium, which predicts the future workload of a network device by the number of handshake messages, and can wake up the data transmission unit in the network device in time to avoid problems such as packet loss.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, a device control method is provided, which is applied to a network device, wherein the network device includes one or more data transmission units, and the method includes: obtaining the number of handshake messages based on received messages; and waking up at least one of the one or more data transmission units when the number of handshake messages reaches a wake-up condition.
[0007] For example, at least one of the one or more data transmission units can be awakened according to the number of handshake messages and a pre-defined energy saving strategy, wherein the energy saving strategy can be obtained by trend fitting according to the total number of messages and the number of handshake messages, and the energy saving strategy includes a wake-up condition for awakening the data transmission unit.
[0008] The solution provided in the first aspect above obtains the number of handshake messages based on the received messages, and then wakes up the data transmission unit in the network device according to the number of handshake messages. In this way, the future workload of the network device is predicted based on the number of handshake messages, and the peak of the transmission data can be accurately predicted. When the peak of the transmission data arrives, the data transmission unit in the network device is woken up in time to avoid packet loss.
[0009] As a possible implementation method, the number of handshake messages is obtained by counting the message types of the messages received within a preset time window. In this way, the future workload of the network device is predicted by the number of handshake messages, and the data transmission unit in the network device is awakened according to the prediction result, which can avoid the problem of packet loss when the peak arrives.
[0010] As a possible implementation, when the number of handshake messages reaches the wake-up condition, at least one of the one or more data transmission units is awakened, including: when the number of handshake messages is greater than the first threshold, N1 data transmission units are awakened; when the number of handshake messages is greater than the second threshold, M1 data transmission units are awakened; wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1. In this way, by setting different thresholds and awakening different numbers of data transmission units, the accuracy of control can be improved, and the data transmission units in the network device can be awakened in time when the peak of the transmission data arrives to avoid packet loss.
[0011] As a possible implementation, the method further includes: when the number of handshake messages reaches the shutdown condition, shutting down at least one of the one or more data transmission units. In this way, by setting the wake-up condition and the shutdown condition, the data transmission unit is shut down or awakened, and when the peak of the transmission data arrives, the data transmission unit in the network device can be awakened in time to avoid problems such as packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy saving effect of the device.
[0012] As a possible implementation, when the number of handshake messages reaches the shutdown condition, at least one of the one or more data transmission units is shut down, including: when the number of handshake messages is less than the third threshold, L1 data transmission units are shut down; when the number of handshake messages is less than the fourth threshold, K1 data transmission units are shut down; wherein the third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1. In this way, by setting different thresholds and shutting down different numbers of data transmission units, the accuracy of control can be improved, and while achieving the effect of deep energy saving, the data transmission units in the network device can be woken up in time when the peak of the transmission data arrives to avoid packet loss.
[0013] As a possible implementation, the method further includes: performing trend fitting according to the number of handshake messages, updating the energy saving strategy, the energy saving strategy including a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the shutdown condition and / or the wake-up condition are updated according to the number of handshake messages, so as to improve the accuracy of device control.
[0014] As a possible implementation method, the method also includes: sending the number of handshake messages to the control device; receiving an energy-saving strategy from the control device, the energy-saving strategy is obtained by performing trend fitting based on the number of handshake messages, and is updated based on the result of the trend fitting, and the energy-saving strategy at least includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the energy-saving strategy is updated by the number of handshake messages, so that when the network device controls the data transmission unit based on the energy-saving strategy, it can wake up the data transmission unit in the network device in time when the peak of the transmission data arrives to avoid packet loss problems. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy-saving effect of the device.
[0015] In a second aspect, a device control method is provided, which is applied to a network device, wherein the network device includes one or more data transmission units, and the method includes: obtaining device data of the network device, wherein the device data includes one or more of the following: hardware type, type of network service carried by the network device; when the device data meets the set conditions, obtaining the number of handshake messages, and when the number of handshake messages reaches the wake-up condition, waking up at least one of the one or more data transmission units; when the device data does not meet the set conditions, obtaining the number of newly added flow tables, and when the number of newly added flow tables reaches the wake-up condition, waking up at least one of the one or more data transmission units.
[0016] The hardware type of the network device may be the type of processor, and the type of processor represents the performance of the processor. When the performance of the processor is higher, the message parsing and forwarding capabilities of the network device are stronger. The network service type may be the service type of the service flow carried by the network device, and the service flow size of different network service types is different.
[0017] The solution provided in the second aspect above obtains the number of handshake messages or the number of newly added flow tables, and when the number of handshake messages or the number of newly added flow tables reaches the wake-up condition, the data transmission unit in the network device is awakened. In this way, the future workload of the network device is predicted based on the number of handshake messages or the number of newly added flow tables, the peak of the transmission data can be accurately predicted, and when the peak of the transmission data arrives, the data transmission unit in the network device can be awakened in time to avoid packet loss problems. And according to the device data of the network device, the method for waking up the data transmission unit is determined, so that the awakening method can be adapted to the performance of the network device, so that the network device can normally carry the service traffic corresponding to the network service type, further avoiding packet loss problems.
[0018] As a possible implementation method, the number of handshake messages is obtained by counting the message types of the messages received within a preset time window. In this way, the future workload of the network device is predicted by the number of handshake messages, and the data transmission unit in the network device is awakened according to the prediction result, which can avoid the problem of packet loss when the peak arrives.
[0019] As a possible implementation method, the number of newly added flow tables is obtained by counting the message identifiers of the messages received within a preset time window. In this way, the future workload of the network device is predicted by the number of newly added flow tables, and the data transmission unit in the network device is awakened according to the prediction result, which can avoid the problem of packet loss when the peak arrives.
[0020] As a possible implementation, the message identifier includes one or more of the following: source address information, destination address information, source port number, destination port number, and protocol type. By counting the newly added flow table by the message identifier, the accuracy of the number of newly added flow tables can be improved, and then the data transmission unit in the network device can be awakened by the number of newly added flow tables, which can avoid the problem of packet loss when the peak arrives.
[0021] As a possible implementation, waking up at least one of the one or more data transmission units includes: waking up N1 data transmission units when the number of handshake messages is greater than a first threshold, waking up M1 data transmission units when the number of handshake messages is greater than a second threshold, wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1; or waking up N2 data transmission units when the number of newly added flow tables is greater than a fifth threshold, and waking up M2 data transmission units when the number of newly added flow tables is greater than a sixth threshold, wherein the sixth threshold is greater than the fifth threshold, N2 and M2 are positive integers, and M2 is greater than N2. In this way, by setting different thresholds and waking up different numbers of data transmission units, the accuracy of control can be improved, and the data transmission units in the network device can be woken up in time when the peak of the transmission data arrives to avoid problems such as packet loss.
[0022] As a possible implementation, the method further includes: when the number of handshake messages reaches the shutdown condition, shutting down at least one of the one or more data transmission units; or, when the number of newly added flow tables reaches the shutdown condition, shutting down at least one of the one or more data transmission units. In this way, by setting the wake-up condition and the shutdown condition, the data transmission unit is shut down or awakened. When the peak of the transmission data arrives, the data transmission unit in the network device can be awakened in time to avoid problems such as packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy saving effect of the device.
[0023] As a possible implementation, shutting down at least one of the one or more data transmission units includes: shutting down L1 data transmission units when the number of handshake messages is less than the third threshold, shutting down K2 data transmission units when the number of handshake messages is less than the fourth threshold, wherein the third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1; or, shutting down L2 data transmission units when the number of newly added flow tables is less than the seventh threshold, shutting down K2 data transmission units when the number of newly added flow tables is less than the eighth threshold, wherein the seventh threshold is greater than the eighth threshold, L2 and K2 are positive integers, and L2 is less than K2. In this way, by setting different thresholds and shutting down different numbers of data transmission units, the accuracy of control can be improved. While achieving the effect of deep energy saving, the data transmission units in the network device can be woken up in time when the peak of the transmission data arrives to avoid problems such as packet loss.
[0024] As a possible implementation method, the method further includes: performing trend fitting according to the number of handshake messages and updating the energy-saving strategy; or performing trend fitting according to the number of newly added flow tables and updating the energy-saving strategy; wherein the energy-saving strategy includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, by updating the energy-saving strategy according to the number of handshake messages or the number of newly added flow tables, the accuracy of device control can be improved.
[0025] As a possible implementation method, the method also includes: sending the number of handshake messages to the control device, or sending the number of newly added flow tables to the control device; receiving an energy-saving strategy from the control device, the energy-saving strategy is updated according to the result of trend fitting based on the number of handshake messages, or the energy-saving strategy is updated according to the result of trend fitting based on the number of newly added flow tables; wherein the energy-saving strategy at least includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the energy-saving strategy is updated by the number of handshake messages or the number of newly added flow tables, so that when the network device controls the data transmission unit based on the energy-saving strategy, it can wake up the data transmission unit in the network device in time when the peak of the transmission data arrives to avoid problems such as packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy-saving effect of the device.
[0026] As a possible implementation, the setting conditions include one or more of the following: the hardware type of the network device can support the service flow of the network service type, the hardware type is one of the set hardware types, and the network service type is one of the set service types. In this way, according to the device data and setting conditions of the network device, the method for waking up the data transmission unit is determined, so that the wake-up method can be adapted to the performance of the network device, so that the network device can normally carry the service flow corresponding to the network service type, ensure the data forwarding performance, and further avoid the packet loss problem.
[0027] In a third aspect, a device control device is provided, which is applied to a network device, wherein the network device includes one or more data transmission units, and the device control device includes a statistical module and an execution module; wherein the statistical module is used to obtain the number of handshake messages; and the execution module is used to wake up at least one of the one or more data transmission units when the number of handshake messages reaches a wake-up condition.
[0028] As an example, the execution module may also be used to obtain the number of handshake messages, and wake up at least one of the one or more data transmission units when the number of handshake messages reaches a wake-up condition.
[0029] The solution provided in the third aspect above predicts the future workload of the network device based on the number of handshake messages, can accurately predict the peak of transmitted data, and when the peak of transmitted data arrives, promptly wake up the data transmission unit in the network device to avoid packet loss problems.
[0030] As a possible implementation method, the number of handshake messages is obtained by counting the message types of the messages received within a preset time window. In this way, the future workload of the network device is predicted by the number of handshake messages, and the data transmission unit in the network device is awakened according to the prediction result, which can avoid the problem of packet loss when the peak arrives.
[0031] As a possible implementation, the execution module is used to wake up N1 data transmission units when the number of handshake messages is greater than a first threshold; wake up M1 data transmission units when the number of handshake messages is greater than a second threshold; wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1. In this way, by setting different thresholds and waking up different numbers of data transmission units, the accuracy of control can be improved, and the data transmission units in the network device can be woken up in time when the peak of the transmission data arrives, avoiding problems such as packet loss.
[0032] As a possible implementation, the execution module is used to shut down at least one of the one or more data transmission units when the number of handshake messages reaches the shutdown condition. In this way, by setting the wake-up condition and the shutdown condition, the data transmission unit is shut down or awakened. When the peak of the transmission data arrives, the data transmission unit in the network device can be awakened in time to avoid problems such as packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy saving effect of the device.
[0033] As a possible implementation, the execution module is used to shut down L1 data transmission units when the number of handshake messages is less than the third threshold; shut down K1 data transmission units when the number of handshake messages is less than the fourth threshold; wherein the third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1. In this way, by setting different thresholds and shutting down different numbers of data transmission units, the accuracy of control can be improved, and while achieving the effect of deep energy saving, the data transmission units in the network device can be woken up in time when the peak of the transmission data arrives to avoid packet loss.
[0034] As a possible implementation, the device control apparatus further includes an analysis module, which is used to perform trend fitting according to the number of handshake messages and update the energy-saving strategy, wherein the energy-saving strategy includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the shutdown condition and / or the wake-up condition are updated according to the number of handshake messages, so as to improve the accuracy of device control.
[0035] As a possible implementation method, the statistical module is also used to send the number of handshake messages to the control device, and the execution module is also used to receive an energy-saving strategy from the control device. The energy-saving strategy is obtained by performing trend fitting based on the number of handshake messages and updating based on the result of trend fitting. The energy-saving strategy at least includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the energy-saving strategy is updated by the number of handshake messages, so that when the network device controls the data transmission unit based on the energy-saving strategy, it can wake up the data transmission unit in the network device in time when the peak of the transmission data arrives to avoid packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy-saving effect of the device.
[0036] In a fourth aspect, a device control device is provided, which is applied to a network device, wherein the network device includes one or more data transmission units, and the device control device includes a device analysis module, a statistical module and an execution module; wherein the device analysis module is used to obtain device data of the network device and detect whether the device data meets the set conditions, and the device data includes one or more of the following: hardware type, type of network service carried by the network device; when the device data meets the set conditions, the statistical module is used to obtain the number of handshake messages, and when the number of handshake messages reaches the wake-up condition, the execution module is used to wake up at least one of the one or more data transmission units; when the device data does not meet the set conditions, the statistical module is used to obtain the number of newly added flow tables, and when the number of newly added flow tables reaches the wake-up condition, the execution module is used to wake up at least one of the one or more data transmission units.
[0037] The solution provided in the fourth aspect above obtains the number of handshake messages or the number of newly added flow tables, and when the number of handshake messages or the number of newly added flow tables reaches the wake-up condition, the data transmission unit in the network device is awakened. In this way, the future workload of the network device is predicted based on the number of handshake messages or the number of newly added flow tables, the peak of the transmission data can be accurately predicted, and when the peak of the transmission data arrives, the data transmission unit in the network device can be awakened in time to avoid problems such as packet loss. And according to the device data of the network device, the method for waking up the data transmission unit is determined, so that the awakening method can be adapted to the performance of the network device, so that the network device can normally carry the service traffic corresponding to the network service type, ensure the data forwarding performance, and further avoid the problem of packet loss.
[0038] As a possible implementation method, the number of handshake messages is obtained by counting the message types of the messages received within a preset time window. In this way, the future workload of the network device is predicted by the number of handshake messages, and the data transmission unit in the network device is awakened according to the prediction result, which can avoid the problem of packet loss when the peak arrives.
[0039] As a possible implementation method, the number of newly added flow tables is obtained by counting the message identifiers of the messages received within a preset time window. In this way, the future workload of the network device is predicted by the number of newly added flow tables, and the data transmission unit in the network device is awakened according to the prediction result, which can avoid the problem of packet loss when the peak arrives.
[0040] As a possible implementation, the message identifier includes one or more of the following: source address information, destination address information, source port number, destination port number, and protocol type. By counting the newly added flow table by the message identifier, the accuracy of the number of newly added flow tables can be improved, and then the data transmission unit in the network device can be awakened by the number of newly added flow tables, which can avoid the problem of packet loss when the peak arrives.
[0041] As a possible implementation, the execution module is used to: wake up N1 data transmission units when the number of handshake messages is greater than a first threshold, wake up M1 data transmission units when the number of handshake messages is greater than a second threshold, wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1; or wake up N2 data transmission units when the number of newly added flow tables is greater than a fifth threshold, wake up M2 data transmission units when the number of newly added flow tables is greater than a sixth threshold, wherein the sixth threshold is greater than the fifth threshold, N2 and M2 are positive integers, and M2 is greater than N2. In this way, by setting different thresholds and waking up different numbers of data transmission units, the accuracy of control can be improved, and the data transmission units in the network device can be woken up in time when the peak of the transmission data arrives to avoid problems such as packet loss.
[0042] As a possible implementation, the execution module is used to: shut down at least one of the one or more data transmission units when the number of handshake messages reaches the shut-down condition; or shut down at least one of the one or more data transmission units when the number of newly added flow tables reaches the shut-down condition. In this way, by setting the wake-up condition and the shut-down condition, the data transmission unit is shut down or woken up. When the peak of the transmission data arrives, the data transmission unit in the network device can be woken up in time to avoid problems such as packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy saving effect of the device.
[0043] As a possible implementation, the execution module is used to: shut down L1 data transmission units when the number of handshake messages is less than the third threshold, shut down K2 data transmission units when the number of handshake messages is less than the fourth threshold, wherein the third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1; or, shut down L2 data transmission units when the number of newly added flow tables is less than the seventh threshold, shut down K2 data transmission units when the number of newly added flow tables is less than the eighth threshold, wherein the seventh threshold is greater than the eighth threshold, L2 and K2 are positive integers, and L2 is less than K2. In this way, by setting different thresholds and shutting down different numbers of data transmission units, the accuracy of control can be improved. While achieving the effect of deep energy saving, the data transmission units in the network equipment can be woken up in time when the peak of the transmission data arrives to avoid problems such as packet loss.
[0044] As a possible implementation, the device control apparatus further includes an analysis module, which is used to: perform trend fitting according to the number of handshake messages and update the energy-saving strategy; or perform trend fitting according to the number of newly added flow tables and update the energy-saving strategy; wherein the energy-saving strategy includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the energy-saving strategy is updated by the number of handshake messages or the number of newly added flow tables, which can improve the accuracy of device control.
[0045] As a possible implementation, the statistical module is also used to send the number of handshake messages to the control device, or to send the number of newly added flow tables to the control device; the execution module is also used to receive an energy-saving strategy from the control device, the energy-saving strategy is updated according to the result of trend fitting based on the number of handshake messages, or the energy-saving strategy is updated according to the result of trend fitting based on the number of newly added flow tables; wherein the energy-saving strategy at least includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit. In this way, the energy-saving strategy is updated by the number of handshake messages or the number of newly added flow tables, so that when the network device controls the data transmission unit based on the energy-saving strategy, it can wake up the data transmission unit in the network device in time when the peak of the transmission data arrives to avoid problems such as packet loss. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy-saving effect of the device.
[0046] As a possible implementation, the setting conditions include one or more of the following: the hardware type of the network device can support the service flow of the network service type, the hardware type is one of the set hardware types, and the network service type is one of the set service types. In this way, according to the device data and setting conditions of the network device, the method for waking up the data transmission unit is determined, so that the wake-up method can be adapted to the performance of the network device, so that the network device can normally carry the service flow corresponding to the network service type, ensure the data forwarding performance, and further avoid the packet loss problem.
[0047] In a fifth aspect, an electronic device is provided, comprising: a transceiver for sending and receiving radio signals; a memory for storing computer program instructions; and a processor for executing computer program instructions to support the electronic device to implement a method as described in any possible implementation of the first aspect or to implement a method as described in any possible implementation of the second aspect.
[0048] In a sixth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processing circuit, the method described in any possible implementation manner in the first aspect or the method described in any possible implementation manner in the second aspect is implemented.
[0049] In the seventh aspect, a chip system is provided, which includes a processing circuit and a storage medium, in which computer program instructions are stored; when the computer program instructions are executed by the processing circuit, the method described in any possible implementation manner in the first aspect or the method described in any possible implementation manner in the second aspect is implemented.
[0050] In an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute a method as described in any possible implementation of the first aspect or implement a method as described in any possible implementation of the second aspect.
[0051] In the ninth aspect, a device control system is provided, including a control device and a network device, the control device is used to perform trend fitting based on message statistical information to obtain an energy-saving strategy, and the network device is used to implement the method described in any possible implementation method of the first aspect or the method described in any possible implementation method of the second aspect according to the energy-saving strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0054] Figure 3 One of the software architecture diagrams of the network device provided in the embodiment of the present application;
[0055] Figure 4 The second schematic diagram of the software architecture of the network device provided in the embodiment of the present application;
[0056] Figure 5 A schematic diagram of an architecture based on a handshake message provided for an embodiment of the present application;
[0057] Figure 6 A graph showing the relationship between the number of handshake messages and the total number of messages provided in the embodiment of the present application;
[0058] Figure 7 A schematic diagram of the principle based on the handshake message provided in the embodiment of the present application;
[0059] Figure 8 A schematic diagram of an architecture based on a newly added flow table provided in an embodiment of the present application;
[0060] Fig. 9 A graph showing the relationship between the number of newly added flow tables and the total amount of messages provided in the embodiment of the present application;
[0061] Fig.10 A schematic diagram of the principle based on a newly added flow table provided in an embodiment of the present application;
[0062] Fig.11 One of the flow charts of the device control method provided in the embodiment of the present application;
[0063] Fig.12 The second flowchart of the device control method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0065] The terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0066] In the following, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features.
[0067] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0068] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more. The "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0069] For ease of understanding, an explanation of the related art is first given.
[0070] Flow: A series of messages with the same attributes sent sequentially through the same network within a period of time is called a flow.
[0071] Flow table: A collection of policy entries for a specific flow, responsible for searching and forwarding packets.
[0072] Handshake message: A general term for the first few negotiation messages of various protocol types.
[0073] As described in the background technology, network equipment can shut down some hardware (such as switching network boards, optical modules, etc.) when the amount of transmitted data is low to achieve energy saving, and wake up this part of the hardware when the amount of transmitted data increases to restore normal working state and perform normal data transmission.
[0074] Understandably, when the amount of data transmitted increases, if the relevant hardware has not been awakened, the transmitted data cannot be processed, resulting in packet loss. In order to avoid problems such as packet loss, network devices can currently use neural network technology to predict the amount of data to be transmitted in future time periods based on the amount of data transmitted in historical time periods. For example, the amount of data to be transmitted in the future time period from 11:00 to 14:00 can be predicted based on the amount of data transmitted in the past time period from 11:00 to 14:00, so as to wake up the relevant hardware in advance when the amount of data transmitted increases.
[0075] However, the current trend prediction of the amount of data being transmitted cannot reflect the trend changes of the current messages, and it is difficult to predict at the microscopic time granularity, which may cause the hardware to fail to wake up in time when there is a burst of transmission data, resulting in packet loss. In addition, in order to avoid the problem of packet loss when there is a burst of transmission data, only a small amount of hardware is often shut down when the amount of data being transmitted is low, resulting in poor energy saving effect of the equipment.
[0076] Based on the above research, an embodiment of the present application provides a device control method, which uses the number of handshake messages or the number of newly added flow tables that are closely related to the current actual business flow trend to predict the future workload of the network device, which can accurately reflect the trend changes in the amount of data to be transmitted in the future, and thus can effectively respond to sudden peaks in transmission data. When the peak of transmission data arrives, the data transmission unit in the network device can be woken up in time to avoid packet loss problems. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy-saving effect of the equipment.
[0077] The device control method provided in the embodiment of the present application can be applied to a communication system, such as Figure 1As shown, the communication system includes a network device 100 , a source device 200 and a destination device 300 .
[0078] The network device 100 is a device located at the network side of the above-mentioned communication system and having a wireless transceiver function or a chip or chip system that can be set in the device. The network device includes but is not limited to: an access point (AP) in a WLAN system, such as a home gateway, router, switch, etc. with WLAN function, a base station, an evolved NodeB (eNodeB), a transmission reception point (TRP), a next generation NodeB (gNB), a wireless relay node, a wireless backhaul node, etc.
[0079] The source device 200 may refer to a device that sends data, and may be a signaling server, a server for interactive service information (such as a media server), etc. In some embodiments, the source device 200 may also be a storage device, a terminal, etc. Among them, the terminal may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a personal communication service (PCS) phone, a desktop computer, a personal digital assistant (PDA), a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc.
[0080] In the embodiment of the present application, the destination device 300 mainly refers to a device for receiving data, and the destination device 300 may also be a signaling server, a server for exchanging service information (such as a media server), etc. In some embodiments, the destination device 300 may also be a terminal.
[0081] It is worth noting that the above-mentioned source device 200 and destination device 300 are merely examples provided in the embodiments of the present application and should not be understood as limitations on the present application. The present application does not limit the specific form and quantity of the source device 200 and the destination device 300 in the communication system.
[0082] In the embodiment of the present application, the network device 100 can establish a communication connection with the source device 200 and the destination device 300. After the communication connection is established, the source device 200 can send data to the destination device 300 through the network device 100.
[0083] In the embodiments of the present application, Figure 2 As shown, the network device 100 may include a processor, a memory, a data transmission unit, and a communication interface. It is understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the network device 100. In other embodiments of the present application, the network device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0084] In the embodiment of the present application, the communication interface is used to communicate with other devices. For example, information exchange can be performed with the source device 200 through the communication interface.
[0085] The processor may be a central processing unit (CPU), a network processor (NP), or an integration of a central processing unit and a network processor. In some embodiments, the processor may also include other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0086] In an embodiment of the present application, the processor is connected to the memory via a double data rate (DDR) bus or other types of buses. The memory is generally used to store computer program executable program codes. The executable program code includes instructions, and the processor executes various functional applications and data processing of the network device by running the instructions stored in the memory.
[0087] In an embodiment of the present application, the network device 100 may have multiple data transmission units, for example, a switching network unit (switching board), an optical module, etc. in a router device. The data transmission unit in the network device 100 is used to forward the data sent by the source device 200 to the destination device 300. When the data transmitted by the source device 200 is less, the network device 100 can shut down part of the data transmission unit, and when the data transmitted by the source device 200 increases, the network device 100 can wake up the shut down data transmission unit to avoid data forwarding packet loss. Take the switch fabric unit (SFU) in the router device as an example to illustrate, when the data to be transmitted is less, the router device can shut down part of the SFU to achieve energy saving of the device, and when the data to be transmitted increases, the router device can wake up the shut down SFU, restore the normal working state, and perform data transmission normally, thereby avoiding data forwarding packet loss.
[0088] In order to wake up the data transmission unit in the network device in time when the peak of data transmission arrives to avoid problems such as packet loss, and at the same time, shut down the data transmission unit when the amount of transmission data is small to improve the energy saving effect of the equipment, in an embodiment of the present application, the data transmission unit in the network device can be shut down or woken up according to the message statistical information of the received message.
[0089] In an embodiment of the present application, the message statistics information may be used to characterize the changing trend of the number of messages to be transmitted by the network device. Exemplarily, the message statistics information may include the number of handshake messages and / or the number of newly added flow tables.
[0090] The messages to be transmitted by the network device refer to the messages to be transmitted by the network device in the future. When the message statistics indicate that the number of messages to be transmitted by the network device in the future increases, the data transmission unit in the network device can be awakened; when the message statistics indicate that the number of messages to be transmitted by the network device in the future decreases, the data transmission unit in the network device can be shut down.
[0091] In order to facilitate the network device to control the data transmission unit, in an embodiment of the present application, an energy-saving strategy can be formulated so that the network device can shut down or wake up the data transmission unit according to the energy-saving strategy and the statistical message statistics information obtained.
[0092] Among them, the energy-saving strategy may include conditions for shutting down or waking up the data transmission unit. When the message statistical information meets the shutdown conditions, the data transmission unit can be shut down; when the message statistical information meets the wake-up conditions, the data transmission unit can be woken up.
[0093] To understand the processing flow of the present application, please refer to Figure 3 , Figure 3 This is a software architecture diagram for network devices. Figure 3 As shown, the network device may include a forwarding layer and a control layer, wherein the forwarding layer may be based on a network processor (NP) and the control layer may be based on a central processing unit (CPU). A statistical module and an execution module are deployed in the forwarding layer of the network device, and an analysis module is deployed in the control layer. It can be understood that the statistical module, the execution module, and the analysis module may be based on computer program executable program codes.
[0094] In the embodiment of the present application, the statistical module is used to obtain statistical information of the message, and send the statistical information of the message to the analysis module, the analysis module can formulate an energy-saving strategy for controlling the data transmission unit according to the statistical information of the message, and send the energy-saving strategy to the execution module. The execution module can shut down or wake up the data transmission unit of the network device according to the energy-saving strategy.
[0095] In some embodiments of the present application, the analysis module may also be deployed on a separate control device, and only the statistics module and the execution module may be deployed on the network device. The analysis module and the statistics module and the execution module may exchange information through a northbound interface, and the northbound interface may be, but is not limited to, a telemetry interface, a netstream interface, a simple network management protocol (SNMP) interface, a management information base (MIB) interface, a schema interface, etc., and may be specifically set according to actual needs.
[0096] like Figure 4 As shown, the statistical module of the network device can send the statistical information of the packets obtained by statistics to the analysis module of the control device through the interface. After receiving the statistical information of the packets, the analysis module of the control device can formulate an energy-saving strategy for controlling the data transmission unit according to the statistical information of the packets, and send the energy-saving strategy to the execution module of the network device, that is, the network device can receive the energy-saving strategy from the control device. After receiving the energy-saving strategy, the execution module can shut down or wake up the data transmission unit of the network device according to the energy-saving strategy.
[0097] In the embodiment of the present application, the statistics module can periodically send message statistics information to the analysis module, so that the analysis module can periodically update the energy-saving strategy according to the message statistics information. It can be understood that after the analysis module updates the energy-saving strategy, it can send the updated energy-saving strategy to the execution module, so that the execution module can shut down or wake up the data transmission unit of the network device according to the updated energy-saving strategy.
[0098] The following takes the number of handshake messages as an example to illustrate the wake-up and shutdown of the data transmission unit in an embodiment of the present application.
[0099] Considering that in actual applications, when the source device transmits data to the network device, it usually sends a handshake message to the network device first to shake hands with the network device, and only after the source device and the network device have passed the handshake, the source device transmits data to the network device. In this case, when the number of handshake messages increases, it may mean that there may be more data messages to be transmitted in the future. Therefore, the embodiment of the present application can shut down or wake up the data transmission unit in the network device based on the number of handshake messages.
[0100] In an embodiment of the present application, the message received by the network device may be a data message, that is, a message carrying data that needs to be transmitted to the destination device, or a handshake message used for handshake. The network device may perform field analysis on the received message to determine whether the message type of the message is a handshake message.
[0101] In the embodiment of the present application, the handshake message includes but is not limited to: syn / syn-ack message in the transmission control protocol (TCP), CHLO / SHLO message in quick UDP internet connections (QUIC), report message in the real-time transport control protocol (RTCP), join message in the internet group management protocol (IGMP), point-to-point protocol over Ethernet (PPPOE) message, IP protocol over Ethernet (IPOE) message, etc.
[0102] As an example, the statistics module can count the number of handshake messages according to a set time period, and send the number of handshake messages obtained by counting to the analysis module. For example, when a time period is reached, the statistics module can count the number of handshake messages within the time period, and send the number of handshake messages obtained by counting to the analysis module. Among them, the set time period can be set according to business needs, and there is no specific limitation.
[0103] It is understandable that the statistics module can also count the number of handshake messages in real time, and send the number of handshake messages obtained by counting to the analysis module according to a set time period. For example, after the network device receives the message, if it is determined that the received message is a handshake message, the statistics module updates the number of handshake messages, and when a time period is reached, the statistics module sends the number of handshake messages obtained by counting to the analysis module. In some embodiments, the statistics module can also count the number of handshake messages in real time, and send it to the analysis module in real time, and the analysis module can process the number of handshake messages according to a set time period. For the method of counting the number of handshake messages, the embodiment of the present application does not make specific restrictions, and can be set according to actual needs.
[0104] In order to improve the accuracy and timeliness of waking up or shutting down the data transmission unit, in the embodiment of the present application, when counting the number of handshake messages, the total number of received messages can also be counted, and the correlation between the number of handshake messages and the total number of messages is obtained by trend fitting the number of handshake messages and the total number of messages, and an energy-saving strategy is formulated based on the correlation. Among them, the total number of messages refers to the number of all received messages, including the number of handshake messages and the number of data messages.
[0105] It is understandable that when the statistics module sends the number of handshake messages to the analysis module, it also sends the total number of messages obtained by statistics to the analysis module. Figure 5 As shown, the statistical module can count the number of handshake messages and the total number of received messages, and then transmit the statistically obtained number of handshake messages and the total number of received messages to the analysis module. The analysis module performs trend fitting based on the number of handshake messages and the total number of messages, obtains an energy-saving strategy based on the number of handshake messages, and then sends the energy-saving strategy to the execution module.
[0106] It should be noted that when the number of handshake messages and the total number of messages are sent to the analysis module based on a set time period, the total number of messages sent and the number of handshake messages need to be statistically obtained in the same time period.
[0107] In the embodiment of the present application, the analysis module can use linear fitting, nonlinear fitting, etc. to perform trend fitting on the number of handshake messages and the total number of messages, without specific limitation.
[0108] Taking the multiple linear regression algorithm as an example, the trend fitting of the number of handshake messages and the total number of messages is explained. When using the multiple linear regression algorithm to fit the trend of the number of handshake messages and the total number of messages, the following formula can be used:
[0109] Y n =δ+aX n-1 +bX n-2 +cX n-3 +dX n-4 …
[0110] Among them, Y n is the total amount of messages in the nth time period, X n-1 is the number of handshake messages in the n-1th time period, X n-2 is the number of handshake messages in the n-2th time period, X n-3 is the number of handshake messages in the n-3th time period, X n-4 is the number of handshake messages in the n-4th time period, and so on. The size of the time period can be set according to the capability of the network processor (NP), and usually a time period can be about 100ms-1s. The number of time periods can be set according to the memory and CPU computing resources of the current network device. When the memory and CPU computing resources are sufficient, more time periods can be selected for fitting, which can achieve better fitting and prediction effects.
[0111] Among them, a, b, c, d, etc. are linear regression coefficients, and δ is the correction coefficient in the linear regression algorithm. In the fitting process, the coefficients can be continuously trained and corrected through the loss function and the gradient descent algorithm, so that the above formula function can correctly fit the trend relationship between the number of handshake messages and the total number of messages. Among them, the loss function can be a cross entropy loss function, a logarithmic loss function, or a square loss function. There is no specific restriction and it can be set according to actual needs.
[0112] In an embodiment of the present application, when the relationship between the changing trend of the total amount of messages in the network and the number of handshake messages is more complicated, the loss function of the multivariate linear regression algorithm cannot converge to a smaller value. At this time, multivariate high-order linear regression, random forest, long short-term memory network (long short-term memory, LSTM), recurrent neural network (recurrent neural network, RNN) and other algorithms can also be selected for fitting. There is no specific restriction and it can be selected according to actual needs.
[0113] like Figure 6 As shown, Figure 6The trend change relationship diagram of the number of handshake messages and the total number of messages provided in the embodiment of the present application is as follows: Figure 6 It can be seen that after the growth of the number of handshake messages reaches a peak, the total number of messages will increase significantly. Therefore, based on the change in the number of handshake messages, the change in the total number of messages in the future can be inferred, so as to obtain an energy-saving strategy, and shut down or wake up the data transmission unit based on the energy-saving strategy.
[0114] For example, when the number of handshake messages is X1, the total number of messages in the future will increase to Z1. In order to avoid packet loss, the data transmission unit can be awakened, and the energy-saving strategy can be to wake up the data transmission unit when the number of handshake messages is greater than X1. For another example, when the number of handshake messages is Y1, the total number of messages in the future will decrease to Z2. In order to save energy, the data transmission unit can be turned off, and the energy-saving strategy can be to turn off the data transmission unit when the number of handshake messages is less than Y1.
[0115] In an embodiment of the present application, after obtaining the energy-saving strategy, the execution module can count the number of handshake messages in real time, and wake up or shut down the data transmission unit according to the number of handshake messages and the energy-saving strategy.
[0116] Among them, the energy-saving strategy may include a wake-up condition for waking up the data transmission unit and a shut-down condition for shutting down the data transmission unit. Take the shut-down condition for shutting down the data transmission unit as the number of handshake messages being lower than a threshold value X, and the wake-up condition for waking up the data transmission unit as the number of handshake messages being higher than a threshold value Y as an example for explanation, wherein the threshold value Y is greater than the threshold value X. When the execution module obtains in real-time statistics that the number of handshake messages is lower than the threshold value X, the data transmission unit can be shut down, and when the execution module obtains in real-time statistics that the number of handshake messages is higher than the threshold value Y, the data transmission unit can be woken up.
[0117] In order to improve the accuracy of device control, in an embodiment of the present application, a time window may be preset, and the execution module may count the number of handshake messages in each time window.
[0118] For each time window, when the execution module counts the number of handshake messages in the time window to meet the shutdown condition of shutting down the data transmission unit, the data transmission unit is shut down; when the execution module counts the number of handshake messages in the time window to meet the wake-up condition of waking up the data transmission unit, the data transmission unit is woken up. The time window can be set according to business needs, such as 2s, 5s, etc., without specific limitation.
[0119] As an example, the time window for executing module statistics may be smaller than the reporting period of the statistical module to the analysis module, or the time window for executing module statistics may be smaller than the updating period of the energy-saving strategy.
[0120] In some embodiments, the time window for executing module statistics may also be equal to the reporting period of the statistical module to the analysis module, or the time window for executing module statistics may be equal to the updating period of the energy saving strategy.
[0121] In some embodiments, the execution module may obtain the number of handshake messages in each time window from the statistics module.
[0122] In order to wake up the data transmission unit in the network device in time when the peak of data transmission arrives to avoid problems such as packet loss, and at the same time, to deeply shut down the data transmission unit when the amount of transmitted data is small to improve the energy saving effect of the equipment, in an embodiment of the present application, a phased energy-saving strategy can be set, and different data transmission units can be woken up or shut down when the number of handshake messages meets different thresholds.
[0123] Taking waking up the data transmission unit as an example, the execution module can wake up N1 data transmission units when the number of handshake messages is greater than the first threshold, and wake up M1 data transmission units when the number of handshake messages is greater than the second threshold, wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1.
[0124] When the number of handshake messages is greater than the first threshold, it means that the total number of messages is about to increase slightly, and a small number of data transmission units can be awakened to cope with the upcoming messages. When the number of handshake messages is greater than the second threshold, it means that the total number of messages is about to increase significantly, and most or even all of the data transmission units can be awakened to forward the upcoming large number of messages.
[0125] It can be understood that the values of M1 and N1 can be set according to the configuration performance of the network device, without specific limitation. Taking N1 as an example, in an embodiment of the present application, after trend fitting is performed on the number of handshake messages and the total number of messages, the total number of messages corresponding to the number of each handshake message can be inferred based on the result of the trend fitting. Therefore, when the number of handshake messages is greater than the first threshold, the total number of messages arriving in the future can be inferred. After that, based on the configuration of the network device, it can be inferred how many data transmission units need to be awakened to cope with the total number of messages arriving in the future, thereby obtaining the value of N1.
[0126] Accordingly, taking shutting down the data transmission unit as an example, the execution module can shut down L1 data transmission units when the number of handshake messages is less than the third threshold, and shut down K1 data transmission units when the number of handshake messages is less than the fourth threshold, wherein the third threshold is greater than the fourth threshold, the third threshold is less than the first threshold, K1 and L1 are positive integers, and L1 is less than K1.
[0127] Among them, when the number of handshake messages is less than the third threshold, it means that the total amount of messages will decrease. At this time, a small part of the data transmission units can be turned off to save energy. When the number of handshake messages is less than the fourth threshold, it means that the total amount of messages is greatly reduced. At this time, most of the data transmission units can be awakened to perform deep energy saving. It can be understood that the values of K1 and L1 can be set according to the configuration performance of the network device. There is no specific limitation. You can refer to the above description and will not elaborate on it here.
[0128] Taking into account the delay between the handshake message and the transmitted data message, the data message to be transmitted is usually located after the handshake message. In order to avoid the inability to transmit the delayed data message after the data transmission unit is shut down, in an embodiment of the present application, when the number of handshake messages obtained is less than the third threshold, L1 data transmission units can be shut down according to the preset delay time; when the number of handshake messages obtained is less than the fourth threshold, K1 data transmission units can be shut down according to the preset delay time.
[0129] Exemplarily, when the number of handshake messages obtained is less than the third threshold, the timing can be started, and after the preset delay time is met, L1 data transmission units are shut down. When the number of handshake messages obtained is less than the fourth threshold, the timing can be started, and after the preset delay time is met, K1 data transmission units are shut down.
[0130] Among them, the delay duration can be set according to business needs, and there is no specific restriction. It should be noted that when the preset delay duration is greater than the statistical time window of the execution module, during the timing process, if the number of handshake messages obtained by statistics meets the conditions for waking up the transmission unit, the shutdown operation of the data transmission unit is abandoned. For example, when the number of handshake messages obtained is less than the third threshold, the timing can be started. During the timing process, if the number of handshake messages obtained by statistics increases and is greater than the first threshold, the shutdown of L1 data transmission units is abandoned, and the wake-up operation of the data transmission unit is performed.
[0131] As an example, when the number of handshake messages is not less than the third threshold and not greater than the first threshold, it indicates that the total amount of messages is maintained in a normal and stable state, and a set number of data transmission units can be opened to maintain normal transmission of messages.
[0132] As an example, shutting down L1 and K1 data transmission units and waking up M1 and N1 data transmission units may be based on shutting down L1 and K1 data transmission units and waking up M1 and N1 data transmission units. For example, A data transmission units have been awakened, and when M1 data transmission units need to be awakened, only M1-A data transmission units need to be awakened. For another example, B1 data transmission units have been shut down, and when L1 data transmission units need to be shut down, only L1-B1 data transmission units need to be shut down.
[0133] As an example, each threshold value can also establish a mapping relationship with a data transmission unit, and when different threshold values are met, the corresponding data transmission unit is turned off or awakened. For example, the first threshold value is set to correspond to the data transmission unit of channel A, and when the number of handshake messages is greater than the first threshold value, the data transmission unit of channel A is awakened.
[0134] It can be understood that the above is only an example of the energy-saving strategy and does not serve as a specific limitation on the energy-saving strategy. In some embodiments of the present application, the energy-saving strategy can also be implemented in other ways. For example, the wake-up condition for waking up the data transmission unit can also be that the ratio of the number of handshake messages to the total number of messages is greater than the threshold value Y', and the shutdown condition for shutting down the data transmission unit can also be that the ratio of the number of handshake messages to the total number of messages is lower than the threshold value X'. When the execution module obtains in real-time statistics that the ratio of the number of handshake messages to the total number of messages is lower than the threshold value X', the data transmission unit can be shut down. When the execution module obtains in real-time statistics that the ratio of the number of handshake messages to the total number of messages is higher than the threshold value Y', the data transmission unit can be awakened. The specific setting can be based on business needs.
[0135] For ease of understanding, the device control method based on the number of handshake messages provided by the embodiment of the present application will be described below in conjunction with a principle schematic diagram. Figure 7 As shown, the statistical module periodically sends statistics to the analysis module to obtain the number of handshake messages and the total number of messages. The analysis module can perform trend fitting based on the number of handshake messages and the total number of messages sent by the statistical module, and periodically updates the energy-saving strategy based on the result of the trend fitting, and sends the updated energy-saving strategy to the execution module. The execution module shuts down or wakes up the data transmission unit based on the updated energy-saving strategy. When the number of handshake messages in each time window obtained by statistics meets the shutdown condition in the energy-saving strategy, the data transmission unit is shut down, and when the number of handshake messages in each time window obtained by statistics meets the wake-up condition in the energy-saving strategy, the data transmission unit is woken up.
[0136] The embodiment of the present application obtains the number of handshake messages based on the received messages, and then shuts down or wakes up the data transmission unit in the network device according to the number of handshake messages. Compared with the method of predicting the trend of the amount of data to be transmitted in the future time period based on the amount of data transmitted in the historical time period, the embodiment of the present application uses the number of handshake messages that are currently closely related to the actual business flow trend changes to predict the future workload of the network device. By predicting the trend through the current real message rate, it can cope with the sudden peak of transmission data, and then when the peak of transmission data arrives, the data transmission unit in the network device is woken up in time to avoid packet loss problems. At the same time, when the amount of transmission data is small, the data transmission unit can be deeply shut down, greatly improving the energy saving effect of the equipment. The following takes the number of newly added flow tables as an example to illustrate the wake-up and shutdown of the data transmission unit in the embodiment of the present application.
[0137] Considering that in actual applications, for the statistics of handshake messages, it is necessary to perform field analysis on the received messages, such as parsing the fields encapsulated by the transport layer and the application layer, the performance consumption of the network device is relatively large. At the same time, considering that in actual applications, for the security of data transmission, the source device may encrypt the message when sending the message to the destination device, resulting in the network device being unable to analyze the fields in the message. Based on this, in order to reduce energy consumption and facilitate the network device to analyze and process the message, in the embodiment of the present application, considering that most network devices forward and transmit messages based on flow tables, each flow table corresponds to a flow, and different flow tables correspond to different flows. When the number of flow tables increases, it means that the flow to be transmitted increases, so that there may be more data messages to be transmitted in the future. Therefore, the embodiment of the present application can also shut down or wake up the data transmission unit in the network device based on the number of newly added flow tables.
[0138] In the embodiment of the present application, the flow table includes the message identifier of the flow corresponding to the flow table, and the message identifiers of the messages of the same flow are the same.
[0139] The message identifier includes one or more of the following: source address information, destination address information, source port number, destination port number, and protocol type. The source address information may be the source IP address, and correspondingly, the destination address information may be the destination IP address.
[0140] It can be understood that when the message identifier includes only one of the message identifiers, the messages with the message identifier belong to the same flow. For example, when the message identifier includes only the address information of the source end, the messages with the address information of the same source end can be considered to belong to the same flow. When the message identifier includes multiple message identifiers, the messages with multiple message identifiers belong to the same flow. For example, when the message identifier includes the address information of the source end and the address information of the destination end, the messages with the address information of the same source end and the address information of the same destination end can be considered to belong to the same flow.
[0141] In an embodiment of the present application, the network device can detect whether the message identifier of the received message is a new message identifier, and create a flow table based on the detection result. The following takes the message identifier included in the flow table as the first message identifier and the message identifier of the message received by the network device as the second message identifier as an example to explain the process of the network device creating a flow table.
[0142] When the network device receives a message, it will obtain the second message identifier of the message from the message, and then match the second message identifier of the message with the first message identifier of each flow table. If the message identifier that is the same as the second message identifier of the message is not matched from each first message identifier, it can be determined that the second message identifier of the message is a new message identifier, and then a new flow table is created based on the second message identifier of the message, wherein the created new flow table includes the second message identifier of the message. It can be understood that if the message identifier that is the same as the second message identifier of the message is matched from the first message identifier of each flow table, the message can be forwarded according to the flow table corresponding to the same message identifier. It should be noted that the specific content included in the flow table and the process of forwarding data messages based on the flow table can refer to the explanation of conventional technology, which will not be repeated here.
[0143] Accordingly, in an embodiment of the present application, the statistical module can count the number of newly added flow tables according to a set time period, and send the number of newly added flow tables obtained by counting to the analysis module. For example, when a time period is reached, the statistical module can count the number of newly added flow tables within the time period, and send the number of newly added flow tables obtained by counting to the analysis module. The statistical module can also count the number of newly added flow tables in real time, and send the number of newly added flow tables obtained by counting to the analysis module according to a set time period. For example, after the network device creates a flow table, the statistical module updates the number of newly added flow tables, and when a time period is reached, the statistical module sends the number of newly added flow tables obtained by counting to the analysis module.
[0144] In some embodiments, the statistics module may also count the number of newly added flow tables in real time and send the count to the analysis module in real time. The analysis module may process the number of newly added flow tables according to a set time period.
[0145] In some embodiments, the number of new message identifiers may also be counted, and the number of newly added flow tables may be obtained based on the number of new message identifiers.
[0146] It can be understood that the embodiment of the present application does not impose any specific limitation on the method of counting the number of newly added flow tables, and it can be set according to actual needs.
[0147] Accordingly, in order to improve the accuracy and timeliness of waking up or shutting down the data transmission unit, in an embodiment of the present application, when counting the number of newly added flow tables, the total amount of received messages can also be counted. By performing trend fitting on the number of newly added flow tables and the total amount of messages, the correlation between the trend changes of the number of newly added flow tables and the total amount of messages is obtained, and energy-saving strategies are formulated based on the correlation.
[0148] like Figure 8 As shown, the statistical module can count the number of newly added flow tables and the total amount of received packets, and then transmit the statistically obtained number of newly added flow tables and the total amount of received packets to the analysis module. The analysis module performs trend fitting based on the number of newly added flow tables and the total amount of packets, obtains an energy-saving strategy based on the number of newly added flow tables, and then sends the energy-saving strategy to the execution module.
[0149] It should be noted that when the number of newly added flow tables and the total number of packets are sent to the analysis module based on a set time period, the total number of packets sent and the number of newly added flow tables need to be statistically obtained in the same time period.
[0150] Accordingly, in the embodiment of the present application, the analysis module may use linear fitting, nonlinear fitting, or the like to perform trend fitting on the number of newly added flow tables and the total amount of packets, without any specific limitation.
[0151] As an example, the analysis module can also use a multivariate linear regression algorithm to perform trend fitting on the number of newly added flow tables and the total number of packets. For details, please refer to the description of using a multivariate linear regression algorithm to perform trend fitting on the number of handshake packets and the total number of packets, which will not be repeated here.
[0152] like Fig. 9 As shown, Fig. 9 The relationship between the number of newly added flow tables and the total amount of messages provided in the embodiment of the present application is shown in FIG. Fig. 9It can be seen that after the number of newly added flow tables reaches a peak, the total number of messages is often accompanied by a substantial increase. Therefore, the change in the total number of messages in the future can be inferred based on the change in the number of newly added flow tables, so as to obtain an energy-saving strategy, and shut down or wake up the data transmission unit based on the energy-saving strategy.
[0153] Correspondingly, after receiving the energy-saving strategy, the execution module can count the number of newly added flow tables in real time, and shut down or wake up the data transmission unit according to the energy-saving strategy and the number of newly added flow tables.
[0154] Take the shutdown condition of shutting down the data transmission unit as that the number of newly added flow tables is lower than the threshold value A, and the wake-up condition of waking up the data transmission unit as that the number of newly added flow tables is higher than the threshold value Z as an example for explanation, wherein the threshold value Z is greater than the threshold value A. When the execution module obtains in real-time statistics that the number of newly added flow tables is lower than the threshold value A, the data transmission unit can be shut down, and when the execution module obtains in real-time statistics that the number of newly added flow tables is higher than the threshold value Z, the data transmission unit can be awakened.
[0155] Accordingly, in order to improve the accuracy of device control, the execution module may also count the number of newly added flow tables according to the time window, that is, in an embodiment of the present application, the message statistical information may also include the number of newly added flow tables within a preset time window.
[0156] Correspondingly, for the newly added flow tables, a phased energy-saving strategy can be set. When the number of newly added flow tables meets different thresholds, different data transmission units can be woken up or shut down. For example, when the number of newly added flow tables is greater than the fifth threshold, N2 data transmission units are woken up; when the number of handshake messages is greater than the sixth threshold, M2 data transmission units are woken up; when the number of newly added flow tables is less than the seventh threshold, L2 data transmission units are shut down; when the number of newly added flow tables is less than the eighth threshold, K2 data transmission units are shut down. Please refer to the above description for details, which will not be repeated here.
[0157] It can be understood that the awakening or shutting down of the data transmission unit based on the number of newly added flow tables can refer to the process of awakening or shutting down the data transmission unit based on the number of handshake messages, which will not be described in detail here.
[0158] It can be understood that the first threshold, the second threshold, the third threshold, the fourth threshold and the fifth threshold, the sixth threshold, the seventh threshold, and the eighth threshold are only used to explain the wake-up and shutdown of the data transmission unit in different scenarios. In some embodiments, the first threshold, the second threshold, the third threshold, the fourth threshold and the fifth threshold, the sixth threshold, the seventh threshold, and the eighth threshold may be different. In some embodiments, the first threshold may be the same as the fifth threshold, the second threshold is the same as the sixth threshold, the third threshold is the same as the seventh threshold, and the eighth threshold is the same as the fourth threshold. Correspondingly, N1 and N2 may be the same or different, M1 and M2 may be the same or different, K1 and K2 may be the same or different, and L1 and L2 may be the same or different, which are set according to actual conditions.
[0159] For ease of understanding, the device control method based on the number of newly added flow tables provided in the embodiment of the present application will be described below in conjunction with a principle schematic diagram. Fig.10 As shown, the statistical module periodically sends statistics to the analysis module to obtain the number of newly added flow tables and the total number of messages. The analysis module can perform trend fitting based on the number of newly added flow tables and the total number of messages sent by the statistical module, and periodically updates the energy-saving strategy based on the result of the trend fitting, and sends the updated energy-saving strategy to the execution module. The execution module shuts down or wakes up the data transmission unit based on the updated energy-saving strategy. When the number of newly added flow tables in each time window obtained from statistics meets the shutdown condition in the energy-saving strategy, the data transmission unit is shut down. When the number of newly added flow tables in each time window obtained from statistics meets the wake-up condition in the energy-saving strategy, the data transmission unit is woken up.
[0160] The embodiment of the present application uses the number of newly added flow tables to predict the future workload of the network device, which is closely related to the trend changes of the actual business flow, and can accurately reflect the future trend changes of the business flow, and then can cope with the sudden peak of transmission data. When the peak of transmission data arrives, the data transmission unit in the network device is woken up in time to avoid packet loss problems. At the same time, when the amount of transmission data is small, the data transmission unit can be deeply shut down, which greatly improves the energy saving effect of the equipment.
[0161] For ease of understanding, the process of waking up or shutting down the data transmission unit will be further described in detail below in conjunction with the flow chart. Fig.11 , Fig.11 A flow chart of a device control method provided in an embodiment of the present application is shown in FIG. Fig.11 As shown, in the embodiment of the present application, the steps of the device control method may include steps S401 to S404.
[0162] S401: Based on the received messages, obtain the number of handshake messages.
[0163] S402: When the number of handshake messages reaches a wake-up condition, wake up at least one of the one or more data transmission units.
[0164] S403: When the number of handshake messages reaches a shutdown condition, shut down at least one of the one or more data transmission units.
[0165] Among them, the number of handshake messages can be obtained by counting the message types of messages received within a preset time window. When the network device is controlling the data transmission unit, for each message received, the message field analysis can be performed on the message to obtain the message type of the message, wherein the message type of the message may include a handshake message and a data message. In this way, the network device can count the message type of the message to obtain the number of handshake messages received within the preset time window. It can be understood that after obtaining the number of handshake messages, one or more data transmission units can be controlled according to the number of handshake messages and the energy-saving strategy obtained in advance, that is, one or more data transmission units can be shut down or awakened.
[0166] In an embodiment of the present application, the energy-saving strategy includes a wake-up condition for waking up the data transmission unit and a shut-down condition for shutting down the data transmission unit. When the number of handshake messages meets the wake-up condition, at least one of the one or more data transmission units is woken up; when the number of handshake messages meets the shut-down condition, at least one of the one or more data transmission units is shut down.
[0167] Exemplarily, when the number of handshake messages is greater than a first threshold, N1 data transmission units are awakened, and when the number of handshake messages is greater than a second threshold, M1 data transmission units are awakened; wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1.
[0168] Exemplarily, when the number of handshake messages is less than the third threshold, L1 data transmission units are shut down, and when the number of handshake messages is less than the fourth threshold, K1 data transmission units are shut down; wherein the third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1.
[0169] S404: Perform trend fitting according to the number of handshake messages and update the energy saving strategy, where the energy saving strategy includes a wake-up condition and / or a shutdown condition for shutting down the data transmission unit.
[0170] In the embodiment of the present application, in order to improve accuracy, the shutdown condition and / or wake-up condition in the energy saving strategy may be updated.
[0171] For example, it is possible to set an update period, perform trend fitting based on the number of handshake messages in the update period and the total number of messages received, obtain fitting results, and update the shutdown conditions and / or wake-up conditions in the energy-saving strategy based on the fitting results. In this way, when the data transmission unit is controlled based on the updated energy-saving strategy, the accuracy of the control can be improved.
[0172] It can be understood that when the energy-saving strategy is sent by the control device to the network device, when the energy-saving strategy is updated, the network device can send the number of handshake messages and the total number of messages in each update cycle to the control device. After receiving the number of handshake messages and the total number of messages in each update cycle, the control device can perform trend fitting based on the number of handshake messages in the update cycle and the total number of messages received to obtain the fitting result, update the shutdown condition and / or wake-up condition in the energy-saving strategy based on the fitting result, and send the updated energy-saving strategy to the network device. In this way, when the network device controls the data transmission unit based on the updated energy-saving strategy, the accuracy of the control can be improved.
[0173] It can be understood that the specific process of step S401 to step S404 can refer to the above description of waking up and shutting down the data transmission unit based on the number of handshake messages, which will not be described in detail here.
[0174] For ease of understanding, the process of waking up or shutting down the data transmission unit will be further described in detail below in conjunction with the flow chart. Fig.12 , Fig.12 A flow chart of a device control method provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, in the embodiment of the present application, the steps of the device control method may include steps S501 to S504.
[0175] S501: Acquire device data of a network device, and detect whether the device data of the network device meets a set condition.
[0176] The device data of the network device may include one or more of the following: hardware type, and the type of network service carried by the network device.
[0177] The hardware type of the network device may be a processor type, such as a network processor (NP). Different types of processors have different performances, and thus different message parsing and forwarding capabilities. The network service type may be a service type of a service flow carried by the network device. Different service types have different service flow sizes.
[0178] In an embodiment of the present application, after obtaining the device data of the network device, the performance of the network device and / or the business conditions carried by the network device can be determined based on the device data of the network device, and the control method for the data transmission unit can be determined based on the performance of the network device and / or the business conditions carried by the network device, that is, the wake-up / shutdown method of the data transmission unit can be determined.
[0179] S502: When the device data meets the set conditions, the number of handshake messages is obtained, and the data transmission unit is controlled according to the number of handshake messages.
[0180] S503: When the device data does not meet the set conditions, the number of newly added flow tables is obtained, and the data transmission unit is controlled according to the number of newly added flow tables.
[0181] Among them, the setting conditions may include one or more of the following: the hardware type of the network device can support the service flow of the network service type, the hardware type is one of the set hardware types, and the network service type is one of the set service types.
[0182] As an example, after obtaining the hardware type of the network device, the performance of the network device is obtained based on the hardware type, that is, the forwarding capability and parsing capability of the message. If the hardware type of the network device is one of the set hardware types, it means that the performance of the network device is good, and the forwarding capability and parsing capability of the message are strong, and then the awakening and shutting down of the data transmission unit can be controlled in a manner with high accuracy but high requirements on device performance, that is, the awakening and shutting down of the data transmission unit can be controlled according to the number of handshake messages. If the hardware type of the network device does not belong to one of the set hardware types, it means that the performance of the network device is average, and the forwarding capability and parsing capability of the message are weak, and then the awakening and shutting down of the data transmission unit can be controlled in a manner that does not require high device performance, that is, the awakening and shutting down of the data transmission unit can be controlled according to the number of newly added flow tables.
[0183] As an example, after obtaining the type of network service carried by the network device, the overall traffic size of the service flow carried by the network device can be obtained according to the type of network service. When the traffic of the service flow carried by the network device is large, but the performance of the network device is good, that is, the hardware type of the network device can support the service flow of the network service type, a method with high accuracy but high requirements on device performance can be used to control the awakening and shutting down of the data transmission unit, that is, the awakening and shutting down of the data transmission unit can be controlled according to the number of handshake messages. When the traffic of the service flow carried by the network device is large, but the performance of the network device is average, that is, the hardware type of the network device cannot well support the service flow of the network service type, the awakening and shutting down of the data transmission unit can be controlled in a way that does not require high device performance, that is, the awakening and shutting down of the data transmission unit can be controlled according to the number of newly added flow tables.
[0184] As an example, considering that different types of network services use different transmission protocols for service flows, for some transmission protocols (such as the QUIC protocol), the message will be encrypted during transmission, thereby affecting the network device's field parsing of the message and affecting the recognition of the handshake message. Therefore, for network service types that use encrypted transmission protocols, the wake-up and shutdown of the data transmission unit can be controlled according to the number of newly added flow tables. After obtaining the type of network service carried by the network device, if the network service type is one of the set service types, that is, the message representing the service flow carried by the network device does not use an encrypted transmission protocol, the network device can identify the handshake message, and then control the wake-up and shutdown of the data transmission unit according to the number of handshake messages. If the network service type does not belong to one of the set service types, that is, the message representing the service flow carried by the network device uses an encrypted transmission protocol, which affects the network device's recognition of the handshake message, and then the wake-up and shutdown of the data transmission unit can be controlled according to the number of newly added flow tables.
[0185] It can be understood that the above is only an example of setting conditions and does not serve as a specific limitation on the setting conditions. In some embodiments of the present application, the setting conditions can also be implemented in other ways, which can be set specifically according to business needs.
[0186] In the embodiment of the present application, obtaining the number of handshake messages and controlling the data transmission unit according to the number of handshake messages may include:
[0187] (1): Get the number of handshake messages.
[0188] (2): When the number of handshake messages reaches the wake-up condition, wake up at least one of the one or more data transmission units.
[0189] (3): When the number of handshake messages reaches the shutdown condition, shut down at least one of one or more data transmission units.
[0190] Among them, the obtained number of handshake messages can be obtained by counting the message types of the messages received within a preset time window.
[0191] It can be understood that for the specific processes of steps (1) to (3), reference can be made to the processes of steps S401 to S403, which will not be elaborated here.
[0192] In the embodiments of the present application, obtaining the number of newly added flow tables and controlling the data transmission units according to the number of newly added flow tables may include:
[0193] (A): Obtain the number of newly added flow tables.
[0194] (B): When the number of newly added flow tables reaches the wake-up condition, wake up at least one of one or more data transmission units.
[0195] (C): When the number of newly added flow tables reaches the shutdown condition, shut down at least one of one or more data transmission units.
[0196] Among them, the obtained number of newly added flow tables can be obtained by counting the message identifiers of the messages received within a preset time window. When the network device controls the data transmission units, for each received message, it can detect whether a flow table needs to be established according to the message identifier of the message and count the established flow tables. In this way, the network device can obtain the number of newly added flow tables within the preset time window according to the message identifiers of the messages.
[0197] After obtaining the number of newly added flow tables, the one or more data transmission units can be controlled according to the number of newly added flow tables and the previously obtained energy-saving policy, that is, the one or more data transmission units are shut down or woken up.
[0198] In the embodiments of the present application, the energy-saving policy includes the wake-up condition for waking up the data transmission units and the shutdown condition for shutting down the data transmission units. When the number of newly added flow tables meets the wake-up condition, at least one of one or more data transmission units is woken up. When the number of newly added flow tables meets the shutdown condition, at least one of one or more data transmission units is shut down.
[0199] Exemplarily, when the number of newly added flow tables is greater than the fifth threshold, N2 data transmission units are woken up. When the number of newly added flow tables is greater than the sixth threshold, M2 data transmission units are woken up; where the sixth threshold is greater than the fifth threshold, and N2 and M2 are positive integers, and M2 is greater than N2.
[0200] Exemplarily, when the number of newly added flow tables is less than the seventh threshold, L2 data transmission units are shut down, and when the number of newly added flow tables is less than the eighth threshold, K2 data transmission units are shut down; wherein the seventh threshold is greater than the eighth threshold, L2 and K2 are positive integers, and L2 is less than K2.
[0201] It can be understood that the specific process of step (A) to step (C) can refer to the above description of waking up and shutting down the data transmission unit based on the number of newly added flow tables, which will not be repeated here.
[0202] S504: Perform trend fitting according to the number of handshake messages and update the energy-saving strategy; or perform trend fitting according to the number of newly added flow tables and update the energy-saving strategy.
[0203] It is understandable that when the data transmission unit is controlled according to the number of handshake messages, the trend fitting can be performed according to the number of handshake messages to update the energy saving strategy. When the data transmission unit is controlled according to the number of newly added flow tables, the trend fitting can be performed according to the number of newly added flow tables to update the energy saving strategy.
[0204] It can be understood that when the data transmission unit is controlled according to the number of handshake messages, if the energy-saving strategy is sent by the control device to the network device, when the energy-saving strategy is updated, the network device can send the number of handshake messages and the total number of messages in each update cycle to the control device. After receiving the number of handshake messages and the total number of messages in each update cycle, the control device can perform trend fitting based on the number of handshake messages in the update cycle and the total number of messages received to obtain a fitting result, update the shutdown condition and / or wake-up condition in the energy-saving strategy based on the fitting result, and send the updated energy-saving strategy to the network device.
[0205] When the data transmission unit is controlled according to the number of newly added flow tables, if the energy-saving strategy is sent by the control device to the network device, when the energy-saving strategy is updated, the network device can send the number of newly added flow tables and the total number of messages in each update cycle to the control device. After receiving the number of newly added flow tables and the total number of messages in each update cycle, the control device can perform trend fitting based on the number of newly added flow tables in the update cycle and the total number of messages received to obtain the fitting results, update the shutdown conditions and / or wake-up conditions in the energy-saving strategy based on the fitting results, and send the updated energy-saving strategy to the network device.
[0206] In this way, when the network device controls the data transmission unit based on the updated energy-saving strategy, the control accuracy can be improved.
[0207] It can be understood that the process of performing trend fitting according to the number of handshake messages and updating the energy-saving strategy and performing trend fitting according to the number of newly added flow tables and updating the energy-saving strategy can refer to the above description and will not be repeated here.
[0208] The device control method provided in the embodiment of the present application uses the number of handshake messages or the number of newly added flow tables that are closely related to the current actual business flow trend changes to predict the future workload of the network device, which can accurately reflect the trend changes in the amount of data to be transmitted in the future, and can effectively respond to sudden peaks in transmission data. When the peak of transmission data arrives, the data transmission unit in the network device is woken up in time to avoid packet loss problems. At the same time, when the amount of transmission data is small, the data transmission unit can be shut down to improve the energy saving effect of the equipment.
[0209] Considering that in actual applications, the same source device may initiate multiple handshake messages at the same time or in a short period of time. In order to improve the energy saving effect, in some embodiments of the present application, the message identifier of each handshake message can also be counted, and the data transmission unit of the network device can be awakened according to the number of handshake messages and the message identifier of the handshake message. Exemplarily, when the number of handshake messages reaches the set wake-up threshold within the preset time window, and the number of message identifiers of the handshake messages is greater than the set identifier threshold, the wake-up operation of the data transmission unit is performed. When the number of handshake messages reaches the set wake-up threshold within the preset time window, but the number of message identifiers of the handshake messages is less than the set identifier threshold, there is no need to perform a wake-up operation on the data transmission unit.
[0210] It can be understood that when the number of handshake messages reaches the set wake-up threshold, and the number of message identifiers of the handshake messages is greater than the set identification threshold, it means that the total amount of messages will increase in the future, and they come from a large number of different source devices, and the message processing volume is large. Therefore, the data transmission unit can be awakened. When the number of handshake messages reaches the set wake-up threshold, but the number of message identifiers of the handshake messages is less than the set identification threshold, it can mean that the total amount of messages will increase in the future, but there are more messages from the same source device, and the message processing volume is not large. Therefore, in order to save energy, there is no need to wake up the data transmission unit. Among them, the wake-up threshold and identification threshold can be set according to business needs, and there is no specific restriction.
[0211] As an example, in order to improve security, in an embodiment of the present application, the message features of the handshake message can also be counted, and the data transmission unit of the network device can be awakened according to the number of handshake messages and the message features of the handshake message. Exemplarily, when the number of handshake messages reaches the set wake-up threshold within the preset time window, and the message features of the handshake message meet the preset feature conditions, the wake-up operation on the data transmission unit is performed; when the number of handshake messages reaches the set wake-up threshold within the preset time window, but the message features of the handshake message do not meet the preset feature conditions, there is no need to perform the wake-up operation on the data transmission unit.
[0212] Among them, message characteristics include, but are not limited to: packet length distribution, packet interval, protocol type, etc., and preset characteristic conditions include: packet length distribution meets the set distribution range, packet interval meets the set interval threshold, and protocol type is the set type.
[0213] When the number of handshake messages reaches the set wake-up threshold within the preset time window, and the message characteristics of the handshake messages meet the preset characteristic conditions, it means that the total amount of messages will increase in the future, and there is no risk in the messages, so the data transmission unit can be awakened. When the number of handshake messages reaches the set wake-up threshold within the preset time window, but the message characteristics of the handshake messages do not meet the preset characteristic conditions, it means that the total amount of messages will increase in the future, but there is a risk in the messages, so in order to improve security, there is no need to perform a wake-up operation on the data transmission unit.
[0214] Based on the same concept, an embodiment of the present application provides an electronic device, which may be a network device in the above embodiment. The electronic device may specifically include a transceiver, a memory, a processor, and one or more computer programs. Among them, the transceiver, the memory, and the processor may be connected via one or more communication buses. Among them, the one or more computer programs are stored in the above memory and configured to be executed by the processor, and when the one or more computer programs are executed by the processor, the functions or steps in the above device control method are implemented.
[0215] An embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processing circuit, the functions or steps in the above-mentioned device control method are implemented.
[0216] In addition, an embodiment of the present application may also provide a chip system, which includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions, and when the computer program instructions are executed by the processing circuit, the functions or steps in the above-mentioned device control method are implemented.
[0217] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that, for the convenience and conciseness of description, the specific working processes of the chip system, electronic device and computer-readable storage medium described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0218] It is understandable that the steps of the method or algorithm described in conjunction with the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory, a flash memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a read-only optical disk, or any other form of storage medium. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuit, ASIC). In addition, the ASIC can be located in an electronic device. Of course, the processor and the storage medium can also be present in an electronic device as discrete components.
[0219] In an optional manner, when software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is implemented in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disk (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0220] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
Claims
1. A device control method, It is characterized in that Applied to a network device, the network device includes one or more data transmission units, and the method includes: Based on the received messages, the number of handshake messages is obtained; When the number of the handshake messages reaches a wake-up condition, at least one of the one or more data transmission units is awakened.
2. The device control method according to claim 1, It is characterized in that The number of handshake messages is obtained by performing message type statistics on messages received within a preset time window.
3. The device control method according to claim 1, It is characterized in that When the number of the handshake messages reaches the wake-up condition, waking up at least one of the one or more data transmission units, including: When the number of the handshake messages is greater than a first threshold, waking up N1 of the data transmission units; When the number of the handshake messages is greater than a second threshold, waking up M1 of the data transmission units; The second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1.
4. The device control method according to any one of claims 1 to 3, It is characterized in that The method further includes: when the number of the handshake messages reaches a shutdown condition, shutting down at least one of the one or more data transmission units.
5. The device control method according to claim 4, It is characterized in that When the number of the handshake messages reaches the shutdown condition, shutting down at least one of the one or more data transmission units includes: When the number of the handshake messages is less than a third threshold, shutting down L1 of the data transmission units; When the number of the handshake messages is less than a fourth threshold, shutting down K1 of the data transmission units; The third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1.
6. The device control method according to any one of claims 1 to 5, It is characterized in that The method further comprises: Trend fitting is performed according to the number of the handshake messages, and an energy saving strategy is updated, where the energy saving strategy includes the wake-up condition and / or the shutdown condition for shutting down the data transmission unit.
7. The device control method according to any one of claims 1 to 5, It is characterized in that The method further comprises: The number of handshake messages sent to the control device; An energy-saving strategy is received from the control device, wherein the energy-saving strategy is updated based on a trend fitting performed according to the number of the handshake messages and the trend fitting result, and the energy-saving strategy at least includes the wake-up condition and / or the shutdown condition for shutting down the data transmission unit.
8. A device control method, It is characterized in that Applied to a network device, the network device includes one or more data transmission units, and the method includes: Acquire device data of the network device, where the device data includes one or more of the following: hardware type, and type of network service carried by the network device; When the device data meets a set condition, acquiring the number of handshake messages, and when the number of handshake messages reaches a wake-up condition, waking up at least one of the one or more data transmission units; When the device data does not meet the set condition, the number of newly added flow tables is obtained, and when the number of newly added flow tables reaches the wake-up condition, at least one of the one or more data transmission units is woken up.
9. The device control method according to claim 8, It is characterized in that The number of handshake messages is obtained by performing message type statistics on messages received within a preset time window.
10. The device control method according to claim 8, It is characterized in that The number of newly added flow tables is obtained by counting the message identifiers of the messages received within a preset time window.
11. The device control method according to claim 10, It is characterized in that The message identifier includes one or more of the following: address information of the source end, address information of the destination end, port number of the source end, port number of the destination end, and protocol type.
12. The device control method according to any one of claims 8 to 11, It is characterized in that The waking up at least one of the one or more data transmission units comprises: When the number of the handshake messages is greater than a first threshold, N1 of the data transmission units are awakened; when the number of the handshake messages is greater than a second threshold, M1 of the data transmission units are awakened, wherein the second threshold is greater than the first threshold, N1 and M1 are positive integers, and M1 is greater than N1; or, When the number of newly added flow tables is greater than the fifth threshold, N2 of the data transmission units are woken up; when the number of newly added flow tables is greater than the sixth threshold, M2 of the data transmission units are woken up, wherein the sixth threshold is greater than the fifth threshold, N2 and M2 are positive integers, and M2 is greater than N2.
13. The device control method according to any one of claims 8 to 12, It is characterized in that The method further includes: when the number of the handshake messages reaches a shutdown condition, shutting down at least one of the one or more data transmission units; or, When the number of the newly added flow tables reaches the shutdown condition, at least one of the one or more data transmission units is shut down.
14. The device control method according to claim 13, It is characterized in that The shutting down at least one of the one or more data transmission units comprises: When the number of the handshake messages is less than a third threshold, L1 of the data transmission units are turned off; when the number of the handshake messages is less than a fourth threshold, K2 of the data transmission units are turned off, wherein the third threshold is greater than the fourth threshold, L1 and K1 are positive integers, and L1 is less than K1; or, When the number of the newly added flow tables is less than the seventh threshold, L2 of the data transmission units are shut down; when the number of the newly added flow tables is less than the eighth threshold, K2 of the data transmission units are shut down, wherein the seventh threshold is greater than the eighth threshold, L2 and K2 are positive integers, and L2 is less than K2.
15. The device control method according to any one of claims 8 to 14, It is characterized in that The method further comprises: Perform trend fitting according to the number of the handshake messages and update the energy-saving strategy; or perform trend fitting according to the number of the newly added flow tables and update the energy-saving strategy; The energy saving strategy includes the wake-up condition and / or the shutdown condition for shutting down the data transmission unit.
16. The device control method according to any one of claims 8 to 14, It is characterized in that The method further comprises: The number of the handshake messages sent to the control device, or the number of the newly added flow tables sent to the control device; Receiving an energy-saving strategy from the control device, where the energy-saving strategy is updated based on a result of trend fitting performed according to the number of the handshake messages, or where the energy-saving strategy is updated based on a result of trend fitting performed according to the number of the newly added flow tables; The energy saving strategy at least includes the wake-up condition and / or the shutdown condition for shutting down the data transmission unit.
17. The device control method according to any one of claims 8 to 16, It is characterized in that The setting conditions include one or more of the following: the hardware type of the network device can support the service flow of the network service type, the hardware type is one of the set hardware types, and the network service type is one of the set service types.
18. An electronic device, It is characterized in that The electronic device comprises: A transceiver for sending and receiving radio signals; a memory for storing computer program instructions; A processor is used to execute the computer program instructions to support the electronic device to implement the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 17.
19. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processing circuit, the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 17 is implemented.
20. A chip system, It is characterized in that The chip system includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 17 is implemented.
21. A computer program product comprising instructions, It is characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 17.