In this paper, in order to improve the performance of 5G wireless communication system and save power consumption to achieve the optimal power distribution and maximize the total user rate in a multi-user cluster of non-orthogonal multiple access (NOMA) system downlink. a SWIPT-NOMA system assisted by dynamic unmanned aerial vehicle (UAV) relay is constructed. The UAV relay dynamic programming under two-hop communication was firstly studied, and the global optimal power allocation strategy for downlink users of SWIPT-NOMA system is found. Finally, the optimal relay selection algorithm was used to maximize the total user rate, which was verified by Monto Carlo simulation. The simulation results show that the performance of the proposed system model is better than that of the traditional FDMA system scheme in terms of outage probability, energy consumption and total user rate under different distribution scenarios for the multi-user cluster deployed with dynamic UAV relay system.