Intrusion detection method for internet of vehicles, and electronic device

By updating and encrypting multi-source in-vehicle data on the vehicle side, and combining this with cloud-based federated learning to update the intrusion detection model, the accuracy and data security issues of intrusion detection in the Internet of Vehicles (IoV) are resolved, achieving an efficient and secure intrusion detection method.

WO2026233476A1PCT designated stage Publication Date: 2026-11-12ANHUI KAIYANG TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/107636
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2026-01-13
Filing Date
2026-06-30
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Vehicle network intrusion detection methods have low accuracy and data security in intelligent connected vehicle environments. Centralized data processing infringes on user privacy, puts a lot of pressure on network bandwidth, lacks effective mechanisms to deal with model poisoning or backdoor attacks, and has insufficient robustness.

Method used

The lightweight initial model parameters are updated on the vehicle side based on multi-source on-vehicle data, and then encrypted and uploaded to the cloud. The cloud combines the encrypted results from multiple vehicle sides to update the initial detection model, forming a closed learning and detection loop. Data security and privacy protection are ensured through federated learning and encrypted transmission.

Benefits of technology

It achieves more accurate intrusion detection in the vehicle-to-everything (V2X) environment, protects user privacy, reduces network bandwidth burden, improves model training efficiency and accuracy, resists model poisoning attacks, and enhances the real-time performance and robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026107636_12112026_PF_FP_ABST
    Figure CN2026107636_12112026_PF_FP_ABST
Patent Text Reader

Abstract

An intrusion detection method for the Internet of Vehicles, and an electronic device. The method is applied to a vehicle end, and comprises: acquiring in-vehicle multi-source data, wherein the in-vehicle multi-source data is used for representing vehicle data from a plurality of data sources; on the basis of the in-vehicle multi-source data, updating initial parameters of a local initial model, so as to obtain updated parameters, wherein a parameter quantity of the initial parameters is less than a preset parameter quantity; encrypting the updated parameters, so as to obtain a first encryption result; and uploading the first encryption result to a cloud end, and receiving an intrusion detection model returned by the cloud end, wherein the cloud end performs parameter updating on an initial detection model of the cloud end on the basis of the first encryption result and a plurality of second encryption results generated by other vehicle ends, so as to obtain the intrusion detection model, and the intrusion detection model is used for performing intrusion detection on a vehicle end.
Need to check novelty before this filing date? Find Prior Art

Description

Intrusion detection methods and electronic devices for the Internet of Vehicles Technical Field

[0001] This disclosure relates to the field of vehicle technology, and more specifically, to an intrusion detection method and electronic device for vehicle networking. Background Technology

[0002] The rapid development of vehicle-to-everything (V2X) technology has facilitated information exchange between vehicles and between vehicles and infrastructure, enhancing driving safety and traffic efficiency. However, it has also introduced serious cybersecurity risks. Current intrusion detection methods face multiple challenges in the context of intelligent connected vehicles: centralized data processing is prone to infringing on user privacy and violating data security regulations. The large volume of data generated by vehicles being transmitted to the cloud for unified analysis puts significant pressure on network bandwidth and increases the burden on computing resources. The lack of effective mechanisms to counter model poisoning or backdoor attacks results in insufficient robustness, making the performance of network intrusion detection systems susceptible to malicious interference. Therefore, the detection accuracy and data security of V2X intrusion detection technologies are relatively low.

[0003] There is currently no good solution to the above problems. Summary of the Invention

[0004] This disclosure provides an intrusion detection method and electronic device for vehicle-to-everything (V2X) networks, which at least solves the technical problems of low detection accuracy and data security in intrusion detection of V2X networks in related technologies.

[0005] According to one aspect of the present disclosure, an intrusion detection method for a vehicle-to-everything (V2X) network is provided, applied to a vehicle. The method includes: acquiring multi-source vehicle data, wherein the multi-source vehicle data represents vehicle data from multiple data sources; updating the initial parameters of a local initial model based on the multi-source vehicle data to obtain updated parameters, wherein the number of parameters in the initial parameters is less than a preset number of parameters; encrypting the updated parameters to obtain a first encryption result; uploading the first encryption result to a cloud and receiving an intrusion detection model returned by the cloud, wherein the first encryption result is obtained by updating the parameters of the cloud's initial detection model by combining multiple second encryption results generated by other vehicle terminals, and the intrusion detection model is used to perform intrusion detection on the vehicle.

[0006] In the above embodiments of this disclosure, the initial parameters of the local initial model are updated based on vehicle-mounted multi-source data to obtain updated parameters, including: segmenting the vehicle-mounted multi-source data based on a preset time window to obtain data for multiple time windows; performing time alignment on the data for multiple time windows to obtain multiple time-aligned data, wherein time alignment is used to represent unifying the data from multiple time windows from multiple data sources to the same time axis; and updating the initial parameters of the local initial model based on the multiple time-aligned data to obtain updated parameters.

[0007] In the above embodiments of this disclosure, the initial parameters of the local initial model are updated based on multiple time-aligned data to obtain updated parameters. This includes: extracting multi-dimensional features from the multiple time-aligned data within a preset time window to obtain multi-dimensional features, wherein the multi-dimensional features include at least two of the following: statistical features, time-series features, frequency domain features, and information entropy-type features corresponding to the multiple time-aligned data; normalizing the multi-dimensional features to obtain standardized features; processing the standardized features using the local initial model to obtain a processing result; and updating the initial parameters based on the processing result to obtain updated parameters.

[0008] In the above embodiments of this disclosure, encrypting the updated parameters to obtain a first encryption result includes: performing gradient clipping on the updated parameters to obtain clipped parameters, wherein the norm of the clipped parameters is less than or equal to a preset norm threshold; encrypting the clipped parameters to obtain a first encryption result; preferably, encrypting the clipped parameters to obtain a first encryption result includes: performing differential privacy processing on the clipped parameters to obtain a first encryption result.

[0009] In the above embodiments of this disclosure, uploading the first encryption result to the cloud includes: performing sparsification processing on the first encryption result to obtain a sparsification processing result; performing quantization compression on the sparsification processing result to obtain a compression result; generating a data packet based on the desensitized identifier of the vehicle end and the compression result, wherein the desensitized identifier is used to represent the vehicle identifier of the vehicle end after desensitization processing; and uploading the data packet to the cloud.

[0010] In the above embodiments of this disclosure, after receiving the intrusion detection model returned by the cloud, the method further includes: in response to receiving the data to be detected, calculating an anomaly score for the data to be detected based on the intrusion detection model to obtain the anomaly score corresponding to the data to be detected; and performing intrusion detection on the data to be detected based on the anomaly score to obtain the intrusion detection result.

[0011] In the above embodiments of this disclosure, intrusion detection is performed on the data to be detected based on the anomaly score to obtain the intrusion detection result, including: if the anomaly score is greater than a preset anomaly score, the intrusion detection result is determined to be intrusion data; if the anomaly score is less than or equal to the preset anomaly score, the intrusion detection result is determined to be non-intrusion data.

[0012] According to another aspect of the present disclosure, an intrusion detection method for a vehicle network is also provided, applied in the cloud. The method includes: in response to receiving a first encryption result, determining the similarity between the first encryption result and a plurality of second encryption results that have been verified, wherein the first encryption result is generated using the above method; if the similarity is less than a preset similarity, determining that the first encryption result has been verified, and updating the parameters of an initial detection model based on the first encryption result to obtain an intrusion detection model; and distributing the intrusion detection model to the vehicle.

[0013] In the above embodiments of this disclosure, the initial detection model is updated with parameters based on the first encryption result to obtain an intrusion detection model, including: determining the trust score corresponding to the vehicle that uploaded the first encryption result, wherein the trust score is determined based on the historical performance data of the vehicle; determining the update weight corresponding to the first encryption result based on the trust score; and updating the parameters of the initial detection model based on the update weight and the first encryption result to obtain an intrusion detection model.

[0014] According to another aspect of the present disclosure, an intrusion detection device for a vehicle network is also provided, applied to a vehicle. The device includes: an acquisition component configured to acquire in-vehicle multi-source data, wherein the in-vehicle multi-source data represents vehicle data from multiple data sources; an update component configured to update the initial parameters of a local initial model based on the in-vehicle multi-source data to obtain updated parameters, wherein the number of parameters in the initial parameters is less than a preset number of parameters; an encryption component configured to encrypt the updated parameters to obtain a first encryption result; and a processing component configured to upload the first encryption result to a cloud and receive an intrusion detection model returned by the cloud, wherein the first encryption result is obtained by updating the parameters of the initial detection model in the cloud by combining multiple second encryption results generated by other vehicle terminals, and the intrusion detection model is used to perform intrusion detection on the vehicle terminal.

[0015] According to another aspect of the present disclosure, an intrusion detection device for a vehicle network is also provided, applied in the cloud. The device includes: a determining component configured to, in response to receiving a first encryption result, determine the similarity between the first encryption result and a plurality of second encryption results that have been verified, wherein the first encryption result is generated using the method described above; an updating component configured to, if the similarity is less than a preset similarity, determine that the first encryption result has been verified, and update the parameters of an initial detection model based on the first encryption result to obtain an intrusion detection model; and a distributing component configured to distribute the intrusion detection model to the vehicle.

[0016] According to another aspect of the present disclosure, an electronic device is also provided, including: a memory storing an executable program; and a processor configured to run the program, wherein the program executes the methods of various embodiments of the present disclosure when it runs.

[0017] According to another aspect of the present disclosure, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the methods of the various embodiments of the present disclosure.

[0018] According to another aspect of the present disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of the present disclosure.

[0019] According to another aspect of the present disclosure, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of the present disclosure.

[0020] According to another aspect of the present disclosure, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of the present disclosure.

[0021] In this embodiment, firstly, in-vehicle multi-source data is acquired, representing vehicle data from multiple data sources. Next, based on the in-vehicle multi-source data, the initial parameters of the local initial model are updated to obtain updated parameters, where the number of initial parameters is less than a preset number. Then, the updated parameters are encrypted to obtain a first encryption result. Finally, the first encryption result is uploaded to the cloud, and an intrusion detection model returned from the cloud is received. The first encryption result is combined with multiple second encryption results generated by other vehicle terminals to update the parameters of the cloud's initial detection model, resulting in an intrusion detection model used for intrusion detection on the vehicle terminal. This disclosure acquires in-vehicle multi-source data on the vehicle terminal, updates the initial parameters of the local initial model based on the in-vehicle multi-source data, obtains updated parameters, and encrypts the updated parameters, ensuring the confidentiality of the in-vehicle multi-source data. Even if the data is intercepted during network transmission, attackers will find it difficult to parse and reconstruct the in-vehicle multi-source data, thus protecting user privacy and data security. The initial encrypted result is uploaded to the cloud, where it combines encrypted results from multiple vehicles to update the parameters of the initial detection model, helping to build a more comprehensive and accurate intrusion detection model. The cloud updates parameters based on the encrypted results transmitted from the vehicle, ensuring both the efficiency and quality of model training while protecting the privacy of multi-source in-vehicle data. The cloud then feeds the trained intrusion detection model back to the vehicle, forming a closed learning and detection loop. The trained intrusion detection model can more accurately identify new and unknown attacks. Furthermore, through distributed data processing and encrypted transmission, the challenges of data security and privacy protection in centralized intrusion detection are effectively solved, achieving a balance between detection accuracy and data protection. This addresses the technical issues of low detection accuracy and data security in intrusion detection for connected vehicles in related technologies. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:

[0023] Figure 1 is a flowchart of an intrusion detection method for a vehicle network according to an embodiment of the present disclosure;

[0024] Figure 2 is a flowchart of another intrusion detection method for a vehicle network according to an embodiment of the present disclosure;

[0025] Figure 3 is a schematic diagram of an optional federated learning-based intrusion detection system architecture for connected vehicles according to an embodiment of the present disclosure;

[0026] Figure 4 is a schematic diagram of the overall process of an optional vehicle network intrusion detection method according to an embodiment of the present disclosure;

[0027] Figure 5 is a schematic diagram of an optional vehicle-side data processing and local training process according to an embodiment of the present disclosure;

[0028] Figure 6 is a schematic diagram of an optional cloud-based robust aggregation and trust management process according to an embodiment of the present disclosure;

[0029] Figure 7 is a schematic diagram of an optional vehicle-side real-time detection and alarm coordination mechanism according to an embodiment of the present disclosure;

[0030] Figure 8 is a schematic diagram of an intrusion detection device for a vehicle network according to an embodiment of the present disclosure;

[0031] Figure 9 is a schematic diagram of another intrusion detection device for a vehicle network according to an embodiment of the present disclosure. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] According to an embodiment of this disclosure, an embodiment of an intrusion detection method for a vehicle-to-everything (V2X) network is provided, applied to a vehicle. The steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than that shown here.

[0035] This embodiment provides an intrusion detection method for a vehicle-to-everything (V2X) network. Figure 1 is a flowchart of the intrusion detection method for a V2X network according to an embodiment of this disclosure. As shown in Figure 1, the process includes the following steps:

[0036] Step S102: Obtain vehicle-mounted multi-source data.

[0037] Among them, vehicle-mounted multi-source data is used to represent vehicle data from multiple data sources.

[0038] The aforementioned multi-source vehicle data refers to data collected from multiple data sources of the vehicle, including but not limited to vehicle bus communication data, vehicle controller operation logs, sensor data, location information, and vehicle network communication messages.

[0039] As an optional implementation, multi-source in-vehicle data is acquired. This data originates from various vehicle systems and sensors, including but not limited to: Controller Area Network (CLAN) bus data, reflecting the communication status of various electronic controllers within the vehicle; vehicle controller operation logs, recording key states and operational information of the vehicle control system; and vehicle-to-everything (V2X) communication messages, involving interaction data between the vehicle and surrounding vehicles or roadside infrastructure. Data acquisition is achieved through the vehicle's built-in sensors and communication components, such as reading data using the on-board diagnostic interface, capturing internal communication messages through the CLAN bus monitor, and capturing external communication information using V2X communication devices. This data is collected in real-time or periodically and stored in the vehicle's local data storage, preparing for subsequent feature extraction and model training.

[0040] Step S104: Based on the vehicle-mounted multi-source data, update the initial parameters of the local initial model to obtain the updated parameters.

[0041] The number of initial parameters is less than the number of preset parameters.

[0042] The aforementioned local initial model refers to the initial version of the machine learning model deployed on the vehicle. It is a lightweight deep learning model, such as a convolutional neural network, a recurrent neural network, a long short-term memory network, or an autoencoder.

[0043] The initial parameters mentioned above refer to the model parameters of the local initial model before training.

[0044] The aforementioned preset parameter quantity refers to the parameter quantity threshold used to measure the initial parameters, ensuring that the local initial model is a lightweight model.

[0045] The updated parameters mentioned above refer to the parameter values ​​obtained by the local initial model through training, representing the learning results of the local initial model on vehicle multi-source data.

[0046] As an optional implementation, in the vehicle-to-everything (V2X) intrusion detection method, the vehicle collects multi-source in-vehicle data, including controller local area network (CLAN) bus communication data, vehicle controller operation logs, and V2X messages. This data is then processed through time windowing, feature extraction, and normalization to transform it into standardized feature vectors suitable for model training. Next, the model is trained on a locally deployed lightweight neural network model. The model parameters are adjusted to minimize local experience loss, and regularization terms are added to prevent overfitting, resulting in updated parameters. To reduce communication overhead and protect privacy, the initial parameter count is smaller than the preset parameter count, employing a lightweight model structure with reduced parameter count.

[0047] In the above process, localized data processing and model training reduce the volume of uploaded data, lower network bandwidth burden and communication latency, making it suitable for the real-time monitoring needs in a vehicle-to-everything (V2X) environment. The lightweight model design significantly reduces the computational load on in-vehicle equipment, enabling even resource-constrained vehicles to efficiently participate in the model training process.

[0048] Step S106: Encrypt the updated parameters to obtain the first encrypted result.

[0049] The first encryption result mentioned above refers to the result after the vehicle-side encrypts the updated parameters. Encrypting the updated parameters helps protect the vehicle-side privacy and prevents the leakage of multi-source vehicle data during transmission.

[0050] As an optional implementation method, encrypting update parameters in vehicle-to-everything (V2X) intrusion detection helps ensure data security and privacy protection. Specifically, after the vehicle-side completes model training and update parameter generation locally, to avoid leaking sensitive information about the vehicle or owner when uploading these update parameters, the vehicle-side uses encryption technology to convert the update parameters into a first encrypted result. Before encryption, the vehicle-side also prunes the update parameters, limiting the norm to no more than a set threshold to prevent a single update from having an excessive impact on the global model due to data anomalies. Then, to further enhance privacy protection, the vehicle-side encrypts the pruned parameters, such as by adding Gaussian noise to the update parameters, to ensure that even if an attacker gains access to the encrypted update parameters, they cannot deduce details of the original data or vehicle-side information.

[0051] In the above process, the updated parameters are encrypted to ensure that even if an attacker intercepts the encrypted parameter updates, they will not be able to recover the original data or infer the behavior patterns of a specific vehicle, thus fully protecting data privacy and compliance.

[0052] Step S108: Upload the first encryption result to the cloud and receive the intrusion detection model returned by the cloud.

[0053] The first encryption result is obtained by combining multiple second encryption results generated by other vehicle terminals in the cloud to update the parameters of the initial detection model in the cloud, resulting in an intrusion detection model. The intrusion detection model is used to perform intrusion detection on the vehicle terminal.

[0054] The aforementioned cloud refers to the cloud server responsible for coordinating and aggregating encrypted results from various vehicle terminals, as well as performing the training, updating, and distribution of the global model. The cloud server is also responsible for monitoring and managing the participation of each vehicle terminal, performing trust scoring, and identifying and isolating nodes exhibiting malicious or abnormal behavior.

[0055] The aforementioned multiple second encryption results refer to the encryption results generated by other vehicles involved in the initial detection model update process.

[0056] The aforementioned initial detection model refers to the initial version of the machine learning model for intrusion detection deployed in the cloud.

[0057] The intrusion detection model described above refers to a model obtained through iterative training using federated learning, used to detect abnormal behavior or potential intrusion events in vehicular networks in real time. The cloud platform continuously improves and adjusts the model by aggregating encrypted updated parameters from various vehicle terminals to enhance the accuracy and robustness of detection.

[0058] In this embodiment, firstly, in-vehicle multi-source data is acquired, representing vehicle data from multiple data sources. Next, based on the in-vehicle multi-source data, the initial parameters of the local initial model are updated to obtain updated parameters, where the number of initial parameters is less than a preset number. Then, the updated parameters are encrypted to obtain a first encryption result. Finally, the first encryption result is uploaded to the cloud, and an intrusion detection model returned from the cloud is received. The first encryption result is combined with multiple second encryption results generated by other vehicle terminals to update the parameters of the cloud's initial detection model, resulting in an intrusion detection model used for intrusion detection on the vehicle terminal. This disclosure acquires in-vehicle multi-source data on the vehicle terminal, updates the initial parameters of the local initial model based on the in-vehicle multi-source data, obtains updated parameters, and encrypts the updated parameters, ensuring the confidentiality of the in-vehicle multi-source data. Even if the data is intercepted during network transmission, attackers will find it difficult to parse and reconstruct the in-vehicle multi-source data, thus protecting user privacy and data security. The initial encrypted result is uploaded to the cloud, where it combines encrypted results from multiple vehicles to update the parameters of the initial detection model, helping to build a more comprehensive and accurate intrusion detection model. The cloud updates parameters based on the encrypted results transmitted from the vehicle, ensuring both the efficiency and quality of model training while protecting the privacy of multi-source in-vehicle data. The cloud then feeds the trained intrusion detection model back to the vehicle, forming a closed learning and detection loop. The trained intrusion detection model can more accurately identify new and unknown attacks. Furthermore, through distributed data processing and encrypted transmission, the challenges of data security and privacy protection in centralized intrusion detection are effectively solved, achieving a balance between detection accuracy and data protection. This addresses the technical issues of low detection accuracy and data security in intrusion detection for connected vehicles in related technologies.

[0059] In the above embodiments of this disclosure, the initial parameters of the local initial model are updated based on vehicle-mounted multi-source data to obtain updated parameters, including: segmenting the vehicle-mounted multi-source data based on a preset time window to obtain data for multiple time windows; performing time alignment on the data for multiple time windows to obtain multiple time-aligned data, wherein time alignment is used to represent unifying the data from multiple time windows from multiple data sources to the same time axis; and updating the initial parameters of the local initial model based on the multiple time-aligned data to obtain updated parameters.

[0060] The aforementioned preset time window refers to a time period selected during data processing to divide continuous time series data into a series of discrete data segments.

[0061] The aforementioned data across multiple time windows refers to a series of data segments obtained after dividing multi-source vehicle data into preset time windows, with each segment corresponding to data observations within its respective time window. This data across multiple time windows represents the vehicle's operational status and communication behavior at different points in time, and together they constitute a time series of vehicle behavior.

[0062] The aforementioned multiple time-aligned data refers to data obtained by unifying multiple time windows from multiple data sources onto the same time axis, thereby eliminating analytical bias caused by inconsistent sampling from different data sources and helping to ensure the synchronization and consistency of input data during model training.

[0063] As an optional implementation, the vehicle-mounted multi-source data is segmented based on a preset time window. The preset time window is set according to the characteristics of the vehicle-mounted multi-source data and the average duration of intrusion events, such as a time interval of 1 second, 5 seconds, or longer. The data within each time window includes the communication and operational status of various vehicle components during that time period. Subsequently, time alignment processing is performed to ensure that information from different sensors and data sources can be unified on the same time axis, eliminating data delays or asynchrony issues, and helping to accurately analyze the vehicle's behavior at a specific moment. Time alignment is achieved through software algorithms, such as interpolating the data or discarding abnormal timestamp data points to ensure that the information from the data sources is synchronized within the same time window. After time alignment is completed, this data can be input into a local initial model for training.

[0064] In the above process, the vehicle-mounted multi-source data is segmented based on a preset time window, which helps the model capture short-term sudden abnormal behavior. Time alignment ensures the correlation between data from different sensors and enhances the model's ability to integrate and analyze multi-source information.

[0065] In the above embodiments of this disclosure, the initial parameters of the local initial model are updated based on multiple time-aligned data to obtain updated parameters. This includes: extracting multi-dimensional features from the multiple time-aligned data within a preset time window to obtain multi-dimensional features, wherein the multi-dimensional features include at least two of the following: statistical features, time-series features, frequency domain features, and information entropy-type features corresponding to the multiple time-aligned data; normalizing the multi-dimensional features to obtain standardized features; processing the standardized features using the local initial model to obtain a processing result; and updating the initial parameters based on the processing result to obtain updated parameters.

[0066] The aforementioned multidimensional features refer to various types and dimensions of features extracted from multi-source data collected from vehicles. Multidimensional features are used to describe the operational status, communication patterns, or vehicle controller behavior of the in-vehicle network. Multidimensional features include at least two of the following: statistical features, time-series features, frequency domain features, and information entropy features corresponding to multiple time-aligned data. Statistical features represent features calculated based on the statistical properties of the data, such as the frequency distribution of message labels, the average value, upper limit, lower limit, and standard deviation of communication data. Statistical features reflect the overall trend and volatility of the data. Time-series features reflect the characteristics of data changes over time, including autocorrelation coefficients, difference sequences, sliding window averages, and trend analysis. Time-series features are used to capture periodic, seasonal, or gradual trends. Frequency domain features are features obtained through spectral analysis of time-domain signals. Frequency domain features reveal periodic patterns and frequency components in the data. Information entropy features are used to measure the uncertainty and complexity of data, and are used to assess the randomness and pattern diversity of the data, such as the channel utilization of communication data or the uncertainty of vehicle controller state transitions.

[0067] The standardized features mentioned above refer to mapping multi-dimensional features to a feature vector within a fixed range through normalization. Standardized features have a more uniform distribution, which helps avoid the vanishing or exploding gradient problem, thereby accelerating the convergence speed of deep learning models.

[0068] The above processing results refer to the forward propagation results of the standardized feature vectors during the local training process of the model. The local model performs a series of mathematical and logical operations on the standardized features, including but not limited to convolution, linear combination, and activation function application, to learn patterns and features in the data.

[0069] As an optional implementation, the collected multi-source vehicle data is time-aligned within a preset time window to ensure data synchronization from different sensors, followed by multi-dimensional feature extraction. The extracted features include at least two categories: statistical features (e.g., message frequency, average interval), time-series features (e.g., autocorrelation coefficient), frequency domain features, energy distribution derived through analysis, or information entropy-based features. These features reflect different attributes of the data, helping the model capture potential intrusion patterns. Next, the extracted multi-dimensional features are normalized, adjusting their scale and range to meet the model input requirements, thus avoiding bias in model training due to excessively large or small feature values. Then, the normalized features are processed using a local initial model, the error between the model output and the expected output is calculated, and the model parameters are updated using the backpropagation algorithm to complete local training.

[0070] In the aforementioned process, multidimensional feature extraction ensures that the model can understand in-vehicle data from multiple perspectives, including statistical anomaly detection, temporal behavioral pattern recognition, frequency domain signal analysis, and the measurement of data uncertainty by information entropy, thereby improving the model's detection capabilities. Feature standardization eliminates differences across feature scales, preventing certain features from dominating model training and ensuring fairness and accuracy when processing various features. Efficient local processing of standardized features allows for direct updating of model parameters based on the processing results, shortening the training cycle, reducing reliance on in-vehicle computing resources, and maintaining the geographical distribution and privacy boundaries of the data.

[0071] In the above embodiments of this disclosure, encrypting the updated parameters to obtain a first encryption result includes: performing gradient clipping on the updated parameters to obtain clipped parameters, wherein the norm of the clipped parameters is less than or equal to a preset norm threshold; and encrypting the clipped parameters to obtain the first encryption result. Preferably, encrypting the clipped parameters to obtain the first encryption result includes: performing differential privacy processing on the clipped parameters to obtain the first encryption result.

[0072] The pruned parameters mentioned above refer to the parameters obtained after performing norm pruning on the updated parameters after the local model update is completed. The pruning operation is an operation that limits the magnitude of parameter updates to prevent the updated parameters of a certain vehicle from having an excessively large magnitude, thereby dominating the update direction of the global model.

[0073] The aforementioned preset norm threshold refers to a value pre-set during the federated learning process, used to control the upper limit of the norm of the pruned parameters.

[0074] The aforementioned differential privacy processing refers to a privacy protection mechanism designed to ensure that valuable statistical information is obtained from a dataset without revealing details of individual data. Differential privacy processing adds random noise to the pruned parameters to ensure that even if an attacker gains access to these updated parameters, they cannot recover the multi-source vehicle data from them.

[0075] In the above embodiments of this disclosure, uploading the first encryption result to the cloud includes: performing sparsification processing on the first encryption result to obtain a sparsification processing result; performing quantization compression on the sparsification processing result to obtain a compression result; generating a data packet based on the desensitized identifier of the vehicle end and the compression result, wherein the desensitized identifier is used to represent the vehicle identifier of the vehicle end after desensitization processing; and uploading the data packet to the cloud.

[0076] The sparsity processing result described above refers to the result obtained after applying a sparsity algorithm to the first encryption result. Sparsity reduces data storage and transmission costs by setting a portion of the non-zero elements in the data to zero, thereby reducing the amount of data that needs to be transmitted or processed.

[0077] The compression result described above refers to the data obtained by further compressing the sparsification result after the initial sparsification process. Compression reduces communication bandwidth and storage requirements, making it suitable for processing and transmitting large amounts of data.

[0078] The aforementioned de-identified identifiers refer to vehicle identifiers that have been processed and do not contain sensitive information. In federated learning, vehicles need to upload data or update models to the cloud. To protect the privacy of vehicles and their owners, the design of de-identified identifiers can remove information related to the owner's identity and specific vehicle details while preserving the distinguishability between vehicles.

[0079] The aforementioned data package refers to the encapsulated data set used for uploading to the cloud after sparsity reduction, quantization compression, and the addition of anonymized identifiers. The data package contains information uploaded from the vehicle, such as compressed and encrypted model update parameters, the vehicle's anonymized identifiers, and metadata, such as the number of iterations during local training and timestamps. This data can be used for cloud-based model updates and subsequent processing.

[0080] As an optional implementation, after encrypting the updated parameters, the vehicle-side further performs sparsification and quantization compression on the first encryption result to further reduce communication costs. The sparsification process is implemented using a sparse algorithm, retaining the k% of elements with the largest amplitudes in the parameter update and setting the rest to zero, generating a sparsified result. Subsequently, these non-zero elements are quantized at a low bit level, such as using 8 or 4 bits, to form a quantized compression result. Finally, the compressed result is encapsulated together with the vehicle-side de-identified identifier to create a data packet. The de-identified identifier ensures that the cloud can identify the source of the uploaded data without exposing specific vehicle identity information.

[0081] In the above process, sparsity processing and quantization compression reduce the size of uploaded data, lower communication bandwidth requirements, and improve the transmission efficiency of model updates, with a more significant effect in large-scale vehicle-to-everything (V2X) environments. Quantization compression reduces the computing resources required for cloud servers to process and store model updates, helping to maintain efficiency and stability when processing large amounts of data. The use of de-identified identifiers, combined with previous differential privacy processing, further enhances privacy and security during data transmission, preventing vehicle identity information from being leaked during communication.

[0082] In the above embodiments of this disclosure, after receiving the intrusion detection model returned by the cloud, the method further includes: in response to receiving the data to be detected, calculating an anomaly score for the data to be detected based on the intrusion detection model to obtain the anomaly score corresponding to the data to be detected; and performing intrusion detection on the data to be detected based on the anomaly score to obtain the intrusion detection result.

[0083] The aforementioned data to be detected refers to real-time or newly collected vehicle data, which has not yet been analyzed by the intrusion detection model. In the context of vehicle-to-everything (V2X) intrusion detection, the data to be detected originates from various vehicle sensors, controller area network (CLAN) communications, electronic control unit (ECU) log files, and V2X communication messages. This data includes various dynamic information about the vehicle's operation, such as its physical state, network communication data, and potential threat information. As input to the intrusion detection process, this data is used to assess whether the current vehicle status is normal or whether intrusion activity is present.

[0084] The aforementioned anomaly score is a value calculated by the intrusion detection model based on the data to be detected. It can be used to characterize the degree of deviation between the data to be detected and known normal behavior patterns.

[0085] In the above embodiments of this disclosure, intrusion detection is performed on the data to be detected based on the anomaly score to obtain the intrusion detection result, including: if the anomaly score is greater than a preset anomaly score, the intrusion detection result is determined to be intrusion data; if the anomaly score is less than or equal to the preset anomaly score, the intrusion detection result is determined to be non-intrusion data.

[0086] The aforementioned preset anomaly score can refer to a pre-determined threshold used to measure the anomaly score.

[0087] As an optional implementation, after receiving the updated intrusion detection model from the cloud, the vehicle's workflow enters the real-time detection phase. When the vehicle collects new in-vehicle data, i.e., the data to be detected, the intrusion detection process is initiated, with the following steps: The newly collected data to be detected is preprocessed, including time windowing, feature extraction, and normalization, ensuring that the data to be detected is consistent with the input format used during model training. Subsequently, the intrusion detection model is used to process the standardized data to be detected, calculating the degree of deviation from normal behavior, i.e., the anomaly score. The anomaly score is quantified using the model's internal loss function or reconstruction error, representing the degree of data abnormality. Next, the calculated anomaly score is compared with a set anomaly score threshold. When the anomaly score is greater than the preset threshold, it can be determined that the data to be detected contains intrusion behavior, and the vehicle can take corresponding security measures, such as blocking suspicious communication, triggering alarms, or entering a safe driving mode. If the anomaly score is lower than or equal to the threshold, the data is considered normal, and the vehicle can continue operating according to the normal process.

[0088] In the above process, the vehicle-side can perform intrusion detection upon receiving new data, without waiting for cloud response or centralized data analysis, thus improving the real-time performance and response speed of detection. Because the intrusion detection model has been improved and updated through a federated learning mechanism, it can more accurately identify various types of intrusion behaviors, thereby improving detection accuracy and robustness and reducing false positives and false negatives. The real-time detection on the vehicle-side and the model updates in the cloud form a closed loop, enabling self-adjustment and learning based on the latest security dynamics, enhancing the collaborative defense capabilities of intrusion detection, and forming a dynamically updated defense mechanism.

[0089] This embodiment also provides an intrusion detection method for a vehicle-to-everything (V2X) network, applied in the cloud. Figure 2 is a flowchart of the intrusion detection method for a V2X network according to an embodiment of this disclosure. As shown in Figure 2, the process includes the following steps:

[0090] Step S202: In response to receiving the first encryption result, determine the similarity between the first encryption result and a plurality of second encryption results that have been verified.

[0091] The first encryption result is generated using an intrusion detection method applied to the vehicle-to-everything (V2X) network.

[0092] The aforementioned similarity refers to an indicator used to assess the degree of correlation between encrypted results uploaded from different vehicle endpoints. In the context of federated learning, similarity is used to determine whether updates submitted by vehicle endpoints conform to the behavioral patterns of most normal vehicle endpoints, in order to eliminate or downgrade updates suspected of malicious behavior and protect the global model from harm.

[0093] Step S204: If the similarity is less than the preset similarity, the first encryption result is verified as passed, and the parameters of the initial detection model are updated based on the first encryption result to obtain the intrusion detection model.

[0094] The aforementioned preset similarity refers to a pre-set similarity threshold used to distinguish between updates from normal vehicle terminals and updates from potentially malicious vehicle terminals.

[0095] Step S206: The intrusion detection model is sent to the vehicle.

[0096] As an optional implementation, the cloud is responsible for receiving the first encrypted result uploaded by the vehicle, which is a privacy-preserving model update. When the cloud receives these encrypted results, it compares their similarity with multiple previously verified second encrypted results to identify and isolate potential malicious or abnormal updates, thereby protecting the global model from model poisoning attacks. The cloud calculates a cosine similarity matrix to quantify the correlation between the update results. If the similarity between the first encrypted result and most verified results is less than a preset similarity, it is considered a reasonable update and passes verification. The verified first encrypted result is then used to update the global model. The cloud aggregates all verified encrypted results and uses a robust aggregation algorithm, combined with the trust weights of each vehicle, to update the parameters of the initial detection model. Finally, the cloud generates an updated intrusion detection model, attaches a version number, and distributes it to the vehicle, ensuring that all vehicles can synchronize to the latest model version to improve the accuracy and real-time performance of intrusion detection.

[0097] In the above process, by calculating similarity and removing abnormal updates, the cloud can resist malicious poisoning attacks from vehicles, ensuring that the training process of the global model is not disturbed, thereby improving the model's stability and accuracy. Dynamically adjusting update weights based on the vehicle's trust score ensures that high-quality data sources contribute more to the model while reducing the impact of abnormal data, further improving the model's training quality. The cloud efficiently processes uploaded encrypted results and quickly generates updated global models, reducing model update latency and enabling vehicles to promptly apply the latest model for intrusion detection, enhancing the real-time response capability of the intrusion detection process.

[0098] In the above embodiments of this disclosure, the initial detection model is updated with parameters based on the first encryption result to obtain an intrusion detection model, including: determining the trust score corresponding to the vehicle that uploaded the first encryption result, wherein the trust score is determined based on the historical performance data of the vehicle; determining the update weight corresponding to the first encryption result based on the trust score; and updating the parameters of the initial detection model based on the update weight and the first encryption result to obtain an intrusion detection model.

[0099] The aforementioned trust score refers to an indicator used to evaluate the reliability and trustworthiness of the vehicle endpoints during the federated learning process. The cloud continuously calculates and updates the trust score of each vehicle endpoint based on its historical performance data.

[0100] The aforementioned historical performance data refers to a series of historical performance information from the vehicle, including model updates uploaded by the vehicle in past federated learning cycles, the impact of these updates on the global model performance, whether there are any signs of violations or abnormal behavior, and the comparison results between the abnormal scores reported by the vehicle and the actual intrusion situation.

[0101] The update weights mentioned above refer to the weight coefficients assigned to the encrypted model updates of each vehicle during the model aggregation phase, used to adjust the impact on the global model update. The cloud dynamically calculates the update weights based on the trust scores of the vehicle terminals.

[0102] The technical solution proposed in this disclosure is described below with reference to an optional embodiment. This disclosure proposes a method and system for vehicle-to-everything (V2X) intrusion detection based on federated learning. It relates to the fields of V2X security and artificial intelligence technology, and specifically to a method, device, system, and storage medium for V2X intrusion detection based on federated learning. This disclosure is mainly applied to intelligent connected vehicles and V2X environments, targeting multi-source heterogeneous data such as vehicle bus communication, electronic control unit operation logs, and V2X messages. By combining distributed machine learning and privacy protection mechanisms, it achieves intelligent detection and defense against network intrusions and abnormal behaviors, belonging to the interdisciplinary technical field of V2X information security and intelligent detection.

[0103] This disclosure establishes a closed-loop federated learning process between the vehicle and the cloud, achieving continuous learning and real-time defense across vehicles through local training, privacy-preserving uploads, robust cloud aggregation, trust management, and global distribution. Specifically, it includes the following steps:

[0104] Vehicle-side data acquisition and time windowing. Collect multi-source vehicle data, including CAN bus messages, ECU logs, and V2X communication messages. Divide the data stream into a set of time windows using a fixed or variable time window T. It also performs denoising, alignment, and missing data imputation. Each window of data serves as input for subsequent feature extraction and modeling.

[0105] Feature extraction, normalization, and local modeling. Statistical features (e.g., CANID frequency, average interval), time-series features (e.g., autocorrelation, difference sequences), frequency-domain features (e.g., FFT energy distribution), and information entropy are extracted from windowed data. Normalization is achieved using the moving average and variance to generate standardized feature vectors. Based on a lightweight deep model, local training is performed to minimize the loss function:

[0106] After training, the local update vector g is obtained. i Or parameter difference Δw i No need to upload the original data.

[0107] Gradient clipping, differential privacy, and compression before upload. To prevent privacy leaks and excessive communication overhead, the following operations are performed on local updates: gradient clipping, limiting the norm of the update vector to no more than a threshold C, resulting in:

[0108] Differential privacy noise injection: Gaussian noise is added to the cropping result.

[0109] Sparsity and quantization compression can retain only the top-k coordinates and perform q-bit quantization on the values.

[0110] Generate upload package It includes compressed parameter updates, anonymous vehicle identifiers, and required metadata.

[0111] Cloud-based update reception and robust aggregation: The cloud server receives upload packets from multiple vehicle terminals, performs decompression and standardization, and forms a set to be aggregated. To defend against poisoning attacks, the cosine similarity matrix is ​​calculated in the cloud:

[0112] Significantly deviating updates are clustered and removed, and the remaining updates are subjected to a robust aggregation algorithm, combined with a trust weight α. i Update the global model:

[0113] Trust management and global model distribution: The cloud maintains trust scores (TS) for each vehicle. i Taking into account historical similarity, update stability, and alarm consistency, a smooth update method is adopted:

[0114] Among them, score i =λ1·sim i +λ2·(1-dev i )+λ3·(1-alr i ).

[0115] The cloud adjusts the weights based on the trust score and sends the new model with a version number to the vehicle. It can use a gray-scale distribution or a tiered distribution method to ensure the reliability of the update.

[0116] Vehicle-side real-time detection and alarm coordination: The vehicle receives the global model, performs real-time detection on the input feature sequence, and calculates anomaly scores.

[0117] If the score exceeds the threshold τ, a local alarm and mitigation measures are triggered, and a summary of information, including timestamps, anonymous identifiers, and abnormal scores, is reported to support further cloud-based analysis and global defense.

[0118] In a preferred embodiment, this disclosure also introduces mechanisms such as homomorphic encryption, secure multi-party computation, and blockchain auditing to achieve stronger privacy protection and traceability.

[0119] The federated learning-based intrusion detection method for vehicular networks proposed in this disclosure achieves significant improvements in privacy protection, communication efficiency, robustness, security, and generalization ability. Specifically, it demonstrates significant privacy protection by avoiding the uploading of raw vehicle data and only uploading parameter updates that have been pruned and perturbed by noise. For example:

[0120] Among them, g i For the gradient update of vehicle i, Clip(·,C) represents gradient clipping, and Gaussian noise guarantees the (ε,δ)-differential privacy constraint.

[0121] This disclosure theoretically guarantees that even if an attacker obtains the uploaded vector, it will be difficult to reverse engineer the original data. Compared to centralized training, the risk of data privacy leakage is significantly reduced, meeting the stringent requirements for data compliance and privacy protection in intelligent connected vehicle scenarios.

[0122] Improved communication and computation efficiency: This disclosure employs Top-k sparsity, low-bit quantization, and error compensation mechanisms during the upload phase, significantly reducing the size of the uploaded vector. For example, retaining only 1% to 5% of the important parameters can reduce bandwidth consumption by an order of magnitude. Combined with batch normalization and lightweight models, local computational complexity is low, allowing vehicles to operate efficiently on embedded hardware or ECUs. Compared to traditional centralized data upload methods, communication load is reduced, model convergence speed is accelerated, and it is more scalable in large-scale vehicle networking scenarios. Enhanced robustness and security: This disclosure introduces cosine similarity and clustering mechanisms during the aggregation process to identify anomalous updates that deviate from the majority.

[0123] The cloud uses this metric to remove or downgrade malicious vehicle endpoints, and combines it with a robust aggregation algorithm to improve the robustness of the global model.

[0124] Global update formula:

[0125] Where, α i It uses dynamic trust weights to suppress the impact of poisoning or backdoor attacks.

[0126] Improved detection generalization and adaptability by using deep models to calculate anomaly scores:

[0127] Anomalies can be identified when the reconstruction error exceeds a threshold, without relying on fixed rules or known attack signature databases.

[0128] Even in non-independent, homogeneous data environments across different vehicle models and regions, this disclosure maintains high detection performance. For novel attacks (such as variant CAN message injection and forged V2X messages), the recall rate is improved, while the false positive rate is reduced. The system's overall advantages include: Real-time performance: Vehicle-side detection and alerting are completed in milliseconds, meeting the low-latency requirements of the Internet of Vehicles. Scalability: Supports thousands to tens of thousands of nodes participating in federated training simultaneously, ensuring system load balancing through layered aggregation. Traceability: Combined with a blockchain auditing mechanism, it ensures the immutability of model evolution processes and vehicle behavior records, facilitating traceability and accountability. Deployment flexibility: Can be deployed at multiple levels—cloud, edge server, or in-vehicle equipment—to adapt to the needs of different automakers, fleets, and regions.

[0129] In summary, the method proposed in this disclosure achieves comprehensive breakthroughs in multiple dimensions, including privacy protection, bandwidth improvement, robust aggregation, generalized detection, real-time response, and traceability. It can provide an efficient, reliable, and practical intrusion detection and defense system in the environment of intelligent connected vehicles, demonstrating outstanding technological advancement and industrial application value.

[0130] Figure 3 is a schematic diagram of an optional federated learning-based vehicle network intrusion detection system architecture according to an embodiment of the present disclosure. As shown in Figure 3, global model aggregation is performed in the cloud, and parameter uploading and model distribution are performed between edge server A and edge server B. Edge server A interacts with vehicle 1, vehicle 2 and vehicle 3. Vehicle 1, vehicle 2 and vehicle 3 obtain controller local area bus, vehicle controller log and vehicle network information based on the data acquisition layer. Edge server interacts with vehicle 4, vehicle 5 and vehicle 6.

[0131] Figure 4 is a schematic diagram of the overall process of an optional vehicle network intrusion detection method according to an embodiment of the present disclosure. As shown in Figure 4, the process begins with vehicle-side data collection, time window division, feature extraction and normalization, local model training, gradient pruning and differential privacy, sparsity compression and uploading, cloud-based robust aggregation, global model distribution, and can be iterated in a loop until the end.

[0132] Figure 5 is a schematic diagram of an optional vehicle-side data processing and local training process according to an embodiment of the present disclosure. As shown in Figure 5, the vehicle-side data processing and training process involves cleaning and synchronizing the controller local area network bus data, vehicle controller log data, and vehicle network communication data. Next, statistical feature extraction, time-series feature extraction, frequency domain feature extraction, and information entropy calculation are performed, followed by feature vector normalization to train the local deep learning model.

[0133] Figure 6 is a schematic diagram of an optional cloud-based robust aggregation and trust management process according to an embodiment of the present disclosure. As shown in Figure 6, the process involves receiving vehicle-side model updates, performing model decompression and parameter standardization, calculating cosine similarity, and detecting anomalies. If an anomaly is detected, malicious updates are deleted. If no anomaly is detected, a robust aggregation algorithm is executed, trust scores are updated, and global model parameters are updated.

[0134] Figure 7 is a schematic diagram of an optional vehicle-side real-time detection and alarm coordination mechanism according to an embodiment of the present disclosure. As shown in Figure 7, the intrusion detection engine performs reconstruction error calculation based on real-time data stream and global model, performs anomaly judgment, and determines that the vehicle-side is operating normally when it is not abnormal. When it is abnormal, it executes local warning measures, uploads alarm information, performs cloud threat analysis, and executes the collaborative defense mechanism.

[0135] The federated learning-based intrusion detection method for connected vehicles proposed in this disclosure includes the following steps: vehicle-side data collection, local training and model updating, differential privacy and compression processing, cloud-based robust aggregation and trust management, global model distribution, and real-time detection and alarm, forming a complete closed-loop federated learning intrusion detection system. The specific implementation is as follows:

[0136] Vehicle-side data acquisition. Each vehicle acquires operational data in real time via the onboard bus interface and V2X components. Data types include: CAN messages, containing communication information between various vehicle control units; ECU status logs, including control parameters such as throttle, brakes, and steering wheel angle; and V2X messages, such as safety messages exchanged between the vehicle and roadside units or other vehicles. The acquired data streams are timestamped and stored in the vehicle's local cache for subsequent processing.

[0137] Time window segmentation and preprocessing. The raw data stream is processed by time windowing, with a set window length T, such as 1 second, 5 seconds, or 10 seconds, to obtain a set of time windows. Data cleaning removes abnormal messages and duplicate frames; time alignment ensures that data from different sensors are aligned to the same timeline; missing data is filled in using mean interpolation or interpolation methods, ensuring the consistency and integrity of the input data.

[0138] Feature extraction and normalization. Within each window, multi-dimensional features are extracted from the data, including: statistical features such as message ID frequency, average interval, and standard deviation; time-series features such as autocorrelation coefficient and moving average difference sequence; frequency-domain features such as energy distribution obtained through Fast Fourier Transform; and information entropy features reflecting the complexity and uncertainty of the sequence. The features are then normalized to obtain standardized vectors. As input to subsequent models.

[0139] Local model training. Each vehicle independently trains a lightweight neural network model on locally cached data. The improvement objective is to minimize the loss from local experience.

[0140] The number of local iterations is typically 1–3 epochs to balance communication overhead and model accuracy. The output is a locally updated vector g generated on the vehicle side. i This represents the training result.

[0141] Gradient clipping. To limit the norm of uploaded gradients, a clipping operation is performed:

[0142] Here, C is the set pruning threshold. This step prevents a single vehicle's update from becoming too large and dominating the aggregation result.

[0143] Differential privacy protection. Random noise is injected into the cropping result to satisfy differential privacy constraints:

[0144] σ controls the noise intensity. This method ensures that even if an attacker obtains the uploaded gradient, they cannot deduce the original data content, thus achieving privacy protection.

[0145] Sparsity and compression are employed to reduce communication overhead. The vehicle only uploads the most important parts of the gradient vector: Top-k sparsity retains only the top k% of parameters with the largest magnitudes; low-bit quantization compresses floating-point numbers into 8-bit or 4-bit representations; error compensation ensures that unuploaded residuals accumulate in the next round, guaranteeing training stability. (Generate upload packet.) Includes compressed updates and anonymous identifiers.

[0146] The cloud receives and calculates similarity by receiving update packets uploaded by multiple vehicles and decompressing them to obtain update vectors.

[0147] Cosine similarity calculation:

[0148] Clustering detection. The updated vectors are clustered to identify suspicious vehicles that deviate from the majority.

[0149] Robust aggregation. Updates from suspicious vehicles are removed or downweighted using a robust aggregation algorithm:

[0150] Where, α i The weights are dynamically adjusted. This ensures stable convergence of the global model even when malicious data is uploaded from some vehicles.

[0151] Trust score updates and model deployment. The cloud maintains the Trust Score (TS) for each vehicle. iAdjustments will be made dynamically based on historical performance.

[0152] The new global model, along with its version number, is distributed to the vehicle terminals. A layered distribution approach is used, updating edge nodes first and then expanding layer by layer, or a canary release method is employed, with a small number of vehicles testing the update first to ensure its security and stability.

[0153] Real-time vehicle-side detection and alerting. After receiving the global model, the vehicle performs real-time detection on newly collected data and calculates anomaly scores.

[0154] If the score exceeds the threshold τ, a local alarm is triggered. The vehicle takes the following actions: blocks suspicious messages; switches to safe mode; and alerts the driver. Simultaneously, the vehicle uploads a summary of the alarm information, including a timestamp, abnormal score, and anonymity identifier, for further cloud analysis and cross-vehicle collaborative defense.

[0155] Optional implementations enhance privacy protection by introducing homomorphic encryption or secure multi-party computation in addition to differential privacy, further ensuring the confidentiality of uploaded data during transmission. A layered aggregation model is employed. In large-scale vehicle-to-everything (V2X) scenarios, data is first aggregated on edge servers and then further aggregated in the cloud to reduce latency and bandwidth consumption. A traceability mechanism, combined with blockchain or a secure log system, records vehicle updates and model version numbers on the blockchain, enabling full-process auditability.

[0156] This disclosure is not limited to the specific embodiments described above. Various alternative solutions or modified implementations can be adopted without departing from the basic concept of this disclosure to achieve the same or similar technical effects. The following examples are for illustrative purposes only and do not constitute a limitation on the scope of protection of this disclosure: Different model structure choices: The local intrusion detection model on the vehicle side can employ convolutional neural networks, recurrent neural networks, or autoencoders. In alternative implementations, graph neural networks are used to model the communication relationships between vehicles, or sequence modeling methods are employed to improve the ability to capture complex CAN message patterns and V2X messages. Different privacy protection mechanisms: In the embodiments of this disclosure, a differential privacy protection mechanism is used when the vehicle side uploads parameters. In alternative solutions, homomorphic encryption or secure multi-party computation protocols can be used to achieve encrypted transmission of model parameters, thereby preventing the cloud server from obtaining any plaintext information from the vehicle side before decryption. This is suitable for cross-operator or cross-vehicle manufacturer joint modeling scenarios, further enhancing privacy protection strength. Different communication compression methods: When the vehicle side uploads model updates, random sparsification or low-rank approximation is used to replace Top-k sparsification and quantization methods, thereby further reducing communication overhead. This is suitable for scenarios with limited bandwidth or complex in-vehicle communication environments. Different aggregation strategies are employed in the cloud aggregation process. This disclosure uses robust aggregation methods such as median, pruned mean, or Krum. Alternatives employ clustering-based aggregation strategies, such as selecting larger clusters as the trusted update set, or weighted voting-based aggregation, dynamically adjusting weights based on the reliability of vehicle-side historical behavior to enhance the global model's ability to resist malicious vehicle-side poisoning. Different trust management strategies are employed. This disclosure uses exponential smoothing to update vehicle-side trust scores. Alternatives combine game theory methods or blockchain-based immutable reputation records to achieve a more robust and transparent trust maintenance mechanism. Different real-time detection methods are employed. In real-time vehicle-side detection, this disclosure uses anomaly score comparison with a threshold. Alternatives introduce probability distribution-based detection methods, estimating the input feature probability density function p(x), identifying anomalies when it falls below a threshold, or combining traditional anomaly detection methods such as isolated forests with neural network detectors to improve detection robustness and generalization ability. Different collaborative defense mechanisms are implemented. This disclosure achieves fleet collaborative defense through vehicle-side reporting of alarm summaries. An alternative is to aggregate alarm information at edge computing nodes, such as roadside units (RSUs), before uploading it to the cloud, thereby reducing cloud processing pressure and improving alarm response speed and system real-time performance.

[0157] In summary, this disclosure employs multiple alternative solutions in terms of model selection, privacy protection methods, communication compression strategies, aggregation algorithms, trust management mechanisms, real-time detection methods, and collaborative defense architecture. These solutions can achieve the expected technical effects under different conditions, demonstrating good adaptability and scalability.

[0158] According to another aspect of the embodiments of this disclosure, an intrusion detection device for a vehicle-to-everything (V2X) network is also provided, applied to a vehicle. This device can execute the V2X intrusion detection method of the above embodiments, and the specific implementation method and preferred application scenarios are the same as those of the above embodiments, and will not be repeated here.

[0159] Figure 8 is a schematic diagram of an intrusion detection device for a vehicle network according to an embodiment of the present disclosure. As shown in Figure 8, the device includes the following: an acquisition component 802, an update component 804, an encryption component 806, and a processing component 808.

[0160] The system includes: an acquisition component 802 configured to acquire multi-source vehicle data, which represents vehicle data from multiple data sources; an update component 804 configured to update the initial parameters of a local initial model based on the multi-source vehicle data, resulting in updated parameters, wherein the number of initial parameters is less than a preset number of parameters; an encryption component 806 configured to encrypt the updated parameters, resulting in a first encryption result; and a processing component 808 configured to upload the first encryption result to the cloud and receive an intrusion detection model returned from the cloud, wherein the first encryption result is obtained by updating the parameters of the initial detection model on the cloud by combining multiple second encryption results generated by other vehicle terminals, resulting in an intrusion detection model used for intrusion detection on the vehicle terminal.

[0161] The update component is also configured to segment the multi-source vehicle data based on a preset time window to obtain data for multiple time windows; perform time alignment on the data from multiple time windows to obtain multiple time-aligned data, where time alignment is used to unify the data from multiple time windows from multiple data sources onto the same time axis; and update the initial parameters of the local initial model based on the multiple time-aligned data to obtain updated parameters.

[0162] The update component is further configured to extract multidimensional features from multiple time-aligned data within a preset time window to obtain multidimensional features, wherein the multidimensional features include at least two of the following: statistical features, time-series features, frequency domain features, and information entropy-type features corresponding to multiple time-aligned data; normalize the multidimensional features to obtain standardized features; process the standardized features using a local initial model to obtain processing results; and update the initial parameters based on the processing results to obtain updated parameters.

[0163] The encryption component is further configured to perform gradient pruning on the updated parameters to obtain pruned parameters, wherein the norm of the pruned parameters is less than or equal to a preset norm threshold; encrypt the pruned parameters to obtain a first encryption result; preferably, the encryption component is further configured to perform differential privacy processing on the pruned parameters to obtain the first encryption result.

[0164] The processing component is further configured to perform sparsification processing on the first encryption result to obtain a sparsification processing result; perform quantization compression on the sparsification processing result to obtain a compression result; generate a data packet based on the desensitized identifier of the vehicle and the compression result, wherein the desensitized identifier is used to represent the vehicle identifier of the vehicle after desensitization processing; and upload the data packet to the cloud.

[0165] The processing component is further configured to, upon receiving the intrusion detection model returned from the cloud, respond to the received data to be detected by calculating an anomaly score for the data to be detected based on the intrusion detection model, thereby obtaining the anomaly score corresponding to the data to be detected; and based on the anomaly score, perform intrusion detection on the data to be detected to obtain the intrusion detection result.

[0166] The processing component is further configured to determine that the intrusion detection result is intrusion data if the anomaly score is greater than a preset anomaly score, and to determine that the intrusion detection result is non-intrusion data if the anomaly score is less than or equal to the preset anomaly score.

[0167] According to another aspect of the embodiments of this disclosure, an intrusion detection device for a vehicle-to-everything (V2X) network, applied in the cloud, is also provided. This device can execute the V2X intrusion detection method of the above embodiments, and the specific implementation method and preferred application scenarios are the same as those of the above embodiments, and will not be repeated here.

[0168] Figure 9 is a schematic diagram of an intrusion detection device for a vehicle network according to an embodiment of the present disclosure. As shown in Figure 9, the device includes: a determination component 902, an update component 904, and a distribution component 906.

[0169] The determination component 902 is configured to, in response to receiving the first encryption result, determine the similarity between the first encryption result and a plurality of second encryption results that have been verified, wherein the first encryption result is generated using the method described above; the update component 904 is configured to, if the similarity is less than a preset similarity, determine that the first encryption result has been verified, and update the parameters of the initial detection model based on the first encryption result to obtain an intrusion detection model; and the distribution component 906 is configured to distribute the intrusion detection model to the vehicle terminal.

[0170] The update component is further configured to determine the trust score corresponding to the vehicle that uploaded the first encrypted result, wherein the trust score is determined based on the historical performance data of the vehicle; determine the update weight corresponding to the first encrypted result based on the trust score; and update the parameters of the initial detection model based on the update weight and the first encrypted result to obtain the intrusion detection model.

[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0172] Embodiments of this disclosure also provide an electronic device, including: a memory storing an executable program; and a processor configured to run the program, wherein the program executes the methods of various embodiments of this disclosure when it runs.

[0173] Embodiments of this disclosure also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium resides to perform the methods of the various embodiments of this disclosure.

[0174] Embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this disclosure.

[0175] Embodiments of this disclosure also provide a computer program product including a non-volatile computer-readable storage medium configured to store a computer program that, when executed by a processor, implements the methods described in various embodiments of this disclosure.

[0176] Embodiments of this disclosure also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this disclosure.

[0177] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0178] In the several embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interface; the indirect coupling or communication connection of units or components may be electrical or other forms.

[0179] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0180] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0181] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0182] The above description is only a preferred embodiment of this disclosure. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure.

Claims

1. An intrusion detection method for vehicle-to-everything (V2X) networks, applied to the vehicle side, the method comprising: Acquire in-vehicle multi-source data, wherein the in-vehicle multi-source data is used to represent vehicle data from multiple data sources; Based on the vehicle-mounted multi-source data, the initial parameters of the local initial model are updated to obtain updated parameters, wherein the number of initial parameters is less than the preset number of parameters. The updated parameters are encrypted to obtain a first encryption result; The first encryption result is uploaded to the cloud, and the intrusion detection model returned by the cloud is received. The cloud updates the parameters of the initial detection model set on the cloud based on the first encryption result and multiple second encryption results generated by other vehicle terminals to obtain the intrusion detection model. The intrusion detection model is used to perform intrusion detection on the vehicle terminal.

2. The intrusion detection method for the Internet of Vehicles according to claim 1, wherein, Based on the aforementioned vehicle-mounted multi-source data, the initial parameters of the local initial model are updated to obtain updated parameters, including: Based on a preset time window, the vehicle-mounted multi-source data is segmented to obtain data for multiple time windows; Time alignment is performed on the data from the multiple time windows to obtain multiple time-aligned data, wherein the time alignment is used to unify the data from the multiple time windows from the multiple data sources to the same time axis; Based on the multiple time-aligned data, the initial parameters of the local initial model are updated to obtain the updated parameters.

3. The intrusion detection method for the Internet of Vehicles according to claim 2, wherein, Based on the multiple time-aligned data, the initial parameters of the local initial model are updated to obtain the updated parameters, including: Within the preset time window, multidimensional features are extracted from the multiple time-aligned data to obtain multidimensional features, wherein the multidimensional features include at least two of the following: statistical features, time-series features, frequency domain features, and information entropy features corresponding to the multiple time-aligned data; The multidimensional features are normalized to obtain standardized features; The standardized features are processed using the local initial model to obtain the processing result; Based on the processing result, the initial parameters are updated to obtain the updated parameters.

4. The intrusion detection method for the Internet of Vehicles according to claim 2, wherein, The preset time window is determined based on the characteristics of the vehicle-mounted multi-source data and the average duration of potential intrusion events.

5. The intrusion detection method for the Internet of Vehicles according to claim 1, wherein, The updated parameters are encrypted to obtain a first encryption result, including: Gradient clipping is performed on the updated parameters to obtain clipped parameters, wherein the norm of the clipped parameters is less than or equal to a preset norm threshold. The clipped parameters are encrypted to obtain the first encryption result.

6. The intrusion detection method for the Internet of Vehicles according to claim 5, wherein, Encrypting the cropped parameters to obtain the first encryption result includes: Differential privacy processing is performed on the cropped parameters to obtain the first encryption result.

7. The intrusion detection method for the Internet of Vehicles according to claim 6, wherein, Differential privacy processing is performed on the cropped parameters to obtain the first encryption result, including: Gaussian noise is added to the clipped parameters to obtain the first encryption result.

8. The intrusion detection method for the Internet of Vehicles according to claim 1, wherein, Uploading the first encryption result to the cloud includes: The first encryption result is then subjected to sparsification to obtain a sparsification result. The sparsification result is quantized and compressed to obtain the compressed result; Based on the de-identified identifier of the vehicle terminal and the compression result, a data packet is generated, wherein the de-identified identifier is used to represent the vehicle identifier of the vehicle terminal after de-identification processing. The data packet is uploaded to the cloud.

9. The intrusion detection method for the Internet of Vehicles according to claim 8, wherein, The first encryption result is subjected to sparsification processing to obtain a sparsification processing result, including: Based on the magnitudes of multiple elements in the first encryption result, the multiple elements are sorted to obtain a sorting result; Obtain a preset number of elements that rank highest in the sorting result; The elements in the first encryption result other than the preset number of elements are quantized to obtain the sparsification result.

10. The intrusion detection method for the Internet of Vehicles according to claim 8, wherein, Based on the de-identified identifier at the vehicle end and the compression result, a data packet is generated, including: The data packet is obtained by encapsulating the de-identified identifier, the compression result, and the metadata, wherein the metadata is used to characterize the number of iterations and timestamps of the local initial model.

11. The intrusion detection method for a vehicle network according to any one of claims 1 to 10, wherein, After receiving the intrusion detection model returned by the cloud, the method further includes: In response to receiving the data to be detected, an anomaly score is calculated on the data to be detected based on the intrusion detection model to obtain the anomaly score corresponding to the data to be detected; Based on the anomaly score, intrusion detection is performed on the data to be detected to obtain intrusion detection results.

12. The intrusion detection method for the Internet of Vehicles according to claim 11, wherein, Based on the intrusion detection model, anomaly scores are calculated on the data to be detected to obtain the anomaly score corresponding to the data to be detected, including: The data to be detected is preprocessed to obtain standardized data to be detected; Based on the intrusion detection model, anomaly scores are calculated on the standardized data to be detected to obtain the anomaly scores.

13. The intrusion detection method for the Internet of Vehicles according to claim 11, wherein, Based on the anomaly score, intrusion detection is performed on the data to be detected to obtain intrusion detection results, including: If the anomaly score is greater than a preset anomaly score, the intrusion detection result is determined to be that the data to be detected belongs to intrusion data; If the anomaly score is less than or equal to the preset anomaly score, the intrusion detection result is determined to be that the data to be detected belongs to non-intrusion data.

14. The intrusion detection method for a vehicle network according to any one of claims 1 to 10, wherein, After receiving the intrusion detection model returned by the cloud, the method further includes: In response to receiving the data to be detected, anomaly detection is performed on the data to be detected using a probability distribution detection method to obtain the probability density function value corresponding to the data to be detected. Based on the probability density function value, intrusion detection is performed on the data to be detected to obtain the intrusion detection result.

15. The intrusion detection method for a vehicle network according to any one of claims 1 to 10, wherein, Upload the first encryption result to the cloud and receive the intrusion detection model returned by the cloud, including: The first encryption result is uploaded to the edge server, and the intrusion detection model returned by the edge server is received. The edge server aggregates the first encryption result and multiple second encryption results generated by other vehicle terminals to obtain a first aggregation result, and uploads the first aggregation result to the cloud. The cloud updates the parameters set in the initial detection model according to the first aggregation result and multiple second aggregation results uploaded by other edge servers to obtain the intrusion detection model.

16. An intrusion detection method for vehicle-to-everything (V2X) networks, applied in the cloud, the method comprising: In response to receiving a first encryption result, a similarity is determined between the first encryption result and a plurality of second encryption results that have been verified, wherein the first encryption result is generated using the method described in any one of claims 1 to 7; If the similarity is less than a preset similarity, the first encryption result is determined to be verified, and the parameters of the initial detection model are updated based on the first encryption result to obtain the intrusion detection model. The intrusion detection model is then deployed to the vehicle.

17. The intrusion detection method for the Internet of Vehicles according to claim 16, wherein, Based on the first encryption result, the parameters of the initial detection model are updated to obtain an intrusion detection model, including: Determine the trust score corresponding to the vehicle that uploaded the first encryption result, wherein the trust score is determined based on the historical performance data of the vehicle. The update weight corresponding to the first encryption result is determined based on the trust score. Based on the updated weights and the first encryption result, the parameters of the initial detection model are updated to obtain the intrusion detection model.

18. The intrusion detection method for the Internet of Vehicles according to claim 17, wherein, Determine the trust score corresponding to the vehicle that uploaded the first encrypted result, including: Obtain the historical trust score corresponding to the vehicle that uploaded the first encrypted result; The compensation score is determined based on historical similarity, historical update stability, and historical alarm consistency. The historical trust score is updated based on the compensation score to obtain the trust score.

19. The intrusion detection method for the Internet of Vehicles according to claim 18, wherein, The historical trust score is updated based on the compensation score to obtain the trust score, including: The historical trust score and the compensation score are smoothed to obtain the trust score.

20. An electronic device, wherein, include: Memory, which stores executable programs; A processor configured to run the program, wherein the program, when running, performs the method according to any one of claims 1 to 19.