Automatic test method and device for automobile lamp control system
Through the automated testing method, the ambient light test is carried out on the automotive lamp control system using event cameras and LSTM models, which solves the problems of extended test cycles, high labor costs and inaccurate subjective evaluation in the traditional testing method, and achieves efficient, automated and standardized testing effects.
Patent Information
- Application Number
- CN202510415370.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The traditional automotive lamp control system testing methods have problems such as prolonging the test cycle, frequent rework, high labor costs, and inaccurate judgments due to subjective evaluation.
Using an automated test method, by inputting preset atmosphere simulation instructions into the automotive lamp control system, using the event camera to capture the atmosphere light changes, generate an atmosphere event stream, and input it into the trained LSTM model for abnormal identification, and generate a test exception report.
It realizes efficient, automated and standardized testing of automotive lamp control systems, avoids manual subjectivity, improves test accuracy and consistency, and reduces testing costs and labor investment.
Smart Images

Figure CN119916790A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of lamp testing, and in particular to an automated testing method and device for an automobile lamp control system. Background Art
[0002] At present, as an important part of improving user experience and brand recognition, the functions and performance of automotive ambient lights are increasingly valued by automobile manufacturers. There are many technical problems with traditional automotive lighting control system testing methods. Existing testing methods usually rely on the actual vehicle development stage, which leads to a significant delay in the testing cycle. If problems are found, rework and modification are required, which seriously affects the development progress and cost control, making it difficult to find and correct early design defects in time. At the same time, traditional tests mostly rely on human eye observation to judge the display effect of ambient lights. This subjective evaluation method is not only difficult to form a unified standard due to individual differences in the human eye's perception of light, but also cannot be quantitatively analyzed. Long-term observation of the light source can easily lead to visual fatigue, affecting the accuracy of judgment, and faces the problems of low efficiency and high labor costs. Summary of the invention
[0003] The present application provides an automated testing method and device for an automobile lighting control system, which are used to perform an ambient light test on the automobile lighting control system in the early stage of development, thereby improving testing efficiency and reducing testing costs.
[0004] In a first aspect, an embodiment of the present application provides an automated testing method for an automobile lighting control system, the method comprising: Inputting a preset atmosphere simulation instruction to the automobile lamp control system to be tested, so that the automobile lamp control system outputs a variety of atmosphere lights; The atmosphere light is received by an event camera at a preset position to generate an atmosphere event stream; Inputting the atmosphere simulation instruction and the atmosphere event stream into the trained LSTM model to obtain a test abnormality item; The abnormal automobile lighting control system is determined according to the test abnormality item, and a test abnormality report is output.
[0005] In a second aspect, an embodiment of the present application provides an automated testing device for an automobile lighting control system, the device comprising: A test control module, used for inputting preset atmosphere simulation instructions to the automobile lamp control system to be tested, so that the automobile lamp control system outputs a variety of atmosphere lights; An event generation module, used for receiving the atmosphere light through an event camera at a preset position to generate an atmosphere event stream; An abnormality identification module, used for inputting the atmosphere simulation instruction and the atmosphere event stream into the trained LSTM model to obtain a test abnormality item; The result output module is used to determine the abnormal automobile lighting control system according to the test abnormal items and output a test abnormality report.
[0006] In a third aspect, an embodiment of the present application provides a testing device, the testing device comprising a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the automatic testing method of the automobile lighting control system as described in any one of the embodiments of the present application when executing the computer program.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements an automated testing method for an automobile lighting control system as described in any one of the embodiments of the present application.
[0008] The embodiment of the present application provides an automated testing method for an automobile lighting control system, the method comprising: inputting a preset atmosphere simulation instruction to the automobile lighting control system to be tested, so that the automobile lighting control system outputs a variety of atmosphere lights; receiving the atmosphere light through an event camera at a preset position to generate an atmosphere event stream; inputting the atmosphere simulation instruction and the atmosphere event stream into a trained LSTM model to obtain a test abnormality item; determining the abnormal automobile lighting control system according to the test abnormality item, and outputting a test abnormality report. Through the above method, an event camera is used to accurately capture the changes in the atmosphere light, establish an objective and unified test standard, avoid visual fatigue, achieve quantitative analysis of lighting characteristics, combine with the LSTM model for abnormality identification, achieve full automation and standardization of the test, ensure the consistency of the test results, and automatically generate an abnormality report to accurately locate the problem, reduce the test cost, reduce manpower investment, and improve the test accuracy at the same time, to achieve the test goals of high efficiency, low cost, and high quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0010] Figure 1 A schematic flow chart of an automated testing method for an automobile lighting control system provided in an embodiment of the present application; Figure 2 A schematic block diagram of an automated testing device for an automobile lighting control system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0011] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0012] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0013] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0014] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0015] See also Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of an automated testing method for an automobile lighting control system provided by an embodiment of the present application. Figure 1 As shown, the specific steps of the automatic testing method of the automobile lamp control system include: S101-S104.
[0016] S101 , inputting a preset atmosphere simulation instruction to a vehicle lamp control system to be tested, so that the vehicle lamp control system outputs a variety of atmosphere lights.
[0017] Exemplarily, preset atmosphere simulation instructions are sent to the automotive lighting control system to be tested. These instructions are carefully designed to trigger the output of various types of atmosphere light. In order to obtain better test results, switching between multiple modes may also be added to the instruction set to test the mode conversion efficiency of the automotive lighting control system. The preset atmosphere simulation instructions usually contain multiple parameter combinations, such as color value (RGB or HSV color space), brightness level, gradient rate, color temperature range, lighting mode (such as beating, gradient, breathing, etc.) and special scene simulation (such as sunset, aurora, ocean, etc.). These instructions can be sent to the lighting control unit in the form of digital signals via the CAN bus, LIN bus or a dedicated test interface. In actual operation, the test system will establish an instruction library covering all the atmosphere light scenes that may be used in the car. For example, when the user selects the "romantic mode", the automotive lighting control system will send the instruction "MODE: ROMANTIC; COLOR: #FF69B4; BRIGHTNESS: 70; STYLE: BREATHING; CYCLE: 3s" to the lighting controller, which will trigger the lamp to produce a pink slow breathing effect. During the test, commands are sent in a predetermined sequence to ensure that every possible ambient light scenario is tested. This method can fully verify the responsiveness and output accuracy of the automotive lighting control system in different working modes, and can also detect the stability of the system when receiving complex commands or fast switching commands.
[0018] S102: Receive ambient light through an event camera at a preset position to generate an ambient event stream.
[0019] For example, a special event camera technology is used to capture the changes in ambient light emitted by automotive lamps and convert these changes into a time-series event data stream. Unlike traditional cameras, event cameras do not capture complete images at a fixed frame rate, but only record the pixel positions and change directions (increase or decrease) of the scene where the brightness changes, with microsecond time resolution and high dynamic range. In the test setup, the event camera is fixed on pre-planned camera positions, which are carefully designed to fully cover the illumination area of all lamps in the car. For example, when testing the center console ambient light, the event camera may be located between the driver's seat and the co-pilot's seat; when testing the door ambient light, the camera is placed directly opposite the door panel. The parameters of the event camera, such as the contrast threshold (usually set to ±15% brightness change) and the time resolution (up to 1μs), are precisely configured to ensure that all subtle light changes can be captured. When the lamp executes the "gradient blue to red" instruction, the event camera generates a series of event data, recording the brightness changes of each pixel from blue to red. These raw event data are then converted into a standardized event stream, retaining the spatiotemporal information of light changes. This event-based acquisition method has significant advantages over traditional video acquisition. It can not only accurately capture rapidly changing lighting effects, but also significantly reduce the amount of data and improve analysis efficiency.
[0020] S103, input the atmosphere simulation instructions and atmosphere event stream into the trained LSTM model to obtain test abnormal items.
[0021] Exemplarily, the atmosphere simulation instructions and atmosphere event streams obtained in the first two steps are simultaneously input into a pre-trained deep learning model for anomaly detection. The LSTM (Long Short-Term Memory Network) model used is specially designed to process sequence data and can effectively capture the characteristics and patterns of atmosphere light changes over time. During the training phase, the model uses a large amount of normal operation data of standard lighting systems and manually annotated abnormal data for learning, and establishes a mapping relationship between instructions and expected light output. In actual testing, the model receives two inputs at the same time: one event camera is used to receive atmosphere simulation instructions, and the other is the atmosphere event stream captured by the event camera. The LSTM model extracts instruction features and understands its semantic meaning (for example, the "MODE: PARTY; COLOR: RAINBOW; SPEED: FAST" instruction is parsed as a fast-switching colorful light effect); analyzes event stream features and identifies the change pattern of actual light; and finally compares the correlation between the two to detect potential anomalies. For example, when the instruction requires "blue gradient", but the event stream shows that the light is "red flashing", the model will mark this inconsistency as an abnormal item. The abnormal items output by the model include not only the type of abnormality (such as color deviation, brightness abnormality, response delay, etc.), but also the quantitative score of the degree of abnormality, providing a detailed basis for subsequent analysis. This machine learning method greatly improves the automation and accuracy of the test and can detect tiny abnormalities that are difficult to detect manually.
[0022] S104: Determine the abnormal automobile lighting control system according to the test abnormality item, and output a test abnormality report.
[0023] For example, the module responsible for report generation classifies and sorts the abnormal items output by the LSTM model, and summarizes them into different types of abnormalities, such as color inconsistent with instructions (for example, the instruction requires blue but the actual display is green), brightness abnormality (for example, the instruction requires 50% brightness but the actual display is only 30%), response time delay (for example, the response is more than 200ms after the instruction is issued), etc. According to the preset abnormality evaluation criteria, each abnormality is assigned a severity level, which is usually divided into three levels: slight (does not affect the function but has aesthetic problems), moderate (function is affected but still usable) and severe (function failure). The number and severity of abnormalities in each tested lamp control system are counted. When the cumulative abnormalities of a lamp system exceed the preset threshold (such as severe abnormality ≥ 1 time, or moderate abnormality ≥ 3 times), the system is marked as an "abnormal system". For example, when the ambient light control system of a certain model has a "color deviation" problem in 5 out of 10 tests, and the deviation value exceeds 30% of the color gamut space, it will be judged as having a serious abnormality. After the test anomaly analysis is performed through the above process, a test anomaly report is automatically generated based on the analysis results. The report contains a detailed list of abnormal lamps, a description of the abnormal type of each lamp, the specific scene where the anomaly occurred, the quantitative indicators of the anomaly, and the supporting event camera data archive. This report not only intuitively displays the test results, but also provides the conditions for the anomaly to reproduce, which is convenient for engineers to conduct subsequent fault diagnosis and system optimization.
[0024] The embodiment of the present application provides an automated testing method for an automobile lighting control system, the method comprising: inputting a preset atmosphere simulation instruction to the automobile lighting control system to be tested, so that the automobile lighting control system outputs a variety of atmosphere lights; receiving the atmosphere light through an event camera at a preset position to generate an atmosphere event stream; inputting the atmosphere simulation instruction and the atmosphere event stream into a trained LSTM model to obtain a test abnormality item; determining the abnormal automobile lighting control system according to the test abnormality item, and outputting a test abnormality report. Through the above method, an event camera is used to accurately capture the changes in the atmosphere light, establish an objective and unified test standard, avoid visual fatigue, achieve quantitative analysis of lighting characteristics, combine with the LSTM model for abnormality identification, achieve full automation and standardization of the test, ensure the consistency of the test results, and automatically generate an abnormality report to accurately locate the problem, reduce the test cost, reduce manpower investment, and improve the test accuracy at the same time, to achieve the test goals of high efficiency, low cost, and high quality.
[0025] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.
[0026] In some embodiments, ambient light is received by an event camera at a preset position to generate an ambient event stream, including: S1021-S1028.
[0027] S1021. Parameter configuration is performed on the event camera at the preset position, and contrast threshold and time interval parameters are set as event triggering conditions.
[0028] For example, by setting a contrast threshold (usually ±15% brightness change), the camera will only trigger recording when the pixel brightness changes exceed this threshold, and set a time interval parameter (such as 1000 microseconds) to define the minimum time granularity of event sampling. In the test of luxury car ambient lights, the contrast threshold can be set to a lower value (±10%) to capture subtle gradient effects; while in the dynamic lighting test of sports vehicles, the threshold can be appropriately increased (±20%) to focus on significant changes. This refined parameter configuration ensures that the event camera can optimize acquisition for different types of ambient lights.
[0029] S1022. Based on the event camera after parameter configuration, obtain the pixel log intensity change value of the ambient light, and compare it with the contrast threshold to obtain the original event data representing the direction of brightness change.
[0030] Exemplarily, the configured event camera starts working, continuously monitoring the light intensity received by each pixel, and calculating the logarithmic difference between the current brightness value of the pixel and the previous value in real time to form a log intensity change value. Taking the door ambient light as an example, when the light changes from dark blue (RGB value: 0, 0, 128) to bright blue (RGB value: 0, 0, 255), the pixel log intensity may change by 0.3 units. The data system connected to the event camera compares this change value with the contrast threshold (such as ±0.2). If it exceeds the threshold, an event tuple containing pixel coordinates (x, y), timestamp t, and polarity p (+1 or -1) is generated, indicating that the brightness of the location at a specific point in time increases or decreases. This method accurately records the spatial position, time, and direction information of light changes.
[0031] S1023, dividing the original event data into time series according to the timestamps, and aggregating the events captured between two adjacent frames into multiple uniform time bins to obtain a time-discrete event set.
[0032] Exemplarily, the original event data is asynchronous and continuous, and needs to be divided into time series for subsequent processing. The data system divides the event stream into time windows (such as 10 milliseconds) to create multiple evenly distributed time boxes. For example, when testing the "rhythm mode" atmosphere light, one second of data may be divided into 100 time boxes. Each time box aggregates all events that occurred in that time period, retaining the time order of the events. If the center console atmosphere light performs a breathing effect, the data system will record a large number of positive polarity events generated in the brightness rising stage, and then a set of negative polarity events in the brightness falling stage will appear in the time box. This method of dividing the evenly spaced time intervals converts the continuous event stream into a discrete time series, which is convenient for subsequent pattern recognition and feature extraction.
[0033] S1024, obtaining polarity information of the latest timestamp event at each pixel position in each time bin, and performing spatial aggregation on the time-discretized event set according to the polarity information to obtain multiple event slices represented in two-dimensional space.
[0034] Exemplarily, each time bin is traversed, and for each pixel position (x, y), only the polarity value (+1 or -1) of the most recent event is retained. For example, when testing the "rainbow mode" of the ambient light, the position (320, 240) may record multiple events in a time bin, and the data system only retains the polarity value of the last event. This operation is performed on the entire image space to form a two-dimensional matrix with the same resolution as the camera, called an event slice, where the matrix element value is +1 (increase in brightness), -1 (decrease in brightness), or 0 (no change). The same operation is performed on each time bin to produce a series of event slices, each of which reflects the spatial distribution of light changes within a specific time window. This spatial aggregation method effectively compresses the amount of data while retaining key information, converting time series events into spatial distribution representations, and revealing the spatial pattern of light changes.
[0035] S1025 . Normalize the event slices represented in the multiple two-dimensional spaces to obtain a standardized event frame sequence.
[0036] Exemplarily, event slices need to be normalized to eliminate equipment differences and environmental effects. The data system uses a statistical normalization method to adjust the numerical distribution of each two-dimensional event slice to the standard range [-1,1] to ensure data consistency and comparability. For example, when capturing the "starry sky ceiling" ambient light effect in the car, the event density in the top area may be much higher than that in the side area, and this difference can be balanced through normalization. The normalization process also includes noise suppression and outlier processing, such as smoothing sudden brightness changes (which may be ambient light interference). For the multi-zone linkage ambient light effect in the car, normalization can ensure that light changes in different areas are represented equivalently, regardless of their original brightness.
[0037] S1026. Input the standardized event frame sequence into a preset global spatial dependency extractor, and calculate the correlation matrix between each pixel position and all other pixel positions through the self-attention mechanism of the global spatial dependency extractor to obtain a global spatial feature map.
[0038] Exemplarily, for each pixel position, the degree of association with all other pixel positions in the image is calculated. For example, when capturing a "surround" ambient light effect, even if these areas are far apart in space, the self-attention mechanism can identify the coordinated pattern of light changes in the front and back rows, generate Q (query), K (key), and V (value) matrices, and obtain attention weights through matrix multiplication and softmax operations to form a feature map representing global spatial dependencies. This method is particularly suitable for analyzing complex ambient lighting effects, such as in the "rhythm tracking" mode, where the synchronous changes of lights in different areas can be accurately captured. Global spatial dependency analysis enables the system to understand the mutual influence between distant pixels and reveal the overall pattern of light changes.
[0039] S1027. Input the standardized event frame sequence into the preset GM-LSTM network for sorting, and generate the hidden state of each time step.
[0040] For example, the GM-LSTM (Gated Long Short-Term Memory) network is designed for processing time series data and can effectively capture the temporal features in event frame sequences. Standardized event frame sequences are input into the network in chronological order. For example, when testing the "Music Interaction Mode" ambient light, 50 consecutive standardized event frames are fed into the network in sequence. GM-LSTM selectively retains or forgets specific information through its special gating structure (including input gate, forget gate, and output gate), such as recognizing the pattern of increasing brightness of the ambient light during bass beats. The network generates corresponding hidden state vectors for each input frame, which contain the accumulated temporal information up to the current time point and encode short-term and long-term dependencies. These hidden state vectors form a time-dependent feature representation.
[0041] S1028. Through differential operation and spatial attention mechanism, according to the global spatial feature map, the distinguishing clues of the hidden states of adjacent time steps are extracted to obtain the atmosphere event stream.
[0042] Exemplarily, the difference between the hidden states of adjacent time steps is calculated to highlight the state changes. For example, when the vehicle's "welcome mode" is activated, the state difference between the previous and next time steps reveals the pattern of the lights gradually lighting up from the outside to the inside. Combined with the global spatial feature map, the difference features are weighted through the spatial attention mechanism to emphasize the changes in important areas. For example, when the ambient light switches from "blue calm mode" to "red passion mode", the attention mechanism will highlight the area with significant color changes. The processed features constitute the ambient event stream, which integrates the information of the spatial and temporal dimensions and accurately expresses the complete characteristics of the light changes.
[0043] In some embodiments, the standardized event frame sequence is input into a preset global spatial dependency extractor, and the correlation matrix between each pixel position and all other pixel positions is calculated through the self-attention mechanism of the global spatial dependency extractor to obtain a global spatial feature map, including: S261-S267.
[0044] S261. Construct a two-dimensional feature matrix with a shape of H×W×C according to the standardized event frame sequence to obtain a spatial linear feature representation.
[0045] Exemplarily, the standardized event frame sequence is reorganized into a three-dimensional feature matrix, where H and W represent the height and width of the image (such as 1920×1080), respectively, and C represents the number of feature channels. When processing the "starry sky mode" of the interior ambient light, each pixel position contains multiple feature channels, such as brightness change value, time information, etc. Through this structured representation, the system can integrate multi-dimensional feature data while maintaining spatial position information. For example, the flashing pattern of the ceiling ambient light is represented in this matrix as a sequence of feature vectors at a specific spatial position.
[0046] S262. Perform three-way feature projection on the spatial linear feature representation to obtain a query matrix, a key matrix, and a value matrix.
[0047] Exemplarily, a three-way feature transformation is performed on the spatial linear feature representation to generate the query matrix Q, the key matrix K, and the value matrix V. When analyzing the "gradient mode" of the door ambient light, the query matrix represents the current feature of interest, the key matrix represents the possible matching features, and the value matrix contains the actual feature information. Each matrix is generated by different linear projection weights to ensure the expression of features in different spaces.
[0048] S263. Perform a transposed matrix multiplication operation on the query matrix and the key matrix, and divide the product result by the scaling factor to adjust the amplitude to obtain the original attention map.
[0049] For example, the transposed matrix product of the query matrix Q and the key matrix K is calculated to obtain a score matrix representing the similarity between pixels. When analyzing the "rhythm mode" of the center console, a high similarity score indicates that the light change patterns at two locations are similar. The gradient vanishing problem caused by excessively large values can be avoided by adjusting the scaling factor (usually the square root of the feature dimension).
[0050] S264. Apply the softmax normalization function to the original attention map, convert the similarity value into a probability distribution, and obtain a normalized spatial attention weight matrix.
[0051] Exemplarily, the softmax function is applied to the original attention map for normalization, and the similarity score is converted into a probability distribution. When processing the "ambient atmosphere mode", softmax ensures that the sum of the attention weights of each position is 1, and a high probability value indicates a strong correlation between the position and the current focus position. This probabilistic representation makes it possible to highlight important spatial associations.
[0052] S265. Perform matrix multiplication on the normalized spatial attention weight matrix and the value matrix to obtain a spatially dependent feature map.
[0053] For example, the normalized attention weight matrix is multiplied by the value matrix V to obtain a feature representation that incorporates global information. When analyzing the "music interaction mode", the output feature of each position contains weighted information from all related positions, reflecting the spatial dependency of light changes.
[0054] S266. Perform time-series transfer processing on the spatially dependent feature map, connect the feature state of the current time step with the hidden state of the previous time step, and obtain an enhanced feature representation.
[0055] For example, the feature map is processed by temporal association, combining the current time step feature with the state information of the previous time step. When analyzing the "light chasing mode", this connection enables the system to understand the temporal pattern of light changes, such as the direction and speed of light effect transmission. The integration of temporal information enhances the expressiveness of features.
[0056] S267. Restore the enhanced feature representation to a three-dimensional tensor H×W×C to obtain a global spatial feature map.
[0057] For example, the enhanced features are reshaped into the original three-dimensional tensor format (H×W×C) to restore the spatial structure. When processing the "full vehicle atmosphere mode", the reconstructed feature map retains the complete spatial layout information, while including global dependencies and temporal features, which facilitates subsequent anomaly detection analysis.
[0058] In some embodiments, through differential operations and spatial attention mechanisms, distinguishing clues of hidden states of adjacent time steps are extracted according to global spatial feature maps to obtain an atmosphere event stream, including: S281-S285.
[0059] S281. Perform a subtraction operation on the output state of the previous time step of the hidden state and the input state of the current time step, and obtain a discriminative feature by calculating the state difference tensor.
[0060] Exemplarily, accurate differential calculations are performed on the hidden states of adjacent time steps. During the calculation process, the output state vector (dimension 256×256×64) of the previous time step t-1 is subtracted element by element from the input state vector of the current time step t. When processing the "rhythm mode" of the interior ambient light, the state difference tensor can capture the drastic change of light intensity from 80% to 20%, or the subtle color difference from blue (RGB: 0,0,255) to purple (RGB: 128,0,255). The difference calculation uses 32-bit floating point precision to ensure that no information is lost due to numerical truncation. The generated discriminative features contain key information about time series changes, providing a basis for subsequent feature enhancement.
[0061] S282. Through convolutional layers, batch normalization and ReLU activation function, the discriminative features are nonlinearly transformed to obtain enhanced representation of the discriminative features.
[0062] Exemplarily, a 3×3 convolution kernel is applied to the discriminative features for spatial feature extraction, the convolution step is set to 1, and the padding method uses the SAME mode to keep the feature map size unchanged. The momentum parameter of the batch normalization layer is set to 0.99, and the epsilon is set to 1e-5 to standardize the feature distribution. The ReLU activation function truncates negative values to 0, retains positive features, and enhances the nonlinear expression ability of feature representation. When processing the "gradient tracking" mode, this step can effectively extract the spatial continuity characteristics of light changes, such as the movement trajectory and diffusion pattern of the light beam. The enhanced feature map more prominently expresses the dynamic characteristics of light changes, and the dimension is maintained at 256×256×64.
[0063] S283, the enhancement of the discriminative features is performed by performing channel mean operation and Sigmoid activation function conversion to obtain a spatiotemporal perception mask.
[0064] For example, the mean of the 64 channels of the enhanced feature is calculated to obtain the channel attention vector. The attention value is mapped to the [0,1] interval through the Sigmoid function to generate a 256×256×1 dimensional spatiotemporal perception mask. The high value area in the mask (such as above 0.8) indicates that there is a significant temporal change at that position, and the low value area (such as below 0.2) indicates that the change is not obvious.
[0065] S284. Weight the output state of the previous time step and the input state of the current time step respectively according to the spatiotemporal perception mask to obtain a motion change correction vector.
[0066] For example, the spatiotemporal perception mask is expanded to the same dimension as the state tensor (256×256×64) through a broadcast mechanism, and element-wise multiplication is performed with the output state of the previous time step and the input state of the current time step, respectively. The multiplication operation enhances the features of the areas with significant changes and suppresses the features of the areas with insignificant changes. The weighted state tensor more accurately reflects the motion change characteristics of the ambient light.
[0067] S285. Perform channel-level connection operation on the motion change correction vector, and perform feature fusion through the convolution layer to obtain an atmosphere event stream.
[0068] Exemplarily, the motion change correction vectors are concatenated in the channel dimension to form a 256×256×128 feature tensor. The concatenated features are reduced in dimension through a 1×1 convolution layer, with 64 convolution kernels, a step size of 1, and an output dimension of 256×256×64. The convolution operation combines the feature information of the previous and next time steps, and the generated atmosphere event stream contains complete temporal change features, which can be directly used for subsequent anomaly detection analysis.
[0069] In some embodiments, the atmosphere simulation instructions and atmosphere event streams are input into a trained LSTM model to obtain test anomalies, including: S1031-S1035.
[0070] S1031. Input the atmosphere simulation instructions and atmosphere event streams into the trained LSTM model, wherein the trained LSTM model includes multiple anomaly detection networks and decision networks, each anomaly detection network includes a first long short-term memory network, a second long short-term memory network and a threshold recurrent network, and the decision network includes a fully connected layer and a Sigmoid function.
[0071] Exemplarily, the trained LSTM model adopts a multi-level anomaly detection architecture, and the model as a whole consists of N parallel anomaly detection networks and 1 decision network. Each anomaly detection network contains two independent long short-term memory networks and a threshold recurrent network, where the first long short-term memory network is configured with 128 hidden units to extract the temporal characteristics of atmosphere simulation instructions; the second long short-term memory network is configured with 256 hidden units to specifically process dynamic change information in the atmosphere event stream. The threshold recurrent network adopts a GRU structure with a hidden layer dimension of 512, which is used to fuse the feature representation of instructions and events. The decision network consists of 3 fully connected layers with 1024, 512 and 256 neurons respectively, and the end is connected to the Sigmoid activation function for binary classification prediction.
[0072] S1032. Extract hidden state features of the atmosphere simulation instruction through the first long short-term memory network in each anomaly detection network to obtain an instruction feature representation vector.
[0073] Exemplarily, the first long short-term memory network processes the input atmosphere simulation instruction sequence. The network adopts a bidirectional LSTM structure, and the forward and reverse directions each contain 64 memory units. The forgetting gate controls the degree of forgetting of historical information, the input gate determines the update ratio of new information, and the output gate adjusts the output amount of information. The network updates the cell state and hidden state at each time step. The cell state maintains long-term memory, and the hidden state captures short-term features. After multiple layers of nonlinear transformation and state transfer, an instruction feature representation vector with a dimension of 128 is generated, which encodes the key timing pattern of the atmosphere simulation instruction.
[0074] S1033. Extract hidden state features of the atmosphere event stream through the second long short-term memory network in each anomaly detection network to obtain an event feature pyramid.
[0075] Exemplarily, the second long short-term memory network adopts a hierarchical feature extraction strategy to construct a multi-scale feature representation for the atmosphere event stream data. The network contains three LSTM layers, and the number of hidden units in each layer is 256, 128, and 64, respectively. The bottom LSTM focuses on local detail features, the middle LSTM integrates medium-scale temporal dependencies, and the top LSTM captures global semantic information. Through the residual connection mechanism, it ensures that feature information at different levels can be effectively transmitted. The output event feature pyramid contains feature maps of multiple scales, forming a multi-granular representation of the atmosphere event stream.
[0076] S1034, input the instruction feature representation vector and the event feature pyramid into the gated recurrent network for feature integration to generate a correlation vector matrix of instructions and events.
[0077] Exemplarily, the threshold recurrent network receives the instruction feature representation vector and the event feature pyramid as input, and dynamically adjusts the feature fusion process through the update gate and the reset gate. The update gate controls the influence of the current input information on the hidden state, and the reset gate determines the retention ratio of historical information. The network sets a 512-dimensional hidden state, and through multiple rounds of iterative operations, gradually establishes the spatiotemporal correlation relationship between the instruction features and the event features, and generates a correlation vector matrix with a dimension of 1024.
[0078] S1035. Input the association vector matrix into the decision network, and perform abnormal prediction on each instruction and corresponding event through the fully connected layer and Sigmoid function in the decision network to obtain the test abnormal items.
[0079] Exemplarily, the decision network adopts a multi-layer perceptron structure, and reduces the dimension and extracts features of the correlation vector matrix through three fully connected layers. The output of the fully connected layer is processed by batch normalization and ReLU activation function, which effectively alleviates the gradient vanishing problem. The Sigmoid function at the end of the network maps the features to the 0-1 interval, and samples with output values greater than the set threshold of 0.5 are judged as abnormal. The test abnormal items represent the abnormality of each instruction-event pair in the form of probability values, providing a quantitative basis for subsequent abnormal processing.
[0080] In some embodiments, the instruction feature representation vector and the event feature pyramid are input into a gated recurrent network for feature integration to generate an associated vector matrix of instructions and events, including: S341-S345.
[0081] S341. Project the instruction feature representation vector to the parallel feature subspace to obtain a projected feature representation vector, perform a weighted combination operation on the projected feature representation vector, and obtain an instruction encoding representation for context awareness.
[0082] Exemplarily, the construction of the projection feature subspace adopts a multi-head attention mechanism, which divides the instruction feature representation vector into 8 attention heads, each with a dimension of 64, and maps the features to different representation spaces through a learnable projection matrix. Position encoding information is introduced in the projection process, and the position embedding vector generated by the sine-cosine function is used to capture the relative position relationship in the sequence. The weighted combination operation adopts an adaptive weight scheme, and the weight coefficient is normalized by the softmax function to ensure that the sum of the contribution of each subspace feature is 1. The instruction encoding representation integrates local semantic information and global context information, and the dimension is kept at 512, which effectively improves the expressiveness of the feature.
[0083] S342. Apply hierarchical feature recalibration to the event feature pyramid, and obtain multi-scale discriminative event features through channel excitation and spatial selective filtering.
[0084] Exemplarily, the hierarchical feature recalibration network contains three branches, which process feature maps of different scales respectively. The channel excitation module calculates the global average pooling response of the feature map, generates a channel descriptor, learns the correlation between channels through a two-layer fully connected network, and outputs a channel weight vector. Spatial selective filtering uses a 3×3 convolution kernel with a step size of 1 and a padding of 1 to generate a spatial attention map to highlight the feature response of important areas. Multi-scale discriminative event features are integrated through a cross-scale feature fusion module, maintaining the hierarchical structure of the original feature pyramid while enhancing the discriminative ability of the features. This process significantly improves the expression quality of event features and lays the foundation for subsequent feature fusion.
[0085] S343. Perform tensor concatenation of the instruction encoding representation and the multi-scale discriminative event features to obtain a mixed feature matrix.
[0086] Exemplarily, during the generation of the hybrid feature matrix, the instruction encoding representation and the multi-scale discriminative event features are spliced in the channel dimension. The splicing operation maintains the spatial resolution of the feature, and the feature dimension alignment is ensured by the padding operation. The dimension of the spliced feature matrix is H×W×(C1+C2), where H and W represent the height and width of the feature map, respectively, and C1 and C2 represent the number of channels of the instruction feature and event feature, respectively.
[0087] S344, performing threshold screening and nonlinear transformation on the mixed feature matrix to obtain correlation features for suppressing noise.
[0088] For example, the noise suppression feature extraction adopts a double threshold strategy, setting a high threshold th high = 0.8 and low threshold th low =0.2, and the elements in the mixed feature matrix are screened. Features greater than the high threshold are directly retained, features less than the low threshold are suppressed, and features between the two thresholds are smoothed by a nonlinear function. The nonlinear transformation uses the LeakyReLU activation function, and the negative slope is set to 0.01 to effectively avoid the gradient vanishing problem. This process significantly improves the robustness of the features and reduces the impact of noise on subsequent processing.
[0089] S345. Pass the noise-suppressed correlation features through a linear transformation layer, where the linear transformation layer includes a pre-trained weight matrix and a bias vector matrix, to obtain a correlation vector matrix.
[0090] Exemplarily, the weight matrix of the linear transformation layer is obtained through a pre-trained model, initialized with a normal distribution, a mean of 0, and a standard deviation of 0.02. The bias vector matrix is initialized with zero to ensure that the feature map in the initial state does not shift. The linear transformation process maintains the spatial structure of the features, and the dimension of the output association vector matrix is consistent with the input. The vector at each position encodes the association relationship between the instruction and the event.
[0091] In some embodiments, determining an abnormal automobile lighting control system according to a test abnormality item and outputting a test abnormality report includes: S1041-S1045.
[0092] S1041, classifying the test abnormal items into color and atmosphere deviation, brightness and atmosphere non-correspondence, brightness change and atmosphere non-correspondence, and color change and atmosphere non-correspondence.
[0093] For example, the test abnormal items are systematically classified and processed, and the multi-dimensional abnormal feature analysis method is used to divide the abnormal items into four main categories: color and atmosphere deviation type (including color temperature deviation, chromaticity offset and other parameters), brightness and atmosphere mismatch type (involving illuminance value abnormality, brightness uniformity abnormality, etc.), brightness change and atmosphere mismatch type (including dynamic features such as gradient process abnormality and response time abnormality), and color change and atmosphere mismatch type (involving color transition abnormality, dynamic color synchronization, etc.). In the classification process, the real-time data collected by the spectrum analyzer is combined to establish an abnormal feature vector space to ensure the accuracy and reliability of the classification results.
[0094] S1042: Determine various abnormal items of the automobile lighting control system according to a preset abnormality threshold and determine the abnormality level.
[0095] Exemplarily, the abnormality level determination system performs quantitative evaluation based on preset thresholds and sets the tolerance range of key parameters: color temperature deviation ±200K, illumination deviation ±10%, response time deviation ±50ms, and chromaticity deviation △E≤3.0. The degree of abnormality is divided into three levels: slight (Level 1), medium (Level 2), and severe (Level 3). The measurement data of various abnormal items are converted into standardized scores through a numerical mapping algorithm to achieve accurate determination of the abnormality level.
[0096] S1043, counting the number of occurrences and the abnormality level of each type of abnormal item, and setting the automobile lamp control system whose number of occurrences of the abnormal item exceeds a preset number threshold or the automobile lamp control system whose abnormality level exceeds a preset level as an abnormal automobile lamp control system.
[0097] Exemplarily, an abnormality evaluation matrix for automobile lighting control systems is established to record and analyze the number of occurrences of abnormal items and the distribution of abnormal levels of each automobile lighting control system. Set abnormality judgment criteria: when the cumulative number of "abnormal items" of a single automobile lighting control system exceeds a preset number threshold, such as 5 times, or an abnormal level of Level 3 (preset level) occurs 2 times or more, or the weighted score of the cumulative abnormal level exceeds the preset threshold of 15 points, the automobile lighting control system is marked as an "abnormal automobile lighting control system". The evaluation process adopts a weighted scoring method, with Level 1 scoring 1 point, Level 2 scoring 3 points, and Level 3 scoring 5 points. The scientificity and rationality of abnormality judgment are ensured through comprehensive scoring.
[0098] S1044: Associate the abnormal automobile lighting control system with its corresponding abnormal type to generate an abnormality correspondence table.
[0099] For example, an abnormality corresponding relation database is constructed, and a relational data structure is used to record the identification information, abnormality type code, abnormality level mark and related test parameters of abnormal lighting control systems. The database design includes primary key index, foreign key constraint and trigger mechanism to ensure data integrity and consistency. SQL query statements are used to realize rapid retrieval and statistical analysis of abnormal information, providing data support for abnormality report generation.
[0100] S1045. Generate a test abnormality report according to the abnormality correspondence table, wherein the test abnormality report includes a list of abnormal lamps, abnormality types and abnormality degrees.
[0101] Exemplarily, the test exception report generation system adopts a modular design to convert the data in the exception corresponding table into a structured test report. The report content includes detailed information of the abnormal lamp (model, location, control module, etc.), a specific description of the abnormal type (including quantitative analysis of abnormal parameters), a rating of the degree of abnormality (with a description of the scoring criteria), and related test data charts. The report adopts a standardized format and supports multiple output formats such as PDF and HTML to facilitate data sharing and archive management. The exception report also includes test environment parameters, test equipment information, and tester certification information to ensure the integrity and traceability of the report.
[0102] See also Figure 2 , Figure 2 1 is a schematic block diagram of an automatic test device for an automobile lamp control system provided by an embodiment of the present application, wherein the automatic test device 200 for an automobile lamp control system is used to execute the aforementioned automatic test method for an automobile lamp control system. The automatic test device 200 for an automobile lamp control system can be configured in a server.
[0103] Among them, the server can be an independent server or a server cluster, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN) and big data and artificial intelligence platforms.
[0104] like Figure 2 As shown, the automatic testing device 200 for the automobile lighting control system includes: a test control module 201 , an event generation module 202 , an abnormality identification module 203 and a result output module 204 .
[0105] The test control module 201 is used to input a preset atmosphere simulation instruction to the automobile lamp control system to be tested, so that the automobile lamp control system outputs a variety of atmosphere lights.
[0106] The event generation module 202 is used to receive the ambient light through an event camera at a preset position to generate an ambient event stream.
[0107] The abnormality identification module 203 is used to input the atmosphere simulation instructions and the atmosphere event stream into the trained LSTM model to obtain the test abnormal items.
[0108] The result output module 204 is used to determine the abnormal automobile lighting control system according to the test abnormal items and output a test abnormality report.
[0109] An embodiment of the present application provides a testing device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement an automated testing method for an automobile lighting control system such as any one of the embodiments of the present application when executing the computer program.
[0110] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements an automated testing method for an automobile lighting control system as described in any one of the embodiments of the present application.
[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. An automated testing method for an automobile lighting control system, characterized in that: The method comprises: Inputting a preset atmosphere simulation instruction to the automobile lamp control system to be tested, so that the automobile lamp control system outputs a variety of atmosphere lights; The atmosphere light is received by an event camera at a preset position to generate an atmosphere event stream; Inputting the atmosphere simulation instruction and the atmosphere event stream into the trained LSTM model to obtain a test abnormality item; The abnormal automobile lighting control system is determined according to the test abnormality item, and a test abnormality report is output.
2. The automated testing method for an automobile lighting control system according to claim 1, characterized in that: The receiving the atmosphere light by an event camera at a preset position to generate an atmosphere event stream includes: Performing parameter configuration on the event camera of the preset camera position, and setting contrast threshold and time interval parameters as event triggering conditions; Based on the event camera after parameter configuration, the pixel log intensity change value of the ambient light is obtained, and compared with the contrast threshold to obtain the original event data representing the direction of brightness change; The original event data is divided into time series according to timestamps, and events captured between two adjacent frames are aggregated into multiple uniform time bins to obtain a time-discrete event set; Obtaining polarity information of the latest timestamp event at each pixel position in each of the time bins, and spatially aggregating the time-discretized event set according to the polarity information to obtain a plurality of event slices represented in two-dimensional space; Normalizing the event slices represented by the two-dimensional space to obtain a standardized event frame sequence; Inputting the standardized event frame sequence into a preset global spatial dependency extractor, calculating the correlation matrix between each pixel position and all other pixel positions through the self-attention mechanism of the global spatial dependency extractor, and obtaining a global spatial feature map; Inputting the standardized event frame sequence into a preset GM-LSTM network for sorting to generate a hidden state for each time step; Through differential operations and spatial attention mechanisms, the distinguishing clues of the hidden states of adjacent time steps are extracted according to the global spatial feature map to obtain the atmosphere event stream.
3. The automated testing method for an automobile lighting control system according to claim 2, characterized in that: The standardized event frame sequence is input into a preset global spatial dependency extractor, and the correlation matrix between each pixel position and all other pixel positions is calculated through the self-attention mechanism of the global spatial dependency extractor to obtain a global spatial feature map, including: According to the standardized event frame sequence, a two-dimensional feature matrix with a shape of H×W×C is constructed to obtain a spatial linear feature representation; Performing three-way feature projection on the spatial linear feature representation to obtain a query matrix, a key matrix, and a value matrix; Performing a transposed matrix multiplication operation on the query matrix and the key matrix, and dividing the product by a scaling factor to adjust the amplitude, thereby obtaining an original attention map; Applying a softmax normalization function to the original attention map, converting the similarity value into a probability distribution, and obtaining a normalized spatial attention weight matrix; Performing a matrix multiplication operation on the normalized spatial attention weight matrix and the value matrix to obtain a spatially dependent feature map; Performing a time-series transfer process on the spatially dependent feature map, connecting the feature state of the current time step with the hidden state of the previous time step, to obtain an enhanced feature representation; The enhanced feature representation is restored to a three-dimensional tensor H×W×C to obtain the global space feature map.
4. The automated testing method for an automobile lighting control system according to claim 2, wherein: The method extracts the distinguishing clues of the hidden states of adjacent time steps according to the global spatial feature map through differential operation and spatial attention mechanism to obtain the atmosphere event stream, including: Performing a subtraction operation on the previous time step output state of the hidden state and the current time step input state, and obtaining a discriminative feature by calculating a state difference tensor; The discriminative features are nonlinearly transformed through convolutional layers, batch normalization, and ReLU activation functions to obtain enhanced representations of the discriminative features; The enhancement of the discriminative features is performed by performing a channel mean operation and a Sigmoid activation function conversion to obtain a spatiotemporal perception mask; According to the spatiotemporal perception mask, the output state of the previous time step and the input state of the current time step are weighted to obtain a motion change correction vector; A channel-level connection operation is performed on the motion change correction vector, and feature fusion is performed through a convolutional layer to obtain the atmosphere event stream.
5. The automated testing method for an automobile lighting control system according to claim 1, characterized in that: The step of inputting the atmosphere simulation instruction and the atmosphere event stream into the trained LSTM model to obtain a test abnormality item includes: Input the atmosphere simulation instruction and the atmosphere event stream into a trained LSTM model, wherein the trained LSTM model includes a plurality of anomaly detection networks and a decision network, each of the anomaly detection networks includes a first long short-term memory network, a second long short-term memory network and a threshold recurrent network, and the decision network includes a fully connected layer and a Sigmoid function; Extract hidden state features of the atmosphere simulation instruction through the first long short-term memory network in each of the anomaly detection networks to obtain an instruction feature representation vector; Extract hidden state features of the atmosphere event stream through the second long short-term memory network in each of the anomaly detection networks to obtain an event feature pyramid; Inputting the instruction feature representation vector and the event feature pyramid into the threshold recurrent network for feature integration to generate a correlation vector matrix of instructions and events; The association vector matrix is input into the decision network, and abnormal prediction is performed on each instruction and the corresponding event through the fully connected layer and the Sigmoid function in the decision network to obtain the test abnormal items.
6. The automated testing method for an automobile lighting control system according to claim 5, characterized in that: The step of inputting the instruction feature representation vector and the event feature pyramid into the threshold recurrent network for feature integration to generate an associated vector matrix of instructions and events includes: Projecting the instruction feature representation vector to a parallel feature subspace to obtain a projected feature representation vector, and performing a weighted combination operation on the projected feature representation vector to obtain an instruction encoding representation for context awareness; Applying hierarchical feature recalibration to the event feature pyramid, obtaining multi-scale discriminative event features through channel excitation and spatial selective filtering; Performing tensor concatenation of the instruction encoding representation and the multi-scale discriminative event features to obtain a mixed feature matrix; Performing threshold screening and nonlinear transformation on the mixed feature matrix to obtain correlation features for suppressing noise; The noise-suppressed correlation features are passed through a linear transformation layer, wherein the linear transformation layer includes a pre-trained weight matrix and a bias vector matrix, to obtain the correlation vector matrix.
7. The automated testing method for an automobile lighting control system according to claim 1, wherein: The determining of an abnormal automobile lamp control system according to the test abnormal item and outputting a test abnormality report includes: Classifying the test abnormal items into color and atmosphere deviation, brightness and atmosphere non-correspondence, brightness change and atmosphere non-correspondence, and color change and atmosphere non-correspondence; Determining various abnormal items of the automobile lighting control system according to a preset abnormality threshold and determining the abnormality level; Counting the number of occurrences and the abnormality level of each type of abnormal item, and setting the automobile lamp control system whose number of occurrences of the abnormal item exceeds a preset number threshold or the automobile lamp control system whose abnormality level exceeds a preset level as an abnormal automobile lamp control system; Associating the abnormal automobile lamp control system with its corresponding abnormal type to generate an abnormality correspondence table; The test abnormality report is generated according to the abnormality correspondence table, and the test abnormality report includes a list of abnormal lamps, abnormality types and abnormality degrees.
8. An automatic test device for an automobile lighting control system, characterized in that: The automatic testing device for the automobile lamp control system is used to execute the automatic testing method for the automobile lamp control system according to any one of claims 1 to 7, and the automatic testing device for the automobile lamp control system comprises: A test control module, used for inputting preset atmosphere simulation instructions to the automobile lamp control system to be tested, so that the automobile lamp control system outputs a variety of atmosphere lights; An event generation module, used for receiving the atmosphere light through an event camera at a preset position to generate an atmosphere event stream; An abnormality identification module, used for inputting the atmosphere simulation instruction and the atmosphere event stream into the trained LSTM model to obtain a test abnormality item; The result output module is used to determine the abnormal automobile lighting control system according to the test abnormal items and output a test abnormality report.
Citation Information
Patent Citations
Automobile atmosphere lamp control system and method based on safety
CN105873281A
Atmosphere lamp control unit test system and method
CN107390672A
Lamp testing system and lamp testing method
CN109633488A
Driving method and device based on road condition monitoring, electronic equipment and computer readable storage medium
CN113942513A
In-vehicle atmosphere lamp simulation rendering method based on multi-parameter equation fitting
CN116468837A