本研究将网络编码与软演员-评论家强化学习相结合,以实现核心物联网网络中的节能路由,在保持97%数据包投递率的同时,能耗降低了40%。
研究文章
本研究将网络编码与软演员-评论家强化学习相结合,以实现核心物联网网络中的节能路由,在保持97%数据包投递率的同时,能耗降低了40%。
物联网(IoT)网络的快速发展加剧了核心物联网网络中的能效挑战,其中数据路由对节点能量提出了较高要求。本文提出一种混合模型,将网络编码(NC)与软演员-评论家(SAC)强化学习相结合,以应对这些挑战。NC 通过合并数据包来减少冗余传输,而 SAC 智能体则根据节点状态、链路质量和剩余能量动态选择节能的路由路径。
该系统采用 NS-3 模拟器实现,物联网节点采用 5 × 5 网格拓扑结构(512 字节数据包,运行时间 100 秒),并在不同流量条件下进行测试。结果表明,与传统路由和独立方法相比,NC + SAC 能够降低 40% 的能耗,实现 97% 的数据包投递率,吞吐量提升 50%,并显著延长网络寿命。
主要贡献包括新型的NC-SAC集成、在多个指标上对NS-3的全面验证,以及面向可持续物联网基础设施的学习驱动型编码通信的实现。该混合方法在可靠性、能耗控制和性能之间实现了平衡,为下一代绿色物联网网络提供了一个可扩展的框架。
物联网(IoT)已成为21世纪最具变革性的技术之一,通过无缝连接数十亿设备,实现更智能的家居、城市、工业和医疗系统1。然而,随着这一前所未有的发展,一个紧迫的挑战也随之而来:能耗问题。物联网设备,尤其是部署在核心网络中的设备,通常依赖电池供电或资源受限。随着设备密度和数据流量的增加,能效成为确保物联网基础设施长期可持续性的关键因素。在此背景下,设计能够平衡性能与节能的智能通信和路由策略至关重要。
物联网网络中的传统路由方法通常侧重于最短路径或以可靠性为中心的策略。尽管这些方法在基本场景中有效,但在动态或大规模部署中,常常导致冗余传输和能量快速耗尽2,3。为解决这些不足,研究人员探索了网络编码(network coding, NC)等技术,该技术通过将多个数据包合并为一个编码后的数据包,减少传输次数。实践证明,网络编码能够提高吞吐量、降低延迟并优化带宽使用。然而,尽管网络编码在降低通信开销方面具有优势,但它本身并未考虑节点的能量水平,也无法自适应地响应网络条件的变化4,5。
这正是机器学习驱动决策发挥关键作用的领域。强化学习(RL)提供了一个特别强大的框架,使物联网节点能够通过与环境交互并从奖励中学习,从而做出自适应决策。在众多强化学习算法中,软演员-评论家(SAC)因其能够通过熵正则化平衡探索与利用而受到广泛关注6。与传统的强化学习模型不同,SAC鼓励多样化的行为选择,防止系统过早收敛到次优策略。对于能量受限的物联网网络而言,这意味着能够实现更智能的路由选择,不仅适应链路质量和数据传输成功率,还能根据每个节点的剩余能量水平进行动态调整。
近年来,越来越多的研究关注强化学习在优化物联网通信和能源管理中的作用。例如,Dev 等人7采用哈里斯鹰优化算法实现节能型物联网通信,而 Tuong 等人8则探索了深度强化学习在无线物联网系统分层双工中的应用。最近的一些研究8,9进一步表明,诸如近端策略优化和分布式多智能体框架等先进的强化学习方法,能够显著提升大规模物联网环境中的适应能力。
本研究提出了一种新型混合通信模型,该模型将网络编码(NC)与软演员-评论家(SAC)算法相结合,以实现核心物联网网络中基于能耗感知的智能路由。与以往单独使用网络编码或强化学习、或采用离散动作深度强化学习模型的方法不同,本研究利用SAC算法基于熵正则化的连续动作机制,根据网络状态(包括能量水平、链路稳定性及数据包缓冲区状态)动态优化路由决策。通过引入网络编码,可减少重传次数并提高带宽利用率;而SAC算法则确保路径选择具备自适应能力,从而平衡网络负载并节约节点能量。该双重机制开创了一种由学习驱动的编码通信新范式,在能量效率、吞吐量、数据包投递率以及网络寿命等方面均显著优于现有方法。
我们使用NS-3仿真环境实现并测试了所提出的框架,在不同流量负载下部署了一个5×5的物联网节点网格。我们明确定义了数据包大小、距离和传输能量模型,以反映真实的物联网环境。通过这些仿真,我们评估了关键指标,包括数据包投递率(PDR)、吞吐量、网络寿命和能效。结果如下:与传统路由和独立模型相比,NC + SAC混合系统将能耗降低了近40%,吞吐量提高了50%,显著延长了网络寿命,同时保持接近97%的数据包投递率。
除了数值上的提升,这项工作的真正优势在于其可扩展性和适应性。随着物联网网络在规模和复杂性上的持续增长,能够动态适应变化条件的解决方案将至关重要。这种混合框架不仅解决了节能的迫切问题,还为自主、自优化的物联网系统奠定了基础,使其能够在实际部署中实现自我维持。表1包含了能耗、分组投递率、网络寿命和吞吐量等参数的性能日志。表2总结了实验得出的结果。此外,将强化学习融入物联网网络,展示了人工智能驱动协议在资源受限环境中重塑设备交互方式的潜力。
智能通信策略的最新进展进一步凸显了对自适应且可持续的物联网路由框架的需求10,11,12。传统的基于聚类或静态路由协议通常难以应对动态网络挑战,例如链路质量波动、节点能量水平变化以及干扰,这些问题可能导致性能迅速下降和节点过早失效。基于现代强化学习的方法已展现出解决上述问题的强大潜力,通过使物联网设备在与环境持续交互过程中动态学习最优传输策略,从而提升系统适应性10,11,12。与此同时,网络编码(Network Coding)已被证明在减少冗余传输和提升受限网络环境下的频谱效率方面具有显著优势5,13,14。然而,大多数现有研究仅独立评估这些技术,而非将其结合使用。因此,将网络编码与Soft Actor-Critic等连续控制型强化学习方法相融合,有望构建一种更加强健且智能化的通信机制,能够在节约能耗的同时适应实时变化15,16。这种混合范式不仅增强了物联网网络的鲁棒性与自主性,也契合了绿色通信系统及面向大规模可持续部署的机器学习驱动无线架构等新兴研究方向。
访问受限。请登录或开始试用以查看此内容。
Data transmission and packet processing workflow
Node initialization: Each node starts with complete network topology information, its maximum energy capacity, and a pre-trained SAC agent ready for decision-making. The network coding module activates and prepares for packet combination operations.
Packet encoding process: When transmission begins, source nodes gather multiple data packets from sensors. The network coding module combines these packets into fewer coded packets using efficient mathematical operations, significantly reducing the total number of transmissions needed.
SAC routing decision execution: The SAC agent analyzes the current network state, including neighbor energy levels, link quality, traffic conditions, and destination distance. It selects the optimal next-hop neighbor based on its learned policy, prioritizing energy efficiency and reliability.
Multi-hop packet forwarding: Coded packets travel through the selected path. Intermediate nodes decide whether to further combine packets or forward them directly, based on their current buffer status and remaining energy levels.
Reward computation and storage: After each transmission, the system calculates a reward score based on delivery success, energy used, transmission delay, and packet drops. This reward information is stored for the SAC agent to learn from.
Continuous learning update: The SAC agent regularly reviews stored experiences and updates its decision-making strategy to become better at selecting energy-efficient routes while maintaining high delivery performance.
System architecture
A typical node operates as follows: it senses and collects data, encodes it using network coding, and then forwards the encoded packet through a routing path selected by the SAC agent. The SAC agent evaluates the node’s state, including remaining energy, buffer status, and link quality, to decide the next optimal hop. This process is dynamic and evolves through experience as the network conditions change. Figure 1 will illustrate this data flow and interaction between components.
Network coding equation
Network coding is applied at intermediate nodes as follows:

Where Ci is the encoded packet, αij is the coding coefficient (learned via SAC), and Pj are the original packets. This allows the network to reduce the number of transmissions and improve reliability.
SAC objective function
The SAC agent optimizes the policy using the following entropy-regularized objective:
![figure-protocol-2 Policy gradient formula, Σ[ET] in reinforcement learning, optimization symbol, educational use.](/files/ftp_upload/69634/69634eq2.jpg)
Where r(st, at) is the reward, α is a trade-off parameter for exploration, and H is the entropy term.
Energy consumption model
To simulate realistic energy usage, the following model is used:

Where: Eelec- is energy per bit to run the transmitter/receiver, - k is the data size in bits, -
is the energy required by the transmitter amplifier, - is the distance between nodes, -d is the path loss exponent.
Evaluation metrics
The following performance metrics were used in the simulations in this study:
Packet delivery ratio (PDR):

Throughput:

Network lifetime: Defined as the duration until 50% of the network nodes exhaust their energy.
Energy efficiency:

Pseudocode
Initialization of IoT network nodes
This function sets up all IoT nodes in the network before the system begins operation. Each node is assigned maximum energy, an empty buffer to store packets, a state representing its local environment, a SAC agent for learning optimal decisions, and an NC module that enables intelligent data encoding.
def initialize_nodes(network):
for node in network:
node.energy = MAX_ENERGY
node.buffer = []
node.state = sense_environment(node)
node.agent = initialize_sac_agent()
node.nc_module = activate_network_coding()
Packet generation and network coding
This function is responsible for collecting sensor data from the source node, encoding it using a linear or XOR-based network coding method, and preparing it for transmission. It reduces the communication overhead by bundling multiple packets into one coded packet, ready to be forwarded through the network.
def generate_and_code_packets(source_node):
data_packets = collect_data(source_node)
coded_packet = network_code(data_packets)
queue_transmission(source_node, coded_packet)
def network_code(packets):
return linear_combination(packets)
SAC-based routing decision
Here, the current node uses its SAC agent to analyze the network state and select the most energy-efficient and reliable neighbor to forward the packet to. The decision is based on learned policies and current environmental conditions, like link quality or residual energy.
def select_next_hop(current_node):
current_state = observe_network_state(current_node)
action = sac_agent_policy(current_node.agent, current_state)
next_hop = map_action_to_neighbor(action)
return next_hop
Packet transmission and feedback loop
This function manages the actual transmission of a coded packet. After determining the best next hop, the packet is sent if the link is valid. The system then calculates a reward based on transmission success and energy usage, which is used to update the SAC agent’s learning model.
def transmit_packet(current_node, packet):
next_hop = select_next_hop(current_node)
if is_link_valid(current_node, next_hop):
send(packet, next_hop)
reward = compute_reward(current_node, packet)
update_sac_agent(current_node, reward)
else:
recompute_next_hop(current_node)
SAC agent update (learning phase)
Once a packet is transmitted, this function updates the SAC agent. It records the change in state, stores the experience in memory, and if enough experience is gathered, it uses a sample batch to improve the agent’s decision-making strategy. This helps the node adapt to network changes over time.
def update_sac_agent(node, reward):
new_state = observe_network_state(node)
store_transition(node.agent.memory, node.state, node.action, reward, new_state)
if enough_experience(node.agent.memory):
batch = sample_batch(node.agent.memory)
node.agent = optimize_sac(node.agent, batch)
node.state = new_state
Decoding at the receiver
At the destination, this function takes in all the received coded packets and decodes them back into the original data using methods like Gaussian Elimination. The recovered data is then passed to the appropriate application layer or process.
def decode_packet(destination_node):
received_packets = destination_node.buffer
original_data = decode(received_packets)
deliver_data(original_data)
def decode(packets):
return gaussian_elimination(packets)
Energy monitoring and node sleep logic
This function tracks each node’s energy levels and determines whether a node should continue operating or switch to sleep mode to conserve power. If energy is sufficient, the node deducts transmission-related costs; if not, it shuts down temporarily to extend overall network life.
def monitor_energy(node):
if node.energy < THRESHOLD:
put_node_to_sleep(node)
else: node.energy -= transmission_cost()
访问受限。请登录或开始试用以查看此内容。
我们进行了仿真,比较了四种不同的方法:(i)无优化的传统模型,(ii)仅采用网络编码(NC)的系统,(iii)仅使用软演员-评论家(SAC)算法进行路由的方案,以及(iv)结合NC与SAC的所提出的混合模型。
能耗
在能源效率方面观察到了最显著的改进。传统的物联网网络由于依赖固定路由,且在发生数据包丢失时需要频繁重传,导致能耗迅速增加。引入网络编码(NC)通过减少冗余重传,提高了效率,从而节约了能量。SAC 进一步提升了性能,使系统能够避开高能耗路径,并动态调整路由决策。NC 与 SAC 的结合带来了最显著的增益,系统由此学习到以高效且智能的方式进行通信,实现了最低的整体能耗。图2展示了传统 AODV、仅使用 NC、仅使用 SAC 以及 NC 与 SAC 结合四种情况下的能耗对比。
分组投递率(PDR)
通过分组投递率(PDR)评估数据传输的可靠性。在传统模型中,数据包丢失和延迟频繁发...
访问受限。请登录或开始试用以查看此内容。
本研究提出了一种针对核心物联网网络的新型节能通信策略,该策略将网络编码(NC)与软演员-评论家(SAC)强化学习算法相结合。该混合方法的目标是在保持数据传输可靠性和高效性的同时,最大限度地降低能耗。网络编码通过对接数据包进行编码来减少冗余传输,而SAC则根据观测到的网络状态动态学习并选择节能的路由路径。仿真结果表明,相较于传统路由方法和独立方法,NC与SAC结合的混合方法在能量效率、数据包投递率、吞吐量以及网络寿命方面均具有显著优势。
本研究的意义在于通过NC13实现数据高效性,并通过SAC9实现自适应学习,从而应对物联网领域中一项关键的实际挑战1,17。该框架通过降低能耗并延长节点的运行寿命,直接促进了物联网部署的可持续性,这对于智能家居、工业自动化和环境监测等应用而言是一项关键需求3。这些结果表明,当强化学习与基于编码的...
访问受限。请登录或开始试用以查看此内容。
作者无任何利益冲突需要披露。
我们谨向牛津工程学院和贾因 deemed-to-be 大学表示感谢,感谢他们提供的支持和资源。
访问受限。请登录或开始试用以查看此内容。
| 姓名 | 公司 | 目录编号 | 评论 |
|---|---|---|---|
| 6 GB NVIDIA GeForce RTX 3050(计算机系统) | nVIDIA | https://www.nvidia.com/en-in/geforce/graphics-cards/30-series/rtx-3050/ | 用于仿真与训练:CPU 内存:16 GB,GPU 内存 |
| AMD Ryzen(计算机系统) | AMD | Ryzen 7 | 用于仿真与训练:处理器 |
| 硬件测试平台(可选的未来工作) | Raspberry Pi | https://www.raspberrypi.com/products/raspberry-pi-4-model-b/ | 配备无线模块的 Raspberry Pi 4 节点,用于真实场景下的物联网部署与验证 |
| Intel Core i7(计算机系统) | Intel Core | i7-7700 处理器 | 用于仿真与训练:处理器 |
| Jupyter Notebook | Jupyter | https://jupyter.org/ | 用于迭代开发、调试和可视化的环境 |
| Matplotlib | Python | https://matplotlib.org/ | 用于绘制性能指标(能量消耗、吞吐量、数据包投递率、网络寿命)的 Python 可视化库 |
| 网络编码模块 | 自定义的 Python/NS-3 集成,用于实现线性网络编码和数据包编码 | ||
| NS-3 仿真器 | ns-3 | nsnam.org | 开源离散事件网络仿真器,用于物联网网络仿真与路由评估 |
| NumPy | NumPy | numpy.org | 用于处理仿真日志、统计分析和结构化数据集的 Python 软件包 |
| Pandas | pandas.pydata.org | 用于处理仿真日志、统计分析和结构化数据集的 Python 软件包 | |
| Python 3.10 | Python | 版本 3.10.0 | 用于 SAC 智能体训练、编码系数优化和数据处理的编程语言 |
| PyTorch | PyTorch | https://pytorch.org/ | 用于实现软演员-评论家算法(Soft Actor-Critic)和强化学习模型的深度学习库 |
| Seaborn | Python | https://seaborn.pydata.org/ | 用于绘制性能指标(能量消耗、吞吐量、数据包投递率、网络寿命)的 Python 可视化库 |
| Ubuntu 20.04(计算机系统) | Ubuntu | 版本 20.04 | 用于仿真与训练:操作系统 |
访问受限。请登录或开始试用以查看此内容。
申请许可以重复使用本 JoVE 文章的文本或图表
申请许可