The invention provides a communication method and device, belongs to the technical field of communication, and is used for improving the sensing performance under the condition of guaranteeing the communication performance of a communication
system. In the method, when elements in the method meet a first feature, a second feature, a third feature or a fourth feature, optimal compromise between communication and sensing performance can be realized, so that the sensing performance can be improved under the condition of ensuring the communication performance of a communication
system, namely, the sensing performance can be improved by adaptively selecting an optimal
frequency shaping coefficient. And the joint optimal performance of communication and sensing is realized. Besides, the user signals can be expanded on the whole carrier bandwidth due to the fact that the elements meet the requirements, and therefore the user signals can occupy the whole carrier bandwidth and maintain sensing precision and resolution in the multi-user scene by determining the first
signal.