Ad-hoc network dynamic topology routing optimization method and system based on Deepseek lightweight large model
By adopting a dynamic topology routing optimization method for ad hoc networks based on the Deepseek lightweight large model, the problems of slow convergence speed and high energy consumption of ad hoc networks in complex environments are solved, and the method achieves rapid adaptation to network changes and efficient and stable data transmission.
Patent Information
- Application Number
- CN202610126783.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-19
AI Technical Summary
Traditional ad hoc network dynamic topology routing optimization methods have problems in terms of convergence speed, adaptability, and energy consumption, making it difficult to transmit data efficiently and stably in complex and ever-changing environments.
A dynamic topology routing optimization method for ad hoc networks based on a lightweight large model of Deepseek is adopted. By collecting node information and standardizing it into feature vectors, the dynamic topology change features are extracted using the Transformer encoder layer. Combined with the requirements of ad hoc networks, a routing path selection strategy is generated, which prioritizes nodes with high link stability, sufficient remaining energy and low transmission latency as forwarding nodes.
It enables rapid adaptation to network changes in complex environments, reduces convergence time, lowers energy consumption, improves the accuracy of routing and network stability, and extends the lifespan of ad hoc networks.
Smart Images

Figure CN122069219A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ad hoc network communication technology, and in particular to a dynamic topology routing optimization method for ad hoc networks based on the Deepseek lightweight large model. Background Technology
[0002] Ad hoc networks (ANRs) are temporary communication networks that do not rely on fixed infrastructure and are formed by multiple dynamic nodes that self-organize and communicate autonomously. In an ANR, the network topology changes dynamically as nodes move, join, or leave, and traditional routing methods struggle to adapt to these changes in a timely manner. Dynamic topology routing optimization methods for ANRs aim to find the optimal routing path in this dynamic environment, ensuring efficient and stable data transmission. This is a key technology for improving the communication performance of ANRs.
[0003] Dynamic topology routing optimization methods for ad hoc networks hold immense importance. In the military field, battlefield communication equipment requires rapid networking and stable communication. Dynamic topology routing optimization enables troops to transmit information promptly in complex and ever-changing battlefield environments, ensuring efficient command and control. In emergency rescue scenarios, such as after disasters like earthquakes and fires, fixed communication facilities may be damaged. Ad hoc networks can quickly establish temporary communication networks, and routing optimization methods ensure uninterrupted communication between rescue personnel, improving rescue efficiency. In the Industrial Internet of Things (IIoT), many sensor nodes form ad hoc networks. Improved routing can reduce energy consumption, enhance the immediacy of data transmission, and ultimately improve the overall intelligence level of industrial production.
[0004] Common methods for dynamic topology routing optimization in ad hoc networks include distance-vector routing algorithms and link-state routing algorithms. In distance-vector routing algorithms, each node periodically exchanges routing messages with its neighbors, selecting the optimal path based on distance and hop count. This method is relatively simple to implement, but its convergence speed is slow. When the network topology changes, routing loops can occur, causing data packets to continuously circulate within the network, wasting network resources. Link-state routing algorithms, on the other hand, require each node to know the entire network topology and then calculate the shortest path tree to determine the route. This method converges quickly, but requires a large amount of bandwidth to exchange topology information, and the computational load for each node is high, making it unsuitable for large-scale ad hoc networks.
[0005] Therefore, there is an urgent need to invent a dynamic topology routing optimization method for ad hoc networks to solve the problems of traditional routing optimization methods in terms of convergence speed, adaptability, and energy consumption, and to promote the widespread application of ad hoc networks in more fields. Summary of the Invention
[0006] The purpose of this invention is to provide a dynamic topology routing optimization method for self-organizing networks that is highly adaptable, has a fast convergence speed, low network energy consumption, and high reliability.
[0007] The technical solution to achieve the purpose of this invention is: a method for dynamic topology routing optimization of ad hoc networks based on a lightweight large model of Deepseek, comprising the following steps:
[0008] Step 1: Collect real-time location, link connectivity, remaining energy, and data transmission delay information of each node in the network, and standardize the node information into a feature vector format that can be parsed by the Deepseek lightweight large model;
[0009] Step 2: Input the standardized node feature vectors into the Deepseek lightweight large model, extract the topological dynamic change features through the Transformer encoder layer of the model, and use the decoder to predict the topological structure change trend in the near future.
[0010] Step 3: Based on the topology change trend predicted by the model and combined with the requirements of the self-organizing network, generate a routing path selection strategy, and prioritize nodes with high link stability, sufficient remaining energy and low transmission latency as forwarding nodes.
[0011] Step 4: Test the generated routing strategy in the self-organizing network simulation platform to simulate dynamic scenarios of node movement and link interruption, verify the routing success rate and transmission efficiency, and adjust the feature weight allocation of the model based on the results.
[0012] Step 5: Deploy the adjusted strategy to the actual network, collect routing performance data in real time, use it as new samples to input into the model, iterate and update the model, and improve the accuracy of topology prediction and route optimization.
[0013] Furthermore, the real-time location, link connectivity, remaining energy, and data transmission delay information of each node in the network, collected in step 1, are standardized into a feature vector format that can be parsed by the Deepseek lightweight large model, as follows:
[0014] Step 1.1: For the real-time location information of each node in the ad hoc network, use the Global Positioning System (GPS) or indoor positioning technology to obtain the latitude and longitude or relative coordinates of each node, and filter the collected location data to remove noise interference.
[0015] For the link connectivity status information of each node in the ad hoc network, the connectivity between nodes is determined by periodically sending probe packets. If a response packet is received within a specified time, the link is considered to be connected and represented by a binary value of 1; otherwise, it is represented by 0.
[0016] The remaining energy information of each node in the ad hoc network is obtained through the node's battery management system. This system can monitor the battery's voltage and current parameters in real time, thereby calculating the remaining power.
[0017] The data transmission delay information of each node in the ad hoc network is obtained by sending test data packets and recording the time difference from sending to receiving.
[0018] Step 1.2: Standardize the topology-related information of each node collected;
[0019] For real-time location information, it is normalized to the interval [0, 1], as shown in the following formula:
[0020]
[0021] in The original position value. and These are the minimum and maximum values of the data at that location, respectively.
[0022] For link connectivity status information, since it is a binary value, no further processing is required.
[0023] The remaining energy information is also normalized.
[0024] For data transmission delay information, a logarithmic transformation is first performed to reduce the dynamic range of the data, and then normalization is performed.
[0025] Step 1.3: Arrange the standardized information in the order of location information, link connectivity status, remaining energy, and data transmission delay to form a fixed-length feature vector, which is then parsed by the Deepseek lightweight large model.
[0026] Furthermore, in step 2, the standardized node feature vectors are input into the Deepseek lightweight large model. The topological dynamic change features are extracted through the Transformer encoder layer of the model, and the decoder is used to predict the topological structure change trend in the near future. The details are as follows:
[0027] Step 2.1: To eliminate the influence of different features' dimensions and enable the model to learn more stably, the Z-score normalization method is used to normalize the original node feature vectors, i.e.:
[0028]
[0029] in These are the original eigenvalues. It is the mean of the features. It is the standard deviation of the feature; the standardized node feature vector has the characteristics of zero mean and unit variance;
[0030] Step 2.2: Input the standardized node feature vectors into the Deepseek lightweight large model. The Transformer encoder layer of this model consists of multiple encoder blocks. Each encoder block contains a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism allows the model to focus on different parts of the input sequence in parallel in different representation subspaces. Its core formula is:
[0031]
[0032] in,
[0033]
[0034]
[0035] Through this mechanism, the model is able to capture the topological dynamics between nodes;
[0036] Step 2.3: The features output by the encoder layer are fed into the decoder. Based on these features, combined with its own structure and parameters, the decoder infers the changes in the topology that will occur in the near future. The decoder includes a self-attention mechanism and an encoder-decoder attention mechanism to further process the features output by the encoder and obtain the prediction results.
[0037] Furthermore, based on the topology change trend predicted by the model described in step 3, and combined with the requirements of the ad hoc network, a routing path selection strategy is generated, which prioritizes nodes with high link stability, sufficient remaining energy, and low transmission latency as forwarding nodes, as detailed below:
[0038] Step 3.1: Collect node connection status and movement speed information and input it into the model for training and prediction to make a comprehensive evaluation of each node in the network. For link stability, it is measured by calculating the packet loss rate and bit error rate. The lower the packet loss rate and the more stable the bit error rate, the better the link stability. For the remaining energy of the nodes, accurate remaining energy information is obtained through the node power monitoring module. For transmission delay, it is measured by sending test data packets into the network and recording the time difference between sending and receiving the data packets.
[0039] Step 3.2: Construct a comprehensive evaluation function for forwarding node selection, the formula of which is:
[0040]
[0041] in Indicates link stability metrics. Indicates the remaining energy of the node. Indicates transmission delay. , , These are weighting coefficients, which are adjusted according to actual network requirements.
[0042] Step 3.3: Select the node with the larger comprehensive evaluation function value as the forwarding node to ensure that the routing path meets the requirements, and dynamically change the route selection based on the trend of topology changes to optimize network performance.
[0043] Furthermore, step 4 involves testing the generated routing strategy in an ad hoc network simulation platform to simulate dynamic scenarios of node movement and link interruption, verifying the routing success rate and transmission efficiency. Based on the results, the feature weight allocation of the model is adjusted, as follows:
[0044] Step 4.1: Select a suitable self-organizing network simulation platform, OPNET or NS-3, and add the generated routing policy code to the simulation platform;
[0045] Step 4.2: Make precise settings for the network topology, including the number of nodes, starting positions, and connection methods. When nodes move, use random path point mode or other activity mechanisms that can reflect the actual situation to determine the speed, direction, and movement area of each node, so that it moves in the simulation area according to the predetermined criteria. When simulating link interruption, randomly interrupt some links according to the probability distribution to simulate complex network environment changes.
[0046] Step 4.3: During the simulation, record the sending and receiving status of each data packet, and calculate the routing success rate using the following formula:
[0047]
[0048] At the same time, the data transmission time from the source node to the destination node is statistically analyzed, the transmission efficiency is calculated, and the impact of different attributes on routing performance is analyzed.
[0049] Step 4.4: When certain attributes cause low routing success rate or poor transmission efficiency, reduce their weight in the model; when an attribute is beneficial to improving performance, increase its weight in the model; through multiple adjustments and simulation tests, continuously improve the allocation of feature weights so that the routing strategy can perform better in dynamic situations.
[0050] Furthermore, step 5 involves deploying the adjusted strategy to the actual network, collecting routing performance data in real time, using this data as new samples to input into the model, iteratively updating the model, and improving the accuracy of topology prediction and route optimization, as detailed below:
[0051] Step 5.1: Select a suitable deployment method based on the network structure and characteristics, and deploy the verified strategies. If the network is distributed, use a distributed deployment method to distribute the strategies to each node for execution. If the network is centralized, deploy the strategies at the central node.
[0052] Step 5.2: Collect real-time routing performance data. Use network monitoring tools to periodically collect packet loss rate and latency data at important network nodes. The packet loss rate calculation formula is:
[0053]
[0054] Delay data is obtained by recording the time difference between sending and receiving data packets;
[0055] Step 5.3: First, the collected data undergoes preliminary cleaning and preprocessing to remove outliers and useless data; then, the processed new data is used as new samples and put into the model.
[0056] Step 5.4: Use machine learning or deep learning methods to continuously input new samples into the model and use backpropagation to adjust the model's weights and parameters to complete the iterative update of the model, thereby improving the accuracy of topology prediction and route optimization; set an appropriate learning rate and number of iterations during the update to prevent overfitting or underfitting.
[0057] A dynamic topology routing optimization system for ad hoc networks based on a lightweight Deepseek model is provided to implement the aforementioned dynamic topology routing optimization method for ad hoc networks based on a lightweight Deepseek model. The system includes a data acquisition and standardization layer, a model processing layer, and a routing decision generation layer.
[0058] The data acquisition and standardization layer is used to collect the real-time location, link connectivity, remaining energy and data transmission delay information of each node in the self-organizing network, and standardize the node information into a feature vector format that can be parsed by the Deepseek lightweight large model.
[0059] The model processing layer is used to extract topological dynamic change features from the standardized node feature vectors and use the decoder to predict the topological structure change trend in the near future.
[0060] The routing decision generation layer generates a routing path selection strategy based on the topology change trend predicted by the model and combined with the requirements of the ad hoc network. It prioritizes nodes with high link stability, sufficient remaining energy and low transmission latency as forwarding nodes.
[0061] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the described method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek.
[0062] A computer device includes a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the aforementioned self-organizing network dynamic topology routing optimization method based on the Deepseek lightweight large model.
[0063] A computer program product includes computer instructions for causing a computer to execute the described method for dynamic topology routing optimization of ad hoc networks based on a lightweight large model of Deepseek.
[0064] Compared with the prior art, the present invention has the following significant advantages: (1) It adopts the Deepseek lightweight large model to adjust according to the real-time network status. No matter how the network topology changes, it can find the optimal path in complex environments and is more adaptable to various situations; (2) It adopts the Deepseek lightweight large model to learn from previous historical data. When the network topology changes, it can quickly react to the new network topology, reduce the convergence time, and speed up the convergence speed; (3) It can achieve accurate route selection, shorten the distance of data packet transmission, reduce the number of hops, thereby reducing node energy consumption and extending the life of the entire self-organizing network. Attached Figure Description
[0065] Figure 1 This is a flowchart illustrating a method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek, according to the present invention.
[0066] Figure 2 This is a schematic diagram of the structure of a self-organizing network dynamic topology routing optimization system based on a lightweight large model of Deepseek according to the present invention. Detailed Implementation
[0067] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0068] This invention is applied to ad hoc network scenarios to optimize dynamic topology routing. Utilizing a lightweight, large-scale Deepseek model, in field activities, team members' communication devices exchange information via ad hoc networks. As members move constantly, the network topology dynamically changes; this technology optimizes routing to ensure stable communication. In large construction sites, where various construction equipment and personnel move frequently, the ad hoc network topology also dynamically changes; this technology optimizes routing to ensure smooth communication between devices. This invention has wide applications in field communication, industrial production, and military operations.
[0069] In the military field, battlefield situations change rapidly, requiring communication equipment to quickly establish networks and maintain stable communication. Traditional routing algorithms based on distance vectors and link states are either slow to converge, prone to routing loops and wasting resources, or require a large amount of bandwidth to exchange topology information, placing a heavy computational burden on nodes, making them unsuitable for large-scale networking. The method of this invention allows troops to transmit information in a timely manner in complex and ever-changing battlefield environments, ensuring the efficiency of combat command. In emergency rescue scenarios, such as after disasters like earthquakes and fires, when fixed communication facilities are destroyed, ad hoc networks can quickly establish temporary communication networks. This invention ensures uninterrupted communication between rescue personnel, improving rescue efficiency. In the Industrial Internet of Things (IIoT), a large number of sensor nodes form ad hoc networks. This invention reduces energy consumption and improves the real-time performance of data transmission by optimizing routing, enhancing the overall intelligence level of industrial production.
[0070] like Figure 1 As shown, this invention provides a method for dynamic topology routing optimization of ad hoc networks based on a lightweight large model of Deepseek, comprising the following steps:
[0071] Step 1: Collect real-time location, link connectivity, remaining energy, and data transmission delay information of each node in the network, and standardize the node information into a feature vector format that can be parsed by the Deepseek lightweight large model, as follows:
[0072] Step 1.1: For the real-time location information of each node in the ad hoc network, use the Global Positioning System (GPS) or indoor positioning technology, such as Bluetooth positioning or Wi-Fi positioning, to obtain the latitude and longitude or relative coordinates of each node, and filter the collected location data to remove noise interference.
[0073] For the link connectivity status information of each node in the ad hoc network, the connectivity between nodes is determined by periodically sending probe packets. If a response packet is received within a specified time, the link is considered to be connected and represented by a binary value of 1; otherwise, it is represented by 0.
[0074] The remaining energy information of each node in the ad hoc network is obtained through the node's battery management system. This system can monitor the battery's voltage and current parameters in real time, thereby calculating the remaining power.
[0075] The data transmission delay information of each node in the ad hoc network is obtained by sending test data packets and recording the time difference from sending to receiving.
[0076] Step 1.2: Since different types of information differ greatly in numerical range and units, direct use will affect the performance of the model. Therefore, the topology-related information of each node collected is standardized.
[0077] For real-time location information, it is normalized to the interval [0, 1], as shown in the following formula:
[0078]
[0079] in The original position value. and These are the minimum and maximum values of the data at that location, respectively.
[0080] For link connectivity status information, since it is a binary value, no further processing is required.
[0081] The remaining energy information is also normalized.
[0082] For data transmission delay information, a logarithmic transformation is first performed to reduce the dynamic range of the data, and then normalization is performed.
[0083] Step 1.3: Arrange the standardized information in the order of location information, link connectivity status, remaining energy, and data transmission delay to form a fixed-length feature vector, which can then be parsed by the Deepseek lightweight large model.
[0084] Step 2: Input the standardized node feature vectors into the Deepseek lightweight large model. Extract the dynamic topological change features through the Transformer encoder layer of the model, and use the decoder to predict the topological structure change trend in the near future, as follows:
[0085] Step 2.1: To eliminate the influence of different features' dimensions and enable the model to learn more stably, the Z-score normalization method is used to normalize the original node feature vectors, i.e.:
[0086]
[0087] in These are the original eigenvalues. It is the mean of the features. It is the standard deviation of the feature; the standardized node feature vector has the characteristics of zero mean and unit variance;
[0088] Step 2.2: Input the standardized node feature vectors into the Deepseek lightweight large model. The Transformer encoder layer of this model consists of multiple encoder blocks. Each encoder block contains a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism allows the model to focus on different parts of the input sequence in parallel in different representation subspaces. Its core formula is:
[0089]
[0090] in,
[0091]
[0092]
[0093] Through this mechanism, the model is able to capture the topological dynamics between nodes;
[0094] Step 2.3: The features output by the encoder layer are fed into the decoder. Based on these features, combined with its own structure and parameters, the decoder infers the changes in the topology that will occur in the near future. The decoder includes a self-attention mechanism and an encoder-decoder attention mechanism to further process the features output by the encoder and obtain the prediction results.
[0095] Step 3: Based on the topology change trend predicted by the model, and combined with the low latency and high reliability requirements of ad hoc networks, generate a routing path selection strategy, prioritizing nodes with high link stability, sufficient remaining energy, and low transmission latency as forwarding nodes, as detailed below:
[0096] Step 3.1: Construct a predictive model using past topology information, such as a machine learning predictive model built using time series analysis, to estimate future network topology changes. Collect node connection status and movement speed information and input it into the model for training and prediction to anticipate potential topology changes. For the low latency and high reliability requirements of ad hoc networks, make a comprehensive evaluation of each node in the network. For link stability, measure it by calculating the packet loss rate and bit error rate; the lower the packet loss rate and the more stable the bit error rate, the better the link stability. For the remaining energy of nodes, obtain accurate remaining energy information through the node power monitoring module. For transmission delay, measure it by sending test data packets into the network and recording the time difference between sending and receiving the data packets.
[0097] Step 3.2: Construct a comprehensive evaluation function for forwarding node selection, the formula of which is:
[0098]
[0099] in Indicates link stability metrics. Indicates the remaining energy of the node. Indicates transmission delay. , , These are weighting coefficients, which are adjusted according to actual network requirements.
[0100] Step 3.3: Select the node with the larger comprehensive evaluation function value as the forwarding node to ensure that the routing path meets the requirements of low latency and high reliability, and dynamically change the route selection based on the trend of topology changes to optimize network performance.
[0101] Step 4: Test the generated routing strategy in the ad hoc network simulation platform, simulating dynamic scenarios of node movement and link interruption, to verify the routing success rate and transmission efficiency. Adjust the feature weight allocation of the model based on the results, as follows:
[0102] Step 4.1: Select a suitable self-organizing network simulation platform, OPNET or NS-3, and add the generated routing policy code to the simulation platform;
[0103] Step 4.2: Make precise settings for the network topology, including the number of nodes, starting positions, and connection methods. When nodes move, use random path point mode or other activity mechanisms that can reflect the actual situation to determine the speed, direction, and movement area of each node, so that it moves in the simulation area according to the predetermined criteria. When simulating link interruption, randomly interrupt some links according to the probability distribution to simulate complex network environment changes.
[0104] Step 4.3: During the simulation, record the sending and receiving status of each data packet, and calculate the routing success rate using the following formula:
[0105]
[0106] At the same time, the data transmission time from the source node to the destination node is statistically analyzed, the transmission efficiency is calculated, and the impact of different attributes on routing performance is analyzed.
[0107] Step 4.4: When certain attributes cause low routing success rate or poor transmission efficiency, reduce their weight in the model; when an attribute is beneficial to improving performance, increase its weight in the model; through multiple adjustments and simulation tests, continuously improve the allocation of feature weights so that the routing strategy can perform better in dynamic situations.
[0108] Step 5: Deploy the adjusted strategy to the actual network, collect routing performance data in real time, such as packet loss rate and latency, and use this data as new samples to input into the model. Iterate and update the model to improve the accuracy of topology prediction and route optimization, as detailed below:
[0109] Step 5.1: Select a suitable deployment method based on the network structure and characteristics, and deploy the verified strategies. If the network is distributed, use a distributed deployment method to distribute the strategies to each node for execution. If the network is centralized, deploy the strategies at the central node to ensure the consistency and integrity of the strategies and prevent misconfiguration.
[0110] Step 5.2: Collect real-time routing performance data. Use network monitoring tools, such as Simple Network Management Protocol (SNMP), to periodically collect packet loss rate and latency data at key network nodes. The packet loss rate calculation formula is:
[0111]
[0112] Delay data is obtained by recording the time difference between sending and receiving data packets;
[0113] Step 5.3: First, the collected data undergoes preliminary cleaning and preprocessing to remove outliers and useless data; then, the processed new data is used as new samples and put into the model.
[0114] Step 5.4: Using machine learning or deep learning methods, continuously input new samples into the model and use backpropagation to adjust the model's weights and parameters to perform iterative updates, improving the accuracy of topology prediction and route optimization. Set appropriate learning rates and iteration counts during updates to prevent overfitting or underfitting. After multiple iterations, the model can perform topology prediction and route optimization more accurately, improving network performance and reliability.
[0115] like Figure 2 As shown, the present invention also provides a self-organizing network dynamic topology routing optimization system based on the Deepseek lightweight large model, which is used to implement the self-organizing network dynamic topology routing optimization method based on the Deepseek lightweight large model, including a data acquisition and standardization layer, a model processing layer, and a routing decision generation layer.
[0116] The data acquisition and standardization layer is used to collect the real-time location, link connectivity, remaining energy and data transmission delay information of each node in the self-organizing network, and standardize the node information into a feature vector format that can be parsed by the Deepseek lightweight large model.
[0117] The model processing layer is used to extract topological dynamic change features from the standardized node feature vectors and use the decoder to predict the topological structure change trend in the near future.
[0118] The routing decision generation layer generates a routing path selection strategy based on the topology change trend predicted by the model and combined with the low latency and high reliability requirements of the self-organizing network. It prioritizes nodes with high link stability, sufficient remaining energy and low transmission latency as forwarding nodes.
[0119] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps in the described method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek.
[0120] The present invention also provides a computer device, including: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the aforementioned self-organizing network dynamic topology routing optimization method based on the Deepseek lightweight large model.
[0121] The present invention also provides a computer program product, including computer instructions, which are used to cause a computer to execute the described method for dynamic topology routing optimization of self-organizing networks based on the Deepseek lightweight large model.
[0122] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for dynamic topology routing optimization in ad hoc networks based on a lightweight large model of Deepseek, characterized in that, Includes the following steps: Step 1: Collect real-time location, link connectivity, remaining energy, and data transmission delay information of each node in the network, and standardize the node information into a feature vector format that can be parsed by the Deepseek lightweight large model; Step 2: Input the standardized node feature vectors into the Deepseek lightweight large model, extract the topological dynamic change features through the Transformer encoder layer of the model, and use the decoder to predict the topological structure change trend in the near future. Step 3: Based on the topology change trend predicted by the model and combined with the requirements of the self-organizing network, generate a routing path selection strategy, and prioritize nodes with high link stability, sufficient remaining energy and low transmission latency as forwarding nodes. Step 4: Test the generated routing strategy in the self-organizing network simulation platform to simulate dynamic scenarios of node movement and link interruption, verify the routing success rate and transmission efficiency, and adjust the feature weight allocation of the model based on the results. Step 5: Deploy the adjusted strategy to the actual network, collect routing performance data in real time, use it as new samples to input into the model, iterate and update the model, and improve the accuracy of topology prediction and route optimization.
2. The method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek according to claim 1, characterized in that, Step 1 involves collecting real-time location, link connectivity, remaining energy, and data transmission delay information from each node in the network. This node information is then standardized into a feature vector format that the Deepseek lightweight large model can parse, as detailed below: Step 1.1: For the real-time location information of each node in the ad hoc network, use the Global Positioning System (GPS) or indoor positioning technology to obtain the latitude and longitude or relative coordinates of each node, and filter the collected location data to remove noise interference. For the link connectivity status information of each node in the ad hoc network, the connectivity between nodes is determined by periodically sending probe packets. If a response packet is received within a specified time, the link is considered to be connected and represented by a binary value of 1; otherwise, it is represented by 0. The remaining energy information of each node in the ad hoc network is obtained through the node's battery management system. This system can monitor the battery's voltage and current parameters in real time, thereby calculating the remaining power. The data transmission delay information of each node in the ad hoc network is obtained by sending test data packets and recording the time difference between sending and receiving them. Step 1.2: Standardize the topology-related information of each node collected; For real-time location information, it is normalized to the interval [0, 1], as shown in the following formula: in The original position value. and These are the minimum and maximum values of the data at that location, respectively. For link connectivity status information, since it is a binary value, no further processing is required. The remaining energy information is also normalized. For data transmission delay information, a logarithmic transformation is first performed to reduce the dynamic range of the data, and then normalization is performed. Step 1.3: Arrange the standardized information in the order of location information, link connectivity status, remaining energy, and data transmission delay to form a fixed-length feature vector, which is then parsed by the Deepseek lightweight large model.
3. The method for dynamic topology routing optimization of ad hoc networks based on a lightweight large model of Deepseek as described in claim 1, characterized in that, Step 2 involves inputting the standardized node feature vectors into the Deepseek lightweight large model, extracting topological dynamic change features through the model's Transformer encoder layer, and using the decoder to predict the topological structure change trend in the near future, as detailed below: Step 2.1: To eliminate the influence of different features' dimensions and enable the model to learn more stably, the Z-score normalization method is used to normalize the original node feature vectors, i.e.: in These are the original eigenvalues. It is the mean of the features. It is the standard deviation of the feature; the standardized node feature vector has the characteristics of zero mean and unit variance; Step 2.2: Input the standardized node feature vectors into the Deepseek lightweight large model. The Transformer encoder layer of this model consists of multiple encoder blocks. Each encoder block contains a multi-head self-attention mechanism and a feedforward neural network. The multi-head self-attention mechanism allows the model to focus on different parts of the input sequence in parallel in different representation subspaces. Its core formula is: in, Through this mechanism, the model is able to capture the topological dynamics between nodes; Step 2.3: The features output by the encoder layer are fed into the decoder. Based on these features, combined with its own structure and parameters, the decoder infers the changes in the topology that will occur in the near future. The decoder includes a self-attention mechanism and an encoder-decoder attention mechanism to further process the features output by the encoder and obtain the prediction results.
4. The method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek according to claim 1, characterized in that, Step 3, based on the topology change trend predicted by the model and combined with the requirements of the ad hoc network, generates a routing path selection strategy, prioritizing nodes with high link stability, sufficient remaining energy, and low transmission latency as forwarding nodes, as detailed below: Step 3.1: Collect node connection status and movement speed information and input them into the model for training and prediction to make a comprehensive evaluation of each node in the network; for link stability, it is measured by calculating the packet loss rate and bit error rate of the link. When the packet loss rate is smaller and the bit error rate is more stable, it indicates that the link stability is better; for the remaining energy of the node, accurate remaining energy information is obtained through the node power monitoring module. Transmission delay is measured by sending test data packets into the network and recording the time difference between sending and receiving the data packets. Step 3.2: Construct a comprehensive evaluation function for forwarding node selection, the formula of which is: in Indicates link stability metrics. Indicates the remaining energy of the node. Indicates transmission delay. , , These are weighting coefficients, which are adjusted according to actual network requirements. Step 3.3: Select the node with the larger comprehensive evaluation function value as the forwarding node to ensure that the routing path meets the requirements, and dynamically change the route selection based on the trend of topology changes to optimize network performance.
5. The method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek according to claim 1, characterized in that, Step 4 involves testing the generated routing strategy in an ad hoc network simulation platform to simulate dynamic scenarios of node movement and link interruption, verifying the routing success rate and transmission efficiency. Based on the results, the feature weight allocation of the model is adjusted as follows: Step 4.1: Select a suitable self-organizing network simulation platform, OPNET or NS-3, and add the generated routing policy code to the simulation platform; Step 4.2: Make precise settings for the network topology, including the number of nodes, starting positions, and connection methods. When nodes move, use random path point mode or other activity mechanisms that can reflect the actual situation to determine the speed, direction, and movement area of each node, so that it moves in the simulation area according to the predetermined criteria. When simulating link interruption, randomly interrupt some links according to the probability distribution to simulate complex network environment changes. Step 4.3: During the simulation, record the sending and receiving status of each data packet, and calculate the routing success rate using the following formula: At the same time, the data transmission time from the source node to the destination node is statistically analyzed, the transmission efficiency is calculated, and the impact of different attributes on routing performance is analyzed. Step 4.4: When certain attributes cause low routing success rate or poor transmission efficiency, reduce their weight in the model; when an attribute is beneficial to improving performance, increase its weight in the model; through multiple adjustments and simulation tests, continuously improve the allocation of feature weights so that the routing strategy can perform better in dynamic situations.
6. The method for dynamic topology routing optimization of self-organizing networks based on a lightweight large model of Deepseek according to claim 1, characterized in that, Step 5 involves deploying the adjusted strategy to the actual network, collecting routing performance data in real time, using this data as new samples to input into the model, iteratively updating the model, and improving the accuracy of topology prediction and route optimization. The details are as follows: Step 5.1: Select a suitable deployment method based on the network structure and characteristics, and deploy the verified strategies; if the network is distributed, use a distributed deployment method to distribute the strategies to each node for execution. If the network is centralized, it is deployed at the central node; Step 5.2: Collect real-time routing performance data. Use network monitoring tools to periodically collect packet loss rate and latency data at important network nodes. The packet loss rate calculation formula is: Delay data is obtained by recording the time difference between sending and receiving data packets; Step 5.3: First, the collected data undergoes preliminary cleaning and preprocessing to remove outliers and useless data; then, the processed new data is used as new samples and put into the model. Step 5.4: Use machine learning or deep learning methods to continuously input new samples into the model and use backpropagation to adjust the model's weights and parameters to complete the iterative update of the model, thereby improving the accuracy of topology prediction and route optimization; set an appropriate learning rate and number of iterations during the update to prevent overfitting or underfitting.
7. A dynamic topology routing optimization system for ad hoc networks based on a lightweight Deepseek large model, used to implement the dynamic topology routing optimization method for ad hoc networks based on a lightweight Deepseek large model as described in any one of claims 1 to 6, characterized in that, It includes a data acquisition and standardization layer, a model processing layer, and a route decision generation layer; The data acquisition and standardization layer is used to collect the real-time location, link connectivity, remaining energy and data transmission delay information of each node in the self-organizing network, and standardize the node information into a feature vector format that can be parsed by the Deepseek lightweight large model. The model processing layer is used to extract topological dynamic change features from the standardized node feature vectors and use the decoder to predict the topological structure change trend in the near future. The routing decision generation layer generates a routing path selection strategy based on the topology change trend predicted by the model and combined with the requirements of the ad hoc network. It prioritizes nodes with high link stability, sufficient remaining energy and low transmission latency as forwarding nodes.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the self-organizing network dynamic topology routing optimization method based on the Deepseek lightweight large model as described in any one of claims 1 to 6.
9. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the self-organizing network dynamic topology routing optimization method based on the Deepseek lightweight large model as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The method includes computer instructions for causing a computer to execute the self-organizing network dynamic topology routing optimization method based on the Deepseek lightweight large model as described in any one of claims 1 to 6.