## 4 DQN-Based Priority/Demanding Resource Management
### DQN-Based Solutions
\begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **Value** \\ \hline Number of MEC servers & 4 \\ \hline Number of IIoT devices & [50; 100; 150] \\ \hline Task size & [5; 30] MB \\ \hline Upper-bound bandwidth & 20 MHz \\ \hline CPU frequency of MEC server & [5; 20] GHz \\ \hline Maximum link latency & 1.5 ms \\ \hline Number of time slots & 1000 \\ \hline Replay memory buffer size & 3000 \\ \hline Activation function & ReLU \\ \hline Discount factor on reward & 0.95 \\ \hline Learning rate & 0.001 \\ \hline Batch size & 32 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Simulation parameters. costs, energy, and reliability) of the agent policies and (2) overall ratios based on demand and priority levels in requesting services. We captured the reward scoring metrics of the exploited DQG-PD algorithm under different learning rates (\(\alpha\)) and discount factors (\(\gamma\)). The results highlight the trade-off between the speed of learning and the quality of the solution (optimality). The combination of \(\alpha=0.001\) and \(\gamma=0.95\) is chosen as the optimal setting due to its demonstrated performance in balancing the trade-off. This means that the learning rate (\(\alpha\)), which determines how quickly the algorithm updates its knowledge, is set to a slower pace (0.01) to ensure stability. Meanwhile, the discount factor (\(\gamma\)), which controls how much future rewards are considered, is relatively high (0.95), emphasizing the importance of long-term rewards. These settings guide the algorithm toward optimal decision-making over time despite the initial exploration delays. Over 1000 episodes, we illustrate the comparison between the proposed DQG-PD algorithm and two other schemes (MT-HRT-PD and SADRL-PD) in terms of total reward scores, respectively. During the early phases (exploration), the DQG-PD experiences higher latencies, which is expected when the algorithm is still exploring various possibilities. However, by the 500 th episode, it converges with a near-optimal solution (>80 setting metric), reducing the delay significantly and outperforming the other reference schemes, which overcomes MT-HRT-PD by 18.12 scores and SADRL-PD by 35.56 scores. In terms of total reward, which is cumulated based on positive and negative scores as the algorithm converges during each episode, DQG-PD demonstrates superior performance. The reward is based on the algorithm's efficiency in multi-batch processing. By the final episode, DQG-PD reached a reward of 98.76, while MT-HRT-PD and SADRL-PD achieved lower scores of 68.13 and 43.62, respectively. This highlights the algorithm's overall better performance across different metrics, such as cost efficiency, resource usage, and latency reduction. Each sub-reward is captured to compare different objectives to different approach performances. Figure 3 depicts the sub-reward on resources, which states the overloading queues and requests to the server. Whether the resources are overloaded or underutilized, negative rewards are accumulated. Regarding resource optimization, we illustrate how DQG-PD allocates virtual service nodes and forwards graphs to physical nodes and links efficiently. Dynamic resource allocation improves overall resource utilization, reducing bottlenecks and ensuring that the demand for created industrial service slices is met. DQG-PD achieved 26.61 positive scores in this category, outperforming MT-HRT-PD and SADRL-PD by 13.85 and 8.88 scores, respectively. The algorithm significantly enhances resource efficiency by adapting to real-time conditions and prioritizing mission-critical service demands. In terms of costs in Figure 4, we balance between the number of servers deployed, service types, and consequences of packet loss in each slice. DQG-PD achieved positive scores of 19.27, which accounts for 19.51% of the overall reward, compared to other schemes, where MT-HRT-PD and SADRL-PD obtained 7.59 and 14.33 scores, respectively.