In Embodiment 1 shown in FIG. 5C and FIG. 5D, the UE calculates the first message authentication code of the first location privacy setting data, the AUSF calculates the second message authentication code and the third message authentication code of the first location privacy setting data, and the AUSF determines whether the first message authentication code is the same as the second message authentication code, and sends the first location privacy setting data to the UDM when the first message authentication code is the same as the second message authentication code. When receiving the third message authentication code, the UE calculates the fourth message authentication code, and determines whether the third message authentication code is the same as the fourth message authentication code. Two authentication processes can effectively prevent the location privacy setting data from being tampered with, thereby ensuring end-to-end integrity protection of the location privacy setting data between the UE and the UDM.