According to the sixth aspect, the data management network element verifies whether the first message authentication code is the same as the second message authentication code to determine whether the first location privacy setting data is tampered with, to effectively prevent location privacy setting data from being tampered with, thereby ensuring end-to-end integrity protection of the location privacy setting data between the user terminal and the data management network element.
With reference to the sixth aspect, in a possible implementation, the data management network element may independently calculate the second message authentication code of the first location privacy setting data, for example, calculate the second message authentication code of the first location privacy setting data based on a first freshness parameter or a first random value. Alternatively, the data management network element may obtain the second message authentication code of the first location privacy setting data from an authentication service network element. For example, the data management network element notifies the authentication service network element of a first freshness parameter, and then the authentication service network element calculates the second message authentication code of the first location privacy setting data based on the first freshness parameter, and notifies the data management network element of the second message authentication code.