A communications method, comprising: receiving indication information from a first device, wherein the indication information is used to determine at least one intermediate sequence number between a sequence number of a first data packet located on a bearer and ciphered by using a new key and a sequence number of a last data packet located on the bearer and ciphered by using an old key, and the sequence number of the first data packet located on the bearer and ciphered by using the new key and the sequence number of the last data packet located on the bearer and ciphered by using the old key are discontinuous; and skipping the at least one intermediate sequence number based on the indication information, deciphering, by using the old key, a data packet that is located on the bearer and whose sequence number is followed by the at least one intermediate sequence number, and deciphering, by using the new key, a data packet that is located on the bearer and whose sequence number follows the at least one intermediate sequence number; wherein the indication information comprises at least one of the following: the sequence number of the first data packet ciphered by using the new key, the sequence number of the last data packet ciphered by using the old key, or information about a sequence number between the sequence number of the first data packet ciphered by using the new key and the sequence number of the last data packet ciphered by using the old key; wherein the skipping the at least one intermediate sequence number comprises: using the first data packet ciphered by using the new key, as a next data packet of the last data packet ciphered by using the old key, and after the next data packet of the last data packet is deciphered, submitting the next data packet of the last data packet to an upper layer. receiving indication information from a first device, wherein the indication information is used to determine at least one intermediate sequence number between a sequence number of a first data packet located on a bearer and ciphered by using a new key and a sequence number of a last data packet located on the bearer and ciphered by using an old key, and the sequence number of the first data packet located on the bearer and ciphered by using the new key and the sequence number of the last data packet located on the bearer and ciphered by using the old key are discontinuous; and skipping the at least one intermediate sequence number based on the indication information, deciphering, by using the old key, a data packet that is located on the bearer and whose sequence number is followed by the at least one intermediate sequence number, and deciphering, by using the new key, a data packet that is located on the bearer and whose sequence number follows the at least one intermediate sequence number; wherein the indication information comprises at least one of the following: the sequence number of the first data packet ciphered by using the new key, the sequence number of the last data packet ciphered by using the old key, or information about a sequence number between the sequence number of the first data packet ciphered by using the new key and the sequence number of the last data packet ciphered by using the old key; wherein the skipping the at least one intermediate sequence number comprises: using the first data packet ciphered by using the new key, as a next data packet of the last data packet ciphered by using the old key, and after the next data packet of the last data packet is deciphered, submitting the next data packet of the last data packet to an upper layer. the sequence number of the first data packet ciphered by using the new key, the sequence number of the last data packet ciphered by using the old key, or information about a sequence number between the sequence number of the first data packet ciphered by using the new key and the sequence number of the last data packet ciphered by using the old key; wherein the skipping the at least one intermediate sequence number comprises: using the first data packet ciphered by using the new key, as a next data packet of the last data packet ciphered by using the old key, and after the next data packet of the last data packet is deciphered, submitting the next data packet of the last data packet to an upper layer.