Communication path selection method and device for equipment node transmission data
By combining geographical location information and traffic carrying capacity in the data communication network, and using the LSTM model to predict the data transmission index, dynamically calculate the path priority value to select the optimal path, the problem of inaccurate path selection in the existing technology is solved, and more efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510030056.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-08
AI Technical Summary
When selecting the optimal path in a data communication network, the prior art lacks comprehensive consideration of the dynamic characteristics of the network, resulting in insufficient path selection and inability to ensure the efficiency and reliability of data transmission.
By determining the possible path set based on the device source node and the target node, the virtual force value is calculated using geographical location information and traffic carrying capacity, combining the LSTM model to predict the data transmission index, and dynamically calculate the path priority value to select the optimal path.
It realizes more accurately selecting communication paths in a dynamic network environment, improves the efficiency and reliability of data transmission, and solves the data loss problems caused by insufficient dynamic path selection and single-path failure.
Smart Images

Figure CN119892705A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication paths for device node data transmission, and in particular to a method and device for selecting a communication path for device node data transmission. Background Art
[0002] In data communication networks, selecting the optimal path for data transmission is the core issue of improving network performance. However, traditional path selection methods usually only rely on the geographical distance between nodes, the carrying capacity of nodes, or static evaluation of channel quality to determine the path. This path selection method based on a single indicator lacks comprehensive consideration of the dynamic characteristics of the network, resulting in the selected path being unable to guarantee the efficiency and reliability of data transmission during actual transmission due to problems such as channel quality fluctuations and node overload. In addition, the prior art has limited use of historical transmission data, which only stays at the simple recording and statistical level, and fails to fully explore the potential laws in historical data to guide future path selection. Therefore, the prior art has obvious deficiencies in the dynamics and scientificity of path selection, especially in complex network environments, which are prone to problems such as inaccurate prediction of path transmission performance, data loss, or low transmission efficiency.
[0003] In the prior art, communication path selection methods usually rely on static routing protocols or simple dynamic adjustment mechanisms. For example, the traditional shortest path algorithm (such as Dijkstra algorithm) performs path selection based on a preset network topology, but this method has limited effect in dynamic networks. Dynamic routing protocols, such as OSPF and AODV, adapt to network changes by periodically updating routing information, but often have update delays and high overhead problems. In addition, although some path selection methods based on greedy algorithms have improved efficiency to a certain extent, they still have difficulty in handling frequent topology changes in complex network environments.
[0004] Through in-depth analysis of existing technologies, it can be found that the core difficulty of data transmission path selection lies in how to comprehensively consider the performance of historical paths and the dynamic changes of real-time channel quality, and perform scientific path optimization on this basis. However, existing methods lack a path selection mechanism that can dynamically evaluate path performance while taking into account historical priority and real-time channel quality. As a result, path selection is not accurate enough and cannot meet the needs of modern communication networks for efficient and reliable data transmission.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The object of the present invention is to provide a method and apparatus for selecting a communication path for transmitting data by a device node, so as to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for selecting a communication path for transmitting data by a device node, the specific steps comprising:
[0009] Step 1: Based on the device source node and the target node, determine the possible path set for transmitting data, and obtain the geographical location information and traffic carrying capacity of each node in the set. The geographical location information is the longitude and latitude coordinate data of the node, and use the Haversine formula to calculate the geographical distance data between the nodes;
[0010] Step 2: Based on the traffic carrying capacity of the nodes and the geographical distance data between the nodes, the virtual force value of each node is calculated, the priority value of each possible path is calculated according to the virtual force value of the node, and the possible paths are prioritized based on the priority value;
[0011] Step 3: Obtain the channel quality of the nodes in the historical path at the historical sampling time, as well as the transmission records after the historical sampling time, generate the data transmission index of the historical path based on the transmission records, build an LSTM model, and use the channel quality as input and the data transmission index as a label to train the LSTM model;
[0012] Step 4: Input the channel quality of the nodes in the possible path at the current moment into the LSTM model to obtain the data transmission index of each possible path, and calculate the path priority value of the possible path by combining the data transmission index and the priority value. Sort the possible paths based on the path priority value, output the path priority list, and select the possible path with the highest path priority value as the optimal path for data transmission.
[0013] Furthermore, the logic for obtaining the geographical location information and traffic carrying capacity of each node in the set is:
[0014] Determine all potential paths from the source node to the destination node based on the network topology:
[0015] Obtain the geographic location information and traffic carrying capacity of each node in the path. The geographic location information is directly measured by GPS equipment or extracted from an existing geographic database. The maximum amount of data that each node can forward or process per unit time is determined and calibrated as the traffic carrying capacity.
[0016] The logic of using the Haversine formula to calculate the geographic distance data between nodes is:
[0017] Calibrate the longitude and latitude of the first point as (φ 1 ,λ 1 ), the latitude and longitude of the second point are calibrated as (φ 2 ,λ 2 ); to calculate the geographical distance between two points, convert latitude and longitude from degrees to radians, the conversion formula is:
[0018]
[0019] φ' 1 and φ' 2 Indicates the longitude of the first and second points converted to radians;
[0020]
[0021] λ' 1 and λ' 2 Indicates the radians after the latitude conversion of the first and second points;
[0022] Then use the average radius r of the earth to calculate the distance d between the two points, where r = 6371km, and the Haversine formula is:
[0023]
[0024] Among them, Δφ represents the latitude difference, that is, Δφ=φ' 2 -φ' 1 , Δλ represents the longitude difference, that is, Δλ=λ' 2 -λ' 1 .
[0025] Furthermore, the logic for calculating the virtual force value of each node is:
[0026] Obtain the traffic carrying capacity of each node, which is the maximum data flow that the node can process per unit time. For each node i, determine the node weight based on the traffic carrying capacity, based on the formula:
[0027]
[0028] Among them, w i is the weight of node i, c i is the traffic carrying capacity of node i, is the sum of the traffic carrying capacity of all nodes, and n is the total number of nodes in the entire network;
[0029] The virtual force between nodes is defined as the product of the node weight and the inverse of the geographical distance, based on the formula:
[0030]
[0031] Among them, w i and w j are the weight data of node i and node j respectively, d ij represents the geographical distance data between node i and node j, F ij represents the virtual force value between node i and node j, ∈ is a constant, and ∈>0;
[0032] Create an array G to store the total virtual force value of each node; for each node i, traverse all other nodes j and sum the virtual force values F between node i and other nodes j ij Accumulation, because the virtual force between the node and itself is usually not taken into account, so the case of i=j is ignored, and the formula for calculating the total virtual force value G[i] is:
[0033]
[0034] Among them, G[i] represents the total virtual force value of node i, and n represents the total number of nodes in the entire network; a larger G[i] means that node i has a higher "attractiveness" or "importance" in the network;
[0035] The logic of calculating the priority value of each possible path based on the virtual force value of the node and prioritizing the possible paths based on the priority value is as follows: Initialize the path priority value P k is zero, where k represents the number of the path, and k = 1, 2, ..., m, where m represents the number of all possible paths;
[0036] Determine the number of nodes n on path k k , traverse each node i on the path, and accumulate the total virtual force value G[i] of each node to the path priority value P k , the formula for calculating the average priority value of the path is:
[0037]
[0038] Among them, n k represents the number of all nodes on path k, and Nodes(k) represents the set of all nodes on path k;
[0039] According to the calculated path priority value P k , for all m paths in the possible path set, according to the priority value P k Sort in descending order, based on the formula:
[0040] P 1 ≥P 2 ≥…≥P m
[0041] Among them, P1 Indicates the path with the highest priority value, P m Indicates the path with the lowest priority value.
[0042] Furthermore, the logic of obtaining the channel quality of the nodes in the historical path at the historical sampling time and the transmission records after the historical sampling time is as follows: at the historical sampling time t, the channel quality data of each node is extracted from the network monitoring system; the channel quality comes from the time window from the historical time tT to t-1, recorded as [tT, t-1];
[0043] The channel quality reflects the network performance status before the sampling time. For each node i on the path P, its channel quality data is collected in the historical time window [t-1, tT] to form a time series, which is expressed as follows:
[0044] Q i,h =[q (i,t-T) ,q (i,t-T+1) ,…,q (i,t-1) ]
[0045] Where T is the length of the historical time window of channel quality;
[0046] The channel quality data of path L is the set of channel quality history time series of all nodes on the path, expressed as:
[0047]
[0048] Among them, n L is the number of nodes in the path L;
[0049] For the same historical sampling time t, the transmission record comes from the time window of historical time t+Δt, recorded as [t, t+Δt], which is a time range with a total length of Δt, indicating the network performance status after the sampling time;
[0050] In the historical time window [t, t+Δt], the transmission records of each node are collected, and three main indicators are recorded: transmission success rate, transmission success rate SR i,h It represents the proportion of successful transmission of node i in the historical time window [t, t+Δt], based on the formula:
[0051]
[0052] Among them, ST i,h is the number of successful transmissions of node i in the historical time window, TT i,h is the total number of transmission attempts of node i in the historical time window;
[0053] Average delay data, average delay data ADi,h It reflects the average time required for each data transmission of node i in the historical time window [t, t+Δt], based on the formula:
[0054]
[0055] Where N is the number of successful transmissions of node i within the time window, De i,h,o The delay of node i in the oth transmission;
[0056] Transmission jitter data, transmission jitter data Ji i,h It is an important indicator to measure the volatility of delay, indicating the standard deviation of delay, and is based on the formula:
[0057]
[0058] Based on the above three indicators, the data transmission performance index TI of the historical path of node i is defined as i,h , the formula based on is:
[0059]
[0060] Among them, w 1 ,w 2 and w 3 represent the weights of historical transmission success rate, average delay and jitter data respectively, and w 1 +w 2 +w 3 =1,w 1 >w 2 ,w 3 ;
[0061] The historical transmission performance index TI for path L L,h , which is the average value of the transmission performance index of all nodes in path L, based on the formula:
[0062]
[0063] Among them, n L represents the total number of nodes in path L, TI i,h It represents the historical transmission performance index of node i in the path, which is used to measure the comprehensive performance index of path L in the historical time window [t, t+Δt].
[0064] Furthermore, the logic of constructing the LSTM model, taking the channel quality as input and the data transmission index as a label to train the LSTM model is as follows: building a model based on a deep neural network, using the LSTM network architecture to process time series features, setting one to two layers of LSTM units, and setting each layer to include 50 to 100 LSTM units; using ReLU as an activation function for the hidden layer and a linear activation function for the output layer; taking the channel quality at the historical sampling moment as an input feature, and generating the data transmission index of the historical path based on the transmission record as a label to train the LSTM model;
[0065] The time series data is divided into 80% training set and 20% validation set. The entire training set is divided into multiple small batches using the Batch training method. In each training iteration, the input data is passed into the LSTM model to calculate its output prediction value. The MSE loss function is used to calculate the difference between the model's prediction value and the true value. The gradient of the loss function relative to the model parameters is calculated through the back-propagation algorithm to update the model parameters.
[0066] During the training process, the hyperparameters of the LSTM model are set, and the hyperparameters of the LSTM model include: the number of network layers, the number of iterations, the learning rate, the batch size, the number of trainings, the number of batches, and the number of neurons in the hidden layer; the number of network layers is set to a two-layer network structure, the number of iterations is set to 200, the learning rate is set to 0.001, the batch size is set to 64, the number of trainings is set to 500, the number of batches is set to 256, and the number of neurons in the hidden layer is 50 per layer; the model parameters are gradually adjusted to improve the performance, and the model performance is evaluated using RMSE until the model training is completed.
[0067] Furthermore, the logic of inputting the channel quality of the nodes in the possible path at the current moment into the LSTM model to obtain the data transmission index of each possible path is as follows: the current channel quality data of each node in the possible path is input into the pre-trained LSTM model, and the model outputs the predicted data transmission index of each possible path. Where L k represents the kth possible path;
[0068] Combining the data transmission index and priority value, the logic of calculating the path priority value of the possible path is: based on the data transmission index of each path obtained and the previously calculated path priority value P k , calculate the path preference value of each possible path, based on the formula:
[0069]
[0070] Among them, α and β are weighting coefficients, which are used to adjust the impact of real-time transmission performance and historical priority on path selection, and α+β=1; when real-time performance is more important, α>β, and when stability is more important, β>α;
[0071] The logic of sorting possible paths based on path priority values, outputting a path priority list, and taking the possible path with the highest path priority value as the optimal path for data transmission is as follows: sort all possible paths according to the calculated path priority value PV k Arrange in descending order, generate a path priority list, and define the set of all possible paths as {L 1 ,L 2 ,…,L m}, where each path L k is a possible path from the source node to the target node. There are m paths in total, and their corresponding path priority values are: {PV 1 ,PV 2 ,…,PV m};
[0072] All paths are sorted according to the priority value {PV 1 ,PV 2 ,…,PV m} Arrange in descending order to obtain a path priority list such that:
[0073] PV (1) ≥PV (2) ≥…≥PV (m)
[0074] Among them, PV (1) It is the path with the highest comprehensive priority value, PV (m) It is the path with the lowest comprehensive priority value;
[0075] The sorted path priority list is [L (1) ,L (2) ,…,L (m) ], where L (1) For PV (1) The path with the highest priority value, L (m) Is with PV (m) The path with the lowest priority value; select the path with the highest priority value L from the sorted path priority list (1) As the main data transmission path;
[0076] In order to improve the reliability and efficiency of data transmission, the first few paths in the path priority list are selected for parallel transmission. In addition to the main transmission path, the selected parallel paths will also contain redundant data. Even if a path fails, the data on the redundant path can compensate for the lost information.
[0077] The present invention also provides a communication path device for transmitting data by a device node, wherein the system is used to implement the above-mentioned communication path method for transmitting data by a device node, specifically comprising:
[0078] A node calculation module is used to determine a possible path set for transmitting data based on the device source node and the target node, and obtain the geographical location information and traffic carrying capacity of each node in the set. The geographical location information is the longitude and latitude coordinate data of the node, and the Haversine formula is used to calculate the geographical distance data between nodes;
[0079] A virtual force value module is used to calculate the virtual force value of each node based on the traffic carrying capacity of the node and the geographical distance data between the nodes, calculate the priority value of each possible path according to the virtual force value of the node, and prioritize the possible paths based on the priority value;
[0080] Model building: A model is used to obtain the channel quality of nodes in the historical path at the historical sampling time and the transmission records after the historical sampling time, generate the data transmission index of the historical path based on the transmission records, build an LSTM model, and use the channel quality as input and the data transmission index as a label to train the LSTM model;
[0081] The path selection module is used to input the channel quality of the nodes in the possible paths at the current moment into the LSTM model to obtain the data transmission index of each possible path, and calculate the path priority value of the possible path in combination with the data transmission index and the priority value, sort the possible paths based on the path priority value, output the path priority list, and select the possible path with the highest path priority value as the optimal path for data transmission.
[0082] Compared with the prior art, the present invention has the following beneficial effects:
[0083] The present invention uses the geographical location information of the node, i.e., the latitude and longitude coordinates and the traffic carrying capacity, and combines the Haversin formula to calculate the geographical distance, thereby providing accurate basic data for the construction of a path set, and solving the problem of unreasonable path construction caused by the mismatch between node distance and carrying capacity in the background technology.
[0084] The priority values of possible paths are calculated based on the virtual force values of the nodes, and the preliminary sorting of the paths is completed in combination with the geographical distribution and traffic carrying capacity of the paths, which solves the problem of lack of scientific basis for path priority calculation in background technology and lays the foundation for subsequent dynamic decision-making. Based on the transmission records and channel quality of historical paths, the LSTM model is used to model the path performance, which provides a reliable tool for the prediction of real-time path performance and solves the problem of lack of full utilization of historical data in background technology, making path performance prediction more accurate.
[0085] The present invention combines the real-time data transmission index predicted by the LSTM model with the historical priority value of the path, dynamically calculates the path priority value, ensures the scientific nature of the path selection, and can quickly screen out the best path by sorting the path priority values, thereby avoiding the problem of low efficiency in path selection in the background technology. The parallel transmission mechanism design enables the system to still rely on redundant paths for data recovery when a single path fails, thereby ensuring the efficiency and reliability of data transmission, and solving the problem of insufficient dynamics of path selection and data loss due to single path failure in the background technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 It is a schematic diagram of the overall method flow of the present invention;
[0087] Figure 2 It is a schematic diagram of the overall device module of the present invention. DETAILED DESCRIPTION
[0088] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0089] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0090] Example:
[0091] See also Figure 1 , the present invention provides a technical solution:
[0092] A method for selecting a communication path for transmitting data by a device node, the specific steps comprising:
[0093] Step 1: Based on the device source node and the target node, determine the possible path set for transmitting data, and obtain the geographical location information and traffic carrying capacity of each node in the set. The geographical location information is the longitude and latitude coordinate data of the node, and use the Haversine formula to calculate the geographical distance data between the nodes;
[0094] Determine all potential paths from the source node to the destination node based on the network topology:
[0095] Obtain the geographic location information and traffic carrying capacity of each node in the path. The geographic location information is directly measured by GPS equipment or extracted from an existing geographic database. The maximum amount of data that each node can forward or process per unit time is determined and calibrated as the traffic carrying capacity.
[0096] The possible path set contains all potential communication paths from the source node to the target node, and is a set of alternative paths for network transmission. The size / number of the possible path set reflects the connectivity of the network. The more paths there are, the higher the communication redundancy between the source node and the target node, and the stronger the fault tolerance and stability of the network. The more complex the topology, that is, the more nodes and edges there are, the larger the possible path set is; conversely, the simpler the topology, the smaller the possible path set is.
[0097] The geographical location information of the node is provided by GPS devices or databases, which is determined by external factors and does not depend on the network itself. It is usually determined by the hardware performance of the node, such as bandwidth and computing power. The stronger the hardware performance, the higher the traffic carrying capacity.
[0098] The logic of using the Haversine formula to calculate the geographic distance data between nodes is:
[0099] Calibrate the longitude and latitude of the first point as (φ 1 ,λ 1 ), the latitude and longitude of the second point are calibrated as (φ 2 ,λ 2 ); to calculate the geographical distance between two points, convert latitude and longitude from degrees to radians, the conversion formula is:
[0100]
[0101] φ' 1 and φ' 2 Indicates the longitude of the first and second points converted to radians;
[0102]
[0103] λ' 1 and λ' 2 Indicates the radians after the latitude conversion of the first and second points;
[0104] The purpose of converting angles to radians is to calculate the geographic distance between nodes, because the spherical geometry calculation formula, namely the Haversine formula, requires the input parameter to be in radians. The larger the converted radian value, the closer the geographic location is to the extreme areas of the earth's spherical surface, such as the North and South Poles or the International Date Line.
[0105] Then use the average radius r of the earth to calculate the distance d between the two points, where r = 6371km, and the Haversine formula is:
[0106]
[0107] Among them, Δφ represents the latitude difference, that is, Δφ=φ' 2 -φ' 1 , Δλ represents the longitude difference, that is, Δλ=λ' 2 -λ' 1 ;
[0108] Haversine formula is used to calculate the shortest path between two points on the surface of a sphere, i.e., the great circle distance, which takes into account the spherical geometry of the earth; d represents the geographic distance between two points (unit: kilometers), Δφ is the difference in latitude between the two points, reflecting the geographical location difference in the north-south direction, and Δλ is the difference in longitude between the two points, reflecting the geographical location difference in the east-west direction;
[0109] Reflects the spherical distance between two points in the latitude direction. The larger the value, the greater the latitude difference between the two points. 1 )·cos(φ 2 ) reflects the cosine relationship between the latitudes of two points and is used to correct the effect of the latitude difference on the spherical distance; Reflects the spherical distance between two points in the longitude direction. The larger the value, the greater the difference in longitude between the two points.
[0110] The larger the d is, the farther the distance between the two geographical points is. The smaller the d is, the closer the two points are, and they may even overlap.
[0111] Step 2: Based on the traffic carrying capacity of the nodes and the geographical distance data between the nodes, the virtual force value of each node is calculated, the priority value of each possible path is calculated according to the virtual force value of the node, and the possible paths are prioritized based on the priority value;
[0112] Obtain the traffic carrying capacity of each node, which is the maximum data flow that the node can process per unit time. For each node i, determine the node weight based on the traffic carrying capacity, based on the formula:
[0113]
[0114] Among them, w i is the weight of node i, c i is the traffic carrying capacity of node i, is the sum of the traffic carrying capacity of all nodes, and n is the total number of nodes in the entire network;
[0115] Traffic carrying capacity c of node i i , represents the maximum data flow that the node can process per unit time, w i The weight of node i reflects the importance of the node relative to other nodes in the entire network. The larger the weight, the higher the traffic carrying capacity of the node in the entire network. is the sum of the traffic carrying capacity of all nodes and is the normalized denominator, ensuring that the weight value w i Between 0 and 1;
[0116] When i =1, indicating that node i is the only node in the network and bears the load of the entire network; when w i =0, indicating that node i has no traffic carrying capacity at all; the weight value is between 0 and 1, and the larger the value, the stronger the traffic carrying capacity of the node; the weight value can be used to measure the importance of the node, and the node with a larger weight is more likely to be given priority in the path selection process;
[0117] w i It is c i Linear function: When the carrying capacity of node i is c i When it increases, the weight w i Increase; when c i When it is 0, the weight w i =0; w i and Inversely proportional, if the total carrying capacity Increase, and c i unchanged, the weight w of node i i will decrease;
[0118] The logic of calculating the virtual force value is as follows: the virtual force value between nodes is defined as the product of the node weight and the inverse of the geographical distance, which means that the nodes with shorter distance and greater flow capacity have greater "attraction" to the path. The formula is as follows:
[0119]
[0120] Among them, w i and w j are the weight data of node i and node j respectively, d ij Represents the geographical distance data between node i and node j, and the virtual force value F between nodes ijIt is used to measure the "attraction" of node i to node j. ∈ is a constant to prevent the denominator from being zero, and ∈>0;
[0121] ∈ is usually set to a value greater than the minimum geographic distance d ij A much smaller positive number: when d ij In kilometers, you can choose ∈ = 0.0001 or less; you can also set ∈ to 1 / 100 of the minimum value of all geographic distances to ensure that ∈ is very small and fits the actual distance range, that is, ∈ = min(d ij ) / 100;
[0122] The larger the virtual force value F ij , indicating that the connection between node i and node j is closer. The meaning of this formula is that the "virtual attraction" between two nodes is determined by the product of the node weights and is inversely proportional to the square of the geographical distance; the larger the weight, that is, the stronger the node capability, the greater the virtual force value F ij The larger the distance, the smaller the geographical distance, that is, the closer the nodes are to each other, and the virtual force value F ij The larger the value, the more important the connection between the two nodes.
[0123] F ij With w i and w j The higher the weight of the node, the greater the virtual force value; F ij With d ij Inversely proportional, when the geographical distance increases, the virtual force value decreases sharply; the role of ∈ avoids the denominator being zero, when the distance is very small, that is, d ij →0,∈ ensures the stability of the calculation;
[0124] Create an array G to store the total virtual force value of each node; for each node i, traverse all other nodes j and sum the virtual force values F between node i and other nodes j ij Accumulation, because the virtual force between the node and itself is usually not taken into account, so the case of i=j is ignored, and the formula for calculating the total virtual force value G[i] is:
[0125]
[0126] Among them, G[i] represents the total virtual force value of node i, and n represents the total number of nodes in the entire network; a larger G[i] means that node i has a higher "attractiveness" or "importance" in the network;
[0127] The formula represents the sum of all virtual force values of node i, reflecting the overall "attraction" of node i to other nodes; the larger the total virtual force value G[i], the higher the centrality or importance of node i in the network; G[i] is F ijThe accumulated value of node i is as follows: When the virtual force between node i and other nodes is larger, G[i] is larger; if the weight of node i is w i increases, or the geographical distance between node i and other nodes decreases, then G[i] increases;
[0128] The logic of calculating the priority value of each possible path based on the virtual force value of the node and prioritizing the possible paths based on the priority value is as follows: Initialize the path priority value P k is zero, where k represents the number of the path, and k = 1, 2, ..., m, and m represents the number of all possible paths;
[0129] Determine the number of nodes n on path k k , traverse each node i on the path, and accumulate the total virtual force value G[i] of each node to the path priority value P k , the formula for calculating the average priority value of the path is:
[0130]
[0131] Among them, n k represents the number of all nodes on path k, Nodes(k) represents the set of all nodes on path k, and the calculated P k The larger the value, the higher the priority of the path;
[0132] The path priority is the average value of the virtual force of all nodes on the path, which is used to measure the importance of the path. The higher the priority value, the higher the priority of the path. k is the average value of G[i]: the higher the total virtual force value G[i] of the nodes on the path, the higher the path priority P k The higher the number of nodes n on the path k The more, the priority value P k will be relatively reduced;
[0133] According to the calculated path priority value P k , for all m paths in the possible path set, according to the priority value P k Sort in descending order, based on the formula:
[0134] P 1 ≥P 2 ≥…≥P m
[0135] Among them, P 1 Indicates the path with the highest priority value, P m Indicates the path with the lowest priority value.
[0136] Step 3: Obtain the channel quality of the nodes in the historical path at the historical sampling time, as well as the transmission records after the historical sampling time, generate the data transmission index of the historical path based on the transmission records, build an LSTM model, and use the channel quality as input and the data transmission index as a label to train the LSTM model;
[0137] The logic of obtaining the channel quality of the nodes in the historical path at the historical sampling time and the transmission records after the historical sampling time is as follows: at the historical sampling time t, the channel quality data of each node is extracted from the network monitoring system; the channel quality comes from the time window from the historical time tT to t-1, recorded as [tT, t-1], which is a historical time window with a total length of T, indicating the network state before the historical sampling time t;
[0138] The channel quality reflects the network performance status before the sampling time. For each node i on the path P, its channel quality data is collected in the historical time window [t-1, tT] to form a time series, which is expressed as follows:
[0139] Q i,h =[q (i,t-T) ,q (i,t-T+1) ,…,q (i,t-1 )]
[0140] Where T is the length of the historical time window of channel quality;
[0141] Q i,h It reflects the change of the channel quality of node i over a period of time, indicating the stability and reliability of the node's data transmission during this period. The channel quality time series Q i,h It is a multi-time data set that shows the performance status of node i within the time window. By observing the channel quality time series, we can determine whether the performance of the node is stable, whether there is fluctuation, and whether it can maintain high-quality communication. i,h Yes (i,t) The set of channel quality q (i,t) The higher it is, the higher the mean value in the series is likely to be;
[0142] The larger the historical time window T is, the longer the sequence is, indicating data quality over a longer period of time, but may reduce the sensitivity to short-term trends; when the channel quality changes dramatically, that is, the variance is large, T is shortened, and when the channel quality changes steadily, that is, the variance is small, T is extended; during model training and verification, multiple different T values are tested, such as T = 5, 10, 20, 30, and the T with the best model performance is selected through the verification set;
[0143] The channel quality data of path L is the set of channel quality history time series of all nodes on the path, expressed as:
[0144]
[0145] Among them, n L is the number of nodes in the path L;
[0146] Q L,h It reflects the overall channel quality status of the path L and is the collection of the channel quality of all nodes on the path. The path channel quality time series represents the overall communication status of the path and summarizes the channel quality of each node in the path. By aggregating the channel quality of all nodes in the path, the stability and reliability of the path can be evaluated. L,h It's Q i,h The set of nodes in the path n L If the channel quality of nodes in the path fluctuates greatly, the overall channel quality of the path will also fluctuate greatly.
[0147] For the same historical sampling time t, the transmission record comes from the time window of historical time t+Δt, recorded as [t, t+Δt], which is a time range with a total length of Δt, indicating the network performance status after the sampling time;
[0148] In the historical time window [t, t+Δt], the transmission records of each node are collected, and three main indicators are recorded: transmission success rate, transmission success rate SR i,h It represents the proportion of successful transmission of node i in the historical time window [t, t+Δt], based on the formula:
[0149]
[0150] Among them, ST i,h is the number of successful transmissions of node i in the historical time window, TT i,h is the total number of transmission attempts of node i in the historical time window; when ST i,h When it increases, SR i,h Increase, when TT i,h Increase but ST i,h When unchanged, SR i,h Reduce
[0151] SR i,h It represents the transmission success rate of node i, and its value is in the range of [0,1]. The transmission success rate is the ratio of successful transmission times to the total number of transmission attempts. The higher the success rate, the better the communication quality of the node and the more reliable the transmission link. i,h =1 means that all transmission attempts of the node are successful and the communication quality is ideal; SR i,h =0 means the node did not transmit successfully;
[0152] Average delay data, average delay data AD i,h It reflects the average time required for each data transmission of node i in the historical time window [t, t+Δt], based on the formula:
[0153]
[0154] Where N is the number of successful transmissions of node i within the time window, De i,h,o The delay of node i in the oth transmission;
[0155] AD i,h It reflects the average transmission delay of node i. The average delay indicates the average time consumed by the node when transmitting. The smaller the value, the higher the transmission efficiency of the node. i,h Yes i,h,o If the single delay increases, the average delay increases. If the number of successful transmissions N increases, but the delay value remains stable, the average delay remains unchanged.
[0156] Transmission jitter data, transmission jitter data Ji i,h It is an important indicator to measure the volatility of delay, indicating the standard deviation of delay, and is based on the formula:
[0157]
[0158] Ji i,h Reflects the transmission delay volatility of node i. Transmission jitter is the standard deviation of the delay, indicating the degree of delay fluctuation. The smaller the jitter, the more stable the node delay. i,h casually i,h,o and AD i,h If the delay fluctuation is large, then Ji i,h The tendency to increase indicates that the network quality is unstable;
[0159] Based on the above three indicators, the data transmission performance index TI of the historical path of node i is defined as i,h , the formula based on is:
[0160]
[0161] Among them, w 1 ,w 2 and w 3 represent the weights of historical transmission success rate, average delay and jitter data respectively, and w 1 +w 2 +w 3 =1,w 1 >w 2 ,w 3 ;
[0162] TI i,h Comprehensively measure the data transmission performance of node i. The success rate, delay and jitter are comprehensively considered by a weighted method to evaluate the transmission performance of the node. The higher the performance index, the better the transmission performance of the node. i,h With SR i,h Increase and increase, TI i,h With AD i,h He Ji i,h Increase when decreasing;
[0163] The historical transmission performance index TI for path L L,h , which is the average value of the transmission performance index of all nodes in path L, based on the formula:
[0164]
[0165] Among them, n L represents the total number of nodes in path L, TI i,h Represents the historical transmission performance index of node i in the path, which is used to measure the comprehensive performance index of path L in the historical time window [t, t+Δt]. The higher the value, the better the comprehensive performance of the path, and the more reliable and efficient the transmission;
[0166] This formula calculates the overall transmission performance of path L by averaging the transmission performance index of all nodes on the path. The performance index TI of all nodes L,h The higher the TI, the better the overall performance of the path; if L,h If the value is higher, the path can be selected first for data transmission; L,h The larger the value, the higher the average transmission performance of all nodes on the path and the higher the overall communication capacity of the path. L,h When it is close to the maximum value, it means that the path has a very high transmission success rate, low average delay, and small jitter;
[0167] The logic of constructing the LSTM model, taking the channel quality as input and the data transmission index as a label to train the LSTM model is as follows: building a model based on a deep neural network, using the LSTM network architecture to process time series features, setting one to two layers of LSTM units, and setting each layer to include 50 to 100 LSTM units; using ReLU as an activation function for the hidden layer and a linear activation function for the output layer; taking the channel quality at the historical sampling moment as an input feature, and generating the data transmission index of the historical path based on the transmission record as a label to train the LSTM model;
[0168] For each path L, the input feature is the channel quality time series Q of the path nodes L,g, the channel quality reflects the communication performance of the path in the historical time window [t, t+Δt], and the target output is the transmission performance index TI of path L L,h , which is obtained by averaging the transmission performance index of each node in the path. The label reflects the overall performance of the path in the historical time window [t, t+Δt];
[0169] The time series data is divided into 80% training set and 20% validation set. The entire training set is divided into multiple small batches using the Batch training method. In each training iteration, the input data is passed into the LSTM model to calculate its output prediction value. The MSE loss function is used to calculate the difference between the model's prediction value and the true value. The gradient of the loss function relative to the model parameters is calculated through the back-propagation algorithm to update the model parameters.
[0170] During the training process, the hyperparameters of the LSTM model are set, and the hyperparameters of the LSTM model include: the number of network layers, the number of iterations, the learning rate, the batch size, the number of trainings, the number of batches, and the number of neurons in the hidden layer; wherein the number of network layers is set to a two-layer network structure, the number of iterations is set to 200, the learning rate is set to 0.001, the batch size is set to 64, the number of trainings is set to 500, the number of batches is set to 256, and the number of neurons in the hidden layer is 50 per layer; the model parameters are gradually adjusted to improve the performance, and the model performance is evaluated using RMSE until the model training is completed;
[0171] During the training process, the loss function value of the model, such as MSE, will gradually decrease as the training progresses and tend to be stable. If the change in the loss function is very small in the last few iterations of training, and is less than the set threshold, such as 10 -4 , the model can be considered to have converged; if the loss function of the model tends to be stable on both the training set and the validation set, and the loss of the validation set does not increase significantly, that is, there is no overfitting, then the model can be considered to have been trained;
[0172] Assume that based on the given logic, a two-layer LSTM model is constructed to predict the transmission performance index TI of path L L,h The hyperparameters of the model are set as follows: number of network layers, 2-layer LSTM network, 50 neurons per layer, 200 iterations, 0.001 learning rate, 64 batch size, 256 batches; using the historical channel quality time series Q L,h As an input feature, the data transmission index TI L,h As labels, train the model and evaluate its performance;
[0173] According to the calculation results, after 150 training rounds, the rate of decrease of the loss function value (MSE) of the training set and the validation set slowed down significantly, and stabilized after 200 iterations. The MSE of the training set dropped from 0.015 to 0.012, and the MSE of the validation set dropped from 0.017 to 0.014, with a change range of <0.01, which shows that the loss function of the model has basically converged. The RMSE of the validation set dropped from the initial 0.205 to 0.118, reaching a lower error level. If the expected RMSE target in the business scenario is less than 0.12, then the current model has met the task requirements.
[0174] Step 4: Input the channel quality of the nodes in the possible paths at the current moment into the LSTM model to obtain the data transmission index of each possible path, and calculate the path priority value of the possible path by combining the data transmission index and the priority value. Sort the possible paths based on the path priority value, output the path priority list, and select the possible path with the highest path priority value as the optimal path for data transmission;
[0175] The logic of inputting the channel quality of the nodes in the possible path at the current moment into the LSTM model to obtain the data transmission index of each possible path is as follows: the current channel quality data of each node in the possible path is input into the pre-trained LSTM model, and the model outputs the predicted data transmission index of each possible path. Where L k represents the kth possible path, based on the formula:
[0176]
[0177] in, Indicates the path L k The channel quality data of all nodes on the network may be channel bandwidth, delay, packet loss rate and other characteristics. f(·) is the mapping function of the LSTM model, which is used to process the channel quality data and output the transmission performance index of the path.
[0178] Indicates the path L k The data transmission performance at the current moment predicts the transmission reliability and efficiency of the path. The larger the value, the greater the path L k The better the channel quality, the more efficient and reliable the data transmission can be. The better the channel quality data, such as higher bandwidth, lower latency, and lower packet loss rate, the better the model predicts. The larger the value, the LSTM model f(·) will learn the nonlinear relationship between channel quality and transmission performance.
[0179] Combining the data transmission index and priority value, the logic of calculating the path priority value of the possible path is: based on the data transmission index of each path obtained and the previously calculated path priority value P k , calculate the path preference value of each possible path, based on the formula:
[0180]
[0181] Among them, α and β are weighted coefficients, which are used to adjust the impact of real-time transmission performance and historical priority on path selection, and α+β=1; PV k The larger the value, the better the path performs in the comprehensive evaluation, and the path can be selected for data transmission. is the path L k Real-time transmission performance indicators reflect the quality of the current channel. The larger the path PV k The larger the value is, the more important the real-time performance of the path is to the final priority. k is the path L k The historical priority of P may be determined by the virtual force value of the node in the path or other historical factors. k The larger the path PV k The larger the value is, the higher the historical priority of the path is. k The dynamic changes of can reflect the real-time fluctuation of channel quality and the long-term accumulation of path historical priority;
[0182] α determines the real-time performance PV k The influence weight of β determines the historical priority P k PV k When α>β, the system pays more attention to the real-time transmission performance of the path, and when β>α, the system pays more attention to the historical priority.
[0183] The logic of sorting possible paths based on path priority values, outputting a path priority list, and taking the possible path with the highest path priority value as the optimal path for data transmission is as follows: sort all possible paths according to the calculated path priority value PV k Arrange in descending order, generate a path priority list, and define the set of all possible paths as {L 1 ,L 2 ,…,L m}, where each path L k is a possible path from the source node to the target node. There are m paths in total, and their corresponding path priority values are: {PV 1 ,PV 2 ,…,PV m};
[0184] All paths are sorted according to the priority value {PV 1 ,PV 2 ,…,PV m} Arrange in descending order to obtain a path priority list such that:
[0185] PV (1) ≥PV (2) ≥…≥PV (m)
[0186] Among them, PV (1) It is the path with the highest comprehensive priority value, PV (m) It is the path with the lowest comprehensive priority value;
[0187] The sorted path priority list is [L (1) ,L (2) ,…,L (m) ], where L (1) For PV (1) The path with the highest priority value, L (m) Is with PV (m) The path with the lowest priority value; select the path with the highest priority value L from the sorted path priority list (1) As the main data transmission path;
[0188] In order to improve the reliability and efficiency of data transmission, the first few paths in the path priority list are selected for parallel transmission. In addition to the main transmission path, the selected parallel paths will also contain redundant data. Even if a path fails, the data on the redundant path can compensate for the lost information.
[0189] Select the first few paths from the priority list, including L (1) ,As a parallel transmission path, part of data is transmitted in the ,redundant path to improve the robustness of the system. ,Even if the primary path fails, the redundant path can ,compensate for data loss. The number of redundant paths can ,be dynamically adjusted according to network resources and reliability requirements.
[0190] See also Figure 2 The present invention also provides a communication path device for transmitting data by a device node, and the system is used to implement the above-mentioned communication path method for transmitting data by a device node, specifically comprising:
[0191] A node calculation module is used to determine a possible path set for transmitting data based on the device source node and the target node, and obtain the geographical location information and traffic carrying capacity of each node in the set. The geographical location information is the longitude and latitude coordinate data of the node, and the Haversine formula is used to calculate the geographical distance data between nodes;
[0192] A virtual force value module is used to calculate the virtual force value of each node based on the traffic carrying capacity of the node and the geographical distance data between the nodes, calculate the priority value of each possible path according to the virtual force value of the node, and prioritize the possible paths based on the priority value;
[0193] Model building: A model is used to obtain the channel quality of nodes in the historical path at the historical sampling time and the transmission records after the historical sampling time, generate the data transmission index of the historical path based on the transmission records, build an LSTM model, and use the channel quality as input and the data transmission index as a label to train the LSTM model;
[0194] The path selection module is used to input the channel quality of the nodes in the possible paths at the current moment into the LSTM model to obtain the data transmission index of each possible path, and calculate the path priority value of the possible path in combination with the data transmission index and the priority value, sort the possible paths based on the path priority value, output the path priority list, and select the possible path with the highest path priority value as the optimal path for data transmission.
[0195] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0196] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0197] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, and 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 scheme of this embodiment. The above description is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for selecting a communication path for transmitting data by a device node, characterized in that: The specific steps include: Step 1: Based on the device source node and the target node, determine the possible path set for transmitting data, and obtain the geographical location information and traffic carrying capacity of each node in the set. The geographical location information is the longitude and latitude coordinate data of the node, and use the Haversine formula to calculate the geographical distance data between the nodes; Step 2: Based on the traffic carrying capacity of the nodes and the geographical distance data between the nodes, the virtual force value of each node is calculated, the priority value of each possible path is calculated according to the virtual force value of the node, and the possible paths are prioritized based on the priority value; Step 3: Obtain the channel quality of the nodes in the historical path at the historical sampling time, as well as the transmission records after the historical sampling time, generate the data transmission index of the historical path based on the transmission records, build an LSTM model, and use the channel quality as input and the data transmission index as a label to train the LSTM model; Step 4: Input the channel quality of the nodes in the possible path at the current moment into the LSTM model to obtain the data transmission index of each possible path, and calculate the path priority value of the possible path by combining the data transmission index and the priority value. Sort the possible paths based on the path priority value, output the path priority list, and select the possible path with the highest path priority value as the optimal path for data transmission.
2. A method for selecting a communication path for transmitting data by a device node according to claim 1, characterized in that: The logic for obtaining the geographic location information and traffic carrying capacity of each node in the collection is: Determine all potential paths from the source node to the destination node based on the network topology: Obtain the geographic location information and traffic carrying capacity of each node in the path. The geographic location information is directly measured by GPS equipment or extracted from an existing geographic database. The maximum amount of data that each node can forward or process per unit time is determined and calibrated as the traffic carrying capacity. The logic of using the Haversine formula to calculate the geographic distance data between nodes is: The longitude and latitude of the first point are calibrated as (φ1, λ1), and the longitude and latitude of the second point are calibrated as (φ2, λ2); to calculate the geographical distance between the two points, the latitude and longitude are converted from degrees to radians, and the conversion formula is: φ'1 and φ'2 represent the longitudes of the first and second points converted to radians; λ'1 and λ'2 represent the radians after the latitude conversion of the first and second points; Then use the average radius r of the earth to calculate the distance d between the two points, where r = 6371km, and the Haversine formula is: Wherein, Δφ represents the latitude difference, that is, Δφ=φ'2-φ'1, and Δλ represents the longitude difference, that is, Δλ=λ'2-λ'1.
3. A method for selecting a communication path for transmitting data by a device node according to claim 2, characterized in that: The logic for calculating the virtual force value of each node is: Obtain the traffic carrying capacity of each node, which is the maximum data flow that the node can process per unit time. For each node i, determine the node weight based on the traffic carrying capacity, based on the formula: Among them, w i is the weight of node i, c i is the traffic carrying capacity of node i, is the sum of the traffic carrying capacity of all nodes, and n is the total number of nodes in the entire network; The virtual force between nodes is defined as the product of the node weight and the inverse of the geographical distance, based on the formula: Among them, w i and w j are the weight data of node i and node j respectively, d ij represents the geographical distance data between node i and node j, F ij represents the virtual force value between node i and node j, ∈ is a constant, and ∈>0; Create an array G to store the total virtual force value of each node; for each node i, traverse all other nodes j and sum the virtual force values F between node i and other nodes j ij Accumulation, because the virtual force between the node and itself is usually not taken into account, so the case of i=j is ignored, and the formula for calculating the total virtual force value G[i] is: Among them, G[i] represents the total virtual force value of node i, and n represents the total number of nodes in the entire network; a larger G[i] means that node i has a higher "attractiveness" or "importance" in the network; The logic of calculating the priority value of each possible path based on the virtual force value of the node and prioritizing the possible paths based on the priority value is as follows: initializing the path priority value Pk to zero, where k represents the number of the path, and k=1, 2, ..., m, where m represents the number of all possible paths; Determine the number of nodes nk on path k, traverse each node i on the path, accumulate the total virtual force value G[i of each node to the path priority value Pk, and calculate the average priority value of the path based on the formula: Among them, n k represents the number of all nodes on path k, and Nodes(k) represents the set of all nodes on path k; According to the calculated path priority value P k , for all m paths in the possible path set, according to the priority value P k Sort in descending order, based on the formula: P1≥P2≥…≥P m Among them, P1 represents the path with the highest priority value, P m Indicates the path with the lowest priority value.
4. The method for selecting a communication path for transmitting data by a device node according to claim 3, characterized in that: The logic of obtaining the channel quality of the nodes in the historical path at the historical sampling time and the transmission records after the historical sampling time is as follows: at the historical sampling time t, the channel quality data of each node is extracted from the network monitoring system; the channel quality comes from the time window from the historical time tT to t-1, recorded as [tT, t-1]; The channel quality reflects the network performance status before the sampling time. For each node i on the path P, its channel quality data is collected in the historical time window [t-1, tT] to form a time series, which is expressed as follows: Q i,h =[q (i,t-T) ,q (i,t-T+1) ,…,q (i,t-1) ] Where T is the length of the historical time window of channel quality; The channel quality data of path L is the set of channel quality history time series of all nodes on the path, expressed as: Q L,h =[Q 1,h ,Q 2,h ,…,Qn L,h ] Among them, n L is the number of nodes in the path L; For the same historical sampling time t, the transmission record comes from the time window of historical time t+Δt, recorded as [t, t+Δt], which is a time range with a total length of Δt, indicating the network performance status after the sampling time; In the historical time window [t, t+Δt], the transmission records of each node are collected, and three main indicators are recorded: transmission success rate, transmission success rate SR i,h It represents the proportion of successful transmission of node i in the historical time window [t, t+Δt], based on the formula: Among them, ST i,h is the number of successful transmissions of node i in the historical time window, TT i,h is the total number of transmission attempts of node i in the historical time window; Average delay data, average delay data AD i,h It reflects the average time required for each data transmission of node i in the historical time window [t, t+Δt], based on the formula: Where N is the number of successful transmissions of node i within the time window, De i,h,o The delay of node i in the oth transmission; Transmission jitter data, transmission jitter data Ji i,h It is an important indicator to measure the volatility of delay, indicating the standard deviation of delay, and is based on the formula: Based on the above three indicators, the data transmission performance index TI of the historical path of node i is defined as i,h , the formula based on is: Wherein, w1, w2 and w3 represent the weights of historical transmission success rate, average delay and jitter data respectively, and w1+w2+w3=1, w1>w2,w3; The historical transmission performance index TI for path L L,h , which is the average value of the transmission performance index of all nodes in path L, based on the formula: Among them, n L represents the total number of nodes in path L, TI i,h It represents the historical transmission performance index of node i in the path, which is used to measure the comprehensive performance index of path L in the historical time window [t, t+Δt].
5. A method for selecting a communication path for transmitting data by a device node according to claim 4, characterized in that: The logic of constructing the LSTM model, taking the channel quality as input and the data transmission index as a label to train the LSTM model is as follows: building a model based on a deep neural network, using the LSTM network architecture to process time series features, setting one to two layers of LSTM units, and setting each layer to include 50 to 100 LSTM units; using ReLU as an activation function for the hidden layer and a linear activation function for the output layer; taking the channel quality at the historical sampling moment as an input feature, and generating the data transmission index of the historical path based on the transmission record as a label to train the LSTM model; The time series data is divided into 80% training set and 20% validation set. The entire training set is divided into multiple small batches using the Batch training method. In each training iteration, the input data is passed into the LSTM model to calculate its output prediction value. The MSE loss function is used to calculate the difference between the model's prediction value and the true value. The gradient of the loss function relative to the model parameters is calculated through the back-propagation algorithm to update the model parameters. During the training process, the hyperparameters of the LSTM model are set, and the hyperparameters of the LSTM model include: the number of network layers, the number of iterations, the learning rate, the batch size, the number of trainings, the number of batches, and the number of neurons in the hidden layer; the number of network layers is set to a two-layer network structure, the number of iterations is set to 200, the learning rate is set to 0.001, the batch size is set to 64, the number of trainings is set to 500, the number of batches is set to 256, and the number of neurons in the hidden layer is 50 per layer; the model parameters are gradually adjusted to improve the performance, and the model performance is evaluated using RMSE until the model training is completed.
6. A method for selecting a communication path for transmitting data by a device node according to claim 5, characterized in that: The logic of inputting the channel quality of the nodes in the possible path at the current moment into the LSTM model to obtain the data transmission index of each possible path is as follows: the current channel quality data of each node in the possible path is input into the pre-trained LSTM model, and the model outputs the predicted data transmission index of each possible path. Where L k represents the kth possible path; Combining the data transmission index and priority value, the logic of calculating the path priority value of the possible path is: based on the data transmission index of each path obtained and the previously calculated path priority value P k , calculate the path preference value of each possible path, based on the formula: Among them, α and β are weighting coefficients, which are used to adjust the impact of real-time transmission performance and historical priority on path selection, and α+β=1; when real-time performance is more important, α>β, and when stability is more important, β>α; The logic of sorting possible paths based on path priority values, outputting a path priority list, and taking the possible path with the highest path priority value as the optimal path for data transmission is as follows: sort all possible paths according to the calculated path priority value PV k Arrange in descending order, generate a path priority list, and define the set of all possible paths as {L1, L2, …, L m }, where each path L k is a possible path from the source node to the target node. There are m paths in total, and their corresponding path priority values are: {PV1, PV2,…, PV m }; All paths are sorted according to the priority values {PV1, PV2, …, PV m } Arrange in descending order to obtain a path priority list such that: PV (1) ≥PV (2) ≥…≥PV (m) Among them, PV (1) It is the path with the highest comprehensive priority value, PV (m) It is the path with the lowest comprehensive priority value; The sorted path priority list is [L (1) ,L (2) ,…,L (m) ], where L (1) For PV (1) The corresponding path with the highest priority value, L (m) Is with PV (m) The path with the lowest priority value; select the path with the highest priority value L from the sorted path priority list (1) As the main data transmission path; In order to improve the reliability and efficiency of data transmission, the first few paths in the path priority list are selected for parallel transmission. In addition to the main transmission path, the selected parallel paths will also contain redundant data. Even if a path fails, the data on the redundant path can compensate for the lost information.
7. A communication path device for transmitting data by a device node, characterized in that: The device is used to execute a communication path selection method for transmitting data by a device node according to any one of claims 1 to 6, comprising: A node calculation module is used to determine a set of possible paths for transmitting data based on the device source node and the target node, and obtain the geographical location information and traffic carrying capacity of each node in the set. The geographical location information is the longitude and latitude coordinate data of the node, and the Haversine formula is used to calculate the geographical distance data between nodes; A virtual force value module is used to calculate the virtual force value of each node based on the traffic carrying capacity of the node and the geographical distance data between the nodes, calculate the priority value of each possible path according to the virtual force value of the node, and prioritize the possible paths based on the priority value; Model building: A model is used to obtain the channel quality of nodes in the historical path at the historical sampling time and the transmission records after the historical sampling time, generate the data transmission index of the historical path based on the transmission records, and build an LSTM model. The channel quality is used as input and the data transmission index is used as a label to train the LSTM model. The path selection module is used to input the channel quality of the nodes in the possible paths at the current moment into the LSTM model to obtain the data transmission index of each possible path, and calculate the path priority value of the possible path in combination with the data transmission index and the priority value, sort the possible paths based on the path priority value, output the path priority list, and select the possible path with the highest path priority value as the optimal path for data transmission.
Citation Information
Patent Citations
Optical network routing optimization method based on LSTM deep learning and related device thereof
CN112560204A
Initialized deployment method for heterogeneous wireless sensor network
CN115297487A
Multi-type unmanned aerial vehicle edge calculation service method based on deep reinforcement learning
CN118215077A
Wireless ad hoc network communication method for interphone
CN119012217A
Unmanned aerial vehicle positioning navigation and path planning optimization method based on machine learning
CN119105524A
Cited By
Wireless ad hoc network communication system based on high dynamic routing protocol
CN120499879A
Distributed quotation data collaborative pushing method and system
CN120528863A