A decoding method, comprising: extracting first information in a bitstream; determining a chroma component intra prediction mode according to the first information; when the chroma component intra prediction mode cannot be determined according to the first information, extracting second information in the bitstream; and determining the chroma component intra prediction mode according to the second information, wherein the first information comprises information for indicating whether the chroma component intra prediction mode is a DM mode or an LM mode, wherein the DM mode is used to perform prediction by using an intra prediction mode of a luma component of a current block as a prediction mode of a chroma component, and the LM mode is used to calculate a predicted value of a chroma component by using a value of a luma component of a sampling point based on a linear model, where a parameter of the linear model is obtained by calculation based on a luma component value and a chroma component value of a sampling point adjacent to a current block; and the second information is used to indicate a remaining mode of the chroma component intra prediction mode, wherein the remaining mode is one of available chroma component intra prediction modes other than a mode that may be determined according to the first information, and the remaining mode is one of a vertical mode, a horizontal mode, a DC mode and a planar mode; when the first information is carried by a truncated unary, TU, code, and the second information is carried by a fixed-length FL code, the extracting the second information in the bitstream and determining the chroma component intra prediction mode comprises: extracting an FL code in the bitstream, determining a remaining mode by using the FL code, and using the remaining mode as the chroma component intra prediction mode; and wherein the method further comprises: when the determined chroma component intra prediction mode is neither the DM mode nor the LM mode, determining whether a luma component intra prediction mode is the same as the determined chroma component intra prediction mode; and when the luma component intra prediction mode is the same as the determined chroma component intra prediction mode, using a replacement mode to replace the determined chroma component intra prediction mode, wherein the replacement mode is one of modes that are different from modes in a chroma component intra prediction mode set containing the vertical mode, the horizontal mode, the DC mode and the planar mode; or when the luma component intra prediction mode is different from the determined chroma component intra prediction mode, keeping the determined chroma component intra prediction mode unchanged. extracting first information in a bitstream; determining a chroma component intra prediction mode according to the first information; when the chroma component intra prediction mode cannot be determined according to the first information, extracting second information in the bitstream; and determining the chroma component intra prediction mode according to the second information, wherein extracting an FL code in the bitstream, determining a remaining mode by using the FL code, and using the remaining mode as the chroma component intra prediction mode; and wherein the method further comprises: when the determined chroma component intra prediction mode is neither the DM mode nor the LM mode, determining whether a luma component intra prediction mode is the same as the determined chroma component intra prediction mode; and when the luma component intra prediction mode is the same as the determined chroma component intra prediction mode, using a replacement mode to replace the determined chroma component intra prediction mode, wherein the replacement mode is one of modes that are different from modes in a chroma component intra prediction mode set containing the vertical mode, the horizontal mode, the DC mode and the planar mode; or when the determined chroma component intra prediction mode is neither the DM mode nor the LM mode, determining whether a luma component intra prediction mode is the same as the determined chroma component intra prediction mode; and when the luma component intra prediction mode is the same as the determined chroma component intra prediction mode, using a replacement mode to replace the determined chroma component intra prediction mode, wherein the replacement mode is one of modes that are different from modes in a chroma component intra prediction mode set containing the vertical mode, the horizontal mode, the DC mode and the planar mode; or