De-anonymization method for imbalanced trajectory data based on Granger causality
By introducing Granger causal analysis and data equalization processing into the trajectory data deanonymization method, the causal structure in the trajectory data is extracted and trained, the causal structure and data imbalance in the existing methods are solved, and more accurate and Efficient trajectory deanonymization.
Patent Information
- Application Number
- CN202411561836.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The existing trajectory data deanonymization method fails to effectively consider the causal structure relationships implicitly in the data, and fails to propose specific and feasible solutions for the problem of multi-source trajectory data imbalance, resulting in the inaccurate effect of deanonymization.
The uneven trajectory data deanonymization method based on Granger's causality is adopted. Through data equalization processing, improved two-way long and short-term memory model, causal learning module and user ID equalization prediction module, the causal structure in the trajectory data is extracted and trained. Realize deanonymization of trajectories.
It improves the accuracy and effectiveness of the deanonymization method of trajectory data, effectively utilizes causal learning methods, reduces the risk of misidentification caused by data generalization or noise, and improves the utilization rate of trajectory data.
Smart Images

Figure CN119066711B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to a method for de-anonymizing imbalanced trajectory data based on Granger causality. Background Art
[0002] With the continuous development of mobile terminal digital technology, the collection and analysis of location data has become more and more common. In order to protect the privacy of users, trajectory data is usually anonymized after collection to prevent the leakage of personal identity.
[0003] Although existing anonymization technologies protect user privacy to a certain extent, they also have some limitations, such as causing data quality to deteriorate, affecting the accuracy and effectiveness of data analysis, etc. At present, the existing trajectory data de-anonymization methods still have some defects. They only consider the spatiotemporal characteristics of trajectory data, but do not consider the causal structure relationship implicit in the data. In addition, no specific and feasible implementation plan has been proposed for the imbalance problem of multi-source trajectory data, resulting in the inaccurate de-anonymization effect of the method.
[0004] It can be seen that there is an urgent need for a de-anonymization method for imbalanced trajectory data based on Granger causality with accurate de-anonymization effect. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method for de-anonymizing unbalanced trajectory data based on Granger causality, which at least partially solves the problem of poor accuracy of de-anonymization effect in the prior art.
[0006] The embodiment of the present invention provides a method for de-anonymizing unbalanced trajectory data based on Granger causality, comprising:
[0007] Step 1: To address the imbalance problem of multi-source trajectory data, data balancing is performed on anonymous and non-anonymous trajectory data sets;
[0008] Step 2, input the equalized trajectory data set into the improved bidirectional long short-term memory model to obtain anonymous trajectory representation and non-anonymous trajectory representation respectively;
[0009] Step 3: Input the non-anonymous trajectory representation into the causal learning module to extract the causal structure existing in the trajectory data;
[0010] Step 4, input the causal structure into the user ID equilibrium prediction module and train it under the optimization of the loss function;
[0011] Step 5: Input the anonymous trajectory representation into the trained model to obtain the user and trajectory linking result of the anonymous trajectory, thereby achieving trajectory deanonymization.
[0012] According to a specific implementation of the embodiment of the present invention, step 1 specifically includes:
[0013] Step 1.1, calculate the anonymous trajectory data set and non-anonymous trajectory data sets The mean square error of and , where the mean square error The calculation formula is:
[0014]
[0015] in, Refers to each track category The proportion of data in the entire trajectory set, is the mean of the trajectory category, is the number of trajectory categories;
[0016] Step 1.2: Calculate the anonymous trajectory data set and the non-anonymous trajectory data set Difference, judgment Is the difference greater than the threshold? , if yes, then perform balanced clustering, where, The difference is calculated as: ;
[0017] Step 1.3: Cluster the anonymous trajectory data and non-anonymous trajectory data separately, and express the clustering results as the anonymous trajectory data cluster set and non-anonymous trajectory data clustering collection ;
[0018] Step 1.4, for each anonymous data cluster Clustering with non-anonymous data , calculate their mean square error respectively and sampling weights , where the sampling weight The calculation formula is:
[0019]
[0020] Step 1.5, based on sampling weight Perform equalization processing on cluster trajectory data;
[0021] Step 1.6, check the equalized data set and calculate the new data set value, ensuring that it is less than the threshold , otherwise, repeat steps 1.1 to 1.5.
[0022] According to a specific implementation of the embodiment of the present invention, step 2 specifically includes:
[0023] Step 2.1, input the anonymous trajectory dataset and the non-anonymous trajectory dataset after equalization into the bidirectional long short-term memory model with the category-balanced comprehensive attention mechanism, where the calculation of each time step in the bidirectional long short-term memory model includes the calculation of the forward LSTM layer and the backward LSTM layer. The calculation process of the backward LSTM layer is opposite to the input order of the forward LSTM layer. The forget gate of the LSTM layer is calculated. :
[0024]
[0025] in, is the sigmoid function, and is a trainable parameter, is the hidden state at the previous time step, is the input of the current time step;
[0026] Step 2.2, calculate the input gate :
[0027]
[0028] in, and is a trainable parameter;
[0029] Step 2.3, update the cell state by combining the results of the forget gate and the input gate :
[0030]
[0031] in, is the cell state at the previous time step, represents the Hadamard product, represents the tanh activation function, and is a trainable parameter;
[0032] Step 2.4, calculate the output gate :
[0033] ;
[0034] in, and is a trainable parameter;
[0035] Step 2.5, combine the cell state and the result of the output gate to calculate the current hidden state :
[0036] ;
[0037] Step 2.6, for each time step t, concatenate the hidden states of the forward LSTM layer and the backward LSTM layer as the final hidden state of that time step:
[0038]
[0039] in, represents the forward hidden state, represents the backward hidden state;
[0040] Step 2.7, after the bidirectional long short-term memory model has processed all time steps, obtain the hidden state sequence of each time step , and the hidden state of the last time step is Input into the category-balanced integrated attention module, and finally output trajectory representation containing spatiotemporal information .
[0041] According to a specific implementation of the embodiment of the present invention, step 2.7 specifically includes:
[0042] Step 2.7.1, the hidden state of the last time step Input into the category-balanced temporal attention module and the category-balanced spatial attention module respectively, first calculate the temporal attention score and spatial attention score :
[0043]
[0044]
[0045] in, represents the hidden state at time step t, represents the vector of the spatial point p, , is the weight matrix, , is the bias vector;
[0046] Step 2.7.2, based on the time attention score and spatial attention score Calculate the class-balanced attention weights:
[0047]
[0048]
[0049] in, , is the weight of category i, Represents the time step The temporal attention score, Representing a spatial point The spatial attention score of represents the exponential function, For sum operation;
[0050] Step 2.7.3, calculate the context vector based on the attention weight:
[0051]
[0052] ;
[0053] Step 2.7.4, combine the temporal and spatial context vectors and calculate the final trajectory representation:
[0054]
[0055]
[0056] in, is the comprehensive context vector, , is the weight matrix, represents the concatenation of the temporal context vector and the spatial context vector, , is the bias vector.
[0057] According to a specific implementation of the embodiment of the present invention, step 3 specifically includes:
[0058] Step 3.1, use Granger causality to extract the potential causal structure in the non-anonymous trajectory data and obtain the preliminary causal matrix A;
[0059] Step 3.2, assuming that the causal relationship matrix A is composed of sub-causal structures with a maximum lag period of k, use multi-layer perceptron and Gumbel-Softmax category reparameterization to estimate the causal structure in the trajectory representation and obtain the causal weight matrix W:
[0060]
[0061]
[0062] in, represents the local substructure of k lags, is the sub-causal structure with lag period j, is the trajectory representation of the kth lag period before the current time step t, is the MLP layer, are trainable parameters, is the Gumbel noise term, is the temperature parameter;
[0063] Step 3.3, recursively reconstruct the Granger causal structure for each time step t trajectory representation;
[0064] Step 3.4: Generate a directed causal result based on the final result of the causal relationship matrix A and the causal weight matrix W :
[0065]
[0066] Among them, V is a node set, which represents the trajectory representation, and E is a directed edge set, which represents the causal relationship;
[0067] Step 3.5, during the recursive reconstruction process, the causal structure is optimized by minimizing the reconstruction loss function, where the expression of the reconstruction loss function is:
[0068]
[0069] in, is the loss term based on KL divergence, is the regularization term, and is the weight hyperparameter of the loss term, based on the KL divergence loss term It is used to measure the difference between two probability distributions. Its expression is:
[0070]
[0071] in, is the probability distribution of the real trajectory data, is the probability distribution of reconstructed trajectory data;
[0072] Regularization term It is used to control the complexity of the model and prevent overfitting. Its expression is:
[0073]
[0074] in, are the parameters of the model.
[0075] According to a specific implementation of the embodiment of the present invention, step 3.1 specifically includes:
[0076] Step 3.1.1: Build two regression models, called the original model and the extended model. The original model does not consider , the extended model considers , the expressions of the original model and the extended model are:
[0077]
[0078]
[0079] in, and is the regression coefficient, and is the error term;
[0080] Step 3.1.2: Estimate the regression parameters of the original model and the extended model using the least squares method and ;
[0081] Step 3.1.3, calculate the difference in the residual sum of squares between the original model and the expanded model, and test it with the F statistic, where the calculation formula of the F statistic is:
[0082]
[0083] in, is the sample size, and are the residual sum of squares of the original model and the extended model respectively, and their calculation method is:
[0084]
[0085] ;
[0086] Step 3.1.4, find the corresponding degrees of freedom based on the F statistic and The critical value below , if F is greater than , then it is believed that Granger caused , which is recorded as a causal structure, if F is less than or equal to , then vice versa.
[0087] According to a specific implementation of the embodiment of the present invention, step 3.2 specifically includes:
[0088] Step 3.2.1, using the preliminary causal relationship matrix A as a guide, use MLP to estimate the probability distribution of causal relationships;
[0089] In step 3.2.2, Gumbel-Softmax is used for reparameterization to obtain a continuous approximation of the causal relationship and the causal weight matrix W.
[0090] According to a specific implementation of the embodiment of the present invention, step 4 specifically includes:
[0091] Step 4.1, based on the causal strength matrix W and the threshold , determine the number of nodes affected by each category of nodes in the causal relationship;
[0092] Step 4.2, measure the distribution of influence of nodes of different categories by calculating the imbalance rate of nodes, where the expression of node imbalance rate is:
[0093]
[0094] in, is the distribution score of category n, c is the total number of categories, and the value of the node imbalance rate is between [0, 1];
[0095] Step 4.3: Directed causal structure Input into the GNN model, learn the complex causal and spatiotemporal relationships in the causal structure through information transmission between nodes and edges. In the learning process, randomly select a certain ratio of node features in the category with the highest imbalance rate through the update formula to discard, where the update formula is:
[0096] ;
[0097] in, Indicates that node v is in The representation of the layer, is the set of neighbor nodes of node v, is the feature of edge (u,v);
[0098] Step 4.4, predict the user ID through the output node representation of the graph neural network, which is expressed as follows:
[0099]
[0100] in, is the weight matrix used for classification;
[0101] Step 4.5: During the training process, the user ID prediction is optimized by minimizing the prediction loss function, where the expression of the prediction loss function is:
[0102]
[0103] in, , , is the weight hyperparameter of the loss term, is the node imbalance rate, It is a multi-classification loss function based on cross entropy:
[0104] ;
[0105] Among them, Yi is the one-hot encoding representation of the real user ID, is the probability that the sample predicted by the model belongs to user i, and N is the total number of users.
[0106] According to a specific implementation of the embodiment of the present invention, step 5 specifically includes:
[0107] Step 5.1, input the anonymous trajectory representation into the causal learning module in the trained model to obtain the causal structure of the anonymous trajectory data;
[0108] Step 5.2: Input the causal structure into the graph neural network to obtain the user and trajectory link results of the anonymous trajectory.
[0109] The unbalanced trajectory data de-anonymization scheme based on Granger causality in the embodiment of the present invention includes: step 1, for the problem of unbalanced multi-source trajectory data, performing data balancing processing on the anonymous and non-anonymous trajectory data sets; step 2, inputting the balanced trajectory data sets into the improved bidirectional long short-term memory model to obtain anonymous trajectory representations and non-anonymous trajectory representations respectively; step 3, inputting the non-anonymous trajectory representations into the causal learning module to extract the causal structure existing in the trajectory data; step 4, inputting the causal structure into the user ID balanced prediction module, and training under the optimization of the loss function; step 5, inputting the anonymous trajectory representation into the trained model to obtain the user and trajectory linking result of the anonymous trajectory, and realizing the de-anonymization of the trajectory.
[0110] The beneficial effects of the embodiments of the present invention are as follows: through the scheme of the present invention, a multi-source imbalanced data processing method is proposed to solve the problem of multi-source data imbalance in trajectory data, which can solve the problem of anonymous trajectory data imbalance to a certain extent, effectively improve the utilization efficiency of multi-source data, and improve the accuracy and effectiveness of trajectory de-anonymization methods; the causal learning method is used to focus on the correlation and causal relationship between data, reduce the risk of misidentification caused by data generalization or noise, and improve the accuracy of linking users with anonymous trajectories; the de-anonymization of trajectory data can be completed quickly, correctly, and with less resource requirements, effectively improving the utilization rate of trajectory data. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0112] Figure 1 A flowchart of a method for de-anonymizing unbalanced trajectory data based on Granger causality provided in an embodiment of the present invention;
[0113] Figure 2 A schematic diagram of a model framework of an unbalanced trajectory data de-anonymization method based on Granger causality provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0114] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0115] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.
[0116] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present invention, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0117] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention. The drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0118] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0119] An embodiment of the present invention provides a method for de-anonymizing imbalanced trajectory data based on Granger causality, which can be applied to the privacy data inclusion process in Internet scenarios.
[0120] See also Figure 1 , is a flow chart of a method for de-anonymizing unbalanced trajectory data based on Granger causality provided by an embodiment of the present invention. Figure 1 and Figure 2 As shown, the method mainly comprises the following steps:
[0121] Step 1: To address the imbalance problem of multi-source trajectory data, data balancing is performed on anonymous and non-anonymous trajectory data sets;
[0122] In specific implementation, the step 1 specifically includes:
[0123] Step 1.1, calculate the anonymous trajectory data set and non-anonymous trajectory data sets The mean square error of and . The higher the value, the more imbalanced the data distribution is. The calculation formula is as follows:
[0124]
[0125] in, Refers to each track category The proportion of data in the entire trajectory set, is the mean of the trajectory category, is the number of trajectory categories.
[0126] Step 1.2, calculate the anonymous trajectory set and the non-anonymous trajectory set Difference, judgment Is the difference significant? If the difference is significant, balanced clustering is performed. The difference is calculated as follows: ;
[0127] in, Refers to a collection of anonymous trajectory data value, Refers to a collection of non-anonymous trajectory data value.
[0128] like The value is greater than the set threshold , the difference is considered significant, and balanced clustering is performed on the two trajectory sets.
[0129] Step 1.3, cluster the anonymous data and non-anonymous data separately, for example, using a clustering algorithm such as K-Means or DBSCAN. The clustering result is represented as an anonymous data cluster set and non-anonymous data clustering collection ;
[0130] Step 1.4, for each anonymous data cluster Clustering with non-anonymous data , respectively calculate their and sampling weights . Sampling weights The calculation formula is as follows:
[0131]
[0132] Step 1.5, based on sampling weight The cluster data is balanced, that is, the data samples are small and Higher sample clustering uses SMOTE algorithm for oversampling, with more data samples and Higher sample clustering is performed with random undersampling;
[0133] Step 1.6, check the equalized data set, that is, calculate the new data set value, ensuring that it is less than the set threshold . Otherwise, repeat the above steps.
[0134] Step 2, input the equalized trajectory data set into the improved bidirectional long short-term memory model to obtain anonymous trajectory representation and non-anonymous trajectory representation respectively;
[0135] In specific implementation, the step 2 specifically includes:
[0136] Step 2.1, input the balanced anonymous trajectory dataset and the non-anonymous dataset into the BiLSTM model with the category-balanced comprehensive attention mechanism. In BiLSTM, the calculation of each time step includes the calculation of the forward and backward LSTM layers. The calculation process of the backward LSTM is similar to that of the forward LSTM, except that the input order is reversed. Here we explain the forward LSTM as an example. First, calculate the forget gate , determines how much information in the current cell state needs to be discarded, and its calculation formula is as follows:
[0137]
[0138] in, is the sigmoid function, and is a trainable parameter, is the hidden state at the previous time step, is the input for the current time step.
[0139] Step 2.2, calculate the input gate , determines how much new information is written to the cell state, and its calculation formula is as follows:
[0140] ;
[0141] in, and is a trainable parameter;
[0142] Step 2.3, combine the results of the forget gate and the input gate to update the cell state , and its calculation formula is as follows:
[0143]
[0144] in, is the cell state at the previous time step, represents the Hadamard product, represents the tanh activation function, and is a trainable parameter;
[0145] Step 2.4, calculate the output gate , determines the value of the current hidden state, and its calculation formula is as follows:
[0146] ;
[0147] in, and is a trainable parameter;
[0148] Step 2.5, combine the cell state and the result of the output gate to calculate the current hidden state , and its calculation formula is as follows:
[0149]
[0150] Step 2.6, for each time step t, concatenate the forward and backward hidden states as the final hidden state of that time step, that is:
[0151]
[0152] in, represents the forward hidden state, Represents the backward hidden state.
[0153] Step 2.7, after BiLSTM has processed all time steps, we can get the hidden state sequence for each time step , and the hidden state of the last time step is Input into the category-balanced integrated attention module, and finally output trajectory data representation containing spatiotemporal information .
[0154] Furthermore, the step 2.7 specifically includes:
[0155] Step 2.7.1, the hidden state of the last time step They are input into the category-balanced temporal attention module and the category-balanced spatial attention module respectively, and the temporal attention score and the spatial attention score are calculated first. The specific calculation formula is as follows:
[0156]
[0157]
[0158] in, represents the hidden state at time step t, represents the vector of the spatial point p, , is the weight matrix, , is the bias vector.
[0159] Step 2.7.2, calculate the category-balanced attention weights based on the attention scores. The specific calculation formula is as follows:
[0160]
[0161]
[0162] in, , is the weight of category i, making the model pay more attention to the minority class. Represents the time step The temporal attention score, Representing a spatial point The spatial attention score of represents the exponential function, This step is a summation operation. This step calculates the attention weight of each category through an exponential function and normalization to ensure that the sum of the weights is 1, thereby achieving category balance.
[0163] Step 2.7.3, calculate the context vector based on the attention weight. The specific calculation formula is as follows:
[0164]
[0165]
[0166] Step 2.7.4, integrate the temporal and spatial context vectors and calculate the final trajectory representation. The specific calculation formula is as follows:
[0167]
[0168]
[0169] in, is the comprehensive context vector, , is the weight matrix, represents the concatenation of the temporal context vector and the spatial context vector, , is the bias vector.
[0170] Step 3: Input the non-anonymous trajectory representation into the causal learning module to extract the causal structure existing in the trajectory data;
[0171] In specific implementation, the step 3 specifically includes:
[0172] Step 3.1: Use Granger causality to extract the potential causal structure in the non-anonymous trajectory data and obtain the preliminary causal matrix A. Granger causality is a statistical hypothesis testing method used to determine the causal relationship between time series. First, in order to determine a trajectory series With another trajectory sequence To determine whether there is a causal relationship, we need to test the predictive effects of the following two models:
[0173]
[0174]
[0175] in, and is the regression coefficient, Represents the error term. If the test results prove that there is a causal relationship between the two, the corresponding position in the causal relationship matrix A is marked.
[0176] Step 3.2, assuming that the causal structure A is composed of sub-causal structures with a maximum lag period of k, use multi-layer perceptron and Gumbel-Softmax category reparameterization to estimate the causal structure in the trajectory representation and obtain the causal weight matrix W. The specific formula is as follows:
[0177]
[0178]
[0179] in, represents the local substructure of k lags, is the sub-causal structure with lag period j, is the trajectory representation of the kth lag period before the current time step t, is the MLP layer, are trainable parameters, is the Gumbel noise term, is the temperature parameter.
[0180] Step 3.3, recursively reconstruct the Granger causal structure for each time step t trajectory representation;
[0181] Step 3.4, in order to further analyze and understand the overall structure of causality, a directed causal graph is generated based on the final results of the causal relationship matrix A and the causal weight matrix W. , which is expressed as follows:
[0182]
[0183] Among them, V is a node set, which represents the trajectory representation, and E is a directed edge set, which represents the causal relationship.
[0184] Step 3.5, during the recursive reconstruction process, the causal structure is optimized by minimizing the reconstruction loss function, which is calculated as follows:
[0185]
[0186] in, is the loss term based on KL divergence, is the regularization term, and is the weight hyperparameter of the loss term.
[0187] In the formula, the first term It is used to measure the difference between two probability distributions and is calculated as follows:
[0188]
[0189] in, is the probability distribution of the real trajectory data, is the probability distribution of reconstructed trajectory data.
[0190] In the formula, the second term It is used to control the complexity of the model and prevent overfitting. The calculation formula is as follows:
[0191]
[0192] in, are the parameters of the model.
[0193] Furthermore, the step 3.1 specifically includes:
[0194] Step 3.1.1, first, build two regression models, called the original model and the extended model, where the original model does not consider , the extended model considers The specific model is expressed as follows:
[0195]
[0196]
[0197] in, and is the regression coefficient, and is the error term.
[0198] Step 3.1.2: Estimate the parameters of the two models using the Ordinary Least Squares method. and .
[0199] Step 3.1.3, calculate the difference in the residual sum of squares between the original model and the expanded model, and test it with the F statistic. The calculation formula for the F statistic is as follows:
[0200]
[0201] in, is the sample size, and are the residual sums of squares of the original model and the extended model, respectively, and are calculated as follows:
[0202]
[0203]
[0204] Step 3.1.4, find the corresponding degrees of freedom according to the F distribution table and The critical value below If F is greater than , then it is believed that Granger caused , which is recorded as a causal structure. If F is less than or equal to , then vice versa.
[0205] Furthermore, the step 3.2 specifically includes:
[0206] Step 3.2.1, first use the preliminary causal relationship matrix A as a guide to estimate the probability distribution of causal relationships using MLP;
[0207] Step 3.2.2, then use Gumbel-Softmax to reparameterize and obtain a continuous approximation of the causal relationship. Among them, Gumbel-Softmax category reparameterization can process discrete trajectory variables during back propagation, thereby making a differentiable approximation of the causal relationship.
[0208] Step 4, input the causal structure into the user ID equilibrium prediction module and train it under the optimization of the loss function;
[0209] In specific implementation, the step 4 specifically includes:
[0210] Step 4.1, based on the causal strength matrix W and the threshold , determine the number of nodes affected by each category of nodes in the causal relationship, for example: if the causal strength between node a and node b is greater than the threshold , then node a is considered to be affected by node b.
[0211] Step 4.2, by calculating the node imbalance rate, it is used to measure the distribution of influence of different types of nodes. The specific calculation formula of the node imbalance rate is as follows:
[0212]
[0213] in, is the distribution score of category n, which is determined by the ratio of the number of nodes affected by this category to the total number of nodes affected by all categories. c is the total number of categories. The value of the node imbalance rate is between [0, 1]. The larger the value, the more balanced the node distribution.
[0214] Step 4.3: Convert the directed causal graph obtained in step 3 Input into the GNN model, through the information transmission of nodes and edges, learn the complex causal and spatiotemporal relationships in the graph. During the learning process, a certain ratio of node features in the category with the highest imbalance rate is randomly selected and discarded, so that the model can learn a more balanced trajectory representation. The update formula of the model is as follows:
[0215] ;
[0216] in, Indicates that node v is in The representation of the layer, is the set of neighbor nodes of node v, is the feature of edge (u,v).
[0217] Step 4.4, the user ID is predicted through the output node representation of the graph neural network, which is expressed as follows:
[0218]
[0219] in, is the weight matrix used for classification.
[0220] Step 4.5: During the training process, optimize the user ID prediction by minimizing the prediction loss function, which is calculated as follows:
[0221]
[0222] in, , , is the weight hyperparameter of the loss term, is the node imbalance rate, is a loss function based on the cross entropy loss function:
[0223] ;
[0224] Among them, Yi is the one-hot encoding representation of the real user ID, is the probability that the sample predicted by the model belongs to user i, and N is the total number of users.
[0225] Step 5: Input the anonymous trajectory representation into the trained model to obtain the user and trajectory linking result of the anonymous trajectory, thereby achieving trajectory deanonymization.
[0226] In specific implementation, the step 5 specifically includes:
[0227] Step 5.1, input the anonymous trajectory representation into the causal learning module of the model to obtain the causal graph of the target anonymous trajectory data;
[0228] In step 5.2, the causal graph is input into the user ID prediction module to obtain the user and trajectory linking result of the anonymous trajectory, thus realizing the deanonymization of the trajectory.
[0229] The unbalanced trajectory data de-anonymization method based on Granger causality provided in this embodiment proposes a multi-source unbalanced data processing method for the multi-source data imbalance problem existing in trajectory data, which can solve the anonymous trajectory data imbalance problem to a certain extent, effectively improve the utilization efficiency of multi-source data, and improve the accuracy and effectiveness of the trajectory de-anonymization method; it uses the causal learning method, pays attention to the correlation and causal relationship between data, reduces the risk of misidentification caused by data generalization or noise, and improves the accuracy of linking users with anonymous trajectories; it can complete the de-anonymization of trajectory data in a fast, correct and low resource requirement situation, effectively improving the utilization rate of trajectory data.
[0230] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof.
[0231] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for de-anonymizing unbalanced trajectory data based on Granger causality, characterized in that: include: Step 1: To address the imbalance problem of multi-source trajectory data, data balancing is performed on anonymous and non-anonymous trajectory data sets; The step 1 specifically includes: Step 1.1, calculate the anonymous trajectory data set and non-anonymous trajectory data sets The mean square error of and , where the mean square error The calculation formula is: in, Refers to each trajectory category The proportion of data in the entire trajectory set, is the mean of the trajectory category, is the number of trajectory categories; Step 1.2: Calculate the anonymous trajectory data set and the non-anonymous trajectory data set Difference, judgment Is the difference greater than the threshold? , if yes, then perform balanced clustering, where, The difference is calculated as: ; Step 1.3: Cluster the anonymous trajectory data and non-anonymous trajectory data separately, and express the clustering results as the anonymous trajectory data cluster set and non-anonymous trajectory data clustering collection ; Step 1.4, for each anonymous data cluster Clustering with non-anonymous data , calculate their mean square error respectively and sampling weights , where the sampling weight The calculation formula is: Step 1.5, based on sampling weight Perform equalization processing on cluster trajectory data; Step 1.6, check the equalized data set and calculate the new data set value, ensuring that it is less than the threshold , otherwise, repeat steps 1.1 to 1.5; Step 2, input the equalized trajectory data set into the improved bidirectional long short-term memory model to obtain anonymous trajectory representation and non-anonymous trajectory representation respectively; Step 3: Input the non-anonymous trajectory representation into the causal learning module to extract the causal structure existing in the trajectory data; Step 4, input the causal structure into the user ID equilibrium prediction module and train it under the optimization of the loss function; Step 5: Input the anonymous trajectory representation into the trained model to obtain the user and trajectory linking result of the anonymous trajectory, thereby achieving trajectory deanonymization.
2. The method according to claim 1, characterized in that , the step 2 specifically includes: Step 2.1, input the anonymous trajectory dataset and the non-anonymous trajectory dataset after equalization into the bidirectional long short-term memory model with the category-balanced comprehensive attention mechanism, where the calculation of each time step in the bidirectional long short-term memory model includes the calculation of the forward LSTM layer and the backward LSTM layer. The calculation process of the backward LSTM layer is opposite to the input order of the forward LSTM layer. The forget gate of the LSTM layer is calculated. : in, is the sigmoid function, and is a trainable parameter, is the hidden state at the previous time step, is the input of the current time step; Step 2.2, calculate the input gate : in, and is a trainable parameter; Step 2.3, update the cell state by combining the results of the forget gate and the input gate : in, is the cell state at the previous time step, represents the Hadamard product, represents the tanh activation function, and is a trainable parameter; Step 2.4, calculate the output gate : ; in and is a trainable parameter; Step 2.5, combine the cell state and the result of the output gate to calculate the current hidden state : ; Step 2.6, for each time step t, concatenate the hidden states of the forward LSTM layer and the backward LSTM layer as the final hidden state of that time step: in, represents the forward hidden state, represents the backward hidden state; Step 2.7, after the bidirectional long short-term memory model has processed all time steps, obtain the hidden state sequence of each time step , and the hidden state of the last time step is Input into the category-balanced integrated attention module, and finally output trajectory representation containing spatiotemporal information .
3. The method according to claim 2, characterized in that , the step 2.7 specifically includes: Step 2.7.1, the hidden state of the last time step Input into the category-balanced temporal attention module and the category-balanced spatial attention module respectively, first calculate the temporal attention score and spatial attention score : in, represents the hidden state at time step t, represents the vector of the spatial point p, , is the weight matrix, , is the bias vector; Step 2.7.2, based on the time attention score and spatial attention score Calculate the class-balanced attention weights: in, , is the weight of category i, Represents the time step The temporal attention score, Representing a spatial point The spatial attention score of represents the exponential function, For sum operation; Step 2.7.3, calculate the context vector based on the attention weight: ; Step 2.7.4, combine the temporal and spatial context vectors and calculate the final trajectory representation: in, is the comprehensive context vector, , is the weight matrix, represents the concatenation of the temporal context vector and the spatial context vector, , is the bias vector.
4. The method according to claim 3, characterized in that , the step 3 specifically includes: Step 3.1, use Granger causality to extract the potential causal structure in the non-anonymous trajectory data and obtain the preliminary causal matrix A; Step 3.2, assuming that the causal relationship matrix A is composed of sub-causal structures with a maximum lag period of k, use multi-layer perceptron and Gumbel-Softmax category reparameterization to estimate the causal structure in the trajectory representation and obtain the causal weight matrix W: in, represents the local substructure of k lags, is the sub-causal structure with lag period j, is the trajectory representation of the kth lag period before the current time step t, is the MLP layer, are trainable parameters, is the Gumbel noise term, is the temperature parameter; Step 3.3, recursively reconstruct the Granger causal structure for each time step t trajectory representation; Step 3.4: Generate a directed causal result based on the final result of the causal relationship matrix A and the causal weight matrix W : Among them, V is a node set, which represents the trajectory representation, and E is a directed edge set, which represents the causal relationship; Step 3.5, during the recursive reconstruction process, the causal structure is optimized by minimizing the reconstruction loss function, where the expression of the reconstruction loss function is: in, is the loss term based on KL divergence, is the regularization term, and is the weight hyperparameter of the loss term, based on the KL divergence loss term It is used to measure the difference between two probability distributions. Its expression is: in, is the probability distribution of the real trajectory data, is the probability distribution of reconstructed trajectory data; Regularization term It is used to control the complexity of the model and prevent overfitting. Its expression is: in, are the parameters of the model.
5. The method according to claim 4, characterized in that , the step 3.1 specifically includes: Step 3.1.1: Build two regression models, called the original model and the extended model. The original model does not consider , the extended model considers , the expressions of the original model and the extended model are: in, and is the regression coefficient, and is the error term; Step 3.1.2: Estimate the regression parameters of the original model and the extended model using the least squares method and ; Step 3.1.3, calculate the difference in the residual sum of squares between the original model and the expanded model, and test it with the F statistic, where the calculation formula of the F statistic is: in, is the sample size, and are the residual sum of squares of the original model and the extended model respectively, and their calculation method is: ; Step 3.1.4, find the corresponding degrees of freedom according to the F statistic and The critical value below , if F is greater than , then it is believed that Granger caused , which is recorded as a causal structure, if F is less than or equal to , then vice versa.
6. The method according to claim 5, characterized in that , the step 3.2 specifically includes: Step 3.2.1, using the preliminary causal relationship matrix A as a guide, use MLP to estimate the probability distribution of causal relationships; In step 3.2.2, Gumbel-Softmax is used for reparameterization to obtain a continuous approximation of the causal relationship and the causal weight matrix W.
7. The method according to claim 6, characterized in that , the step 4 specifically includes: Step 4.1, based on the causal strength matrix W and the threshold , determine the number of nodes affected by each category of nodes in the causal relationship; Step 4.2, measure the distribution of influence of nodes of different categories by calculating the imbalance rate of nodes, where the expression of node imbalance rate is: in, is the distribution score of category n, c is the total number of categories, and the value of the node imbalance rate is between [0, 1]; Step 4.3: Directed causal structure Input into the GNN model, learn the complex causal and spatiotemporal relationships in the causal structure through information transmission between nodes and edges. In the learning process, randomly select a certain ratio of node features in the category with the highest imbalance rate through the update formula to discard, where the update formula is: ; in, Indicates that node v is in The representation of the layer, is the set of neighbor nodes of node v, is the feature of edge (u,v); Step 4.4, predict the user ID through the output node representation of the graph neural network, which is expressed as follows: in, is the weight matrix used for classification; Step 4.5: During the training process, the user ID prediction is optimized by minimizing the prediction loss function, where the expression of the prediction loss function is: in, , , is the weight hyperparameter of the loss term, is the node imbalance rate, is a loss function based on the cross entropy loss function: ; Among them, Yi is the one-hot encoding representation of the real user ID, is the probability that the sample predicted by the model belongs to user i, and N is the total number of users.
8. The method according to claim 7, characterized in that , the step 5 specifically includes: Step 5.1, input the anonymous trajectory representation into the causal learning module in the trained model to obtain the causal structure of the anonymous trajectory data; Step 5.2: Input the causal structure into the graph neural network to obtain the user and trajectory link results of the anonymous trajectory.
Citation Information
Patent Citations
Track data anonymity removing method based on deep learning
CN110502919A
An anonymized data processing method and computer programs thereof
EP3591561A1