The invention relates to the technical field of 
wireless communication, in particular to a user 
pairing and 
relay selection joint 
algorithm based on a cooperative non-orthogonal multiple access 
system. The 
algorithm comprises the following steps: S1, selecting a user farthest from a 
base station from all users in the coverage range of the 
base station as a main user; S2, selecting a 
repeater with the best channel condition to the main user from all repeaters as a 
relay; S3, after the main user and the 
relay are selected, obtaining a user set CR meeting the target rate of the main user in the service range of the relay; S4, selecting a user with the maximum 
instantaneous rate from the user set CR as a secondary user; and S5, circularly carrying out the steps until all users in the coverage range of the 
base station complete user 
pairing and relay selection. The invention provides a user 
pairing and relay selection joint 
algorithm of a cooperative non-orthogonal multiple access 
system in a multi-user and multi-relay scene, a cooperative transmission strategy improves the interruption performance of the whole 
system, and compared with a traditional 
relay network, the cooperative transmission method has great advantages in 
transmission performance.