A trajectory privacy protection method and system based on community division
By constructing a location semantic classification tree and local communities, sensitive locations are filtered and trajectory data is reconstructed, solving the problem that existing technologies fail to consider semantic attributes and achieving effective trajectory privacy protection and data availability.
Patent Information
- Application Number
- CN202411566773.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-11-05
AI Technical Summary
Existing trajectory privacy protection technologies fail to consider the semantic attributes between trajectory data and cannot effectively resist background knowledge attacks, leading to the leakage of privacy data of moving objects.
By acquiring the spatial and temporal attributes of trajectory data, inverse geocoding is performed to construct a location semantic classification tree, sensitive locations are filtered, local communities are constructed, and modularity increment and semantic similarity are calculated. Replacement nodes are selected to reconstruct the trajectory, and the privacy protection level and usability of the reconstructed trajectory are evaluated.
It effectively protects the privacy information of moving objects, resists background knowledge attacks, reduces the workload of reconstructing trajectories, and improves the availability and privacy protection level of trajectory data.
Smart Images

Figure CN119538307B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of trajectory privacy protection, and particularly relates to a trajectory privacy protection method and system based on community division. BACKGROUND
[0002] With the rapid development of communication and positioning technology and the popularity of mobile devices, the number of mobile communication users is increasing day by day, which promotes the development of location-based services. Service providers provide personalized services according to the trajectory, location, service request and other information submitted by users. However, the trajectory data also contains personal sensitive information such as user behavior habits, work and home address, etc. If the user trajectory data is directly published without processing, once the data is stolen or sent to an untrusted service provider, the personal privacy will be leaked.
[0003] Many protection technologies have emerged in response to the security threat of trajectory privacy leakage, but most of the methods are to disturb the spatial position without considering the complex situation of semantic attributes between positions. With the rapid development of machine learning in recent years, the method of only disturbing the spatial position cannot resist the background knowledge attack driven by data, and it is difficult to balance the real demand of service providers to analyze and provide services based on user trajectory data.
[0004] Therefore, there is an urgent need for a trajectory privacy protection method that takes into account the semantic attributes between trajectory data to resist background knowledge attacks and protect mobile object privacy data. SUMMARY
[0005] In order to solve the problems that the existing trajectory privacy protection technology does not consider the semantic attributes between trajectory data, cannot resist background knowledge attacks, and cannot protect mobile object privacy data, the present application provides a trajectory privacy protection method and system based on community division.
[0006] A trajectory privacy protection method based on community division, comprising the following steps:
[0007] S1, obtaining trajectory data of a mobile object and storing it in a trajectory database, the trajectory data comprising a plurality of position points and time attributes and spatial attributes of the position points, performing reverse geocoding on the spatial attributes of all position points in the trajectory database to obtain semantic attributes of all position points, and constructing a position semantic classification tree;
[0008] S2, screening sensitive positions from all position points according to the time attributes, spatial attributes and semantic attributes of the position points in the trajectory database, and constructing a sensitive position semantic attribute table;
[0009] S3, abstracting the location points in the trajectory database as nodes, wherein the sensitive locations are abstracted as sensitive nodes, adding the sensitive nodes to the local community C, calculating the increment of the modularity of the local community C after other nodes are added to the local community C, the semantic similarity between the other nodes and the sensitive nodes, screening out the neighbor nodes of the sensitive nodes according to the increment of the modularity and the semantic similarity, and constructing a replacement location candidate table;
[0010] S4, selecting the neighbor node with the highest matching degree from the replacement location candidate table as the replacement node of the sensitive node, reconstructing the trajectory of the mobile object and judging the rationality of the reconstructed trajectory, and if a reasonable trajectory cannot be reconstructed, selecting the replacement node from the replacement location candidate table again to reconstruct again;
[0011] S5, calculating the average similarity of the trajectories before and after reconstruction, evaluating the privacy protection level of the reconstructed trajectory and the availability of the trajectory data, and adding the reconstructed trajectory to the trajectory database.
[0012] Further, the reverse geocoding method of S1 is to obtain the semantic attribute of the location point in the trajectory by calling the reverse address coding API based on the longitude and latitude coordinates in the spatial attribute of the location point, and constructing a location semantic classification tree.
[0013] Further, the method for screening sensitive locations of S2 is:
[0014] setting a time threshold T thres and a speed threshold S thres , calculating the average speed MS between any two location points i and j, the formula being:
[0015] MS = p / T diff
[0016] wherein p represents the Euclidean distance between the two location points i and j, T diff represents the time difference between the two location points i and j.
[0017] If T diff ≥ T thres and MS ≤ S thres between any two location points i and j, the mobile object is considered to stay between the two location points i and j, and the two location points are sensitive locations, and the average location ML of the two sensitive locations is calculated, the formula being:
[0018]
[0019] wherein N mid =j-i+1 represents the number of intermediate location points between the two sensitive locations, x k , y kThe coordinates of the intermediate position point. Further, the method for constructing the sensitive position semantic attribute table S2 is to call the reverse geocoding API to obtain the semantic attribute and the average position coordinates of the average position, and set the semantic attribute of the average position as the semantic attributes of the two sensitive positions.
[0020] Further, the method for calculating the module degree increment and the semantic similarity of S3 is:
[0021] The module degree increment ΔM of the other nodes outside the sensitive node joining the local community C is calculated, and the formula is:
[0022]
[0023] Wherein, M and M' respectively represent the local module degrees before and after the other nodes join the community, C in and C' in respectively represent the number of edges with both endpoints in the community C before and after the other nodes join the community, C out and C' ut respectively represent the number of edges with one endpoint in the community C and the other endpoint outside the community C before and after the other nodes join the community;
[0024] The distance between the two nodes in the location semantic classification tree is represented by dist(i,j), and the level difference between the two nodes in the location semantic classification tree is represented by level(i,j). The formula for the semantic similarity Sim(i,j) of the nodes is:
[0025]
[0026] Further, the screening condition of the neighbor node S3 is to set a similarity threshold Sim thres If the module degree increment ΔM of a node joining the community C is greater than 0, and the semantic similarity Sim(i,j) between the node and the sensitive node is less than Sim thres , the node is added to the local community C and regarded as a neighbor node.
[0027] Further, the method for constructing the replacement position candidate table S3 is to sort all the nodes in the local community C except the sensitive node according to their node matching degree NC, which is obtained by taking a weighted average of ΔM and Sim(i,j), and the formula is:
[0028] NC=αΔM+(1-α)Sim(i,j)
[0029] Wherein, α∈[0,1] represents the weight.
[0030] Further, the reasonable trajectory is judged according to the trajectory shape and the trajectory speed change.
[0031] The average similarity MS of the reconstructed trajectory before and after is weighted and averaged by the average distance MD and the average semantic similarity MSS, and the formula is:
[0032] MS(Tra(i),Tra'(i))=βMD+(1-β)MSS
[0033] Wherein, beta represents the weight, Tra(i) represents the trajectory data in the trajectory database, and Tra'(i) represents the reconstructed trajectory data.
[0034] The application further discloses a trajectory privacy protection system based on community division, which comprises a memory, a processor and computer program instructions stored in the memory and capable of being executed by the processor, and when the processor executes the computer program instructions, the steps of the foregoing method can be realized.
[0035] The application discloses a trajectory privacy protection method and system based on community division, which is based on the trajectory data of mobile objects in a trajectory database and protects the privacy data of the mobile objects. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 A flowchart of the trajectory privacy protection method based on community division;
[0037] Figure 2 A position semantic classification tree in the embodiment of the application;
[0038] Figure 3 A sensitive position semantic attribute table in the embodiment of the application;
[0039] Figure 4 A local community schematic diagram in the embodiment of the application;
[0040] Figure 5 A replacement position alternative table in the embodiment of the application. DETAILED DESCRIPTION
[0041] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the application are further described in detail below in combination with the drawings, and the described embodiments are only a part of the embodiments involved in the present application. All non-innovative embodiments of other researchers in the field on the basis of the embodiments belong to the protection scope of the present application. Meanwhile, the step numbers in the embodiments of the present application are only set for the convenience of description and explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0042] The present application discloses a trajectory privacy protection method based on community division, as shown in Figure 1 , comprising the following steps:
[0043] S1, obtaining the trajectory data of a mobile object and storing the trajectory data into a trajectory database, the trajectory data comprising a plurality of position points and the time attribute and spatial attribute of the position points, performing reverse geocoding on the spatial attribute of all the position points in the trajectory database to obtain the semantic attribute of all the position points, and constructing a position semantic classification tree.
[0044] In the present embodiment, the trajectory data in the original trajectory database is defined as:
[0045] Tra(i)={i,(x1,y1,t1),(x2,y2,t2)…(x n ,y n ,t n )}。
[0046] Wherein {(x i ,y i ,t i ),1≤i≤n} represents the longitude and latitude coordinates of the mobile object at time t i . The semantic attribute of all the position points in the trajectory of the mobile object is obtained by calling the reverse address coding API, and the position semantic classification tree of the mobile object is constructed according to the POI industry classification, as shown in Figure 2 , there are three levels of industry classification, and the corresponding semantic classification also has three levels, and the semantic attributes of each level are gradually subdivided.
[0047] S2, according to the time attribute, spatial attribute and semantic attribute of the position points in the trajectory database, screening out sensitive positions from all the position points, and constructing a sensitive position semantic attribute table;
[0048] In the present embodiment, S2 obtains the longitude and latitude coordinates of the position through the trajectory database of S1, calculates the distance between any two position points {(x i ,y i ,t i ),(x j ,y j ,tj ), 1≤i, j≤n} between the average speed MS, the formula is as follows:
[0049] MS = p / T diff
[0050] Wherein, p represents the Euclidean distance between two position points i, j, T diff represents the time difference between two position points i, j.
[0051] Set time threshold and speed threshold, if the mobile object between any two position points i, j, T diff ≥ time threshold T thres And the average speed MS≤ speed threshold S thres , it can be determined that the mobile object stays between the two position points. If between any two position points i, j, T diff ≥ T thres , and MS≤ S thres , the mobile object is considered to stay between the two position points i, j, the two sensitive positions are the average position ML, the formula is:
[0052]
[0053] Wherein, N mid =j-i+1 represents the number of intermediate position points between the two sensitive positions, x k , y k represent the coordinates of the intermediate position points.
[0054] Call reverse geocoding API to obtain the semantic attribute and average position coordinates of the average position, set the semantic attribute of the average position as the semantic attribute of the two sensitive positions. The sensitive position semantic attribute table of the mobile object is constructed by the latitude and longitude coordinates and semantic attribute of the sensitive position.
[0055] As Figure 3 shown, in this embodiment, the bank and the hospital are the sensitive positions of the mobile object, and the school is the average position of the bank and the hospital. The semantic attribute of the school is defined as the semantic attribute of the sensitive position, the address coding API is called to obtain the latitude and longitude coordinates of the school position, and the relevant information of the school is added to the sensitive position semantic attribute table.
[0056] S3, the position points in the trajectory database are abstracted as nodes, wherein the sensitive positions are abstracted as sensitive nodes, the sensitive nodes are added to the local community C, the modularity increment of the local community C after other nodes except the sensitive nodes are added to the local community C, and the semantic similarity between the other nodes and the sensitive nodes are calculated, the neighbor nodes of the sensitive nodes are screened out according to the modularity increment and the semantic similarity, and the replacement position candidate table is constructed.
[0057] Since each location point is not isolated in real environment, it often has strong connection with its surrounding POI, and these location points and their surrounding POI together form several subgraphs. Each location point is abstracted as a node, and the route between location points is abstracted as an edge.
[0058] The sensitive location semantic attribute table obtained by S2 obtains the sensitive location of the mobile object. Starting from the sensitive node, the increment of modularity ΔM generated by other nodes joining the local community C outside the sensitive node is calculated, and the formula is as follows:
[0059]
[0060] Wherein, M and M' respectively represent the local modularity before and after other nodes join the community, C in and C' n respectively represent the number of edges with both end points in the community C before and after other nodes join the community, C out and C' ut respectively represent the number of edges with one end point in the community C and the other end point outside the community C before and after other nodes join the community.
[0061]
[0062] Wherein, dist(i,j) represents the path distance difference of the semantic attributes of two nodes in the location semantic classification tree, and level(i,j) represents the layer height difference of the semantic attributes of two nodes in the location semantic classification tree.
[0063] The similarity threshold and the node number threshold are set. If the modularity increment ΔM of a node joining the community C is greater than 0, and the semantic similarity Sim(i,j) of the two nodes is less than the similarity threshold Sim thres , the node is regarded as a neighbor node joining the community C. When the number of nodes in the community C reaches the node number threshold N thres or the community radius reaches half of the smaller value of the distance between the sensitive node and the front and rear sensitive nodes, the addition of neighbor nodes is stopped, and the local community C is output.
[0064] Figure 4 For the local community in which the sensitive location s2 in the trajectory data of the mobile object in the embodiment is located, the nodes in the community have strong connection, so suitable nodes can be selected as replacement nodes. The nodes in the local community C except the sensitive node are weighted and averaged according to the modularity increment ΔM and the semantic similarity Sim(i,j) to obtain the node matching degree NC and sorted, and a replacement node candidate table of the sensitive node is constructed, and the formula is as follows:
[0065] NC=αΔM+(1-α)Sim(i,j)
[0066] where a e [0, 1] represents the weight, Figure 5 The replacement node candidate table for a sensitive location in this embodiment. Repeat S3 until the local community and replacement location candidate table for all sensitive locations of the moving object are obtained.
[0067] S4, select the node with the highest matching degree from the replacement location candidate table as the replacement node, try to reconstruct the trajectory, if a reasonable trajectory cannot be reconstructed, return to select the replacement node again.
[0068] According to the replacement location candidate table obtained in S3, select the node with the highest matching degree as the replacement node, and try to reconstruct the trajectory of the moving object.
[0069] In order to avoid unreasonable changes in the trajectory, part of the insensitive nodes also need to be replaced. In addition, the spatiotemporal accessibility also needs to be considered. If the speed of the moving object changes greatly, another suitable replacement node needs to be selected to reconstruct the trajectory. Repeat S4 until a reasonable trajectory is reconstructed, denoted as
[0070] Tra'(i) = {i, (x1, y1, t1), (x2, y2, t2)…(x n ,y n ,t n )}.
[0071] S5, calculate the average similarity of the reconstructed trajectory and the original trajectory, evaluate the privacy protection level of the reconstructed trajectory and the availability of the trajectory data, and add it to the processed trajectory database.
[0072] According to the reconstructed trajectory obtained in S4, calculate the average distance MD of the reconstructed trajectory and the original trajectory, the formula is as follows:
[0073]
[0074] Where (x j ,y j ), (x′ j ,y′ j ) represent the longitude and latitude coordinates of the trajectory before and after reconstruction, N loc represents the total number of trajectory position points.
[0075] Calculate the average semantic similarity MSS of the reconstructed trajectory and the original trajectory, the formula is as follows:
[0076]
[0077] Where N sen represents the number of nodes corresponding to sensitive locations.
[0078] The average distance MD and the average semantic similarity MSS are weighted and averaged to obtain the average similarity MS of the trajectory before and after reconstruction, and the formula is as follows:
[0079] MS(Tra(i),Tra'(i))=βMD+(1-β)MSS
[0080] Wherein, beta belongs to [0, 1] and represents a weight.
[0081] The higher the average similarity MS is, the less the key data missing of the reconstructed trajectory is, and the higher the availability of the trajectory data is, and vice versa, which indicates that the reconstructed trajectory hides the key information of the mobile object and improves the privacy protection level of the trajectory. Therefore, further setting a balance weight Phi between the two can improve the privacy protection level of the mobile object trajectory as much as possible while sacrificing less data availability, thereby resisting semantic reasoning attacks.
[0082] The application further discloses a trajectory privacy protection system based on community division, which comprises a memory, a processor and computer program instructions stored in the memory and capable of being executed by the processor, and when the processor executes the computer program instructions, the steps of the foregoing method can be realized.
[0083] The above only describes the preferred embodiments of the present application, and it should be pointed out that for ordinary skilled persons in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A trajectory privacy protection method based on community division, characterized in that, The method comprises the following steps: S1, obtaining trajectory data of a mobile object and storing the trajectory data into a trajectory database, the trajectory data comprising a plurality of position points and time attributes and space attributes of the position points, performing reverse geocoding on the space attributes of all the position points in the trajectory database to obtain semantic attributes of all the position points, and constructing a position semantic classification tree; S2, screening sensitive positions from all the position points according to the time attributes, the space attributes and the semantic attributes of the position points in the trajectory database, and constructing a sensitive position semantic attribute table; S3, abstracting the position points in the trajectory database into nodes, wherein the sensitive positions are abstracted into sensitive nodes, adding the sensitive nodes into a local community C, calculating a modularity increment of the local community C after other nodes except the sensitive nodes are added into the local community C, calculating semantic similarity between the other nodes and the sensitive nodes, screening neighbor nodes of the sensitive nodes according to the modularity increment and the semantic similarity, and constructing a replacement position candidate table; S4, selecting a neighbor node with the highest matching degree from the replacement position candidate table as a replacement node of the sensitive node, reconstructing a trajectory of the mobile object and judging rationality of the reconstructed trajectory, if a rational trajectory cannot be reconstructed, selecting a replacement node from the replacement position candidate table again to reconstruct again; S5, calculating average similarity of the trajectory before and after reconstruction, evaluating a privacy protection level of the reconstructed trajectory and availability of the trajectory data, and adding the reconstructed trajectory into the trajectory database.
2. The trajectory privacy protection method of claim 1, wherein, The reverse geocoding method in S1 comprises the following steps:
3. The trajectory privacy protection method of claim 2, wherein, The method for screening sensitive positions in S2 comprises the following steps: Setting a time threshold T thres and a speed threshold S thres , calculating the average speed MS between any two position points i, j, the formula is: MS = p / T diff wherein p represents the Euclidean distance between two location points i, j, T diff denotes the time difference between two location points i, j; If between any two position points i, j, T diff ≥ T thres , and MS≤ S thres , then the mobile object is considered to stay between the two position points i, j, and the two position points are sensitive positions. The average position ML of the two sensitive positions is calculated as follows: where N mid = j - i + 1 represents the number of intermediate position points between the two sensitive positions, x k , y k represent the coordinates of the intermediate position points.
4. The trajectory privacy protection method of claim 3, wherein, The method for constructing the sensitive position semantic attribute table in S2 comprises the following steps:
5. The trajectory privacy protection method of claim 4, wherein, The method for calculating the modularity increment and the semantic similarity in S3 comprises the following steps: The modularity increment ΔM generated when other nodes except the sensitive nodes are added into the local community C is calculated, and the formula is as follows: where M and M' represent the local modularity before and after the other node joins the community, respectively, C in and C' in represent the number of edges with both endpoints in the community C before and after the other node joins the community, respectively, C out and C' out represent the number of edges with one endpoint in the community C and the other endpoint outside the community C before and after the other node joins the community, respectively. The semantic similarity Sim(i,j) of two nodes i and j is calculated, and the formula is as follows: Wherein, dist(i,j) represents a path distance difference value of semantic attributes of two nodes in the position semantic classification tree, and level(i,j) represents a layer height difference value of the semantic attributes of the two nodes in the position semantic classification tree.
6. The trajectory privacy protection method of claim 5, wherein, The screening condition of the neighbor node S3 is to set a similarity threshold Sim thres If the module increment ΔM of a certain node joining the community C is greater than 0, and the semantic similarity Sim(i,j) between the node and the sensitive node is less than Sim thres The node is added to the local community C and regarded as a neighbor node.
7. The trajectory privacy protection method of claim 6, wherein, The method for constructing the replacement position candidate table in S3 comprises the following steps: All the neighbor nodes in the local community C except the sensitive nodes are sorted according to node matching degrees NC thereof, the node matching degree is obtained by taking a weighted average of ΔM and Sim(i,j), and the formula is as follows: NC=αΔM+(1-α)Sim(i,j) 8. The trajectory privacy protection method of claim 7, wherein, Wherein, α∈[0,1] represents a weight.
9. The trajectory privacy protection method of claim 8, wherein, The rational trajectory in S4 is judged according to a trajectory shape and a trajectory speed change. The average similarity MS of the trajectory before and after reconstruction in S4 is obtained by taking a weighted average of an average distance MD and an average semantic similarity MSS, and the formula is as follows: MS(Tra(i),Tra′(i))=βMD+(1-β)MSS Wherein, β∈[0,1] represents weight, Tra(i) represents trajectory data in trajectory database, Tra'(i) represents reconstructed trajectory data. 10.A trajectory privacy protection system based on community division, characterized in that, The computer program product comprises a memory, a processor, and computer program instructions stored on the memory and capable of being executed by the processor, and when the processor executes the computer program instructions, the method steps in any one of claims 1 to 9 can be implemented.