A privacy-preserving trajectory similarity query method
By using the two-way trajectory similarity measurement method and Heron's formula method to calculate trajectory similarity in an encrypted environment, combined with secure pruning and homomorphic encryption technology, the problem of trajectory similarity query with efficient privacy protection is solved, and efficient and secure query in cloud computing are realized. .
Patent Information
- Application Number
- CN202111202210.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-15
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-10-15
AI Technical Summary
The existing technology has high computational costs in privacy-preserving trajectory similarity queries, and it is difficult to achieve efficient cloud computing queries under data encryption conditions.
It uses a two-way trajectory similarity measurement method, safe pruning of trajectories based on grid signatures, and Helen's formula method to calculate the minimum distance from a point to a line segment, and calculates trajectory similarity in an encrypted environment through secure multiplication and division protocols to ensure that data privacy is not leaked.
It achieves efficient and secure trajectory similarity query in the cloud environment, reduces computing costs, meets the need to protect privacy, and improves query accuracy.
Smart Images

Figure CN113886466B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a privacy-protecting trajectory similarity query method. Background Art
[0002] With the rapid development of wireless communication and mobile computing technologies, the scale of trajectory data obtained by all walks of life has become unprecedentedly large. In order to efficiently process this data, trajectory similarity query is proposed. Trajectory similarity query is an important operation in many applications. For example, in navigation systems, frequent routes can be mined from similar trajectories and used to recommend better routes for ordinary users. In government road planning, many roads covered by trajectories can be mined, and the government can use them to build new roads to reduce the burden on major roads. Both applications require calculating the similarity of trajectories and querying the most similar trajectories.
[0003] In order to save computing costs, the trajectory data similarity query service can also be outsourced to the cloud computing platform to enjoy the cheap data storage and management services in the outsourcing environment. However, in some large companies, trajectory data is usually regarded as a trade secret and is prohibited from being obtained by any competitors and unauthorized third parties. For example, in the navigation system, the navigation system company needs to encrypt the trajectory data and outsource it to the cloud computing platform for calculation in order to perform similarity query operations on a large amount of trajectory data without leaking the user's location information. Therefore, how to perform cloud computing query on the trajectory under the condition of data encryption is an important issue.
[0004] At present, there have been many studies on trajectory similarity query and privacy-preserving trajectory similarity calculation. Trajectory similarity calculation is the premise of trajectory similarity query. Trajectory similarity query can only be performed after the similarity is calculated. But from the current point of view, the result of similarity calculation must meet a certain accuracy before similarity query can be performed on the trajectory. However, improving the accuracy of the result will inevitably increase the amount of calculation. However, the computational cost of privacy-preserving trajectory similarity calculation is already very high, so the computational cost of privacy-preserving trajectory similarity query will definitely be higher.
[0005] Therefore, it is an urgent problem to provide a method that can meet the needs of trajectory similarity query while ensuring data security and realize safe, efficient and privacy-protecting trajectory similarity query in cloud environment. Summary of the invention
[0006] In view of this, the present invention discloses a privacy-preserving trajectory similarity query method, which meets the needs of trajectory similarity query while ensuring data security, and realizes a safe, efficient and privacy-preserving trajectory similarity query in a cloud environment.
[0007] The technical solution provided by the present invention is specifically a privacy-preserving trajectory similarity query method, comprising the following steps:
[0008] S1: Calculate the similarity of the trajectory set based on the bidirectional trajectory similarity measurement method;
[0009] S2: securely prune the trajectory based on the grid signature to obtain the pruned trajectory set;
[0010] S3: Using the pruned trajectory set, a new secure point-to-line segment minimum distance calculation protocol is formulated based on the security subprotocol to calculate the minimum distance between the point and the line segment that protects privacy;
[0011] S4: Use the pruned trajectory set and apply the bidirectional trajectory similarity measurement method. Substitute the minimum distance result from the point to the line segment into the trajectory similarity measurement method to obtain the trajectory similarity required by the final requirement. According to the sorting of the trajectory similarity results, the similar trajectories required by the query are finally obtained.
[0012] Furthermore, the S1 is: after the user makes a trajectory similarity query request, find a trajectory set similar to the trajectory to be queried, use a bidirectional trajectory similarity measurement method, and use a safe multiplication protocol, a safe division protocol, and a safe minimum calculation protocol to calculate the trajectory similarity between trajectory pairs; specifically, it includes the following:
[0013] The bidirectional trajectory similarity measurement method calculates the similarity between trajectories. The bidirectional trajectory similarity measurement method is shown in the following formula:
[0014]
[0015] in is the minimum distance from a point to a line segment, |T i |with|T j |T i and T j The number of sampling points is obtained by formula (1) i and T j The real similarity of
[0016] The minimum distance from a point to a line segment is defined as:
[0017]
[0018] in is the trajectory T i The kth sampling point in T j The line segment between a certain sampling point and the next sampling point in the graph; by formula (2) With T j The minimum value of each l distance in ;
[0019] The standardization algorithm is as follows:
[0020]
[0021] D max is the maximum allowed distance between given trajectories, if Greater than D max , then determine to T j The distance is infinite, otherwise the distance is calculated; from formula (3) we get With T j The minimum distance.
[0022] The S2 comprises the following steps: generating a secure trajectory grid signature for the trajectory according to the trajectory data set; i The abstract representation is a set of grids. The grids that a trajectory passes through are the grid signatures of the trajectory. Trajectories that do not meet the conditions are pruned.
[0023] According to the similarity measurement method of bidirectional mapping similarity, if the distance between the sampling point of a trajectory and another trajectory is greater than D max , these two trajectories cannot satisfy the similar connection condition. Based on the above lemma, is the center of the circle, D max The grid that coincides with the circle with a radius of is the trajectory detection grid signature. If T i The trajectory grid signature and T j If one of the detection grid signatures of T does not overlap, it means that the two trajectories cannot be similar. j T i Pruning;
[0024] By comparing the grid signature serial numbers to see if they are equal, we can determine whether the trajectory pair is matched successfully; if not, we prune the other trajectory for the current query trajectory.
[0025] Further, the S3 specifically includes: using Heron's formula method to calculate the distance between points and points and between points and line segments, specifically including:
[0026] The distance between point P and line segment AB is determined by performing ciphertext calculation on the point coordinates, and the obtained distance is squared as follows:
[0027] Calculate a 2 =(Px-Ax) 2 +(Py-Ay) 2 , b 2 =(Px-Bx) 2 +(Py-By) 2 , c 2 =(Px-Cx)2 +(Py-Cy) 2 ;
[0028] If b 2 ≥a 2 +c 2 , then the minimum distance between point P and line segment AB is a 2 ;
[0029] If a 2 ≥ b 2 +c 2 , then the minimum distance between point P and line segment AB is b 2 ;
[0030] If a 2 =b 2 +c 2 , then use the determinant method to find the area of the triangle, by squaring the area of the triangle Find the height from the midpoint P of the triangle to the line segment AB, which is the minimum distance between point P and line segment AB;
[0031]
[0032] Furthermore, in the step S3, in calculating the distance between the judgment point P and the line segment AB, if used in a secure environment, the trajectory data is encrypted; the addition and subtraction under the ciphertext are calculated using the homomorphism of the Paillier homomorphic encryption algorithm, the multiplication and division under the ciphertext use the secure multiplication protocol, the secure division protocol assists in the calculation, and the comparison under the ciphertext uses the secure comparison protocol to assist in the calculation.
[0033] The present invention provides a privacy-preserving trajectory similarity query method, which realizes trajectory similarity query calculation in an outsourcing scenario, while ensuring data privacy, and does not disclose any relevant information during the query privacy and calculation process; efficiently realizes trajectory similarity query calculation on encrypted data objects, so that data objects in the outsourcing scenario can be effectively utilized; and on the premise of ensuring data privacy security, satisfies the return of trajectory similarity query results that meet user requirements in actual applications.
[0034] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0037] Figure 1 A schematic diagram of a system framework provided for an embodiment disclosed in the present invention;
[0038] Figure 2 A schematic diagram of a trajectory grid signature provided for an embodiment disclosed in the present invention;
[0039] Figure 3 A schematic diagram of a detection grid signature provided by an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of calculating the distance using the Heron's formula adopted in the embodiment disclosed in the present invention;
[0041] Figure 5 A schematic diagram of data encryption time and space when the key length is 512 provided in the embodiment disclosed by the present invention;
[0042] Figure 6 A schematic diagram of experimental results of different distance thresholds provided in the embodiments disclosed in the present invention;
[0043] Figure 7 A schematic diagram of experimental results of different Top-k provided in the embodiments disclosed in the present invention;
[0044] Figure 8 A schematic diagram of experimental results of different key lengths provided for the disclosed embodiments of the present invention. DETAILED DESCRIPTION
[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present invention. Instead, they are merely examples of systems consistent with some aspects of the present invention as detailed in the appended claims.
[0046] In order to solve the defects in the prior art for trajectory similarity query and privacy-preserving trajectory similarity calculation, this embodiment provides a privacy-preserving trajectory similarity query method. First, the professional terms involved in this embodiment are defined and introduced as follows:
[0047] This embodiment defines a trajectory as a path generated by sampling during the motion of a moving object in space, and can also be defined as a position sequence with different time stamp samples. Trajectory similarity calculation focuses on calculating the similarity of trajectories, so only the spatial features of the trajectory are considered.
[0048] Definition 1 (Trace): Given a trajectory containing The trajectory of the sampling points It can be expressed as Sampling point Has two dimensions<x,y> ,Include The trajectory of the sampling points Include Line segment
[0049] Definition 2 (Bidirectional trajectory similarity): Given two trajectories and The bidirectional trajectory similarity is
[0050]
[0051] The similarity of the above formula The smaller the value of and The more similar the two trajectories are, the more similar they are. A distance threshold is required for the calculation of bidirectional trajectory similarity. if Greater than Then the current distance is +∞, and the trajectory and are not similar; where +∞ is much larger than numbers.
[0052]
[0053] in for and The minimum distance of
[0054]
[0055] in for and The minimum distance.
[0056] Definition 3 (Trajectory Similarity Query). Given a trajectory containing Trajectory dataset of trajectories and a query track The trajectory dataset It can be expressed as Trajectory similarity query aims to find a result set of all trajectories that meet the query conditions.
[0057] Table 1. Examples of datasets for trajectory similarity queries
[0058]
[0059] Example 1. In Table 1, set Then the similarity is calculated using the bidirectional trajectory similarity measure method because Trajectory and Therefore, the result set In To query data Similar search results.
[0060] Definition 4 (Security Trajectory Similarity Query). Given a Encrypted trajectory dataset of trajectories and an encrypted query trace The encrypted trajectory dataset It can be expressed as The secure trajectory similarity query is to find the encrypted result set of all trajectories that meet the query conditions in an encrypted environment. No important plaintext information can be leaked during the calculation process.
[0061] The system model involved in the present invention is: a well-known cloud computing framework is applied, which contains three types of entities: user Y, data owner ΔO and cloud server. In addition to the cloud server X1 responsible for computing and searching encrypted data in the framework, in order to achieve the correctness and actual performance of cloud computing and reduce the interaction cost of ΔO and Y, the present invention introduces an additional non-collusive cloud server X2 to provide encryption and decryption services by holding the key shared by the data owner. The system framework is as follows Figure 1 As shown, specifically including the following:
[0062] Data owner; First generate a public key (pk) and a private key (sk), then use pk to encrypt the dataset Finally, the encrypted dataset and pk upload to Upload pk and sk to And delegate pk to
[0063] user; Use pk encryption to query data Will Upload to Make a calculation request. After obtaining the encrypted result set calculated by the cloud platform back, Randomize it and upload it to Decryption. After obtaining the decryption randomization result, it is de-randomized to obtain the final true calculation result.
[0064] Cloud servers; storage and After receiving a calculation request, and Calculate the encrypted result set through some secure computing protocols and return it to
[0065] Security model: This paper applies a semi-honest adversary security model, which is used in many important research works. In this model, the attacker will correctly follow the user agreement and take "honest but curious" behavior to try to learn any valuable information from the data, requests and results. This model assumes that two cloud servers and There will be no collusion between the two parties, and this model is achievable in the real world.
[0066] To ensure the security of cloud computing, data, queries, results, and access patterns should all be protected by cloud servers. Therefore, the privacy requirements are as follows.
[0067] Data privacy; and Don't know about the dataset any plaintext information;
[0068] Query privacy; during the calculation process, and Don't know about query data any plaintext information;
[0069] Results privacy; except No other party knows about the result set any plaintext information;
[0070] Access mode privacy; during computation, and No information about the characteristics of the intermediate results is known, for example, the correspondence between the currently calculated data and the original data.
[0071] This security model does not consider access control and channel attacks. is credible, is authorized and the transmission channel is secure.
[0072] Paillier encryption system involved in this implementation: Since the ciphertext needs to be calculated, a Paillier encryption system is selected as a method for encrypting data. The Paillier encryption system is a homomorphic encryption method that can perform addition, subtraction and homomorphic multiplication calculations on the ciphertext, and the result of the ciphertext calculation is the same as the result of the plaintext calculation.
[0073] Encryption; Encryption function E pk (·) can be expressed as
[0074] c=E pk (m) = g m × N modN 2 , (8) where c is the ciphertext, is the plain text, N=p*q is the product of two large prime numbers p and q, is a semi-random number (the order of g must be and divisible by N), is a random number. The encryption public key is pk←(N,g).
[0075] Decryption; decryption function D sk (·) can be expressed as
[0076]
[0077] Where λ is the least common multiple of p-1 and q-1, and the function L(x) is L(x) = (x-1) / N. And the value of λ must ensure that μ = (L(g λ modN 2 )) -1 exists. If it does not exist, pk needs to be regenerated. At the same time, the encrypted private key is sk←(λ,μ).
[0078] Homomorphism: The Paillier encryption system supports homomorphic addition and homomorphic multiplication. Assuming m1 and m2 are plaintext, their homomorphism is as follows.
[0079] Homomorphic addition;
[0080] D sk (E pk (m1)*E pk (m2)modN 2 )=m1+m2mod N. (10)
[0081] Homomorphic multiplication;
[0082]
[0083] Semantic security: The semantic security of the Paillier encryption system lies in the fact that, given a set of ciphertexts, the adversary cannot infer any information about the plaintexts.
[0084] This implementation scheme provides a privacy-preserving trajectory similarity query method, in which the data owner uploads local encrypted data to a cloud server; the user uploads encrypted query data to the cloud server and makes a query request; the cloud server uses a grid signature to perform grid matching and trajectory filtering, and then uses the filtered trajectory to calculate the distance from point to trajectory, uses the distance from point to trajectory to calculate the similarity between trajectories, and uses the similarity results to perform various query operations.
[0085] The specific steps include:
[0086] S1: Securely calculate trajectory similarity; after the user makes a trajectory similarity query request, it is necessary to find a trajectory set similar to the trajectory to be queried. In order to ensure that no relevant information about the data and query is leaked during the similarity calculation process, and the calculation result is relatively accurate, this implementation scheme uses a bidirectional trajectory similarity measurement method (BD), with the help of a secure multiplication protocol (SM), a secure division protocol (SDC) and a secure minimum calculation protocol (SMC) to calculate the trajectory similarity between trajectory pairs, so as to meet the trajectory similarity query requirements of protecting data privacy;
[0087] This embodiment uses a bidirectional trajectory similarity measurement method to calculate the similarity between trajectories. The bidirectional trajectory similarity measurement method is shown in the following formula:
[0088]
[0089] in is the minimum distance from a point to a line segment, |T i |with|T j |T i and T j The result of this formula is the trajectory T i and T j The true similarity.
[0090] In addition, the definition of the minimum distance from a point to a line segment is given,
[0091]
[0092] in is the trajectory T i The kth sampling point in T j The line segment between a sampling point and the next sampling point in the equation. The result of this formula is With T j The minimum value of each distance l in .
[0093] Considering the subsequent work of mesh signature pruning, the distance needs to be standardized so that it can better generate mesh signatures. The standardization algorithm is as follows:
[0094]
[0095] D max is the maximum allowed distance between given trajectories. If Greater than D max , then determine to T j The distance is infinite, otherwise the distance is calculated. The result of this formula is With T j The minimum distance.
[0096] Based on this measurement method, the present invention performs similarity calculation on the ciphertext to ensure the safe calculation of trajectory similarity.
[0097] S2: secure pruning of trajectories based on grid signatures: In order to improve efficiency and reduce unnecessary calculations, the present invention implements a secure pruning method of trajectories based on grid signatures according to a trajectory pruning method based on grid signatures;
[0098] When faced with a huge trajectory data set, directly calculating their similarity is undoubtedly very expensive. Therefore, some pruning work should be done before trajectory similarity measurement to reduce the workload of subsequent trajectory distance calculation. First, generate a safe trajectory grid signature for the trajectory, such as Figure 2 shown.
[0099] Depend on Figure 2 It can be seen that T i It can be abstracted into a set of grids. The grids that a trajectory passes through are the grid signatures of the trajectory. Similar pruning of a trajectory is to match it, and prune the trajectories that do not meet the conditions.
[0100] According to the similarity measurement method of bidirectional mapping similarity, if the distance between the sampling point of a trajectory and another trajectory is greater than D max , these two trajectories cannot satisfy the similar connection condition. Based on this lemma, the sampling point is the center of the circle, D max Draw a circle with radius . The grid that coincides with this circle is the trajectory detection grid signature. If T i The trajectory grid signature and T j If one of the detection grid signatures of T does not overlap, it means that the two trajectories cannot be similar. j T i Pruning. The detection grid signature is as follows Figure 3 shown.
[0101] By comparing the grid signature numbers (whether they are equal), we can determine whether the track pair is matched successfully. If not, we will prune the other track for the current query track.
[0102] S3: Secure point-to-line segment minimum distance calculation protocol: In the process of calculating trajectory similarity, it is necessary to calculate the minimum distance from the sampling point in the trajectory to the line segment in another trajectory. Since the data used in the calculation process is ciphertext, it is necessary to formulate a new secure point-to-line segment minimum distance calculation protocol based on the security subprotocol to realize the privacy-preserving point-to-line segment minimum distance calculation;
[0103] According to the secure pruning method of the detection grid signature, it can be known that there must be a sampling point or sampling line segment of the trajectory to be tested in the detection grid signature of a certain sampling point. Now we need to calculate the minimum distance from the sampling point to another trajectory. The information we can get now is the sampling point The encrypted coordinates of and the closest sampling point on trajectory T Or the two points where the sampling line segment is located Under encryption conditions, the positional relationship between point P and line segment AB cannot be known. There are many methods for determining the positional relationship between point P and line segment AB, but it is necessary to ensure that the amount of calculation is small and the result is accurate. The present invention uses Heron's formula method to calculate the distance between points and points and between points and line segments. Heron's formula method for distance calculation is as follows: Figure 4 shown.
[0104] To calculate the distance from a point to a line segment, we must first determine the positional relationship between the point and the line segment. There are three types of positional relationships: Figure 4 As shown. However, under encryption conditions, the point coordinates are ciphertext, and the positional relationship between the point and the line segment cannot be directly observed from the ciphertext. Therefore, the positional relationship between point P and line segment AB must be determined through a series of ciphertext calculations of the point coordinates. In order to make the distance result usable for subsequent work, the distance squared is processed below.
[0105] (1) Calculate a 2 =(Px-Ax) 2 +(Py-Ay) 2 , b 2 =(Px-Bx) 2 +(Py-By) 2 ,
[0106] c 2 =(Px-Cx) 2 +(Py-Cy) 2 ;
[0107] (2) If b 2 ≥a 2 +c 2 , then Figure 4 In case (a), the minimum distance between point P and line segment AB is a 2 ;
[0108] (3) If a 2 ≥ b 2 +c 2 , then Figure 4 In case (c), the minimum distance between point P and line segment AB is b 2 ;
[0109] (4) Figure 4 In case (b), we need to use the determinant method to find the area of a triangle by squaring the area of the triangle. Find the height from the midpoint P of the triangle to the line segment AB, which is the minimum distance between point P and line segment AB.
[0110]
[0111] If the above method is used in a secure environment, the trajectory data needs to be encrypted. Addition and subtraction under ciphertext are calculated using the homomorphism of the Paillier homomorphic encryption algorithm. Multiplication and division under ciphertext need to use the secure multiplication protocol and the secure division protocol to help with calculations. Comparison under ciphertext needs to use the secure comparison protocol to help with calculations.
[0112] S4: Safe trajectory similarity query: Using the pruned trajectory set, applying the bidirectional trajectory similarity measurement method, and bringing the minimum distance result from the point to the line segment into the trajectory similarity measurement method, the trajectory similarity required by the end user can be obtained. The user can use the sorting of the trajectory similarity results to obtain similar trajectories required by the query.
[0113] After obtaining the distance between the point and the trajectory, the similarity result can be calculated by the bidirectional trajectory similarity measurement method. Users can perform various queries based on the similarity results.
[0114] The method provided in this embodiment can meet the privacy and security requirements of trajectory similarity query in the outsourcing model; the present invention formulates the basic algorithm of trajectory similarity query in the cloud environment; establishes the specific method of trajectory similarity query in the cloud environment; and finally obtains relatively accurate trajectory similarity query results that protect privacy. It is achieved that while protecting privacy, trajectory similarity can be calculated relatively accurately and efficiently, and similar trajectories can be queried.
[0115] The present invention will be further described in the following examples, but the present invention is not limited to these examples.
[0116] Example 1
[0117] This implementation solves the privacy-preserving trajectory similarity connection problem for the first time, and verifies through experiments that the present invention has good usability. At the same time, in order to better illustrate the efficiency of the present invention, two real trajectory datasets (2007 Shanghai taxi: 90 sampling points per trajectory on average; 2011 Beijing taxi: 110 sampling points per trajectory on average) and two trajectory datasets that conform to normal distribution (50 sampling points per trajectory on average) and uniform distribution (70 sampling points per trajectory on average) are used for experiments. All experimental results are the average of 20 experimental times.
[0118] The experimental settings are as follows: a high-performance tower server (Dell Precision 7920) with two 40-core Intel(R) Xeon(R) Bronze 3204 1.90GHz CPUs and 256GB of memory is used, and it runs the Ubuntu 20.04 system. Python 3.8 is used as the programming language to implement all the algorithms mentioned in this invention.
[0119] Data encryption time and space, Figure 5 The encryption time and space for data with a key length of 512. As the distance threshold D max As the number of encrypted data increases, more data (grid signature) needs to be encrypted. Therefore, the encryption time will increase, and the space occupied by the encrypted data will also increase.
[0120] Different distance thresholds D max , Figure 6 When there are 100 trajectories, top-k is 20, and the key length is 512, different data sets and different distance thresholds D max It can be seen that the method of the present invention is effective at the distance threshold D max <5m, the computational performance is better than the safe trajectory similarity query based on the DTW trajectory similarity measurement method; the method of the present invention has good performance in D max Under the condition of <100m, the computational performance is better than the safe trajectory similarity query based on DTW, LCSS, and EDR trajectory similarity measurement methods.
[0121] Different Top-k, Figure 7 For 100 trajectories, D max The experimental results of different data sets and different top-k when the key length is 50m and the key length is 512. It can be seen that under this condition, the computational performance of the method of the present invention is better than that of the secure trajectory similarity query based on traditional trajectory similarity measurement methods such as DTW (or the computational performance is equal to it).
[0122] Different key lengths, Figure 8 There are 50 trajectories, top-k is 10, and D maxExperimental results of different data sets and different key lengths when the key length is 50m. It can be seen that the calculation time increases exponentially with the increase of the key length. However, no matter how long the key length is, the calculation performance of the method of the present invention is always better than the secure trajectory similarity query based on traditional trajectory similarity measurement methods such as DTW.
[0123] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the claims.
Claims
1. A privacy-preserving trajectory similarity query method, It is characterized in that The steps include: S1: Calculate the similarity of the trajectory set based on the bidirectional trajectory similarity measurement method; S2: securely prune the trajectory based on the grid signature to obtain the pruned trajectory set; S3: Using the pruned trajectory set, a new secure point-to-line segment minimum distance calculation protocol is formulated based on the security subprotocol to calculate the minimum distance between the point and the line segment that protects privacy; S4: Using the pruned trajectory set, applying the bidirectional trajectory similarity measurement method, bringing the minimum distance result from the point to the line segment into the trajectory similarity measurement method, thereby obtaining the trajectory similarity required by the final requirement, and finally obtaining the similar trajectory required by the query according to the sorting of the trajectory similarity results; In S1, after the user makes a trajectory similarity query request, a trajectory set similar to the trajectory to be queried is found, and the trajectory similarity between the trajectory pairs is calculated using a bidirectional trajectory similarity measurement method with the help of a safe multiplication protocol, a safe division protocol, and a safe minimum calculation protocol; specifically, the following is included: The bidirectional trajectory similarity measurement method calculates the similarity between trajectories. The bidirectional trajectory similarity measurement method is shown in the following formula: in is the minimum distance from a point to a line segment, |T i |with|T j |T i and T j The number of sampling points is obtained by formula (1) i and T j The real similarity of The minimum distance from a point to a line segment is defined as: in is the trajectory T i The kth sampling point in T j The line segment between a certain sampling point and the next sampling point; By formula (2) we can get With T j The minimum value of each l distance in ; The standardization algorithm is as follows: D max is the maximum allowed distance between given trajectories, if Greater than D max , then determine to T j The distance is infinite, otherwise the distance is calculated; from formula (3) we get With T j The minimum distance; The safety pruning is specifically as follows: according to the similarity measurement method of bidirectional mapping similarity, if one of the distances between the sampling point of a trajectory and another trajectory is greater than D max , these two trajectories cannot meet the similar connection conditions, which is different from the sampling point is the center of the circle, D max The grid that coincides with the circle with a radius of is the trajectory detection grid signature. If T i The trajectory grid signature and T j If there is one mismatch in the detection grid signatures of T, it means that the two trajectories cannot be similar. j T i Pruning; By comparing the grid signature serial numbers to see if they are equal, we can determine whether the track pair is matched successfully. If not, we prune the other track for the current query track. In S3, the Heron's formula method is used to calculate the distance between points and between points and line segments, which specifically includes: The distance between point P and line segment AB is determined by performing ciphertext calculation on the point coordinates, and the obtained distance is squared as follows: Calculate a 2 =(P.x - A.x) 2 +(P.y - A.y) 2 , b 2 =(P.x - B.x) 2 +(P.y - B.y) 2 , c 2 =(P.x - C.x) 2 +(P.y - C.y) 2 ; If b 2 ≥a 2 +c 2 , then the minimum distance between point P and line segment AB is a 2 ; If a 2 ≥ b 2 +c 2 , then the minimum distance between point P and line segment AB is b 2 ; If a 2 =b 2 +c 2 , then use the determinant method to find the area of the triangle, by squaring the area of the triangle Find the height from the midpoint P of the triangle to the line segment AB, which is the minimum distance between point P and line segment AB; 2. A privacy-preserving trajectory similarity query method according to claim 1, It is characterized in that In S2, for the trajectory data set, a secure trajectory grid signature is generated for the trajectory; T i The abstract representation is a set of grids. The grids that a trajectory passes through are the grid signatures of the trajectory. Trajectories that do not meet the conditions are pruned.
3. According to the privacy-preserving trajectory similarity query method of claim 1, It is characterized in that In the step S3, the distance between the judgment point P and the line segment AB is calculated. If used in a secure environment, the trajectory data is encrypted; the addition and subtraction under the ciphertext are calculated using the homomorphism of the Paillier homomorphic encryption algorithm, the multiplication and division under the ciphertext use the secure multiplication protocol, the secure division protocol assists in the calculation, and the comparison under the ciphertext uses the secure comparison protocol to assist in the calculation.
