The application provides a communication method and device, belonging to the communication technical field, to improve the sensing performance while ensuring the communication performance of the communication
system. In the method, when the elements in [b(n)] satisfy the first feature, the second feature, the third feature or the fourth feature, the optimal compromise between the communication and sensing performance can be achieved, so that the sensing performance can be improved while ensuring the communication performance of the communication
system, that is, the joint optimal performance of communication and sensing is achieved by adaptively selecting the optimal
frequency shaping coefficient. In addition, because the elements in [a(n)] satisfy that the user
signal can be spread over the entire carrier bandwidth, the first
signal determined by [a(n)] can make each user
signal occupy the entire carrier bandwidth in a multi-user
scenario, so as to maintain the sensing accuracy and resolution.