Privacy protection k-means clustering method and system used in vehicle scene

By implementing non-interactive vehicle driving behavior clustering using an improved Paillier encryption method, the challenges of privacy protection and efficient clustering in vehicle-to-everything (V2X) networks are solved. This achieves driving behavior analysis with low communication overhead and high accuracy, ensuring that vehicle data privacy is not leaked.

CN121723211APending Publication Date: 2026-03-24XIAN WUJUE EDGE COMPUTING NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-13
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies struggle to simultaneously achieve privacy protection, low communication overhead, and high clustering accuracy in driving behavior analysis within a connected vehicle environment. Existing solutions suffer from issues such as high communication overhead, the need for multiple rounds of interaction, and a significant decrease in accuracy.

Method used

An improved Paillier encryption method (EM-Paillier) is adopted to ensure that the driving feature vectors uploaded by the vehicle are always encrypted through a non-interactive clustering process. The cloud server performs k-means clustering in the encrypted domain, using a custom distance function and aggregation strategy. The cluster centers are displayed after decryption to avoid leaking individual vehicle data.

Benefits of technology

It achieves low communication overhead and high clustering accuracy, with clustering results highly consistent with plaintext results, strictly protects vehicle privacy, and eliminates the accuracy loss and communication bottlenecks of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723211A_ABST
    Figure CN121723211A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of intelligent traffic systems and privacy computing, and particularly relates to a privacy protection k-means clustering method and system used in a vehicle scenario, and the method comprises the steps: a system configuration stage: generating and distributing encryption parameters under a shared Paillier public key when the system is initialized; in the report submitting stage, each vehicle encrypts and uploads the semantic feature vector of the report when submitting the report; in the privacy protection clustering stage, the server uses a self-defined distance function and an aggregation strategy to execute k-means clustering on the ciphertext; in the data center disclosure stage, only the decrypted clustering center is displayed during clustering center disclosure, so that further analysis is facilitated, and data of a single vehicle cannot be leaked. According to the method, non-interactive clustering is adopted, the vehicles only upload encryption features at one time, the vehicles do not need to participate in subsequent iteration, and the overall communication complexity is O (n).
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of intelligent transportation systems and privacy computing, and particularly relates to a privacy-preserving k-means clustering method for vehicle driving behavior analysis. BACKGROUND

[0002] With the rapid development of Internet of Vehicles (IoV) and intelligent transportation systems, vehicles generate a large amount of driving data. To analyze driving behavior characteristics, clustering methods, especially k-means clustering, are widely used. However, directly uploading original driving features in plaintext form can leak sensitive privacy. Therefore, researchers have proposed various privacy-preserving clustering schemes, including: Differential privacy (DP) method: by injecting random noise into data or clustering results to protect privacy, but the noise reduces clustering accuracy, for example, the cluster center deviation after injecting noise is usually about 2%~3%, which significantly affects the accuracy of fine-grained driving behavior analysis.

[0003] Homomorphic encryption (HE) method: using homomorphic encryption to enable the cloud to perform clustering operations on ciphertext to maintain output accuracy. However, existing schemes often require multiple rounds of interaction: in each iteration, the cloud needs the client to participate in the decryption / re-encryption process, resulting in a linear increase in communication overhead with the number of clusters k and the number of iterations v.

[0004] Multi-party secure computation (MPC) method: the client splits the data into multiple shares and distributes them to the participants, avoiding direct transmission of plaintext, which can meet certain privacy and efficiency requirements. However, the fragmentation and distribution of results require additional synchronous communication steps, increasing network burden and limiting scalability in dynamic Internet of Vehicles environments.

[0005] In summary, existing technologies cannot simultaneously consider privacy protection, low communication overhead, and high clustering accuracy, which is a major challenge in designing efficient and practical Internet of Vehicles driving behavior clustering schemes. SUMMARY

[0006] The present application aims to provide a new k-means clustering scheme. This scheme is based on an improved Paillier encryption method (EM-Paillier), which enables efficient and accurate driving behavior clustering without revealing original driving data. Specific goals include:

[0007] Privacy protection: ensure that the original driving features uploaded by the vehicle end always remain encrypted during transmission and computation, avoiding sensitive information from being obtained by the cloud or third parties;

[0008] Low communication overhead: By designing a non-interactive clustering process, each vehicle only needs to upload an encrypted feature vector once, and subsequent calculations do not require the participation of the vehicle, thereby greatly reducing the number of communication rounds and data transmission volume;

[0009] High clustering accuracy: Under the premise of ensuring data security, the encrypted clustering result is highly consistent with the plaintext clustering result, avoiding the precision decline introduced by differential privacy noise.

[0010] The application is implemented as follows: a privacy protection k-means clustering method for vehicle driving behavior analysis, the method comprising:

[0011] S1: system configuration phase, when the system is initialized, generate and distribute encryption parameters based on shared Paillier public key;

[0012] S2: report submission phase, each vehicle encrypts and uploads its semantic feature vector when submitting the report;

[0013] S3: in the privacy protection clustering phase, the server uses a custom distance function and aggregation strategy to perform k-means clustering on the ciphertext;

[0014] S4: data center disclosure phase, when the cluster center is disclosed, only the decrypted cluster center is displayed for further interpretation, without revealing individual vehicle data.

[0015] Further, the S1 specifically comprises:

[0016] The key center (KC) is responsible for generating and distributing cryptographic parameters; the security parameter is , KC selects two large prime numbers p and q, and a comparison key ck, such that gcd (ck, p) = gcd (ck, q) = 1, gcd represents the greatest common divisor of two numbers; it sets the EM-Paillier modulus to n = p · q · ck; the public key is defined as (n, g), where g = n +1, and the ciphertext space is ; in order to support decryption under this extended modulus, KC calculates the secret parameter λ = lcm (p − 1, q −1, ck − 1), lcm() represents the calculation of the least common multiple; KC retains the private key, while (n, g) is shared with all vehicles to ensure encryption consistency; the comparison key ck is displayed to the cloud server (CS) to enable encrypted distance evaluation.

[0017] Further, the S2 specifically comprises: each vehicle Vi collects its multi-dimensional driving behavior feature vector through the vehicle-mounted sensor or local diagnostic module , the vehicle Vi performs EM-Paillier encryption using the public key (n, g) in the following way , where the random number is independently chosen for each dimension to ensure semantic security of the ciphertext; then, the vehicle Vi constructs its reporting data packet Rep i , which contains the encrypted feature set , the vehicle's unique identifier VID i , and optional auxiliary information aux i , such as a timestamp, vehicle type, etc.

[0018] To ensure the authenticity and integrity of the data, the vehicle Vi generates a digital signature for the reporting data packet Rep i using its own private signing key sk i ; finally, the vehicle sends the signed reporting data (Rep i , σ i ) to the CS for subsequent processing.

[0019] Further, the S3 specifically includes:

[0020] The CS performs k-means clustering on all encrypted reporting data; upon receiving the reporting data packet Rep i submitted by each vehicle, the CS first verifies the validity of the digital signature using the vehicle's public key to confirm the integrity and authenticity of the submission; if the verification fails, the report is discarded directly, otherwise it enters the clustering calculation process; the CS randomly selects k encrypted vectors from the received encrypted feature set {c i} as initial cluster centers to avoid bias; random selection can use a uniform random method, or in some applications, it can be selected according to vehicle type, timestamp, or geographic location information combined with weight probability; then, for each encrypted feature vector c i , the CS determines its nearest cluster center among the k encrypted cluster centers {μ1, μ2, …, μ k} based on EM-Paillier encryption difference operation; to complete the distance calculation, the CS calculates the encrypted scaled Euclidean distance for each cluster center μ j ; for any dimension, the CS calculates the encrypted difference value using the following formula:

[0021] ,

[0022] When is satisfied, the modulus domain decoding is correct; the true amplitude of the difference value can be recovered as follows:

[0023] ,

[0024] Further, the encryption result of squared Euclidean distance can be directly written as:

[0025] ,

[0026] Since (pq)2is a constant common to all comparisons, it does not affect the relative order of distance size, so CS only needs to compare the scaled encrypted distance to complete clustering, and assign each encrypted vector c i to the cluster with the smallest distance, forming an encrypted cluster set {C1, C2, …, Ck}; after clustering is completed, CS performs homomorphic accumulation in the encrypted domain on all members in each cluster C j to obtain the encrypted feature sum of each dimension of the cluster:

[0027] ,

[0028] Let Since EM-Paillier encryption does not support ciphertext division, CS does not directly perform division to obtain the mean value, but retains the encrypted accumulation vector as a temporary representation of the cluster center for the next iteration; in the distance calculation of the next iteration, to maintain the comparability of the scaled distances of different cluster centers, CS calculates the global least common multiple

[0029] ,

[0030] of all cluster sizes and applies this scaling factor to the encrypted accumulation values of all cluster centers; the scaled encrypted difference vector is represented as:

[0031] ,

[0032] Since is an integer, it can be directly implemented through the scalar homomorphic operation of EM-Paillier; using a uniform S ensures that the scaled distances of all clusters maintain consistent proportions, thereby maintaining the correctness of the comparison order; to avoid modulus domain overflow, it is necessary to satisfy:

[0033] ,

[0034] This constraint can be achieved by selecting a sufficiently large comparison key ckand an appropriate fixed-point precision parameter δ, so that all intermediate calculations remain within the legal range; CS only retains the comparison results for clustering, and the scaled ciphertext is not accumulated for use to avoid error propagation; CS repeatedly executes the above “clustering—update” process until the cluster assignment of vehicles no longer changes or reaches the preset number of iterations; after convergence, CS records the corresponding encrypted accumulation vector for each cluster C j :

[0035] .

[0036] Further, the CS sends all encrypted accumulated vectors and the cluster size to the key center KS, which is decrypted by the KS using the private key to recover the plaintext accumulated result:

[0037] ,

[0038] Subsequently, the KC divides it by the cluster size to obtain the final plaintext cluster center:

[0039]

[0040] The decrypted cluster center is finally returned to the CS and used as the final output of this clustering, which can be further used for driving behavior analysis, vehicle grouping, risk assessment, and other downstream tasks.

[0041] In combination with the above technical solutions and the technical problems solved, the technical solutions protected by the application have the following advantages and positive effects:

[0042] Significant reduction in communication overhead: The application is a non-interactive clustering, and the vehicle only uploads encrypted features once. Subsequent iterations do not require the participation of the vehicle, and the overall communication complexity is O(n). In contrast, the interactive HE scheme requires multiple rounds of interaction, and its communication cost increases linearly with the number of clusters and the number of iterations. While the differential privacy and MPC schemes can reduce plaintext transmission, they require additional communication or synchronization. Experimental results show that the communication and computing overhead of the application is much lower than that of existing privacy-preserving clustering protocols.

[0043] High clustering accuracy: Since the clustering is accurately calculated in the ciphertext domain throughout, no perturbation noise is injected, and the clustering results of the application are almost identical to those of the plaintext k-means clustering. The precision loss of 2%~3% of traditional differential privacy methods is eliminated. Experiments show that the clustering accuracy of the application on real vehicle flow data sets such as HighD is very close to that of the plaintext algorithm, significantly better than existing privacy protection schemes.

[0044] Strict privacy protection: The original driving feature vector remains encrypted throughout the upload and calculation process, and the cloud cannot obtain the plaintext data or the difference value. Since the cloud only knows ck and does not know p, q, even if the encrypted difference value is obtained, the original feature cannot be recovered. The application has been formally analyzed for security and proven to meet the requirements of semantic security and indistinguishability.

[0045] The technical solutions of the application fill the gap in the industry at home and abroad: Most existing privacy-preserving k-means clustering schemes rely on interactive homomorphic encryption, DP noise injection, or MPC multi-round communication, and generally have:

[0046] • Large communication overhead, unable to adapt to high mobility scenarios of vehicle networking

[0047] • Requires vehicle participation in multiple rounds of calculation, vehicle needs to be online for a long time, which is not realistic

[0048] • The accuracy of the DP method decreases significantly, which cannot support fine driving behavior analysis

[0049] • Homomorphic encryption cannot support difference and division operations, resulting in the need to decrypt back to the vehicle end.

[0050] • The present application first constructs the "three modulus extension" Paillier (EM-Paillier), so that the cloud server can complete the difference comparison, distance calculation and mean update without decryption, thereby realizing the first truly "non-interactive privacy protection k-means clustering" scheme. This scheme completely eliminates the core bottleneck of "comparison cannot be done, division cannot be done" in the clustering process of traditional HE, which belongs to the key difficulty that has not been solved in the industry, thus filling the technical gap in the direction of vehicle driving behavior privacy clustering.

[0051] The technical scheme of the present application overcomes the technical bias: for a long time, people generally believe that the Paillier system cannot be used for non-interactive clustering, because "comparison" and "division" are difficult to implement in the additive homomorphism system; the ciphertext k-means must rely on MPC or FHE to have complete operation capability. The present application restructures the modulus structure of Paillier, introduces a comparison key ck, and designs a new distance transformation and LCM scaling method, which proves that even with only additive homomorphism, the complete clustering process can be completed without FHE, MPC or noise injection. This result overturns the traditional cognition of "Paillier is not suitable for complex model reasoning" technical bias, making the additive homomorphism system regain feasibility in more privacy computing scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 is a system model diagram provided by an embodiment of the present application;

[0053] Figure 2 is an accuracy comparison diagram provided by an embodiment of the present application;

[0054] Figure 3 is the Euclidean distance calculation time provided by an embodiment of the present application;

[0055] Figure 4 is the center update distance calculation time provided by an embodiment of the present application;

[0056] Figure 5 is the clustering termination calculation time provided by an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to make the objects, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.

[0058] With the acceleration of the deployment of vehicle-to-everything (V2X) in urban transportation systems, the vehicle operation process is continuously digitized, and the driving behavior model gradually becomes an important input for the safety decision of the automatic driving system, the early warning of high-risk driving, and the pricing of vehicle insurance. However, the features uploaded by the vehicle are related to the trip trajectory, the throttle opening, the braking law, and other high-sensitivity behavior data. The traditional clustering analysis directly calculates the original vector, which is easy to expose the user's driving mode and identity features. Under the existing technical system, although the transmission security measures such as hypertext transfer protocol secure (HTTPS) and virtual private network (VPN) can be used to protect the link, the model calculation end still needs to use the plaintext data, so that the cloud can reconstruct the driver's daily driving habits. The industry urgently needs a mechanism that can perform effective k-means clustering without touching the original behavior data, but the mainstream encryption algorithms have limitations in additivity, comparability, and differential analysis, which are difficult to directly land in the driving behavior analysis scene.

[0059] The existing homomorphic clustering or differential privacy-based processing procedures often cannot maintain usability when facing the requirements of high dimensionality of vehicle behavior, non-uniformity of feature scale, and fine comparison of cluster distance. For example, differential privacy adds noise to continuous driving behavior (acceleration fluctuation, steering frequency, etc.), which will cause serious overlap of cluster boundaries, leading to distortion of convergence points. And the conventional Paillier encryption is difficult to support large-scale distance comparison and multi-round iteration update due to the limitation of the module domain. Industry landing cases also reflect that once the encrypted distance drifts or scales inconsistently in the iteration process, the cluster center will be offset cumulatively, and stable clustering cannot be obtained. In other words, the current technology still lacks an operable process that can complete the difference, square distance, scalar scaling, and multi-round iteration convergence in the encrypted state.

[0060] This method introduces the structure of the Extended Paillier Model (EM-Paillier) into the vehicle driving behavior clustering task. During the system configuration phase, a composite module n = p·q·ck, containing the comparison key ck, is established, where p and q are two randomly generated large prime numbers. This allows the encrypted domain to handle difference and distance operations. Each semantic feature vector reported by the vehicle is uploaded after randomized encryption, ensuring that the cloud server cannot access the original driving features at any time. The system design utilizes the structural properties of the extended module to maintain the decodability of the dense-state difference within the module domain, enabling the comparison of scaled Euclidean distances without decryption. Specifically, in each iteration, the server adjusts the scaling factor of all cluster centers by calculating the global least common multiple of the cluster size. This ensures that the semantics of cross-cluster distance comparisons remain consistent, allowing k-means clustering to undergo multiple iterations under dense-state conditions without encountering the abnormal convergence problem common to traditional homomorphic clustering.

[0061] The key to dense-state clustering computation lies in the homomorphic computability of differences, sums of squares, and aggregations. The difference vector constructed in this invention satisfies specific conditions within the extended modal domain, preventing loopback during modal decoding. Simultaneously, to avoid the propagation of accumulated errors across multiple iterations, the system does not directly use the scaled ciphertext in the next iteration, but retains the original accumulated vector, introducing a uniform scaling factor only temporarily during the distance calculation stage. This mechanism prevents the propagation of fixed-point errors between iterations, ensuring the convergence of the entire process is consistent with the behavior of the plaintext k-means. To further satisfy range constraints, the size and fixed-point precision of the comparison key ck are uniformly set by the Key Center (KC) during the design phase, ensuring the entire dense-state computation chain remains stable even with an industrial-scale vehicle count, preventing modal domain overflow due to vehicle expansion.

[0062] At the algorithm level, this invention eliminates the core limitation of traditional encryption, which prevents distance comparison. It allows the cloud to directly complete the most complex steps—differential calculation, distance sorting, and aggregation updates—within the encrypted domain. At the system architecture level, by separating the roles of the Key Center (KC) and the Cloud Server (CS), decryption authority is solely held by the Key Center. Even if the Cloud Server is compromised, it cannot obtain any vehicle driving behavior characteristics. At the deployment level, since feature vector encryption relies solely on Paillier additive homomorphic structures, it does not require the introduction of expensive multiplicative homomorphic or multi-party secure computation protocols, enabling its integration into existing vehicle networking platforms at a lower cost. This method maintains the compatibility of "plaintext-level clustering effect + encrypted-level privacy guarantee," allowing it to maintain real-time service capabilities even at a scale of millions of vehicles and a sampling frequency of minutes.

[0063] This invention addresses three key long-standing issues in the connected vehicle industry by utilizing Paillier extended module structures and engineering-processed distance comparability: First, clustering can be completed in the cloud without accessing any plaintext driving behavior, ensuring that the original data remains on the vehicle side. Second, the fundamental problems of incomparable dense-state distances and unupdable iteration centers are solved by employing scaled Euclidean distance and a unified least common multiple strategy. Third, by disclosing only the cluster centers through the decryption output of the key center, the industry can continue to conduct driving behavior modeling, risk segmentation, vehicle insurance algorithm training, and road safety analysis without infringing on the behavioral privacy of individual vehicles. The entire solution combines engineering deployability with cryptographic security, providing a mass-producible technical path for intelligent clustering of privacy-sensitive vehicle data.

[0064] This invention provides a privacy-preserving k-means clustering method for vehicle driving behavior analysis, the method comprising:

[0065] S1: During the system configuration phase, encrypted parameters are generated and distributed under the shared Paillier public key during system initialization.

[0066] S2: During the report submission phase, each vehicle encrypts and uploads its semantic feature vector when submitting the report;

[0067] S3: During the privacy-preserving clustering phase, the server performs k-means clustering on the ciphertext using a custom distance function and aggregation strategy;

[0068] S4: During the data center disclosure phase, only the decrypted cluster centers are displayed when the cluster centers are made public, so as to provide further explanation without revealing individual vehicle data.

[0069] S1 specifically includes:

[0070] The Key Center (KC) is responsible for generating and distributing cryptographic parameters; let the security parameters be... KC chooses two large ones. The public key is defined as (n, g), where p and q are prime numbers, and ck is a comparison key, such that gcd(ck, p) = gcd(ck, q) = 1, and gcd represents the greatest common divisor of the two numbers; it sets the EM-Paillier modulus to n = p · q · ck; the public key is defined as (n, g), where g = n + 1, and the ciphertext space is... *; To support decryption under this extended mode, KC computes the secret parameter λ = lcm(p − 1, q − 1, ck − 1), where lcm() is a function to solve for the least common multiple; KC keeps the private key, while (n, g) is shared with all vehicles to ensure encryption consistency; the comparison key ck is shown to the cloud server (CS) to enable encryption distance evaluation.

[0071] S2 specifically includes: each vehicle Vi collects its multi-dimensional driving behavior feature vector through onboard sensors or a local diagnostic module. Where m represents the number of feature dimensions; for each feature value in the vector Vehicle Vi uses the public key (n, g) to perform EM-Paillier encryption, calculated as follows: Among them, random numbers *Each dimension is selected independently and randomly to ensure the semantic security of the ciphertext; subsequently, vehicle Vi constructs its reported data packet Rep. i The data packet contains a set of encryption features. Vehicle Unique Identifier (VID) i and optional auxiliary information aux i For example, timestamps, vehicle types, etc.;

[0072] To ensure the authenticity and integrity of the data, vehicle Vi uses its own private signature key sk i For the reported data packet Rep i Generate digital signature Finally, the vehicle will submit the signed report data (Rep). i ,σ i Send to CS for further processing.

[0073] S3 specifically includes:

[0074] CS performs encrypted k-means clustering on all encrypted reported data; upon receiving the reported data packet Rep from each vehicle... i Next, CS first uses the vehicle's public key to verify the validity of the digital signature to confirm the integrity and authenticity of the submitted content; if the verification fails, the report is discarded directly; otherwise, the clustering calculation process begins; CS then uses the received set of encrypted features {c i In the process, k encrypted vectors are randomly selected as the initial cluster centers to avoid bias. Random selection can be achieved using a uniform random method, or in some applications, it can be based on vehicle type, timestamp, or geographic location information combined with weighted probabilities. Subsequently, CS processes each encrypted feature vector c... i Based on EM-Paillier encryption differential operations, its relationship with the centers of k encryption clusters {μ1,μ2,…,μ} is determined. k The nearest cluster center in}; to complete the distance calculation, CS calculates the distance between each cluster center μ. j Calculate the scaled Euclidean distance for encryption; for any dimension, CS calculates the encryption difference dist(ck,c) using the following formula. i ,μ j ):

[0075] ,

[0076] When satisfied At this time, it can be ensured that the modal domain decoding is correct; the true amplitude of the difference can be recovered by the following formula:

[0077] ,

[0078] Where |·| represents the absolute value, and therefore, the encryption result of the squared Euclidean distance can be directly written as:

[0079] ,

[0080] Since (pq)² is a common constant in all comparisons and does not affect the relative order of distance magnitudes, CS only needs to compare the scaled encrypted distances to complete clustering, and then cluster each encrypted vector c. i Assign the clusters with the smallest distances to form encrypted cluster sets {C1, C2, ..., Ck}; after clustering, CS assigns each cluster C... j All members within the cluster undergo homomorphic accumulation in the cryptographic domain to obtain the sum of cryptographic features for each dimension of the cluster:

[0081] ,

[0082] set up Since EM-Paillier encryption does not support ciphertext division, CS does not directly perform division to obtain the mean. Instead, it retains the encrypted accumulation vector as a temporary representation of the cluster centers for the next iteration. In the distance calculation of the next iteration, to maintain the comparability of distances between different cluster centers after scaling, CS calculates the global least common multiple based on the sizes of all clusters.

[0083] ,

[0084] This scaling factor is then applied to the encrypted cumulative value at all cluster centers; the scaled encrypted difference vector is represented as:

[0085] ,

[0086] because Since S is an integer, it can be directly implemented using scalar homomorphic operations in EM-Paillier; using a uniform S ensures that the scaling distance of all clusters maintains a consistent ratio, thus maintaining the correctness of the comparison order; to avoid modular overflow, the following must be satisfied:

[0087] ,

[0088] This constraint can be achieved by selecting a sufficiently large comparison key ck and an appropriate fixed-point precision parameter δ, ensuring that all intermediate calculations remain within the legal range; CS only retains the comparison results for clustering, while the scaled ciphertext is not accumulated for use, to avoid error propagation; CS repeats the above "clustering-update" process until the cluster assignment of the vehicles no longer changes or the preset number of iterations is reached; after convergence, CS performs a clustering process on each cluster C. j Record its corresponding encrypted accumulation vector:

[0089] .

[0090] CS will encrypt and accumulate all vectors and cluster size The message is sent to the key center KC, which uses the private key λ to decrypt it and recover the plaintext accumulation result.

[0091]

[0092] KC then divides it by the cluster size to obtain the final plaintext cluster center:

[0093] ,

[0094] Decrypted cluster center Finally, the results are returned to CS as the final output of this clustering, which can be further used for downstream tasks such as driving behavior analysis, vehicle grouping, and risk assessment.

[0095] Figure 1 This paper illustrates the overall structural model of the privacy-preserving vehicle driving behavior clustering system provided in an embodiment of the present invention. The system consists of a key center, vehicle terminals, and a cloud server. The vehicle terminals collect multi-dimensional driving behavior features such as speed, braking frequency, and acceleration, and encrypt the feature vectors using a homomorphic encryption public key pre-distributed by the key center. The encrypted feature data is transmitted to the cloud server via a secure channel. The cloud server performs encrypted k-means clustering under conditions where plaintext is inaccessible, including encrypted differential operations, encrypted Euclidean distance calculation, intra-cluster encrypted accumulation, and iterative updates. The final clustering results are published only in the form of decrypted cluster centers, thus ensuring that individual vehicle behavior data remains encrypted at all times, achieving privacy protection for driving behavior analysis tasks.

[0096] Figure 2This paper compares the performance of different privacy-preserving clustering methods on three metrics: adjusted Rand index, normalized mutual information, and silhouette coefficient. Methods such as SEOC, FedDP-KMeans, LDP-KMeans, PPODC, STPC-KMeans, and LMPP are based on different privacy mechanisms, including synchronous encryption, differential privacy, and multi-party computation. Experimental results show that the proposed method achieves high levels in all three metrics: an adjusted Rand index of 0.729, normalized mutual information of 0.714, and silhouette coefficient of 0.613. Compared to other methods, it outperforms them in terms of cluster structure consistency and inter-cluster separation, indicating that the distance calculation and center update mechanism in the encrypted domain do not weaken the clustering accuracy. This invention, while maintaining privacy, can still approach or even surpass the clustering quality of plaintext schemes, verifying the effectiveness of its algorithm design.

[0097] Figure 3 The paper illustrates the time overhead of Euclidean distance calculation under different data record numbers. The horizontal axis represents the number of records, and the vertical axis represents the calculation time. The curves cover SEOC, PPOM, PPA-DBSCAN, LMPP, and the method of this invention. As the data volume increases from 10 to 100, the distance calculation time of this invention changes very little, always remaining in the low millisecond range, significantly outperforming the linearly increasing overhead caused by the multi-party computation protocol in the PPOM scheme. The results show that the encrypted differential and encrypted square operations implemented in this invention have near-constant computational costs, enabling dense-state clustering to maintain good scalability even with large-scale vehicle data.

[0098] Figure 4 The computation time comparison for the center update phase is shown. The computation time gradients of different methods change significantly with increasing record count. PPOM increases exponentially with data volume, while the center update overhead of LMPP and SEOC gradually increases with data size. This invention maintains extremely low overhead across all data sizes, demonstrating that its mechanism of using the least common multiple of cluster sizes to construct a unified scaling factor effectively avoids the accumulation of computational errors and complexity expansion in multiple rounds of dense-state iterations, enabling center updates to be completed with low complexity in the cryptographic domain.

[0099] Figure 5The comparison of total computation time under the condition of overall clustering termination is shown. The horizontal axis represents different schemes, and the vertical axis represents the computation time of a single clustering termination. PPOM has the highest termination time due to the large amount of multi-party communication involved, and SEOC also has a large time consumption due to the synchronous encryption structure. PPA-DBSCAN and LMPP are relatively low, but still significantly higher than the present invention. The clustering termination time of the present invention is maintained in the order of milliseconds, indicating that the dense k-means structure constructed based on extended modulus homomorphic operation maintains fast computation characteristics during iterative convergence, effectively meeting the real-time analysis needs of the Internet of Vehicles scenario.

[0100] Example: Privacy-preserving driving behavior clustering scenario for large-scale vehicle-to-everything (V2X) platforms

[0101] A provincial-level vehicle network management platform connects to approximately four million registered vehicles. Each vehicle periodically reports high-dimensional driving behavior characteristics such as speed, acceleration, throttle opening, braking intensity, and steering wheel angle during operation. Due to the highly individualized sensitivity of driving behavior data, the platform cannot directly upload or centrally store it in plaintext, as this would pose a significant risk to user privacy. Therefore, the platform adopts the privacy-preserving clustering scheme based on EM-Paillier proposed in this invention.

[0102] (1) System initialization phase

[0103] The platform establishes an independent key center (which does not participate in clustering calculations), which performs the following steps:

[0104] Randomly select two large prime numbers p and q, and compare the modulus ck, construct the extended modulus n = p⋅q⋅ck

[0105] Generate a public key (n, g = n + 1) and a private key λ = lcm(p−1, q−1, ck-1).

[0106] The public key (n, g) is distributed to all vehicle terminals, the comparison key ck is distributed to the cloud, and the private key is stored only by the key center.

[0107] Throughout the entire process, the cloud / platform cannot obtain the private key content, ensuring that all subsequent encrypted data cannot be decrypted by the cloud.

[0108] (2) Vehicle-side encrypted upload stage

[0109] Each vehicle locally collects driving behavior feature vectors during operation.

[0110] Such as speed, acceleration, yaw rate, etc. Each vehicle performs the following operations based on the public key:

[0111] For each dimension of feature value Randomly generated And calculated using EM-Paillier encryption. , forming the entire encrypted feature vector .

[0112] Uploaded to the cloud via a secure channel, requiring no participation in any subsequent iterations.

[0113] In this embodiment, each vehicle only needs to upload data once, without the need for multiple rounds of encryption or decryption interactions, ensuring that the communication overhead is fixed and extremely low.

[0114] (3) Cloud-based encrypted domain clustering stage

[0115] After receiving all encrypted feature vectors, the cloud initiates the privacy-preserving k-means clustering process, with the following steps:

[0116] Initialize cluster center,

[0117] The cloud randomly selects the encrypted feature vectors of k vehicles as the initial cluster centers, without the need for decryption.

[0118] Calculation of Euclidean distance in the encrypted domain

[0119] For any vehicle i and any cluster center j, the cloud calculates the encrypted difference. This will give you the encrypted form. The encrypted Euclidean distance can be obtained by performing homomorphic addition on the sum of squared encrypted differences across all dimensions in the cloud, without exposing any plaintext differences or feature distributions throughout the process.

[0120] Clustering operations

[0121] The system compares the Euclidean distances of the ciphertexts of different clusters in the cloud, and uses the comparison key ck to determine the cluster to which the vehicle is closest, then adds the vehicle to the corresponding cluster set.

[0122] Crypto Cluster Center Update

[0123] The encrypted features within each cluster are accumulated to obtain an encrypted accumulation vector. Since central computing involves division, the cloud uses the LCM scaling technology of this invention:

[0124] Calculate the least common multiple of all cluster sizes

[0125] ,

[0126] Calculate the scaled center encryption value

[0127] ,

[0128] By scaling, division operations are avoided, and the cloud can directly perform addition homomorphic updates to the cluster center in the ciphertext domain.

[0129] Iterate until convergence

[0130] The process of "distance calculation → clustering → center update" is repeated in the cloud until the cluster labels of all vehicles no longer change.

[0131] Throughout the entire process, the cloud never accessed any plaintext data and was unable to make reverse inferences about vehicle behavior.

[0132] (4) Cluster core decryption and analysis stage

[0133] Finally, the cloud sends the encrypted summation value of each cluster to the key center:

[0134] The key center decrypts Λj using the private key.

[0135] Calculate the plaintext value μj at each cluster center

[0136] Return to the cloud for subsequent driving behavior analysis or fleet management.

[0137] The original characteristics of each vehicle were not leaked, and the cloud could only obtain the clustering results. The entire closed loop complies with all the regulatory requirements for personal driving privacy.

[0138] Example 1: Encrypted Clustering of Driving Behavior for Urban Traffic Safety Early Warning

[0139] This embodiment demonstrates the application scenario of the present invention in urban traffic safety early warning, and can be used to support the technical implementation requirements of all aspects of the claims, including vehicle-side data collection, dense-state clustering, and cluster center decryption and disclosure. Vehicle-mounted units installed on urban roads collect real-time behavioral data such as acceleration variation, steering wheel angle variation frequency, and emergency braking response to reflect driving habits. Each vehicle reports several behavioral data points as vectors within a preset period, which are then sent to the cloud server after being encrypted using additive homomorphic encryption.

[0140] The cloud server utilizes its encrypted domain computing capabilities to perform distance comparisons on each encrypted vector. For example, if a vector uploaded by a vehicle contains four-dimensional values, the server calculates the encrypted difference and sum of squares between the vector and the initial cluster center to obtain the scaled distance. In this way, the server can classify behavior types without decrypting the feature content, automatically clustering aggressive, stable, and cautious driving behaviors into different clusters.

[0141] In the center update phase, since the data volume of each cluster is different, to ensure that the updated center maintains a consistent scale in the encrypted domain, this embodiment uses the least common multiple of the cluster size as a scaling factor, allowing the homomorphically calculated cumulative vector to directly participate in the next round of distance comparison. This mechanism ensures that the encrypted distance has no scale drift, enabling the k-means to have correct comparison semantics in the encrypted state.

[0142] After clustering convergence, the key center decrypts the encrypted accumulation vector to obtain the behavior cluster centers. Finally, the cloud server uses these cluster centers to identify potentially high-risk driving groups and perform macroscopic analysis. Since no specific vehicle characteristics or plaintext behavioral trajectories are disclosed during the process, this embodiment demonstrates that the system combines real-time performance with privacy protection.

[0143] Example 2: Dense-State Driving Behavior Clustering System for Auto Insurance Pricing

[0144] This embodiment illustrates the application process of the present invention in auto insurance risk control to support the technical implementation requirements regarding the system architecture in the claims. The auto insurance platform obtains driving risk-related characteristics from the vehicle in real time, including multiple dimensions such as the frequency of rapid acceleration, the number of sharp turns at night, and changes in braking curves. The vehicle encrypts these characteristics and transmits them to the cloud server. Since auto insurance companies cannot directly see the raw driving data, privacy protection becomes a necessary condition.

[0145] The cloud server uses a cryptographic clustering mechanism to cluster encrypted vectors, resulting in risk behavior clusters. Since the k-value is pre-set, each vehicle is clustered into several risk levels. During clustering, a dense-state difference and dense-state distance mechanism ensures that the server cannot know the behavioral characteristics and can only rely on encrypted distance relationships for classification.

[0146] After clustering is completed, the key center decrypts the cluster centers, and the auto insurance platform determines the average risk level of drivers in that category based on the statistical attributes of the center vectors. For example, drivers with large acceleration fluctuations and abnormal braking characteristics at the cluster centers can be identified as potentially high-risk individuals. All data injected into the model is presented in statistical form and does not involve individual records. This embodiment demonstrates that this method can be directly implemented in the insurance industry, meeting both privacy and business requirements.

[0147] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system (e.g., a microprocessor or dedicated hardware). Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented using hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or using software executed by various types of processors, or using a combination of the above-described hardware circuitry and software, such as firmware.

[0148] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A privacy-preserving k-means clustering method for vehicle driving behavior analysis, characterized in that, It includes four stages: system configuration, report submission, dense-state clustering computation, and data center disclosure, specifically including: During the system configuration phase, the key center generates a public key and a private key, and sends the public key to all vehicles. During the report submission phase, the vehicle performs homomorphic encryption on each dimension of its driving behavior feature vector and sends the encrypted vector, along with the vehicle identifier and signature, to the cloud server. During the dense clustering computation phase, the cloud server performs dense distance calculation on all encrypted vectors and completes k-means clustering iteration, while maintaining all features in the encrypted domain for difference calculation, distance comparison, and intra-cluster accumulation; During the data center disclosure phase, the key center decrypts the cumulative vector of each cluster and calculates the plaintext cluster center. The decrypted cluster center is then returned to the cloud server for driving behavior analysis.

2. The method according to claim 1, characterized in that, The system configuration phase includes: the key center selects two large prime numbers p and q, generates a modulus n, and constructs the public key parameter g; the key center retains the private key and publishes the public key to the vehicle for encryption processing of all features; the key center sets the comparison key in integer form to support the computability of encryption differential and encryption distance.

3. The method according to claim 1, characterized in that, The vehicle uses an additive homomorphic encryption algorithm to generate ciphertext for each dimension of the driving behavior feature vector, and then uses the vehicle's own signature key to digitally sign the data packet after it is generated, in order to ensure the authenticity and integrity of the data source.

4. The method according to claim 1, characterized in that, After receiving the encrypted feature vector, the cloud server first verifies the digital signature. After verification, it performs encrypted k-means clustering, which includes randomly selecting k initial encrypted cluster centers from all encrypted vectors and comparing encrypted distances through homomorphic difference calculation and homomorphic scalar operation.

5. The method according to claim 1, characterized in that, The encrypted distance calculation is achieved through encrypted difference, encrypted difference squared, and encrypted accumulation. The cloud server calculates the least common multiple of the cluster size based on the number of members in each cluster and uses this as a scaling factor to ensure that all cluster centers maintain a uniform scale in the encrypted domain, thus guaranteeing the effectiveness of encrypted distance comparison.

6. The method according to claim 1, characterized in that, During the data center disclosure phase, the key center uses its private key to decrypt the encrypted accumulation vector of each cluster, and divides the decrypted vector by the cluster size to obtain the plaintext cluster center. This ensures that only the cluster center is disclosed in plaintext, while the original driving characteristics of all vehicles remain encrypted.

7. A privacy-preserving k-means clustering system for vehicle driving behavior analysis, characterized in that, This includes a key center, vehicle-side equipment, and cloud servers, specifically: The key center is used to generate public keys, private keys, and comparison keys required for cryptographic calculations, and to distribute public keys to vehicles. The vehicle-side equipment is used to acquire driving behavior feature vectors and perform addition homomorphic encryption on each dimension of its features. It then forms reporting data through digital signatures and sends it to the cloud server. The cloud server is used to verify the signature of the reported data and perform k-means clustering on all reported feature vectors in the encrypted domain, including encrypted differential, encrypted distance calculation, encrypted cluster accumulation and iterative convergence; The key center is further used to decrypt the cluster encryption accumulation vector generated after clustering and output the plaintext cluster center.

8. The system according to claim 7, characterized in that, The key center includes a key generation module, a ciphertext decryption module, and a public key distribution module, which are used to provide unified encryption domain parameters and keep decryption capabilities from being leaked to cloud servers.

9. The system according to claim 7, characterized in that, The vehicle-side equipment includes a feature acquisition module, an encryption module, a vehicle identification management module, and a digital signature module, which are used to encode, randomize, encrypt, and encapsulate driving behavior features.

10. The system according to claim 7, characterized in that, The cloud server includes a signature verification module, a dense clustering module, and a convergence judgment module. The dense clustering module performs encrypted differential calculation, encrypted sum of squares operation, encrypted accumulation, and cluster center update, and uses an integer scaling factor to maintain the comparability of distances between clusters.