A state transition method, which is applied in a state machine of a compressor, wherein the compression is for header compression in wireless communication according to the Robust Header Compression, ROHC, protocol, comprising: when it is determined that the state machine of the compressor is in an Initialization and Refresh IR state, sending a service stream identifying a Context Identity, Context ID, to a decompressor corresponding to the compressor; transiting a state of the state machine of the compressor from the IR state to a First Order FO state when the decompressor can only successfully parse a static field of the service stream packet header; and transiting a state of the state machine of the compressor from the IR state to a Second Order SO state when the decompressor can successfully parse the static field and a dynamic field of the service stream packet header; when it is determined that the state machine of the compressor is in the FO state, sending other selected service stream having the same Context ID as the service stream and carrying the dynamic field of the service stream packet header to the decompressor, wherein the static field of the service stream packet header having a same Context ID is identical; transiting a state of the state machine of the compressor from the FO state to the SO state when the decompressor can successfully parse the dynamic field of the service stream packet header; and when it is determined that the state machine of the compressor is in the SO state, sending other selected service stream having the same Context ID as the service stream and carrying the dynamic field of the service stream packet header to the decompressor; transiting a state of the state machine of the compressor from the SO state to the FO state when the decompressor fails to parse the dynamic field of the service stream packet header within a preset time threshold. when it is determined that the state machine of the compressor is in an Initialization and Refresh IR state, sending a service stream identifying a Context Identity, Context ID, to a decompressor corresponding to the compressor; transiting a state of the state machine of the compressor from the IR state to a First Order FO state when the decompressor can only successfully parse a static field of the service stream packet header; and transiting a state of the state machine of the compressor from the IR state to a Second Order SO state when the decompressor can successfully parse the static field and a dynamic field of the service stream packet header; when it is determined that the state machine of the compressor is in the FO state, sending other selected service stream having the same Context ID as the service stream and carrying the dynamic field of the service stream packet header to the decompressor, wherein the static field of the service stream packet header having a same Context ID is identical; transiting a state of the state machine of the compressor from the FO state to the SO state when the decompressor can successfully parse the dynamic field of the service stream packet header; and when it is determined that the state machine of the compressor is in the SO state, sending other selected service stream having the same Context ID as the service stream and carrying the dynamic field of the service stream packet header to the decompressor; transiting a state of the state machine of the compressor from the SO state to the FO state when the decompressor fails to parse the dynamic field of the service stream packet header within a preset time threshold.