A method for wireless communication, comprising: entering, by a terminal device, a second state from a first state; when the terminal device stores first measurement configuration information used by the terminal device in the first state, releasing, reserving or updating, by the terminal device, the first measurement configuration information; and when the terminal device does not store the first measurement configuration information, obtaining, by the terminal device, second measurement configuration information used by the terminal device in the second state, wherein the first state is an inactive state, the second state is an idle state, and the measurement configuration information is used by the terminal device to obtain a measurement result, wherein entering, by the terminal device, the second state from the first state comprises: triggering the terminal device to enter the idle state through any of the following events: a timer is started when an RRC connection resume request message is sent to the network device, and the timer expires; verification of integrity protection of a message 4, MSG4, fails; or a state of camping on any cell is entered, and when the first measurement configuration information belongs to a dedicated RRC signaling, reserving, by the terminal device, the first measurement configuration information, so that the first measurement configuration information is used by the terminal device in the second state, wherein releasing, reserving or updating, by the terminal device, the first measurement configuration information comprises: when the first measurement configuration information belongs to the dedicated RRC signaling, reserving, by the terminal device, the first measurement configuration information until a timer of the first measurement configuration information stops or expires, and after the timer of the first measurement configuration information stops or expires, releasing or updating, by the terminal device, the first measurement configuration information. entering, by a terminal device, a second state from a first state; when the terminal device stores first measurement configuration information used by the terminal device in the first state, releasing, reserving or updating, by the terminal device, the first measurement configuration information; and when the terminal device does not store the first measurement configuration information, obtaining, by the terminal device, second measurement configuration information used by the terminal device in the second state, wherein the first state is an inactive state, the second state is an idle state, and the measurement configuration information is used by the terminal device to obtain a measurement result, wherein entering, by the terminal device, the second state from the first state comprises: triggering the terminal device to enter the idle state through any of the following events: a timer is started when an RRC connection resume request message is sent to the network device, and the timer expires; verification of integrity protection of a message 4, MSG4, fails; or a state of camping on any cell is entered, and when the first measurement configuration information belongs to a dedicated RRC signaling, reserving, by the terminal device, the first measurement configuration information, so that the first measurement configuration information is used by the terminal device in the second state, wherein releasing, reserving or updating, by the terminal device, the first measurement configuration information comprises: when the first measurement configuration information belongs to the dedicated RRC signaling, reserving, by the terminal device, the first measurement configuration information until a timer of the first measurement configuration information stops or expires, and after the timer of the first measurement configuration information stops or expires, releasing or updating, by the terminal device, the first measurement configuration information. triggering the terminal device to enter the idle state through any of the following events: a timer is started when an RRC connection resume request message is sent to the network device, and the timer expires; verification of integrity protection of a message 4, MSG4, fails; or a state of camping on any cell is entered, and when the first measurement configuration information belongs to a dedicated RRC signaling, reserving, by the terminal device, the first measurement configuration information, so that the first measurement configuration information is used by the terminal device in the second state, wherein releasing, reserving or updating, by the terminal device, the first measurement configuration information comprises: when the first measurement configuration information belongs to the dedicated RRC signaling, reserving, by the terminal device, the first measurement configuration information until a timer of the first measurement configuration information stops or expires, and after the timer of the first measurement configuration information stops or expires, releasing or updating, by the terminal device, the first measurement configuration information.