Smart home network load balancing method based on flow prediction and genetic algorithm

By combining traffic prediction and genetic algorithms in smart home networks, the challenges of network traffic delay and load balancing in smart home networks are solved, and efficient load distribution optimization and real-time path selection are achieved.

CN119945963APending Publication Date: 2025-05-06EDGE INTELLIGENCE TECH YANGZHOU CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510073254.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Due to the access of a large number of sensors and smart devices in smart home networks, network traffic complexity and latency problems are caused. The existing load balancing methods have high computing complexity and real-time challenges.

Method used

Using load balancing methods based on traffic prediction and genetic algorithms, a traffic prediction model based on GRU and self-focus is designed, and a genetic algorithm is used to optimize path selection to achieve load balancing.

Benefits of technology

It effectively solves the problem of network traffic delay in smart home networks, improves the optimization efficiency of load distribution, reduces the computational complexity, and realizes real-time path optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945963A_ABST
    Figure CN119945963A_ABST
Patent Text Reader

Abstract

A smart home network load balancing method based on flow prediction and a genetic algorithm improves a traditional load balancing method, and combines a deep learning technology and the genetic algorithm to optimize load distribution. The delay problem of the network flow is effectively solved; according to the method, a strategy can be provided in time by adopting a load balancing method based on flow prediction, and relatively high calculation overhead cannot be generated. The prediction model is combined with a gating cycle unit (GRU) and a self-attention mechanism, so that accurate flow prediction is realized, and the effectiveness of a path optimization process is improved; according to the method, deep learning is combined with a heuristic algorithm and a k-shortest path algorithm, and a new method for obtaining an initial genome is provided, so that the genetic algorithm has a better initial gene. According to the method, iteration is better, more possible and faster at the next moment to obtain the globally optimal solution, and meanwhile, the calculation complexity is reduced. And efficient and effective load balancing of the smart home network is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention provides a smart home network load balancing method, which is mainly based on traffic prediction and genetic algorithm and is a smart home-oriented network load balancing method. Background Art

[0002] With the development of IoT technology, the smart home network architecture has gradually changed from traditional centralized to distributed. Traditional smart home systems usually rely on a central control center, such as a smart gateway, to manage and coordinate the communication of all devices. However, the development of IoT enables devices to communicate and interact directly, forming a distributed network architecture. This architecture improves the reliability and flexibility of the system. Even if the central control center fails, the devices can still maintain a certain degree of interconnection and interoperability, ensuring the normal operation of the smart home system.

[0003] At the same time, as a large number of sensors and smart devices are connected to the smart home network, it brings diversified transmission requirements to the home network. Therefore, network anomaly monitoring and traffic optimization scheduling have become two key elements in the smart home network control system. The joint control of the two ensures the stable and smooth operation of the smart home system.

[0004] Software-Defined Networking (SDN), as an important component of the next-generation network architecture, provides a suitable solution. However, the lack of advanced network traffic optimization technology seriously hinders transmission performance.

[0005] Traffic prediction methods are mainly divided into two parts: linear and nonlinear. The linear method is mainly a traditional method. The autoregressive prediction method uses the relationship between the series at different time stages to establish a regression equation for prediction. The moving average method is derived based on the information of the time series and the average value is calculated in sequence. Deep learning breaks the original prediction method based on statistical models. Many prediction algorithm ideas based on time series are used to predict network traffic. Network traffic is random and dynamic in a short period of time, and cannot support effective prediction by the prediction model. But in the long run, network traffic has certain periodicity and regularity.

[0006] Genetic algorithm is a classic heuristic algorithm with good parallel search performance. It is suitable for solving multi-objective optimization problems. It comes from researchers' thinking about evolution. The convergence process of the algorithm is similar to the evolution process in biology. Consider the set of all candidate paths as a population, where each path is a chromosome. Each routing node is a gene.

[0007] Traditional load balancing strategies usually involve calculating network equivalent paths and finding better scheduling methods, such as equal cost multi-path (ECMP). Reinforcement learning and deep reinforcement learning have been used to solve the load balancing problem. Existing load balancing methods still face some challenges, namely the timeliness of high computational complexity. For real-time path optimization, the strategy obtained after traffic collection and analysis will have a certain time lag. For real-time path optimization, the strategy obtained after collection and analysis will have a time lag. Summary of the invention

[0008] The purpose of the present invention is to provide a novel load balancing method for smart home networks, which can effectively solve problems such as network traffic delay by introducing traffic prediction and genetic algorithms to efficiently optimize load distribution.

[0009] A smart home network load balancing method based on traffic prediction and genetic algorithm comprises the following steps:

[0010] Step 1: Smart home network model construction. Combined with the spatial pattern of the indoor home environment, a regional network model is constructed and sensor nodes are deployed.

[0011] Step 2: Design a traffic prediction mechanism to predict the traffic of the entire nodes and links of the smart home network to help network routing;

[0012] Step 3: Use genetic algorithms within the network topology to implement path selection and achieve load balancing in the network.

[0013] The system model described in the present invention is composed of a network model and a flow prediction mechanism.

[0014] The network model construction ideas involved in the present invention are as follows:

[0015] Table 1 Definition of symbols

[0016]

[0017] Table 1 gives the definitions of symbols in the network model. The system model only considers the data plane. The network connection graph G = (V, L) describes the smart home network, where V represents the node set and L represents the link set. i, j represent the specified nodes belonging to V. The nodes of the smart home network are mainly combined with the spatial pattern of the indoor home environment to form a regional network and deploy sensor nodes. All nodes are stationary nodes without considering mobility. The sensors will obtain traffic information and additional attributes in the smart home network, such as power, CPU and memory, for subsequent processing.

[0018] Typically, SDN can obtain link status and traffic information, allowing the controller to issue the best transmission path for each flow.

[0019] First, the optimal transmission path for load balancing needs to be determined. This path is determined by considering all traffic Tra i,j and links i, j.

[0020] Considering the optimization of smart home network as much as possible, the algorithm used needs to have certain performance requirements, so the formulation of delay and loss is defined. The load of the selected path is one of the most important indicators in load balancing. Usually, unbalanced load is caused by some links being overloaded while others are not fully utilized. In the present invention, the formulation of the load balancing problem is defined as Formula 1, and the calculation of link weight is shown in Formula 2, where Impact Hop Impact is a factor that affects the number of hops. traffic Defined as Represents the relationship between actual flow and predicted flow.

[0021] Min D s,d (1)

[0022]

[0023] Formula 3 is the flow conservation constraint. That is, the sum of the flows between each node should be equal to the sum of all flows from source to destination. Mathematically, the sum of flows of all links in the network should be equal to the sum of flows of all source-destination pairs of all nodes i, j in the node set V and the sum of flows between all source-destination pairs s, d in the path set P. Flow conservation constraints are crucial in network optimization problems because they ensure that network flows are not lost or created. Through constraints, the model can accurately represent the flows and prevent any inconsistency or imbalance in the flow distribution.

[0024]

[0025] Among them, s,d Representing the flows between all source nodes and destination nodes, through the flow conservation constraint, this model can accurately represent the flows and prevent any inconsistency or imbalance in the flow distribution.

[0026] Formula 4 is the definition of delay. The delay D of each link is i,j The sum of the delays belonging to P is equal to the end-to-end delay D s,d For each link i→j, its transmission flow Tra i,j Do not exceed its capacity limit C i,j , where Tra i,j =R i,j ×D i,j In the formula, R i,j represents the transmission rate of link i→j, Di,j represents the transmission delay of link i→j.

[0027]

[0028] At the same time, in order to ensure the accuracy of flow prediction, the problem statement is designed based on the periodicity of the flow itself. The loss function compares the predicted output of the model with the actual output, determines the performance of the model, and then looks for optimization directions. If the deviation between the two is large, the loss value will be large; if the deviation is small or the values ​​are almost the same, the loss value will be very low. Therefore, it is necessary to use multiple loss functions to measure the training effect of the model on the data set.

[0029] PD is defined as the absolute value of the difference between the predicted traffic and the actual traffic in the network. The requirement of the present invention is to minimize PD, thereby verifying the accuracy of network traffic prediction. This can provide support for network management decisions. MSE loss is the most commonly used loss function in machine learning and deep learning regression tasks. MAE loss is another common loss function in deep learning, which is obtained by maximizing the likelihood under certain assumptions.

[0030] MinPD∈{Loss MAE , Loss MSE}(5)

[0031] The flow prediction mechanism of the present invention is designed as follows:

[0032] This invention relates to a traffic prediction method based on deep learning and proposes a traffic prediction model based on GRU and self-attention. The model consists of four layers. The specific layers are described as follows:

[0033] Data preprocessing layer. In order to ensure the quality and synchronization of smart home network data, network traffic is collected in real time through pre-arranged sensors for data preprocessing. Since the dimensions and sources of model inputs in the smart home network may be different, the distribution range of feature values ​​may vary greatly. Preprocessing normalizes various features and eliminates the correlation between different features to obtain ideal results. The essence of neural network training is to learn the distribution of data. Normalization is to enhance the generalization ability of the model, and there is no need to spend a lot of iterations to learn different versions each time.

[0034] The input data is preprocessed before training. The first thing to do is to normalize the data. The expression is:

[0035]

[0036] Where q represents the query, k represents the key, v represents the information to be extracted, W, W q , W k , Wv Represents model parameters, input represents the input data of the model, a i represents the data after the input processing of the i-th node, q i represents the query value of the i-th node, k i represents the key value of the i-th node, v i Represents the information to be extracted from the i-th node.

[0037] Self-attention layer. The self-attention layer model improves the accuracy of traffic prediction by solving the correlation problem between different parts of the input. Previously, traffic prediction based on deep learning was usually based on long-term prior data. However, smart home network data may not conform to the original rules. The self-attention layer improves the efficiency of the traffic prediction model by paying attention to the information at different positions in the sequence at the same time, enabling it to better handle the nonlinearity and complexity of traffic data.

[0038]

[0039] where a i,j Indicates the intermediate calculation results, Indicates a i,j The result after the softmax function, b i represents the output of the attention model, a i,j Represents the data between nodes i and j that have not been processed by the softmax function. Represents the data of nodes i and j processed by the softmax function.

[0040] GRU layer, used to implement network traffic training in smart home systems. The GRU model's use of gating signals enables it to selectively retain and update information in hidden states, thereby more effectively capturing long-term dependencies in sequence data. The gating mechanism enables the model to alleviate the gradient vanishing problem common in standard RNNs. GRU has two gates, the reset gate and the update gate. The reset gate is used to combine the current time series data with historical data. The update gate defines the storage method for historical time series data. These two gating mechanisms determine the data output. At the same time, long-term time series information is saved to ensure that some previous data will not be deleted, and these data, including historical data, may be used in subsequent predictions.

[0041] z t =σ(W z ·[h t-1 , x t ]) (8)

[0042] Among them, x t is the input of the t-th time step, which is first multiplied by the weight matrix W z To perform a linear transformation.t-1 is the output of the previous time step t-1, which has also been linearly transformed. The update gate adds these two pieces of information and inputs them into the sigmoid activation function to obtain the resulting output from 0 to 1.

[0043] The reset gate determines which historical data in the time series needs to be forgotten, and its expression is as follows.

[0044] r t =σ(W r ·[h t-1 ,x t ]) (9)

[0045]

[0046]

[0047] Among them, h t is the hidden state, W r Represents the weight matrix.

[0048] In Formula 9, the reset gate r t Use the previous hidden state h t-1 and the current input x t The reset gate determines which parts of the previous hidden state should be ignored and is obtained through the sigmoid activation function.

[0049] In Equation 10, the output of the reset gate is combined with the current input x by using the weight matrix W. t Combined to calculate candidate hidden states The result is passed through a hyperbolic tangent activation function, which squeezes the value into the range between -1 and 1. This candidate hidden state represents new information that can be added to the previous hidden state.

[0050] In formula 11, the update gate z t is calculated and determines the previous hidden state h t-1 How much should be retained. The update gate is obtained through the sigmoid activation function, and the new hidden state h t is computed as a combination of the previous hidden state and the candidate hidden state, weighted by an update gate.

[0051] Fully connected layer. This layer is built to mimic the structure of the human brain, where each node is connected to all nodes in the previous layer. It is used to synthesize features extracted from the front. This connection method allows the model to capture complex relationships in the data and is used for tasks such as traffic prediction. In the fully connected layer, the weight matrix is ​​multiplied by the input vector and then the offset is added to calculate the output of each node. These outputs are then processed by the softmax function to generate a probability distribution and finally output the prediction result.

[0052] The path selection and load balancing method based on optimized genetic algorithm designed by the present invention is specifically implemented as follows:

[0053] First, the smart home network topology is generated and the flow value of each link is determined. Then, each sensor node in the topology is encoded to generate chromosomes to represent the set of candidate paths. The path fitness value is calculated by taking the network flow value of the link as the weight to evaluate its performance in load balancing. A genetic algorithm is used to perform crossover and mutation operations on the chromosome population, and the fitness value is updated in each generation to gradually optimize the path selection. The above process is iterated repeatedly until the preset convergence conditions are met or the optimization goal is achieved, achieving efficient load balancing and path optimization.

[0054] The first key step of the genetic algorithm is encoding, which is to convert the parameters in the problem space and represent the path through genes. The present invention uses node numbers as the encoding method, and each number corresponds to a network node to form a chromosome. As shown in the figure, each number is a node number, representing a chromosome.

[0055] Fitness represents the adaptability of an individual to the environment and is a key indicator for evaluating the quality of an individual based on the objective function. Each chromosome corresponds to a fitness value. For route selection, it is necessary to choose an appropriate fitness function.

[0056] When calculating the optimal path, each link needs to be weighted in subsequent iterations. The algorithm selects multiple paths for transmission and designs a penalty factor mechanism to mitigate the impact of link crossing on load balancing performance. The penalty factor acts on the link weight through addition and multiplication to dynamically adjust the path selection. Among them, the multiplication factor is used to describe the loss of the link after multiple calculations, which may lead to path selection deviation due to the cumulative effect. To this end, the penalty factor needs to be multiplied by the link weight after path selection, and the penalty factor value must be limited to the interval [0,1].

[0057] Formula (12) uses the normal distribution function to define the penalty factor, where the parameter λ represents the ratio Tra i,j / Tra max , the value range is [0,1], Tra maxRepresents the maximum value of network traffic. In network G, assuming that the initial selection probability of a link is pi, when the link is selected n times, its selection probability is pin. The specific calculation is shown in formula (13).

[0058]

[0059] p in =p i ·y n (13)

[0060]

[0061] Path selection is usually closely related to distance and weight. The present invention further considers applying a penalty factor on each link of the selected path. When calculating k shortest paths, the link weight is multiplied by the penalty factor to determine the overall penalty factor of the path, which is defined as shown in formula (14). In formula (14), yi represents the penalty factor of the path, which is determined by the penalty factor p of each link. i and the global penalty factor y n The product of .

[0062] Global penalty factor y n Controls the penalty level of the entire path. n When it is small, the penalty factor p in the path i The impact on path selection is small; when y n When it is larger, the penalty factor p in the path i The impact on path selection will be significantly enhanced. By adjusting the global penalty factor y n , the algorithm's sensitivity to the penalty factor in the path selection process can be flexibly adjusted, thereby optimizing the path selection strategy.

[0063] The individuals in the population are represented by the genes of the chromosome. The chromosome needs to be encoded according to the problem to be solved. First, a fitness function is designed to distinguish suitable paths from redundant paths by individual characteristics. The fitness function is defined as shown in formula (15), and its value is related to the link weight W i,j Then, the individual selection probability Sel is determined by the fitness value, and the calculation formula is shown in formula (16).

[0064]

[0065] The present invention adopts the roulette selection method. The higher the fitness value, the greater the probability of the individual being selected. The path weight is inversely proportional to the flow size. By calculating the fitness value of the chromosome, the probability of it having a specified fitness value is determined. The probability of individual selection is determined by the ratio of individual fitness to total fitness.

[0066] After gene selection, mutation and crossover operations are performed. The crossover operation means that two chromosomes are separated at the same point and combined to form new chromosomes. The mutation operation means introducing changes during the crossover process to generate genes with new characteristics. The rates of crossover and mutation directly affect the final performance in the evolutionary process.

[0067] The present invention combines the k shortest path algorithms to implement the two-point crossover operation. For example, assuming that the chromosome {N1, N2, N3, N4, N5, N6} represents the shortest path, randomly select a gene block therein and replace the path with a new gene block to obtain {N1, N2, N7, N4, N5, N6}. An adaptive genetic probability formula is adopted to dynamically adjust the probabilities of crossover and mutation based on the fitness function, thereby optimizing the path selection strategy and enhancing the adaptability and robustness of the algorithm.

[0068] The crossover operation means cutting at the same position of two chromosomes in the population and recombining to generate new chromosomes. These new chromosomes combine the path information that can be referred to, thereby optimizing the path selection.

[0069] The mutation operation means generating new chromosomes by inheriting part of the genes from one chromosome. From the perspective of the implementation mechanism, the mutation process is somewhat similar to the crossover process to a certain extent. The newly generated individuals after the crossover operation have a certain probability of gene mutation. Usually, the mutation probability is set low to avoid causing great interference to the overall optimization process. In view of the similarity of the implementation methods of the two, the mutation operator is implemented in a method similar to the crossover operator.

[0070] Formula (17) defines the method for calculating the probabilities of crossover and mutation, where f max represents the maximum fitness of the population, f avg represents the average fitness of the population, f represents the larger fitness value of the individual to be crossed, and f' represents the fitness value of the mutant individual. The constants k1, k2, k3, k4 satisfy k1 < k2 and k3 < k4. This formula effectively improves the optimization ability and convergence performance of the algorithm by dynamically adjusting the crossover and mutation probabilities.

[0071]

[0072] Compared with the prior art, the present invention has the following beneficial effects:

[0073] (1) The present invention improves the traditional load balancing method. The traditional load balancing method still faces the challenges of real-time performance and high computational complexity. For real-time path optimization, there will be a certain time delay in the strategy obtained after traffic collection and analysis. This novel method combines deep learning technology and genetic algorithms to optimize load distribution. It effectively solves the problem of network traffic delay.

[0074] (2) The load balancing method based on traffic prediction adopted by the present invention can provide strategies in a timely manner without incurring high computational overhead. The prediction model combines the gated recurrent unit (GRU) and the self-attention mechanism to achieve accurate traffic prediction and improve the effectiveness of the path optimization process.

[0075] (3) The present invention combines deep learning with heuristic algorithms and k-shortest path algorithms, and proposes a new method for obtaining an initial genome, so that the genetic algorithm has better initial genes. The method of the present invention is better, more likely and faster to iterate to the global optimal solution at the next moment, while reducing the computational complexity. Efficient and effective load balancing of the smart home network is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 The figure is an overview of the load balancing method in an embodiment of the present invention.

[0077] Figure 2 4 is a flow chart of a prediction algorithm in an embodiment of the present invention.

[0078] Figure 3 This is a flowchart based on genetic algorithm implementation in an embodiment of the present invention. DETAILED DESCRIPTION

[0079] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.

[0080] Reference Figures 1 to 3 , a load balancing method for smart home network based on traffic prediction and genetic algorithm, this method takes smart home as the background, builds smart home network model, designs traffic prediction mechanism, optimizes network routing selection, and can effectively reduce the delay of data transmission in smart home. This method also improves the new method of obtaining initial genes in traditional genetic algorithm, so that the genetic algorithm can obtain better initial genes, reduce the number of iterations of smart home network, ensure the load balancing between nodes and links, and effectively extend the network life.

[0081] The smart home network load balancing method based on traffic prediction and genetic algorithm provided in this embodiment includes the following steps:

[0082] 1) Build a network model and deploy sensor nodes on demand in the indoor home environment to form a network topology; sensors are mainly deployed on smart sensors in home appliances and routers in smart homes. These sensors have the ability to detect traffic and process information. The deployment requirements are determined according to the deployment requirements of smart appliances, which has high flexibility.

[0083] 2) Use the traffic prediction model based on GRU and self-attention to process the different attribute features in the smart home network into a processable form and make predictions. The attribute features are mainly network traffic, CPU performance, node power, etc. Figure 2 As shown, it includes data preprocessing layer, self-attention layer, GRU layer and complete connection layer. The execution methods of each layer are as follows:

[0084] ① Data preprocessing layer: preprocess the attribute data of nodes in the smart home network, normalize the power, CPU, memory and other features, and normalize the data to obtain the information to be extracted:

[0085] a=W(input)

[0086] q i =W q a i

[0087] k i =W k a i

[0088] v i =W v a i

[0089] ② Self-attention layer: Since the correlation between various attributes and features in the smart home network is not high, the self-attention layer will solve the correlation problem between different parts to improve the performance of traffic prediction. By paying attention to the information at different positions in the sequence, the following formula is used to obtain better prediction results:

[0090]

[0091]

[0092]

[0093] ③GRU layer: Use two gates of GRU, namely reset gate and update gate, to alleviate the common gradient vanishing problem in RNN.

[0094] The update gate is used to define the storage method of the historical time series. The calculation output method is as follows:

[0095] z t =σ(W z ·[h t-1 , x t ])

[0096] The reset gate determines the unnecessary historical data in the time series and decides which previous hidden state to ignore. The output is calculated as follows:

[0097] r t =σ(W r ·[h t-1 , x t ])

[0098] Next, the weight matrix is ​​used to obtain new information that can be added to the previous hidden state, namely the candidate hidden state. The output is calculated as follows:

[0099]

[0100] After the previous update gate is calculated, the sequence of previous hidden states that need to be retained can be determined. The calculation output method is as follows:

[0101]

[0102] ④Fully connected layer: The fully connected layer performs matrix operations on the weight matrix and the input vector, generates a probability distribution, and outputs the prediction result.

[0103] 3) Using optimized genetic algorithm routing scheme, such as Figure 3 As shown, the selection steps are as follows:

[0104] ① Set a node number for each sensor node and use the node number as the encoding method. Each network node represented by a number represents a chromosome;

[0105] ② Next, the fitness function is used to distinguish suitable paths from redundant paths by individual characteristics. It is inversely proportional to the link weight and is calculated as follows:

[0106]

[0107] ③ Use the roulette method to select the smart home network path. The higher the fitness, the greater the probability of the individual being selected. The calculation method of the individual selection probability is as follows:

[0108]

[0109] ④After the gene selection is completed, a crossover operation is performed to cut the same position of the two chromosomes in the population and recombine them to generate new chromosomes. These new chromosomes combine the reference path information to optimize the path selection. The dynamic adjustment crossover probability calculation method is as follows:

[0110]

[0111] You can also perform mutation operations to inherit some genes from a chromosome to generate a new chromosome. The dynamic adjustment mutation probability calculation method is as follows:

[0112]

[0113] ⑤ When calculating the optimal path, a global penalty factor mechanism is used to mitigate the impact of link crossing on load balancing. When calculating k shortest paths, the link weight is multiplied by the penalty factor to determine the overall penalty factor of the path. The path penalty factor calculation method is as follows:

[0114]

[0115] The global penalty factor controls the penalty level of the entire path. By adjusting the global penalty factor, the algorithm can flexibly adjust its sensitivity to the penalty factor during the path selection process and optimize the path selection strategy.

[0116] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.

Claims

1. A smart home network load balancing method based on traffic prediction and genetic algorithm, characterized by: The method comprises the following steps: Step 1: Smart home network model construction. Combined with the spatial pattern of the indoor home environment, a regional network model is constructed and sensor nodes are deployed. Step 2: Design a traffic prediction mechanism to predict the traffic of the entire nodes and links of the smart home network to help network routing; Step 3: Use genetic algorithms within the network topology to implement path selection and achieve load balancing in the network.

2. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 1, characterized in that: In step 1, the smart home network is described by a network connection graph G = (V, L), where V represents a node set, L represents a link set; i, j represent specified nodes belonging to V; First, by considering all the traffic Tra i,j and links to determine the best transmission path for load balancing; Considering the optimization of smart home network as much as possible, the load balancing problem is defined as Formula 1, and the link weight is calculated as shown in Formula 2, where Impact Hop Impact is a factor that affects the number of hops. traffic Defined as Represents the relationship between actual flow and predicted flow; My D s,d (1) Formula 3 is the flow conservation constraint; that is, the sum of the flows between each node should be equal to the sum of all flows from the source to the destination; where Tra s,d Representing the flows between all source nodes and destination nodes, through the flow conservation constraint, this model accurately represents the flows and prevents any inconsistency or imbalance in the flow distribution; 3. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 2, characterized in that: Define the delay, as shown in Formula 4, the delay D of each link i,j The sum of the delays belonging to P is equal to the end-to-end delay D s,d ; For each link i→j, its transmission flow Tra i,j Do not exceed its capacity limit C i,j , where Tra i,j =R i,j ×D i,j Where R i,j represents the transmission rate of link i→j, D i,j represents the transmission delay of link i→j; D s,d =∑ i,j D i,j ,i,j∈P (4)。 4. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 3, characterized in that: Define PD as the absolute value of the difference between the predicted traffic and the actual traffic in the network, use MSE loss and MAE loss to minimize PD as the goal, MinPD∈{Loss MAE ,Loss MSE } (5)。 5. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 1, characterized in that: In the traffic prediction mechanism of step 2, a traffic prediction model based on GRU and self-attention is designed, including a data preprocessing layer, a self-attention layer, a GRU layer, and a full connection layer.

6. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 5, characterized in that: In the data preprocessing layer, after the network traffic data is collected in real time by the pre-arranged sensors, data preprocessing is performed to normalize various features and eliminate the correlation between different features. The expression is: Among them, q represents the query, k represents the key, v represents the information to be extracted, W, W q , W k , W v Represents model parameters, input represents the input data of the model, a i represents the data after the input processing of the i-th node, q i represents the query value of the i-th node, k i represents the key value of the i-th node, v i Represents the information to be extracted from the i-th node.

7. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 5, characterized in that: The self-attention layer improves the efficiency of the traffic prediction model by simultaneously paying attention to the information at different positions in the sequence. where a i,j Indicates the intermediate calculation results, Indicates a i,j The result after the softmax function, b i represents the output of the attention model.

8. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 5, characterized in that: The GRU layer is used to implement network traffic training in smart home systems. GRU has two gates, the reset gate and the update gate. The reset gate is used to combine the current time series data with the historical data. The update gate defines the storage method of the historical time series data. These two gating mechanisms determine the data output and save the information of the long-term time series. z t =σ(W z ·[h t-1 ,x t ]) (8) Among them, x t is the input of the t-th time step, which is first multiplied by the weight matrix W z To perform linear transformation; h t-1 is the output of the previous time step t-1, which has also been linearly transformed; the update gate adds these two pieces of information and inputs them into the sigmoid activation function to obtain a result output from 0 to 1; The reset gate determines which historical data in the time series needs to be forgotten, and its expression is as follows; r t =σ(W r ·[h t-1 ,x t ]) (9) Among them, h t is the hidden state, W r represents the weight matrix; In Formula 9, the reset gate r t Use the previous hidden state h t-1 and the current input x t is calculated as input; the reset gate determines which parts of the previous hidden state should be ignored and is obtained through the sigmoid activation function; In Equation 10, the output of the reset gate is combined with the current input x by using the weight matrix W. t Combined to calculate candidate hidden states The result is passed through a hyperbolic tangent activation function, which pushes the value into the range between -1 and 1. This candidate hidden state represents new information that can be added to the previous hidden state. In formula 11, the update gate z t is calculated and determines the previous hidden state h t-1 How much should be retained; the update gate is obtained through the sigmoid activation function, and the new hidden state h t is computed as a combination of the previous hidden state and the candidate hidden state, weighted by an update gate.

9. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 5, characterized in that: The fully connected layer is constructed by imitating the structure of the human brain, in which each node is connected to all nodes in the previous layer to integrate the features extracted from the front side; In a fully connected layer, the weight matrix is ​​multiplied by the input vector and then the bias is added to calculate the output of each node; these outputs are then processed by the softmax function to generate a probability distribution and finally output the prediction result.

10. The method for intelligent home network load balancing based on traffic prediction and genetic algorithm according to claim 1, characterized in that: In step 3, each sensor node in the smart home network topology is encoded to generate chromosomes to represent the candidate path set; the path fitness value is calculated by taking the network traffic value of the link as the weight to evaluate its performance in load balancing; A genetic algorithm is used to perform crossover and mutation operations on the chromosome population, and the fitness value is updated in each generation to gradually optimize the path selection; the above process is iterated repeatedly until the preset convergence conditions are met or the optimization goal is achieved, thereby achieving efficient load balancing and path optimization.

Citation Information

Cited By

  • Wireless network intelligent optimization deployment method and system

    CN120786407A

  • A method and system for intelligent optimization deployment of wireless networks

    CN120786407B

  • Network congestion relieving method for network resource adjustment

    CN121151323A