Method for protecting trajectory privacy of query exchange based on smart contract in social internet of vehicles

By constructing a consortium blockchain and smart contracts in a social vehicle network, and utilizing a weighted bipartite graph minimum weight matching algorithm to incentivize vehicles to participate in query exchange, the problem of selfishness among collaborative users in distributed trajectory privacy protection is solved, achieving efficient trajectory privacy protection and continuous anonymity.

CN115310131BActive Publication Date: 2026-03-27HENAN UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing distributed trajectory privacy protection methods in social vehicle networks ignore the selfishness of collaborating users, resulting in poor trajectory privacy protection performance, and user trajectories are easily inferred by attackers during continuous queries.

Method used

By constructing a consortium blockchain in the social vehicle network, and utilizing smart contracts and a weighted bipartite graph minimum weight matching algorithm, vehicles are incentivized to participate in query exchange, breaking the spatiotemporal correlation of continuous queries, establishing many-to-many smart contracts, calculating vehicle similarity weight matrices and performing matching, and realizing secure and reliable query exchange between vehicles.

Benefits of technology

It increased the participation of collaborative vehicles, reduced the spatiotemporal correlation of continuous queries, enhanced user trajectory privacy protection, and improved the success rate of continuous anonymity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115310131B_ABST
    Figure CN115310131B_ABST
Patent Text Reader

Abstract

The application discloses a kind of social car networking based on smart contract's query exchange trajectory privacy protection method in the present application, all base stations in social car networking are constructed into alliance block chain, vehicle sends query exchange request to base station, base station similar request vehicle is divided into a request vehicle cluster by cooperative offer, and create a many-to-many smart contract and broadcast the information of request vehicle in smart contract, each vehicle in social car networking receives broadcast information, and selects request vehicle for cooperation bidding according to its own situation, base station calculates the similarity weight matrix of request vehicle and cooperative vehicle, the relationship between request vehicle and cooperative vehicle in smart contract is modeled into weighted bipartite graph, and the minimum weight matching algorithm of weighted bipartite graph is used for vehicle matching, to obtain the matching result of request vehicle and cooperative vehicle, request vehicle executes query service through its matched cooperative vehicle, and obtains query result.The present application can effectively protect user trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of Internet of Vehicles, and more particularly relates to a query exchange trajectory privacy protection method based on a smart contract in social Internet of Vehicles. BACKGROUND

[0002] The social Internet of Vehicles realizes real-time associated perception of entities such as vehicles, pedestrians and roadside units by fusing the concepts of Internet of Vehicles and social networks, and improves road safety and user travel efficiency. In the social Internet of Vehicles, location-based services have attracted widespread attention from users, and can be divided into two types according to different query methods: snapshot query and continuous query. Snapshot query refers to that a user reports a current location to a location server at irregular intervals to obtain a query result, while continuous query refers to that a user reports a current location to a location server periodically to obtain a continuous query result. Compared with snapshot query, continuous query will bring more serious privacy leakage to users, because an attacker can easily obtain a user's trajectory by connecting the user's continuous query locations in time sequence. At present, user trajectory privacy protection in the social Internet of Vehicles has gradually become one of the hot issues in the research of social Internet of Vehicles technology.

[0003] The trajectory privacy protection method of the social Internet of Vehicles mainly fuzzes the user's space-time trajectory, semantic trajectory and behavior trajectory, so as to achieve the purpose of user privacy protection in the social Internet of Vehicles. The trajectory privacy protection method of the social Internet of Vehicles mainly crawls trajectory data of users in the driving process, including user identity, continuous query location and service request, and then cleanses, screens and classifies the trajectory data to protect the user's privacy. On the one hand, user trajectory privacy protection can protect the user's personal privacy and increase the user's stickiness to the social Internet of Vehicles, and on the other hand, it can guarantee the user's road safety and reduce property loss and casualties caused by traffic accidents.

[0004] The current trajectory privacy protection method applied in continuous location service mainly includes a centralized trajectory privacy protection method and a distributed trajectory privacy protection method. The distributed trajectory privacy protection method is relatively simple to implement, and it mainly reduces the risk of trajectory privacy leakage through user cooperation. However, this method ignores the selfishness of cooperative users, and cooperative users may refuse to participate in cooperation to avoid cooperation cost, thereby resulting in poor performance of the distributed trajectory privacy protection. SUMMARY

[0005] The application aims to overcome the shortcomings of the prior art, and provides a query exchange trajectory privacy protection method based on a smart contract in the social Internet of Vehicles. The request vehicle improves the enthusiasm of cooperative vehicles participating in query exchange by setting rewards, and the request vehicle and the cooperative vehicle break the space-time correlation of continuous query, thereby protecting the user's trajectory.

[0006] In order to achieve the above-mentioned purpose of the application, the social Internet of vehicles based on smart contract query exchange trajectory privacy protection method includes the following steps:

[0007] S1: The base station in the social Internet of vehicles is taken as a node to construct a consortium blockchain, and the vehicle accesses the consortium blockchain through the base station; the vehicle and the base station register and authenticate with the authentication agency before entering the social Internet of vehicles, and after successful registration, the vehicle and the base station both obtain a legal identity, each vehicle respectively obtains a public and private key pair (PK i ,SK i ) and an account account i ={Add i ,balance i ,R i}, PK i and SK i respectively represent the public key and the private key of the vehicle u i , Add i represents the account address of the vehicle u i , balance i represents the account balance of the vehicle u i , R i represents the user credit score of the vehicle u i , i=1, 2, …, M, M represents the number of vehicles in the social Internet of vehicles, and each base station respectively obtains a public and private key pair respectively represent the public key and the private key of the base station bs k , k=1, 2, …, K, K represents the number of base stations;

[0008] S2: When the vehicle u i needs to perform continuous query, the nearest base station bs k is searched, a query exchange request is generated and encrypted using the public key of the base station bs k ; the vehicle u i sends the encrypted query exchange request to the base station bs k :

[0009]

[0010] Wherein, ID i represents the identity ID of the vehicle u i , L i =(x i ,y i ) represents the current position coordinates of the vehicle u i , vel i and d i respectively represent the velocity and the distance of the vehicle ui Current speed and direction, a i Indicates vehicle u i Collaborative pricing;

[0011] base station bs k For query exchange requests received within a preset time period, the private key is used first. The query exchange request is decrypted, and the requesting vehicle is checked to see if it meets the creation conditions of the smart contract, including whether the user's identity is legitimate, their reputation is good, and their account balance is greater than a preset threshold. If the conditions are met, the query exchange request of the requesting vehicle is accepted; otherwise, the query exchange request of the requesting vehicle is rejected, and the user's reputation of the requesting vehicle is reduced by 1. (Base station bs) k Based on the cooperative quotes of the requesting vehicles, the requesting vehicles whose query exchange requests have been accepted are clustered, so that requesting vehicles with similar cooperative quotes are grouped into the same cluster; base station bs k Create a many-to-many smart contract for each requesting vehicle cluster, where the set of requesting vehicles is U, the number of requesting vehicles is M′, and the set of cooperating vehicles V is initialized to empty. Then, the base station bs... k The smart contract requests vehicle information to other vehicles within the base station's coverage area; base station bs k The collaborative quote a from each requesting vehicle in the requesting vehicle set U. i From its account balance i Transferred to the smart contract account SC_Acc created for the requested vehicle. i ;

[0012] S3: In the social vehicle network, after each vehicle receives the smart contract request vehicle information broadcast by the base station, it selects the requesting vehicle to cooperate in bidding based on its own situation.

[0013] Each cooperating vehicle v j Generate a query exchange cooperation request, and use the base station bs to submit the request. k public key Encryption is performed, and collaborative vehicles v j Encrypted query exchange collaboration request Send to base station bs k :

[0014]

[0015] Where j = 1, 2, ..., N, N represents the number of cooperating vehicles, ID j Indicates collaborative vehicle v j Identity ID, Add j Indicates collaborative vehicle v j account address, balance jIndicates collaborative vehicle v j The account balance, R j Indicates collaborative vehicle v j User reputation rating, L j =(x j ,y j ) indicates a cooperative vehicle v j Current position coordinates, vel j d j These represent the cooperative vehicles v j Current speed and direction, Γ j =(U j ,σ) represents a collaborative bidding pair of vehicles, where U j Indicates collaborative vehicle v j Select the set of vehicles to bid on, and the collaboration deposit is σ;

[0016] base station bs k Upon receiving a query exchange collaboration request, first use the private key. The query exchange collaboration request is decrypted, and the collaborating vehicle is checked to see if it meets the conditions, including whether the user's identity is legitimate, their reputation, and whether their account balance exceeds a preset threshold. If not, the query exchange request is rejected, and the user's reputation for that vehicle is decremented by 1. If the conditions are met, the query exchange collaboration request is accepted, and the vehicle is added to the smart contract's collaborating vehicle set V. The number of collaborating vehicles in the final set V is denoted as N′. For each collaborating vehicle in the set V, the base station bs k The collaboration deposit σ will be deducted from its account balance. j Transferred to the contract account SC_Acc created for this collaborative vehicle. j ;

[0017] S4: Base station bs k The similarity weight matrix between the requesting vehicle and the cooperating vehicle in the smart contract is calculated using the following method:

[0018] Determine the bidding variable λ based on the collaborative bidding pairs of the collaborative vehicles. mn ∈{0,1}, where λ mn =1 indicates a request for vehicle u m and collaborative vehicles v n There is a bidding relationship, otherwise λ mn =0, m=1,2,…,M′, n=1,2,…,N′;

[0019] When λ mn When = 0, let the requesting vehicle u m and collaborative vehicles v n Similarity of driving states between mn= 0, when λ mn = 1, the driving state similarity s m between the requesting vehicle u n and the cooperative vehicle v mn is calculated by the following method:

[0020] The position similarity s L (u m , v n ) is calculated by the following formula:

[0021]

[0022] where (x m , y m ) and (x n , y n ) represent the current position coordinates of the requesting vehicle u m and the cooperative vehicle v n , respectively, ΔL represents the maximum distance between any two vehicles in the vehicle set θ m , and θ m represents the set of all cooperative vehicles that bid for the requesting vehicle u m .

[0023] The direction similarity s d (u m , v n ) is calculated by the following formula:

[0024]

[0025] where d m and d n represent the current vehicle direction angles of the requesting vehicle u m and the cooperative vehicle v n , respectively, and d max and d min represent the maximum and minimum values of the vehicle direction angles in the vehicle set θ m .

[0026] The speed similarity s vel (u m , v n ) is calculated by the following formula:

[0027]

[0028] where vel m and vel n represent the current vehicle speeds of the requesting vehicle u m and the cooperative vehicle v n , respectively.max , vel min respectively represent the maximum and minimum values of the vehicle speed in the vehicle set θ m ;

[0029] The following formula is used to fuse the driving state similarity s m between the requesting vehicle u n and the cooperative vehicle v mn :

[0030] s mn = γ1·s vel (u m ,v n )+ γ2·s d (u m ,v n )+ γ3·s L (u m ,v n )

[0031] wherein γ1, γ2, γ3> 0 are preset weight factors, and γ1+ γ2+ γ3= 1;

[0032] When the driving state similarity of any requesting vehicle in the requesting vehicle set U and the corresponding bidding cooperative vehicle is calculated, the similarity weight matrix W between the requesting vehicle set and the cooperative vehicle set in the smart contract is obtained:

[0033]

[0034] S5: The base station bs k models the relationship between the requesting vehicle and the cooperative vehicle in the smart contract into a weighted bipartite graph G = (U, V, E, W), wherein U represents the requesting vehicle set, V represents the cooperative vehicle set, E represents the edge set between the requesting vehicle and the cooperative vehicle, when λ mn = 0, there is no edge between the requesting vehicle u m and the cooperative vehicle v n , when λ mn = 1, there is an edge between the requesting vehicle u m and the cooperative vehicle v n , and W represents the similarity weight matrix;

[0035] The base station bs k uses a weighted bipartite graph minimum weight matching algorithm to match the vehicles, obtains the matching result of the requesting vehicle and the cooperative vehicle, and feeds back the matching result to each requesting vehicle;

[0036] S6: The requesting vehicle u m uses the public key of the cooperative vehicle v matched therewith as its identity ID.Encrypt the service type POI_type of the query service, the query range r, and the session key pk m Use the public key PK of the location server s Encrypt to generate the query exchange message and send it to the cooperative vehicle

[0037]

[0038] Cooperative vehicle Upon receiving the query exchange message of the requesting vehicle u m , first decrypt using the private key and convert it into the encrypted identity information of the cooperative vehicle , i.e., encrypt using the public key PK of the location server s ; the cooperative vehicle stores the identity mapping relationship between the requesting vehicle u m and the cooperative vehicle in the file list of the cooperative vehicle, and then sends a service query request CQR to the location server:

[0039]

[0040] Upon receiving the service query request of the cooperative vehicle , the location server performs service query according to the service type POI_type and the query range r, and encrypts the query result result using the session key pk m of the requesting vehicle u m , feeds back the encrypted query result pk m (result) to the cooperative vehicle The cooperative vehicle obtains the requesting vehicle u m according to the cooperative user file list, encrypts its own ID using the public key PK m of the requesting vehicle u m , generates a query result message QF together with the encrypted query result pk m (result), and feeds it back to the requesting vehicle u m :

[0041]

[0042] Upon receiving the query result message QF, the requesting vehicle u m decrypts the ID of the cooperative vehicle using the private key SK m , and then uses the session key pk m ​​​The decryption result is obtained, and if the decryption fails, the base station bs k is fed back a cooperation failure message k After receiving the cooperation failure message, the cooperation vehicle is deducted and the user's reputation is reduced by 1, and if the decryption is successful, the base station bs k is fed back a cooperation success message k After receiving the cooperation success message, the base station bs m sends an account confirmation request message to the request vehicle u and the cooperation vehicle respectively to perform cooperation rewards:

[0043] Con m = PK m (SC_Add||SC_Acc m ||p m ←a m )

[0044]

[0045] Wherein, SC_Add represents the smart contract address, SC_Acc m , respectively represents the contract account of the request vehicle u m and the cooperation vehicle , p m , respectively represents the cooperation expenditure of the request vehicle u m and the cooperation reward of the cooperation vehicle , represents that the user's reputation of the cooperation vehicle is increased by 1;

[0046] The request vehicle u m and the cooperation vehicle send an account confirmation message to the base station bs k after receiving the account confirmation request message, and the base station bs k receives the account confirmation message, distributes the reward to the cooperation vehicle and sends the user transaction information in the smart contract to other nodes in the alliance blockchain for auditing and verification, and finally the base station bs k uploads the verified user transaction information in the smart contract to the alliance blockchain.

[0047] The application discloses a query exchange trajectory privacy protection method based on a smart contract in social vehicle networking.

[0048] In the application, the base station creates a many-to-many smart contract for a request user, encourages cooperative users to participate in query exchange, models the users in the smart contract as a weighted bipartite graph, and selects the cooperative users with the best similarity deviation for the request user to perform query exchange through a smart contract best matching auction algorithm, so that the enthusiasm of the cooperative users in participating in the query exchange is improved through the matching auction, and the spatiotemporal correlation of continuous queries is reduced through the query exchange, and the trajectory privacy protection of the vehicle is strengthened. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 is a specific embodiment flowchart of the query exchange trajectory privacy protection method based on a smart contract in social vehicle networking of the application;

[0050] Figure 2 is a system model schematic diagram in the embodiment;

[0051] Figure 3 is an original trajectory example diagram of the vehicle in the embodiment;

[0052] Figure 4 is Figure 3 is a vehicle trajectory example diagram after the original trajectory of the vehicle shown in the figure is subjected to query exchange of the application;

[0053] Figure 5 is a continuous anonymous success rate comparison diagram of the application and three comparison methods in the same scene in the embodiment. DETAILED DESCRIPTION

[0054] The specific embodiments of the application are described below with reference to the accompanying drawings, so that those skilled in the art can better understand the application. It should be particularly pointed out that in the following description, when the detailed description of the known functions and designs may weaken the main content of the application, these descriptions will be omitted here.

[0055] EMBODIMENT

[0056] Figure 1 This is a flowchart illustrating a specific implementation of the privacy protection method for querying and exchanging trajectories based on smart contracts in the social vehicle network of this invention. Figure 1 As shown, the specific steps of the method for protecting privacy of query and exchange trajectories based on smart contracts in the social vehicle network of the present invention include:

[0057] S101: Building a Consortium Blockchain

[0058] A consortium blockchain is constructed using base stations as nodes in the social vehicle network, and vehicles access the consortium blockchain through base stations. To achieve secure and reliable query and exchange between vehicles, both vehicles and base stations register and authenticate with a certification authority before entering the social vehicle network. Upon successful registration, both the vehicle and base station obtain legitimate identities, and each vehicle receives a public-private key pair (PK). i SK i ) and account i ={Add i balance i ,R i}, PK i SK i Representing vehicle u i Public and private keys, Add i Indicates vehicle u i account address, balance i Indicates vehicle u i The account balance, R i Indicates vehicle u i User reputation score (initial value set according to actual needs), i = 1, 2, ..., M, where M represents the number of vehicles in the social vehicle network. Each base station obtains a public-private key pair. They represent base stations bs and bs respectively k The public and private keys are k = 1, 2, ..., K, where K represents the number of base stations.

[0059] Figure 2 This is a schematic diagram of the system model in this embodiment. For example... Figure 2 As shown, the base station creates a smart contract to match requesting vehicles with cooperating vehicles, thereby protecting the trajectory privacy of requesting vehicles through query exchange.

[0060] S102: Smart Contract Creation:

[0061] When vehicle u i When continuous query service is required, search for the nearest base station bs. k Generate query exchange requests and use base station bs k public key The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs k The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs

[0062] The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs

[0063] The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs

[0064] The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs i The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs

[0065] The encrypted query exchange request is sent to the base station bs k The encrypted query exchange request is sent to the base station bs The encrypted query exchange request is sent to the base station bs k The encrypted query exchange request is sent to the base station bs k The encrypted query exchange request is sent to the base station bs kThe request vehicle information of the smart contract is broadcasted to other vehicles within the coverage range of the base station. In addition, in order to prevent the request vehicle from withdrawing halfway, the base station bs k The cooperative offer a i of each request vehicle in the request vehicle set U i is broadcasted to other vehicles within the coverage range of the base station. i .

[0066] S103: Cooperative vehicle bidding:

[0067] After each vehicle in the social Internet of vehicles receives the smart contract request vehicle information broadcasted by the base station, it selects a request vehicle for cooperative bidding according to its own situation. Generally, the request vehicle with greater cooperative vehicle income is selected for bidding according to the cooperative cost of the vehicle itself and the cooperative offer of the request vehicle.

[0068] Each cooperative vehicle v j generates a query exchange cooperation request, and the request is encrypted using the public key of the base station bs k . The cooperative vehicle v j sends the encrypted query exchange cooperation request to the base station bs k .

[0069]

[0070] Wherein, j = 1, 2, …, N, N represents the number of cooperative vehicles, ID j represents the identity ID of the cooperative vehicle v j , Add j represents the account address of the cooperative vehicle v j , balance j represents the account balance of the cooperative vehicle v j , R j represents the user reputation score of the cooperative vehicle v j , L j = (x j , y j ) represents the current position coordinates of the cooperative vehicle v j , vel j , d j represent the current speed and direction of the cooperative vehicle v j , Γ j = (U j , σ) represents the cooperative bidding pair of the cooperative vehicle, wherein U j represents the request vehicle set selected by the cooperative vehicle v j for bidding, and the cooperative deposit is σ. ​​

[0071] Similarly, the base station bs k After receiving the query exchange cooperation request, the private key is used first The query exchange cooperation request is decrypted, and it is checked whether the cooperative vehicle meets the conditions, including whether the user identity is legal, the reputation, and whether the account balance is greater than the preset corresponding threshold value. If not, the query exchange request of the vehicle is rejected, and the user reputation of the cooperative vehicle is reduced by 1. If the conditions are met, the query exchange cooperation request of the cooperative vehicle is accepted, and the cooperative vehicle is added to the cooperative vehicle set V of the smart contract. The number of cooperative vehicles in the finally obtained cooperative vehicle set V is denoted as N'. Similarly, in order to prevent the cooperative vehicle from quitting halfway, for each cooperative vehicle in the cooperative vehicle set V, the base station bs k Transfers the cooperative deposit σ from the account balance balance j of the cooperative vehicle to the contract account SC_Acc j created for the cooperative vehicle.

[0072] S104: Calculate the vehicle similarity weight matrix:

[0073] The base station bs k calculates the similarity weight matrix of the request vehicle and the cooperative vehicle in the smart contract, and the specific method is as follows:

[0074] In order to represent whether there is a cooperative relationship between the cooperative vehicle and the request vehicle in the smart contract, the present application sets a bidding variable λ mn ∈{0,1}, which is determined according to the cooperative bidding of the cooperative vehicle, wherein λ mn =1 represents that the request vehicle u m and the cooperative vehicle v n have a bidding relationship, that is, the request vehicle u m belongs to the cooperative vehicle v n The selected bidding request vehicle set U n , otherwise λ mn =0, m=1,2,…,M′,n=1,2,…,N′. In addition, in order to select the best similarity deviation cooperative vehicle for the request vehicle to query exchange, the present application uses the driving state similarity to quantify the user similarity. Therefore, when λ mn =0, the driving state similarity s m between the request vehicle u n and the cooperative vehicle v mn is 0, and when λ mn =1, the driving state similarity s m between the request vehicle u n and the cooperative vehicle v mn is calculated by the following method:

[0075] In order to calculate the driving state similarity of the requesting vehicle and the bidding vehicle in the smart contract, the present application calculates the position similarity s L (u m ,v n ), the direction similarity s d (u m ,v n ) and the speed similarity s vel (u m ,v n ) between the requesting vehicle u mn and the cooperative vehicle v L respectively, and then obtains the user driving state similarity s m by weighting. The position similarity s n (u m ,v m ) is calculated by the following formula:

[0076]

[0077] where (x n ,y n ) and (x m ,y n ) represent the current position coordinates of the requesting vehicle u m and the cooperative vehicle v m respectively, ΔL represents the maximum distance between any two vehicles in the vehicle set θ m , and θ d represents the set of all cooperative vehicles bidding for the requesting vehicle u m .

[0078] The direction similarity s n (u m ,v n ) is calculated by the following formula:

[0079]

[0080] where d m and d n represent the current vehicle direction angle of the requesting vehicle u max and the cooperative vehicle v min respectively, and d m and d vel represent the maximum and minimum values of the vehicle direction angle in the vehicle set θ m .

[0081] The speed similarity s n (u m ,v n ) is calculated by the following formula:

[0082]

[0083] where vel m , vel n denote the current vehicle speed of the requesting vehicle u m , the cooperating vehicle v n , respectively. max , vel min denote the maximum and minimum of the vehicle speeds in the vehicle set Θ m , respectively.

[0084] The driving state similarity s mn between the requesting vehicle u m and the cooperating vehicle v n is obtained by fusion using the following formula:

[0085] s mn = γ1·s vel (u m , v n ) + γ2·s d (u m , v n ) + γ3·s L (u m , v n )

[0086] where γ1, γ2, γ3 > 0 are preset weight factors, and γ1+ γ2+ γ3 = 1.

[0087] When the driving state similarity is calculated for any requesting vehicle in the requesting vehicle set U and the corresponding bidding cooperating vehicle, the similarity weight matrix W between the requesting vehicle set and the cooperating vehicle set in the smart contract is obtained:

[0088]

[0089] S105: Cooperating vehicle matching:

[0090] The base station bs k models the relationship between the requesting vehicle and the cooperating vehicle in the smart contract into a weighted bipartite graph G = (U, V, E, W), where U represents the requesting vehicle set, V represents the cooperating vehicle set, E represents the edge set between the requesting vehicle and the cooperating vehicle, and λ mn = 0 indicates that there is no edge between the requesting vehicle u m and the cooperating vehicle v n , and λ mn = 1 indicates that there is an edge between the requesting vehicle u m and the cooperating vehicle v n .There are edges between them, and W represents the similarity weight matrix. This invention aims to select cooperative vehicles with the best similarity deviation for query exchange in smart contracts, therefore, base station bs k The optimal matching algorithm of smart contracts minimizes the sum of weights in the weighted bipartite graph after matching. Specifically, the minimum weight matching algorithm of weighted bipartite graph is used to match vehicles, obtain the matching results of requesting vehicles and cooperating vehicles, and feed back the matching results to each requesting vehicle.

[0091] S106: Query Exchange

[0092] Request vehicle u m Use its identity ID to match the collaborative vehicle. public key Encryption is performed, including the service type POI_type, query range r, and session key pk. m Use the location server's public key PK s Encryption is performed to generate a query exchange message. And sent to the collaborating vehicles

[0093]

[0094] Collaborative vehicles Received request for vehicle u m After exchanging query messages, first use the private key. right Decrypt and convert it into a collaborative vehicle encrypted identity information Soon Use the location server's public key PK s Encryption is applied. Collaborative vehicles. Request vehicle u m With cooperative vehicles The identity mapping relationship between the vehicles is stored in a file list of the cooperating vehicles, and then a service query request (CQR) is sent to the location server.

[0095]

[0096] The location server received the collaborative vehicle After submitting a service query request, the service query is performed based on the service type POI_type and the query range r, and the query result is displayed using the requested vehicle u. m Session key pk m Encrypt the query results and then perform a comparison. m (result) feedback to collaborating vehicles Collaborative vehicles The requested vehicle u was obtained by querying the list of collaborating users' files. m The user will use their own ID to request vehicle u m public key PK m Encrypt the query results and then perform a PK. m (result) together generate the query result message QF and send it back to the requesting vehicle u. m :

[0097]

[0098] S107: Reward Allocation:

[0099] Request vehicle u m Upon receiving the query result message QF, the private key SK is used. m Decrypt to obtain the ID of the collaborating vehicle, then use the session key to PK. m The query result is obtained by decryption. If decryption fails, the result is sent to the base station bs. k Feedback message indicating collaboration failure, base station bs k After receiving the collaboration failure message, deduct the collaborative vehicle. The deposit is deducted and the user's credit score is reduced by 1. If decryption is successful, the data is sent to the base station bs. k Feedback message indicating successful collaboration, base station bs k After receiving the collaboration success message, send a message to the requesting vehicle u. m and collaborative vehicles Send separate account confirmation request messages to receive collaboration rewards:

[0100] Con m =PK m (SC_Add||SC_Acc m ||p m ←a m )

[0101]

[0102] Where SC_Add represents the smart contract address, and SC_Acc m , These represent the requests for vehicle u. m and collaborative vehicles The contract account, p m , These represent the requests for vehicle u. m Collaborative expenditures and collaborative vehicles Collaboration rewards Indicates the cooperative vehicles The user's reputation is increased by 1.

[0103] Request vehicle um and cooperative vehicles after receiving the account confirmation request message k sending an account confirmation message, the base station bs k after receiving the account confirmation message, the base station bs distributing rewards and sending user transaction information in the smart contract to other nodes in the consortium blockchain for auditing and verification, and finally the base station bs k uploading the verified user transaction information in the smart contract to the consortium blockchain.

[0104] In order to better illustrate the technical effects of the present application, specific examples are used for simulation verification of the present application.

[0105] In the simulation verification process of the present embodiment, the P2P method (reference literature “Chow C Y, Mokbel M F, Liu X. A peer-to-peer spatial cloaking algorithm for anonymous location-based service [C] / / ACM. ACM, 2006: 171.”), the 3PLUS method (reference literature “Niu B, Zhu X, Chi H, et al. 3PLUS: Privacy-preserving pseudo-location updating system in location-based services [C] / / 2013 IEEE Wireless Communications and Networking Conference (WCNC). IEEE, 2013.”) and the DQE method (reference literature “Zhang S, Wang G, Liu Q, et al. A trajectory privacy-preserving scheme based on query exchange in mobile social networks [J]. Soft Computing, 2017.”) are used as comparative methods, and the continuous anonymous success rate is selected as the performance parameter to compare with the present application. The continuous anonymous success rate refers to the ratio of the number of request vehicles that successfully achieve anonymity in the continuous query process to the total number of request vehicles, and therefore can be used to measure the degree of trajectory privacy protection of the trajectory privacy protection method for vehicles.

[0106] Figure 3 is an example of the original trajectory of the vehicle in the present embodiment. As Figure 3As shown in the prior art, position k-anonymity is usually used to protect the location privacy of users in snapshot queries, which mainly increases the difficulty for attackers to identify the location of the requesting vehicle by generating an anonymous area containing k-1 false positions for the requesting vehicle. However, the attacker can still infer the trajectory of the requesting vehicle by connecting the anonymous areas of the requesting vehicle in time sequence one by one. Figure 4 Figure 3 The vehicle trajectory example diagram after the vehicle original trajectory shown in the prior art is exchanged by the query of the application. Figure 4 The solid line in the figure is the original trajectory of the vehicle, and the dashed line is the trajectory of the vehicle after the query exchange. As shown in the figure Figure 4 As shown in the figure, the vehicle trajectory of the cooperative vehicle determined by the application has a large gap with the original trajectory, and it is difficult for the attacker to infer the trajectory of the requesting vehicle through the cooperative vehicle, which can effectively protect the privacy of the vehicle user.

[0107] Figure 5 The figure is a comparison diagram of the continuous anonymity success rate of the application and three comparative methods in the same scene in this embodiment. As shown in the figure Figure 5 The continuous anonymity success rate of the application is much higher than that of the other three methods, and although the continuous anonymity success rate of the four methods gradually decreases with the increase of the anonymity degree, the decrease of the application is less than that of the other three methods, which shows that the stability of the anonymity effect of the application is also better than that of the three comparative methods.

[0108] Although the above describes the specific embodiments of the application for the purpose of facilitating the understanding of the application by those skilled in the art, it should be clear that the application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the application defined and determined by the appended claims, and all the application and creation utilizing the concept of the application are within the scope of protection.​

Claims

1. A method for protecting the privacy of query and exchange trajectories based on smart contracts in a social vehicle network, characterized in that, Includes the following steps: S1: A consortium blockchain is constructed by using base stations as nodes in the social vehicle network. Vehicles access the consortium blockchain through base stations. Before entering the social vehicle network, both vehicles and base stations must register and be certified by a certification authority. After successful registration, both vehicles and base stations obtain legitimate identities, and each vehicle receives a public-private key pair (PK). i SK i ) and account i ={Add i balance i ,R i }, PK i SK i Representing vehicle u i Public and private keys, Add i Indicates vehicle u i account address, balance i Indicates vehicle u i The account balance, R i Indicates vehicle u i User reputation scores, i = 1, 2, ..., M, where M represents the number of vehicles in the social vehicle network. Each base station obtains a public-private key pair. They represent base stations bs and bs respectively k The public and private keys, k = 1, 2, ..., K, where K represents the number of base stations; S2: When vehicle u i When continuous queries are required, search for the nearest base station bs. j Generate query exchange requests and use base station bs j public key Encrypt; vehicle u i Encrypted query exchange request Send to base station bs k : Among them, ID i Indicates vehicle u i Identity ID, L i =(x i ,y i ) indicates vehicle u i Current position coordinates, vel i d i Representing vehicle u i Current speed and direction, a i Indicates vehicle u i Collaborative pricing; base station bs k For query exchange requests received within a preset time period, the private key is used first. The query exchange request is decrypted, and the requesting vehicle is checked to see if it meets the creation conditions of the smart contract, including whether the user's identity is legitimate, their reputation is good, and their account balance is greater than a preset threshold. If the conditions are met, the query exchange request of the requesting vehicle is accepted; otherwise, the query exchange request of the requesting vehicle is rejected, and the user's reputation of the requesting vehicle is reduced by 1. (Base station bs) k Based on the cooperative quotes of the requesting vehicles, the requesting vehicles whose query exchange requests have been accepted are clustered, so that requesting vehicles with similar cooperative quotes are grouped into the same cluster; base station bs k Create a many-to-many smart contract for each requesting vehicle cluster, where the set of requesting vehicles is U, the number of requesting vehicles is M′, and the set of cooperating vehicles V is initialized to empty. Then, the base station bs k The smart contract requests vehicle information to other vehicles within the base station's coverage area; base station bs k The collaborative quote a from each requesting vehicle in the requesting vehicle set U. i From its account balance i Transferred to the smart contract account SC_Acc created for the requested vehicle. i ; S3: In the social vehicle network, after each vehicle receives the smart contract request vehicle information broadcast by the base station, it selects the requesting vehicle to cooperate in bidding based on its own situation. Each cooperating vehicle v j Generate a query exchange cooperation request, and use the base station bs to submit the request. k public key Encryption is performed, and collaborative vehicles v j Encrypted query exchange collaboration request Send to base station bs k : Where j = 1, 2, ..., N, N represents the number of cooperating vehicles, ID j Indicates collaborative vehicle v j Identity ID, Add j Indicates collaborative vehicle v j account address, balance j Indicates collaborative vehicle v j The account balance, R j Indicates collaborative vehicle v j User reputation rating, L j =(x j ,y j ) indicates a cooperative vehicle v j Current position coordinates, vel j d j These represent the cooperative vehicles v j Current speed and direction, Γ j =(U j ,σ) represents a collaborative bidding pair of vehicles, where U j Indicates collaborative vehicle v j Select the set of vehicles to bid on, and the collaboration deposit is σ; base station bs k Upon receiving a query exchange collaboration request, first use the private key. The query exchange collaboration request is decrypted, and the collaborating vehicle is checked to see if it meets the conditions, including whether the user's identity is legitimate, their reputation, and whether their account balance exceeds a preset threshold. If not, the query exchange request is rejected, and the user's reputation for that vehicle is decremented by 1. If the conditions are met, the query exchange collaboration request is accepted, and the vehicle is added to the smart contract's collaborating vehicle set V. The number of collaborating vehicles in the final set V is denoted as N′. For each collaborating vehicle in the set V, the base station bs k The collaboration deposit σ will be deducted from its account balance. j Transferred to the contract account SC_Acc created for this collaborative vehicle. j ; S4: Base station bs k The similarity weight matrix between the requesting vehicle and the cooperating vehicle in the smart contract is calculated using the following method: Determine the bidding variable λ based on the collaborative bidding pairs of the collaborative vehicles. mn ∈{0,1}, where λ mn =1 indicates a request for vehicle u m and collaborative vehicles v n There is a bidding relationship, otherwise λ mn =0, m=1,2,…,M′, n=1,2,…,N′; When λ mn When = 0, let the requesting vehicle u m and collaborative vehicles v n Similarity of driving states between mn =0, when λ mn When = 1, the following method is used to calculate the requested vehicle u. m and collaborative vehicles v n Similarity of driving states between mn : The positional similarity s is calculated using the following formula. L (u m ,v n ): Among them, (x m ,y m ), (x n ,y n ) respectively represent the request vehicle u m Collaborative vehicles v n The current position coordinates, ΔL represents the set of vehicles θ m The maximum distance between any two vehicles, θ m Indicates a request for vehicle u m The set of all collaborating vehicles that bid for it; The directional similarity s is calculated using the following formula. d (u m ,v n ): Where, d m d n These represent the requests for vehicle u. m Collaborative vehicles v n Current vehicle orientation angle, d max d min Let θ represent the set of vehicles respectively. m The maximum and minimum values ​​of the vehicle's directional angle; The velocity similarity s is calculated using the following formula. vel (u m ,v n ): Among them, vel m vel n These represent the requests for vehicle u. m Collaborative vehicles v n Current vehicle speed, vel max vel min Let θ represent the set of vehicles respectively. m The maximum and minimum speeds of vehicles in the middle; The requested vehicle u is obtained by fusing the following formula. m and collaborative vehicles v n Similarity of driving states between mn : s mn =γ1·s vel (u m ,v n )+γ2·s d (u m ,v n )+γ3·s L (u m ,v n ) Where γ1, γ2, γ3 > 0 are preset weighting factors, and γ1 + γ2 + γ3 = 1; When the driving state similarity calculation is completed for any requesting vehicle in the requesting vehicle set U and its corresponding bidding collaborating vehicle, the similarity weight matrix W between the requesting vehicle set and the collaborating vehicle set in the smart contract is obtained: S5: Base Station bs k The relationship between requesting vehicles and cooperating vehicles in a smart contract is modeled as a weighted bipartite graph G = (U, V, E, W), where U represents the set of requesting vehicles, V represents the set of cooperating vehicles, and E represents the set of edges between requesting vehicles and cooperating vehicles. When λ mn When = 0, request vehicle u m and collaborative vehicles v n There is no edge between them, when λ mn When = 1, request vehicle u m and collaborative vehicles v n There are edges between them, and W represents the similarity weight matrix; base station bs k The weighted bipartite graph minimum weight matching algorithm is used to match vehicles, obtain the matching results of requesting vehicles and cooperating vehicles, and feed back the matching results to each requesting vehicle. S6: Request vehicle u m Use its identity ID to match the collaborative vehicle. public key Encryption is performed, including the service type POI_type, query range r, and session key pk. m Use the location server's public key PK s Encryption is performed to generate a query exchange message. And sent to the collaborating vehicles Collaborative vehicles Received request for vehicle u m After exchanging query messages, first use the private key. right Decrypt and convert it into a collaborative vehicle encrypted identity information Soon Use the location server's public key PK s Encryption is required; collaborative vehicles Request vehicle u m With cooperative vehicles The identity mapping relationship between the vehicles is stored in a file list of the cooperating vehicles, and then a service query request (CQR) is sent to the location server. The location server received the collaborative vehicle After submitting a service query request, the service query is performed based on the service type POI_type and the query range r, and the query result is displayed using the requested vehicle u. m Session key pk m Encrypt the query results and then perform a comparison. m (result) feedback to collaborating vehicles Collaborative vehicles The requested vehicle u was obtained by querying the list of collaborating users' files. m The user will use their own ID to request vehicle u m public key PK m Encrypt the query results and then perform a PK. m (result) together generate the query result message QF and send it back to the requesting vehicle u. m : S7: Request vehicle u m Upon receiving the query result message QF, the private key SK is used. m Decrypt to obtain the ID of the collaborating vehicle, then use the session key to PK. m Decryption yields the query result (result). If decryption fails, the result is sent to the base station (bs). k Feedback message indicating collaboration failure, base station bs k After receiving the collaboration failure message, deduct the collaborative vehicle. The deposit is deducted and the user's credit score is reduced by 1. If decryption is successful, the data is sent to the base station bs. k Feedback message indicating successful collaboration, base station bs k After receiving the collaboration success message, send a message to the requesting vehicle u. m and collaborative vehicles Send separate account confirmation request messages to receive collaboration rewards: Con m =PK m (SC_Add||SC_Acc m ||p m ←a m ) Where SC_Add represents the smart contract address, and SC_Acc m , These represent the requests for vehicle u. m and collaborative vehicles The contract account, p m , These represent the requests for vehicle u. m Collaborative expenditures and collaborative vehicles Collaboration rewards Indicates the cooperative vehicles Add 1 to the user's reputation; Request vehicle u m and collaborative vehicles After receiving the account confirmation request message, the base station bs k Send account confirmation message, base station bs k After receiving the account confirmation message, for the collaborative vehicle The rewards are distributed, and the user transaction information in the smart contract is sent to other nodes in the consortium blockchain for auditing and verification. Finally, the base station bs k Verified user transaction information from smart contracts is uploaded to the consortium blockchain.

2. The method for protecting privacy of query exchange trajectories according to claim 1, characterized in that, In step S3, when selecting a vehicle to participate in the collaborative bidding, the vehicle selects based on its own collaboration cost and the collaboration offer of the requesting vehicle, choosing the requesting vehicle that will bring the greatest benefit to the collaborating vehicle.

Citation Information

Patent Citations

  • Online car-hailing system and method based on privacy contract

    CN113806807A

  • Express context position privacy protection method based on block chain

    CN114201764A