Method, device, terminal and storage medium for movement prediction

By combining data perturbation and model perturbation privacy protection mechanisms in mobile prediction models, the problem of user privacy data leakage in mobile prediction models is solved, achieving more efficient privacy protection and preventing the leakage of sensitive location information.

CN116828450BActive Publication Date: 2026-06-19TSINGHUA UNIVERSITY +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2022-03-22
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing mobile prediction methods pose a risk of leaking user privacy data, especially federated learning-based methods, which have a higher risk of successful privacy-threatening attacks.

Method used

A privacy protection mechanism combining data perturbation and model perturbation is adopted. By adding noise to the training samples and local model gradients, ε-geographic indistinguishability and (ε,δ)-differential privacy are achieved, thereby enhancing privacy protection.

Benefits of technology

In mobile prediction scenarios, it effectively prevents the leakage of sensitive location information, improves the protection level of user privacy data, and reduces the success rate of privacy attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116828450B_ABST
    Figure CN116828450B_ABST
Patent Text Reader

Abstract

This invention provides a mobility prediction method, apparatus, terminal, and storage medium, relating to the field of data processing technology. The method includes acquiring multiple first training samples, generated based on locally stored historical mobility data of the user; training a first mobility prediction model using second training samples to obtain a second mobility prediction model; the second training samples are training samples of the first training samples after noise scrambling; the first mobility prediction model is generated by a server based on local model gradients from multiple terminals after noise scrambling, with the server and multiple terminals being participants in federated learning; acquiring first mobility data prior to the target time to be predicted; and inputting the first mobility data into the second mobility prediction model to obtain the predicted target mobility data. This invention, in mobility prediction scenarios, can further enhance the protection of user privacy data and prevent the leakage of sensitive location information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, terminal and storage medium for predicting mobility. Background Technology

[0002] Mobility prediction, which accurately forecasts users' future movements, is crucial for many different applications in mobile communication networks, such as network optimization and device optimization. However, training an accurate mobility prediction model requires a large amount of user movement data, which contains sensitive information about users, including where they have been and who they have met. Therefore, protecting user privacy when applying mobility prediction models in practice is a very important issue.

[0003] Existing mobile prediction solutions mainly fall into two categories. The first category, mobile prediction methods without privacy protection, provides no privacy protection mechanisms whatsoever, making user privacy highly vulnerable to leakage and posing a significant privacy integrity problem. The second category, prediction methods based on federated learning, simply uses federated learning to protect privacy within the mobile prediction model, but the model still faces the risk of successful privacy-threatening attacks. Summary of the Invention

[0004] The purpose of this invention is to provide a mobile prediction method, device, terminal, and storage medium to solve the problem of the risk of leakage of user privacy data in existing mobile prediction methods.

[0005] To achieve the above objectives, the present invention provides a motion prediction method, the method comprising:

[0006] Acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally;

[0007] The first mobile prediction model is trained based on the second training sample to obtain the second mobile prediction model; wherein, the second training sample is the first training sample after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradient from multiple terminals after noise scrambling, and the server and the multiple terminals are the participants in federated learning.

[0008] Obtain the first movement data before the target time to be predicted;

[0009] The first mobile data is input into the second mobile prediction model to obtain the predicted target mobile data, which is the mobile data of the user at the target time.

[0010] The step of training the first motion prediction model based on the second training samples to obtain the second motion prediction model includes:

[0011] Obtain the first noise and the second noise;

[0012] Based on the first training sample and the first noise, obtain the first motion prediction model;

[0013] Based on the first training sample and the second noise, obtain the second training sample;

[0014] The first moving prediction model is trained using the second training samples to obtain the second moving prediction model.

[0015] The acquisition of the first noise and the second noise includes:

[0016] Based on a first preset parameter value, a target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirement, and the target noise is either the first noise or the second noise;

[0017] If the target noise is the first noise, then the second noise is determined based on the first noise, wherein the first noise is greater than the second noise;

[0018] If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

[0019] The acquisition of the first noise and the second noise includes:

[0020] Obtain the candidate noise set;

[0021] Select a first candidate noise for data scrambling and a second candidate noise for model scrambling from the candidate noise set;

[0022] The first candidate noise is used as the first noise, and the second candidate noise is used as the second noise, wherein the first noise and the second noise cause the prediction performance parameters of the trained second motion prediction model to meet preset conditions.

[0023] The step of obtaining the first motion prediction model based on the first training samples and the first noise includes:

[0024] The first training sample is input into the initial mobility prediction model to obtain a first prediction result, which is used to characterize the user's future mobility.

[0025] Based on the first prediction result, the local model gradient is calculated;

[0026] The first noise is superimposed on the local model gradient to obtain the scrambled local model gradient.

[0027] The first mobile prediction model is obtained based on the scrambled local model gradient.

[0028] Wherein, the step of superimposing the first noise onto the local model gradient to obtain the scrambled local model gradient includes:

[0029] The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient.

[0030] The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

[0031] Wherein, obtaining the first motion prediction model based on the scrambled local model gradient includes:

[0032] The scrambled local model gradient is sent to the server, so that the server can generate the first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals.

[0033] Receive the first mobility prediction model returned by the server.

[0034] The step of training the first motion prediction model based on the second training samples to obtain the second motion prediction model includes:

[0035] The second training sample is input into the first mobility prediction model to obtain a second prediction result, which is used to characterize the user's future mobility.

[0036] The local model gradient is updated based on the second prediction result to obtain the updated local model gradient.

[0037] A third mobile prediction model is obtained based on the updated local model gradient, which is generated by the server based on the updated local model gradient from the multiple terminals.

[0038] The third mobile prediction model is updated to the first mobile prediction model, and the first mobile prediction model is trained using the second training samples used for the next round of model training to obtain the second mobile prediction model.

[0039] The present invention also provides a motion prediction device, comprising:

[0040] The first acquisition module is used to acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally.

[0041] The model training module is used to train the first mobile prediction model based on the second training samples to obtain the second mobile prediction model; wherein, the second training samples are the first training samples after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradients from multiple terminals after noise scrambling, and the server and the multiple terminals are the participants in federated learning.

[0042] The second acquisition module is used to acquire the first movement data before the target time to be predicted;

[0043] The mobility prediction module is used to input the first mobility data into the second mobility prediction model to obtain the predicted target mobility data, wherein the target mobility data is the mobility data of the user at the target time.

[0044] The present invention also provides a terminal, including a processor and a transceiver, wherein the transceiver receives and transmits data under the control of the processor, and the processor is configured to perform the following processes:

[0045] Acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally;

[0046] The first mobile prediction model is trained based on the second training sample to obtain the second mobile prediction model; wherein, the second training sample is the first training sample after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradient from multiple terminals after noise scrambling, and the server and the multiple terminals are the participants in federated learning.

[0047] Obtain the first movement data before the target time to be predicted;

[0048] The first mobile data is input into the second mobile prediction model to obtain the predicted target mobile data, which is the mobile data of the user at the target time.

[0049] The processor is further configured to:

[0050] Obtain the first noise and the second noise;

[0051] Based on the first training sample and the first noise, obtain the first motion prediction model;

[0052] Based on the first training sample and the second noise, obtain the second training sample;

[0053] The first moving prediction model is trained using the second training samples to obtain the second moving prediction model.

[0054] The processor is further configured to:

[0055] Based on a first preset parameter value, a target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirement, and the target noise is either the first noise or the second noise;

[0056] If the target noise is the first noise, then the second noise is determined based on the first noise, wherein the first noise is greater than the second noise;

[0057] If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

[0058] The processor is further configured to:

[0059] Obtain the candidate noise set;

[0060] Select a first candidate noise for data scrambling and a second candidate noise for model scrambling from the candidate noise set;

[0061] The first candidate noise is used as the first noise, and the second candidate noise is used as the second noise, wherein the first noise and the second noise cause the prediction performance parameters of the trained second motion prediction model to meet preset conditions.

[0062] The processor is further configured to:

[0063] The first training sample is input into the initial mobility prediction model to obtain a first prediction result, which is used to characterize the user's future mobility.

[0064] Based on the first prediction result, the local model gradient is calculated;

[0065] The first noise is superimposed on the local model gradient to obtain the scrambled local model gradient.

[0066] The first mobile prediction model is obtained based on the scrambled local model gradient.

[0067] The processor is further configured to:

[0068] The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient.

[0069] The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

[0070] The transceiver is also used for:

[0071] The scrambled local model gradient is sent to the server, so that the server can generate the first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals.

[0072] Receive the first mobility prediction model returned by the server.

[0073] The processor is further configured to:

[0074] The second training sample is input into the first mobility prediction model to obtain a second prediction result, which is used to characterize the user's future mobility.

[0075] The local model gradient is updated based on the second prediction result to obtain the updated local model gradient.

[0076] A third mobile prediction model is obtained based on the updated local model gradient, which is generated by the server based on the updated local model gradient from the multiple terminals.

[0077] The third mobile prediction model is updated to the first mobile prediction model, and the first mobile prediction model is trained using the second training samples used for the next round of model training to obtain the second mobile prediction model.

[0078] The present invention also provides a terminal, including a memory, a processor, and a program stored in the memory and executable on the processor; when the processor executes the program, it implements the motion prediction method as described above.

[0079] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the motion prediction method as described above.

[0080] The above-described technical solution of the present invention has at least the following beneficial effects:

[0081] In this embodiment of the invention, multiple first training samples are acquired, which are generated based on locally stored historical mobile data of the user. Then, a first mobile prediction model is trained based on second training samples to obtain a second mobile prediction model. The second training samples are training samples of the first training samples after noise scrambling. The first mobile prediction model is generated by the server based on local model gradients from multiple terminals after noise scrambling. The server and multiple terminals are participants in federated learning. Finally, in the application, first mobile data before the target time to be predicted is acquired. The first mobile data is input into the second mobile prediction model to obtain the predicted target mobile data, which is the mobile data of the user at the target time. Since the second mobile prediction model is a mobile prediction model trained by combining data perturbation (second training samples) and model perturbation (local model gradient scrambling), it can further strengthen the protection of user privacy data and prevent the leakage of sensitive location information in mobile prediction scenarios. Attached Figure Description

[0082] Figure 1 A flowchart illustrating the motion prediction method according to an embodiment of the present invention;

[0083] Figure 2 A schematic diagram illustrating the network structure of a mobile prediction model;

[0084] Figure 3 A schematic diagram illustrating a recurrent neural network;

[0085] Figure 4 A schematic diagram illustrating the principles of the federated learning process;

[0086] Figure 5 A schematic diagram of the modules of the motion prediction device according to an embodiment of the present invention;

[0087] Figure 6 A schematic diagram illustrating the structure of a terminal according to an embodiment of the present invention. Detailed Implementation

[0088] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0089] This invention addresses the risk of leakage of user privacy data in existing mobile prediction methods by providing a mobile prediction method, device, terminal, and storage medium.

[0090] The design principle of the motion prediction method in this embodiment of the invention is briefly explained below.

[0091] First, a basic mobile prediction neural network with a three-layer structure, consisting of a location embedding layer, a sequence modeling layer, and a location prediction layer, is constructed. Based on this, a federated averaging algorithm is applied to federate the framework. Finally, a privacy protection mechanism is added to the federated learning-based mobile prediction model.

[0092] like Figure 1 The diagram shown is a flowchart illustrating the mobility prediction method provided in an embodiment of the present invention. This method is applied to a terminal, which is a participant in federated learning.

[0093] To facilitate understanding, the following explanation is necessary before detailing the implementation process of this motion prediction method: Figure 2 As shown, the network structures of the mobility prediction models (initial mobility prediction model, first mobility prediction model, second mobility prediction model, and third mobility prediction model) involved in the embodiments of the present invention are the same, including a location embedding layer, a sequence modeling layer, and a location prediction layer, wherein:

[0094] (1) Location embedding layer:

[0095] Since the positions in the original movement trajectory data are represented by discrete symbols, neural networks cannot process them. To solve this problem, it is necessary to encode the symbols describing different positions into numerical vectors. Therefore, a position embedding layer is introduced.

[0096] The encoding strategies for encoding symbols describing different positions can include the following two:

[0097] One approach is direct encoding, namely one-hot vector embedding.

[0098] Specifically, |L| positions are mapped to a vector of size |L|, which contains |L|-1 zero elements and one 1 element corresponding to the visited position.

[0099] However, this sparse coding strategy treats each position as an independent unit without modeling the relationships between them.

[0100] Another encoding strategy can model the relationships between positions, as follows:

[0101] By mapping locations to vectors belonging to the same low-dimensional feature space, the relationship between location and future movement is captured. In other words, locations that have a similar impact on the user's future movement will be mapped to similar vectors.

[0102] Furthermore, the extraction of temporal information from the movement records should also be considered. Therefore, for each movement record, it is represented by a one-hot embedding vector corresponding to the location and time unit as l. i and t iThe output of the embedding layer at this location can be expressed by the following equation (1):

[0103] s i =f([W L l i W T t i (1)

[0104] Where f(·) is a nonlinear activation function, W L W is the embedding matrix of the position. T This is the embedding matrix for time.

[0105] (2) Sequence modeling layer:

[0106] The location embedding layer primarily focuses on capturing features of individual historical movement records. Building upon this, this layer further utilizes the sequence information of historical movement records from a trajectory-level perspective.

[0107] Specifically, using Figure 3 The RNN (Recurrent Neural Network) shown is used to capture trajectory-level features. Optionally, the RNN is a GRU (Gated Recurrent Unit).

[0108] In recurrent neural networks, the hidden vector h is used i To characterize the movement record (l i ,t i The sequence information is calculated in a cyclic manner.

[0109] That is, h i It is based on h i-1 and current movement records s i The eigenvectors are calculated, and the process can be expressed by the following equation (2):

[0110] h i =g(h i-1 ,s i (2)

[0111] Here, g(·) is the kernel function that describes the recursive process of the RNN.

[0112] By recursively implementing the above formula (2), the sequence information of the entire historical movement trajectory can be extracted.

[0113] (3) Location prediction layer:

[0114] Based on the trajectory-level sequence features of historical movement trajectories, this layer is further utilized to predict the user's future movement.

[0115] Specifically, this layer takes the sequence information of the entire movement trajectory h as input and maps it to a vector y of size |L|. i , where the l-th element in the vector represents the estimated probability of visiting position l in the next move. This process can be represented by the following formula (3):

[0116] y i =softmax(W P h) (3)

[0117] Where softmax(·) is the normalization exponential function, W P It is the projection matrix of this layer.

[0118] Reference Figure 1 The mobility prediction method of this invention may include:

[0119] Step 101: Obtain multiple first training samples, which are generated based on the user's historical mobile data stored locally.

[0120] Here, the terminal locally stores the user's historical movement data. This historical movement data can be understood as the user's movement trajectory within a historical time period. Specifically, historical movement data includes historical time information and the user's historical location information corresponding to that historical time information.

[0121] In one possible implementation, step 101 may include:

[0122] Step 1011: Obtain the user's historical movement data stored locally.

[0123] Specifically, users' historical movement data can be obtained from a local database.

[0124] Step 1012: Delete the data in the historical mobile data that meets the preset cleanup conditions.

[0125] Data that meets the preset cleaning conditions includes: data features not needed for the training task, null values, missing values, and outliers in the data.

[0126] Here, outliers in the data refer to values ​​that may reduce data quality.

[0127] Step 1013: Use the remaining historical mobile data after data deletion as the first training sample to obtain multiple first training samples.

[0128] Here, multiple first training samples are used as the training dataset. The processing in step 1012 above further improves the speed of generating the first training data and simplifies the data cleaning task.

[0129] Step 102: Train the first mobile prediction model based on the second training samples to obtain the second mobile prediction model; wherein, the second training samples are the first training samples after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradients from multiple terminals after noise scrambling, and the server and multiple terminals are the participants in federated learning.

[0130] It should be understood that the first mobile prediction model is a federated learning-based mobile prediction model. In other words, the model is trained using a federated learning approach. Specifically, as... Figure 4 As shown, this model is trained based on cooperation between the terminal and the server. The terminal is responsible for training the model on its own historical mobile data (local privacy data), while the server is responsible for coordinating the different terminals.

[0131] To facilitate understanding of the design concept of this invention, the following is combined with... Figure 4 Briefly describe the traditional federated learning process.

[0132] First, each terminal trains its mobile prediction model locally based on the training dataset (its own mobile data). The loss function chosen is cross-entropy. Specifically, the loss function of the mobile prediction model trained by terminal u can be expressed by the following equation (4):

[0133]

[0134] Where <·,·> represent the dot product between two vectors. For the local model of terminal u, i.e., the local mobility prediction model, D u l represents the training dataset for terminal u. i t represents the one-hot embedding vector corresponding to the position unit. i y represents the one-hot embedding vector corresponding to a time unit. i This represents the output of the local model of terminal u.

[0135] Subsequently, each terminal calculates its local model gradient based on the loss function using the gradient descent algorithm (optionally, the stochastic gradient descent (SGD) algorithm), and updates its local mobility prediction model based on the local model gradient for multiple iterations.

[0136] Among them, the gradient of the local model calculated by the terminal u based on the loss function and using the gradient descent algorithm can be expressed by the following equation (5):

[0137]

[0138] in, λ represents the local model gradient corresponding to terminal u, and λ is the learning rate.

[0139] Then, each terminal sends its local model gradient to the server. The server aggregates the local model gradients from different terminals to obtain the global model. The specific aggregation process of the server can be represented by the following equation (6):

[0140]

[0141] in, This is the terminal dataset.

[0142] The server then sends the obtained global model to each terminal participating in federated learning. Upon receiving the global model, each terminal replaces its local mobile prediction model with the global model, then continues with local updates, repeating the above steps. After a certain number of rounds of communication between the terminals and the server, a trained mobile prediction model is obtained.

[0143] It should be noted that in the above formulas (4), (5) and (6), t represents the number of communications between the terminal and the server.

[0144] As described above, in the federated learning-based mobile prediction model, each user's historical movement data (private trajectory data) is stored on their own terminal and is not uploaded to the server or sent to other terminals, in order to protect user privacy. However, even though only the model parameters, i.e., the local model gradients, are uploaded from the terminal, there is still a high risk of privacy leakage.

[0145] Specifically, any server, or any third party with access to the communication between the server and the client, could be an attacker. After obtaining the local model gradients uploaded by the terminal, an attacker attempts to infer the user's private information from them. The risk of privacy breaches should be considered and assessed during this process.

[0146] Assuming an attacker can obtain the transmission model between the server and the target terminal, the attacker can compare the parameters of the global model received by the terminal with its locally updated and uploaded models to infer the terminal user's sensitive information. Based on the above, this invention relates to the following two different attack categories.

[0147] I. Location Inference Attack

[0148] The purpose of a location inference attack is to infer whether a user has visited a specific location by comparing parameters of the received global model with those of the corresponding terminal's local model. The specific implementation method is as follows:

[0149] By comparing the parameters of the position embedding layer, i.e., the global model received by the terminal. The parameters are used to infer the user's access location. Specifically, W LFor each column representing a different location, its Euclidean distance to the model parameters is calculated and compared. For any location l, if the Euclidean distance of its corresponding column vector is greater than a pre-set threshold, it is inferred that user u has visited location l in their historical movement trajectory.

[0150] II. Transfer Pattern Inference Attack

[0151] The purpose of a transition pattern inference attack is to infer whether a user exhibits a certain transition pattern, i.e., moving from a target starting region to a target destination region, by comparing the parameters of the received global model with the locally updated model on the corresponding terminal. The core idea of ​​this transition pattern inference attack method is to recover the user's transition matrix. This is achieved by randomly initializing the hidden state vector h. i-1 Begin by calculating the embedding vector s for each position l. i And input it into the sequence modeling layer and the location prediction layer to obtain y i That is, the estimated transition probability from position l to other positions can be constructed by enumerating positions l∈L to construct the inferred transition matrix. Finally, the attacker compared... and The transition matrix T between positions is such that, for any pair of positions (l1, l2), if the distance between T(l1, l2) is greater than a pre-set threshold, it is inferred that user u has a transition pattern (l1, l2) in its historical movement trajectory.

[0152] Therefore, in order to eliminate the risk of privacy leakage in the above attack model, a privacy protection mechanism needs to be added to the federated learning-based mobile prediction model.

[0153] The privacy protection mechanisms include data perturbation mechanisms and model perturbation mechanisms.

[0154] 1) Data perturbation mechanism

[0155] To protect user privacy during federated learning, perturbations are added to the dataset for each terminal before local updates are performed using the training dataset.

[0156] Optionally, the data perturbation mechanism is a Laplace perturbation mechanism. Its main purpose is to achieve the ε-geographical indistinguishability criterion as defined below.

[0157] Among them, ε-geographical indistinguishability: a stochastic mechanism The ε-geographical indistinguishability is satisfied if and only if for any location and subsets have Where d(l1,l2) is the predefined distance between positions l1 and l2, and ε is an indicator used to measure the noise level, which is an adjustable constant.

[0158] Let d(l1,l2) be defined as the Euclidean distance between locations l1 and l2, thus following the common setting of geographic indistinguishability, and further using the Laplace perturbation mechanism to achieve ε-geographic-indistinguishability. Specifically, for each original location l, after adding the Laplace perturbation (i.e., Laplace noise, noise conforming to the Laplace distribution), the distribution of the obtained location p can be represented by the following equation (7):

[0159]

[0160] However, this data perturbation mechanism can only defend against privacy attacks based on the location embedding layer, while the risk of privacy leakage still exists in the sequence modeling layer.

[0161] 2) Model perturbation mechanism

[0162] To protect user privacy during federated learning, noise is added to the model parameters uploaded by the terminal. The main purpose of the model perturbation mechanism is to achieve (ε,δ)-differential privacy as defined below.

[0163] Among them, (ε,δ)-differential privacy: stochastic mechanism (ε,δ)-differential privacy is satisfied if and only if for any neighboring datasets D1, D2 and subsets have Wherein, ε is an index used to measure the magnitude of noise, and is an adjustable constant.

[0164] To achieve (ε,δ)-differential privacy, this mechanism adds Gaussian noise (i.e., noise that conforms to a Gaussian distribution) to the model parameters uploaded by the terminal, i.e., the local model gradient, in order to achieve differential privacy.

[0165] It should be noted that, through comparative analysis of the two perturbation mechanisms, (ε,δ)-differential privacy is found to be more stringent than ε-geographical indistinguishability. For two geographically distant locations, ε-geographical indistinguishability only requires a loose boundary, while the requirements in (ε,δ)-differential privacy remain unchanged. Therefore, model perturbation mechanisms may cause greater harm to the performance of the trained model.

[0166] In summary, considering that data perturbation mechanisms cannot protect against privacy attacks based on sequence modeling layers, while model perturbation mechanisms significantly impair model performance, the method in this invention creatively combines the two perturbation mechanisms, overcoming the limitations of a single perturbation mechanism.

[0167] In this step, the second mobility prediction model is a mobility prediction model trained by combining data perturbation (second training samples) and model perturbation (local model gradient scrambling). In mobility prediction scenarios, it can further enhance the protection of user privacy data and prevent the leakage of sensitive location information. The specific implementation process of step 102 is detailed in a part of the embodiment.

[0168] Step 103: Obtain the first movement data before the target time to be predicted.

[0169] Step 104: Input the first mobility data into the second mobility prediction model to obtain the predicted target mobility data, which is the user's mobility data at the target time.

[0170] It should be noted that steps 103 and 104 correspond to the application of the second motion prediction model obtained from training in a real motion prediction scenario.

[0171] For example, if a user wants to predict a user's next move at a future target time, this can be achieved through steps 103 and 104.

[0172] Since the second mobility prediction model incorporates the aforementioned privacy protection mechanism, it can further enhance the protection of user privacy data. Therefore, in practical applications, using this second mobility prediction model for mobility prediction can obtain the prediction result, namely the target mobility data predicted in step 104, while protecting user privacy.

[0173] Example 1

[0174] In one possible implementation, method step 102 of this embodiment of the invention may include:

[0175] Step 1021: Obtain the first noise and the second noise.

[0176] Optionally, the first noise, which is Gaussian noise, is used for model scrambling. The second noise, which is Laplace noise, is used for data scrambling.

[0177] To accommodate different model performance requirements, the ratio between the first noise and the second noise is different.

[0178] In one possible implementation, step 1021 may include:

[0179] S1, based on the first preset parameter value, determine the target noise, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirements, and the target noise is the first noise or the second noise.

[0180] This implementation prioritizes privacy protection, where the metric for privacy protection is a success rate against privacy attacks that is not lower than a first threshold. Optionally, the first preset parameter value is the success rate against privacy attacks.

[0181] S2, if the target noise is the first noise, then determine the second noise based on the first noise, and the first noise is greater than the second noise.

[0182] This step corresponds to the model-dominant strategy, where the target noise is the primary noise, indicating that model perturbation is dominant. The magnitude of the model perturbation is adjusted according to privacy protection requirements. In other words, the magnitude of the primary noise is determined based on a first preset parameter value. Different first preset parameter values ​​result in different magnitudes of the primary noise.

[0183] Alternatively, 0.1≤ε model ≤20, where ε model This is a parameter used to characterize the magnitude of the first noise. The larger the value, the smaller the first noise; the smaller the value, the larger the first noise.

[0184] When the target noise is the first noise, since model perturbation is dominant, the magnitude of the second noise is referenced to the magnitude of the first noise, meaning the first noise is greater than the second noise. Optionally, ε data =10, where ε data This is a parameter used to characterize the magnitude of the second noise.

[0185] S3, if the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

[0186] This step corresponds to a data-driven strategy, where the target noise is the second type of noise, indicating that data perturbation is dominant. The magnitude of this perturbation is adjusted according to privacy protection requirements. In other words, the magnitude of the second noise is determined based on a first preset parameter value. Different first preset parameter values ​​result in different magnitudes of the second noise.

[0187] Alternatively, 0.1≤ε data ≤20, the larger the value, the smaller the second noise; the smaller the value, the larger the second noise.

[0188] When the target noise is the second noise, since data perturbation is dominant, the magnitude of the first noise is referenced to the magnitude of the second noise, meaning the second noise is greater than the first noise. Optionally, ε model =10.

[0189] It should be noted that the above implementation methods actually include two noise matching strategies: a model-driven strategy and a data-driven strategy.

[0190] In another possible implementation, step 1021 may include:

[0191] S11, obtain the candidate noise set.

[0192] The candidate noise set includes multiple first candidate noises for data scrambling and multiple second candidate noises for model scrambling.

[0193] S12, select the first candidate noise for data scrambling and the second candidate noise for model scrambling from the candidate noise set.

[0194] S13, the first candidate noise is used as the first noise and the second candidate noise is used as the second noise, wherein the first noise and the second noise make the prediction performance parameters of the trained second moving prediction model meet the preset conditions.

[0195] This implementation prioritizes model performance, where the model's prediction performance parameters can meet the preset condition that the model's prediction accuracy is greater than or equal to a second threshold.

[0196] The implementation method involves randomly selecting a first candidate noise and a second candidate noise from the candidate noise set. During model training, the first candidate noise is superimposed on the training samples, and the second candidate noise is superimposed on the model gradient, so that the prediction performance parameters of the trained second motion prediction model meet the preset conditions.

[0197] The specific implementation of step 1021 essentially includes three noise matching strategies: a model-driven strategy, a data-driven strategy, and a greedy strategy. These three strategies can better balance prediction performance and attack risk, enabling them to effectively defend against access location inference attacks and prevent the leakage of sensitive location information while sacrificing some performance.

[0198] Step 1022: Obtain the first motion prediction model based on the first training sample and the first noise.

[0199] This step corresponds to model perturbation. In one possible implementation, step 1022 may include:

[0200] S111, the first training sample is input into the initial mobility prediction model to obtain the first prediction result, which is used to characterize the user's future mobility.

[0201] Here, the initial mobility prediction model includes a location embedding layer, a sequence modeling layer, and a location prediction layer. The network parameters of the initial mobility prediction model are the initialization parameters.

[0202] In this step, the first training sample is input into the initial mobility prediction model, and processed by each layer of the location embedding layer, sequence modeling layer and location prediction layer (the specific processing can be referred to the network structure section of the mobility prediction model described above, which will not be repeated here), to obtain the first prediction result, which is the estimated probability of the user visiting the location in the next move.

[0203] S112, the local model gradient is calculated based on the first prediction result.

[0204] This step may specifically include: calculating the loss function based on the first prediction result; and calculating the local model gradient based on the loss function.

[0205] It should be noted that the loss function, calculated based on the first prediction result, can be obtained using formula (4) above. The local model gradient, calculated based on the loss function, can be obtained using formula (5) above. At this point, in formula (4)... For the initial motion prediction model, D u This represents multiple first training samples.

[0206] S113, the first noise is superimposed on the local model gradient to obtain the scrambled local model gradient.

[0207] It should be noted that this implementation corresponds to model perturbation. The main purpose of the model perturbation mechanism is to achieve (ε,δ)-differential privacy. Therefore, a first noise (Gaussian noise) is added to the local model gradient. To achieve differential privacy, in one possible implementation, step S113 may include:

[0208] i) The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient.

[0209] Here, the gradient of the clipped local model is obtained using the following formula (8):

[0210]

[0211] Where C is the preset shearing threshold, and ||·||2 is the Euclidean norm.

[0212] ii) The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

[0213] Here, the scrambled local model gradient is obtained by the following formula (9).

[0214]

[0215] Where, σ 2 C 2The variance of the first noise added.

[0216] It should be noted that the relationship between C, σ, and ε can be obtained using the method of moments accounting.

[0217] To improve model performance, the initial motion prediction model is divided into a risk component and a normal component. The risk component is a location embedding layer, and the normal component includes a sequence modeling layer and a location prediction layer. A first noise is superimposed on the gradient corresponding to the normal component. Optionally, the first noise is superimposed on the gradient corresponding to the sequence modeling layer.

[0218] S114, Based on the scrambled local model gradient, obtain the first moving prediction model.

[0219] This invention trains the model using federated learning, thus requiring the participation of a server and multiple terminals. In one possible implementation, step S114 may include:

[0220] I) The scrambled local model gradients are sent to the server so that the server can generate a first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals.

[0221] It should be noted that after each terminal executing the method of the present invention obtains the scrambled local model gradient through local model training, it must upload its respective scrambled local model gradient to the server.

[0222] The server aggregates the scrambled local model gradients uploaded from multiple terminals to obtain the first mobile prediction model, which is the global model.

[0223] II) Receive the first mobile prediction model returned by the server.

[0224] Step 1023: Obtain the second training sample based on the first training sample and the second noise.

[0225] This step corresponds to data perturbation. Specifically, the second noise is superimposed on the first training sample to obtain the second training sample.

[0226] Step 1024: Train the first moving prediction model based on the second training samples to obtain the second moving prediction model.

[0227] In one possible implementation, step 102 or step 1024 may include:

[0228] a1: Input the second training sample into the first mobile prediction model to obtain the second prediction result, which is used to characterize the user's future movement.

[0229] Here, the noise-scrambled data, i.e. the second training sample, is input into the first motion prediction model. After processing through the location embedding layer, sequence modeling layer and location prediction layer, the second prediction result is obtained.

[0230] a2: Update the local model gradient based on the second prediction result to obtain the updated local model gradient.

[0231] Specifically, this step involves calculating a new loss function based on the second prediction result; then, based on the new loss function, calculating a new local model gradient. Afterward, the new local model gradient replaces the previous local model gradient (the local model gradient after the first noise scrambling), and the first noise is superimposed on the new local model gradient to obtain the updated local model gradient.

[0232] a3: Obtain the third moving prediction model based on the updated local model gradients. The third moving prediction model is generated by the server based on the updated local model gradients from multiple terminals.

[0233] In this step, the updated local model gradients are sent to the server so that the server can aggregate the updated local model gradients from multiple terminals to generate a third mobile prediction model.

[0234] a4: Update the third moving prediction model to the first moving prediction model, and train the first moving prediction model using the second training samples used for the next round of model training to obtain the second moving prediction model.

[0235] Here, the training process of training the first mobile prediction model using the second training samples for the next round of model training is to repeat steps a1 to a4 until the loss value of the loss function is reduced to a preset value or reduced to the minimum, or until the training rounds reach a preset number, thus obtaining the second mobile prediction model.

[0236] The training process of the mobile prediction model in an embodiment of the present invention will be specifically illustrated below with an example.

[0237] A user wants to use a user's historical trajectory data from July to October 2021 to predict the user's next move in November 2021. The user is a taxi driver.

[0238] First, construct the training dataset.

[0239] When predicting user movement in November 2021, trajectory data from November and later should be avoided. Therefore, the training dataset should be constructed using trajectory data before November 1 (excluding November 1).

[0240] After obtaining the user's trajectory data prior to November 1st, data cleaning can be performed to improve the speed of data processing and simplify the data cleaning task. Specifically, this includes deleting certain data features that are not helpful to the task, finding and deleting null or missing values, deleting invalid values, and removing outliers that may degrade data quality. The remaining historical trajectory data is then used as samples to form the training dataset.

[0241] The data characteristics after data processing are shown in Table 1 below:

[0242] Table 1

[0243] feature illustrate Range of values medallion Unique taxi ID number - pickup_weekday Taxi meter activation - Day of the week [1,7] pickup_hour Taxi meter start-hour [0,23] pickup_day Tax meter activation - date [1,31] pickup_month Taxi meter activation - month [1,12] pickup_location_id Meter activation - Taxi area [0,262] dropoff_weekday Taxi meter stopped - which day of the week? [1,7] dropoff_hour Taxi meter stopped - hour [0,23] dropoff_day Taxi meter stopped - date [1,31] dropoff_month Taxi meter stopped - month [1,12] dropoff_location_id Meter stopped - Taxi area [0,262]

[0244] Then, the learning rate, initial model parameters, and the number of communication rounds between the server and the terminal device in the federated learning process are used as inputs to iteratively train the mobile prediction model.

[0245] It should be noted that each iteration round is a communication round between the server and the terminal device.

[0246] In each round of communication, the terminal device first replaces the local model with the global model obtained in the previous round. Then, the local model is divided into two parts: a risk component and a normal component, corresponding to the location embedding layer and other layers, respectively. These other layers include the sequence modeling layer and the location prediction layer.

[0247] In one round of training, the initial motion prediction model is trained using the raw data in the training dataset, and the local model gradient is calculated. Model perturbations are then added to the gradients of other layers. Subsequently, data perturbations are added to the local training data on the terminal, where noisy data is used only to update the location embedding layer.

[0248] After obtaining the final local model gradient, the gradient is scrambled and sent to the server. The server then uses the gradient uploaded by the terminal to obtain the new global model for the next communication round and distributes it to all terminals. After a sufficient number of communication rounds, the mobile prediction model completes training.

[0249] The mobility prediction method of this invention involves acquiring multiple first training samples, which are generated based on locally stored historical mobility data of the user; then training a first mobility prediction model based on second training samples to obtain a second mobility prediction model; wherein the second training samples are training samples of the first training samples after noise scrambling, and the first mobility prediction model is generated by the server based on local model gradients from multiple terminals after noise scrambling, with the server and multiple terminals being participants in federated learning; finally, in application, first mobility data before the target time to be predicted is acquired; the first mobility data is input into the second mobility prediction model to obtain the predicted target mobility data, which is the mobility data of the user at the target time. Since the second mobility prediction model is a mobility prediction model obtained by combining data perturbation and model perturbation training, it can further strengthen the protection of user privacy data and prevent the leakage of sensitive location information in mobility prediction scenarios.

[0250] To better achieve the above objectives, such as Figure 5 As shown, embodiments of the present invention also provide a motion prediction device, comprising:

[0251] The first acquisition module 501 is used to acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally.

[0252] The model training module 502 is used to train the first mobile prediction model based on the second training samples to obtain the second mobile prediction model; wherein, the second training samples are the first training samples after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradients from multiple terminals after noise scrambling, and the server and multiple terminals are the participants in federated learning.

[0253] The second acquisition module 503 is used to acquire the first movement data before the target time to be predicted.

[0254] The mobility prediction module 504 is used to input the first mobility data into the second mobility prediction model to obtain the predicted target mobility data, which is the user's mobility data at the target time.

[0255] Optionally, the model training module 502 includes:

[0256] The first acquisition unit is used to acquire the first noise and the second noise;

[0257] The first processing unit is used to obtain a first motion prediction model based on the first training sample and the first noise.

[0258] The second processing unit is used to obtain the second training sample based on the first training sample and the second noise.

[0259] The first model training unit is used to train the first moving prediction model based on the second training samples to obtain the second moving prediction model.

[0260] Optionally, the first acquisition unit is specifically used for:

[0261] Based on the first preset parameter value, the target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirements, and the target noise is either the first noise or the second noise;

[0262] If the target noise is the first noise, then the second noise is determined based on the first noise, and the first noise is greater than the second noise;

[0263] If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

[0264] Optionally, the first acquisition unit is specifically used for:

[0265] Obtain the candidate noise set;

[0266] Select a first candidate noise for data scrambling and a second candidate noise for model scrambling from the candidate noise set;

[0267] The first candidate noise is used as the first noise, and the second candidate noise is used as the second noise, wherein the first noise and the second noise enable the prediction performance parameters of the trained second moving prediction model to meet the preset conditions.

[0268] Optionally, the first processing unit is specifically used for:

[0269] The first training sample is input into the initial mobility prediction model to obtain the first prediction result, which is used to characterize the user's future mobility.

[0270] The local model gradient is calculated based on the first prediction result;

[0271] The first noise is superimposed on the local model gradient to obtain the scrambled local model gradient.

[0272] The first moving prediction model is obtained based on the scrambled local model gradient.

[0273] Optionally, the first processing unit is further specifically used for:

[0274] The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient.

[0275] The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

[0276] Optionally, the first processing unit is further specifically used for:

[0277] The scrambled local model gradient is sent to the server so that the server can generate a first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals.

[0278] The first motion prediction model returned by the server is received.

[0279] Optionally, the model training module 502 includes:

[0280] The third processing unit is used to input the second training sample into the first motion prediction model to obtain the second prediction result, which is used to characterize the user's future motion.

[0281] The fourth processing unit is used to update the local model gradient based on the second prediction result, and obtain the updated local model gradient.

[0282] The fifth processing unit is used to obtain a third mobile prediction model based on the updated local model gradient. The third mobile prediction model is generated by the server based on the updated local model gradient from the multiple terminals.

[0283] The second model training unit is used to update the third moving prediction model to the first moving prediction model, and to train the first moving prediction model using the second training samples for the next round of model training, so as to obtain the second moving prediction model.

[0284] The mobility prediction device of this invention acquires multiple first training samples, which are generated based on locally stored historical mobility data of the user. Then, it trains a first mobility prediction model using second training samples to obtain a second mobility prediction model. The second training samples are noise-scrambled versions of the first training samples. The first mobility prediction model is generated by a server based on noise-scrambled local model gradients from multiple terminals. The server and multiple terminals are participants in the federated learning process. Finally, in application, it acquires first mobility data prior to the target time to be predicted. This first mobility data is then input into the second mobility prediction model to obtain the predicted target mobility data, which is the user's mobility data corresponding to the target time. Because the second mobility prediction model is a mobility prediction model obtained by combining data perturbation and model perturbation training, it can further enhance the protection of user privacy data and prevent the leakage of sensitive location information in mobility prediction scenarios.

[0285] To better achieve the above objectives, such as Figure 6As shown, this embodiment of the invention also provides a terminal, including a processor 600 and a transceiver 610. The terminal also includes a user interface 620. The processor 600 is used to perform the following process:

[0286] Multiple first training samples are obtained, which are generated based on the user's historical movement data stored locally.

[0287] The first mobile prediction model is trained based on the second training samples to obtain the second mobile prediction model; wherein, the second training samples are the first training samples after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradients from multiple terminals after noise scrambling, and the server and multiple terminals are the participants in federated learning.

[0288] Obtain the first movement data before the target time to be predicted;

[0289] The first movement data is input into the second movement prediction model to obtain the predicted target movement data, which is the movement data of the user at the target time.

[0290] Optionally, the processor 600 is also used for:

[0291] Obtain the first noise and the second noise;

[0292] Based on the first training sample and the first noise, obtain the first motion prediction model;

[0293] Based on the first training sample and the second noise, obtain the second training sample;

[0294] The first moving prediction model is trained using the second training samples to obtain the second moving prediction model.

[0295] Optionally, the processor 600 is also used for:

[0296] Based on the first preset parameter value, the target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirements, and the target noise is either the first noise or the second noise;

[0297] If the target noise is the first noise, then the second noise is determined based on the first noise, and the first noise is greater than the second noise;

[0298] If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

[0299] Optionally, the processor 600 is also used for:

[0300] Obtain the candidate noise set;

[0301] Select a first candidate noise for data scrambling and a second candidate noise for model scrambling from the candidate noise set;

[0302] The first candidate noise is used as the first noise, and the second candidate noise is used as the second noise, wherein the first noise and the second noise enable the prediction performance parameters of the trained second moving prediction model to meet the preset conditions.

[0303] Optionally, the processor 600 is also used for:

[0304] The first training sample is input into the initial mobility prediction model to obtain the first prediction result, which is used to characterize the user's future mobility.

[0305] The local model gradient is calculated based on the first prediction result;

[0306] The first noise is superimposed on the local model gradient to obtain the scrambled local model gradient.

[0307] The first moving prediction model is obtained based on the scrambled local model gradient.

[0308] Optionally, the processor 600 is also used for:

[0309] The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient.

[0310] The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

[0311] Alternatively, transceiver 610 is also used for:

[0312] The scrambled local model gradient is sent to the server so that the server can generate a first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals.

[0313] The first motion prediction model returned by the receiving server.

[0314] Optionally, the processor is also used for:

[0315] The second training sample is input into the first mobility prediction model to obtain the second prediction result, which is used to characterize the user's future mobility.

[0316] The local model gradient is updated based on the second prediction result to obtain the updated local model gradient.

[0317] The third mobile prediction model is obtained based on the updated local model gradients. The third mobile prediction model is generated by the server based on the updated local model gradients from multiple terminals.

[0318] The third moving prediction model is updated to the first moving prediction model, and the first moving prediction model is trained using the second training samples used for the next round of model training to obtain the second moving prediction model.

[0319] Optionally, the terminal in this embodiment of the invention is a mobile terminal device.

[0320] The terminal in this embodiment of the invention acquires multiple first training samples, which are generated based on the user's historical movement data stored locally. Then, it trains a first movement prediction model using second training samples to obtain a second movement prediction model. The second training samples are noise-scrambled versions of the first training samples. The first movement prediction model is generated by a server based on noise-scrambled local model gradients from multiple terminals. The server and multiple terminals are participants in the federated learning process. Finally, in the application, the terminal acquires first movement data prior to the target time to be predicted. This first movement data is then input into the second movement prediction model to obtain the predicted target movement data, which is the user's movement data corresponding to the target time. Because the second movement prediction model is a movement prediction model obtained by combining data perturbation and model perturbation training, it can further enhance the protection of user privacy data and prevent the leakage of sensitive location information in movement prediction scenarios.

[0321] This invention also provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the various processes in the motion prediction method embodiments described above and achieves the same technical effect. To avoid repetition, these will not be repeated here.

[0322] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, this program implements the various processes described above in the motion prediction method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0323] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0324] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 A device for one or more processes and / or the functions specified in one or more boxes.

[0325] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce a paper article including an instruction means, the instruction means being implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0326] These computer program instructions can also be loaded onto a computer or other programmable data processing equipment, causing the computer or other programmable equipment to perform a series of operational steps to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0327] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles described in the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A mobility prediction method, characterized in that, include: Acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally; The first mobile prediction model is trained based on the second training sample to obtain the second mobile prediction model; wherein, the second training sample is the first training sample after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradient from multiple terminals after noise scrambling, and the server and the multiple terminals are the participants in federated learning. Obtain the first movement data before the target time to be predicted; The first mobile data is input into the second mobile prediction model to obtain the predicted target mobile data, wherein the target mobile data is the mobile data of the user at the target time. The step of training the first motion prediction model based on the second training samples to obtain the second motion prediction model includes: Obtain the first noise and the second noise; Based on the first training sample and the first noise, obtain the first motion prediction model; Based on the first training sample and the second noise, obtain the second training sample; The first motion prediction model is trained based on the second training samples to obtain the second motion prediction model; The acquisition of the first noise and the second noise includes: Based on a first preset parameter value, a target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirement, and the target noise is either the first noise or the second noise; If the target noise is the first noise, then the second noise is determined based on the first noise, wherein the first noise is greater than the second noise; If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

2. The method of claim 1, wherein, The acquisition of the first noise and the second noise includes: Obtain the candidate noise set; Select a first candidate noise for data scrambling and a second candidate noise for model scrambling from the candidate noise set; The first candidate noise is used as the first noise, and the second candidate noise is used as the second noise, wherein the first noise and the second noise cause the prediction performance parameters of the trained second motion prediction model to meet preset conditions.

3. The method of claim 1, wherein, The step of obtaining the first motion prediction model based on the first training sample and the first noise includes: The first training sample is input into the initial mobility prediction model to obtain a first prediction result, which is used to characterize the user's future mobility. Based on the first prediction result, the local model gradient is calculated; The first noise is superimposed on the local model gradient to obtain the scrambled local model gradient. The first mobile prediction model is obtained based on the scrambled local model gradient.

4. The method of claim 3, wherein, The step of superimposing the first noise onto the local model gradient to obtain the scrambled local model gradient includes: The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient. The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

5. The method of claim 3, wherein, The step of obtaining the first motion prediction model based on the scrambled local model gradient includes: The scrambled local model gradient is sent to the server, so that the server can generate the first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals. Receive the first mobility prediction model returned by the server.

6. The method of claim 1, wherein, The step of training the first motion prediction model based on the second training samples to obtain the second motion prediction model includes: The second training sample is input into the first mobility prediction model to obtain a second prediction result, which is used to characterize the user's future mobility. The local model gradient is updated based on the second prediction result to obtain the updated local model gradient. A third mobile prediction model is obtained based on the updated local model gradient, which is generated by the server based on the updated local model gradient from the multiple terminals. The third mobile prediction model is updated to the first mobile prediction model, and the first mobile prediction model is trained using the second training samples used for the next round of model training to obtain the second mobile prediction model.

7. A movement prediction device, characterized by comprising: include: The first acquisition module is used to acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally. The model training module is used to train the first mobile prediction model based on the second training samples to obtain the second mobile prediction model; wherein, the second training samples are the first training samples after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradients from multiple terminals after noise scrambling, and the server and the multiple terminals are the participants in federated learning. The second acquisition module is used to acquire the first movement data before the target time to be predicted; The mobility prediction module is used to input the first mobility data into the second mobility prediction model to obtain the predicted target mobility data, wherein the target mobility data is the mobility data of the user at the target time; The model training module includes: The first acquisition unit is used to acquire the first noise and the second noise; The first processing unit is used to obtain a first motion prediction model based on the first training sample and the first noise. The second processing unit is used to obtain the second training sample based on the first training sample and the second noise. The first model training unit is used to train the first motion prediction model based on the second training samples to obtain the second motion prediction model. The first acquisition unit is specifically used for: Based on the first preset parameter value, the target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirements, and the target noise is either the first noise or the second noise; If the target noise is the first noise, then the second noise is determined based on the first noise, and the first noise is greater than the second noise; If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

8. A terminal, comprising a processor and a transceiver, wherein the transceiver receives and transmits data under the control of the processor, characterized in that, The processor is used to perform the following process: Acquire multiple first training samples, which are generated based on the user's historical mobile data stored locally; The first mobile prediction model is trained based on the second training sample to obtain the second mobile prediction model; wherein, the second training sample is the first training sample after noise scrambling; the first mobile prediction model is generated by the server based on the local model gradient from multiple terminals after noise scrambling, and the server and the multiple terminals are the participants in federated learning. Obtain the first movement data before the target time to be predicted; The first mobile data is input into the second mobile prediction model to obtain the predicted target mobile data, wherein the target mobile data is the mobile data of the user at the target time. The processor is also used for: Obtain the first noise and the second noise; Based on the first training sample and the first noise, obtain the first motion prediction model; Based on the first training sample and the second noise, obtain the second training sample; The first motion prediction model is trained based on the second training samples to obtain the second motion prediction model; The processor is also used for: Based on a first preset parameter value, a target noise is determined, wherein the first preset parameter value meets the measurement standard corresponding to the privacy protection requirement, and the target noise is either the first noise or the second noise; If the target noise is the first noise, then the second noise is determined based on the first noise, wherein the first noise is greater than the second noise; If the target noise is the second noise, then the first noise is determined based on the second noise, and the second noise is greater than the first noise.

9. The terminal according to claim 8, characterized by The processor is also used for: Obtain the candidate noise set; Select a first candidate noise for data scrambling and a second candidate noise for model scrambling from the candidate noise set; The first candidate noise is used as the first noise, and the second candidate noise is used as the second noise, wherein the first noise and the second noise cause the prediction performance parameters of the trained second motion prediction model to meet preset conditions.

10. The terminal according to claim 8, characterized by The processor is also used for: The first training sample is input into the initial mobility prediction model to obtain a first prediction result, which is used to characterize the user's future mobility. Based on the first prediction result, the local model gradient is calculated; The first noise is superimposed on the local model gradient to obtain the scrambled local model gradient. The first mobile prediction model is obtained based on the scrambled local model gradient.

11. The terminal according to claim 10, characterized by The processor is also used for: The local model gradient is clipped based on a preset clipping threshold to obtain the clipped local model gradient. The first noise is superimposed on the clipped local model gradient to obtain the scrambled local model gradient.

12. The terminal according to claim 10, characterized by The transceiver is also used for: The scrambled local model gradient is sent to the server, so that the server can generate the first mobile prediction model based on the noise-scrambled local model gradients from multiple terminals. Receive the first mobility prediction model returned by the server.

13. The terminal according to claim 8, characterized by The processor is also used for: The second training sample is input into the first mobility prediction model to obtain a second prediction result, which is used to characterize the user's future mobility. The local model gradient is updated based on the second prediction result to obtain the updated local model gradient. A third mobile prediction model is obtained based on the updated local model gradient, which is generated by the server based on the updated local model gradient from the multiple terminals. The third mobile prediction model is updated to the first mobile prediction model, and the first mobile prediction model is trained using the second training samples used for the next round of model training to obtain the second mobile prediction model.

14. A terminal comprising a memory, a processor, and a program stored on the memory and executable on the processor; characterized in that, When the processor executes the program, it implements the motion prediction method as described in any one of claims 1 to 6.

15. A computer readable storage medium having stored thereon a computer program, characterized in that, When the program is executed by the processor, it implements the steps in the motion prediction method as described in any one of claims 1 to 6.