Hyper-parameter adjustment method and device for CAN bus intrusion detection model
By combining the golden sine strategy and Latin hypercube sampling, the hyperparameters of the CAN bus intrusion detection model are optimized, solving the problem of time-consuming and inefficient operation in existing technologies. This achieves efficient global search and constructs a high-performance intrusion detection model that is adaptable to the complex environment of agricultural machinery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHIHEZI UNIVERSITY
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the hyperparameter tuning of CAN bus intrusion detection models relies on manual experience and exhaustive search, which is time-consuming and inefficient, making it difficult to meet the real-time and resource-constrained requirements of agricultural machinery embedded systems.
By combining the golden sine strategy and Latin hypercube sampling, and through iteratively updating hyperparameters and incorporating stable distributed perturbations, an efficient global search is achieved to optimize the hyperparameters of the CAN bus intrusion detection model.
Significantly reducing the complexity and time cost of manual parameter tuning, improving the randomness and jumpiness of position updates, enhancing the global search capability of the algorithm, and constructing a higher-performance CAN bus intrusion detection model to meet the network security needs of complex agricultural machinery operation environments.
Smart Images

Figure CN121940169A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology for agricultural machinery, and in particular to a hyperparameter adjustment method and device for a CAN bus intrusion detection model. Background Technology
[0002] With the continuous improvement of the intelligence level of agricultural machinery, the Controller Area Network (CAN) bus, as an important infrastructure for data communication between various modules of agricultural machinery, is widely used in agricultural machinery control systems. The CAN bus, with its strong real-time performance and high anti-interference capability, ensures the stable operation of agricultural machinery. However, with the increasing threats of vehicle networking and information security, the risk of CAN bus being attacked by message tampering, forgery, and replay attacks has significantly increased, seriously threatening the normal operation and safety of agricultural machinery. Traditional CAN bus intrusion detection methods mainly use machine learning or deep learning models to detect anomalies in communication data. The performance of these models highly depends on the reasonable configuration of hyperparameters, while traditional hyperparameter tuning often relies on manual experience and exhaustive search.
[0003] However, parameter tuning that relies on human experience and exhaustive search is time-consuming and inefficient, making it difficult to meet the real-time and resource-constrained requirements of agricultural machinery embedded systems. Summary of the Invention
[0004] This invention provides a hyperparameter adjustment method and apparatus for a CAN bus intrusion detection model, which solves the defects of the existing technology that relies on manual experience and exhaustive search for parameter adjustment, which is time-consuming and inefficient, and cannot meet the real-time and resource-constrained requirements of agricultural machinery embedded systems.
[0005] This invention provides a hyperparameter tuning method for a CAN bus intrusion detection model, comprising: Step S1: Initially sample the hyperparameters of the candidate models for the CAN bus intrusion detection model to determine the initial position of the individual. Step S2: Using the initial position as the optimization space, the optimal position is selected from the optimization space based on the fitness value of each position in the optimization space. Step S3: Based on the optimal position and the golden sine strategy, update the position of each position in the optimization space to obtain the updated position of the individual. Step S4: Use the updated position as the optimization space for the next round, and repeat steps S2 and S3 until the iteration rounds meet the preset conditions. Based on the hyperparameter combination corresponding to the optimal position in the last round, construct the CAN bus intrusion detection model.
[0006] According to the present invention, a hyperparameter tuning method for a CAN bus intrusion detection model, wherein the updated position of each position in the optimization space is updated based on the optimal position and the golden sine strategy to obtain the updated position of the individual, includes: Based on the optimal position, the golden ratio, and the sine function, the positions of each position in the optimization space are updated to obtain the initial optimized individual position; based on A stable distribution is established, and the initial optimized individual position is updated to obtain the updated position of the individual.
[0007] According to the present invention, a hyperparameter adjustment method for a CAN bus intrusion detection model includes the following steps: initial sampling of the hyperparameters of candidate models of the CAN bus intrusion detection model to determine the initial position of each individual model. Based on the hyperparameters of the candidate models, a search space is constructed. The initial position is obtained by uniformly sampling the search space based on the Latin hypercube sampling method.
[0008] According to the hyperparameter tuning method of a CAN bus intrusion detection model provided by the present invention, the steps for calculating the fitness value at each position in the optimization space include: Obtain the model detection index of the CAN bus intrusion detection model after applying the hyperparameter combinations corresponding to each position; the model detection index includes at least one of detection accuracy and detection performance; Based on the model detection index and fitness function, the fitness value at each position is calculated.
[0009] According to the present invention, a hyperparameter tuning method for a CAN bus intrusion detection model is provided, wherein the CAN bus intrusion detection model is constructed based on a multi-layer convolutional network; The hyperparameters of the candidate model include the number of output channels per convolutional layer, the kernel size, the dilation coefficient, and the dropout rate.
[0010] This invention also provides a training method for a CAN bus intrusion detection model, comprising: Acquire sample bus communication data and an initial CAN bus intrusion detection model; the initial CAN bus intrusion detection model is obtained based on the hyperparameter adjustment method of the CAN bus intrusion detection model described above. Based on the sample bus communication data, the parameters of the initial CAN bus intrusion detection model are iterated to obtain the final CAN bus intrusion detection model.
[0011] This invention also provides a hyperparameter adjustment device for a CAN bus intrusion detection model, comprising: The initialization unit performs initial sampling of the candidate model hyperparameters of the CAN bus intrusion detection model to determine the initial position of the individual. The optimization unit uses the initial position as the optimization space and selects the optimal position from the optimization space based on the fitness value of each position in the optimization space. The position update unit updates the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual. The iterative output unit uses the updated position as the optimization space for the next round, and repeatedly executes the optimization unit and the position update unit until the iteration round meets the preset conditions. Based on the hyperparameter combination corresponding to the optimal position in the last round, the CAN bus intrusion detection model is constructed.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a hyperparameter adjustment method for any of the above-described CAN bus intrusion detection models, or a training method for the CAN bus intrusion detection model.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a hyperparameter adjustment method for a CAN bus intrusion detection model as described above, or a training method for a CAN bus intrusion detection model.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a hyperparameter adjustment method for any of the above-described CAN bus intrusion detection models, or a training method for a CAN bus intrusion detection model.
[0015] This invention provides a hyperparameter adjustment method and apparatus for a CAN bus intrusion detection model. By combining iterative updates with a golden sine strategy, it not only significantly reduces the complexity and time cost of manual parameter tuning, but also increases the randomness and jumpiness of position updates. This helps the algorithm escape local extremum traps, thereby exploring potential better solutions in a wider range. This effectively improves the global search capability and convergence efficiency of the optimization algorithm, ultimately resulting in a CAN bus intrusion detection model with better performance to meet the high network security requirements of agricultural machinery in complex operating environments. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts illustrating the hyperparameter adjustment method for the CAN bus intrusion detection model provided by this invention; Figure 2 This is the second flowchart illustrating the hyperparameter adjustment method of the CAN bus intrusion detection model provided by this invention; Figure 3 This is a schematic diagram comparing the convergence curves of the prior art provided by this invention and the hyperparameter adjustment method provided in this application; Figure 4 This is a flowchart illustrating the training method for the CAN bus intrusion detection model provided by the present invention. Figure 5 This is a flowchart illustrating the deployment method of the CAN bus intrusion detection model provided by the present invention; Figure 6 This is a schematic diagram of the embedded device structure of the agricultural machinery CAN bus intrusion detection system provided by the present invention; Figure 7 This is a schematic diagram of the hyperparameter adjustment device for the CAN bus intrusion detection model provided by the present invention; Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0019] To address the aforementioned problems, this invention provides a hyperparameter tuning method for a CAN bus intrusion detection model, achieving efficient and optimal hyperparameter tuning. Figure 1 This is one of the flowcharts illustrating the hyperparameter adjustment method for the CAN bus intrusion detection model provided by this invention, as shown below. Figure 1 As shown, the method includes: Step S1: Initially sample the hyperparameters of the candidate models for the CAN bus intrusion detection model to determine the initial position of each individual.
[0020] Here, candidate model hyperparameters refer to a set of parameters that directly affect the performance of the CAN bus intrusion detection model but cannot be directly learned through the training process. It can be understood that the values of the candidate model hyperparameters collectively constitute a high-dimensional hyperparameter space, and this method aims to find the optimal parameter combination in this space. Furthermore, each individual here represents a potential solution in the search space; specifically, each individual is a complete combination of candidate model hyperparameter values. The initial position of an individual is its numerical representation in the hyperparameter search space, typically a multi-dimensional vector, where each dimension of the vector corresponds to a hyperparameter value.
[0021] Specifically, an initial population can be generated across the entire hyperparameter search space, consisting of multiple individuals with different initial positions. To ensure the diversity of the initial population and improve the uniformity of the search space coverage, the Latin hypercube sampling method can be employed. This method divides the range of values for each hyperparameter into equally probable intervals and randomly samples a value within each interval, thereby ensuring uniform sampling across each dimension. For example, if the candidate model hyperparameters include the number of convolutional layer channels, the kernel size, and the dropout rate, then each individual represents a specific numerical combination of these three hyperparameters, and its initial position is a coordinate point in the three-dimensional space defined by the ranges of these three parameters.
[0022] Step S2: Using the initial position as the optimization space, the optimal position is selected from the optimization space based on the fitness value of each position in the optimization space.
[0023] Here, the optimization space is the set of all individuals' current positions, which in the first iteration is the initial position set generated in step S1. Furthermore, the fitness value here is a quantitative indicator used to evaluate the quality of each individual's position, i.e., each hyperparameter combination. A higher or lower fitness value for a position indicates better model performance based on the hyperparameter combination at that position. Here, the optimal position is the position with the best fitness value among all positions in the current optimization space.
[0024] Specifically, to calculate the fitness value for each position, a temporary CAN bus intrusion detection model needs to be constructed based on the hyperparameter combination corresponding to that position, and then evaluated using a pre-prepared validation dataset. The fitness value calculation can incorporate multiple key performance indicators. After calculating the fitness values for all positions in the optimization space, the optimal value is selected as the optimal position for the current round by comparing these values.
[0025] It should be noted that selecting the current optimal position provides a target for subsequent position updates, ensuring that the algorithm's convergence direction evolves in a trend towards performance improvement. Step S3: Based on the optimal position and the golden sine strategy, update the position of each position in the optimization space to obtain the updated position of the individual.
[0026] Here, the updated position refers to the new position calculated for each individual in the optimization space in the current iteration according to a specific update rule. This new position will replace its old position in the next iteration and become part of the new optimization space.
[0027] Specifically, to enhance the algorithm's global search capability and avoid premature convergence to a local optimum during the optimization process, a golden sine strategy can be introduced into the update mechanism of the basic optimization algorithm. The algorithm here could be the kingfisher optimization algorithm.
[0028] It should be noted that the golden sine strategy utilizes the periodic perturbations of the golden ratio and sine function to update the individual's position. This introduces a non-linear, exploratory perturbation while each individual learns towards its current optimal position. Therefore, by incorporating the golden sine strategy for position updates, the algorithm's exploration and utilization capabilities can be effectively balanced. On one hand, the individual's move towards the current optimal position reflects the utilization of existing high-quality solutions; on the other hand, the introduction of the sine function and golden ratio coefficients increases the randomness and leaps in position updates, helping the algorithm escape local extremum traps and thus explore potential better solutions within a broader range.
[0029] Step S4: Use the updated position as the optimization space for the next round, and repeat steps S2 and S3 until the iteration rounds meet the preset conditions. Based on the hyperparameter combination corresponding to the optimal position in the last round, construct the CAN bus intrusion detection model.
[0030] Specifically, this step is an iterative optimization loop. The set of updated positions for all individuals calculated in step S3 is used as the optimization space at the start of the next iteration. Then, the fitness evaluation and optimal position selection in step S2, and the position update operation in step S3 are repeated. This loop continues until a preset termination condition is met.
[0031] The preset conditions here can be reaching a preset maximum number of iterations, or the fitness value of the optimal position no longer showing significant improvement in multiple consecutive iterations. The entire iterative optimization process ends when the termination condition is met. At this point, the hyperparameter combination corresponding to the globally optimal position recorded by the algorithm is the optimal solution found by this adjustment method. Finally, this optimal hyperparameter combination is used to formally build and train the final CAN bus intrusion detection model, which will be deployed for actual intrusion detection tasks.
[0032] It should be noted that by employing a multi-round iterative optimization approach, the hyperparameter search process is ensured to be a continuous process of self-improvement, gradually approaching the optimal solution. The final model is constructed based on the best hyperparameters obtained through thorough search and optimization. Compared to models relying on human experience or traditional grid search, its overall performance in terms of detection accuracy and real-time performance is significantly improved, thus achieving the goal of building an efficient and reliable intrusion detection model for agricultural machinery CAN buses.
[0033] The method proposed in this invention, by combining iterative updates with the golden sine strategy, not only significantly reduces the complexity and time cost of manual parameter tuning, but also increases the randomness and leap of position updates. This helps the algorithm escape local extremum traps, thereby exploring potential better solutions in a wider range. Consequently, it effectively improves the global search capability and convergence efficiency of the optimization algorithm, ultimately resulting in a CAN bus intrusion detection model with superior performance to meet the high network security requirements of agricultural machinery in complex operating environments.
[0034] Furthermore, to further help the algorithm escape local extremum traps, based on any of the above embodiments, step S3 specifically includes: Based on the optimal position, the golden ratio, and the sine function, the positions of each position in the optimization space are updated to obtain the initial optimized individual position; based on A stable distribution is established, and the initial optimized individual position is updated to obtain the updated position of the individual.
[0035] Specifically, firstly, the positions of each element in the optimization space of the current round can be updated using the optimal position, the golden ratio, and the sine function to obtain the initial optimized individual position. This initial optimized individual position is an intermediate state position, obtained after executing the golden sine strategy, which combines convergence and exploration, thus providing a foundation for subsequent finer perturbations.
[0036] Here, the initial optimized individual position can be calculated using the following formula, as shown below: ; In the formula, This represents the initial optimized individual position of individual i in the (t+1)th iteration; Let represent the position of individual i in the t-th iteration, and best represent the current global optimal position. Step size factor It is the golden ratio constant, with a value of approximately 0.618.
[0037] It should be noted that the introduced sine function causes the update step size to fluctuate periodically, which helps the individual perform a more refined search in the region close to the optimal solution. Furthermore, the golden ratio constant ensures that the distance between the individual and the optimal position scales according to the golden ratio, which helps to efficiently narrow the search range. Therefore, by combining the golden ratio with the sine function, the individual update is not simply a linear movement towards the optimal position, but rather introduces dynamic perturbations within an efficient convergence framework, effectively improving the algorithm's search behavior and enhancing optimization efficiency and convergence speed.
[0038] Furthermore, to prevent the algorithm from prematurely converging to a local optimum after executing the aforementioned golden sine strategy update, this sub-step applies a factor based on the obtained initial optimized individual position. Stable distributed random perturbations can be based on For a stable distribution, the initial optimized individual position is updated to obtain the updated position of the individual. For example, the updated position of the individual can be obtained using the following formula, as shown below: ; In the formula, This represents the update position of individual i in the (t+1)th iteration; This represents the initial optimized individual position of individual i in the (t+1)th iteration; Indicates the disturbance parameters; As a stability index, , As a stable distributed random variable, it exhibits heavy-tailed characteristics. It should be noted that the stability index is used to control the thickness of the distribution's tails; the smaller the stability index, the heavier the tails, and the greater the likelihood of large jumps.
[0039] It should also be noted that, based on the initial optimization of individual positions, and based on... A stable distribution for updating individual positions essentially adds a powerful global perturbation mechanism to the optimization process. Understandably, when most individuals cluster towards the current optimal region using the golden sinusoidal strategy, The large random step size generated by the stable distribution allows some individuals to jump out of the current attraction domain and explore other unexplored regions in the search space, thereby greatly enhancing the algorithm's ability to escape local optima and significantly increasing the probability of finding the global optimum.
[0040] Therefore, the method provided in this embodiment of the invention obtains the updated position of an individual through a two-stage position update strategy. The first stage, using a golden sine strategy, ensures that the algorithm has a good convergence trend and efficient local search capability. The second stage... Stable distributed perturbations provide powerful capabilities for global exploration and escaping local optima. By combining these two strategies, a more sophisticated dynamic balance between global exploration and local exploitation is achieved, making the entire hyperparameter tuning method more robust and enabling it to converge to the globally optimal hyperparameter combination with a higher probability and faster speed. This results in a CAN bus intrusion detection model with superior performance.
[0041] Based on any of the above embodiments, step S1 includes: Based on the hyperparameters of the candidate models, a search space is constructed. The initial position is obtained by uniformly sampling the search space based on the Latin hypercube sampling method.
[0042] Specifically, first, candidate model hyperparameters that have a key impact on the performance of the CAN bus intrusion detection model are identified, including but not limited to: the number of channels in the convolutional layers of the TCN (Temporal Convolutional Network), the size of the convolutional kernel, the number of stacked layers in the network, the type of activation function, the dropout rate during training, and the learning rate of the optimizer. Then, after identifying these hyperparameters, a reasonable range of values consistent with historical experience can be set for each hyperparameter. For example, the range of the convolutional kernel size can be set to integers between [2, 8], and the range of the learning rate can be set to continuous values between [0.0001, 0.01]. Thus, the range of values for all these hyperparameters collectively defines a high-dimensional, bounded search space. It should be noted that by clearly defining the optimization boundaries of each hyperparameter, a clear target region is provided for the subsequent sampling and optimization process.
[0043] Furthermore, within the constructed search space, if the plan is to generate M individuals to form an initial population, the Latin hypercube sampling method proceeds as follows: First, each dimension of the search space, i.e., the range of values for each hyperparameter, is independently divided into M equally probable, non-overlapping sub-intervals. Next, within each sub-interval of each dimension, a sample value is randomly selected. Finally, the M sample values selected from each dimension are randomly paired and combined to form M complete, multi-dimensional hyperparameter vectors. These M vectors represent the initial positions of the M individuals.
[0044] In one embodiment, the initial position of an individual is obtained based on the Latin hypercube sampling method, which can be achieved by the following formula, as shown below: ; In the formula, This represents the value of the i-th individual in the d-th dimension, i.e., the initial position of individual i; M is the population size, i.e., the total number of individuals; This indicates a random permutation operation.
[0045] It should be noted that the Latin hypercube sampling method ensures that each sub-interval is sampled exactly once in any dimension, avoiding the clustering of sample points and the emergence of blank areas. Compared with simple random sampling, which may lead to the clustering of initial points, the Latin hypercube sampling method provides a more evenly distributed and representative starting point for subsequent optimization algorithms, thus laying the foundation for efficiently finding the globally optimal hyperparameter combination.
[0046] Based on any of the above embodiments, the steps for calculating the fitness value at each location in the optimization space include: Obtain the model detection index of the CAN bus intrusion detection model after applying the hyperparameter combinations corresponding to each position; the model detection index includes at least one of detection accuracy and detection performance; Based on the model detection index and fitness function, the fitness value at each position is calculated.
[0047] Here, model detection metrics are a set of quantitative data used to comprehensively evaluate the performance of temporary models constructed from specific combinations of hyperparameters on intrusion detection tasks. These metrics can cover both detection accuracy and detection performance dimensions for a comprehensive evaluation.
[0048] Here, the accuracy-related metrics are used to measure the model's accuracy in distinguishing between normal CAN messages and attack CAN messages. These may include, but are not limited to: accuracy, which is the proportion of correctly classified samples out of the total number of samples; precision, which is the proportion of samples predicted as attacks that are actually attack samples; recall, which is the proportion of all real attack samples that are successfully detected; and F1 score, which is the harmonic mean of precision and recall.
[0049] In addition, the performance metrics related to detection mainly focus on the model's operating efficiency and resource consumption, which may include, but are not limited to: the model's average inference latency, i.e. the time required for the model to make a detection decision on a single CAN message or a data window; and the model's complexity or number of parameters, which indirectly affects the storage space and computing resources required by the model.
[0050] Specifically, to obtain the model detection metrics of the CAN bus intrusion detection model after combining hyperparameters for each location, a temporary CAN bus intrusion detection model needs to be configured for each location in the optimization space based on its corresponding hyperparameter combination. Then, this temporary model is tested using a pre-prepared validation dataset containing a large number of labeled agricultural machinery CAN bus messages. By running the model on the validation dataset and statistically analyzing the difference between its classification results and the true labels, the aforementioned detection accuracy metrics can be calculated. Simultaneously, recording the model's runtime during testing yields the detection performance metrics.
[0051] Furthermore, a fitness function designed to be minimized can be designed. For example, this function can be defined as the sum of multiple weighted metrics, and the fitness function can be expressed by the following formula, as shown below: ; In the formula, Fit represents the fitness function; Weights are set according to actual needs. For accuracy, For false alarm rate, This represents the average inference latency. For example, in scenarios with extremely high real-time requirements, the weight of the average inference latency can be increased; in scenarios with extremely stringent security requirements, the weight related to detection accuracy can be increased.
[0052] The method provided in this invention defines model detection metrics that cover both accuracy and performance, and uses a fitness function with customizable weights for comprehensive quantification. This provides a clear, flexible, and comprehensive evaluation standard for the entire hyperparameter optimization process, enabling the algorithm to find the optimal balance between the model's detection accuracy and operating efficiency based on preset priorities. This ensures that the final CAN bus intrusion detection model not only has good detection performance but also effectively meets the performance requirements of actual deployment environments.
[0053] Based on any of the above embodiments, the CAN bus intrusion detection model is constructed based on a multi-layer convolutional network; The hyperparameters of the candidate model include the number of output channels per convolutional layer, the kernel size, the dilation coefficient, and the dropout rate.
[0054] It should be noted that since the communication data on the agricultural machinery CAN bus is essentially a sequence of messages arranged in chronological order, a preferred implementation is to use a temporal convolutional network as the main architecture of the model. This temporal convolutional network can effectively capture long-term dependencies in time-series data, while also supporting parallel computing and high processing speed, making it very suitable for analyzing CAN message sequences to detect attack patterns hidden in the time dimension.
[0055] Accordingly, for this type of CAN bus intrusion detection model based on multi-layer convolutional networks, the candidate model hyperparameters can specifically include the following parameters that have a decisive impact on the model structure and performance: the number of output channels per convolutional layer, the size of the convolutional kernel, the dilation coefficient, and the dropout rate.
[0056] Based on any of the above embodiments Figure 2 This is the second flowchart illustrating the hyperparameter adjustment method for the CAN bus intrusion detection model provided by this invention. Figure 2 As shown, the method includes: In the initial stage of the optimization process, the Latin hypercube sampling method is first used to initialize the population. This ensures that the initial population has good diversity, enabling extensive exploration of the entire search space from the outset. This effectively avoids search bias or premature entry into local optima due to overly concentrated initial points. Simultaneously, at this stage, the basic operating parameters of the algorithm need to be set, such as the population size M (i.e., the total number of individuals) and the maximum number of iterations G. Individual positions are then randomly initialized.
[0057] Next, we enter the main loop of iterative optimization. This loop iterates continuously until the termination condition is met. In each iteration, the performance of the hyperparameter combination scheme represented by each individual in the current population is first evaluated, i.e., the fitness value of each individual is calculated. Based on the calculated fitness values of all individuals, they are sorted, and the global optimal solution up to the current iteration is found and recorded, i.e., the global optimal solution is updated. This global optimal solution will serve as an important reference target for other individuals to update their positions in this iteration.
[0058] Next, after obtaining the global optimal solution for this round, the golden sine strategy is applied to update the position. This guides each individual to move towards the currently known global optimal position, but the movement is not a simple linear approach. Instead, by introducing the golden ratio and the sine function, the update pace of the individual has a non-linear periodic perturbation.
[0059] Following this, based on the updated position of the Golden Sine Strategy, a further approach based on... The distributed perturbation updates the position. By randomly perturbing with large steps, some individuals can successfully jump out of the gravitational range of the region and explore other distant regions in the search space where there may be better solutions. This enhances the algorithm's global search capability and its robustness in avoiding getting trapped in local optima.
[0060] After the position update is completed, the fitness values of these individuals in their new positions need to be recalculated to evaluate the effectiveness of the update. Then, the program proceeds to the loop's decision-making phase: it checks whether the current iteration count has reached the preset maximum iteration count G. If not, the program returns to the step of calculating individual fitness values and updating the global optimum, starting a new round of iterative optimization; if the maximum iteration count has been reached, the search process is considered sufficient, the loop terminates, and the optimal solution is output.
[0061] This invention presents a hyperparameter tuning method for a CAN bus intrusion detection model based on an improved kingfisher optimization algorithm. This method boasts a high degree of automation, effectively reducing the time and labor intensity of manual parameter tuning. It achieves this by introducing Latin hypercube sampling, a golden sine strategy, and... Multiple optimization mechanisms, including stable distributed perturbation, significantly improve the algorithm's global search capability and ability to escape local optima, ensuring the efficiency and stability of the hyperparameter tuning process. Simultaneously, this method fully considers the resource limitations of embedded systems, achieving a detection model that balances high accuracy and low false alarm rate with real-time performance and computational efficiency. Ultimately, the optimized model can more accurately identify complex and variable abnormal communication behaviors on the CAN bus, greatly enhancing the safety protection capabilities of agricultural machinery and demonstrating broad application prospects and significant engineering value.
[0062] Based on any of the above embodiments Figure 3 This is a schematic diagram comparing the convergence curves of the prior art provided by this invention and the hyperparameter adjustment method provided in this application, as shown in the diagram. Figure 3 As shown, Figure 3 This figure compares the convergence curves of the hyperparameter tuning method based on the improved kingfisher optimization algorithm and the basic kingfisher optimization algorithm in this invention. The horizontal axis represents the number of iterations, and the vertical axis represents the objective function value; a lower value indicates a better optimization effect. It can be observed that the improved kingfisher optimization algorithm shows a faster decrease in the objective function value in the early stages of iteration, and the convergence process is more stable, ultimately reaching a lower fitness value, demonstrating superior global search capability and the ability to escape local optima. In contrast, the basic kingfisher optimization algorithm has a slower convergence speed, a limited decrease in fitness, and significant fluctuations, making it prone to getting trapped in local optima. The improved kingfisher optimization algorithm reaches a stable convergence stage after 158 generations, with the fitness value decreasing to 285; while the basic kingfisher optimization algorithm has a higher fitness value of 329. Overall, the improved algorithm reduces the fitness value by 44 and increases the convergence speed by 13.3% compared to the basic algorithm, significantly improving optimization efficiency and effectiveness, making it suitable for hyperparameter tuning tasks in CAN bus intrusion detection models with high real-time requirements. The figure demonstrates that the various improvement strategies proposed in this invention significantly enhance the convergence efficiency and model performance of the optimization algorithm, exhibiting greater practicality and engineering adaptability.
[0063] Based on any of the above embodiments Figure 4 This is a flowchart illustrating the training method for the CAN bus intrusion detection model provided by the present invention, as shown below. Figure 4 As shown, the method includes: Step 410: Obtain sample bus communication data and an initial CAN bus intrusion detection model; the initial CAN bus intrusion detection model is obtained based on the hyperparameter adjustment method of the CAN bus intrusion detection model described above.
[0064] Here, the initial CAN bus intrusion detection model refers to a model whose architecture and hyperparameters have been optimized and determined using the hyperparameter tuning method described in any of the aforementioned embodiments. This model can be understood as an initial model with optimal potential, whose internal learnable parameters, such as weights, have not yet been trained and are in a state of uncertainty. It is obtained by directly applying the optimal hyperparameter combination output by the aforementioned hyperparameter tuning method to construct the network structure.
[0065] Specifically, normal CAN communication messages covering various operating conditions can be collected from real agricultural machinery or highly simulated environments. Based on this, various known network attack traffic types are injected through simulation, such as denial-of-service attacks causing bus paralysis, obfuscation attacks that corrupt data formats, and deception attacks that forge critical instructions, forming a comprehensive dataset containing normal samples and diverse attack samples. Subsequently, all message data in the dataset is precisely labeled and divided according to industry standards into a training set for learning, a validation set for process monitoring, and a test set for final evaluation.
[0066] Step 420: Based on the sample bus communication data, perform parameter iteration on the initial CAN bus intrusion detection model to obtain the final CAN bus intrusion detection model.
[0067] Specifically, the training set data prepared in the previous step can be used to repeatedly adjust and optimize the learnable parameters within the model, such as the weight matrix and bias terms of the convolutional kernel, through algorithms such as backpropagation and gradient descent, instead of the hyperparameters already determined in the preceding steps. Thus, the final CAN bus intrusion detection model obtained here is a finished model that has undergone sufficient parameter iteration, with its internal parameters converging to the optimal state, enabling it to stably and accurately perform intrusion detection tasks.
[0068] It should be noted that the parameter iteration of the initial CAN bus intrusion detection model is implemented as follows: First, the training set data can be input into the initial CAN bus intrusion detection model in batches. The model performs forward propagation calculations and outputs the predicted classification results for that batch of data. Next, the error between the predicted result and the true label is calculated using a loss function. This error guides the optimizer to fine-tune all the learnable parameters of the model in reverse, making the error generated by the model tend to be smaller in the next prediction. By repeating this input-prediction-error calculation-parameter fine-tuning process, the model's performance on the validation set reaches its optimal state. At this point, the training process terminates, the internal parameters of the model are fixed, and the final CAN bus intrusion detection model is obtained.
[0069] The method provided in this invention, by combining iterative updates with a golden sine strategy, not only significantly reduces the complexity and time cost of manual parameter tuning but also increases the randomness and leaps in position updates. This helps the algorithm escape local extremum traps, thereby exploring potential better solutions in a wider range. This effectively improves the global search capability and convergence efficiency of the optimization algorithm, ultimately resulting in a higher-performance CAN bus intrusion detection model to meet the high network security requirements of agricultural machinery operating in complex environments. In other words, it first ensures that the training object is the optimal initial model obtained based on the optimization algorithm, and then uses high-quality sample data to perform sufficient parameter iteration, thereby stably training a final intrusion detection model with high detection accuracy, strong generalization ability, and reliable deployment in actual agricultural machinery environments.
[0070] In one embodiment, Figure 5 This is a flowchart illustrating the deployment method of the CAN bus intrusion detection model provided by the present invention, as shown below. Figure 5 As shown, the method includes: Step 510: Collect agricultural machinery CAN bus communication data and construct an initial intrusion detection model with a temporal convolutional network structure.
[0071] Step 520: Construct the search space for the hyperparameters of the model to be optimized. These hyperparameters include: the number of output channels per convolutional layer (num_channels); the size of the one-dimensional convolutional kernel (kernel_size); the dilation rates (dilation coefficients); and the dropout rate after each convolutional layer. Specifically, num_channels is the sequence of channel counts for the three convolutional layers, set to [64, 64, 64]; kernel_size is the size of the one-dimensional convolutional kernel, with a value of 3; dilation rates are the sequence of dilation coefficients, set to [1, 2, 4], with a length consistent with the number of layers (num_channels); and dropout is the overfitting prevention ratio, initially set to 0.2.
[0072] Step 530: Improve the kingfisher optimization algorithm by automatically searching and combining hyperparameters. Specifically, an improved intelligent optimization strategy is used to automatically search and combine the hyperparameters. This optimization strategy includes: initializing the population using the Latin hypercube sampling method to improve the coverage uniformity of the search space; introducing a golden sine strategy after the symbiotic phase of the kingfisher optimization algorithm to enhance the global search capability of the population; and introducing [a specific strategy] during the individual update process. Stable distribution of random numbers is used to enhance the ability to escape local optima.
[0073] Step 540: Based on the optimization results, train the intrusion detection model and deploy it in the agricultural machinery embedded system to realize real-time CAN anomaly identification and early warning.
[0074] It should be noted that the method provided by this invention aims to achieve efficient hyperparameter adjustment of the intrusion detection model through intelligent optimization technology, thereby improving detection accuracy, real-time performance, and system computational efficiency. This method first collects normal and abnormal communication message data in real time through the agricultural machinery CAN bus interface, and after preprocessing, inputs it into an intrusion detection model based on a temporal convolutional network (TCN). Subsequently, the key hyperparameters of the TCN model are mapped to individual positions in a high-dimensional search space, and an improved kingfisher optimization algorithm is used to achieve automatic search and optimization of hyperparameters. The optimization algorithm introduces Latin hypercube sampling to ensure uniform coverage of the search space, combined with a golden sine strategy and... Stable distributed perturbations enhance global search capabilities and the ability to escape local optima. After optimization, the intrusion detection model is retrained using optimal hyperparameters and deployed on an agricultural machinery embedded platform to achieve real-time anomaly monitoring and early warning of CAN bus data. This method significantly improves the model's convergence speed and detection performance, adapts to diverse agricultural machinery operating environments and hardware platform requirements, and possesses strong practical value and promising prospects for widespread application.
[0075] In another embodiment, Figure 6 This is a schematic diagram of the embedded device structure of the agricultural machinery CAN bus intrusion detection system provided by the present invention, as shown below. Figure 6 As shown, the system includes: a data acquisition module, a model training module, a hyperparameter optimization module, and a model deployment module; the hyperparameter optimization module is used to execute the hyperparameter adjustment method of the CAN bus intrusion detection model in the above embodiment; the model deployment module embeds the trained CAN bus intrusion detection model into the agricultural machinery control terminal to realize real-time anomaly detection of CAN bus communication.
[0076] The processor module can be a high-performance, low-power processor for embedded devices, such as an ARM Cortex series multi-core CPU, or an edge computing module such as NVIDIA Jetson Xavier or Jetson AGX Orin. This processor is responsible for executing intrusion detection model inference and improving the kingfisher optimization algorithm, ensuring the real-time performance and accuracy of data processing and hyperparameter tuning. The processor features hardware floating-point acceleration and multi-threaded parallel processing capabilities, effectively reducing inference latency.
[0077] The storage module includes high-speed flash memory (such as eMMC or SSD) and RAM, used to store trained model weights, optimization algorithm code, historical data cache, and runtime temporary data. The storage system design must support fast read and write access to ensure the continuity and stability of inference and optimization algorithm operation. Furthermore, the storage module supports firmware upgrades and model updates, facilitating remote maintenance and online optimization.
[0078] The CAN communication interface refers to a dedicated CAN controller and physical layer interface module that enables high-speed bidirectional communication with the agricultural machinery's CAN bus. The interface module is responsible for real-time acquisition of CAN data frames, supporting multiple protocol formats such as standard CAN and CAN FD, ensuring compatibility with various agricultural machinery control networks. The interface design features strong anti-interference capabilities and stable signals, meeting the communication reliability requirements of complex agricultural environments.
[0079] The sensor interface supports data input from various agricultural sensors, such as GPS, IMU, and environmental sensors, enriching environmental perception information. This module communicates with sensors through multiple interfaces including serial port, SPI, and I2C to achieve real-time data acquisition and synchronization, enhancing the overall intelligent sensing capabilities of the system.
[0080] The power management module integrates voltage regulation, overcurrent protection, and electromagnetic compatibility (EMC) measures to ensure the power supply stability and anti-interference performance of embedded devices under the changing operating conditions of agricultural machinery, thereby extending the equipment's lifespan.
[0081] The software architecture includes: the device runs a Linux embedded operating system, supporting the scheduling of model inference engines (TensorRT, ONNX Runtime, etc.) and optimization algorithms. Software modules achieve efficient data interaction through message queues or shared memory, ensuring seamless collaboration between data acquisition, analysis, and decision-making processes.
[0082] The real-time data processing flow includes: the acquisition module receives real-time messages via the CAN interface; after preprocessing, the data enters the TCN model for inference and judgment. The inference results trigger an anomaly alarm mechanism or a security warning. The optimization module periodically adjusts the model's hyperparameters based on new data, automatically optimizing the kingfisher algorithm to continuously improve detection performance. This dynamic optimization mechanism ensures the model adapts to environmental changes during operation, achieving continuous self-improvement.
[0083] It should be noted that the embedded device supports multiple communication methods such as Ethernet, Wi-Fi, and 4G / 5G, enabling remote data transmission and cloud management, facilitating fault diagnosis and model updates. Furthermore, the device reserves expansion interfaces to support future functional expansion and hardware upgrades.
[0084] This embedded device architecture combines efficient hardware and software resource management with advanced intelligent algorithms to meet the high real-time, high stability, and low power consumption requirements of agricultural machinery field operations for safety monitoring. The device can adapt to harsh environments such as high temperatures, dust, and high vibration, ensuring the continuous, safe, and stable operation of the agricultural machinery's CAN bus.
[0085] Based on any of the above embodiments Figure 7 This is a schematic diagram of the hyperparameter adjustment device for the CAN bus intrusion detection model provided by the present invention. As shown in the figure, the device includes: Initialization unit 710 performs initial sampling of the candidate model hyperparameters of the CAN bus intrusion detection model to determine the initial position of the individual. The optimization unit 720 uses the initial position as the optimization space and selects the optimal position from the optimization space based on the fitness value of each position in the optimization space. The position update unit 730 updates the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual. The iterative output unit 740 uses the updated position as the optimization space for the next round, and repeatedly executes the optimization unit and the position update unit until the iteration round meets the preset conditions. Based on the hyperparameter combination corresponding to the optimal position in the last round, the CAN bus intrusion detection model is constructed.
[0086] The device proposed in this invention, by combining iterative updates with the golden sine strategy, not only significantly reduces the complexity and time cost of manual parameter tuning, but also increases the randomness and leap of position updates, which helps the algorithm escape local extremum traps and explore potential better solutions in a wider range. This effectively improves the global search capability and convergence efficiency of the optimization algorithm, ultimately enabling the acquisition of a CAN bus intrusion detection model with better performance to meet the high network security requirements of agricultural machinery in complex operating environments.
[0087] Based on any of the above embodiments, the location update unit is specifically used for: Based on the optimal position, the golden ratio, and the sine function, the positions of each position in the optimization space are updated to obtain the initial optimized individual position; based on A stable distribution is established, and the initial optimized individual position is updated to obtain the updated position of the individual.
[0088] Based on any of the above embodiments, the initialization unit is specifically used for: Based on the hyperparameters of the candidate models, a search space is constructed. The initial position is obtained by uniformly sampling the search space based on the Latin hypercube sampling method.
[0089] Based on any of the above embodiments, the optimization unit is specifically used for: Obtain the model detection index of the CAN bus intrusion detection model after applying the hyperparameter combinations corresponding to each position; the model detection index includes at least one of detection accuracy and detection performance; Based on the model detection index and fitness function, the fitness value at each position is calculated.
[0090] Based on any of the above embodiments, the CAN bus intrusion detection model is constructed based on a multi-layer convolutional network; The hyperparameters of the candidate model include the number of output channels per convolutional layer, the kernel size, the dilation coefficient, and the dropout rate.
[0091] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute the hyperparameter adjustment method of the CAN bus intrusion detection model. The method includes: step S1, initial sampling of the hyperparameters of the candidate models of the CAN bus intrusion detection model to determine the initial position of the individual; step S2, using the initial position as the optimization space, selecting the optimal position from the optimization space based on the fitness value of each position in the optimization space; step S3, updating the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual; step S4, using the updated position as the optimization space for the next round, repeating steps S2 and S3 until the iteration round meets the preset conditions, and constructing the CAN bus intrusion detection model based on the hyperparameter combination corresponding to the optimal position in the last round.
[0092] A training method for a CAN bus intrusion detection model can also be implemented, the method including: acquiring sample bus communication data and an initial CAN bus intrusion detection model; the initial CAN bus intrusion detection model is obtained based on the hyperparameter adjustment method of the CAN bus intrusion detection model described above; based on the sample bus communication data, the initial CAN bus intrusion detection model is iterated to obtain the final CAN bus intrusion detection model.
[0093] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a 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 the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0094] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the hyperparameter adjustment method of the CAN bus intrusion detection model provided by the above methods. The method includes: step S1, initial sampling of the hyperparameters of the candidate model of the CAN bus intrusion detection model to determine the initial position of an individual; step S2, using the initial position as an optimization space, selecting the optimal position from the optimization space based on the fitness value of each position in the optimization space; step S3, updating the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual; step S4, using the updated position as the optimization space for the next round, repeating steps S2 and S3 until the iteration round meets the preset conditions, and constructing the CAN bus intrusion detection model based on the hyperparameter combination corresponding to the optimal position in the last round.
[0095] A training method for a CAN bus intrusion detection model can also be implemented, the method including: acquiring sample bus communication data and an initial CAN bus intrusion detection model; the initial CAN bus intrusion detection model is obtained based on the hyperparameter adjustment method of the CAN bus intrusion detection model described above; based on the sample bus communication data, the initial CAN bus intrusion detection model is iterated to obtain the final CAN bus intrusion detection model.
[0096] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a hyperparameter adjustment method for the CAN bus intrusion detection model provided by the above methods. The method includes: step S1, initial sampling of the hyperparameters of candidate models of the CAN bus intrusion detection model to determine the initial position of an individual; step S2, using the initial position as an optimization space, selecting the optimal position from the optimization space based on the fitness value of each position in the optimization space; step S3, updating the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual; step S4, using the updated position as the optimization space for the next round, repeating steps S2 and S3 until the iteration round meets the preset conditions, and constructing the CAN bus intrusion detection model based on the hyperparameter combination corresponding to the optimal position in the last round.
[0097] A training method for a CAN bus intrusion detection model can also be implemented, the method including: acquiring sample bus communication data and an initial CAN bus intrusion detection model; the initial CAN bus intrusion detection model is obtained based on the hyperparameter adjustment method of the CAN bus intrusion detection model described above; based on the sample bus communication data, the initial CAN bus intrusion detection model is iterated to obtain the final CAN bus intrusion detection model.
[0098] The device embodiments described above are merely illustrative. 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 network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A hyperparameter adjustment method for a CAN bus intrusion detection model, characterized in that, include: Step S1: Initially sample the hyperparameters of the candidate models for the CAN bus intrusion detection model to determine the initial position of the individual. Step S2: Using the initial position as the optimization space, the optimal position is selected from the optimization space based on the fitness value of each position in the optimization space. Step S3: Based on the optimal position and the golden sine strategy, update the position of each position in the optimization space to obtain the updated position of the individual. Step S4: Use the updated position as the optimization space for the next round, and repeat steps S2 and S3 until the iteration rounds meet the preset conditions. Based on the hyperparameter combination corresponding to the optimal position in the last round, construct the CAN bus intrusion detection model.
2. The hyperparameter adjustment method for the CAN bus intrusion detection model according to claim 1, characterized in that, The step of updating the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual includes: Based on the optimal position, the golden ratio, and the sine function, the positions of each position in the optimization space are updated to obtain the initial optimized individual position; based on A stable distribution is established, and the initial optimized individual position is updated to obtain the updated position of the individual.
3. The hyperparameter adjustment method for the CAN bus intrusion detection model according to claim 1, characterized in that, The initial sampling of the candidate model hyperparameters of the CAN bus intrusion detection model to determine the initial position of an individual includes: Based on the hyperparameters of the candidate models, a search space is constructed. The initial position is obtained by uniformly sampling the search space based on the Latin hypercube sampling method.
4. The hyperparameter adjustment method for the CAN bus intrusion detection model according to any one of claims 1 to 3, characterized in that, The steps for calculating the fitness value at each location in the optimization space include: Obtain the model detection index of the CAN bus intrusion detection model after applying the hyperparameter combinations corresponding to each position; the model detection index includes at least one of detection accuracy and detection performance; Based on the model detection index and fitness function, the fitness value at each position is calculated.
5. The hyperparameter adjustment method for the CAN bus intrusion detection model according to any one of claims 1 to 3, characterized in that, The CAN bus intrusion detection model is constructed based on a multi-layer convolutional network. The hyperparameters of the candidate model include the number of output channels per convolutional layer, the kernel size, the dilation coefficient, and the dropout rate.
6. A training method for a CAN bus intrusion detection model, characterized in that, include: Acquire sample bus communication data and an initial CAN bus intrusion detection model; The initial CAN bus intrusion detection model is obtained based on the hyperparameter adjustment method of the CAN bus intrusion detection model according to any one of claims 1 to 5; Based on the sample bus communication data, the parameters of the initial CAN bus intrusion detection model are iterated to obtain the final CAN bus intrusion detection model.
7. A hyperparameter adjustment device for a CAN bus intrusion detection model, characterized in that, include: The initialization unit performs initial sampling of the candidate model hyperparameters of the CAN bus intrusion detection model to determine the initial position of the individual. The optimization unit uses the initial position as the optimization space and selects the optimal position from the optimization space based on the fitness value of each position in the optimization space. The position update unit updates the position of each position in the optimization space based on the optimal position and the golden sine strategy to obtain the updated position of the individual. The iterative output unit uses the updated position as the optimization space for the next round, and repeatedly executes the optimization unit and the position update unit until the iteration round meets the preset conditions. Based on the hyperparameter combination corresponding to the optimal position in the last round, the CAN bus intrusion detection model is constructed.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the hyperparameter adjustment method of the CAN bus intrusion detection model as described in any one of claims 1 to 5, or the training method of the CAN bus intrusion detection model as described in claim 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the hyperparameter adjustment method of the CAN bus intrusion detection model as described in any one of claims 1 to 5, or the training method of the CAN bus intrusion detection model as described in claim 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the hyperparameter adjustment method of the CAN bus intrusion detection model as described in any one of claims 1 to 5, or the training method of the CAN bus intrusion detection model as described in claim 6.