New energy bus adaptive headlamp light path adjusting method based on ambient light intensity

Through multi-resolution feature extraction and attention mechanism, integrating ambient light intensity characteristics, combining vehicle speed and time information, a double-layer long and short-term memory network and multi-head attention mechanism optical path compensation neural network is used to solve the problem of hysteresis and unstable adjustment of adaptive headlights of new energy buses under complex working conditions, and intelligent optical path adjustment is achieved, improving night driving safety and lighting effects.

CN120270154AActive Publication Date: 2025-07-08CHANGZHOU WENTONG OPTOELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510740446.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-07-08
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

The existing adaptive headlight system for new energy buses has a hysteresis response, unstable adjustment, and inaccurate compensation under complex lighting changes, vehicle acceleration and deceleration, and road bumps, resulting in poor safety in night driving.

Method used

Adaptive headlight path adjustment method based on ambient light intensity is adopted, and ambient light intensity characteristics are integrated through multi-resolution feature extraction and attention mechanism, and a hierarchical prediction is performed by combining vehicle speed and time information. A double-layer long and short-term memory network is used for optical path adjustment, and a multi-head attention mechanism optical path compensation neural network is introduced to process inclination data to realize intelligent adjustment of headlight path.

Benefits of technology

It improves night driving safety, ensures real-time and forward-looking nature of headlight path adjustment, enhances the stability and lighting effect of the system, and improves the driving experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120270154A_ABST
    Figure CN120270154A_ABST
Patent Text Reader

Abstract

The invention provides a new energy bus adaptive headlamp light path adjusting method based on ambient light intensity, and relates to the technical field of intelligent control, and the method comprises the steps: collecting the speed data and timestamp data of a new energy bus, the ambient light intensity data of the front part, and the inclination angle data of a headlamp; inputting the ambient light intensity data into the three parallel feature extraction branches according to different resolutions, performing attention feature fusion of a space dimension and a channel dimension, and performing dynamic calibration to obtain an ambient light intensity feature; forming a feature sequence by the environment light intensity features, the vehicle speed data and the timestamp data, and inputting the feature sequence into a double-layer long-short-term memory network for hierarchical prediction to obtain a target headlamp light path; inputting the inclination angle data into a pre-trained optical path compensation neural network based on a multi-head attention mechanism to obtain an optical path compensation coefficient; and the target headlamp light path is compensated according to the light path compensation coefficient to obtain a compensation light path, the illumination angle of the headlamp is adjusted based on the compensation light path, and the driving safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to intelligent control technology, and particularly to an adaptive headlamp optical path adjustment method for new energy buses based on ambient light intensity. Background Art

[0002] The optical path adjustment of the adaptive headlamp system for new energy buses is crucial for night driving safety. Currently, the mainstream technical solutions use ambient light sensors to detect the light intensity, and combine simple threshold judgment and vehicle speed information to adjust the optical path. This solution has many defects: the extraction of ambient light intensity features is too simple to accurately identify complex lighting scenes; the lighting intensity grading standard is fixed and has poor adaptability; the optical path adjustment strategy lacks forward-looking prediction and the system response lags; the adjustment process is easily affected by instantaneous interference and lacks stability.

[0003] Some improved solutions introduce inclination compensation control and dynamic adjustment mechanism of irradiation angle, but still do not solve the core problems: the inclination compensation model is too simple to adapt to complex working conditions; the compensation parameters are fixed and have limited accuracy and cannot be dynamically adjusted according to the actual situation; there is no effective detection and processing mechanism under abnormal working conditions; the adjustment process oscillates frequently and the driving experience is poor; each subsystem operates independently and lacks a collaborative optimization strategy.

[0004] The problems commonly existing in the prior art result in that the adaptive headlamp system cannot meet the night driving safety requirements of new energy buses. Especially under complex working conditions such as drastic changes in light, frequent acceleration and deceleration of the vehicle, and bumpy road surfaces, problems such as system response lag, unstable adjustment, and inaccurate compensation are more prominent. Summary of the Invention

[0005] The embodiments of the present invention provide an adaptive headlamp optical path adjustment method for new energy buses based on ambient light intensity, which can solve the problems in the prior art.

[0006] In the first aspect of the embodiments of the present invention, an adaptive headlamp optical path adjustment method for new energy buses based on ambient light intensity is provided, including: collecting vehicle speed data, timestamp data, ambient light intensity data at the front part, and inclination angle data of the headlamp of the new energy bus; inputting the ambient light intensity data into three parallel feature extraction branches at different resolutions, each branch including a multi-layer residual convolution structure to obtain a feature map set, performing attention feature fusion in the spatial dimension and channel dimension on the feature map set and performing dynamic calibration to obtain ambient light intensity features; forming a feature sequence by combining the ambient light intensity features with the vehicle speed data and timestamp data, inputting the feature sequence into a double-layer long short-term memory network for hierarchical prediction, and performing multi-factor constraint compensation to obtain the target headlamp optical path, where the hierarchical prediction includes ambient light intensity hierarchical prediction and lighting scene conversion prediction; Input the inclination data into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The multi-head attention mechanism assigns weights to different feature dimensions of the inclination data to obtain an optical path compensation coefficient; Compensate the target headlight optical path according to the optical path compensation coefficient to obtain a compensated optical path, and adjust the headlight irradiation angle based on the compensated optical path.

[0007] In an alternative embodiment, Using a convolutional neural network to extract ambient light intensity features includes: Input the ambient light intensity data into a resolution adaptive evaluation module, calculate the optimal resolution interval based on image sharpness, edge complexity, and illumination change gradient; determine three target resolutions in the optimal resolution interval in a logarithmically spaced manner, and input the ambient light intensity data into three parallel feature extraction branches according to the target resolutions; each feature extraction branch includes: a densely connected residual block for extracting multi-scale local features, a dilated convolutional layer group for enhancing feature expression ability, and a channel recombination module for feature recalibration, and obtain feature atlases with different resolutions through the feature extraction branches; Perform attention feature fusion on the feature atlases in the spatial dimension and the channel dimension, including: generating spatial dimension attention weights to recalibrate the feature maps; extracting global context information in the channel dimension to generate channel weights; progressively fusing the attention features of different resolution features to obtain fused features; Calculate the statistics of the fused features to construct a feature distribution, dynamically update the calibration parameters based on the feature distribution, and use the calibration parameters to calibrate the fused features and perform feedback correction to obtain calibrated ambient light intensity features.

[0008] In an alternative embodiment, Form a feature sequence from the ambient light intensity features, vehicle speed data, and timestamp data, input it into a two-layer long short-term memory network for hierarchical prediction, and perform multi-factor constraint compensation to obtain the target headlight optical path. The hierarchical prediction includes ambient light intensity hierarchical prediction and light scene conversion prediction, including: Form a feature vector from the ambient light intensity features, vehicle speed data, and timestamp data; calculate a speed factor based on the vehicle speed data, calculate a light change variance based on the ambient light intensity features to obtain a light factor, determine the time window length according to the speed factor and the light factor, perform sliding sampling on the feature vector to generate an original feature sequence, calculate the difference between adjacent sampling points of the original feature sequence to obtain a differential feature sequence, and perform a moving average process on the differential feature sequence to obtain a trend feature sequence; Input the original feature sequence and the differential feature sequence into a first long short-term memory network to obtain hidden state information. Calculate attention weights based on the hidden state information and the trend feature sequence for feature fusion, and input the fused features into a second long short-term memory network to obtain the environmental light intensity classification result and the light scene conversion prediction result; Calculate the maximum change constraint based on the vehicle speed data, constrain the environmental light intensity classification result to obtain the basic optical path, perform progressive non-linear adjustment on the basic optical path to generate an intermediate optical path sequence, and classify different types of anomalies through Mahalanobis distance anomaly detection; Calculate the trend factor according to the light scene conversion prediction result, and calculate the speed compensation coefficient based on the vehicle speed data; Perform a multiplication operation on the processed intermediate optical path sequence, the trend factor, and the speed compensation coefficient to obtain the target headlamp optical path.

[0009] In an alternative embodiment, The progressive adjustment and anomaly processing of the basic optical path include: Calculate the difference between the basic optical path and the current optical path, decompose the difference into multiple progressive adjustment amounts according to the preset maximum adjustment step, calculate the transition time of each progressive adjustment amount based on the preset basic transition time, and generate an intermediate optical path sequence during the transition using a non-linear interpolation method; Extract the feature vector of the intermediate optical path sequence; Cluster multiple normal working modes and their mean vectors and covariance matrices based on the Gaussian mixture model within the sliding time window of the historical optical path adjustment sequence; Calculate the Euclidean distance and cosine similarity between the feature vector of the intermediate optical path sequence and each normal working mode, and select the normal working mode with the highest matching degree based on the weighted combination of the Euclidean distance and cosine similarity. Calculate the Mahalanobis distance using the mean vector and covariance matrix of the mode with the highest matching degree; When the Mahalanobis distance exceeds the preset distance threshold, determine the type of anomaly: When a sudden change in light is detected, replace the intermediate optical path sequence with the historical optical path value; When a sensor anomaly is detected, increase the weight of the historical optical path in the intermediate optical path sequence; When continuous oscillation is detected, reduce the amplitude of the progressive adjustment amount; Perform a multiplication operation on the final value of the intermediate optical path sequence after anomaly processing, the trend factor, and the speed compensation coefficient to obtain the target headlamp optical path.

[0010] In an alternative embodiment, Input the tilt data into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The multi-head attention mechanism assigns weights to different feature dimensions of the tilt data to obtain the optical path compensation coefficient, including: Obtain the temporal dimension features and statistical dimension features of the tilt angle data. The temporal dimension features include the first-order difference and acceleration features of the tilt angle sequence, and the statistical dimension features include the moving average, variance, kurtosis coefficient, and trend index; Input the temporal dimension features and statistical dimension features into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The optical path compensation neural network is jointly pre-trained through a tilt angle prediction task, an optical path mapping task, and a contrast learning task. The joint pre-training uses the complexity score of the tilt angle sequence to quantify the difficulty of the training samples and constructs a curriculum learning strategy based on the difficulty score; The multi-head attention mechanism assigns weights to different feature dimensions of the tilt angle data, including: generating query matrices, key matrices, and value matrices, calculating the multi-head attention scores and performing feature fusion, and optimizing the fused features through residual connections; Calculate the importance of temporal features and statistical features based on the output of the multi-head attention mechanism, perform weighted fusion on the features according to the feature importance, and generate a basic compensation value; calculate a compensation adjustment coefficient based on the historical compensation effect and the tilt angle change trend, and perform a multiplication operation on the basic compensation value and the compensation adjustment coefficient to obtain an initial optical path compensation coefficient; construct an adaptive prediction interval based on the periodic analysis result of the headlight tilt angle change pattern, respond quickly when the change of the compensation coefficient falls within the prediction interval, perform progressive adjustment based on the change trend when the change exceeds the prediction interval, and dynamically update the prediction interval boundary in combination with the statistical features of the historical compensation sequence to obtain the final optical path compensation coefficient.

[0011] In an optional implementation manner, The joint pre-training of the optical path compensation neural network through the tilt angle prediction task, the optical path mapping task, and the contrast learning task includes: The pre-training process of the optical path compensation neural network includes: constructing a hierarchical teacher network for tilt angle dynamic features, optical path mapping relationships, and tilt angle sequence prediction, and performing pre-training through feature-level and decision-level knowledge distillation and self-distillation mechanisms at different time scales; using the complexity score of the tilt angle sequence to quantify the difficulty of the training samples, constructing a curriculum learning strategy based on the difficulty score, and introducing random masking, temporal perturbation, and feature recombination to generate multi-view enhanced samples; Calculate the mutual information between the tilt angle prediction task, the optical path mapping task, and the contrast learning task, dynamically adjust the task weights based on the mutual information and task performance, and introduce prediction uncertainty estimation, mapping reliability evaluation, and feature consistency verification as complementary tasks; calculate the prediction confidence for the training samples of each task, input the training samples with a confidence lower than the preset confidence into the auxiliary branch network for feature enhancement learning, and re-input the enhanced features into the backbone network; Calculate the performance score based on compensation accuracy and system stability, perform sensitivity analysis on network parameters according to the performance score, store the feature patterns of compensation samples with performance scores exceeding the preset score threshold in the memory bank, and dynamically adjust the network parameters based on the feature patterns in the memory bank.

[0012] In an alternative embodiment, Compensate the target headlight optical path according to the optical path compensation coefficient to obtain the compensated optical path. Adjusting the headlight irradiation angle based on the compensated optical path includes: Perform a multiplication operation on the optical path compensation coefficient and the target headlight optical path to obtain the initial compensated optical path, and calculate the unit time change rate and change acceleration of the initial compensated optical path to construct a dynamic response curve; Calculate the smoothness index and urgency index of the compensated optical path change based on the dynamic response curve. The smoothness index characterizes the continuous change characteristic of the compensated optical path, and the urgency index characterizes the mutation degree of the compensated optical path; select the adjustment response mode according to the smoothness index and urgency index. The adjustment response mode includes a fast response mode and a progressive response mode; when the fast response mode is selected, map the initial compensated optical path to an irradiation angle adjustment instruction; when the progressive response mode is selected, calculate the segmented adjustment sequence of the irradiation angle based on the change trend of the initial compensated optical path, and map the segmented adjustment sequence to the irradiation angle adjustment instruction according to the preset adjustment step size; Collect the actual angle data during the irradiation angle adjustment process, calculate the deviation between the actual angle and the target angle, input the deviation into the adaptive corrector to generate an irradiation angle compensation amount, and correct the subsequent angle adjustment instructions based on the irradiation angle compensation amount.

[0013] In the second aspect of the embodiments of the present invention, Provide an electronic device, including: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to call the instructions stored in the memory to execute the method described above.

[0014] In the third aspect of the embodiments of the present invention, Provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method described above is implemented.

[0015] The adaptive headlight optical path adjustment method for new energy buses based on ambient light intensity provided by the present invention combines ambient light intensity features through multi-resolution feature extraction and attention mechanism, and performs hierarchical prediction in combination with vehicle speed and time information, realizing intelligent adjustment of the headlight optical path and effectively improving the safety of night driving.

[0016] The present invention uses a double-layer long short-term memory network to hierarchically predict the ambient light intensity characteristics, which can accurately identify different lighting scenarios and predict the trend of scenario conversion, enabling the headlamp optical path adjustment to not only adapt to the current environment but also anticipate upcoming lighting changes in advance, enhancing the real-time performance and forward-looking nature of the system.

[0017] The present invention introduces an optical path compensation neural network based on the multi-head attention mechanism to process the inclination data and generate compensation coefficients, solving the problem of the headlamp irradiation angle deviation caused by road condition changes in the vehicle, ensuring the accuracy and stability of the headlamp irradiation, and improving the overall lighting effect and driving experience. Description of the Drawings

[0018] Figure 1 is a schematic flowchart of the adaptive headlamp optical path adjustment method for new energy buses based on ambient light intensity according to an embodiment of the present invention; Figure 2 is a comparative analysis chart of the feature extraction performance between the present invention and the prior art; Figure 3 is a comparative chart of the compensation effects under different road conditions; Figure 4 is a diagram of the real-time optical path adjustment process of the present invention. Detailed Embodiments

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0020] The technical solutions of the present invention will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0021] Figure 1 is a schematic flowchart of the adaptive headlamp optical path adjustment method for new energy buses based on ambient light intensity according to an embodiment of the present invention, as Figure 1 shown, the method includes: Collect the vehicle speed data, timestamp data, ambient light intensity data in the front part, and inclination data of the headlamps of the new energy bus; Input the ambient light intensity data into three parallel feature extraction branches at different resolutions. Each branch includes a multi-layer residual convolution structure to obtain a feature map set. Perform attention feature fusion in the spatial and channel dimensions on the feature map set and perform dynamic calibration to obtain the ambient light intensity feature. Combine the ambient light intensity feature with the vehicle speed data and timestamp data to form a feature sequence, input it into a two-layer long short-term memory network for hierarchical prediction, and perform multi-factor constraint compensation to obtain the target headlight optical path. The hierarchical prediction includes ambient light intensity hierarchical prediction and light scene conversion prediction. Input the tilt angle data into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The multi-head attention mechanism assigns weights to different feature dimensions of the tilt angle data to obtain the optical path compensation coefficient. Compensate the target headlight optical path according to the optical path compensation coefficient to obtain the compensated optical path, and adjust the headlight irradiation angle based on the compensated optical path.

[0022] In an optional implementation manner, using a convolutional neural network to extract the ambient light intensity feature includes: Input the ambient light intensity data into a resolution adaptive evaluation module, calculate the optimal resolution interval based on image clarity, edge complexity, and light change gradient. Determine three target resolutions in a logarithmic interval within the optimal resolution interval, and input the ambient light intensity data into three parallel feature extraction branches according to the target resolutions. Each feature extraction branch includes: a densely connected residual block for extracting multi-scale local features, a dilated convolution layer group for enhancing feature expression ability, and a channel recombination module for feature recalibration. Obtain feature map sets with different resolutions through the feature extraction branches. Performing attention feature fusion in the spatial and channel dimensions on the feature map set includes: generating spatial dimension attention weights to recalibrate the feature map; extracting channel dimension global context information to generate channel weights; progressively fusing the attention features of different resolution features to obtain the fused feature. Calculate the statistics of the fused feature to construct a feature distribution, dynamically update the calibration parameters based on the feature distribution, use the calibration parameters to calibrate the fused feature and perform feedback correction to obtain the calibrated ambient light intensity feature.

[0023] Exemplarily, the ambient light intensity data is input into the resolution adaptive evaluation module for processing. This module mainly evaluates the input ambient light intensity data based on three key metrics: image clarity, edge complexity, and illumination change gradient. The image clarity is calculated through the Laplace operator, the edge complexity is obtained by extracting edge pixel points through the Sobel edge detector and calculating their density, and the illumination change gradient is determined by calculating the statistical distribution of the light intensity difference between adjacent regions. In specific implementation, the input ambient light intensity image is scanned with a sliding window of 30×30 pixels, the window overlap rate is set to 50%, the above three metrics are calculated within each window, and a weighted method with weights [0.4, 0.3, 0.3] is used to obtain a comprehensive score. Based on this score, a resolution-score curve is constructed, and the optimal resolution range is determined by detecting the turning point of the curve. For example, when the input ambient light intensity data is at a resolution of 1920×1080, the possible optimal resolution range obtained through evaluation is [480×270, 960×540]. After determining the optimal resolution range, three target resolutions are determined in a logarithmic interval manner. Assuming the optimal resolution range is [Rmin, Rmax], the three target resolutions R1, R2, and R3 can be calculated as follows: the interval is converted to the logarithmic space, uniformly sampled in the logarithmic space, and then converted back to the original space. Taking the interval [480×270, 960×540] in the above example as an example, the three calculated target resolutions may be 480×270, 675×380, and 960×540. This logarithmic interval sampling method can provide denser sampling in the lower resolution region, adapting to the characteristic that the human eye is more sensitive to low-resolution changes.

[0024] The ambient light intensity data is resized according to the determined three target resolutions respectively, and then input into three parallel feature extraction branches. Each feature extraction branch contains the same network structure but processes inputs of different resolutions. Each feature extraction branch includes three key components: The first component is the densely connected residual block, which is used to extract multi-scale local features. Each densely connected residual block contains 4 convolutional units, each convolutional unit contains two layers of 3×3 convolutional layers, and the activation function uses ReLU. The densely connected method enables each convolutional unit to receive not only the output of the previous unit but also the outputs of all previous units as inputs. For example, for the third convolutional unit, its input includes the original input features and the output features of the first and second convolutional units. To avoid excessive growth of the number of features, a 1×1 convolutional layer is set at the end of each densely connected residual block to compress the number of feature channels to 256. The densely connected residual block can effectively capture local features under different receptive fields and enhance the model's adaptability to multi-scale illumination changes.

[0025] The second component is the dilated convolutional layer group, which is used to enhance the feature expression ability. This layer group contains 3 parallel dilated convolutional layers with dilation rates set to 1, 2, and 4 respectively, the convolutional kernel size is 3×3 for all, and the number of output channels is 128. Dilated convolution can expand the receptive field without increasing the number of parameters, and is particularly effective for capturing illumination patterns at different scales. The outputs of the three parallel dilated convolutional layers are concatenated along the channel dimension to form a feature map with 384 channels.

[0026] The third component is the channel reconfiguration module, which is used for feature recalibration. This module first compresses the feature map into a channel descriptor through global average pooling, then learns the dependencies between channels through two fully-connected layers (the first layer reduces the number of channels to 1 / 16 of the original, and the second layer restores the original number of channels), and finally generates channel weights through the Sigmoid activation function and multiplies them with the original features to complete the recalibration. For example, when the number of input feature channels is 384, the number of channels in the intermediate layer is 24, and the output is still the weight coefficients with 384 channels.

[0027] Through the cascaded processing of the above three components, each branch finally outputs a feature map, corresponding to the environmental light intensity feature expressions at three different resolutions respectively. For an input with a resolution of 480×270, the size of the finally output feature map is 60×34 and the number of channels is 256; for an input with a resolution of 675×380, the size of the output feature map is 84×48 and the number of channels is 256; for an input with a resolution of 960×540, the size of the output feature map is 120×68 and the number of channels is 256.

[0028] Perform attention feature fusion on the spatial and channel dimensions of three feature maps. First, generate spatial dimension attention weights to recalibrate the feature maps. The specific method is to extract spatial information through two layers of 3×3 convolutions, and then generate a spatial attention weight map through the Sigmoid function. The weight range is [0, 1]. This weight map reflects the importance of different spatial positions. For example, the area near the street lamp may obtain a higher weight (such as 0.8 - 0.9), while background areas such as the sky or the ground obtain a lower weight (such as 0.1 - 0.3). At the same time, extract the global context information of the channel dimension to generate channel weights. The specific operation is as follows: perform global average pooling on each channel to obtain a channel descriptor, then capture the dependencies between channels through two fully connected layers (channel compression ratio is 4), and finally generate channel weights through the Sigmoid function. For example, for a feature map with 256 channels, in the obtained channel weights, the channels representing edge information may obtain higher weights (such as 0.7 - 0.95), while the channels representing texture information have lower weights (such as 0.3 - 0.5). After applying the attention mechanisms of the spatial and channel dimensions to the three feature maps with different resolutions, perform progressive feature fusion. First, upsample the low-resolution features (60×34) to medium resolution (84×48) through bilinear interpolation and fuse them with the medium-resolution features with weighted fusion. The fusion weights are dynamically assigned according to the confidence of the features. Usually, the weight of the low-resolution features is 0.4, and the weight of the medium-resolution features is 0.6. Then, upsample the fused features to high resolution (120×68) again and perform a similar weighted fusion with the high-resolution features. At this time, the fusion weights may be 0.5 for the former and 0.5 for the latter. This progressive fusion strategy can make full use of the advantages of features with different resolutions. Low-resolution features usually contain more global information, while high-resolution features retain more details.

[0029] Calculate statistics based on the fused features to construct a feature distribution, mainly including statistical indicators such as channel mean, variance, maximum value, and minimum value. For example, for the features of a certain channel, the mean may be 0.45, the variance may be 0.18, the maximum value may be 0.92, and the minimum value may be 0.08. Based on these statistics, dynamically update the calibration parameters α and β to make the calibrated feature mean close to 0.5 and the variance close to 0.25, enhancing the discriminability of the features. The specific calibration process is: apply the transformation F'=(F - μ) / σ×β + α to the fused feature F, where μ and σ are the mean and standard deviation of the feature respectively, and α and β are the dynamically updated calibration parameters.

[0030] The initial values of the calibration parameters are set as α = 0.5 and β = 0.25, and they are dynamically adjusted according to historical data during the processing. For example, if the current feature mean is lower than the target value (0.5), the value of α is increased; if the feature variance is too small, the value of β is increased. The adjustment step size is set to 0.01, and upper and lower bound constraints are set such that α ∈ [0.3, 0.7] and β ∈ [0.15, 0.35]. The calibrated features are subjected to feedback correction, that is, the calibrated features are connected residually with the original features to ensure that the original information is not lost. Finally, the calibrated ambient light intensity features are obtained, which not only retain the advantages of multi-resolution information but also enhance the feature expression ability and distinctiveness through distribution calibration.

[0031] In the prior art, the extraction of ambient light intensity features usually processes with a fixed resolution and cannot adapt to the best perception requirements in different scenarios. In view of the above problems, this application proposes a multi-resolution processing scheme based on resolution adaptive evaluation. The target resolution is determined by logarithmic intervals, which improves the feature extraction efficiency; a feature extraction structure combining dense connection residual blocks and dilated convolutions is designed to enhance the feature expression ability; a progressive feature fusion strategy introducing spatial and channel dual attention mechanisms is introduced to achieve refined feature fusion; finally, through the feature distribution dynamic calibration and feedback correction mechanism, the stability and distinctiveness of the features are improved.

[0032] Figure 2 This is a comparative analysis chart of the feature extraction performance between the present invention and the prior art. The chart shows the comparison results of the method of the present invention with traditional CNN and ResNet50 in terms of feature extraction performance. The abscissa represents the calculation time (unit: millisecond), and the ordinate represents the accuracy rate (unit: percentage). The three methods are marked with different shapes: the hollow square (□) represents traditional CNN, the triangle (△) represents ResNet50, and the hollow circle (○) represents the present invention. The method of the present invention is significantly superior to the comparative methods at each time point. Specifically, compared with traditional CNN, the accuracy rate of the present invention is on average increased by 7.7 percentage points under the same calculation time; compared with ResNet50, the accuracy rate is on average increased by 3.4 percentage points. At the same time, the slope of the performance improvement curve of the method of the present invention is larger, indicating that it has obvious advantages in calculation efficiency. Especially when the calculation time is short (within 20 ms), the method of the present invention can achieve a high accuracy rate (90.2%), which is of great significance for the real-time processing requirements in practical applications.

[0033] In an optional implementation manner, the ambient light intensity features, vehicle speed data, and timestamp data are combined into a feature sequence and input into a double-layer long short-term memory network for hierarchical prediction, and multi-factor constraint compensation is performed to obtain the target headlight optical path. The hierarchical prediction includes ambient light intensity hierarchical prediction and light scene conversion prediction, including: Combine the ambient light intensity feature with the vehicle speed data and timestamp data to form a feature vector; calculate a speed factor based on the vehicle speed data, calculate the variance of the light intensity change based on the ambient light intensity feature to obtain a light factor, determine the time window length according to the speed factor and the light factor, perform sliding sampling on the feature vector to generate an original feature sequence, calculate the difference between adjacent sampling points of the original feature sequence to obtain a differential feature sequence, and perform a moving average process on the differential feature sequence to obtain a trend feature sequence; Input the original feature sequence and the differential feature sequence into a first long short-term memory network to obtain hidden state information, calculate attention weights based on the hidden state information and the trend feature sequence for feature fusion, and input the fused features into a second long short-term memory network to obtain the ambient light intensity classification result and the light scene transition prediction result; Calculate the maximum change constraint based on the vehicle speed data, constrain the ambient light intensity classification result to obtain a basic light path, perform progressive non-linear adjustment on the basic light path to generate an intermediate light path sequence, and classify different types of anomalies through Mahalanobis distance anomaly detection; calculate a trend factor based on the light scene transition prediction result, and calculate a speed compensation coefficient based on the vehicle speed data; perform a product operation on the processed intermediate light path sequence, the trend factor, and the speed compensation coefficient to obtain the target headlight light path.

[0034] Exemplarily, obtain the ambient light intensity feature, vehicle speed data, and timestamp data, and construct a feature sequence. The ambient light intensity feature is collected by a light intensity sensor in the front of the vehicle, and the numerical range is 0 - 100000 lux; the vehicle speed data is obtained from the vehicle CAN bus, and the range is 0 - 200 km / h; the timestamp data is the current sampling time, accurate to the second, and these three types of data are combined into a feature vector. Calculate the speed factor based on the vehicle speed data. When the vehicle speed is lower than 30 km / h, the speed factor is set to 0.5; when the vehicle speed is between 30 km / h and 60 km / h, the speed factor is 0.8; when the vehicle speed is higher than 60 km / h, the speed factor is 1.0. Calculate the variance of the light intensity change based on the ambient light intensity feature to obtain the light factor, and divide the standard deviation of the ambient light intensity of the nearest 10 sampling points by 1000. For example, when the standard deviation is 5000, the light factor is 5.0. The time window length is equal to the basic window length of 30 multiplied by the speed factor and then multiplied by the light factor. For example, when the speed factor is 0.8 and the light factor is 5.0, the time window length is 120 sampling points.

[0035] The eigenvector is sampled slidingly to generate the original feature sequence. The sampling interval is 0.5 seconds and it slides according to the calculated time window length. For example, when the window length is 120, the original feature sequence contains data of 120 sampling points. The difference between adjacent sampling points of the original feature sequence is calculated to obtain the differential feature sequence. For example, for the ambient light intensity feature [85000, 84500, 84000], the corresponding differential feature is [-500, -500]. The 5-point moving average processing is adopted for the differential feature sequence to obtain the trend feature sequence, that is, the average value of every 5 consecutive points forms a new sequence.

[0036] The first long short-term memory network consists of 64 memory units. The original feature sequence and the differential feature sequence are input into the first long short-term memory network to obtain the hidden state information, and the dimension of the hidden state information is 64. The attention weights are calculated based on the hidden state information and the trend feature sequence. The calculation method of the attention weights is to assign a weight value between 0 and 1 to each element in the trend feature sequence, and the sum of the weights is 1. For example, for the trend feature of 5 elements, the weights can be assigned as [0.1, 0.15, 0.5, 0.15, 0.1]. The weighted sum of the attention weights and the trend feature sequence is used for feature fusion, and the dimension of the fused feature is 64.

[0037] The second long short-term memory network consists of 128 memory units. The fused feature is input into the second long short-term memory network to obtain the ambient light intensity classification result and the prediction result of the light scene conversion. The ambient light intensity can be divided into 5 levels: extremely dark (0 - 10 lux), dark (10 - 1000 lux), medium (1000 - 10000 lux), bright (10000 - 50000 lux), and extremely bright (>50000 lux). The prediction of the light scene conversion includes 4 possible states: stable, gradually getting brighter, gradually getting darker, and rapid fluctuation. The prediction result is output in the form of a probability distribution. For example, the prediction for a certain moment may be: stable (0.15), gradually getting brighter (0.75), gradually getting darker (0.05), rapid fluctuation (0.05), indicating that the ambient light is most likely in the trend of gradually getting brighter at this moment.

[0038] The maximum change constraint is calculated based on the vehicle speed data, and the constraint value is positively correlated with the vehicle speed. The ambient light intensity classification result is constrained to obtain the basic optical path. The ambient light intensity classification is mapped to the basic optical path range, and the mapping relationship is: extremely dark corresponds to the optical path value of 90 meters, dark corresponds to the optical path value of 70 meters, medium corresponds to the optical path value of 50 meters, bright corresponds to the optical path value of 40 meters, and extremely bright corresponds to the optical path value of 30 meters. Between adjacent time points, the change amount of the optical path shall not exceed the maximum change constraint.

[0039] Perform progressive non - linear adjustment on the basic optical path to generate an intermediate optical path sequence, and perform anomaly detection and processing. Calculate the trend factor according to the prediction result of the illumination scene conversion: 1.0 when the prediction result is stable, 0.9 when it gradually brightens, 1.1 when it gradually darkens, and 1.0 when it fluctuates rapidly but with an added stability mechanism. Calculate the speed compensation coefficient based on the vehicle speed data: 0.9 when the vehicle speed is below 30 km / h, 1.0 between 30 - 60 km / h, 1.1 between 60 - 90 km / h, and 1.2 when it is above 90 km / h. Multiply the latest value of the processed intermediate optical path sequence, the trend factor, and the speed compensation coefficient to obtain the target headlight optical path.

[0040] In the prior art, the adjustment of the headlight optical path usually adopts simple threshold judgment or fixed rules, lacking the ability to predict the trend of environmental light changes. In view of the above problems, this application proposes a hierarchical prediction method based on a double - layer long - short - term memory network, which realizes the accurate classification of illumination intensity and the accurate prediction of illumination scene conversion through the comprehensive analysis of environmental light intensity, vehicle speed, and time information. In particular, this application designs an adaptive time - window sampling strategy, which can dynamically adjust the length of the feature sequence according to the vehicle speed and light changes; introduces multi - dimensional analysis of original features, differential features, and trend features to improve the network's perception ability of environmental changes; adopts an attention mechanism to enhance the recognition of key time points; ensures the smoothness and rationality of optical path adjustment through a multi - factor constraint compensation mechanism; and finally, improves the robustness of the system in complex environments through anomaly detection and classification processing based on Mahalanobis distance.

[0041] In an alternative embodiment, the progressive adjustment and anomaly processing of the basic optical path include: Calculate the difference between the basic optical path and the current optical path, decompose the difference into multiple progressive adjustment amounts according to the preset maximum adjustment step, calculate the transition time of each progressive adjustment amount based on the preset basic transition time, and generate an intermediate optical path sequence during the transition by using non - linear interpolation. Extract the feature vector of the intermediate optical path sequence; obtain multiple normal working modes and their mean vectors and covariance matrices based on Gaussian mixture model clustering within the sliding time window of the historical optical path adjustment sequence; calculate the Euclidean distance and cosine similarity between the feature vector of the intermediate optical path sequence and each normal working mode, select the normal working mode with the highest matching degree based on the weighted combination of the Euclidean distance and cosine similarity, and calculate the Mahalanobis distance by using the mean vector and covariance matrix of the mode with the highest matching degree. When the Mahalanobis distance exceeds a preset distance threshold, determine the abnormal type: when detecting a sudden change in light, replace the intermediate light program sequence with a historical light path value; when detecting a sensor abnormality, increase the weight of the historical light path in the intermediate light program sequence; when detecting continuous oscillation, reduce the amplitude of the progressive adjustment amount. Multiply the final value of the intermediate light program sequence after abnormal processing by the trend factor and the speed compensation coefficient to obtain the target headlight light path.

[0042] Exemplarily, after the system determines the basic light path according to the vehicle driving state, it is necessary to perform progressive adjustment on this light path to avoid discomfort caused by sudden changes in the light path. Calculate the difference between the basic light path and the current light path. For example, when the basic light path is 1.5% and the current light path is 0.8%, the difference is 0.7%. The system sets the maximum adjustment step size to 0.1%, then decomposes 0.7% into 7 progressive adjustment amounts [0.1%, 0.1%, 0.1%, 0.1%, 0.1%, 0.1%, 0.1%].

[0043] Calculate the transition time of each progressive adjustment amount based on a preset basic transition time. For example, the basic transition time is set to 100 milliseconds. If it is detected that the vehicle is turning, the system increases the transition time to 150 milliseconds to ensure a smoother transition of the light path. For each progressive adjustment amount, use the Bezier curve interpolation method to generate a non-linear transition sequence. Specifically, for the first 0.1% adjustment amount, generate an intermediate sequence from 0.8% to 0.9% [0.80%, 0.81%, 0.84%, 0.87%, 0.89%, 0.90%], and each value corresponds to a different moment of the transition time. After completing the non-linear interpolation of all progressive adjustment amounts, obtain the complete intermediate light program sequence, such as [0.80%, 0.81%,..., 1.49%, 1.50%].

[0044] To detect possible abnormalities during the adjustment process, the system extracts feature vectors from the intermediate light program sequence. The feature vectors include the mean, variance, maximum value, minimum value, change rate, energy distribution, etc. of the light program sequence. For example, for the above sequence, the extracted feature vectors may be [1.15%, 0.04, 1.5%, 0.8%, 0.0047% / ms, 0.65].

[0045] The system maintains a sliding time window, such as the optical path adjustment data in the most recent 30 seconds. Within this window, the Gaussian mixture model is applied for clustering to obtain multiple normal working modes. For example, the system may identify 3 normal working modes: steady driving mode, acceleration mode, and turning mode, each mode having its mean vector and covariance matrix. The mean vector of the steady driving mode may be [1.0%, 0.02, 1.2%, 0.85%, 0.002% / ms, 0.3], and the covariance matrix represents the variance and covariance relationships of each feature component.

[0046] For the currently extracted feature vector, calculate its Euclidean distance and cosine similarity with each normal working mode. For example, the Euclidean distance with the steady driving mode is 0.18, and the cosine similarity is 0.92; the Euclidean distance with the acceleration mode is 0.25, and the cosine similarity is 0.86; the Euclidean distance with the turning mode is 0.35, and the cosine similarity is 0.78. The system sets the Euclidean distance weight to 0.4 and the cosine similarity weight to 0.6 to calculate the comprehensive matching degree. For the steady driving mode, the comprehensive matching degree is 0.4×(1 - 0.18)+0.6×0.92 = 0.632; for the acceleration mode, the comprehensive matching degree is 0.4×(1 - 0.25)+0.6×0.86 = 0.596; for the turning mode, the comprehensive matching degree is 0.4×(1 - 0.35)+0.6×0.78 = 0.524. Based on the comparison of the matching degrees, the system selects the steady driving mode with the highest matching degree as the current working mode. Use the mean vector and covariance matrix of this mode to calculate the Mahalanobis distance. The formula is: the difference between the feature vector and the mode mean vector multiplied by the inverse of the covariance matrix and then multiplied by the transpose of the difference, and take the square root to get the Mahalanobis distance. For example, the calculated Mahalanobis distance is 2.8.

[0047] The system presets the Mahalanobis distance threshold to 2.5. When the calculated Mahalanobis distance of 2.8 exceeds the threshold, it is determined as an abnormal situation. The system further analyzes the type of abnormality: Detection of sudden light change: By analyzing the short-term change rate of the ambient light intensity sensor data, when the change rate exceeds the preset threshold of 50000 lux / s, it is determined as a sudden light change. For example, when the vehicle enters the tunnel entrance, the ambient light intensity drops suddenly from 80000 lux to 5000 lux, and the change rate is -75000 lux / s, exceeding the threshold. The system determines it as a sudden light change. At this time, the system replaces the intermediate optical path sequence with the historical optical path value. For example, it uses the average optical path value of 1.2% in the past 3 seconds to replace the currently calculated optical path sequence to avoid unnecessary adjustment of the headlight due to sudden light change.

[0048] Sensor anomaly detection: By comparing the data consistency of multiple sensors or the time continuity of a single sensor, when the inconsistency exceeds the threshold of 25%, it is determined that the sensor is abnormal. For example, when the main light intensity sensor reads 85000 lux and the auxiliary sensor reads 20000 lux, the inconsistency is 76.5%, exceeding the threshold, and the system determines that the main sensor may be abnormal. At this time, the system increases the weight of the historical optical path in the intermediate optical path sequence. For example, the weight of the historical optical path is increased from the original 0.3 to 0.7, and the corrected optical path sequence is 0.7×historical optical path + 0.3×current calculated optical path, reducing the impact of sensor anomalies on optical path adjustment.

[0049] Continuous oscillation detection: Through spectral analysis of the optical path sequence or counting local extreme points, when the number of extreme points detected within 3 seconds exceeds 6, it is determined that there is continuous oscillation. For example, when the optical path sequence fluctuates up and down multiple times in a short period, forming a sequence like [1.2%, 1.3%, 1.1%, 1.4%, 1.0%, 1.3%], the system detects 5 extreme points, approaching the oscillation threshold. At this time, the system reduces the amplitude of the progressive adjustment amount, reduces the original 0.1% adjustment step to 0.05%, extends the transition time, smooths the adjustment curve, and suppresses the oscillation.

[0050] After anomaly processing, the system obtains a corrected intermediate optical path sequence, which is multiplied by the trend factor and the speed compensation coefficient to obtain the target headlight optical path.

[0051] The progressive optical path adjustment method based on non-linear interpolation proposed in this application realizes smooth transition of the optical path; designs a multi-mode anomaly detection mechanism based on the Gaussian mixture model, which can identify normal working modes in different driving scenarios; introduces a weighted combination evaluation strategy of Euclidean distance and cosine similarity, improving the accuracy of pattern matching; develops a refined anomaly classification and processing scheme based on Mahalanobis distance, taking targeted measures for different types of anomalies, significantly improving the system robustness.

[0052] In an alternative embodiment, the inclination data is input into a pre-trained optical path compensation neural network based on the multi-head attention mechanism, and the multi-head attention mechanism assigns weights to different feature dimensions of the inclination data to obtain the optical path compensation coefficient, including: Obtain the temporal dimension features and statistical dimension features of the inclination data. The temporal dimension features include the first-order difference and acceleration features of the inclination sequence, and the statistical dimension features include the moving average, variance, kurtosis coefficient, and trend index; Input the temporal dimension features and statistical dimension features into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The optical path compensation neural network is jointly pre-trained through an inclination prediction task, an optical path mapping task, and a contrast learning task. The joint pre-training uses the inclination sequence complexity score to quantify the difficulty of training samples and constructs a curriculum learning strategy based on the difficulty score. The multi-head attention mechanism assigns weights to different feature dimensions of the inclination data, including: generating query matrices, key matrices, and value matrices, calculating multi-head attention scores and performing feature fusion, and optimizing the fused features through residual connections. Calculate the importance of temporal features and statistical features based on the output of the multi-head attention mechanism, weight and fuse the features according to the feature importance to generate a basic compensation value; calculate a compensation adjustment coefficient based on the historical compensation effect and the inclination change trend, and perform a multiplication operation on the basic compensation value and the compensation adjustment coefficient to obtain an initial optical path compensation coefficient; construct an adaptive prediction interval based on the periodic analysis result of the headlight inclination change pattern, respond quickly when the change of the compensation coefficient falls within the prediction interval, perform gradual adjustment based on the change trend when the change exceeds the prediction interval, and dynamically update the prediction interval boundary in combination with the statistical features of the historical compensation sequence to obtain the final optical path compensation coefficient.

[0053] Exemplarily, obtain the temporal dimension features and statistical dimension features of the inclination data. The temporal dimension features include the first-order difference and acceleration features of the inclination sequence. Taking the inclination data of a certain headlight collected as an example, the original inclination sequence is [0.5°, 0.7°, 0.9°, 1.2°, 1.4°], calculate the first-order difference as [0.2°, 0.2°, 0.3°, 0.2°], and the acceleration features are [0°, 0.1°, -0.1°]. The statistical dimension features include the sliding mean, variance, kurtosis coefficient, and trend index. For the above inclination sequence, use a sliding window with a window size of 3 to obtain the sliding mean feature as [0.7°, 0.933°, 1.167°], the variance feature as [0.033, 0.043, 0.053], the kurtosis coefficient as [1.5, 1.2, 1.3], and the trend index is obtained by calculating the least squares fitting slope as [0.2, 0.25, 0.2].

[0054] Input the above-extracted features into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. This network is jointly pre-trained through three tasks: an inclination prediction task, an optical path mapping task, and a contrast learning task. During the pre-training process, use the inclination sequence complexity score to quantify the difficulty of training samples.

[0055] The specific implementation of the multi - head attention mechanism for weight allocation to different feature dimensions of inclination data is as follows: First, generate the query matrix, key matrix, and value matrix. Taking the 8 - head attention mechanism as an example, the input feature dimension is 16, and the output dimension of each head is 8. For the input feature vector X = [x1, x2,..., x16], the query matrix Q, key matrix K, and value matrix V are generated through the linear transformation matrices WQ, WK, and WV. Calculate the multi - head attention scores. Each head calculates the attention score. For example, the first head may focus on the temporal features and the score is [0.3, 0.2, 0.4, 0.1], and the second head focuses on the statistical features and the score is [0.1, 0.3, 0.1, 0.5]. Concatenate the outputs of each head through feature fusion, and then optimize the fused features through residual connection, that is, add the output of the attention mechanism to the original input.

[0056] Based on the output of the multi - head attention mechanism, calculate the importance of temporal features and statistical features. For example, for a specific inclination sequence, the system may obtain that the importance of temporal features is 0.65 and the importance of statistical features is 0.35, indicating that in the current scenario, the temporal features contribute more to the prediction compensation coefficient. According to these importance values, weight - fuse the features to generate the basic compensation value. Specifically, if the output value of the temporal features is 0.42 and the output value of the statistical features is 0.38, the weighted fusion result is 0.65×0.42 + 0.35×0.38 = 0.406, which is used as the basic compensation value.

[0057] Calculate the compensation adjustment coefficient based on the historical compensation effect and the inclination change trend. The historical compensation effect is evaluated by comparing the deviation between the predicted optical path and the actual optimal optical path within the past 30 seconds. For example, the average deviation in the past 30 seconds is +5%, indicating that the predicted value is generally on the high side. The inclination change trend is determined by analyzing the change direction and rate of the recent 10 inclination samples. For example, the current inclination shows an accelerating upward trend. Combining the two, the system calculates the compensation adjustment coefficient to be 0.95, indicating that the basic compensation value needs to be slightly lowered. Multiply the basic compensation value by the compensation adjustment coefficient, 0.406×0.95 = 0.386, to obtain the initial optical path compensation coefficient.

[0058] Construct an adaptive prediction interval based on the periodic analysis results of the headlight inclination change pattern. The system conducts a spectral analysis of the historical inclination data to identify the typical inclination change period and amplitude of the vehicle under different road conditions. For example, when driving on urban roads, an inclination change pattern with a period of about 8 seconds and an amplitude range of ±0.4° may be identified. Based on these analysis results, the system constructs a prediction interval [0.35, 0.42], that is, the reasonable change range of the expected compensation coefficient.

[0059] When the change in the compensation coefficient falls within the prediction interval, the system adopts a rapid response strategy and directly uses the calculated initial optical path compensation coefficient of 0.386 as the final result. When the change exceeds the prediction interval, the system makes a gradual adjustment based on the change trend. For example, if the initial compensation coefficient is 0.33, which is lower than the lower limit of the prediction interval of 0.35, the system does not directly adopt 0.33. Instead, it gradually adjusts at a rate of 0.01 per step according to the current change trend, approaching the target value from the compensation coefficient at the previous moment (assumed to be 0.38). This time, it may adopt 0.37 as the final compensation coefficient.

[0060] Dynamically update the prediction interval boundary by combining the statistical characteristics of the historical compensation sequence. Specifically, calculate the mean, standard deviation, and change trend of the compensation coefficient within the past 60 seconds. For example, the mean is 0.39, the standard deviation is 0.025, and the change trend is a slow decline. Based on these statistical characteristics, the system updates the prediction interval to [0.34, 0.44], expanding the interval range to accommodate possible larger fluctuations under the current road conditions.

[0061] Through the above adaptive prediction and gradual adjustment mechanism, the system finally obtains the optical path compensation coefficient of 0.386, which will be used for subsequent calculations with the target optical path to obtain the compensated optical path.

[0062] To specifically illustrate the effect of this method, take a set of actual data as an example: During the driving of a new energy bus, the headlight inclination data shows periodic fluctuations, and the original sequence is [1.2°, 1.3°, 1.4°, 1.5°, 1.4°, 1.3°, 1.2°, 1.1°, 1.0°, 0.9°, 1.0°, 1.1°]. By extracting the time series characteristics and statistical characteristics and inputting them into the pre-trained network, the initial optical path compensation coefficient is obtained as 0.82. At the same time, the system identifies that the inclination change period is approximately 10 sample points and constructs the prediction interval [0.78, 0.86]. Since the initial compensation coefficient of 0.82 falls within the prediction interval, the system directly adopts this value as the final compensation coefficient. After applying this compensation coefficient, the actual optical path of the headlight is adjusted from the original 65 meters to 65×0.82 = 53.3 meters, making the front lighting area more suitable for the current road conditions and avoiding the problem of improper headlight irradiation angle caused by the vehicle body tilt.

[0063] In the prior art, headlight optical path compensation usually adopts methods based on simple thresholds or fixed rules, resulting in untimely compensation or overcompensation in dynamically changing scenarios. The optical path compensation method based on the multi-head attention mechanism proposed in this application realizes more accurate optical path compensation through multi-dimensional feature extraction and weight assignment of tilt angle data. In particular, this application designs a feature system that combines the time series dimension and the statistical dimension to comprehensively capture the tilt angle change pattern; adopts the multi-head attention mechanism to automatically learn the importance of different feature dimensions, improving the model adaptability; introduces a joint pre-training strategy and a curriculum learning mechanism to enhance the model's generalization ability for complex scenarios; finally, through an adaptive prediction interval and a progressive adjustment mechanism, the stability and reliability of the compensation process are ensured.

[0064] Figure 3 It is a comparison chart of compensation effects under different road conditions. This bar chart shows the comparison of compensation effects between the present invention and traditional PID control and simple feedforward networks under different road conditions. Experimental data show that the present invention exhibits significant advantages in all tested road conditions, especially more obvious in complex road conditions. Under flat road conditions, the differences among the three methods are small. The accuracy of the present invention reaches 99.2%, slightly higher than that of the traditional method; while in bumpy sections, sharp turns, uphill driving, and complex mixed road conditions, the present invention maintains a high accuracy of over 92%, while the performance of traditional PID control and simple feedforward networks drops significantly, with accuracies of only 65.3% and 70.2% respectively in complex mixed road conditions. The experimental results prove that the multi-head attention mechanism of the present invention can effectively extract key information from different feature dimensions, enabling the system to maintain a stable optical path compensation effect under various complex road conditions.

[0065] Figure 4 It is a real-time optical path adjustment process diagram of the present invention. This diagram shows the dynamic relationship between tilt angle changes and compensation adjustments during the actual operation of the system. The gray dashed line represents the compensation adjustment process of the system. It clearly follows the tilt angle changes but shows a smoother adjustment curve, indicating that the compensation system can effectively respond to tilt angle changes and avoid over-adjustment and oscillation through appropriate filtering and smoothing processes. It can be observed from the diagram that there is a slight time lag between the compensation adjustment curve and the tilt angle change curve, which reflects the real-time response characteristics of the system and also indicates that the system has achieved a good balance between stability and response speed.

[0066] In an alternative embodiment, the joint pre-training of the optical path compensation neural network through the tilt angle prediction task, the optical path mapping task, and the contrast learning task includes: The pre-training process of the optical path compensation neural network includes: constructing a hierarchical teacher network for inclination dynamic feature, optical path mapping relationship, and inclination sequence prediction, and performing pre-training through feature-level and decision-level knowledge distillation and self-distillation mechanisms at different time scales; quantifying the difficulty of training samples using the inclination sequence complexity score, constructing a curriculum learning strategy based on the difficulty score, and introducing random masking, temporal perturbation, and feature recombination to generate multi-view enhanced samples; Calculating the mutual information between the inclination prediction task, the optical path mapping task, and the contrast learning task, dynamically adjusting the task weights based on the mutual information and task performance, and introducing prediction uncertainty estimation, mapping reliability evaluation, and feature consistency verification as complementary tasks; calculating the prediction confidence for the training samples of each task, inputting the training samples with a confidence lower than the preset confidence into the auxiliary branch network for feature enhancement learning, and re-inputting the enhanced features into the backbone network; Calculating a performance score based on the compensation accuracy and system stability, performing sensitivity analysis on the network parameters according to the performance score, storing the feature patterns of the compensation samples with a performance score exceeding the preset score threshold in the memory bank, and dynamically adjusting the network parameters based on the feature patterns in the memory bank.

[0067] Exemplarily, a hierarchical teacher network is constructed for knowledge distillation, which includes three layers: an inclination dynamic feature extraction layer, an optical path mapping relationship modeling layer, and an inclination sequence prediction layer. In the feature-level distillation process, the cosine similarity is used to measure the difference in the feature distributions of the teacher network and the student network. When the similarity is lower than 0.85, the weight of the feature distillation loss is increased; in the decision-level distillation, a soft label mechanism is adopted, and the temperature parameter is set to 2.5. For self-distillation at different time scales, time windows of 5 seconds, 15 seconds, and 30 seconds are respectively selected to construct multi-granularity temporal feature representations. The short-term features focus on capturing transient changes, while the long-term features focus on trend changes.

[0068] The complexity score calculation method is: analyzing the inclination change frequency, amplitude, and noise level to obtain a score between 0 and 1. For example, the complexity score for a smoothly driving scenario is 0.2, and the score for a bumpy road surface scenario is 0.8. Based on the complexity score, a curriculum learning strategy is constructed, training simple samples (score < 0.4) first, then introducing medium-difficulty samples (score 0.4 - 0.7), and finally adding high-difficulty samples (score > 0.7).

[0069] Quantify the difficulty of training samples and conduct curriculum learning. By calculating the complexity score of the inclination angle sequence, it is evaluated based on three dimensions: signal spectrum analysis, volatility, and the number of change points. In the specific implementation, the spectrum complexity accounts for 40%, the volatility accounts for 35%, and the number of change points accounts for 25%. For example, for an inclination angle sequence, its spectrum entropy value is 0.75, the volatility is 0.28, and the number of change points is 12. Then its complexity score is (0.75×0.4)+(0.28×0.35)+(12 / 20×0.25)=0.45. Based on this score, a curriculum learning strategy is constructed. In the initial stage of training, simple samples with a score lower than 0.3 are selected. In the middle stage, medium samples with a score of 0.4 - 0.7 are selected. In the later stage, complex samples with a score higher than 0.7 are introduced. At the same time, a data augmentation strategy is introduced: random masking sets 20% of the inclination angle data in the sequence to zero; temporal perturbation randomly inserts or deletes 1 - 3 time points of data in the original sequence; feature recombination randomly permutes 30% of the adjacent feature blocks in the sequence.

[0070] Dynamically adjust the multi - task weights and introduce complementary tasks. Use normalized mutual information to quantify the correlation between tasks. Sampling 1000 typical data, the mutual information between inclination angle prediction and optical path mapping is calculated to be 0.62, the mutual information between inclination angle prediction and contrast learning is 0.47, and the mutual information between optical path mapping and contrast learning is 0.53. Based on this, the initial task weights are set as 0.40 for inclination angle prediction, 0.35 for optical path mapping, and 0.25 for contrast learning. During the training process, when the performance improvement speed of a certain task is lower than 20% of the average level, increase the weight of this task by 0.05; when the performance of a certain task exceeds the preset threshold, reduce its weight by 0.03. The introduced complementary tasks include: prediction uncertainty estimation, using the Monte Carlo random inactivation method, performing 10 forward propagations in the inference stage, and calculating the standard deviation of the output as the uncertainty index; mapping reliability assessment calculates the consistency score of the mapping result, and samples with a consistency score lower than 0.7 are marked as low - reliability samples; feature consistency verification calculates the Euclidean distance of the feature representations under different augmented views, and samples with a distance greater than the preset threshold of 1.5 are regarded as feature - inconsistent samples.

[0071] For the training samples of the tasks, the system calculates the prediction confidence. The confidence of the inclination prediction task is based on the correlation coefficient between the predicted sequence and the true sequence. For example, when the correlation coefficient is 0.92, the confidence is 0.92; the confidence of the optical path mapping task is based on the relative error between the predicted optical path and the labeled optical path. For example, when the relative error is 8%, the confidence is 0.92; the confidence of the contrastive learning task is based on the discrimination between the positive sample pairs and the negative sample pairs. For example, when the discrimination is 0.85, the confidence is 0.85. The training samples with a confidence lower than the preset confidence (such as confidence <0.75) are input into the auxiliary branch network for feature enhancement learning. The auxiliary branch network adopts an attention enhancement module and a feature calibration module to refine the low-confidence samples. For example, for an inclination prediction sample with a confidence of 0.68, its original inclination sequence is [1.2°, 1.4°, 1.3°, 1.5°, 1.7°]. The auxiliary branch network identifies the key change points (the 4th and 5th points in this example) through the attention mechanism, enhances the feature representation weights of these points, and adjusts the features through the feature calibration module to generate the enhanced feature representation. The enhanced features are re-input into the backbone network, and its confidence is increased to 0.81, exceeding the threshold, and is included in the effective training sample set.

[0072] Perform sensitivity analysis and dynamic adjustment of the network parameters. First, calculate the performance score based on two metrics: compensation accuracy and system stability. The compensation accuracy is evaluated by the average relative error between the predicted optical path and the ideal optical path. For example, when the average relative error is 5%, the accuracy score is 0.95; the system stability is evaluated by the smoothness and continuity of the optical path sequence. For example, when the smoothness is 0.88, the stability score is 0.88. The comprehensive performance score is the weighted sum of the two, with a weight ratio of 6:4. For example, 0.95×0.6 + 0.88×0.4 = 0.922.

[0073] Perform sensitivity analysis on the network parameters according to the performance score. The method is to apply a ±1% perturbation to each parameter layer separately and observe the change range of the performance score. For example, applying a +1% perturbation to the weight matrix of the multi-head attention module, the performance score changes by -0.015, indicating that this parameter is relatively sensitive to the performance; applying the same perturbation to the bias term of the output layer, the performance score changes by -0.002, indicating that this parameter is less sensitive.

[0074] Store the feature patterns of compensation samples with performance scores exceeding a preset score threshold (e.g., 0.90) in the memory bank. The specific operation is to extract the feature vectors of the sample after being processed by the multi-head attention layer and the corresponding network parameter configurations. The memory bank maintains the feature patterns of the most recent 1000 high-performance samples using a first-in, first-out strategy. After each training iteration, the network parameters are dynamically adjusted based on the feature patterns in the memory bank. The adjustment method is to calculate the similarity between the features of the current training batch and the features in the memory bank. For parameter configurations with high similarity, increase their weights in the parameter update. For example, if the feature similarity between a sample in the current batch and a sample in the memory bank is 0.93, then during parameter update, the gradient weight corresponding to this sample is increased by 10%, prompting the network parameters to approach the known high-performance configurations. In this way, the system realizes the effective exploration and utilization of the parameter space and avoids performance fluctuations during the training process.

[0075] The hierarchical teacher network and multi-scale self-distillation mechanism designed in this application achieve comprehensive knowledge transfer from features to decisions; adopt curriculum learning based on complexity scoring and multi-perspective data augmentation strategies to improve the model's adaptability to samples of different difficulties; introduce mutual information calculation and dynamic task weight adjustment mechanisms to optimize the balance of multi-task learning; enhance the features of low-confidence samples through the auxiliary branch network to improve the utilization efficiency of training samples; finally, conduct sensitivity analysis and dynamic adjustment of network parameters based on performance scores and the memory bank mechanism to ensure the continuous optimization of the model.

[0076] In an optional implementation manner, compensating the target headlight optical path according to the optical path compensation coefficient to obtain the compensated optical path, and adjusting the headlight irradiation angle based on the compensated optical path includes: Perform a multiplication operation on the optical path compensation coefficient and the target headlight optical path to obtain the initial compensated optical path, and calculate the unit time change rate and change acceleration of the initial compensated optical path to construct a dynamic response curve; Calculate the smoothness index and urgency index of the compensated optical path change based on the dynamic response curve. The smoothness index characterizes the continuous change characteristics of the compensated optical path, and the urgency index characterizes the degree of mutation of the compensated optical path; select an adjustment response mode according to the smoothness index and urgency index. The adjustment response mode includes a fast response mode and a gradual response mode; when the fast response mode is selected, map the initial compensated optical path to an irradiation angle adjustment instruction; when the gradual response mode is selected, calculate a segmented adjustment sequence of the irradiation angle based on the change trend of the initial compensated optical path, and map the segmented adjustment sequence to an irradiation angle adjustment instruction according to a preset adjustment step size; Collect the actual angle data during the adjustment process of the irradiation angle, calculate the deviation between the actual angle and the target angle, input the deviation into the adaptive corrector to generate an irradiation angle compensation amount, and correct the subsequent angle adjustment commands based on the irradiation angle compensation amount.

[0077] Exemplarily, obtain the target headlight optical path and the optical path compensation coefficient. Multiply the optical path compensation coefficient by the target headlight optical path to obtain the initial compensated optical path. Calculate the unit time change rate and the change acceleration of the initial compensated optical path to construct a dynamic response curve. The unit time change rate represents the amount of change in the optical path per second, and the change acceleration represents the speed of change of the change rate. Suppose that within 5 seconds, the initial compensated optical path increases from 80 meters to 110 meters, then the unit time change rate is (110 - 80) / 5 = 6 meters per second. If the change rate increases from an initial 3 meters per second to a final 9 meters per second, then the change acceleration is (9 - 3) / 5 = 1.2 meters per second². By recording the compensated optical path values at different time points, a dynamic response curve representing the change of the optical path over time can be constructed.

[0078] Calculate the smoothness index and the urgency index of the change of the compensated optical path based on the dynamic response curve. The smoothness index can be obtained by calculating the standard deviation of the change rates of the compensated optical path at consecutive multiple time points. The smaller the standard deviation, the smoother the change. For example, if the change rates at 5 consecutive sampling points are 5.8, 6.0, 6.2, 5.9, and 6.1 meters per second respectively, the calculated standard deviation is approximately 0.16, indicating that the change is relatively smooth. The urgency index can be obtained by calculating the ratio of the maximum change rate to the average change rate. The larger this ratio, the higher the possibility of a mutation. For example, if the maximum change rate is 12 meters per second and the average change rate is 6 meters per second, then the urgency index is 2.0, indicating an obvious mutation.

[0079] Select the adjustment response mode according to the smoothness index and the urgency index. When the smoothness index is less than the preset threshold of 0.5 and the urgency index is less than 1.5, select the progressive response mode; when the smoothness index is greater than 0.5 or the urgency index is greater than 1.5, select the fast response mode. In practical applications, these thresholds can be adjusted according to vehicle characteristics and user habits.

[0080] When the fast response mode is selected, directly map the initial compensated optical path to the irradiation angle adjustment command. There is a mapping relationship between the headlight irradiation angle and the optical path, which can usually be obtained by looking up a table or a functional relationship. For example, for a certain model of headlight, the relationship between the irradiation angle θ (degrees) and the optical path L (meters) can be expressed as: θ = atan(h / L), where h is the headlight installation height (meters). Suppose the headlight installation height is 1.2 meters and the initial compensated optical path is 110 meters, then the irradiation angle θ = atan(1.2 / 110) ≈ 0.62°. The system converts this angle value into a control signal for the adjustment motor.

[0081] When the progressive response mode is selected, the segmented adjustment sequence of the illumination angle is calculated based on the change trend of the initial compensation optical path. First, the change trend of the compensation optical path is analyzed. For example, the process from 80 meters to 110 meters may show the characteristics of first fast and then slow. According to this trend, a sequence consisting of multiple intermediate optical path values ​​is designed, such as [80, 88, 95, 102, 107, 110]. Then, this sequence is mapped to the illumination angle adjustment instruction according to the preset adjustment step. Assuming that the maximum angle adjustment step is 0.1° / step, the current angle is 0.85°, the target angle is 0.62°, and the total adjustment amount is 0.23°, it needs to be completed in 3 steps to form an angle sequence [0.85°, 0.75°, 0.68°, 0.62°]. After each step of adjustment is completed, the system waits for a predetermined time (such as 100 milliseconds) before executing the next step of adjustment to ensure that the whole process proceeds smoothly.

[0082] During the illumination angle adjustment process, the system collects actual angle data and calculates the deviation between the actual angle and the target angle. For example, when the target angle is 0.62°, the actual angle collected at a certain time is 0.66°, and the deviation is 0.04°. The deviation is input into the adaptive corrector to generate the illumination angle compensation. The adaptive corrector can adopt the proportional-integral-differential (PID) control algorithm, in which the proportional coefficient Kp=1.2, the integral coefficient Ki=0.05, and the differential coefficient Kd=0.1. For the above 0.04° deviation, assuming that the previous deviation was 0.06°, the deviation change is 0.04°-0.06°=-0.02°; assuming that in the previous 5 control cycles, the deviation values ​​were 0.05°, 0.03°, 0.02°, 0.04°, and 0.06°, and these deviations were accumulated to obtain a cumulative deviation of 0.2°, then the compensation amount is calculated as: 1.2×0.04+0.05×0.2+0.1×(-0.02)=0.06°. The subsequent angle adjustment instructions are corrected based on the generated illumination angle compensation. For example, the original next angle adjustment instruction is 0.62°, and after adding the compensation amount of 0.06°, it is corrected to 0.56°. The system sends the corrected instruction to the headlamp control unit to perform the adjustment operation, and collects the actual angle again in the next cycle for feedback adjustment to form a closed-loop control system.

[0083] The present application realizes adaptive switching between the rapid response mode and the progressive response mode by analyzing the dynamic response curve of the compensation optical path and calculating the smoothness and urgency indexes; in the progressive response mode, a segmented adjustment sequence is designed according to the optical path change trend to ensure the smoothness of the angle adjustment; an adaptive corrector is introduced to perform closed-loop control of the actual angle, effectively offsetting the influence of mechanical errors and environmental interference.

[0084] According to a second aspect of the embodiments of the present invention, Provided is an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the foregoing method.

[0085] In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.

[0086] The present invention may be a method, an apparatus, a system, and / or a computer program product. The computer program product may include a computer-readable storage medium, on which computer-readable program instructions for performing various aspects of the present invention are loaded.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive headlamp optical path adjustment method for new energy buses based on ambient light intensity, characterized in that Including: Collecting the vehicle speed data and timestamp data of new energy buses, the ambient light intensity data at the front, and the inclination angle data of the headlamps; Inputting the ambient light intensity data into three parallel feature extraction branches according to different resolutions. Each branch includes a multi-layer residual convolution structure to obtain a feature map set, performing attention feature fusion in the spatial dimension and channel dimension on the feature map set and performing dynamic calibration to obtain the ambient light intensity feature; Forming a feature sequence with the ambient light intensity feature, the vehicle speed data and the timestamp data, inputting it into a double-layer long short-term memory network for hierarchical prediction, and performing multi-factor constraint compensation to obtain the target headlamp optical path. The hierarchical prediction includes ambient light intensity hierarchical prediction and light scene conversion prediction; Inputting the inclination angle data into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The multi-head attention mechanism assigns weights to different feature dimensions of the inclination angle data to obtain an optical path compensation coefficient; Compensating the target headlamp optical path according to the optical path compensation coefficient to obtain a compensated optical path, and adjusting the irradiation angle of the headlamp based on the compensated optical path.

2. The method according to claim 1, wherein Extracting the ambient light intensity feature by using a convolutional neural network includes: Inputting the ambient light intensity data into a resolution adaptive evaluation module, calculating the optimal resolution interval based on image clarity, edge complexity, and light change gradient; determining three target resolutions in a logarithmic interval within the optimal resolution interval, and inputting the ambient light intensity data into three parallel feature extraction branches according to the target resolutions; each feature extraction branch includes: a densely connected residual block for extracting multi-scale local features, a dilated convolutional layer group for enhancing feature expression ability, and a channel recombination module for feature recalibration, and obtaining feature map sets with different resolutions through the feature extraction branches; Performing attention feature fusion in the spatial dimension and channel dimension on the feature map set, including: generating spatial dimension attention weights to recalibrate the feature map; extracting global context information in the channel dimension to generate channel weights; gradually fusing the attention features of features with different resolutions to obtain a fused feature; Calculating the statistics of the fused feature to construct a feature distribution, dynamically updating the calibration parameters based on the feature distribution, calibrating the fused feature by using the calibration parameters and performing feedback correction to obtain the calibrated ambient light intensity feature.

3. The method according to claim 1, wherein Forming a feature sequence with the ambient light intensity feature, the vehicle speed data and the timestamp data, inputting it into a double-layer long short-term memory network for hierarchical prediction, and performing multi-factor constraint compensation to obtain the target headlamp optical path. The hierarchical prediction includes ambient light intensity hierarchical prediction and light scene conversion prediction includes: Forming a feature vector with the ambient light intensity feature, the vehicle speed data and the timestamp data; calculating a speed factor based on the vehicle speed data, calculating a light change variance based on the ambient light intensity feature to obtain a light factor, determining the time window length according to the speed factor and the light factor, performing sliding sampling on the feature vector to generate an original feature sequence, calculating the difference between adjacent sampling points of the original feature sequence to obtain a differential feature sequence, and performing a moving average process on the differential feature sequence to obtain a trend feature sequence; Input the original feature sequence and the differential feature sequence into the first long short-term memory network to obtain hidden state information. Calculate the attention weights based on the hidden state information and the trend feature sequence for feature fusion, and input the fused features into the second long short-term memory network to obtain the environmental light intensity classification result and the light scene conversion prediction result; Calculate the maximum change constraint based on the vehicle speed data, constrain the environmental light intensity classification result to obtain the basic optical path, perform progressive non-linear adjustment on the basic optical path to generate an intermediate optical path sequence, and classify different types of anomalies through Mahalanobis distance anomaly detection; Calculate the trend factor based on the light scene conversion prediction result, and calculate the speed compensation coefficient based on the vehicle speed data; Multiply the processed intermediate optical path sequence, the trend factor, and the speed compensation coefficient to obtain the target headlight optical path.

4. The method according to claim 3, wherein The progressive adjustment and anomaly processing of the basic optical path include: Calculate the difference between the basic optical path and the current optical path, decompose the difference into multiple progressive adjustment amounts according to the preset maximum adjustment step, calculate the transition time of each progressive adjustment amount based on the preset basic transition time, and generate the intermediate optical path sequence during the transition by using non-linear interpolation; Extract the feature vectors of the intermediate optical path sequence; Cluster based on the Gaussian mixture model within the sliding time window of the historical optical path adjustment sequence to obtain multiple normal working modes and their mean vectors and covariance matrices; Calculate the Euclidean distance and cosine similarity between the feature vectors of the intermediate optical path sequence and each normal working mode, and select the normal working mode with the highest matching degree based on the weighted combination of the Euclidean distance and cosine similarity. Calculate the Mahalanobis distance using the mean vector and covariance matrix of the mode with the highest matching degree; When the Mahalanobis distance exceeds the preset distance threshold, determine the anomaly type: When detecting a sudden change in light, replace the intermediate optical path sequence with the historical optical path value; When detecting a sensor anomaly, increase the weight of the historical optical path in the intermediate optical path sequence; When detecting continuous oscillation, reduce the amplitude of the progressive adjustment amount; Multiply the final value of the intermediate optical path sequence after anomaly processing by the trend factor and the speed compensation coefficient to obtain the target headlight optical path.

5. The method according to claim 1, wherein Input the tilt angle data into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The multi-head attention mechanism assigns weights to different feature dimensions of the tilt angle data to obtain the optical path compensation coefficient, including: Obtain the temporal dimension features and statistical dimension features of the tilt angle data. The temporal dimension features include the first-order difference and acceleration features of the tilt angle sequence, and the statistical dimension features include the sliding mean, variance, kurtosis coefficient, and trend index; Input the temporal dimension features and statistical dimension features into a pre-trained optical path compensation neural network based on the multi-head attention mechanism. The optical path compensation neural network is jointly pre-trained through the tilt angle prediction task, the optical path mapping task, and the contrast learning task. The joint pre-training quantifies the difficulty of the training samples using the tilt angle sequence complexity score and constructs a curriculum learning strategy based on the difficulty score; The multi-head attention mechanism assigns weights to different feature dimensions of the inclination data, including: generating a query matrix, a key matrix, and a value matrix, calculating the multi-head attention scores and performing feature fusion, and optimizing the fused features through residual connection; Calculate the importance of temporal features and statistical features based on the output of the multi-head attention mechanism, weight and fuse the features according to the feature importance to generate a basic compensation value; calculate a compensation adjustment coefficient based on the historical compensation effect and the inclination change trend, and perform a multiplication operation on the basic compensation value and the compensation adjustment coefficient to obtain an initial optical path compensation coefficient; construct an adaptive prediction interval according to the periodic analysis result of the headlight inclination change pattern, respond quickly when the change of the compensation coefficient falls within the prediction interval, perform progressive adjustment based on the change trend when the change exceeds the prediction interval, and dynamically update the prediction interval boundary in combination with the statistical features of the historical compensation sequence to obtain the final optical path compensation coefficient.

6. The method according to claim 5, wherein The joint pre-training of the optical path compensation neural network through the inclination prediction task, the optical path mapping task, and the contrast learning task includes: The pre-training process of the optical path compensation neural network includes: constructing a hierarchical teacher network for inclination dynamic features, optical path mapping relationships, and inclination sequence prediction, and performing pre-training through feature-level and decision-level knowledge distillation and self-distillation mechanisms at different time scales; quantifying the difficulty of training samples using the inclination sequence complexity score, constructing a curriculum learning strategy based on the difficulty score, and introducing random masking, temporal perturbation, and feature recombination to generate multi-view enhanced samples; Calculate the mutual information between the inclination prediction task, the optical path mapping task, and the contrast learning task, dynamically adjust the task weights based on the mutual information and task performance, and introduce prediction uncertainty estimation, mapping reliability evaluation, and feature consistency verification as complementary tasks; calculate the prediction confidence for the training samples of each task, input the training samples with a confidence lower than the preset confidence into the auxiliary branch network for feature enhancement learning, and re-input the enhanced features into the backbone network; Calculate the performance score based on the compensation accuracy and system stability, perform sensitivity analysis on the network parameters according to the performance score, store the feature patterns of the compensation samples with a performance score exceeding the preset score threshold in the memory bank, and dynamically adjust the network parameters based on the feature patterns in the memory bank.

7. The method according to claim 1, characterized in that, Compensate the target headlight optical path according to the optical path compensation coefficient to obtain a compensated optical path, and adjust the headlight irradiation angle based on the compensated optical path, including: Perform a multiplication operation on the optical path compensation coefficient and the target headlight optical path to obtain an initial compensated optical path, calculate the unit time change rate and change acceleration of the initial compensated optical path to construct a dynamic response curve; Calculate the smoothness index and the urgency index for compensating the optical path change based on the dynamic response curve. The smoothness index characterizes the continuous change characteristic of the compensated optical path, and the urgency index characterizes the mutation degree of the compensated optical path; select an adjustment response mode according to the smoothness index and the urgency index. The adjustment response mode includes a fast response mode and a progressive response mode; when the fast response mode is selected, map the initial compensated optical path to an irradiation angle adjustment command; when the progressive response mode is selected, calculate a segmented adjustment sequence of the irradiation angle based on the change trend of the initial compensated optical path, and map the segmented adjustment sequence to an irradiation angle adjustment command according to a preset adjustment step size; Collect the actual angle data during the irradiation angle adjustment process, calculate the deviation between the actual angle and the target angle, input the deviation into the adaptive corrector to generate an irradiation angle compensation amount, and correct the subsequent angle adjustment commands based on the irradiation angle compensation amount.

8. An electronic device, characterized in that, Comprising: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Intelligent transportation methods and systems

    CA3238745A1

  • Vehicular illumination system

    CN101190664A

  • Automobile headlight control device and method for automatic adjusting night driving bend and grade

    CN101376352A

  • High beam control signal generation method and device

    CN115959030A

  • Illuminating light switching method, device and equipment and storage medium

    CN118238719A