Method for carrying out early warning on network attack on networked automobile

By setting up a semi-supervised generative adversarial network discriminator in the intelligent system of connected vehicles, the problem of lack of network attack warning mechanism in the intelligent system of connected vehicles is solved, and the rapid warning and identification of network attacks is achieved, and the networked vehicles are improved. Security.

CN119485312APending Publication Date: 2025-02-18CHANGAN AUTOMOBILE (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411503290.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing intelligent systems of connected vehicles lack a network attack warning mechanism, resulting in weak data transmission security mechanisms and are prone to cyber attacks, resulting in data leakage and abnormal vehicle control problems.

Method used

A semi-supervised generative adversarial network is set up in the intelligent system of Connected Vehicles. By monitoring the on-board application data collected in real time, it is determined whether the data communication network of Connected Vehicles is subject to network attacks. The discriminator consists of multiple residual jump connection blocks, combined with the adversarial training of the generator and the discriminator, and can quickly and accurately identify cyber attack behavior.

Benefits of technology

It has achieved rapid warning of network attacks of connected vehicles, reduced the dangers caused by network attacks, improved the security of connected vehicles, and reduced the hidden dangers of intrusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119485312A_ABST
    Figure CN119485312A_ABST
Patent Text Reader

Abstract

The invention relates to a method for carrying out early warning on network attacks on a networked automobile, which comprises the following steps of: 1) establishing a semi-supervised generative adversarial network for judging network attack behaviors, the semi-supervised generative adversarial network comprising a discriminator comprising a plurality of residual jump connection blocks and a generator; 2) collecting data traffic of various vehicle-mounted applications of the networked automobile to form a real-time network data traffic set; 3) preprocessing various data traffic in the real-time network data traffic set to obtain a corresponding data traffic graph; and 4) inputting the data flow graph obtained in the step 3) into a discriminator of the semi-supervised generative adversarial network so as to judge whether the intelligent system of the connected automobile is subjected to network attack or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile network security, and in particular to a method for early warning of network-connected automobiles being attacked by a network. Background Art

[0002] Connected cars, or smart connected cars, refer to the organic combination of Internet of Vehicles and smart cars. They can be connected to external networks through wireless communication technology to achieve information interaction between vehicles (V2V), vehicles and infrastructure (V2I), and vehicles and pedestrians (V2P). This type of car is equipped with advanced on-board sensors, controllers, actuators and other devices, as well as communication modules, so that the car can provide information entertainment functions while having intelligent driving assistance functions.

[0003] At present, whether it is the data transmission between the connected car and the Internet of Vehicles, or the intelligent driving assistance function and infotainment function of the connected car, it is necessary to rely on the application (Application, APP) installed in the intelligent system of the connected car to exchange data with the external network. However, these applications often do not have a network attack warning mechanism. Therefore, the applications for data communication between the intelligent connected car and the external network often do not perform identity authentication, nor do they verify the consistency of the length and structure of the data packet due to the weak data transmission security mechanism they usually use. Therefore, many applications in the intelligent system of the connected car are currently subject to network attacks from data traffic, but the driver has no way to know in time, and the intelligent system of the connected car cannot warn of network attacks, and there is no way to take emergency measures against network attacks in time.

[0004] Once the data transmission security mechanism of a connected car is compromised by such a cyber attack, and the attacker successfully invades the intelligent system of the connected car through an application, the following problems will arise:

[0005] ① In the intelligent system, the data of connected cars is usually transmitted in plain text via the bus without encryption. Attackers can use professional equipment to monitor bus communications and detect various private information about connected cars and drivers.

[0006] ② Attackers can inject abnormal data frames into the intelligent system's control instructions for connected vehicles. If the intelligent system cannot identify the abnormal data frames in the control instructions, it will mistakenly control the connected vehicle in motion according to the attacker's intentions, causing a major accident.

[0007] Therefore, how to build a defense mechanism for the data communication network of connected vehicles to determine whether it is under cyber attack, to issue real-time early warning of cyber attacks, and to enable connected vehicles to take timely emergency measures against cyber attacks has always been an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0008] The purpose of the present invention is to provide a method for early warning of networked vehicles under network attacks in response to the corresponding deficiencies in the prior art. In the intelligent system of the networked vehicle, a discriminator (obtained by adversarial training of a semi-supervised generative adversarial network) capable of judging network attack behavior is set up. The discriminator monitors the real-time collected vehicle application data to accurately judge whether the data communication network of the networked vehicle is under network attack.

[0009] The purpose of the present invention is to adopt the following scheme to achieve a method for early warning of network-connected vehicles being attacked by a network, comprising the following steps:

[0010] 1) Establish a semi-supervised generative adversarial network for judging network attack behaviors, wherein the semi-supervised generative adversarial network includes a discriminator including multiple residual skip connection blocks and a generator;

[0011] 2) Collect data traffic from various in-vehicle applications of connected vehicles to form a real-time network data traffic set;

[0012] 3) Preprocess various types of data traffic in the real-time network data traffic concentration to obtain corresponding data traffic graphs;

[0013] 4) Input the data flow graph obtained in step 3) into the discriminator of the semi-supervised generative adversarial network to determine whether the intelligent system of the connected car is under cyber attack.

[0014] Preferably, in step 1), the specific method of obtaining the semi-supervised generative adversarial network is as follows:

[0015] 1-1) Collect data and traffic of various in-vehicle applications of connected vehicles to form a real data set;

[0016] 1-2) Take part of the data traffic in the real data set as unlabeled samples to form an unlabeled sample set;

[0017] 1-3) Mark and number the same type of data traffic in the real data set to form a labeled sample set;

[0018] 1-4) Use labeled sample sets and unlabeled sample sets to train the discriminator;

[0019] 1-5) Train the generator using random noise vectors;

[0020] 1-6) Repeat steps 1-4) to 1-5) until the number of repetitions equals the preset number of cycles.

[0021] Preferably, in step 1-4), the specific method of using the labeled sample set and the unlabeled sample set to train the discriminator is as follows:

[0022] 1-4-1) Initialize the network parameters of the generator;

[0023] 1-4-2) Send several samples in the labeled sample set and the corresponding labels to the discriminator at the same time, calculate the multi-classification loss and back-propagate to minimize the multi-classification loss of the discriminator;

[0024] 1-4-3) Use the generator and the data in the unlabeled sample set to obtain several pseudo samples;

[0025] 1-4-4) Send the pseudo samples obtained in step 1-4-3) and several samples in the unlabeled sample set to the discriminator, calculate the binary classification loss and back-propagate to minimize the binary classification loss function of the discriminator.

[0026] Preferably, the specific method of using the random noise vector to train the generator in step 1-5) is as follows:

[0027] 1-5-1) Fix the network parameters of the discriminator;

[0028] 1-5-2) Input several random noise vectors into the generator to obtain several corresponding pseudo samples;

[0029] 1-5-3) Use a random function to generate several false labels;

[0030] 1-5-4) Send the pseudo samples obtained in step 1-5-2) and the false labels obtained in step 1-5-3) to the discriminator, back-propagate the binary classification loss, and maximize the generator loss.

[0031] Preferably, the generator includes a first deconvolution layer, a second deconvolution layer, a third deconvolution layer, and a fourth deconvolution layer, and each deconvolution layer includes a normalization layer, a channel attention layer, and a spatial attention layer.

[0032] Preferably, the parameters of each deconvolution layer of the generator are as follows:

[0033] The input channel of the first deconvolution layer is 100 pixels, the size of the convolution kernel is 3×3, the stride is set to 1, and the output is a feature map of 3×3×512 pixels;

[0034] The input channel of the second deconvolution layer is 512 pixels, the size of the convolution kernel is 5×5, the step size is set to 2, the padding parameter is 1, and the output is a feature map of 7×7×256 pixels;

[0035] The input channel of the third deconvolution layer is 256 pixels, the size of the convolution kernel is 5×5, the step size is set to 2, the padding parameter is 2, the out_padding parameter is set to 1, and the output is a feature map of 14×14×128 pixels;

[0036] The input channel of the fourth deconvolution layer is 128 pixels, the size of the convolution kernel is 5×5, the stride is set to 2, the padding is set to 2, the out_padding is set to 1, and the output is a feature map of 28×28×3 pixels.

[0037] Preferably, the discriminator comprises a first input terminal, a second input terminal and a third input terminal, wherein the first input terminal is used to receive a pseudo sample, the second input terminal is used to receive a labeled sample, and the third input terminal is used to receive an unlabeled sample.

[0038] Preferably, the discriminator comprises a backbone network and three residual skip connection blocks, wherein the backbone network is composed of a plurality of convolutional layers and a plurality of normalization layers in alternating cycles.

[0039] Preferably, the residual jump connection block includes a first residual jump connection block, a second residual jump connection block, and a third residual jump connection block. The first residual jump connection block adopts a convolution layer with a size of 1×1 and a 3×3 convolution kernel, the second residual jump connection block adopts a convolution layer with a size of 1×1 and a 3×3 convolution kernel, and the third residual jump connection block adopts a convolution layer with a size of 1×1 and a 5×5 convolution kernel, so as to characterize the multi-scale features of the flow image while greatly reducing the computational complexity of the network.

[0040] The advantages of the present invention are as follows:

[0041] ① The discriminator used in the present invention is trained in advance using the vehicle-mounted application data of the connected car and then transplanted into the intelligent system of the connected car. This enables the discriminator to quickly and accurately distinguish network attack behaviors in data traffic during actual identification and issue early warnings in a timely manner;

[0042] ② When the discriminator detects a network attack, the present invention will record all dangerous messages involved in the network attack behavior, provide a reference basis for later repair, update and other operations, and reduce the probability of the connected car being attacked by the same type of network attack again;

[0043] ③ The generative adversarial network used in the present invention is a semi-supervised neural network algorithm structure. This neural network algorithm structure can use a small amount of labeled data and a large amount of unlabeled data for learning and training when its own performance is good, and maintain good performance. Therefore, the present invention can significantly reduce the time and labor input spent on labeling data when training the model, saving time and effort.

[0044] Glossary

[0045] In-vehicle network: refers to the network system that connects different electronic control units (ECUs) and devices inside the car through various communication technologies.

[0046] Multi-classification task: It is a type of task in machine learning and deep learning, whose goal is to classify input data into multiple different categories.

[0047] Multi-classification loss: It is an indicator used to measure the difference between the model's prediction results and the true labels in multi-classification tasks.

[0048] Back propagation: It is mainly used to calculate the gradient of the loss function with respect to each parameter in the network, so as to update the network parameters through optimization algorithms such as gradient descent, so that the output of the network continuously approaches the true value and reduces the value of the loss function.

[0049] Conversation flow: Conversation flow refers to the flow of a series of related interactive information between users (or devices) during network communication or application interaction. It represents a complete communication activity, from session establishment, data exchange to session termination. You can think of the conversation flow as a conversation between two people, starting with greeting each other, discussing various topics in the middle, and finally saying goodbye to end the conversation. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a flow chart of the present invention;

[0051] Figure 2 A schematic diagram of the training process of a semi-supervised generative adversarial network in an embodiment of the present invention;

[0052] Figure 3 Schematic diagram of data processing flow of a generator of a semi-supervised generative adversarial network in an embodiment of the present invention;

[0053] Figure 4 Schematic diagram of the discriminator data processing flow of the semi-supervised generative adversarial network in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] like Figure 1 to Figure 2 As shown, a method for early warning of a network-connected vehicle being attacked by a network includes the following steps:

[0055] 1) A semi-supervised generative adversarial network for judging network attack behaviors is established. The semi-supervised generative adversarial network includes a discriminator including multiple residual skip connection blocks and a generator. The specific method of obtaining the semi-supervised generative adversarial network is as follows:

[0056] 1-1) Collect 50 data samples of various in-vehicle applications of connected cars to form a real data set;

[0057] The real data set in this embodiment is preprocessed in the following manner:

[0058] 1-1-1) First, use the open source tool SplitCap to split the data traffic file Pcap file into session streams;

[0059] 1-1-2) After segmentation, it is also necessary to filter out traffic that is irrelevant to the intrusion detection task, such as duplicate sessions, empty load sessions, DNS sessions, etc.

[0060] 1-1-3) The IP addresses and MAC addresses in the data traffic of common applications will interfere with the neural network algorithm / model.

[0061] In order to avoid the overfitting phenomenon of the semi-supervised generative adversarial network in this embodiment to the IP addresses and MAC addresses in the data traffic, which causes the classification results to be too dependent on these contents, greatly reducing the robustness of this embodiment. This embodiment also needs to process the data traffic in the following manner:

[0062] ① Use the number 255 to anonymize the IP and MAC addresses;

[0063] ② Then, extract the first 784 bytes of the first three packets of each session flow for judgment:

[0064] If the number exceeds 784 bytes, it will be truncated, and if it is less than 784 bytes, it will be filled with the number 255;

[0065] If the number of data packets is less than 3, fill it up to 3 data packets;

[0066] ③ Then, each byte corresponds to a pixel value, such as 0x00 corresponds to black pixels and 0xff corresponds to white pixels, and is converted into a 28×28×3 RGB three-channel image as part of the input for the subsequent algorithm.

[0067] 1-2) Take part of the data traffic in the real data set as unlabeled samples to form an unlabeled sample set;

[0068] 1-3) Mark and number the same type of data traffic in the real data set to form a labeled sample set; for example, there are often many types of applications, especially in-vehicle applications. They are usually divided into video playback software (iQiyi, Youku, etc.), music playback software (QQ Music, Kugou, etc.), and in-vehicle navigation software (Baidu Maps, AutoNavi Maps). In this embodiment, the video playback software is marked as "0", the in-vehicle navigation software is marked as "1", and the music playback software is marked as "2".

[0069] 1-4) Use the labeled sample set and the unlabeled sample set to train the discriminator. The specific method is as follows:

[0070] 1-4-1) Initialize the network parameters of the generator;

[0071] The generator and discriminator in this embodiment are also neural network structures. The parameters of the generator of this neural network structure need to be randomly initialized at the beginning of training to provide a starting point for subsequent training. Usually, these parameters are initialized according to a random distribution (such as a normal distribution).

[0072] 1-4-2) Send 50 samples from the labeled sample set and the corresponding labels to the discriminator at the same time, calculate the multi-classification loss and back-propagate to minimize the multi-classification loss of the discriminator;

[0073] 1-4-3) Use the generator and the data in the unlabeled sample set to obtain 50 pseudo samples;

[0074] 1-4-4) Send the pseudo samples obtained in step 1-4-3) and 50 samples in the unlabeled sample set to the discriminator, calculate the binary classification loss and backpropagate to minimize the binary classification loss function of the discriminator.

[0075] 1-5) Use random noise vector to train the generator as follows:

[0076] 1-5-1) Fix the network parameters of the discriminator;

[0077] 1-5-2) Input 50 100-dimensional random noise vectors into the generator to obtain the corresponding 50 pseudo samples;

[0078] The generator receives a random noise vector, usually sampled from a simple distribution (such as a Gaussian distribution), and converts it into a data sample. The goal of the generator is to learn the distribution of the real data so that it can generate samples similar to the real data. Therefore, it will output a generated data sample based on the input noise vector through a series of neural network layers.

[0079] 1-5-3) Generate 50 false labels using a random function;

[0080] 1-5-4) Send the pseudo samples obtained in step 1-5-2) and the false labels obtained in step 1-5-3) to the discriminator, back-propagate the binary classification loss, and maximize the generator loss.

[0081] 1-6) Repeat steps 1-4) to 1-5) until the number of repetitions equals the preset number of cycles.

[0082] Generally, the number of cycles is set based on whether the performance of the semi-supervised generative adversarial network meets the requirements, as well as the balance between the training time and the computing power required. In this embodiment, the learning rate is set to 0.0001, the loss function is the cross entropy loss function, and the number of cycles is set to 3000 times, that is, after spending a small amount of time and computing power and iterating the training for three thousand times, the semi-supervised generative adversarial network's accuracy in judging network attack behaviors meets the requirements.

[0083] 2) Collect data traffic from various in-vehicle applications of connected vehicles to form a real-time network data traffic set;

[0084] 3) Preprocess various types of data traffic in the real-time network data traffic concentration to obtain corresponding data traffic graphs;

[0085] 4) Input the data flow graph obtained in step 3) into the discriminator of the semi-supervised generative adversarial network to determine whether the intelligent system of the connected car is under cyber attack.

[0086] It is worth noting that the semi-supervised generative adversarial network described in this embodiment is as follows:

[0087] like Figure 3 As shown, Se-Net represents the channel attention mechanism network module (i.e., channel attention layer), AT-Net represents the graph attention mechanism (i.e., spatial attention layer), that is, the generator in this embodiment includes the first deconvolution layer, the second deconvolution layer, the third deconvolution layer, and the fourth deconvolution layer, and each deconvolution layer includes a normalization layer, a channel attention layer, and a spatial attention layer. The parameters of each deconvolution layer of the generator are as follows:

[0088] The input channel of the first deconvolution layer is 100 pixels, the size of the convolution kernel is 3×3, the stride is set to 1, and the output is a feature map of 3×3×512 pixels;

[0089] The input channel of the second deconvolution layer is 512 pixels, the size of the convolution kernel is 5×5, the step size is set to 2, the padding parameter is 1 (padding indicates the number of 0s added to each side of the input), and the output is a feature map of 7×7×256 pixels;

[0090] The input channel of the third deconvolution layer is 256 pixels, the size of the convolution kernel is 5×5, the stride is set to 2, the padding parameter is 2, the out_padding parameter is set to 1 (out-padding indicates the number of additional 0s added on each side of the output), and the output is a feature map of 14×14×128 pixels;

[0091] The input channel of the fourth deconvolution layer is 128 pixels, the size of the convolution kernel is 5×5, the stride is set to 2, the padding is set to 2, the out_padding is set to 1, and the output is a feature map of 28×28×3 pixels.

[0092] In order to make the generator better imitate the details of the vehicle data flow, this embodiment introduces a channel attention module into the network design of the generator to automatically obtain the importance of each channel feature map, and then assigns different weights to each channel to suppress invalid features and strengthen key features. In addition, for each channel feature map, during the convolution calculation process, it is limited by the size of the convolution kernel and can only capture the relationship between local areas, which may lead to the loss of feature integrity. The traditional approach is to choose to use a deeper convolutional network to obtain global information, but this will bring about the problem of gradient disappearance and a surge in the number of training parameters. In order to avoid the above problems and establish a larger feature extraction domain, a self-attention mechanism is also introduced in the generator network, which can effectively use global information to enhance feature representation.

[0093] like Figure 4 As shown, this embodiment uses a convolutional neural network combined with a residual network module to form a discriminator to extract spatial features at each level. The discriminator includes a first input terminal, a second input terminal, and a third input terminal. The first input terminal is used to receive pseudo samples, the second input terminal is used to receive labeled samples, and the third input terminal is used to receive unlabeled samples. The discriminator includes a backbone network and three residual jump connection blocks. The backbone network is composed of multiple convolutional layers and multiple normalization layers in alternating cycles. The residual jump connection block includes a first residual jump connection block, a second residual jump connection block, and a third residual jump connection block. The first residual jump connection block adopts a convolution layer with a size of 1×1 (conv@1*1 convolution operation) and a 3×3 convolution kernel (conv@3*3 convolution operation). The second residual jump connection block adopts a convolution layer with a size of 1×1 and a 3×3 convolution kernel. The third residual jump connection block adopts a convolution layer with a size of 1×1 and a 5×5 convolution kernel (conv@5*5 convolution operation) to characterize the multi-scale features of the flow image while greatly reducing the computational complexity of the network.

[0094] In addition, in this embodiment, a maximum pooling layer and a Flatten layer are also provided in the discriminator to flatten the final channel feature map into a one-dimensional vector (ie, to perform a multi-dimensional to one-dimensional conversion).

[0095] In order to make the semi-supervised generative adversarial network have sufficient judgment accuracy for network attack behaviors, the following points should be noted during the training process:

[0096] a. Determine authenticity:

[0097] The discriminator receives samples from the real data set and samples generated by the generator, and gives the probability scores of them belonging to the real data respectively. The task of the discriminator is to distinguish whether the input sample comes from the real data or is generated by the generator. It analyzes the input sample and calculates a probability value through its own neural network structure, indicating the possibility that the sample is real data.

[0098] b. Back propagation and update:

[0099] b-1) Update of the discriminator:

[0100] The goal is to minimize the loss function of the probability that the real sample is correctly classified and the probability that the generated sample is misclassified, which prompts the discriminator to improve its ability to distinguish. Specifically, the discriminator hopes to give a probability value close to 1 for the real sample and a probability value close to 0 for the generated sample. The loss of the discriminator can be obtained by calculating the difference between the predicted probability of the discriminator for the real sample and the generated sample and the true label (the real sample label is 1 and the generated sample label is 0). Then, this loss is back-propagated to the discriminator's network using the back-propagation algorithm, and the parameters of the discriminator are updated according to certain optimization algorithms (such as stochastic gradient descent, Adam, etc.) to reduce the loss.

[0101] b-2) Update of the generator:

[0102] The goal is to maximize the probability that the generated sample is mistaken for a real sample by the discriminator, that is, to minimize the loss function of the non-real probability given by the discriminator to the generated sample, which prompts the generator to improve the generation quality. The generator hopes that the discriminator will mistake the generated samples for real samples, so its loss function is based on the judgment result of the discriminator on the generated samples. The loss of the generator is also calculated by the back-propagation algorithm, and the parameters of the generator are updated according to the optimization algorithm to improve the quality of the generated samples and make them more able to deceive the discriminator.

[0103] c. Iterative training:

[0104] Repeat the above steps, i.e. generate samples, distinguish authenticity, back propagate and update, for multiple iterations. In each round of iteration, the generator and discriminator will continuously adjust their parameters according to each other's performance, and the competition between the two drives the continuous evolution of the model. As the training progresses, the samples generated by the generator will become more and more realistic, and the discriminator's ability to distinguish will continue to improve until a balance is reached. At this time, the discriminator cannot accurately distinguish between real data and generated data, which means that the generator has learned the distribution of real data and can generate high-quality synthetic data.

[0105] Experiments have proved that the present invention combines the vehicle-computer network intrusion detection task of the connected car with the image recognition task, can detect the vehicle-computer data security status of the connected car through a neural network algorithm, and timely issue an early warning of the data security test results (simulating network attack behavior), which greatly improves the security of the connected car and minimizes the hidden dangers of the connected car being invaded.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification made to the present invention by those skilled in the art without departing from the spirit of the present invention shall fall within the protection scope of the present invention.

Claims

1. A method for early warning of network-connected vehicles being attacked by a network, characterized in that: The following steps are involved: 1) Establish a semi-supervised generative adversarial network for judging network attack behaviors, wherein the semi-supervised generative adversarial network includes a discriminator including multiple residual skip connection blocks and a generator; 2) Collect data traffic from various in-vehicle applications of connected vehicles to form a real-time network data traffic set; 3) Preprocess various types of data traffic in the real-time network data traffic concentration to obtain corresponding data traffic graphs; 4) Input the data flow graph obtained in step 3) into the discriminator of the semi-supervised generative adversarial network to determine whether the intelligent system of the connected car is under cyber attack.

2. The method for early warning of network-connected vehicles being attacked by a network according to claim 1, characterized in that: In step 1), the specific method of obtaining the semi-supervised generative adversarial network is as follows: 1-1) Collect data traffic from various in-vehicle applications of connected vehicles to form a real data set; 1-2) Take part of the data traffic in the real data set as unlabeled samples to form an unlabeled sample set; 1-3) Mark and number the same type of data traffic in the real data set to form a labeled sample set; 1-4) Use labeled sample sets and unlabeled sample sets to train the discriminator; 1-5) Train the generator using random noise vectors; 1-6) Repeat steps 1-4) to 1-5) until the number of repetitions equals the preset number of cycles.

3. The method for early warning of network-connected vehicles being attacked by a network according to claim 2, characterized in that: In step 1-4), the specific method of using the labeled sample set and the unlabeled sample set to train the discriminator is as follows: 1-4-1) Initialize the network parameters of the generator; 1-4-2) Send several samples in the labeled sample set and the corresponding labels to the discriminator at the same time, calculate the multi-classification loss and back-propagate to minimize the multi-classification loss of the discriminator; 1-4-3) Use the generator and the data in the unlabeled sample set to obtain several pseudo samples; 1-4-4) Send the pseudo samples obtained in step 1-4-3) and several samples in the unlabeled sample set to the discriminator, calculate the binary classification loss and back-propagate to minimize the binary classification loss function of the discriminator.

4. The method for early warning of network-connected vehicles being attacked by a network according to claim 2, characterized in that: The specific method of using random noise vector to train the generator in step 1-5) is as follows: 1-5-1) Fix the network parameters of the discriminator; 1-5-2) Input several random noise vectors into the generator to obtain several corresponding pseudo samples; 1-5-3) Use a random function to generate several false labels; 1-5-4) Send the pseudo samples obtained in step 1-5-2) and the false labels obtained in step 1-5-3) to the discriminator, back-propagate the binary classification loss, and maximize the generator loss.

5. The method for early warning of network-connected vehicles being attacked by a network according to claim 1 or 2, characterized in that: The generator includes a first deconvolution layer, a second deconvolution layer, a third deconvolution layer, and a fourth deconvolution layer, and each deconvolution layer includes a normalization layer, a channel attention layer, and a spatial attention layer.

6. The method for early warning of network-connected vehicles being attacked by a network according to claim 5, characterized in that: The parameters of each deconvolution layer of the generator are as follows: The input channel of the first deconvolution layer is 100 pixels, the size of the convolution kernel is 3×3, the stride is set to 1, and the output is a feature map of 3×3×512 pixels; The input channel of the second deconvolution layer is 512 pixels, the size of the convolution kernel is 5×5, the step size is set to 2, the padding parameter is 1, and the output is a feature map of 7×7×256 pixels; The input channel of the third deconvolution layer is 256 pixels, the size of the convolution kernel is 5×5, the step size is set to 2, the padding parameter is 2, the out_padding parameter is set to 1, and the output is a feature map of 14×14×128 pixels; The input channel of the fourth deconvolution layer is 128 pixels, the size of the convolution kernel is 5×5, the stride is set to 2, the padding is set to 2, the out_padding is set to 1, and the output is a feature map of 28×28×3 pixels.

7. The method for early warning of network-connected vehicles being attacked by a network according to claim 1, characterized in that: The discriminator comprises a first input terminal, a second input terminal and a third input terminal, wherein the first input terminal is used to receive a pseudo sample, the second input terminal is used to receive a labeled sample, and the third input terminal is used to receive an unlabeled sample.

8. The method for early warning of network-connected vehicles being attacked by a network according to claim 1, characterized in that: The discriminator includes a backbone network and three residual skip connection blocks, wherein the backbone network is composed of a plurality of convolutional layers and a plurality of normalization layers in alternating cycles.

9. The method for early warning of network-connected vehicles being attacked by a network according to claim 1 or 8, characterized in that: The residual jump connection block includes a first residual jump connection block, a second residual jump connection block, and a third residual jump connection block. The first residual jump connection block adopts a convolution layer with a size of 1×1 and a 3×3 convolution kernel, the second residual jump connection block adopts a convolution layer with a size of 1×1 and a 3×3 convolution kernel, and the third residual jump connection block adopts a convolution layer with a size of 1×1 and a 5×5 convolution kernel, so as to characterize the multi-scale features of the flow image while greatly reducing the computational complexity of the network.