Internet of Things joint routing link establishment method and system based on path attention collaboration
By adopting a path attention collaboration method based on the Transformer architecture, the problem of insufficient data transmission rate for high-resolution data in IoT networks is solved, achieving efficient path selection and resource management. It is highly adaptable and suitable for multi-hop network environments.
Patent Information
- Application Number
- CN202511377414.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-01-09
AI Technical Summary
Traditional IoT networks face problems such as stuttering and visual blurring due to insufficient data rates when transmitting high-resolution audio and video data. Furthermore, existing deep learning algorithms suffer from performance degradation in processing long sequences of information, making it difficult to establish high-quality communication paths.
We employ a path attention collaborative approach based on the Transformer architecture. By encoding and decoding perceptual data and historical action sequences through encoders and decoders, and combining deep reinforcement learning, we achieve global perception and sequence modeling, and optimize path selection and resource allocation hop by hop.
It improves the efficiency of IoT path selection and resource management, reduces computational complexity, enhances the model's adaptability to network topology, and enables the establishment of high-quality communication paths.
Smart Images

Figure CN121309441A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication network systems, and in particular to a path attention collaborative-based Internet of Things joint routing link establishment method. BACKGROUND
[0002] With the rapid development of wireless communication technology, intelligent devices have been significantly developed. The interconnection of wireless sensors, mobile devices and other intelligent devices in industrial, commercial and other applications has led to a significant increase in the demand for data transmission in the Internet of Things (IoT).
[0003] The perception layer of the Internet of Things is deployed with various sensors and terminal devices that continuously collect perception data from the environment, including audio, image, video and other types of data, which need to be transmitted to the data processing unit in the user device or the cloud server for feature extraction and management decision-making. The network layer builds a bridge for data transmission through the exchange mechanism, while the application layer customizes the link performance characteristics according to different application scenarios to provide customized services for users.
[0004] In a variety of complex multi-hop network environments, such as wireless sensor networks, Internet of Things (IoT) networks, industrial Internet and distributed computing networks, the communication path between nodes is often affected by various factors, such as node energy consumption, signal strength, network topology changes, etc., resulting in traditional Internet of Things networks facing the problem of insufficient data rate leading to audio lag and visual blur when facing high-quality link requirements such as high-resolution audio and video data transmission, which directly affects the monitoring quality and the effectiveness of downstream decision-making. Therefore, establishing high-quality links to transmit large amounts of data is a problem that needs to be solved.
[0005] With the rapid development of deep neural network (DNN) technology and device computing power, researchers are increasingly turning to deep learning algorithms, including deep reinforcement learning (DRL) and federated learning (FL), to solve network resource optimization problems. Some scholars have proposed a scalable multi-layer perceptron (MLP) based DRL for joint routing and spectrum access, which can be extended to larger networks in a decentralized manner. In order to establish high-quality links in changing network topologies, there are currently two types of deep learning methods, graph neural networks (GNN) and sequential neural networks, used for joint routing and resource allocation.
[0006] The first category is GNN, which can handle non-Euclidean space data and spatial perception information enhancement by describing the relationship and independence between nodes. The features extracted from the local neighborhood area by GNN can be used for routing and resource allocation in wireless networks. Some scholars proposed a GNN-based DRL model for generalizing routing methods in arbitrary network topologies, where the wireless network is modeled as a graph, and the relay stations are represented as nodes, and the interference links are represented as edges. GNN is implemented to pass, aggregate, and combine the perception information from the central node and the neighborhood nodes, and then the updated perception information is used for power allocation. Some scholars proposed a two-hop graph reinforcement learning model architecture that can further expand the perception range and learn the interference relationship in irregular network topologies to optimize resources. Graph convolutional network (GCN) is equipped with a differentiable pooling mechanism and integrated into DRL for feature extraction in graph-structured networks. GCN-driven DRL is implemented to combine network management and control. However, GNN needs to collect perception data from neighborhood nodes, which can significantly increase the communication load within the neighborhood.
[0007] The second category is sequential neural networks, and given its ability to capture sequence dependencies, many studies have adopted sequential neural networks to integrate historical perception data for adaptive path selection. Recurrent neural network (RNN) aggregates link-level features into path-level features, improving the quality of spectrum allocation decisions. Some scholars implement gated recurrent units (GRU) to process in-link sequential perception information. Some scholars introduce a deep recurrent reinforcement learning scheme based on GRU assistance to handle imperfect feedback channels in a distributed manner. Some scholars dynamically determine the subsequent hop destination according to real-time traffic conditions to achieve fault tolerance and energy saving through a multi-path routing strategy. However, these RNN-based algorithms tend to forget past information in long sequences as the length of the input data sequence increases, thereby weakening the performance of the obtained results.
[0008] Attention mechanism can automatically identify and focus on different key information at different positions in long sequences by precisely allocating multi-head attention. Google researchers initially proposed the classic Transformer architecture, which is based only on attention mechanism, to capture global dependencies between input and output sequences in natural language processing (NLP). With the ability to effectively model long-range dependencies and achieve parallel sequence processing using attention mechanism, the Transformer architecture has evolved into specific models for various fields, such as bidirectional encoder representations from transformers (BERT) and generative pre-training transformer (GPT) in NLP, visual transformer (ViT) in computer vision, and contrastive language-image pre-training (CLIP) in multi-modal task processing. In the field of communication networks, the Transformer architecture has also been widely researched and applied. Some scholars proposed a neural network based on Transformer for joint prediction of optimal uplink and downlink power, which can adapt to changes in users and access points without retraining. Some scholars implemented deep learning based on Transformer for predicting network traffic and resource allocation. To reduce the computational complexity in Transformer, a linear-based lightweight Transformer model was introduced, which replaces the attention mechanism with a time-aware MLP for wireless channel prediction. In addition, Transformer was applied to represent Q functions in DRL, providing more accurate value estimates for various state-action pairs in robot operation tasks. Some scholars implemented a causal Transformer network that updates the role assignment policy and action selection policy using policy gradient descent. Therefore, DRL based on Transformer architecture is a promising optimization model in the field of communication networks. SUMMARY
[0009] The application aims to provide an Internet of Things joint routing link establishment method based on path attention cooperation to improve the efficiency of Internet of Things path selection and resource management and establish high-quality communication paths in multi-hop networks.
[0010] The technical solution for achieving the application is an Internet of Things joint routing link establishment method based on path attention cooperation, comprising the following steps:
[0011] Step 1, the current node collects a perception data sequence and a historical action sequence;
[0012] Step 2, input the perception data sequence into the encoder of the Transformer model and the historical action sequence into the decoder of the Transformer model;
[0013] Step 3: The encoder encodes the perceived data sequence, and the decoder decodes the historical action sequence;
[0014] Step 4: Calculate the target Q value based on the encoding results of the perception data and the mask attention calculation results of the historical action sequence, and complete the current node selection and resource management decision.
[0015] Step 5: Transfer the perceived data sequence and historical action sequence to the selected node, and perform the next hop node selection and resource management;
[0016] Repeat steps 1 through 5 until a successful connection to the destination node is established.
[0017] Furthermore, the current node's collection of sensor data sequences and historical action sequences in step 1 is as follows:
[0018] Step 1.1: Starting from the source node, the current node collects observation information from other nodes within its sensing range and extracts key sensing data. The key sensing data includes the node's geographical location, received signal-to-interference-plus-noise ratio (SINR), and the node's remaining energy, transmission rate, and processing load.
[0019] Step 1.2: Starting from the source node, record the observation information of each historical node along the path;
[0020] Step 1.3: Starting from the source node, record the action selection data of each historical node on the path. The action selection data includes node selection and resource allocation selection.
[0021] Furthermore, the Transformer model described in steps 2 and 3 includes an encoder and a decoder. The encoder encodes the perceptual data sequence and extracts global dependencies; the decoder generates the current optimal action sequence based on the encoder's output.
[0022] Furthermore, in step 3, the encoder encodes the perceived data sequence, and the decoder decodes the historical action sequence, as detailed below:
[0023] Encoding the perceived data, i.e., performing attention aggregation calculations on the sequence of perceived data from historical nodes:
[0024] (1)
[0025] in, This represents the result of attention calculation for the perceived data sequence; , This represents the sequence of sensing data for historical nodes and the current node. Respectively represent and The corresponding query vector, key vector, and value vector; This represents the dimensions of the query vector and key vector, i.e., the dimensions of each attention head; It is a normalized exponential function;
[0026] After merging the multi-head attention, the final output is:
[0027] (2)
[0028] in, This represents the multi-head attention output matrix corresponding to the perceived data; The number of heads processed for historical observation information. For the index of attention heads; Indicates matrix concatenation;
[0029] Decoding the historical action sequence, i.e., calculating the mask attention of the historical action sequence, is as follows:
[0030] (3)
[0031] in, This represents the result of attention calculation for the historical action sequence; This represents the dot product of matrices. , For historical action sequences, Respectively represent and The corresponding query vector, key vector, and value vector;
[0032] After merging the multi-head attention, the final output is:
[0033] (4)
[0034] in, This represents the multi-head attention output matrix corresponding to the historical action sequence.
[0035] Furthermore, step 4, which calculates the target Q based on the encoding results of the perceptual data and the masked attention calculation results of the historical action sequence, is as follows:
[0036] The observation data and historical motion data encoded by the encoder are input into the decoder;
[0037] The decoder uses an attention mechanism to coordinate observation data and action data, taking into account the observation information of the current node and the influence of historical actions, and outputs the Q value of the current action selection.
[0038] The action selection output by the decoder includes the selection of the next-hop node and the allocation of transmission power, realizing the coordinated optimization of global observation and action selection.
[0039] Furthermore, the calculation process for the target Q value in step 4 is as follows:
[0040] Calculated using step 3 and Perform cross-attention calculation:
[0041] (5)
[0042] in, This represents the result of cross-attention calculation; , ;
[0043] The result of multi-head attention merging for:
[0044] (6)
[0045] Using the projection matrix Calculation results Transform to action space and output the Q value:
[0046] (7)
[0047] Finally, by outputting the Q value The argmax function is used to obtain node selection and resource allocation decisions.
[0048] Furthermore, the cyclic execution of steps 1 to 5 until a successful connection to the destination node is achieved by optimizing each step hop by hop, ensuring that each decision is based on the best available information, thereby achieving globally optimal path selection and resource allocation.
[0049] This invention discloses an IoT joint routing link establishment system based on path attention collaboration. This system implements the aforementioned IoT joint routing link establishment method based on path attention collaboration. The system includes a data collection module, a data transmission module, an encoding / decoding module, a Q-value calculation module, a node transfer module, and a loop module, wherein:
[0050] The data collection module collects sensor data sequences and historical action sequences from the current node;
[0051] The data transmission module is used to input the perceived data sequence into the encoder of the Transformer model and the historical action sequence into the decoder of the Transformer model.
[0052] The encoding and decoding module encodes the perceived data sequence through an encoder and decodes the historical action sequence through a decoder.
[0053] The Q-value calculation module is used to calculate the target Q-value based on the encoding results of the perception data and the mask attention calculation results of the historical action sequence, and to complete the current node selection and resource management decision.
[0054] The node transfer module is used to transfer the perceived data sequence and historical action sequence to the selected node for next-hop node selection and resource management.
[0055] The loop module is used to repeatedly execute steps 1 through 5 until a successful connection to the destination node is established.
[0056] A mobile terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the aforementioned method for establishing IoT joint routing links based on path attention collaboration.
[0057] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method for establishing IoT joint routing links based on path attention collaboration.
[0058] Compared with the prior art, the significant advantages of this invention are:
[0059] (1) Global perception and sequence modeling: By utilizing the powerful self-attention mechanism of the Transformer architecture, the perception data sequence and historical action sequence in the Internet of Things network are encoded and decoded, which can effectively capture the global dependencies in long sequence data. When making a decision, the model not only considers the current perception data, but also integrates historical perception information and action sequence, so as to more accurately predict the optimal action selection.
[0060] (2) Simplified training process and computational optimization: During the model training process, the Q value of the final output is calculated from historical observation data and action selection sequence, which greatly reduces the computational complexity in the training process, improves the training efficiency of the model, and enables it to adapt to changes in the network environment more quickly.
[0061] (3) Decentralized decision-making and topology adaptability: A decentralized decision-making approach is adopted, in which each network node makes routing and resource allocation decisions independently based on local perception information. This not only reduces the computational burden on the central node, but also enhances the model's adaptability to different network topologies.
[0062] (4) This invention does not increase hardware costs and can be implemented through software. The software is deployed on each node of the wireless network. When the node runs the software, it can automatically learn the optimal routing and resource allocation strategy, thereby realizing the establishment of a high-quality communication path and improving the efficiency of IoT joint routing and resource management.
[0063] (5) In practical applications, users can flexibly adjust the parameters and hyperparameters of the model according to different network scenarios and needs to achieve the best performance. It is highly flexible and has a wide range of applications. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating the IoT joint routing link establishment method based on path attention collaboration according to the present invention.
[0065] Figure 2 This is a comparison curve of the training results of the method of this invention and the fully connected model.
[0066] Figure 3 This is an example diagram of the chain-building result achieved using the method of this invention.
[0067] Figure 4 This is an example diagram of the chain establishment results using the fully connected model in this invention. Detailed Implementation
[0068] This invention addresses the shortcomings of traditional routing algorithms, such as low communication path quality and high resource consumption. It proposes a joint routing link establishment method for the Internet of Things based on path attention collaboration, aiming to improve the efficiency of path selection and resource management by coordinating the routing and resource allocation results of the entire path, and to establish high-quality communication paths in multi-hop networks.
[0069] The principle of this invention is as follows: based on the attention encoder, the observation data of the current node and the historical node of the path are aggregated. Then, the mask attention mechanism of the decoder is used to aggregate the action selection data of the historical node of the path. The collaboration between the observation data and the historical action data is realized at the decoder. Then, the Q value of the current action selection is output using deep reinforcement learning (DRL).
[0070] This method employs hop-by-hop optimized deep reinforcement learning (DRL) to address the inherent partially observable Markov decision problem (POMDP) in the path establishment process, and integrates three techniques: attention encoder, attention decoder, and deep reinforcement learning.
[0071] Within the deep reinforcement learning framework, the attention encoder aggregates attention across observations of nodes along the established path, accurately capturing topological relationships and feature information between nodes, providing crucial graph feature information for path selection. The attention decoder performs masked attention aggregation on the action vectors of nodes along the established path, combining the encoder's output with the decoder's input to output the current action selection, achieving collaboration between global observation and action selection. This collaborative mechanism fully utilizes local graph information and historical time data along the path, expanding the observable range of nodes and significantly improving the network's situational awareness. This enables the network to more accurately predict and optimize path selection, reducing path selection errors caused by incomplete information.
[0072] Furthermore, a priority experience replay mechanism is introduced during model training. Experiences are prioritized based on their importance, with those most valuable for model training being replayed first. This accelerates model convergence and improves overall training efficiency. Through this mechanism, the model can learn optimal path selection and resource allocation strategies more quickly, further enhancing network performance.
[0073] This invention provides a method for establishing joint routing links in the Internet of Things based on path attention collaboration, comprising the following steps:
[0074] Step 1: The current node collects sensor data sequences and historical action sequences;
[0075] Step 2: Input the perceived data sequence into the encoder of the Transformer model, and input the historical action sequence into the decoder of the Transformer model;
[0076] Step 3: The encoder encodes the perceived data sequence, and the decoder decodes the historical action sequence;
[0077] Step 4: Calculate the target Q value based on the encoding results of the perception data and the mask attention calculation results of the historical action sequence, and complete the current node selection and resource management decision.
[0078] Step 5: Transfer the perceived data sequence and historical action sequence to the selected node, and perform the next hop node selection and resource management;
[0079] Repeat steps 1 through 5 until a successful connection to the destination node is established.
[0080] As a specific example, the current node collecting the perception data sequence and historical action sequence in step 1 is as follows:
[0081] Step 1.1: Starting from the source node, the current node collects observation information from other nodes within its sensing range and extracts key sensing data. The key sensing data includes the node's geographical location, received signal-to-interference-plus-noise ratio (SINR), and the node's remaining energy, transmission rate, and processing load.
[0082] Step 1.2: Starting from the source node, record the observation information of each historical node along the path;
[0083] Step 1.3: Starting from the source node, record the action selection data of each historical node on the path. The action selection data includes node selection and resource allocation selection.
[0084] As a specific example, the Transformer model described in steps 2 and 3 includes an encoder and a decoder. The encoder encodes the perceptual data sequence and extracts global dependencies; the decoder generates the current optimal action sequence based on the encoder's output.
[0085] As a specific example, step 3 describes the encoder encoding the perceived data sequence and the decoder decoding the historical action sequence, as follows:
[0086] Encoding the perceived data, i.e., performing attention aggregation calculations on the sequence of perceived data from historical nodes:
[0087] (1)
[0088] in, This represents the result of attention calculation for the perceived data sequence; , This represents the sequence of sensing data for historical nodes and the current node. Respectively represent and The corresponding query vector, key vector, and value vector; This represents the dimensions of the query vector and key vector, i.e., the dimensions of each attention head; It is a normalized exponential function;
[0089] After merging the multi-head attention, the final output is:
[0090] (2)
[0091] in, This represents the multi-head attention output matrix corresponding to the perceived data; The number of heads processed for historical observation information. For the index of attention heads; Indicates matrix concatenation;
[0092] Decoding the historical action sequence, i.e., calculating the mask attention of the historical action sequence, is as follows:
[0093] (3)
[0094] in, This represents the result of attention calculation for the historical action sequence; This represents the dot product of matrices. , For historical action sequences, Respectively represent and The corresponding query vector, key vector, and value vector;
[0095] After merging the multi-head attention, the final output is:
[0096] (4)
[0097] in, This represents the multi-head attention output matrix corresponding to the historical action sequence.
[0098] As a specific example, step 4, which calculates the target Q based on the encoding results of the perceptual data and the masked attention calculation results of the historical action sequence, is as follows:
[0099] The observation data and historical motion data encoded by the encoder are input into the decoder;
[0100] The decoder uses an attention mechanism to coordinate observation data and action data, taking into account the observation information of the current node and the influence of historical actions, and outputs the Q value of the current action selection.
[0101] The action selection output by the decoder includes the selection of the next-hop node and the allocation of transmission power, realizing the coordinated optimization of global observation and action selection.
[0102] As a specific example, the calculation process for the target Q value in step 4 is as follows:
[0103] Calculated using step 3 and Perform cross-attention calculation:
[0104] (5)
[0105] in, This represents the result of cross-attention calculation; , ;
[0106] The result of multi-head attention merging for:
[0107] (6)
[0108] Using the projection matrix Calculation results Transform to action space and output the Q value:
[0109] (7)
[0110] Finally, by outputting the Q value The argmax function is used to obtain node selection and resource allocation decisions.
[0111] As a specific example, step 5 will involve sensing the data sequence. With historical action sequence The process then moves to the selected node for the next hop node selection and resource management.
[0112] As a specific example, the loop executes steps 1 to 5 until a successful connection to the destination node. Specifically, by optimizing each step, each decision is based on the best available information, thereby achieving globally optimal path selection and resource allocation.
[0113] This invention also provides a path attention-based collaborative IoT joint routing link establishment system. This system implements the aforementioned path attention-based collaborative IoT joint routing link establishment method. The system includes a data collection module, a data transmission module, an encoding / decoding module, a Q-value calculation module, a node transfer module, and a loop module, wherein:
[0114] The data collection module collects sensor data sequences and historical action sequences from the current node;
[0115] The data transmission module is used to input the perceived data sequence into the encoder of the Transformer model and the historical action sequence into the decoder of the Transformer model.
[0116] The encoding and decoding module encodes the perceived data sequence through an encoder and decodes the historical action sequence through a decoder.
[0117] The Q-value calculation module is used to calculate the target Q-value based on the encoding results of the perception data and the mask attention calculation results of the historical action sequence, and to complete the current node selection and resource management decision.
[0118] The node transfer module is used to transfer the sensing data sequence. With historical action sequence The process then moves to the selected node for the next hop node selection and resource management.
[0119] The loop module is used to repeatedly execute steps 1 through 5 until a successful connection to the destination node is established.
[0120] The present invention also provides a mobile terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned method for establishing IoT joint routing links based on path attention collaboration.
[0121] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method for establishing IoT joint routing links based on path attention collaboration.
[0122] Based on the above solutions, the present invention has the following characteristics:
[0123] 1. Global Perception and Sequence Modeling: Leveraging the powerful self-attention mechanism of the Transformer architecture, the model encodes and decodes perceived data sequences and historical action sequences in IoT networks. This mechanism effectively captures global dependencies in long data sequences, overcoming the decision-making limitations caused by insufficient local perception capabilities in traditional methods. In each decision-making process, the model considers not only the current perceived data but also integrates historical perceived information and action sequences, thereby more accurately predicting the optimal action selection and providing a solid foundation for establishing high-quality links.
[0124] 2. Simplified training process and computational optimization: During model training, the final output Q value is calculated from historical observation data and action selection sequences, which greatly reduces the computational complexity of the training process, improves the training efficiency of the model, and enables it to adapt to changes in the network environment more quickly.
[0125] 3. Decentralized Decision-Making and Topology Adaptability: Employing a decentralized decision-making approach, each network node independently makes routing and resource allocation decisions based on local awareness information. This design not only reduces the computational burden on the central node but also enhances the model's adaptability to different network topologies. Whether in large-scale industrial IoT networks or small smart home networks, this model can quickly adapt and optimize link quality, demonstrating strong versatility and flexibility.
[0126] This invention is applicable to various complex multi-hop network environments, such as wireless sensor networks, Internet of Things (IoT) networks, industrial internet, and distributed computing networks. In these networks, the communication paths between nodes are often affected by various factors, such as node power consumption, signal strength, and network topology changes. This invention optimizes the allocation of network resources through joint routing and resource management, ensuring efficient utilization of network resources, further improving the overall network performance, and providing network users with high-quality and highly reliable communication services.
[0127] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0128] Example
[0129] Combination Figure 1 This invention discloses a method for establishing joint routing links in the Internet of Things based on path attention collaboration, comprising the following steps:
[0130] Step 1: The current node collects the sensing data sequence and historical action sequence, as follows:
[0131] Step 1.1: Starting from the source node, the current node collects observation information from other nodes within its sensing range and extracts key sensing data. This data includes, but is not limited to, parameters such as the geographical location and signal-to-noise ratio of neighboring nodes. This data provides basic information support for subsequent path selection and resource allocation.
[0132] Step 1.2: Starting from the source node, record the observation information of each historical node along the path;
[0133] Step 1.3: Starting from the source node, record the action selection data of each historical node on the path.
[0134] Step 2: Input the sensing data sequence into the encoder of the Transformer model;
[0135] The Transformer model includes an encoder and a decoder. The encoder encodes the perceptual data sequence and extracts global dependencies; the decoder generates the current optimal action sequence based on the encoder's output.
[0136] At each node, the encoder uses an attention mechanism to aggregate the observation data of the current node with the observation data of historical nodes. This process dynamically allocates weights through the attention mechanism, making important historical observation information have a greater impact on the current decision, thereby enhancing the node's ability to perceive the historical state of the path.
[0137] Step 3: Input the historical action sequence into the decoder of the Transformer model;
[0138] At each node, the decoder's masked attention module aggregates the action data of historical nodes using masked attention. In this way, the decoder can focus on historical actions relevant to the current decision, avoiding interference from invalid information and improving the accuracy of the decision.
[0139] Step 4: The encoder and decoder encode and decode the perceived data sequence and historical action sequence. Based on the rewards and actions throughout the entire process, they directly calculate the target Q-value and generate the current optimal action sequence, as detailed below:
[0140] The target Q-value is calculated directly from the rewards and actions of the entire link, omitting the target Q-network. The observation data and historical action data encoded by the encoder are input to the decoder. The decoder uses an attention mechanism to coordinate the observation data and action data, enabling the decoder to comprehensively consider the observation information of the current node and the influence of historical actions, thereby outputting the Q-value of the current action selection. The action selection output by the decoder includes the selection of the next hop node and the allocation of transmission power, realizing the collaborative optimization of global observation and action selection.
[0141] Step 5: Move to the next node and continue executing steps 1 through 5 until a successful connection to the destination node is established, as detailed below:
[0142] After the current node is selected, the relevant data and agent model are transferred to the next node. Then, the node performs route selection and resource management based on the collaborative results of observation data and action data. Steps 1 to 6 are executed continuously until the destination node is successfully connected. This process ensures that each decision is based on the best information at the moment through hop-by-hop optimization, thereby achieving the globally optimal path selection and resource allocation.
[0143] Figure 2 The graph shows a comparison of the training results of the method of this invention and the fully connected model. It can be seen that the method of this invention can learn and utilize valuable experience more efficiently, accelerate the convergence process, and significantly improve the performance and efficiency of the algorithm. This not only improves the training speed of the model, but also enhances its adaptability and robustness in complex network environments. Figure 3 This is an example diagram showing the chain-building results using the method in this invention. Figure 4 The diagram shows an example of the link establishment results using the fully connected model. It can be seen that the method of this invention can more accurately predict the optimal action selection, establish higher quality network links, and improve the efficiency of IoT joint routing and resource management.
[0144] It should be noted that the IoT joint routing link establishment system based on path attention collaboration provided in this embodiment of the invention is used to execute all the process steps of the IoT joint routing link establishment method based on path attention collaboration in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0145] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a method program for establishing IoT joint routing links based on path attention collaboration. When the processor executes the computer program, it implements the steps in the various embodiments of the IoT joint routing link establishment method based on path attention collaboration described above; alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the various device embodiments described above.
[0146] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0147] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0148] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0149] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0150] If the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0151] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0152] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for establishing joint routing links in the Internet of Things based on path attention collaboration, characterized in that, Includes the following steps: Step 1: The current node collects sensor data sequences and historical action sequences; Step 2: Input the perceived data sequence into the encoder of the Transformer model, and input the historical action sequence into the decoder of the Transformer model; Step 3: The encoder encodes the perceived data sequence, and the decoder decodes the historical action sequence; Step 4: Calculate the target Q value based on the encoding results of the perception data and the mask attention calculation results of the historical action sequence, and complete the current node selection and resource management decision. Step 5: Transfer the perceived data sequence and historical action sequence to the selected node, and perform the next hop node selection and resource management; Repeat steps 1 through 5 until a successful connection to the destination node is established.
2. The IoT joint routing link establishment method based on path attention collaboration according to claim 1, characterized in that, Step 1, which involves the current node collecting sensory data sequences and historical action sequences, is detailed as follows: Step 1.1: Starting from the source node, the current node collects observation information from other nodes within its sensing range and extracts key sensing data. The key sensing data includes the node's geographical location, received signal-to-interference-plus-noise ratio (SINR), and the node's remaining energy, transmission rate, and processing load. Step 1.2: Starting from the source node, record the observation information of each historical node along the path; Step 1.3: Starting from the source node, record the action selection data of each historical node on the path. The action selection data includes node selection and resource allocation selection.
3. The IoT joint routing link establishment method based on path attention collaboration according to claim 1, characterized in that, The Transformer model described in steps 2 and 3 includes an encoder and a decoder. The encoder encodes the perceptual data sequence and extracts global dependencies; the decoder generates the current optimal action sequence based on the encoder's output.
4. The IoT joint routing link establishment method based on path attention collaboration according to claim 3, characterized in that, Step 3 describes the encoder encoding the perceived data sequence and the decoder decoding the historical action sequence, as follows: Encoding the perceived data, i.e., performing attention aggregation calculations on the sequence of perceived data from historical nodes: (1) in, This represents the result of attention calculation for the perceived data sequence; , This represents the sequence of sensing data for historical nodes and the current node. Respectively represent and The corresponding query vector, key vector, and value vector; This represents the dimensions of the query vector and key vector, i.e., the dimensions of each attention head; It is a normalized exponential function; After merging the multi-head attention, the final output is: (2) in, This represents the multi-head attention output matrix corresponding to the perceived data; The number of heads processed for historical observation information. For the index of attention heads; Indicates matrix concatenation; Decoding the historical action sequence, i.e., calculating the mask attention of the historical action sequence, is as follows: (3) in, This represents the result of attention calculation for the historical action sequence; This represents the dot product of matrices. , For historical action sequences, Respectively represent and The corresponding query vector, key vector, and value vector; After merging the multi-head attention, the final output is: (4) in, This represents the multi-head attention output matrix corresponding to the historical action sequence.
5. The IoT joint routing link establishment method based on path attention collaboration according to claim 4, characterized in that, Step 4, which calculates the target Q based on the encoding results of the perceptual data and the masked attention calculation results of the historical action sequence, is as follows: The observation data and historical motion data encoded by the encoder are input into the decoder; The decoder uses an attention mechanism to coordinate observation data and action data, taking into account the observation information of the current node and the influence of historical actions, and outputs the Q value of the current action selection. The action selection output by the decoder includes the selection of the next-hop node and the allocation of transmission power, realizing the coordinated optimization of global observation and action selection.
6. The IoT joint routing link establishment method based on path attention collaboration according to claim 5, characterized in that, The calculation process for the target Q value in step 4 is as follows: Calculated using step 3 and Perform cross-attention calculation: (5) in, This represents the result of cross-attention calculation; , ; The result of multi-head attention merging for: (6) Using the projection matrix Calculation results Transform to action space and output the Q value: (7) Finally, by outputting the Q value The argmax function is used to obtain node selection and resource allocation decisions.
7. The IoT joint routing link establishment method based on path attention collaboration according to claim 6, characterized in that, The process of executing steps 1 to 5 in a loop until a successful connection to the destination node is achieved. Specifically, by optimizing each step in a hop-by-hop manner, each decision is based on the best available information, thereby achieving the best global path selection and resource allocation.
8. A joint routing link establishment system for the Internet of Things based on path attention collaboration, characterized in that, This system is used to implement the IoT joint routing link establishment method based on path attention collaboration as described in any one of claims 1 to 7. The system includes a data collection module, a data transmission module, an encoding / decoding module, a Q-value calculation module, a node transfer module, and a loop module, wherein: The data collection module collects sensor data sequences and historical action sequences from the current node; The data transmission module is used to input the perceived data sequence into the encoder of the Transformer model and the historical action sequence into the decoder of the Transformer model. The encoding and decoding module encodes the perceived data sequence through an encoder and decodes the historical action sequence through a decoder. The Q-value calculation module is used to calculate the target Q-value based on the encoding results of the perception data and the mask attention calculation results of the historical action sequence, and to complete the current node selection and resource management decision. The node transfer module is used to transfer the perceived data sequence and historical action sequence to the selected node for next-hop node selection and resource management. The loop module is used to repeatedly execute steps 1 through 5 until a successful connection to the destination node is established.
9. A mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the IoT joint routing link establishment method based on path attention collaboration as described in any one of claims 1 to 7.
10. 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 IoT joint routing link establishment method based on path attention collaboration as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Wireless routing optimization method based on attention mechanism and deep reinforcement learning
CN114423061A
Bidirectional gating circulation network and quantum Transform network path planning method
CN116772857A
Large-scale self-organizing network resource allocation and routing joint optimization method and system
CN117015053A
Intelligent path optimization method and system based on link state perception enhancement
CN119011463A
Routing method and device based on intention-aware path, computer equipment, readable storage medium and program product
CN119788587A
