Method for solving switch power-on backlight flicker problem

By reading historical data after the switching system is powered on and performing real-time pre-lighting and smooth brightness transition, combined with adaptive timeout updates, the problems of backlight response lag and brightness flicker after the switching system is powered on are solved, and the system achieves stable synchronization and continuity.

CN121985456APending Publication Date: 2026-05-05CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA FAW CO LTD
Filing Date
2025-12-11
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In the prior art, the backlight response of the vehicle switching system is delayed or the brightness flickers due to bus communication delay after power-on, and the fixed timeout threshold configuration is difficult to adapt to network timing changes, resulting in insufficient synchronization stability.

Method used

After the system is powered on, historical data in the storage module is read to generate initial control parameters, perform instant pre-lighting, measure the actual time consumption using a dynamic synchronization timer, combine the real-time brightness signal to perform a smooth brightness transition, update the adaptive timeout, establish an adaptive synchronization mechanism, and eliminate abnormal data interference.

Benefits of technology

It achieves real-time and continuous backlight response, avoids brightness flicker, ensures stable synchronization of the system under different network environments, optimizes the waiting window duration, and improves the synchronization success rate and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121985456A_ABST
    Figure CN121985456A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automotive electronics, and discloses a method for solving the problem of backlight flicker when a switch is powered on, and the method comprises the steps: judging whether effective historical data exist in a storage module or not after a system is powered on, so as to determine an initial control parameter; executing instant pre-lightening based on the initial control parameter, starting a dynamic synchronous timer to wait for a bus signal, and recording actual consumed time; if the signal is received, stopping timing and executing smooth brightness transition, and if the time is out, executing fault-tolerant processing; and continuously monitoring the state of the power supply, capturing the current brightness state in response to a power-off early warning event, updating the self-adaptive synchronization time duration in combination with actual time consumption, and finally writing persistent data into a storage module. According to the invention, power-on immediate response is realized through historical memory, lagging caused by communication delay is eliminated, a waiting window is dynamically adjusted through an adaptive algorithm, a data filtering mechanism is matched, synchronization stability in different network environments is ensured, and the problems of backlight flicker and brightness jump are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive electronics technology, specifically a method for solving the problem of backlight flickering when a switch is powered on. Background Technology

[0002] With the development of automotive electronic and electrical architecture, in-vehicle switching components typically rely on the vehicle bus network to receive backlight brightness commands from the body controller. In existing control strategies, the switching system waits for the bus signal to establish a connection after power-on to determine the brightness output. However, due to wake-up delays or bus load fluctuations in the vehicle bus network, there is an uncertain time delay between the switching system's power-on reset and the receipt of the first valid message. If the backlight remains off during this period, it causes a visual response lag; if a fixed default brightness is used for pre-lighting, the backlight brightness will abruptly change when the default value differs from the subsequently received actual control signal, resulting in flickering.

[0003] Furthermore, existing technologies typically set a fixed timeout threshold to handle signal waiting. This static configuration is difficult to adapt to network timing variations under different vehicle operating conditions. If the timeout threshold is set too short, it is easy to misjudge a slow network startup as a timeout, leading to synchronization failure; if it is set too long, it will prolong the system's response time to communication faults. Although some solutions attempt to introduce parameter adjustment mechanisms, they often lack effective filtering logic for abnormal data. When the network experiences occasional jitter or interference, abnormal measurement data will directly affect control parameters, resulting in insufficient synchronization stability of the system in long-term operation. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method for solving the problem of backlight flickering when a switch is powered on. This method resolves the backlight response lag caused by bus communication delay during the power-on initialization phase of existing switch control systems, as well as the brightness jump flickering problem caused by the mismatch between the initial brightness setting and the actual control signal.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for solving the problem of backlight flickering when a switch is powered on includes the following steps:

[0007] S100. After the switch control system is powered on, determine whether there is valid historical data in the storage module and determine the initial control parameters; the initial control parameters include at least the initial pre-lighting brightness value and the adaptive synchronization timeout; if there is no valid historical data, generate preset benchmark operating parameters as the initial control parameters.

[0008] S200. Based on the initial control parameters, perform instant pre-lighting and start the dynamic synchronization timer to wait for the bus, so as to obtain the real-time brightness signal after receiving the bus signal, and record the actual time consumption of this synchronization.

[0009] S300: Continuously control the backlight brightness based on the real-time brightness signal and the subsequently received bus signal, and monitor the power status of the switch control system during this process to capture power-off warning events.

[0010] S400: In response to the power-down warning event, capture the current backlight brightness state, update the adaptive synchronization timeout based on the actual time consumed, and finally write the persistent data containing the updated parameters into the storage module.

[0011] Furthermore, in S100 above, determining whether valid historical data exists in the storage module is achieved by reading the validity flag bit and historical operating data of a specific address area of ​​the storage module. Logical verification is performed on the read data. If the validity flag bit matches a preset valid value and the cyclic redundancy check result is correct, the historical data is deemed valid, and initial control parameters are calculated based on the historical operating data. If the flag bit is a default value or the check result is incorrect, the data is deemed invalid. In the case of invalid data, the initial pre-brightness value is set to a general safe brightness value, and the adaptive synchronization timeout is set to a preset maximum timeout threshold. This maximum timeout threshold is greater than the startup delay time of the vehicle bus network to ensure sufficient communication waiting window during the system's first operation.

[0012] Furthermore, the historical operating data includes a memory brightness value. When calculating the initial control parameters, this memory brightness value is processed using a state decoding formula to restore it to the initial pre-lighting brightness value. This process converts the stored data into the values ​​required for actual control.

[0013] Furthermore, in the above S200, the initial pre-brightness value is converted into a pulse width modulation duty cycle value to directly drive the backlight unit to light up, thereby achieving a fast response after power-on. Simultaneously, the adaptive synchronization timeout is loaded into the dynamic synchronization timer to start a countdown, and the measurement of the actual elapsed time is initiated synchronously. During the countdown, the external bus is monitored; if a message containing the real-time brightness signal is received before the timer triggers, the measurement is immediately stopped and the current actual elapsed time is locked, followed by a smooth brightness transition.

[0014] Furthermore, a smooth brightness transition is performed to eliminate the difference between the pre-brightness and the brightness commanded by the bus. The difference between the real-time brightness signal and the initial pre-brightness value of the current output is calculated, and the output is gradually adjusted according to a preset step value at a preset time interval until the output value matches the target value corresponding to the real-time brightness signal.

[0015] Furthermore, S200 includes a timeout fault-tolerant handling mechanism. If the dynamic synchronization timer is triggered but the system still has not received a valid real-time brightness signal, a synchronization timeout event is determined to have occurred. In this case, the current initial pre-brightness value remains unchanged, and the actual time elapsed recorded this time is marked as invalid. This invalid mark is used to indicate that subsequent processes should skip the calculation of the adaptive synchronization timeout, preventing invalid data from affecting the accuracy of the adaptive synchronization timeout calculation.

[0016] Furthermore, in the above S400, in response to the power-off warning event, the current value of the real-time brightness signal at the moment of power-off is obtained, and the current value is processed using a state coding formula to generate a memory brightness value for storage.

[0017] Furthermore, in the aforementioned S400, the process of updating the adaptive synchronization timeout based on the recorded actual time consumption includes data filtering and correction logic. First, the absolute value of the difference between the actual time consumption and the historical average time consumption benchmark is calculated to obtain the single measurement deviation value. Based on the magnitude of this deviation value, the data is classified: if the deviation value is less than or equal to a preset fluctuation tolerance threshold, or greater than a preset structural change threshold, the actual time consumption is directly used as the algorithm input value; if the deviation value is between the fluctuation tolerance threshold and the structural change threshold, the actual time consumption is clamped and corrected to generate a restricted algorithm input value. The fluctuation tolerance threshold is used to assess the dispersion of the measurement data, and the structural change threshold is used to determine whether the system is in the initial learning phase or whether the network environment has changed.

[0018] Furthermore, using the algorithm input value or the restricted algorithm input value, an exponentially weighted moving average algorithm is employed to calculate the updated adaptive synchronization timeout. This algorithm, through weighted calculation, achieves tracking and smooth updates of network latency changes.

[0019] Furthermore, the persistent data also includes historical ambient light states. In S100, when valid historical data is determined to exist, the current ambient light state is obtained and compared with the historical ambient light states read from the storage module. If they match, the initial pre-lighting brightness value is directly determined using the read data; if they do not match, it indicates that the ambient lighting conditions have changed, so a pre-stored ambient light mapping table is called to find the brightness value corresponding to the current ambient light state as the initial pre-lighting brightness value, thereby achieving adaptive adjustment of brightness based on the environment.

[0020] This invention provides a method for solving the problem of backlight flickering when a switch is powered on. It has the following beneficial effects:

[0021] 1. This invention reads the valid historical data in the storage module immediately after the system is powered on and directly uses the memory brightness value to perform instant pre-lighting without waiting for the external bus signal to be established, thereby eliminating the backlight response lag caused by bus communication delay. At the same time, with the smooth transition processing after receiving the real-time signal, it effectively avoids visual flicker caused by the mismatch between the initial brightness and the actual control signal, and ensures the continuity of backlight brightness during the startup phase.

[0022] 2. This invention establishes an adaptive synchronization timeout mechanism based on actual time consumption statistics. It can measure the synchronization time of bus signals in real time during power-on and dynamically update the adaptive synchronization timeout length in combination with historical data. This allows the system to automatically adapt to the timing fluctuations of the vehicle network environment. Under the premise of ensuring the signal synchronization success rate, it automatically optimizes the waiting window length and avoids invalid waiting caused by setting the fixed timeout parameter too long or synchronization failure caused by setting it too short.

[0023] 3. This invention employs a dual data filtering logic that includes fluctuation tolerance threshold and structural change threshold to classify and clamp the collected actual time-consuming data. By distinguishing between normal network fluctuations, occasional abnormal jitters, and structural changes in the network environment, it effectively eliminates the interference of abnormal data on the algorithm model, ensuring the convergence and stability of adaptive control parameters during long-term operation. Attached Figure Description

[0024] Figure 1 This is a structural block diagram of a switch control system according to an embodiment of the present invention;

[0025] Figure 2 This is a flowchart illustrating the overall workflow of a method according to an embodiment of the present invention.

[0026] Among them, 10 is the control module; 20 is the storage module; 30 is the power management module; 40 is the communication module; and 50 is the driver module. Detailed Implementation

[0027] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] See attached document Figure 1The method for solving the backlight flickering problem when a switch is powered on, provided by this invention, can be implemented on the switch control system. The switch control system includes: a control module 10, a storage module 20, a power management module 30, a communication module 40, and a drive module 50.

[0029] The control module 10 is electrically connected to the storage module 20, the power management module 30, the communication module 40, and the drive module 50, respectively, and is used to execute the logical operations and control instructions of the method of the present invention. In one specific embodiment, the control module 10 may be a microcontroller (MCU).

[0030] The storage module 20 is connected to the control module 10 and is used for persistent data storage. Specifically, the storage module 20 is used to store historical backlight brightness states and dynamic synchronization timeout parameters. In one specific embodiment, the storage module 20 may be a non-volatile memory (NVM), such as an electrically erasable programmable read-only memory (EEPROM) or flash memory.

[0031] The power management module 30 provides operating power to the control module 10 and monitors the external power supply status. In some embodiments, the power management module 30 can provide a power-down warning signal to the control module 10 before the external power supply is completely cut off.

[0032] The communication module 40 is used to transmit and receive data between the control module 10 and an external bus, such as receiving backlight brightness control signals from an external controller. In one specific embodiment, the communication module 40 may be a LIN bus transceiver or a CAN bus transceiver.

[0033] The driving module 50 is used to adjust the current or voltage supplied to the backlight unit according to the control signal output by the control module 10, thereby controlling its light emission brightness. In one specific embodiment, the control signal may be a pulse width modulation (PWM) signal.

[0034] See attached document Figure 2 This invention provides a method for solving the problem of backlight flickering when a switch is powered on, comprising the following steps:

[0035] S100: After the system is powered on, it determines whether there is valid historical data in the storage module to determine a set of initial control parameters; if not, it generates preset baseline operating parameters as the set of initial control parameters.

[0036] S200 performs instant pre-lighting based on the initial control parameters and starts a dynamic synchronization timer to wait for the bus, so as to obtain the real-time brightness signal after receiving the bus signal, and at the same time record the actual time of this synchronization.

[0037] S300 continuously controls the backlight brightness based on the real-time brightness signal and the subsequently received bus signals, and monitors the system power status in the process to capture power-off warning events.

[0038] S400, in response to a power-down warning event, captures the current backlight brightness status and updates the dynamic synchronization timeout parameter based on the actual time elapsed recorded in step S200, and finally writes the persistent data containing the updated parameters into the storage module.

[0039] The following section will elaborate on the technical principles and specific implementation methods involved in each step of the above process.

[0040] In step S100, the control module 10 performs the following sub-steps to obtain and initialize the key parameters required for system operation:

[0041] S101, Read the storage module status and data. After the system powers on and resets, the control module 10 accesses a specific address region in the storage module 20 via the bus interface. This specific address region is pre-allocated to store system status information, including a validity flag bit for identifying the initialization state and historical operating data. This historical operating data specifically includes encoded memory brightness values ​​and adaptive synchronization timeout durations. For the specific read / write operations of the storage module 20, such as the I2C or SPI communication timing, those skilled in the art can obtain the details from the specifications of the selected memory chip, and will not be elaborated here.

[0042] S102, Verify the validity of the data. Control module 10 reads the validity flag and performs logical judgment. If the flag is a preset valid value (e.g., 0xAA) and the cyclic redundancy check (CRC) result of the read data is correct, then it is determined that there is valid historical data in storage module 20, and the system proceeds to sub-step S103; if the flag is a default value (e.g., 0xFF or 0x00) or the verification fails, then it is determined that there is no valid historical data, and the system proceeds to sub-step S104.

[0043] S103, recover the brightness target based on the state decoding formula. When valid historical data is determined to exist, the control module 10 uses the read memory brightness value and adaptive synchronization timeout as the current initial control parameters. In order to restore the stored encoded value to the actual control target, the control module 10 executes the state decoding formula for calculation.

[0044] The state decoding formula is:

[0045] ;

[0046] in, This represents the initial pre-brightness value, which is the target brightness value that the system uses to drive the backlight in real time. This represents the memory brightness value read from storage module 20; constant 1 is the encoding offset.

[0047] Through this calculation, the control module 10 maps the stored value range back to the valid brightness control value range. For example, if the read value is... If the value is 1, then the calculated result is... A value of 0 corresponds to the backlight being off; if the value read is 0... If the value is 31, then the calculated result is... The value is 30, corresponding to 30% backlight brightness. This mechanism ensures that the actual brightness of 0 is represented as a non-zero value in storage, thus avoiding confusion with the default state after the storage module 20 is erased.

[0048] S104, Generate baseline operating parameters. When it is determined that no valid historical data exists, the control module 10 calls the default configuration pre-stored in the internal program memory to generate a set of baseline operating parameters as initial control parameters. Specifically, the control module 10 will... A general safe brightness value (e.g., 30) is assigned to ensure adequate basic lighting during the first nighttime startup. Simultaneously, the adaptive synchronization timeout is assigned a preset maximum timeout threshold (e.g., 2000 milliseconds). This maximum timeout threshold is set to be greater than the startup delay time of the target vehicle bus network under the worst operating conditions, ensuring the system has sufficient time to wait for external signal synchronization during initial operation. After assigning the parameters, the control module 10 writes the above parameters and validity flags into the storage module 20, completing the system initialization configuration.

[0049] In step S200, based on the acquired initial control parameters, the control module 10 performs the following sub-steps to achieve real-time response of the backlight and intelligent synchronization of the bus signals:

[0050] S201, execute backlight driving and instant pre-lighting. After acquiring the initial parameters, the control module 10 does not need to wait for external bus signals and immediately performs backlighting based on the initial pre-lighting brightness value. Configure the driver module 50. Specifically, the control module 10, according to a preset linear mapping relationship, will... This is converted to the corresponding pulse width modulation (PWM) duty cycle value. For example, if the PWM resolution is 1000 levels, and If the value is 30 (corresponding to 30% brightness), then the value written to the PWM register is 300. The control module 10 writes the calculated value into the PWM control register, and the drive module 50 responds to the PWM signal, driving the backlight unit to light up at the target brightness. This process is completed in the initial stage of system power-on, ensuring the immediate availability of the backlight function.

[0051] S202, Configure and start the dynamic timeout timer. While performing pre-lighting, the control module 10 uses the adaptive synchronization timeout duration loaded from the storage module 20 to set a timeout monitoring mechanism. The control module 10 loads the value of the adaptive synchronization timeout duration into the microcontroller's hardware timer compare register, or sets a software countdown variable based on the system time base, and starts the timer. This timeout timer defines the effective time window for the system to wait for external bus signals; its duration is dynamically adjusted based on historical system operating data, thus adapting to timing fluctuations in the vehicle bus network under different operating conditions.

[0052] S203, Initiate actual time measurement. Synchronously with the dynamic timeout timer, control module 10 initiates timing operation to measure the actual synchronization time. The starting point for this timing is defined as the moment when the system completes power-on initialization and begins listening to the bus. In practice, this measurement can reuse the count value of the aforementioned hardware timer, or it can be achieved by reading the current value of the system tick timer (SysTick). This measurement value... It will be temporarily stored for subsequent evaluation of the bus communication quality of the current cycle and as the basis for updating the adaptive timeout parameters.

[0053] S204, enter signal monitoring state. After completing the above configuration, the control module 10 begins monitoring data frames on the external bus via the communication module 40. During this period, the backlight remains at the setting specified by the signal monitoring module. The system is in a pre-lighting state, waiting for the real-time brightness signal. The synchronization phase. If a valid real-time brightness signal is received before the timeout timer triggers. The system will then execute the subsequent synchronization and parameter update process; if the timeout timer is triggered but no signal is received, the system will execute timeout fault tolerance processing.

[0054] Following step S204, the control module 10 performs the following processing steps depending on whether a valid signal is received within the timeout window:

[0055] S205, capture the signal and stop timing. Before the dynamic timeout timer triggers an interrupt, the control module 10 successfully receives the first frame containing a valid real-time brightness signal via the communication module 40. Upon receiving the message, immediately stop tracking the actual synchronization time. The timing operation is performed. The control module 10 reads the current timer count value and stores it as the actual synchronization time for this startup cycle. This value objectively reflects the physical communication latency in the current vehicle network environment and will serve as the input for subsequent updates to adaptive parameters.

[0056] S206, perform a smooth brightness transition. This is done after acquiring the real-time brightness signal. Then, the control module 10 calculates the real-time value and the currently output initial pre-brightness value. The difference between the current PWM duty cycle and the target value. If the difference is non-zero, the control module 10 initiates a gradual adjustment procedure to eliminate the brightness step. Specifically, the control module 10 adopts a step-by-step approximation strategy, performing adjustments at preset time intervals (e.g., every 10ms): if the difference between the current PWM duty cycle and the target value is greater than a preset step value (e.g., 1% duty cycle), the step value is increased or decreased in the target direction; if the difference is less than or equal to the step value, the PWM duty cycle is directly updated to the target value. This logic continues until the output brightness is equal to the target value. The process stops when all values ​​are completely equal. After the transition is complete, the system switches to normal operation mode, and the output of the drive module 50 will follow the subsequent bus commands received by the communication module 40 in real time.

[0057] S207, execute timeout fault tolerance processing. If the dynamic timeout timer is triggered (i.e., the timing value reaches the adaptive synchronization timeout duration) and the communication module 40 still has not received a valid real-time brightness signal. Upon receiving the signal, control module 10 determines that a synchronization timeout event has occurred. In this case, control module 10 will record the actual synchronization time taken in this measurement. Set to an invalid state flag. This invalid state flag is used to indicate that subsequent parameter update steps skip the calculation of the adaptive synchronization timeout duration to prevent abnormal data from interfering with historical statistical values. Simultaneously, the control module 10 maintains the current initial pre-brightness value. This remains unchanged, ensuring that the backlight can still provide basic illumination indication functions even when external communication has not yet been established.

[0058] In step S300, the system enters normal operating mode, and the control module 10 executes the following sub-steps to maintain functional operation and monitor power status:

[0059] S301, execute routine operation control. After signal synchronization is completed, control module 10 enters the main loop processing logic. During this stage, control module 10 continuously parses the bus messages received by communication module 40, extracting the real-time backlight control commands contained within. Based on a preset dimming curve, control module 10 converts the extracted command values ​​into the corresponding pulse width modulation (PWM) duty cycle and updates the control register of drive module 50, thereby adjusting the luminous intensity of the LED backlight. The bus message parsing protocol can be implemented by those skilled in the art based on the specific network communication matrix of the vehicle, and will not be elaborated upon here.

[0060] S302, Configure a power-down warning monitoring mechanism. To gain a time window for data writing after external power is cut off, the control module 10 configures a corresponding monitoring mechanism to capture power-down warning events. In one specific implementation, the control module 10 uses the low-voltage detection (LVD) circuit integrated in the power management module 30 as a trigger source. When the input voltage drops to a preset threshold (e.g., 9 volts), the power management module 30 sends a hardware interrupt signal to the control module 10, triggering a power-down warning event. In another implementation, the control module 10 monitors the power management status bit in the bus message through software polling. When it receives a command indicating that the vehicle is about to go into sleep mode or the ignition switch is turned off, it determines that a power-down warning event has been triggered.

[0061] S303 responds to the warning and suspends routine tasks. Upon detecting a power-down warning event, the control module 10 immediately responds and switches to power-down protection mode. In this mode, the control module 10 disables all peripheral interrupts except for critical data writing and stops executing non-critical tasks such as key scanning and LED dynamic effect rendering to reduce system power consumption. At this time, the system relies on the energy storage capacitor configured in the power management module 30's peripheral circuitry to maintain a short-term power supply, and the control module 10 utilizes this limited time window to prioritize subsequent data persistence operations.

[0062] In step S400, the control module 10 executes the following sub-steps in power-down protection mode to achieve system state memory and self-optimization of control parameters:

[0063] S401, capture the last state and execute state encoding. Control module 10 first reads the actual operating state of the backlight at the current moment to obtain the real-time brightness signal. The current value. To adapt to the data characteristics of the storage module 20 and distinguish between valid data and erased states, the control module 10... The state encoding formula is executed to generate the memory brightness value to be stored. The state coding formula is:

[0064] ;

[0065] in, The encoded memory brightness value will be written as historical data into storage module 20; Represents the real-time brightness signal value received by the system at the moment of power-off; a constant. This is the encoding offset. Through this encoding operation, the control module 10 ensures that all valid brightness states (including the off state with a brightness of 0) correspond to non-zero values ​​in storage. For example, when When it is 0, for This avoids misinterpreting data 0 as an uninitialized blank state of the memory when reading it again upon power-on.

[0066] S402, perform adaptive update of dynamic timeout parameters. After completing brightness status capture, control module 10 checks the actual synchronization time recorded in this startup cycle. The validity flag is used. If the flag is valid, the control module 10 uses this measurement data, combined with the adaptive synchronization timeout duration recorded in the current storage module 20 (denoted here for ease of formula expression), to determine the validity of the measurement data. The timeout parameter for the next period is calculated using an exponentially weighted moving average algorithm.

[0067] To prevent the safety margin from being repeatedly accumulated during iterative calculations, leading to parameter divergence, control module 10 uses the sum of the current measurement value and the safety margin as the target value for the current period, and smooths it against historical values. The formula for the exponentially weighted moving average algorithm is modified as follows:

[0068] ;

[0069] in, This represents the calculated updated adaptive synchronization timeout. This represents the actual synchronization time measured during this startup cycle; This represents the current adaptive synchronization timeout in the system before this update; This represents a safety margin constant (e.g., 50 milliseconds), which is the fault tolerance window that the system expects to reserve above the actual time elapsed. This represents the weighting factor (e.g., 0.125).

[0070] In practical implementation, to improve the computational efficiency of the microcontroller, the control module 10 can use fixed-point displacement arithmetic to implement the above algorithm. For example, when When the value is 0.125 (i.e., 1 / 8), the calculation logic is as follows:

[0071] ;

[0072] in, This represents the binary right shift operator.

[0073] Through this adaptive algorithm, the system can stably adjust the timeout threshold according to the actual changing trend of the vehicle network environment, and avoid parameter drift caused by algorithm logic while ensuring the synchronization success rate.

[0074] S403, Perform data writing and verification. After completing the above calculations, the control module 10 will store the encoded memory brightness value. and the updated adaptive synchronization timeout duration The data is packaged into persistent data. The control module 10 writes the data packet and its corresponding checksum (such as CRC value) into the non-volatile storage area of ​​the storage module 20 via the bus interface, overwriting the old historical data. After writing is complete, the control module 10 can perform a readback verification operation to confirm that the data has been successfully persisted. Then, the system ends all operations and enters a low-power sleep or power-off state.

[0075] Extended embodiments of the specific implementation:

[0076] Enhanced pre-lighting strategy based on ambient light perception:

[0077] Building upon the basic memory recovery mechanism, this embodiment introduces logic for determining external ambient lighting conditions to avoid unsuitable pre-lighting brightness caused by drastic changes in ambient light during vehicle parking (e.g., transitioning from night to day). The control module 10, in conjunction with the ambient light sensor module 60, executes the following sub-steps:

[0078] S501, Expand the historical state storage structure. During the data persistence process in step S400, the control module 10, in addition to storing the memory brightness value... In addition, the current readings of the ambient light sensor module 60 are read via a bus or analog interface. The control module 10 processes these readings into historical ambient light status. (For example: use 0 to identify dark environment and 1 to identify bright environment), and write it synchronously to the non-volatile storage area of ​​storage module 20.

[0079] S502, acquire the current ambient light and perform a consistency comparison. In the system power-on initialization step S100, the control module 10 acquires the current ambient light state of the ambient light sensor module 60 in real time while reading data from the storage module 20. Subsequently, the control module 10 will collect the data. Read from storage module 20 Perform a logical comparison.

[0080] S503, brightness decision based on environmental conditions. The control module 10 dynamically selects the initial pre-lighting brightness value based on the comparison results. Assignment strategy:

[0081] like and Consistent (e.g., both are in night mode) indicates that the ambient lighting conditions when the vehicle restarts are similar to those when it was last shut down. Control module 10 maintains the basic strategy and directly uses the decoded data. As This allows for the accurate restoration of the user's historical brightness settings.

[0082] like and Inconsistencies (e.g., the last shutdown was at night, and this startup is during the day) indicate a significant change in ambient light, rendering historical data inapplicable. In this case, control module 10 ignores the data being read. Instead, it calls the internally stored ambient light mapping table to look up the current ambient light. The corresponding preset recommended brightness value is assigned to... This strategy effectively solves the problem of insufficient backlighting when vehicles are parked in tunnels at night and then started up the next day, achieving intelligent start-up that adapts to the environment.

[0083] Adaptive filtering for communication quality fluctuations:

[0084] To prevent occasional extreme value jitter in the bus network (such as a single abnormally high delay caused by bus arbitration failure) from polluting the historical statistical characteristics of the adaptive algorithm, the control module 10 adds a preprocessing filtering step before executing the parameter update in step S402.

[0085] S601, calculate the deviation reference baseline. This is after obtaining the actual synchronization time for this startup cycle. Then, control module 10 first determines the reference benchmark for comparison. This is based on the stored adaptive synchronization timeout duration (hereinafter referred to as... for ease of description). The safety margin is already included. Direct comparison will lead to errors. Therefore, control module 10 first... Subtract the preset safety margin constant Restore the historical average time benchmark .

[0086] S602, Perform deviation calculation and judgment. Control module 10 calculates the actual synchronization time for this measurement. Compared with historical average time benchmark The absolute value of the difference between them is denoted as the single measurement deviation value. Subsequently, the control module 10 will... With the preset fluctuation tolerance threshold (e.g., 100 milliseconds) are compared to assess the dispersion of the measurement data.

[0087] S603, Generate restricted algorithm input values. Control module 10 classifies the input data based on the comparison results, generating the final algorithm input values ​​used for the exponentially weighted moving average algorithm. :

[0088] Normal fluctuation range: if Less than or equal to The measurement was determined to be within the normal fluctuation range, and control module 10 directly... Assign to .

[0089] Structural change / initialization range: If A change exceeding a preset structural change threshold (e.g., 500 milliseconds) indicates that the system is in the initial learning phase or that the network environment has undergone a fundamental change (rather than occasional jitter). To ensure that the algorithm can quickly converge to the new operating point, the control module 10 bypasses clamping processing and directly... Assign to .

[0090] Abnormal jitter range: If Greater than Furthermore, if the value is less than or equal to the structural change threshold, the measurement is determined to be an occasional abnormal fluctuation. To reduce the impact of this outlier on the long-term learning curve, the control module 10 clamps and corrects the input value. Specifically, if... Greater than Then Set as Plus The sum; if Less than Then Set as minus difference.

[0091] Through the above logic, the system can filter out occasional spikes during steady-state operation and can also achieve rapid self-adaptation in the initial stage or when the environment changes drastically.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions 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. A method for solving the problem of backlight flickering when a switch is powered on, characterized in that, Includes the following steps: S100. After the switch control system is powered on, determine whether there is valid historical data in the storage module and determine the initial control parameters. The initial control parameters include at least the initial pre-brightness value and the adaptive synchronization timeout. If no valid historical data exists, then preset baseline operating parameters are generated as the initial control parameters; S200. Based on the initial control parameters, perform instant pre-lighting and start the dynamic synchronization timer to wait for the bus, so as to obtain the real-time brightness signal after receiving the bus signal, and record the actual time consumption of this synchronization. S300: Continuously control the backlight brightness based on the real-time brightness signal and the subsequently received bus signal, and monitor the power status of the switch control system during this process to capture power-off warning events. S400: In response to the power-down warning event, capture the current backlight brightness state, update the adaptive synchronization timeout based on the actual time consumed, and finally write the persistent data containing the updated parameters into the storage module.

2. The method for solving the problem of backlight flickering upon power-up of a switch according to claim 1, characterized in that, In step S100, determining whether valid historical data exists in the storage module includes the following steps: Read the validity flag and historical operation data of a specific address region of the storage module; If the validity flag is a preset valid value and the cyclic redundancy check result of the read data is correct, then it is determined that there is valid historical data, and the initial control parameters are calculated based on the historical running data. If the validity flag is a default value or the cyclic redundancy check result is incorrect, it is determined that there is no valid historical data, the initial pre-lighting brightness value is assigned to a general safe brightness value, and the adaptive synchronization timeout is assigned to a preset maximum timeout threshold. The maximum timeout threshold is set to be greater than the startup delay time of the vehicle bus network.

3. The method for solving the problem of backlight flickering upon power-up of a switch according to claim 2, characterized in that, The historical operating data includes the memory brightness values; The initial control parameters are calculated based on the historical operating data, specifically by using a state decoding formula to calculate the initial pre-lighting brightness value.

4. The method for solving the problem of backlight flickering upon power-up of a switch according to claim 1, characterized in that, In step S200, the steps of performing instantaneous pre-lighting based on the initial control parameters and starting a dynamic synchronization timer to wait for the bus include: The initial pre-brightness value is converted into a pulse width modulation duty cycle value to drive the backlight unit to light up. The adaptive synchronization timeout is loaded into the dynamic synchronization timer to start the countdown, and the measurement of the actual time elapsed is started synchronously. If a message containing the real-time brightness signal is received before the dynamic synchronization timer is triggered by monitoring the external bus, the measurement of the actual time elapsed is immediately stopped, and a smooth brightness transition is performed.

5. A method for solving the problem of backlight flickering upon power-up of a switch, as described in claim 4, characterized in that, The specific steps for performing a smooth brightness transition include: Calculate the difference between the real-time brightness signal and the currently output initial pre-brightness value; Adjustments are performed periodically according to a preset time interval. If the difference is greater than a preset step value, the step value is increased or decreased in the target direction. If the difference is less than or equal to the step value, the output is directly updated to the target value corresponding to the real-time brightness signal.

6. The method for solving the problem of backlight flickering upon power-up of a switch according to claim 4, characterized in that, Step S200 also includes timeout fault tolerance processing: If the dynamic synchronization timer is triggered but no valid real-time brightness signal is received, a synchronization timeout event is determined to have occurred. The current initial pre-lighting brightness value is kept unchanged, and the actual time consumption recorded this time is marked as invalid, indicating that the subsequent step S400 skips the calculation of the adaptive synchronization timeout.

7. The method for solving the problem of backlight flickering upon power-up of a switch according to claim 1, characterized in that, In step S400, the step of capturing the current backlight brightness state in response to the power-down warning event includes the following steps: The current value of the real-time brightness signal at the moment of power-off is obtained, and the current value is processed into a memory brightness value using a state coding formula.

8. A method for solving the problem of backlight flickering upon power-up of a switch, as described in claim 1, characterized in that, In step S400, updating the adaptive synchronization timeout based on the recorded actual time consumption specifically includes: Calculate the absolute value of the difference between the actual time consumption and the historical average time consumption benchmark, and record it as the single measurement deviation value; If the single measurement deviation value is less than or equal to the preset fluctuation tolerance threshold, or greater than the preset structural change threshold, then the actual time consumed is used as the algorithm input value. If the single measurement deviation value is greater than the fluctuation tolerance threshold and less than or equal to the structural change threshold, then the actual time consumption is clamped and corrected to generate a restricted algorithm input value. Calculate the updated adaptive synchronization timeout using the algorithm input value or the restricted algorithm input value; The fluctuation tolerance threshold is used to assess the dispersion of the measurement data; The structural change threshold is greater than the fluctuation tolerance threshold, which is used to determine whether the switch control system is in the initialization learning phase or whether the network environment has changed.

9. A method for solving the problem of backlight flickering upon power-up of a switch, as described in claim 8, characterized in that, The calculation of the updated adaptive synchronization timeout using the algorithm input value or the restricted algorithm input value specifically employs an exponentially weighted moving average algorithm.

10. A method for solving the problem of backlight flickering upon power-up of a switch, as described in claim 1, characterized in that, The persistent data mentioned in step S400 also includes historical ambient light conditions; In step S100, when it is determined that the valid historical data exists, the determination of the initial control parameters further includes: Obtain the current ambient light state and compare it with the historical ambient light state read from the storage module; If the current ambient light state is consistent with the historical ambient light state, the initial pre-lighting brightness value is determined using the data read from the storage module; If the current ambient light state is inconsistent with the historical ambient light state, then the pre-stored ambient light mapping table is called to find the brightness value corresponding to the current ambient light state as the initial pre-lighting brightness value.