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 an element in [b (n)] meets 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 communication performance of the communication
system can be improved. 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 elements in the [a (n)] meet # imgabs0 # imgabs1 #, and therefore the first
signal is determined through the [a (n)], all the user signals can occupy the whole carrier bandwidth in the multi-user scene, and the sensing precision and the resolution ratio can be maintained.