Dimension reduction type data compression method of vehicle-mounted Ethernet
Through the dimensionality reduction data compression method, the problem of network security threats in the on-board Ethernet system is solved, data complexity reduction and computing efficiency improvement are achieved, and network security performance is enhanced.
Patent Information
- Application Number
- CN202411112442.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-17
AI Technical Summary
Vehicle Ethernet systems face network security threats such as data theft, data tampering and malicious attacks. The existing intrusion detection technology has problems such as long information processing time and low accuracy, making it difficult to ensure network security performance.
By using the dimensionality reduction data compression method, by building a multidimensional data matrix and setting compression and decompression parameters, and updating parameters using activation functions and backpropagation algorithms, low-dimensional data that can characterize the main characteristics of multidimensional data is obtained, reducing data complexity and improving operation efficiency.
While retaining the main features of multi-dimensional data, it reduces data dimensions and complexity, improves data computing efficiency, enhances network security performance, and improves the accuracy and real-time nature of intrusion detection.
Smart Images

Figure CN119155737A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent connected vehicle safety technology, and in particular, relates to a dimensionality reduction data compression method for vehicle-mounted Ethernet. Background Art
[0002] With the improvement of automobile intelligence and networking technology, the network performance and security requirements of automotive electronic systems are increasing. Due to the advantages of high bandwidth and low latency, the automotive Ethernet system has attracted widespread attention and has broad application prospects in the development of future vehicle networks. The transmission rate of automotive Ethernet is as high as 1Gbps. This high bandwidth feature can support application scenarios such as advanced driver assistance systems (ADAS) and infotainment systems that have high requirements for data transmission speed. The IEEE 1722 protocol of automotive Ethernet is the core protocol of the Time-Sensitive Application Layer 2 Transport Protocol standard (AVTP). AVTP is mainly responsible for the transmission and encapsulation of audio and video data. AVTP ensures low latency and high synchronization characteristics of data by adopting timestamps and synchronization mechanisms, thereby meeting the application requirements of different multimedia scenarios.
[0003] However, the automotive Ethernet system faces network security threats such as data theft, data tampering, and malicious attacks. Improving the high-efficiency, real-time intelligent information processing capabilities of the intrusion detection system (IDS) is the core technology to ensure the network security performance of the automotive Ethernet. For multimedia data such as audio and video of the automotive Ethernet, network intrusion detection methods mainly use data features, anomalies, and hybrid detection methods. Due to the large amount of real-time communication data of the automotive Ethernet, network intrusion detection technology has the problems of long information processing time and low accuracy of intrusion detection, which makes it difficult to ensure the network security performance of the automotive Ethernet. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a dimensionality reduction data compression method for in-vehicle Ethernet, by which multidimensional data is compressed by dimensionality reduction to obtain low-dimensional data that can characterize the main features of the multidimensional data, thereby reducing the dimension and complexity of the data while retaining the main features of the multidimensional data, thereby improving data computing efficiency.
[0005] The present application provides a dimensionality reduction data compression method for vehicle-mounted Ethernet, the method comprising:
[0006] S1. Obtain a specific number of data frames of the vehicle Ethernet and construct a multi-dimensional data matrix of the vehicle Ethernet;
[0007] S2. respectively setting compression parameters and decompression parameters; the compression parameters include: a compression weight matrix and a compression bias vector, and the decompression parameters include: a decompression weight matrix and a decompression bias vector;
[0008] S3, based on the compression parameter, using an activation function, performing dimensionality reduction compression on the multidimensional data matrix to obtain a low-dimensional data matrix that can characterize the main features of the multidimensional data matrix;
[0009] S4, based on the decompression parameters, using the derivative of the activation function, decompressing the low-dimensional data matrix to obtain a reconstructed data matrix having the same dimension as the multi-dimensional data matrix;
[0010] S5. Calculate the error between the multidimensional data matrix and the reconstructed data matrix, and use a back propagation algorithm and a gradient descent strategy to update the compression parameters and the decompression parameters to obtain a low-dimensional data matrix corresponding to the minimum error value.
[0011] Furthermore, the acquiring of a specific number of data frames of the vehicle Ethernet and the construction of a multi-dimensional data matrix of the vehicle Ethernet includes:
[0012] S1a, obtaining ω data frames of the vehicle Ethernet; wherein each of the data frames consists of 438 bytes;
[0013] S1b. For each data frame, extract the values of the first 58 bytes of the data frame; wherein the value range of each byte is an integer value between [0, 255];
[0014] S1c. Using the values of the first 58 bytes of the extracted ω data frames as matrix elements, a multidimensional data matrix of the in-vehicle Ethernet is constructed; wherein the rows of the multidimensional data matrix represent a specific number ω, the columns of the multidimensional data matrix represent the values of the first 58 bytes of each data frame, and the dimension of the multidimensional data matrix is expressed as ω×58.
[0015] Furthermore, the first 58 bytes of the data frame include: 6 bytes for representing the destination address, 6 bytes for representing the source address, 2 bytes for representing the Ethernet type field, 36 bytes of AVTP multiple subfields, and the first 8 bytes of the load field whose value changes frequently.
[0016] Further, the dimension of the compression weight matrix is expressed as ω×k, and the dimension of the decompression weight matrix is expressed as k×ω; wherein k<58; the dimension of the compression bias vector and the decompression bias vector is expressed as 1×ω;
[0017] The respectively setting of compression parameters and decompression parameters includes:
[0018] Each element in the compression weight matrix, compression bias vector, decompression weight matrix and decompression bias vector is randomly set to a value between (-1, 1).
[0019] Furthermore, based on the compression parameter, using an activation function, the multidimensional data matrix is compressed in a dimensionality reduction manner to obtain a low-dimensional data matrix that can characterize the main features of the multidimensional data matrix, including:
[0020] The low-dimensional data matrix is obtained by the following formula:
[0021] Enc=σ(XW Enc +b Enc );
[0022] In the formula, Enc is a low-dimensional data matrix, σ is an activation function, and X is a multidimensional data matrix.
[0023] W Enc is the compressed weight matrix, b Enc is the compression bias vector.
[0024] Further, based on the decompression parameter, the low-dimensional data matrix is decompressed using the derivative of the activation function to obtain a reconstructed data matrix having the same dimension as the multidimensional data matrix, including:
[0025] The reconstructed data matrix is obtained by the following formula:
[0026] Dec=σ'(EncW Dec +b Dec );
[0027] Where Dec is the reconstructed data matrix, σ' is the derivative of the activation function, and W Dec is the compressed weight matrix, b Dec is the compression bias vector.
[0028] Furthermore, the calculation of the error between the multidimensional data matrix and the reconstructed data matrix, and updating the compression parameters and the decompression parameters using a back propagation algorithm and a gradient descent strategy to obtain a low-dimensional data matrix corresponding to the minimum error value, includes:
[0029] S5a, calculating the error between the multidimensional data matrix and the reconstructed data matrix;
[0030] S5b, determining whether the error meets a preset condition;
[0031] S5c, if the error meets the preset condition, output the low-dimensional data matrix corresponding to the error;
[0032] S5d. If the error does not meet the preset condition, the compression parameters and decompression parameters are updated using a back propagation algorithm and a gradient descent strategy, and steps S3-S5 are repeated.
[0033] Furthermore, the error between the multidimensional data matrix and the reconstructed data matrix is calculated by the following formula:
[0034]
[0035] Where Δ(X, Dec) is the error between the multidimensional data matrix and the reconstructed data matrix, X i,j is the matrix element of the multidimensional data matrix, Dec i,j is the matrix element of the reconstructed data matrix, where i=0, 1,…, ω, j=0, 1,…, 58.
[0036] The present application provides a dimensionality reduction data compression method for an in-vehicle Ethernet, which performs dimensionality reduction data compression on multidimensional data to obtain low-dimensional data that can characterize the main features of the multidimensional data, thereby reducing data complexity while retaining the main features of the multidimensional data to improve data computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flow chart of a dimensionality reduction data compression method for in-vehicle Ethernet provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the technical solution more clear, the technical solution is further described in detail below in conjunction with specific implementation methods. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the technical solution.
[0039] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a dimensionality reduction data compression method for vehicle-mounted Ethernet provided by an embodiment of the present application. Figure 1 As shown, the method comprises:
[0040] S101. Acquire a specific number of data frames of the in-vehicle Ethernet and construct a multi-dimensional data matrix of the in-vehicle Ethernet.
[0041] In specific implementation, the multi-dimensional data matrix of automotive Ethernet can be constructed in the following ways:
[0042] Step 1011: Obtain ω data frames of the vehicle-mounted Ethernet.
[0043] Each of the data frames consists of 438 bytes.
[0044] Step 1012: For each data frame, extract the values of the first 58 bytes of the data frame.
[0045] The value range of each byte is an integer value between [0, 255]. The first 58 bytes of the data frame include: 6 bytes for representing the destination address, 6 bytes for representing the source address, 2 bytes for representing the Ethernet type field, 36 bytes of multiple AVTP subfields, and the first 8 bytes of the load field whose value changes frequently.
[0046] Here, since the value of the first 8 bytes of the payload field changes frequently, the network traffic can usually be effectively monitored and network anomalies can be detected by analyzing the changes in the 8 bytes.
[0047] Step 1013: Use the values of the first 58 bytes of the extracted ω data frames as matrix elements to construct a multi-dimensional data matrix of the in-vehicle Ethernet.
[0048] The rows of the multidimensional data matrix represent a specific number ω, the columns of the multidimensional data matrix represent the values of the first 58 bytes of each data frame, and the dimension of the multidimensional data matrix is expressed as ω×58.
[0049] As an example, the multi-dimensional data matrix of the vehicle Ethernet constructed in the embodiment of the present application is as follows:
[0050]
[0051] S102, respectively setting compression parameters and decompression parameters; the compression parameters include: a compression weight matrix and a compression bias vector, and the decompression parameters include: a decompression weight matrix and a decompression bias vector.
[0052] The dimension of the compression weight matrix is expressed as ω×k, and the dimension of the decompression weight matrix is expressed as k×ω; where k is less than 58; and the dimension of the compression bias vector and the decompression bias vector is expressed as 1×ω.
[0053] Here, the compression weight matrix and the decompression weight matrix are used to interact during the compression and decompression processes, and the compression bias vector and the decompression bias vector are used to adjust the translation of the data.
[0054] Specifically, the respectively setting of compression parameters and decompression parameters includes:
[0055] Each element in the compression weight matrix, compression bias vector, decompression weight matrix and decompression bias vector is randomly set to a value between (-1, 1).
[0056] Here, the elements of the compression weight matrix, compression bias vector, decompression weight matrix, and decompression bias vector are determined to be in the interval (-1, 1) by randomly selecting values. If the parameter value is too large or too small, the gradient may increase or decrease rapidly during the compression and decompression process, resulting in the problem of gradient explosion or disappearance. Determining the parameters in the interval (-1, 1) helps keep the gradient within a reasonable range and ensures the stability and efficiency of the compression and decompression process.
[0057] S103. Based on the compression parameters, using an activation function, the multidimensional data matrix is compressed in a dimensionality reduction manner to obtain a low-dimensional data matrix that can characterize the main features of the multidimensional data matrix.
[0058] Specifically, the low-dimensional data matrix is obtained by the following formula:
[0059] Enc=σ(XWV Enc +b Enc )(2);
[0060] In the formula, Enc is a low-dimensional data matrix, σ is an activation function, X is a multidimensional data matrix, and W Enc is the compressed weight matrix, b Enc is the compression bias vector.
[0061] Here, the purpose of data compression is achieved by compressing multi-dimensional data into low-dimensional data, that is, reducing the number of bytes of each data frame.
[0062] As an example, setting the activation function σ = max(0, X) can effectively reduce the risk of overfitting, thereby speeding up the calculation process and facilitating data compression. Here, the max function is used to find the maximum element of a vector or matrix, or the maximum value of several values. max(0, X) compares each element in the multidimensional data matrix with 0 in turn, and retains the values greater than 0 to achieve the purpose of reducing the dimensionality of the multidimensional data. Further, substituting each compression parameter into the above formula (2) to obtain a low-dimensional data matrix:
[0063]
[0064] Representing the elements in the low-dimensional data matrix with e, we have:
[0065]
[0066] Here, the dimension of the low-dimensional data matrix is denoted as ω×k.
[0067] S104. Based on the decompression parameters, the low-dimensional data matrix is decompressed using the derivative of the activation function to obtain a reconstructed data matrix having the same dimension as the multi-dimensional data matrix.
[0068] Specifically, the reconstructed data matrix is obtained by the following formula:
[0069] Dec=σ'(EncW Dec +b Dec )(5);
[0070] Where Dec is the reconstructed data matrix, σ′ is the derivative of the activation function, and W Dec is the compressed weight matrix, b Dec is the compression bias vector.
[0071] As an example, the decompression parameters are substituted into the above formula (5) to obtain the reconstructed data matrix:
[0072]
[0073] Here, the low-dimensional data is reconstructed into reconstructed data having the same dimension as the multi-dimensional data. Further, the accuracy and effectiveness of the compression and decompression process are determined by judging whether the reconstructed data is consistent with the multi-dimensional data.
[0074] S105, calculating the error between the multidimensional data matrix and the reconstructed data matrix, and using a back propagation algorithm and a gradient descent strategy to update the compression parameters and the decompression parameters to obtain a low-dimensional data matrix corresponding to the minimum error value.
[0075] In specific implementation, the low-dimensional data matrix corresponding to the minimum error value can be obtained through the following steps:
[0076] Step 1051: Calculate the error between the multidimensional data matrix and the reconstructed data matrix.
[0077] Specifically, the error between the multidimensional data matrix and the reconstructed data matrix is calculated by the following formula:
[0078]
[0079] Where Δ(X, Dec) is the error between the multidimensional data matrix and the low-dimensional data matrix, X i,j is the matrix element of the multidimensional data matrix, Dec i,j is the matrix element of the reconstructed data matrix, where i=0, 1,…, ω, j=0, 1,…, 58.
[0080] Here, the error between the multidimensional data matrix and the reconstructed data matrix is used as the loss function to guide the update optimization of compression and decompression parameters.
[0081] Step 1052: Determine whether the error meets a preset condition.
[0082] In this step, usually, the preset condition is the minimum error value, that is, each time the error is calculated, it is compared with the previous error to determine whether the error is smaller than the previous error. However, this judgment process is inefficient. Therefore, in the embodiment of the present application, the preset condition is set to whether it is less than a fixed value of 0.2, that is, when the error is less than 0.2, it is determined as the minimum error value. Then, each error is compared with the fixed value of 0.2, thereby improving the efficiency of the judgment process. Of course, if you want to improve the compression accuracy, you can also set the error to other values, and the present application does not make any restrictions here.
[0083] If the error satisfies the preset condition, step 1053 is executed to output the low-dimensional data matrix corresponding to the error.
[0084] If the error does not meet the preset condition, step 1054 is executed, the compression parameters and decompression parameters are updated using the back propagation algorithm and the gradient descent strategy, and steps S103-S105 are repeated.
[0085] The above contents are only preferred embodiments of the present invention. For ordinary technicians in this field, many changes can be made in the specific implementation methods and application scopes based on the ideas of the present technical content. As long as these changes do not deviate from the concept of the present invention, they all fall within the scope of protection of this patent.
Claims
1. A dimensionality reduction data compression method for vehicle-mounted Ethernet, characterized in that: The method comprises: S1. Obtain a specific number of data frames of the vehicle Ethernet and construct a multi-dimensional data matrix of the vehicle Ethernet; S2. respectively setting compression parameters and decompression parameters; the compression parameters include: a compression weight matrix and a compression bias vector, and the decompression parameters include: a decompression weight matrix and a decompression bias vector; S3, based on the compression parameter, using an activation function, performing dimensionality reduction compression on the multidimensional data matrix to obtain a low-dimensional data matrix that can characterize the main features of the multidimensional data matrix; S4, based on the decompression parameters, using the derivative of the activation function, decompressing the low-dimensional data matrix to obtain a reconstructed data matrix having the same dimension as the multi-dimensional data matrix; S5. Calculate the error between the multidimensional data matrix and the reconstructed data matrix, and use a back propagation algorithm and a gradient descent strategy to update the compression parameters and the decompression parameters to obtain a low-dimensional data matrix corresponding to the minimum error value.
2. The method according to claim 1, characterized in that The obtaining of a specific number of data frames of the vehicle Ethernet and constructing a multi-dimensional data matrix of the vehicle Ethernet includes: S1a, obtaining ω data frames of the vehicle Ethernet; wherein each of the data frames consists of 438 bytes; S1b. For each data frame, extract the values of the first 58 bytes of the data frame; wherein the value range of each byte is an integer value between [0, 255]; S1c. Using the values of the first 58 bytes of the extracted ω data frames as matrix elements, a multidimensional data matrix of the in-vehicle Ethernet is constructed; wherein the rows of the multidimensional data matrix represent a specific number ω, the columns of the multidimensional data matrix represent the values of the first 58 bytes of each data frame, and the dimension of the multidimensional data matrix is expressed as ω×58.
3. The method according to claim 2, characterized in that The first 58 bytes of the data frame include: 6 bytes for representing the destination address, 6 bytes for representing the source address, 2 bytes for representing the Ethernet type field, 36 bytes of AVTP multiple subfields, and the first 8 bytes of the load field whose value changes frequently.
4. The method according to claim 1, characterized in that The dimension of the compression weight matrix is expressed as ω×k, and the dimension of the decompression weight matrix is expressed as k×ω; wherein k<58; the dimension of the compression bias vector and the decompression bias vector is expressed as 1×ω; The respectively setting of compression parameters and decompression parameters includes: Each element in the compression weight matrix, compression bias vector, decompression weight matrix and decompression bias vector is randomly set to a value between (-1, 1).
5. The method according to claim 1, characterized in that The method of performing dimensionality reduction compression on the multidimensional data matrix based on the compression parameter and using an activation function to obtain a low-dimensional data matrix capable of characterizing the main features of the multidimensional data matrix includes: The low-dimensional data matrix is obtained by the following formula: Enc=σ(XW Enc +b Enc ), where Enc is a low-dimensional data matrix, σ is an activation function, X is a multidimensional data matrix, and W Enc is the compressed weight matrix, b Enc is the compression bias vector.
6. The method according to claim 5, characterized in that The decompressing the low-dimensional data matrix based on the decompression parameter and using the derivative of the activation function to obtain a reconstructed data matrix having the same dimension as the multi-dimensional data matrix comprises: The reconstructed data matrix is obtained by the following formula: Dec=σ′(EncW Dec +b Dec ); Where Dec is the reconstructed data matrix, σ' is the derivative of the activation function, and W Dec is the compressed weight matrix, b Dec is the compression bias vector.
7. The method according to claim 1, characterized in that The calculating the error between the multidimensional data matrix and the reconstructed data matrix, and updating the compression parameters and the decompression parameters by using a back propagation algorithm and a gradient descent strategy to obtain a low-dimensional data matrix corresponding to a minimum error value, comprises: S5a, calculating the error between the multidimensional data matrix and the reconstructed data matrix; S5b, determining whether the error meets a preset condition; S5c, if the error meets the preset condition, output the low-dimensional data matrix corresponding to the error; S5d. If the error does not meet the preset condition, the compression parameters and decompression parameters are updated using a back propagation algorithm and a gradient descent strategy, and steps S3-S5 are repeated.
8. The method according to claim 7, characterized in that The error between the multidimensional data matrix and the reconstructed data matrix is calculated by the following formula: Where Δ(X, Dec) is the error between the multidimensional data matrix and the reconstructed data matrix, X i,j is the matrix element of the multidimensional data matrix, Dec i,j is the matrix element of the reconstructed data matrix, where i=0, 1,…, ω, j=0, 1,…, 58.
Citation Information
Cited By
Multi-dimensional data management method and system based on deep learning
CN121560961A
