K-anonymity trajectory privacy protection method and system based on sub-trajectory similarity
By employing a k-anonymity method based on sub-trajectory similarity to filter and segment trajectories, and combining multiple similarities to generate virtual trajectories, the computational burden and vulnerability to attacks of existing methods are resolved, achieving efficient trajectory privacy protection.
Patent Information
- Application Number
- CN202310143186.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-02-21
AI Technical Summary
Existing trajectory privacy protection methods are computationally burdensome and difficult to resist attacks from adversaries, failing to meet the needs of real-time applications.
A k-anonymity trajectory privacy protection method based on sub-trajectory similarity is adopted. By filtering and segmenting the trajectory and combining temporal, spatial and semantic similarity, a virtual trajectory indistinguishable from the real trajectory is generated to achieve k-anonymity protection.
It reduces the amount of computation, makes it easier for attackers to judge the real trajectory, generates more similar virtual trajectories, and improves the effectiveness of trajectory privacy protection.
Smart Images

Figure CN116170796B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of privacy protection and information security, and relates to a trajectory privacy protection method and system, in particular to a privacy protection method and system based on k-anonymity and sub-trajectory similarity screening. BACKGROUND
[0002] With the development of mobile devices and networks, users with mobile devices pay more and more attention to their privacy. Location-based service (LBS) has a very large user base. LBS provides some related services to users by using mobile device positioning, global satellite positioning or WiFi access point positioning technology. However, these service systems often collect users' location data without their knowledge and analyze and process these data to obtain users' private information.
[0003] Since 2003, scholars have carried out research on location privacy protection technology. However, as the research deepens, scholars have found that it is not enough to only protect users' location data. Therefore, on the basis of location privacy protection, a trajectory privacy protection method is proposed. At present, although some k-anonymity methods based on trajectory similarity have been proposed, these methods often only use one kind of similarity and cannot effectively and comprehensively resist attacks by an adversary. In addition, these methods anonymize each location of a user and then form a virtual trajectory based on the obtained anonymous location points. This processing has the disadvantage of heavy computational burden and is not conducive to the application requirements of real-time trajectory privacy protection. SUMMARY
[0004] The main purpose of the present application is to solve the above-mentioned deficiencies in the trajectory privacy protection method and provide a k-anonymity trajectory privacy protection method and system based on sub-trajectory similarity.
[0005] The technical scheme adopted by the method of the present application is as follows: a k-anonymity trajectory privacy protection method based on sub-trajectory similarity, comprising the following steps:
[0006] Step 1: From all historical trajectories, filter out historical trajectories whose start point and end point positions are the same as those of a user's real trajectory, denoted by symbol ST, and ST contains m historical trajectories;
[0007] Step 2: Find the local extreme points in the user's real trajectory, and arrange the local extreme points, the start point and the end point of the real trajectory into a position sequence in time order. If there are n-2 local extreme points in the user's real trajectory, the position sequence is denoted by symbol {p1, p2,..., pn}, where p1 and pn represent the start point and end point of the real trajectory, respectively, and p2, p3,..., pn-1 represent the local extreme points. n n} represents the position sequence, where p1 and pn represent the start point and end point of the real trajectory, respectively, and p2, p3,..., pn-1 represent the local extreme points.n-1 representing local extreme points in the real trajectory;
[0008] Step 3: cutting the real trajectory of the user according to the position sequence to obtain a real sub-trajectory set with a size of n-1;
[0009] Step 4: cutting each historical trajectory in the historical trajectory set according to the position sequence to obtain a corresponding historical sub-trajectory set with a size of n-1;
[0010] Step 5: calculating a plurality of similarities between each real sub-trajectory and all sub-trajectories in the corresponding historical sub-trajectory set, and screening to form a candidate sub-trajectory set corresponding to the real sub-trajectory;
[0011] Step 6: screening the sub-trajectories in the candidate sub-trajectory set by the area of the closed region formed by the real sub-trajectory and the historical sub-trajectory in the corresponding candidate sub-trajectory to form a corresponding candidate sub-trajectory set;
[0012] Step 7: randomly selecting t sub-trajectories from the n candidate sub-trajectory sets, arranging and combining the sub-trajectories to obtain k-1 virtual trajectories that cannot be distinguished from the real trajectory, forming k-anonymity of the trajectory, and realizing k-anonymity privacy protection of the real trajectory.
[0013] The technical scheme adopted by the system of the application is: a k-anonymity trajectory privacy protection system based on sub-trajectory similarity, comprising the following modules:
[0014] Module 1 is used for screening historical trajectories with the same start point position and end point position as the start point position and end point position of the real trajectory of the user from all historical trajectories, denoted by symbol ST, and ST contains m historical trajectories;
[0015] Module 2 is used for finding local extreme points in the real trajectory of the user, which are arranged in a position sequence together with the start point and the end point of the real trajectory according to time; if there are n-2 local extreme points in the real trajectory of the user, the position sequence is denoted by symbol {p1, p2,..., pn}, wherein p1 and pn represent the start point position and the end point position of the real trajectory respectively, and p2, p3,..., pn-1 represent local extreme points in the real trajectory; n n n-1 representing local extreme points in the real trajectory;
[0016] Module 3 is used for cutting the real trajectory of the user according to the position sequence to obtain a real sub-trajectory set with a size of n-1;
[0017] Module 4 is used for cutting each historical trajectory in the historical trajectory set according to the position sequence to obtain a corresponding historical sub-trajectory set with a size of n-1;
[0018] Module 5, for calculating multiple similarities between each real sub-trajectory and all sub-trajectories in the corresponding historical sub-trajectory set, and screening to form a candidate sub-trajectory set corresponding to the real sub-trajectory;
[0019] Module 6, for screening sub-trajectories in the candidate sub-trajectory set by the area of the closed region formed by the real sub-trajectory and the historical sub-trajectory in the corresponding candidate sub-trajectory to form a corresponding candidate sub-trajectory set;
[0020] Module 7, for randomly selecting t sub-trajectories from n candidate sub-trajectory sets, and performing permutation and combination on the sub-trajectories to obtain k-1 virtual trajectories indistinguishable from the real trajectory, forming k-anonymity of the trajectory, and realizing k-anonymity privacy protection of the real trajectory.
[0021] The present application has the following beneficial effects:
[0022] The attack method of the continuous LBS request position anonymity algorithm in the present application reduces the amount of calculation compared with the traditional scheme by replacing the similarity of the position points with the similarity of the sub-trajectories when actually operating; at the same time, the combination of multiple similarities also makes it more difficult for the attacker to judge the real trajectory of the user, thereby reducing the risk of the real trajectory of the user being leaked, protecting the trajectory privacy of the user to a certain extent; and in the virtual trajectory generation stage, a more scientific selection scheme is used to obtain virtual trajectories with higher scores, i.e. virtual trajectories more similar to the real trajectory of the user are generated. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The method flowchart of the embodiment of the present application is shown in the figure;
[0024] Figure 2 The specific embodiment diagram of the triangular division method in the embodiment of the present application is shown in the figure;
[0025] Figure 3 The centralized architecture schematic diagram of one of the application scenarios of the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0026] In order to facilitate those skilled in the art to understand and implement the present application, the present application is further described in detail below in combination with the drawings and embodiments, and it should be understood that the embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application.
[0027] See Figure 1 The present application provides a k-anonymous trajectory privacy protection method based on sub-trajectory similarity, comprising the following steps:
[0028] Step 1: Select historical trajectories from all historical trajectories whose starting and ending positions are the same as the starting and ending positions of the user's real trajectory to form a set of historical trajectories for generating virtual trajectories, denoted by the symbol ST. Assume that ST contains m historical trajectories.
[0029] Step 2: Find the local extreme points in the user's actual trajectory and arrange them together with the start and end points of the actual trajectory in a position sequence according to time;
[0030] Suppose there are n–2 local extrema, and the sequence of their locations is denoted by {p1, p2, ..., p...}. n} represents, where p1 and p n Let p2, p3, ..., p represent the starting and ending positions of the actual trajectory, respectively. n-1 This represents a local extremum in the true trajectory, where a local extremum is defined as a point where the monotonicity of the trajectory function changes. The specific formula is: |l (i-1,i) -l (i,i+1) |>|l (i-1,i) |,|l (i-1,i) | represents the location point p i-1 With position point p i The absolute value of the slope of the line connecting them, |l (i,i+1) | represents the location point p i With position point p i+1 The absolute value of the slope of the line connecting the two points.
[0031] Step 3: Based on the position sequence {p1, p2, ..., p n The user's actual trajectory is divided into a set of actual subtrajectories of size n–1 (denoted by SUB-T), where the first actual subtrajectory (denoted by t1) is the subtrajectory between positions p1 and p2 in the actual trajectory, the second actual subtrajectory (denoted by t2) is the subtrajectory between positions p2 and p3 in the actual trajectory, and so on, up to the (n–1)th actual subtrajectory (denoted by t... n-1 (represented by) is the position p in the actual trajectory. n-1 and position p n The sub-trajectories between, i.e., SUB-T = {t1, t2, ..., t} n-1};
[0032] Step 4: Based on the position sequence {p1, p2, ..., p n The set of m historical trajectories is divided into a set of n–1 historical sub-trajectories (denoted by subT), i.e., subT = {subT1, subT2, ..., subT}. n-1}, where each historical sub-track set subTi The size of (i = 1, 2, ..., n–1) is the number m of historical trajectories in the historical trajectory set ST. The first historical sub-trajectory set subT1 is the set of sub-trajectories between positions p1 and p2 of the m historical trajectories contained in the historical trajectory set ST (denoted by subT1 = {st 1,1 ,st 1,2 ,……,st 1,m The second historical sub-track set, subT2, is the set of sub-tracks between positions p2 and p3 of the m historical tracks contained in the historical track set ST (denoted by subT2 = {st}). 2,1 ,st 2,2 ,……,st 2,m}, ..., the (n-1)th historical sub-trajectory set subT n-1 It is the position p of the m historical trajectories contained in the historical trajectory set ST. n-1 and position p n The set of sub-trajectories between them (denoted by the symbol subT) n-1 ={st n-1,1 ,st n-1,2 ,……,st n-1,m};
[0033] Step 5: Calculate the sub-trajectory t in the true sub-trajectory set. i With the i-th historical sub-track set subT i The subtrajectories in (i = 1, 2, ..., n–1) exhibit various similarities, including temporal similarity, spatial similarity, and semantic similarity; that is, the subtrajectories t are calculated. i With st i,1 Between, t i With st i,2 Between, ..., t i With st i,m The similarity between trajectories is assessed using multiple similarity criteria, including temporal similarity, spatial similarity, and semantic similarity. Historical sub-trajectories that simultaneously fall below set thresholds for temporal similarity, spatial similarity, and semantic similarity are selected to form a candidate sub-trajectory set (denoted by subT′). i (i = 1, 2, ..., n–1);
[0034] Step 5.1: Calculate the trajectory intersection time between the real sub-trajectory and the historical sub-trajectory, and use this to calculate the time similarity. Finally, use the time threshold to filter the historical sub-trajectory.
[0035] Step 5.2: Calculate the spatial similarity of each position point in the real sub-trajectory and the historical sub-trajectory screened in step 5.1 by using the method of Longest Common Subsequence (LCSS), and then calculate the spatial similarity of the two sub-trajectories, and finally screen the historical sub-trajectory by using the spatial threshold;
[0036] Step 5.3: Calculate the semantic similarity of the real sub-trajectory and the historical sub-trajectory screened in step 5.2 based on wordnet, and screen the historical sub-trajectory by using the semantic threshold;
[0037] Step 5.4: Based on the above three steps, the historical sub-trajectory meeting the threshold can be selected, and the historical sub-trajectory screened in step 5.3 forms the candidate sub-trajectory set.
[0038] Step 6: Calculate the candidate sub-trajectory set subT′ i (i = 1, 2, …, n-1) and the real sub-trajectory t i , screen the candidate sub-trajectory with the area smaller than the set area threshold, and form the candidate sub-trajectory set (denoted as subT″ i , i = 1, 2, …, n-1);
[0039] Step 6.1: Based on the real sub-trajectory t i in step 3 and the candidate sub-trajectory set subT′ i in step 5, the real sub-trajectory and the candidate sub-trajectory can form a closed area, and the area of the closed area formed by the real sub-trajectory and each candidate sub-trajectory is calculated by using the triangle division method;
[0040] See Figure 2 , the dashed line represents the real sub-trajectory, and the solid line represents the candidate sub-trajectory. The specific steps of calculating the area of the closed area formed by the real sub-trajectory and the candidate sub-trajectory by using the triangle division method are as follows: assuming that the position points on the real sub-trajectory are {(x1, y1), (x2, y2), …, (x n , y n )}, and the position points on the candidate sub-trajectory are {(a1, b1), (a2, b2), …, (a m , b m )}, wherein (x1, y1) = (a1, b1), (x n , y n ) = (a m , b m), first, according to the first two position points (x1, y1), (x2, y2) on the real sub-trajectory and the second position point (a2, b2) on the historical sub-trajectory, the area S1 of the triangle formed by the three position points can be calculated through the following formula: S1 = (1 / 2) × (x1y2 + x2b2 + a2y1 - x1b2 - x2y1 - a2y2), then the area S2 of the triangle formed by the two position points (x2, y2), (x3, y3) on the real sub-trajectory and the second position point (a2, b2) on the historical sub-trajectory is calculated, and so on, until the area S n-1 of the triangle formed by the last two position points (x n-1 , y n ), (x n , y n-1 ) on the real sub-trajectory and the second position point (a2, b2) on the historical sub-trajectory is calculated, then the area S m-1 of the triangle formed by the position points (a2, b2), (a m-1 , b m ), (a m , b n ) on the historical sub-trajectory is calculated, then the area S m-2 of the triangle formed by the position points (a2, b2), (a m-2 , b m-1 ), (a m-1 , b n+1 ) on the historical sub-trajectory is calculated, and so on, until the area S n+m-4 of the triangle formed by the position points (a2, b2), (a3, b3), (a4, b4) on the historical sub-trajectory is calculated, and finally the sum of the areas of all the triangles is added as the area S of the closed region = S1 + S2 + … + S n+m-4 .
[0041] Step 6.2: comparing the area S calculated in step 6.1 with the area threshold, removing the candidate sub-trajectories whose closed region areas are greater than the area threshold, to obtain a candidate sub-trajectory set;
[0042] Step 7: based on the candidate sub-trajectory set SUB-T″ = {subT″1, subT″2, …, subT″ n-1}, candidate sub-trajectories are selected from subT″1, subT″2, …, subT″ n-1 to form a virtual trajectory;
[0043] Step 7.1: randomly selecting sub-trajectories from subT″1, subT″2, …, subT″ n-1 in turn;
[0044] Step 7.2: The sub-tracks are arranged and combined to obtain k-1 virtual tracks which are indistinguishable from the real track, forming k-anonymity of the track, effectively protecting the track privacy of the mobile object, and sending the tracks together to the LBS provider for subsequent operation.
[0045] See Figure 3 The common architecture in track privacy protection is centralized architecture, and the embodiments of the present application are further described based on the architecture. The system architecture used in the embodiments is described as follows: a user sends a track service request (for example, a vehicle track tracking request) to a trusted track anonymization server, the track anonymization server sends the track of the user to an LBS service provider after anonymizing the track, the LBS service provider serves the request and returns a service result to the track anonymization server, the track anonymization server sends the service result to the user, and the user can complete the request without revealing the specific track route to the LBS service provider. It can be known that the main purpose of the present application is to process the location of the user by the track anonymization server, so as to obtain an anonymous location set, and finally achieve the purpose of track privacy protection.
[0046] The method provided by the present application can be applied to track data privacy protection of some mobile objects, so as to protect the track privacy of the user, and can be applied to vehicle track privacy protection, urban traffic planning, vehicle track analysis and other application scenarios.
[0047] It should be understood that the above description of the preferred embodiments is detailed, and therefore should not be considered as a limitation on the scope of patent protection of the present application. Those skilled in the art can make substitutions or modifications without departing from the scope of protection of the present application, and all fall within the scope of protection of the present application. The scope of protection of the present application should be subject to the appended claims.
Claims
1. A k-anonymity trajectory privacy protection method based on sub-trajectory similarity, characterized in that, The method comprises the following steps: Step 1: filtering historical trajectories with the same start and end positions as the real trajectory from all historical trajectories, denoted as ST, wherein ST comprises m historical trajectories; Step 2: find the local extreme points in the real trajectory of the user, and arrange them in a position sequence together with the start and end points of the real trajectory in time; if there are n-2 local extreme points in the real trajectory of the user, the position sequence is represented by the symbol {p1, p2,..., pn}, where p1 and pn represent the start and end positions of the real trajectory respectively, and p2, p3,..., pn-1 represent the local extreme points in the real trajectory. n} indicates, where p1 and pn represent the start and end positions of the real trajectory respectively, and p2, p3,..., pn-1 represent the local extreme points in the real trajectory. n} indicates, where p1 and pn represent the start and end positions of the real trajectory respectively, and p2, p3,..., pn-1 represent the local extreme points in the real trajectory. n-1} indicates, where p1 and pn represent the start and end positions of the real trajectory respectively, and p2, p3,..., pn-1 represent the local extreme points in the real trajectory. Step 3: cutting the real trajectory according to the position sequence to obtain a real sub-trajectory set with a size of n-1; Step 4: cutting each historical trajectory in the historical trajectory set according to the position sequence to obtain a corresponding historical sub-trajectory set with a size of n-1; Step 5: calculating multiple similarities between each real sub-trajectory and all sub-trajectories in the corresponding historical sub-trajectory set, and screening to form a candidate sub-trajectory set corresponding to the real sub-trajectory; Among them, the sub-trajectory t in the true sub-trajectory set is calculated. i With the i-th historical sub-track set subT i The temporal, spatial, and semantic similarities between each sub-trajectory in the dataset are calculated, i.e., the sub-trajectory t is computed. i With st i,1 Between, t i With st i,2 Between, ..., t i With st i,m The temporal, spatial, and semantic similarities between the trajectories are analyzed, and historical sub-trajectories that simultaneously fall below the set thresholds for temporal similarity, spatial similarity, and semantic similarity are selected to form a candidate sub-trajectory set subT′. i ,i=1,2,...,n-1; Step 6: screening sub-trajectories in the candidate sub-trajectory set by the area of a closed region formed by the real sub-trajectory and historical sub-trajectories in the candidate sub-trajectory set to form a corresponding candidate sub-trajectory set; Step 7: randomly selecting t sub-trajectories from n candidate sub-trajectory sets, arranging and combining the sub-trajectories to obtain k-1 virtual trajectories that cannot be distinguished from the real trajectory, forming k-anonymity of the trajectory, and realizing k-anonymity privacy protection of the real trajectory. 2.The k-anonymity trajectory privacy protection method based on sub-trajectory similarity according to claim 1, characterized in that: In step 2, the definition of the local extreme point is a point at which the monotonicity of the trajectory function changes, and the specific formula is: I (i-1,i) -1 (i,i+1) | | I (i-1,i) | | I (i-1,i) | represents the absolute value of the slope of the line between position point p i-1 and position point p i . | | I (i,i+1) | represents the absolute value of the slope of the line between position point p i and position point p i+1 . 3.The k-anonymity trajectory privacy protection method based on sub-trajectory similarity according to claim 1, characterized in that: In step 3, based on the position sequence {p1,p2,...,p...} n The user's actual trajectory is divided into a set of actual subtrajectories SUB-T of size n-1, where the first actual subtrajectory t1 is the subtrajectory between positions p1 and p2 in the actual trajectory, the second actual subtrajectory t2 is the subtrajectory between positions p2 and p3 in the actual trajectory, and so on, up to the (n-1)th actual subtrajectory t... n-1 It is the position p in the actual trajectory. n-1 and position p n The sub-trajectories between, i.e., SUB-T = {t1, t2, ..., t} n-1 } 4.The k-anonymity trajectory privacy protection method based on sub-trajectory similarity according to claim 1, characterized in that: In step 4, based on the position sequence {p1,p2,...,p...} n The set of m historical trajectories in the historical trajectory set is divided into a set of historical sub-trajectories of size n-1, called SUB-STS, i.e., subT = {subT1, subT2, ..., subT...}. n-1 }, where each historical sub-track set subT i The size of the set is the number of historical trajectories m in the historical trajectory set ST, i = 1, 2, ..., n-1; the first historical sub-trajectory set subT1 is the set of sub-trajectories between positions p1 and p2 of the m historical trajectories contained in the historical trajectory set ST, subT1 = {st 1,1 ,st 1,2 ,……,st 1,m The second historical sub-track set subT2 is the set of sub-tracks between positions p2 and p3 of the m historical tracks contained in the historical track set ST. subT2 = {st 2,1 ,st 2,2 ,……,st 2,m }, ..., the (n-1)th historical sub-trajectory set subT n-1 It is the position p of the m historical trajectories contained in the historical trajectory set ST. n-1 and position p n The set subT consisting of the subtrajectories between them n-1 ={st n-1,1 ,st n-1,2 ,……,st n-1,m } 5. The k-anonymity trajectory privacy protection method based on sub-trajectory similarity according to claim 4, characterized in that: In step 5, the trajectory intersection time of the real sub-trajectory and the historical sub-trajectory is calculated, and the time similarity is calculated based on the trajectory intersection time; the longest common subsequence method is used to calculate the spatial similarity of each position point in the real sub-trajectory and the historical sub-trajectory screened by the time threshold, and the spatial similarity of the two sub-trajectories is further calculated; the spatial threshold is used to screen the historical sub-trajectory; the semantic similarity of the real sub-trajectory and the historical sub-trajectory screened by the spatial threshold is calculated based on wordnet, and the semantic threshold is used to screen the historical sub-trajectory; the historical sub-trajectories screened through the above steps form the candidate sub-trajectory set. 6.The k-anonymity trajectory privacy protection method based on sub-trajectory similarity according to claim 1, characterized in that: In step 6, based on the real sub-trajectory in step 3 and the candidate sub-trajectory set in step 5, a closed region is formed by the real sub-trajectory and the candidate sub-trajectory, and the area S of the closed region formed by the real sub-trajectory and each candidate sub-trajectory is calculated by using the triangle division method; the area S is compared with the area threshold, and the candidate sub-trajectory with an area greater than the area threshold is removed to obtain the candidate sub-trajectory set.
7. The k-anonymity trajectory privacy protection method based on sub-trajectory similarity according to any one of claims 1-6, characterized in that: In step 7, the set of candidate sub-trajectories, SUB-T″={subT″1,subT″2,……,subT″, is used. n-1 }, respectively from subT″1, subT″2, ..., subT″ n-1 Candidate sub-trajectories are selected from subT″1, subT″2, ..., subT″ to form a virtual trajectory; sequentially from subT″1, subT″2, ..., subT″2. n-1 Random selection Sub-trajectories; these sub-trajectories are arranged and combined to obtain k-1 virtual trajectories that are indistinguishable from the real trajectories, forming the k-anonymity of the trajectory. 8.A k-anonymity trajectory privacy protection system based on sub-trajectory similarity, characterized in that, The method comprises the following modules: Module 1 is configured to filter historical trajectories with the same start and end positions as the real trajectory from all historical trajectories, denoted as ST, wherein ST comprises m historical trajectories; Module 2 is used to find local extrema in the user's actual trajectory and arrange them together with the start and end points of the actual trajectory into a position sequence according to time. If there are n-2 local extrema in the user's actual trajectory, the position sequence is represented by the symbols {p1, p2, ..., p...}. n } represents, where p1 and p n Let p2, p3, ..., p represent the starting and ending positions of the actual trajectory, respectively. n-1 This represents a local extreme point in the true trajectory; Module 3 is configured to cut the real trajectory according to the position sequence to obtain a real sub-trajectory set with a size of n-1; Module 4 is configured to cut each historical trajectory in the historical trajectory set according to the position sequence to obtain a corresponding historical sub-trajectory set with a size of n-1; Module 5 is configured to calculate multiple similarities between each real sub-trajectory and all sub-trajectories in the corresponding historical sub-trajectory set, and screen to form a candidate sub-trajectory set corresponding to the real sub-trajectory; Module 5 is configured to calculate multiple similarities between each real sub-trajectory and all sub-trajectories in the corresponding historical sub-trajectory set, and screen to form a candidate sub-trajectory set corresponding to the real sub-trajectory; wherein, the time similarity, the space similarity and the semantic similarity between each sub-trajectory t i in the i-th historical sub-trajectory set subT i i.e. the time similarity, the space similarity and the semantic similarity between t i and st i,1 , t i and st i,2 , …, t i and st i,m , are calculated, and the historical sub-trajectories that are simultaneously less than the set time similarity threshold, the space similarity threshold and the semantic similarity threshold are screened out to form the candidate sub-trajectory set subT′ i , i = 1, 2, …, n-1; Module 6, for screening sub-trajectories in the candidate sub-trajectory set by the area of the closed region formed by the real sub-trajectory and the historical sub-trajectory in the corresponding alternative sub-trajectory to form a corresponding candidate sub-trajectory set; Module 7, for randomly selecting t sub-trajectories from the n candidate sub-trajectory sets, and performing permutation and combination on the sub-trajectories to obtain k-1 virtual trajectories indistinguishable from the real trajectory, forming k-anonymity of the trajectory, and realizing k-anonymity privacy protection of the real trajectory.