Dynamic data forwarding method and system based on intelligent gateway

By collecting multi-dimensional information of the intelligent gateway and using SVR models to predict energy consumption, generating the optimal energy consumption path, the problem of high energy consumption of the intelligent gateway is solved, extending the service life of the equipment and improving the reliability of the network.

CN119450637AInactive Publication Date: 2025-02-14BEIJING BIG DATA CO LTD

Patent Information

Application Number
CN202510025053.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Smart gateways and sensor devices are powered by batteries, which consume a lot of energy, affecting the service life of the device.

Method used

By collecting multidimensional gateway information, including CPU usage, memory usage, network traffic, device operation time, ambient temperature, power supply voltage and device type, and predicting future energy consumption per unit time with the support vector regression (SVR) model to generate optimal energy Consume gateway path.

Benefits of technology

It realizes dynamic real-time adjustment of energy efficiency strategies, optimizes node energy consumption and network performance, extends the service life of equipment, and improves network reliability and sustainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450637A_ABST
    Figure CN119450637A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of dynamic data forwarding, and discloses a dynamic data forwarding method and system based on an intelligent gateway. Comprising the following steps: collecting multi-dimensional information (CPU utilization rate, memory utilization rate, network flow, equipment operation time, environment temperature, power supply voltage and equipment type) of a gateway, and combining a support vector regression (SVR) model to predict a future energy consumption value. And the energy consumption is predicted in real time based on the updated feature vector. Establishing a topological node of the gateway, and comprehensively considering factors such as predicted energy consumption, node electric quantity, working voltage, environment temperature and the like to obtain a state score; during path selection, the path with the highest score is selected according to the state score of the node so as to ensure that the energy consumption in the data transmission process is minimized, and the service life of the gateway is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data forwarding, and more specifically, to a dynamic data forwarding method and system based on an intelligent gateway. Background Art

[0002] Smart gateways are network devices with advanced processing capabilities that can implement multiple network protocol conversions and data processing. Dynamic data forwarding technology is based on preset rules or real-time network conditions. Smart gateways automatically select the best path to forward data from the source device to the target device or the cloud.

[0003] The Chinese patent with authorization announcement number CN110351385B discloses a home gateway system and data forwarding method, which obtains available aggregation nodes through an aggregation node selection algorithm to realize data processing within the network, and then obtains each candidate forwarding gateway and uses the gateway with the strongest signal for forwarding processing, making forwarding safer.

[0004] The Chinese patent with authorization announcement number CN113194038B discloses a data forwarding method for an intelligent edge gateway, which divides the addresses configured with collection points into multiple continuous address segments in sequence, each segment has a fixed number of addresses and is configured with collection points, and the addresses between adjacent segments are vacant; the continuous address segment is further divided into multiple collection address segments, and the collection frame command is used to collect and forward data for all collection points in each segment, which reduces the difficulty of configuring the collection points and improves the usability of the device.

[0005] However, smart gateways and sensor devices usually require battery power. Once a smart gateway is turned on, it is rarely turned off unless a fault occurs. For example, it is difficult to replace the battery of some gateways in plateau areas. In order to extend the life of the network, it is necessary to minimize the energy consumption of the nodes. The above invention fails to effectively solve the problem of high energy consumption of the gateway and the failure to effectively extend the service life of the equipment.

[0006] In view of this, the present invention proposes a dynamic data forwarding method and system based on an intelligent gateway to solve the above problems. Summary of the invention

[0007] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a dynamic data forwarding method and system based on an intelligent gateway.

[0008] To achieve the above object, the present invention provides the following technical solutions: A dynamic data forwarding method based on an intelligent gateway, the method comprising: Collect gateway information; gateway information includes: gateway CPU usage, memory usage, average network traffic, device running time, ambient temperature, power supply voltage and device type; collect energy consumption values; Perform one-hot encoding for device types and mark them as device type codes; preset power consumption assessments for gateways of different device types; Based on gateway information and energy consumption values, train a machine learning model that can predict the gateway's future energy consumption per unit time in real time; The optimal energy consumption gateway path is generated based on gateway information and energy consumption values ​​predicted by machine learning models. The generation process includes: initializing the gateway; building the gateways in the network as nodes, updating the node-initialized gateway information to the cloud, and building the network topology based on the nodes; initializing the node status score; real-time monitoring and updating the gateway status score; collecting the path score as the basis for gateway path selection; selecting the path with the largest path score for transmission as the optimal energy consumption gateway path.

[0009] Preferably, the CPU usage rate represents the computing resource usage rate of the gateway, the memory usage rate represents the consumption of the gateway memory, and the average network traffic is obtained by monitoring the upload rate and download rate of the gateway and calculating the average value; The device running time is the length of time the gateway runs continuously. The ambient temperature is the temperature of the environment where the gateway is located. The device environment is the electrical box where the gateway is located or the range within a radius of 1m from the gateway. The power supply voltage is the power supply voltage of the gateway. The device type represents the type of gateway device. The energy consumption value is the energy consumed by the gateway in the future unit time. The unit time is 1h. The energy unit is kilowatt-hour. The device type code and power consumption assessment are both gateway information.

[0010] Preferably, one-hot encoding creates a binary vector for each gateway type: The settings for different gateway types include: Traffic gateway: [1, 0, 0, 0,]; Business gateway: [0, 1, 0, 0]; Data gateway: [0, 0, 1, 0]; AI Gateway: [0, 0, 0, 1,].

[0011] Preferably, the training method of the machine learning model includes: A set of gateway information is converted into a feature vector, and the energy consumption value is used as the label corresponding to the feature vector. Each set of feature vectors and the label corresponding to each set of feature vectors are constructed as a sample, and multiple samples are collected to construct a data set; the data set is divided into a training set, a validation set, and a test set, wherein the training set accounts for 70% of the data set, and the validation set and the test set each account for 15% of the data set; The training set is used as the input of the machine learning model, and the machine learning model takes the future energy consumption value per unit time as the output; the energy consumption value corresponding to a set of real-time feature vectors is used as the prediction target, and minimizing the loss function value of the machine learning model is used as the training target; when the loss function value of the machine learning model is less than or equal to the preset target loss value, the training is stopped; The machine learning model loss function is the mean square error; the mean square error is calculated by Minimize to train the model; in the loss function is the loss function value, i is the eigenvector group number; u is the number of eigenvector groups; is the label corresponding to the i-th group of feature vectors, The energy consumption value predicted by the i-th group of feature vectors; The machine learning model is an SVR model, and the kernel function of the SVR model selects the RBF kernel.

[0012] Preferably, the status score of the i-th node in the initialization gateway is: ; Where: Score the status of node i; Energy consumption values ​​predicted for machine learning models; is the maximum value of the node's historical energy consumption; The current remaining power of the node; is the initial power of the node; is the current power supply voltage of the node; v is the optimal working voltage of the node; obtained from the gateway production manual; is the ambient temperature of the node; The optimal working environment temperature of the node; provided by the gateway production manual or manufacturer; It represents the ratio of the predicted energy consumption of a node to its maximum energy consumption; Indicates the ratio of the remaining power to the initial power; Path scoring ; n is the number of nodes on the path.

[0013] A dynamic data forwarding system based on an intelligent gateway, the system comprising: Data collection module, collects gateway information; gateway information includes: gateway CPU usage, memory usage, average network traffic, device running time, ambient temperature, power supply voltage and device type; collects energy consumption value; The pre-processing module performs one-hot encoding for the device type and marks it as the device type code; presets the power consumption assessment degree for gateways of different device types; Model training module, based on gateway information and energy consumption values, trains a machine learning model that can predict the gateway's future energy consumption per unit time in real time; The path decision module generates the optimal energy consumption gateway path based on the gateway information and the energy consumption value predicted by the machine learning model; the generation process includes: initializing the gateway; building the gateways in the network as nodes, updating the node-initialized gateway information to the cloud, and building the network topology based on the nodes; initializing the node status score; real-time monitoring and updating the gateway status score; collecting the path score as the basis for gateway path selection; selecting the path with the largest path score for transmission as the optimal energy consumption gateway path.

[0014] An electronic device comprises: a processor and a memory, wherein the memory stores a computer program that can be called by the processor; the processor executes the above-mentioned dynamic data forwarding method based on an intelligent gateway by calling the computer program stored in the memory.

[0015] A computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute the above-mentioned dynamic data forwarding method based on an intelligent gateway.

[0016] The technical effects and advantages of a dynamic data forwarding method and system based on an intelligent gateway of the present invention are as follows: This application collects multi-dimensional information of the gateway (CPU usage, memory usage, network traffic, device running time, ambient temperature, power supply voltage and device type) and combines it with the support vector regression (SVR) model to predict future energy consumption values. The model predicts energy consumption based on real-time updated feature vectors and obtains a status score by comprehensively considering factors such as predicted energy consumption, node power, operating voltage and ambient temperature. When selecting a path, the system selects the path with the highest score based on the node's status score to ensure that energy consumption during data transmission is minimized and system stability is optimized.

[0017] This application optimizes node energy consumption and network performance by dynamically adjusting energy efficiency strategies in real time. Based on accurate energy consumption prediction and status score calculation, it can ensure that wireless sensor networks maintain efficient energy management during long-term operation and extend the service life of the equipment. Compared with traditional empirical methods, the use of the SVR model for energy consumption prediction can make more accurate predictions based on actual operating data, thereby avoiding overly conservative or overly optimistic energy consumption estimates. By selecting the path with the highest status score, the risk of network failure caused by unstable node status or excessive energy consumption is further reduced, thereby effectively improving the reliability and sustainability of the entire network. This application not only optimizes the energy efficiency of the network, but also improves the stability and operating efficiency of the equipment, meeting the gateway's needs for efficient energy management and long-term sustainable operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of a dynamic data forwarding method based on an intelligent gateway of the present invention; Figure 2 A schematic diagram of a dynamic data forwarding system based on an intelligent gateway of the present invention; Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of the present application. DETAILED DESCRIPTION

[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] Example 1 See also Figure 1 As shown, the dynamic data forwarding method based on the intelligent gateway described in this embodiment includes: Collect gateway information; Gateway information includes: gateway CPU usage, memory usage, average network traffic, device running time, ambient temperature, power supply voltage and device type.

[0021] CPU usage indicates the computing resource usage of the gateway and reflects the current processor load level. Specifically, the CPU usage is read in real time through the processor resource management program through the system monitoring function inside the gateway. CPU usage can help identify processor overload and provide a reference for energy consumption prediction and optimization. Generally, CPU consumption accounts for a high proportion of power consumption.

[0022] The memory usage rate is the consumption of the gateway memory, which reflects the usage of memory resources. The real-time memory usage can also be obtained through the resource management program that comes with the gateway system.

[0023] The average network traffic is obtained by monitoring the upload rate and download rate of the gateway and calculating the average value. The average network traffic can indicate the communication load of the device. The average network traffic is obtained through the traffic counter of the network interface or the network monitoring module.

[0024] The device running time is the length of time the gateway has been running continuously, which is automatically captured from the device startup log. It reflects the usage intensity of the device, can identify the impact of long-term operation on the device energy consumption, and is used to formulate low-power consumption strategies.

[0025] The ambient temperature is the temperature of the environment where the gateway is located, which has a direct impact on the heat dissipation and power consumption of the device. If the external environment is too cold, the gateway may be in a harsh operating environment and needs to maintain the operating temperature. Overheating will affect heat dissipation. Specifically, the temperature sensor is installed in the device environment and the data is uploaded to the cloud in real time. The device environment is the range within a radius of 1m from the electrical box where the gateway is located or the gateway. Temperature is an important factor affecting the performance and life of electronic equipment. Monitoring the ambient temperature can ensure that the device operates at an appropriate temperature and reduce the risk of increased energy consumption and equipment loss caused by high temperature.

[0026] The power supply voltage is the power supply voltage of the gateway, which is obtained in real time using a voltage sensor. Collecting the power supply voltage ensures the power stability of the device and avoids increased energy consumption or unstable device operation due to insufficient power supply.

[0027] The device type represents the type of gateway device. Different types of gateways have different energy consumption characteristics. Perform a unique hot encoding on the device type and mark it as the device type code; One-hot encoding creates a binary vector for each gateway type: Exemplarily, the settings of different gateway types include: Traffic gateway: [1, 0, 0, 0,]; Business gateway: [0, 1, 0, 0]; Data gateway: [0, 0, 1, 0]; AI Gateway: [0, 0, 0, 1,]; The device type is automatically collected and recorded based on the device identification data when the gateway is initialized.

[0028] Device type helps to distinguish the energy consumption patterns of different types of devices, facilitating comparative analysis between devices and formulation of optimization strategies.

[0029] Set power consumption assessment for gateways of different device types, which is set by gateway staff based on the actual use of the gateway. The more frequently used and complex the gateway is, the higher the power consumption assessment is. For example, the AI ​​gateway needs to deduce the AI ​​model locally, using a higher CPU frequency, and the power consumption assessment is set to 3; while the traffic gateway only needs to monitor network traffic, the load is relatively light, and the power consumption assessment is set to 2. The device type code and the power consumption assessment are both gateway information.

[0030] Collect energy consumption values; energy consumption values ​​are the energy consumed by the gateway in the future unit time; unit time is 1h; energy unit is kilowatt-hour. The specific information is obtained through the smart meter connected to the gateway.

[0031] Based on gateway information and energy consumption values, train a machine learning model that can predict the gateway's future energy consumption per unit time in real time; The training method of the machine learning model includes: A set of gateway information is converted into a feature vector, and the energy consumption value is used as the label corresponding to the feature vector. Each set of feature vectors and the label corresponding to each set of feature vectors are constructed as a sample, and multiple samples are collected to construct a data set; the data set is divided into a training set, a validation set, and a test set, wherein the training set accounts for 70% of the data set, and the validation set and the test set each account for 15% of the data set; The training set is used as the input of the machine learning model, and the machine learning model takes the future energy consumption value per unit time as the output; the energy consumption value corresponding to a set of real-time feature vectors is used as the prediction target, and minimizing the loss function value of the machine learning model is used as the training target; when the loss function value of the machine learning model is less than or equal to the preset target loss value, the training is stopped; The machine learning model loss function is the mean square error; the mean square error is calculated by Minimize to train the model; in the loss function is the loss function value, i is the eigenvector group number; u is the number of eigenvector groups; is the label corresponding to the i-th group of feature vectors, The energy consumption value predicted by the i-th group of feature vectors; The machine learning model is an SVR model. The SVR model completes the prediction by finding a high-dimensional hyperplane that can fit the data well. The kernel function of the SVR model selects the RBF kernel. The regularization parameter (C) and the kernel function parameter (γ) are obtained through actual engineering implementation and continuous experimental tuning.

[0032] Generate the optimal energy consumption gateway path based on gateway information and energy consumption values ​​predicted by machine learning models; The process of generating the optimal energy consumption gateway path includes: Initialize the gateway; build the gateways in the network as nodes to ensure that each node can accurately participate in energy consumption assessment and decision-making. Update the node-initialized gateway information to the cloud, and build the network topology based on the nodes. The links between nodes in the network topology are direct communication paths. Initialize the node status score for the node; the status score of the i-th node is: ; Where: Score the status of node i. A higher score indicates a more stable node status and lower energy consumption, which makes it more suitable as a routing node. Energy consumption values ​​predicted for machine learning models; is the maximum value of the node's historical energy consumption; The current remaining power of the node, which is obtained in real time by the node's power sensor; is the initial power of the node; is the current power supply voltage of the node; is the optimal operating voltage of the node; obtained from the gateway production manual; is the ambient temperature of the node; The optimal working environment temperature of the node; provided by the gateway production manual or manufacturer; It represents the ratio of the predicted energy consumption of a node to its maximum energy consumption. The lower the ratio, the less energy consumption the node consumes, which helps optimize the energy efficiency of routing. It indicates the ratio of the remaining power to the initial power. The higher the value, the more power the node has and is more suitable for bearing the routing load. and It measures the adaptability of the supply voltage, and deviation from the optimal value will reduce the score; Monitor and update the status score of the gateway in real time; use the status score as the basis for gateway path selection, and the specific Calculation; In the formula, Score the paths; select the path with the largest path score for transmission; this path represents the path with the most stable state and the lowest energy consumption, and is suitable as a communication path.

[0033] This application collects multi-dimensional information of the gateway (CPU usage, memory usage, network traffic, device running time, ambient temperature, power supply voltage and device type) and combines it with the support vector regression (SVR) model to predict future energy consumption values. The model predicts energy consumption based on the feature vector updated in real time. The status score is obtained by comprehensively considering factors such as predicted energy consumption, node power, operating voltage and ambient temperature. When selecting a path, the system selects the path with the highest score based on the node's status score to ensure that energy consumption during data transmission is minimized and system stability is optimized.

[0034] The core advantage of this application is to dynamically adjust the energy efficiency strategy in real time to optimize node energy consumption and network performance. Through accurate energy consumption prediction and status score calculation, it can ensure that the wireless sensor network maintains efficient energy management during long-term operation and extend the service life of the equipment. Compared with traditional empirical methods, the use of the SVR model for energy consumption prediction can make more accurate predictions based on actual operating data, thereby avoiding overly conservative or overly optimistic energy consumption estimates. By selecting the path with the highest status score, the risk of network failure caused by unstable node status or excessive energy consumption is further reduced, thereby effectively improving the reliability and sustainability of the entire network. This application not only optimizes the energy efficiency of the network, but also improves the stability and operating efficiency of the equipment, meeting the gateway's needs for efficient energy management and long-term sustainable operation.

[0035] Example 2 See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a dynamic data forwarding system based on an intelligent gateway is provided, and the system includes: Data collection module, collects gateway information; gateway information includes: gateway CPU usage, memory usage, average network traffic, device running time, ambient temperature, power supply voltage and device type; collects energy consumption value; The pre-processing module performs one-hot encoding for the device type and marks it as the device type code; presets the power consumption assessment degree for gateways of different device types; Model training module, based on gateway information and energy consumption values, trains a machine learning model that can predict the gateway's future energy consumption per unit time in real time; The path decision module generates the optimal energy consumption gateway path based on the gateway information and the energy consumption value predicted by the machine learning model; the generation process includes: initializing the gateway; building the gateways in the network as nodes, updating the node-initialized gateway information to the cloud, and building the network topology based on the nodes; initializing the node status score; real-time monitoring and updating the gateway status score; collecting the path score as the basis for gateway path selection; selecting the path with the largest path score for transmission as the optimal energy consumption gateway path.

[0036] The modules are connected via wired and / or wireless networks.

[0037] Example 3 See also Figure 3 As shown, according to another aspect of the present application, a dynamic data forwarding method and system electronic device 500 based on an intelligent gateway is also provided. The electronic device 500 may include one or more processors and one or more memories. Among them, the memory stores a computer readable code, and when the computer readable code is executed by one or more processors, it can execute a dynamic data forwarding method and system based on an intelligent gateway as described above.

[0038] The method or system according to the embodiment of the present application can also be used by Figure 3 The electronic device architecture shown in FIG. Figure 3 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as the ROM 503 or the hard disk 507, may store a method and system for dynamic data forwarding based on an intelligent gateway provided in the present application. Furthermore, the electronic device 500 may also include a user interface 508. Of course, Figure 3The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 3 One or more components of an electronic device are shown.

[0039] Example 4 See also Figure 4 As shown, a computer-readable storage medium 600 according to an embodiment of the present application is shown. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are executed by the processor, a dynamic data forwarding method and system based on an intelligent gateway according to an embodiment of the present application described with reference to the above figures can be executed. The storage medium 600 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.

[0040] In addition, according to the embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided by the present application. When the computer program is executed by a central processing unit (CPU), the above functions defined in the method of the present application are executed.

[0041] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments 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 or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can 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 can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0042] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0043] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0044] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a dynamic data forwarding method and system based on an intelligent gateway. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0045] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0046] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0047] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0048] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A dynamic data forwarding method based on an intelligent gateway, characterized in that: include: Collect gateway information; Gateway information includes: gateway CPU usage, memory usage, average network traffic, device running time, ambient temperature, power supply voltage and device type; collect energy consumption values; Perform one-hot encoding for device types and mark them as device type codes; preset power consumption assessments for gateways of different device types; Based on gateway information and energy consumption values, train a machine learning model that can predict the gateway's future energy consumption per unit time in real time; The optimal energy consumption gateway path is generated based on gateway information and energy consumption values ​​predicted by machine learning models. The generation process includes: initializing the gateway; building the gateways in the network as nodes, updating the node-initialized gateway information to the cloud, and building the network topology based on the nodes; initializing the node status score; real-time monitoring and updating the gateway status score; collecting the path score as the basis for gateway path selection; selecting the path with the largest path score for transmission as the optimal energy consumption gateway path.

2. According to claim 1, a dynamic data forwarding method based on an intelligent gateway is characterized in that: The CPU usage rate indicates the computing resource usage rate of the gateway, the memory usage rate is the consumption of the gateway memory, and the average network traffic is obtained by monitoring the upload rate and download rate of the gateway and calculating the average value; the device running time is the length of time the gateway is continuously running, the ambient temperature is the temperature of the environment in which the gateway is located, and the device environment is the electrical box where the gateway is located or the range within a radius of 1m from the gateway; the power supply voltage is the power supply voltage of the gateway, and the device type represents the type of gateway device; the energy consumption value is the energy consumed by the gateway in the future unit time; the unit time is 1h; the energy unit is kilowatt-hour; the device type code and the power consumption assessment degree belong to the same gateway information.

3. The method for dynamic data forwarding based on intelligent gateway according to claim 2, characterized in that: One-hot encoding creates a binary vector for each gateway type: The settings for different gateway types include: Traffic gateway: [1, 0, 0, 0,]; Business gateway: [0, 1, 0, 0]; Data gateway: [0, 0, 1, 0]; AI Gateway: [0, 0, 0, 1,].

4. The method for dynamic data forwarding based on intelligent gateway according to claim 3, characterized in that: The training method of the machine learning model includes: A set of gateway information is converted into a feature vector, and the energy consumption value is used as the label corresponding to the feature vector. Each set of feature vectors and the label corresponding to each set of feature vectors are constructed as a sample, and multiple samples are collected to construct a data set; the data set is divided into a training set, a validation set, and a test set, wherein the training set accounts for 70% of the data set, and the validation set and the test set each account for 15% of the data set; The training set is used as the input of the machine learning model, and the machine learning model takes the future energy consumption value per unit time as the output; the energy consumption value corresponding to a set of real-time feature vectors is used as the prediction target, and minimizing the loss function value of the machine learning model is used as the training target; when the loss function value of the machine learning model is less than or equal to the preset target loss value, the training is stopped; The machine learning model loss function is the mean square error; the mean square error is calculated by Minimize to train the model; in the loss function is the loss function value, i is the eigenvector group number; u is the number of eigenvector groups; is the label corresponding to the i-th group of feature vectors, The energy consumption value predicted by the i-th group of feature vectors; The machine learning model is an SVR model, and the kernel function of the SVR model selects the RBF kernel.

5. The method for dynamic data forwarding based on intelligent gateway according to claim 4, characterized in that: The status score of the i-th node in the initialization gateway is: ; Where: Score the status of node i; Energy consumption values ​​predicted for machine learning models; is the maximum value of the node's historical energy consumption; The current remaining power of the node; is the initial power of the node; is the current power supply voltage of the node; V is the optimal operating voltage of the node; obtained from the gateway production manual; is the ambient temperature of the node; is the optimal working environment temperature of the node; Provided by the gateway production manual or manufacturer; It represents the ratio of the predicted energy consumption of a node to its maximum energy consumption; Indicates the ratio of the remaining power to the initial power; Path scoring ; n is the number of nodes on the path.

6. A dynamic data forwarding system based on intelligent gateway, characterized in that: Data collection module, collects gateway information; gateway information includes: gateway CPU usage, memory usage, average network traffic, device running time, ambient temperature, power supply voltage and device type; collects energy consumption value; The pre-processing module performs one-hot encoding for the device type and marks it as the device type code; presets the power consumption assessment degree for gateways of different device types; Model training module, based on gateway information and energy consumption values, trains a machine learning model that can predict the gateway's future energy consumption per unit time in real time; The path decision module generates the optimal energy consumption gateway path based on the gateway information and the energy consumption value predicted by the machine learning model; the generation process includes: initializing the gateway; building the gateways in the network as nodes, updating the node-initialized gateway information to the cloud, and building the network topology based on the nodes; initializing the node status score; real-time monitoring and updating the gateway status score; collecting the path score as the basis for gateway path selection; selecting the path with the largest path score for transmission as the optimal energy consumption gateway path.

7. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; The processor executes the dynamic data forwarding method based on an intelligent gateway as described in any one of claims 1 to 5 by calling the computer program stored in the memory.

8. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute a dynamic data forwarding method based on an intelligent gateway as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • A home gateway system and data forwarding method

    CN110351385B

  • A data forwarding method for intelligent edge gateways

    CN113194038B

  • Machine learning-based server energy consumption prediction method and system

    CN108595301A

  • Path determination method and device and storage medium

    CN114040272A

  • Environment fusion routing method for enhancing network survivability

    CN116489737A

Cited By

  • Factory operation state-based energy consumption simulation and prediction method, system, equipment and medium

    CN120633404A

  • Intelligent flow dividing control method for air conditioner flow divider based on flow data dynamic adjustment

    CN120845873A