# rf_computing **Repository Path**: zhangxs17/rf_computing ## Basic Information - **Project Name**: rf_computing - **Description**: 论文 《面向“云—边—端”算力系统的计算和传输联合优化方法》的代码仓库 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-05-04 - **Last Updated**: 2024-05-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 面向“云—边—端”算力系统的计算和传输联合优化方法 ## 摘要 “云—边—端”资源协同优化是算力网络部署的关键难题之一. 如何有效整合高性能云计算、低延时边缘计算和低成本用户设备等异构算力资源,对于算力网络建设具有重要意义. 基于此,提出了一种面向“云—边—端”算力网络的计算和传输联合优化方案,旨在从应用服务模型、网络状态感知和资源联合优化3方面提供一套系统性解决方案. 首先,根据通用应用服务的特性,改进了传统网络服务的链状表征模型,提出了广义图结构的通用服务模型. 其次,为表征异构网络状态的动态规律,提出了用于建模计算和传输时变负载的双虚拟队列结构. 再次,为降低在大规模算力网络中计算和传输资源联合优化的问题复杂度,提出了一种基于图概念的增广图模型,该模型能够将计算和传输联合优化问题转化为增广图的路由问题,简化了异构资源联合优化问题的形式化表征难度. 为实际解决该问题,应用了多种基于强化学习的异构资源协同优化算法. 这个代码库专注于利用强化学习算法来优化模拟网络环境中的网络计算和传输任务分配。实现了A2C、SAC和DQN等算法来达成既定目标。代码库是模块化和可扩展的,允许加入更多的算法和配置。 ![img_8.png](img_8.png) ## Table of Contents - [Overview](#overview) - [Installation](#installation) - [Supported Algorithms](#supported-algorithms) - [Configuration](#configuration) - [Usage](#usage) - [Contributing](#contributing) - [License](#license) ## Organization of nodes ![img_2.png](img_2.png) ## Task allocation ![](./images/r_of_speed.png) ![](./images/r_of_speed_nodes.png) ![](./images/r_of_speed_p.png) ![](./images/r_of_speed_train.png) ## Installation To get started, clone the repository and install the required dependencies. ```bash git clone https://gitee.com/zhangxs17/rf_computing.git cd rf_computing pip install -r requirements.txt ``` ## Supported Algorithms The following reinforcement learning algorithms are currently implemented: ### 单层 - Advantage Actor-Critic (A2C) - Soft Actor-Critic (SAC) - Deep Q-Network (DQN) ### 双层 PPO+DQN 框架图 ![img_3.png](img_3.png) 文件:E:\项目\rf_computing\experiment\main_multiple_PPO_rv1.py 上层状态和奖励 ![img_4.png](img_4.png) ![img_5.png](img_5.png) 下层状态和奖励 ![img_6.png](img_6.png) ![img_7.png](img_7.png) ## Configuration Configuration files can be found in the `config` directory. To specify a particular algorithm or environment settings. ## Usage python main_multiple_PPO_rv1.py #双层强化学习算法 [comment]: <> (To run a single agent using A2C algorithm, execute:) [comment]: <> (```bash) [comment]: <> (python main_single_A2C.py) [comment]: <> (```) [comment]: <> (For multi-agent scenarios with DQN:) [comment]: <> (```bash) [comment]: <> (python main_multiple_DQN.py) [comment]: <> (```)