A communication method, comprising: mapping (S410) first data based on a first frequency hopping pattern, wherein the first frequency hopping pattern is one of K candidate frequency hopping patterns, one candidate frequency hopping pattern in the K candidate frequency hopping patterns comprises L frequency hopping units, at least two candidate frequency hopping patterns in the K candidate frequency hopping patterns comprise a same frequency hopping unit, K is an integer greater than 1, and L is an integer greater than 1; and sending (S420) the first data to a network device or a terminal device, wherein one of the L frequency hopping units comprises one frequency domain resource unit in frequency domain and comprises one time domain resource unit in time domain, characterised in that an index of the frequency domain resource unit meets: ∑ l = 0 L − 1 m k , l − l mod M × M l = ∑ i = 0 p c k + 1 × θ + i × 2 i mod M L wherein m k,l is the index of the frequency domain resource unit, m k,l is an integer less than or equal to M-1, M represents a quantity of candidate frequency domain resource units comprised in the frequency domain resource used to map the first data, the frequency domain resource unit is one of the candidate frequency domain resource units, k represents an index of the candidate frequency hopping pattern, k is an integer less than or equal to K-1, l represents an index of the time domain resource unit, l is an integer less than or equal to L-1, c(n) represents a Gold sequence, p represents a parameter related to a length of the Gold sequence, and θ represents a related parameter mapping (S410) first data based on a first frequency hopping pattern, wherein the first frequency hopping pattern is one of K candidate frequency hopping patterns, one candidate frequency hopping pattern in the K candidate frequency hopping patterns comprises L frequency hopping units, at least two candidate frequency hopping patterns in the K candidate frequency hopping patterns comprise a same frequency hopping unit, K is an integer greater than 1, and L is an integer greater than 1; and sending (S420) the first data to a network device or a terminal device, wherein one of the L frequency hopping units comprises one frequency domain resource unit in frequency domain and comprises one time domain resource unit in time domain, characterised in that an index of the frequency domain resource unit meets: ∑ l = 0 L − 1 m k , l − l mod M × M l = ∑ i = 0 p c k + 1 × θ + i × 2 i mod M L wherein m k,l is the index of the frequency domain resource unit, m k,l is an integer less than or equal to M-1, M represents a quantity of candidate frequency domain resource units comprised in the frequency domain resource used to map the first data, the frequency domain resource unit is one of the candidate frequency domain resource units, k represents an index of the candidate frequency hopping pattern, k is an integer less than or equal to K-1, l represents an index of the time domain resource unit, l is an integer less than or equal to L-1, c(n) represents a Gold sequence, p represents a parameter related to a length of the Gold sequence, and θ represents a related parameter <EOS>