A stereo signal encoding method, comprising: determining a residual signal encoding parameter of a current frame of a stereo signal based on downmixed signal energy and residual signal energy of each of M sub-bands of the current frame, wherein the residual signal encoding parameter of the current frame is used to indicate whether to encode residual signals of the M sub-bands, wherein spectral coefficients of the current frame are divided to obtain N sub-bands, the M sub-bands are at least some of the N sub-bands, N is a positive integer greater than 1, M ≤ N, and M is a positive integer; and determining, based on the residual signal encoding parameter of the current frame, whether to encode the residual signals of the M sub-bands of the current frame characterized in that the determining a residual signal encoding parameter of a current frame based on downmixed signal energy and residual signal energy of each of M sub-bands comprises: determining a first parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the first parameter indicates a value relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands; determining a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a value relationship between a first energy sum and a second energy sum, the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, the second energy sum is a sum of residual signal energy and downmixed signal energy of M sub-bands in a frequency-domain signal of a previous frame of the current frame, and the M sub-bands of the current frame have same sub-band index numbers as the M sub-bands of the previous frame; and determining the residual signal encoding parameter of the current frame based on the first parameter, the second parameter, and a long-term smoothing parameter of the previous frame of the current frame, wherein the residual signal encoding parameter of the current frame is the long-term smoothing parameter of the current frame. determining a residual signal encoding parameter of a current frame of a stereo signal based on downmixed signal energy and residual signal energy of each of M sub-bands of the current frame, wherein the residual signal encoding parameter of the current frame is used to indicate whether to encode residual signals of the M sub-bands, wherein spectral coefficients of the current frame are divided to obtain N sub-bands, the M sub-bands are at least some of the N sub-bands, N is a positive integer greater than 1, M ≤ N, and M is a positive integer; and determining, based on the residual signal encoding parameter of the current frame, whether to encode the residual signals of the M sub-bands of the current frame characterized in that the determining a residual signal encoding parameter of a current frame based on downmixed signal energy and residual signal energy of each of M sub-bands comprises: determining a first parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the first parameter indicates a value relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands; determining a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a value relationship between a first energy sum and a second energy sum, the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, the second energy sum is a sum of residual signal energy and downmixed signal energy of M sub-bands in a frequency-domain signal of a previous frame of the current frame, and the M sub-bands of the current frame have same sub-band index numbers as the M sub-bands of the previous frame; and determining the residual signal encoding parameter of the current frame based on the first parameter, the second parameter, and a long-term smoothing parameter of the previous frame of the current frame, wherein the residual signal encoding parameter of the current frame is the long-term smoothing parameter of the current frame. determining a first parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the first parameter indicates a value relationship between the downmixed signal energy and the residual signal energy of each of the M sub-bands; determining a second parameter based on the downmixed signal energy and the residual signal energy of each of the M sub-bands, wherein the second parameter indicates a value relationship between a first energy sum and a second energy sum, the first energy sum is a sum of residual signal energy and downmixed signal energy of the M sub-bands, the second energy sum is a sum of residual signal energy and downmixed signal energy of M sub-bands in a frequency-domain signal of a previous frame of the current frame, and the M sub-bands of the current frame have same sub-band index numbers as the M sub-bands of the previous frame; and determining the residual signal encoding parameter of the current frame based on the first parameter, the second parameter, and a long-term smoothing parameter of the previous frame of the current frame, wherein the residual signal encoding parameter of the current frame is the long-term smoothing parameter of the current frame.