A method for selecting a network, performed by an electronic device, the method comprising: receiving a redirect message, wherein the redirect message carries a first frequency; determining that a first signal parameter of the first frequency is not greater than a first threshold; obtaining a second signal parameter of a prior frequency based on a first signal parameter of the prior frequency and a preset first compensation value corresponding to a service currently performed by the electronic device; wherein the preset first compensation value is a negative value and is added to the first signal parameter to obtain the second signal parameter to make the signal at the prior frequency worse, so that the first frequency is preferably selected as a frequency to be redirected to, wherein the prior frequency is a frequency of a frequency band of a cell where the electronic device previously camped, and the first signal parameter of the prior frequency is measured by the electronic device; selecting, based on a comparison of a signal parameter of the first frequency and the second signal parameter, a target frequency from the first frequency and the prior frequency, wherein the electronic device sorts signal qualities of the prior frequency and the first frequency based on the second signal parameter of a prior frequency and the first signal parameter of the first frequency, to obtain a sorting result, and selects a frequency with an optimal signal as a target frequency based on the sorting result, further wherein the first signal parameter is at least one of a signal strength, a RSRQ and a SINR and the second signal parameter is at least one of a signal strength, a RSRQ and a SINR; and redirecting to a cell at the target frequency. receiving a redirect message, wherein the redirect message carries a first frequency; determining that a first signal parameter of the first frequency is not greater than a first threshold; obtaining a second signal parameter of a prior frequency based on a first signal parameter of the prior frequency and a preset first compensation value corresponding to a service currently performed by the electronic device; wherein the preset first compensation value is a negative value and is added to the first signal parameter to obtain the second signal parameter to make the signal at the prior frequency worse, so that the first frequency is preferably selected as a frequency to be redirected to, wherein the prior frequency is a frequency of a frequency band of a cell where the electronic device previously camped, and the first signal parameter of the prior frequency is measured by the electronic device; selecting, based on a comparison of a signal parameter of the first frequency and the second signal parameter, a target frequency from the first frequency and the prior frequency, wherein the electronic device sorts signal qualities of the prior frequency and the first frequency based on the second signal parameter of a prior frequency and the first signal parameter of the first frequency, to obtain a sorting result, and selects a frequency with an optimal signal as a target frequency based on the sorting result, further wherein the first signal parameter is at least one of a signal strength, a RSRQ and a SINR and the second signal parameter is at least one of a signal strength, a RSRQ and a SINR; and redirecting to a cell at the target frequency.