An automatic brightness control device and control method for a lighthouse

By combining a photoresistor and a brightness adjustment module, and utilizing a microcontroller and a buffer circuit, the automatic brightness adjustment of railway lighthouses is achieved. This solves the problems of lighthouses not being able to be turned on in a timely manner and the brightness not being adjustable in existing technologies, thereby improving the operational efficiency and safety of railway lighthouses.

CN122138319APending Publication Date: 2026-06-02CHINA RAILWAY WUHAN SURVEY & DESIGN CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA RAILWAY WUHAN SURVEY & DESIGN CO LTD
Filing Date
2026-04-27
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

The existing railway lighthouse control system cannot be activated in a timely manner and its brightness cannot be adjusted, resulting in poor operational performance.

Method used

A photoresistor is used to control the switching of AC power and lighthouse signal lights. Combined with a brightness adjustment module and a microcontroller module, it is connected to an external control platform through a wireless communication module to realize automatic adjustment of the lighthouse brightness. During the brightness adjustment process, a buffer circuit is used to provide static clamping voltage division to ensure electrical stability.

Benefits of technology

It enables timely automatic start and stop of railway lighthouses and flexible brightness control, ensuring smooth transition of light effects during brightness switching and the safety of hardware equipment, optimizing the operation of railway lighthouses, and providing reliable route guidance for safe train operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122138319A_ABST
    Figure CN122138319A_ABST
Patent Text Reader

Abstract

This invention provides an automatic brightness control device and method for lighthouses. The device includes a lighting control module, a brightness adjustment module, a microcontroller module, and a wireless communication module. The lighting control module uses a photoresistor to control the switching between the AC power supply and the signal lights on the lighthouse. The brightness adjustment module uses multiple resistors connected to a circuit to control the brightness of the signal lights on the lighthouse. The microcontroller module is connected to an external control platform via the wireless communication module. The brightness adjustment module includes a buffer circuit, which includes a buffer drive input terminal, a buffer coil, and a buffer switch terminal connected in series with a transition resistor. The buffer drive input terminal is connected to the microcontroller module, and the buffer switch terminal is connected to the lighting control module to provide static clamping voltage division during the switching of the resistor-connected circuit. This invention has the effects of timely automatic start and stop of railway lighthouses and flexible control of lighthouse brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of railway lighthouse control technology, specifically relating to an automatic lighthouse brightness control device and control method. Background Technology

[0002] Railway lighthouses are a special type of lighthouse, typically located alongside railway tracks to guide trains safely. Their primary function is to provide route guidance to train drivers at night or in low visibility conditions, ensuring trains travel safely and accurately along the tracks. Railway lighthouses are particularly important in complex sections of track, such as intersections, switch areas, or bridges. The design of railway lighthouses is generally simple, consisting of a light source, a lens, and a supporting structure. The light source can be a traditional lamp or a modern LED light. The lens is used to focus and enhance the brightness of the light source. The supporting structure ensures the stability and height of the lighthouse so that the light can cover the necessary area. Railway lighthouses are usually located on both sides of the tracks, placed in critical locations as needed, such as at track bends, near important landmarks, or near hazardous areas. The spacing between lighthouses depends on factors such as the radius of curvature of the track, visibility conditions, and train speed. Currently, lighthouses are often controlled manually or by timed activation, which may not be timely and may not allow for brightness adjustment, resulting in poor operational effectiveness. Summary of the Invention

[0003] This invention provides an automatic lighthouse brightness control device and control method to solve the above-mentioned technical problems.

[0004] In a first aspect, the present invention provides an automatic brightness control device for a lighthouse, comprising: a light control module, a brightness adjustment module, a microcontroller module, and a wireless communication module; the light control module uses a photoresistor to control the on / off connection between an AC power supply and a signal light on the lighthouse, and the light control module is electrically connected to the brightness adjustment module; the brightness adjustment module uses multiple resistors connected to a circuit to control the brightness of the signal light on the lighthouse, and the brightness adjustment module is electrically connected to the microcontroller module; the microcontroller module is connected to the wireless communication module, and the microcontroller module is connected to an external control platform through the wireless communication module; The brightness adjustment module includes a buffer circuit, which includes a buffer drive circuit, a buffer relay, and a transition resistor. The input terminal of the buffer drive circuit is connected to the microcontroller module, and the output terminal of the buffer drive circuit is connected to the coil of the buffer relay. The switch of the buffer relay is connected to the illumination control module through the transition resistor. The buffer circuit is used to provide static clamping voltage division during the switching of the resistor connection circuit.

[0005] Optionally, the illumination control module includes a signal light L1, a bidirectional thyristor VS, resistors R3 and R4, a variable resistor R6, resistors R7 and R8, a capacitor C6, a photoresistor Rcds, a diode VD1, a bidirectional diode VD2, and an optocoupler OP1. One end of the signal lamp L1 is connected to one end of the AC power supply, one end of resistor R3, one end of resistor R4, the first stationary terminal of variable resistor R6, and the sliding terminal of variable resistor R6. The other end of the signal lamp L1 is connected to the negative terminal of diode VD1 and the T2 pin of the bidirectional thyristor VS. The T1 pin of the bidirectional thyristor VS is electrically connected to the brightness adjustment module. The positive terminal of diode VD1 is connected to the negative terminal of the diode in optocoupler OP1. The positive terminal of the diode in optocoupler OP1 is connected to the other end of resistor R3. The bidirectional thyristor in optocoupler OP1... One end is connected to the other end of resistor R4. The other end of the bidirectional thyristor in the optocoupler OP1 is connected to the second stationary terminal of the variable resistor R6 and one end of resistor R7. The other end of resistor R7 is connected to one end of capacitor C6, one end of resistor R8, and one end of bidirectional diode VD2. The other end of bidirectional diode VD2 is connected to the G pin of bidirectional thyristor VS. The other end of resistor R8 is connected to one end of photoresistor Rcds. The other end of photoresistor Rcds is connected to the brightness adjustment module, the other end of the AC power supply, and the other end of capacitor C6. The buffer switch is connected between the T1 pin of the bidirectional thyristor VS and the other end of the photoresistor Rcds.

[0006] Optionally, the microcontroller module uses a microcontroller chip; the wireless communication module includes a wireless communication module, and the serial communication interface of the wireless communication module is electrically connected to the microcontroller chip. The brightness adjustment module includes N+1 resistor access circuits, each of which is electrically connected to both the illumination control module and the microcontroller module. Different resistor access circuits have different resistance values ​​connected to the illumination control module. Each resistor access circuit includes a relay drive circuit, a relay K2, and n series resistors (n=0,1,…,N+1) disposed on the switch terminal of the relay K2. The input terminal of the relay drive circuit is connected to the microcontroller chip, and the output terminal is connected to the coil of the relay K2. One end of the switch terminal of the relay K2 is connected to the T1 pin of the bidirectional thyristor VS, and the other end is connected to the n series resistors. The resistor pin furthest from the other end of the switch terminal of the relay K2 is connected to the other end of the photoresistor Rcds.

[0007] In a second aspect, the present invention also provides a method for automatic brightness control of a lighthouse, applied to the automatic brightness control device for a lighthouse described in the first aspect, the method comprising the following steps: In the microcontroller module, a light dynamic hysteresis spectrum is constructed that includes external environmental data and a light response model with preset light sensing inertia and light intensity change response rate. A hardware fatigue state matrix is ​​also constructed based on the multidimensional stress state of each relay in the brightness adjustment module. The microcontroller module continuously collects the instantaneous voltage division data of the photoresistor in the illumination control module as the external environment data in the photodynamic hysteresis spectrum, and calculates the target state value of the instantaneous fluctuation of the immune light intensity by performing real-time numerical integration on the illumination response model. The microcontroller module compares the changing trend of the target state value in the preset brightness dimming threshold space and generates an electrical switching command for the corresponding target brightness level. When a gear shifting action is detected based on an electrical switching command, the buffer circuit is closed first at the zero-crossing point based on AC phase monitoring, so that the optocoupler control terminal in the lighting control module is forced to clamp to a preset transition level to isolate electrical oscillations caused by a sudden change in the circuit topology of the control device. During the closed period of the buffer circuit, the cumulative fatigue contribution of multiple target resistance topology paths in the brightness adjustment module is analyzed based on the hardware fatigue state matrix. The risk relays and health relays in the brightness adjustment module are distinguished according to the cumulative fatigue contribution, and the relay combination topology with the best overall stress is selected. Disconnect the relay corresponding to the current brightness level in the brightness adjustment module and close the relay combination topology. At the next zero crossing point, disconnect the buffer circuit and update the action record data of the relay combination topology in the hardware fatigue state matrix.

[0008] Optionally, the step of calculating the target state value of the instantaneous fluctuation of the immune light intensity by performing real-time numerical integration on the light response model includes the following steps: Input external environment data into the outer boundary node of the illumination response model; A differential propagation grid is constructed based on the preset illumination sensing inertia and light intensity change response rate of the illumination response model; In the differential transmission grid, the Runge-Kutta algorithm is used to numerically integrate the transmission process of external environmental data to the internal nodes of the differential transmission grid, and the numerical integration result is obtained. Extract the integral results of the center node of the differential propagation grid from the numerical integration results, and calculate the target state value of the immune transient fluctuation.

[0009] Optionally, the step of numerically integrating the transmission process of external environment data to the internal nodes of the differential transmission grid using the Runge-Kutta algorithm to obtain the numerical integration result includes the following steps: Obtain the initial light intensity change gradient vector of each internal node in the differential propagation grid at the current sampling time; Substitute the initial light intensity change gradient vector and external environment data into the first-order partial derivative formula of the Runge-Kutta algorithm to calculate the first slope prediction value. The second and third slope predictions are calculated based on the first slope prediction and at half a step of the differential propagation grid. The fourth slope prediction value is calculated at the full step length of the differential propagation grid based on the third slope prediction value; The target step size update is obtained by weighting the predicted values ​​of the first slope, the second slope, the third slope, and the fourth slope. The target step size update is superimposed on the initial light intensity change gradient vector to complete the real-time numerical integration of the transmission process of external environment data to internal nodes, and the numerical integration result is obtained.

[0010] Optionally, obtaining the initial light intensity change gradient vector of each internal node in the differential propagation grid at the current sampling time includes the following steps: Retrieve the internal node illuminance distribution matrix of the differential transmission mesh at the previous sampling time; The spatial Laplacian operator is used to perform spatial second derivative operations on the illuminance distribution matrix of the internal nodes to extract the spatial second derivative matrix; The light intensity change responsivity of the illumination response model is multiplied by the spatial second derivative matrix to obtain the illumination state diffusion distribution. By combining external environmental data, the boundary conditions of the light diffusion distribution are corrected to generate a corrected local light intensity transformation matrix. The corrected local light intensity transformation matrix is ​​converted into the initial light intensity change gradient vector of each internal node at the current sampling time.

[0011] Optionally, when a gear shifting action is detected based on an electrical switching command, the buffer circuit is preferentially closed at the zero-crossing point based on AC phase monitoring to force the optocoupler control terminal in the lighting control module to be clamped to a preset transition level to isolate electrical oscillations caused by abrupt changes in the circuit topology of the control device. This includes the following steps: When a gear shifting action is detected based on an electrical switching command, a zero-crossing detection comparator connected in parallel with the AC power supply in the control device is activated to monitor the AC phase. The zero-crossing point is captured by a zero-crossing detection comparator, which captures the absolute physical moment when the AC power supply voltage waveform crosses zero potential. When the zero crossing point arrives, a high-level drive signal is sent to the buffer drive input terminal of the buffer circuit; The high-level drive signal causes the buffer circuit to close preferentially. The transition resistor in the buffer circuit is connected to the circuit topology of the control device. Through the bypass shunting effect of the transition resistor, the optocoupler control terminal in the lighting control module is forced to clamp to the preset transition level and maintains the transition level to isolate electrical oscillations caused by abrupt changes in the circuit topology.

[0012] Optionally, capturing the absolute physical instant when the AC power supply voltage waveform crosses zero potential as the zero-crossing point using a zero-crossing detection comparator includes the following steps: The output digital pulse sequence of the zero-crossing detection comparator is acquired, and the rising and falling edges of the output digital pulse sequence are detected to generate a timestamp record sequence. Calculate the time difference between adjacent pulse edges in a timestamp record sequence; The time difference is compared with the theoretical power frequency cycle parameter of the AC power supply. High-frequency interference other than the theoretical power frequency cycle parameter is eliminated to locate the zero potential crossing event, and the timestamp corresponding to the zero potential crossing event is extracted as the zero crossing point.

[0013] Optionally, during the buffer circuit closure period, the step of analyzing the cumulative fatigue contribution of multiple target resistance value topologies in the brightness adjustment module based on the hardware fatigue state matrix, distinguishing between risk relays and healthy relays in the brightness adjustment module according to the cumulative fatigue contribution, and optimizing the relay combination topology with the optimal overall stress includes the following steps: Read the historical cumulative number of opening and closing times and the longest continuous power-on time for each relay in the brightness adjustment module from the hardware fatigue state matrix. The target resistance value required to achieve the electrical switching command is analyzed, and all multiple topological paths that can achieve the target resistance value are traversed in the resistor network of the brightness adjustment module. For each target resistance topology path, the historical cumulative number of opening and closing times and the longest continuous energizing time of each relay included in the target resistance topology path are input into a preset cost weighting function for weighted summation to calculate the overall fatigue cumulative contribution of the corresponding target resistance topology path. Compare the historical cumulative number of opening and closing times of each relay with the preset lifespan critical threshold. Based on the comparison results, distinguish between risk relays and healthy relays, and eliminate the topology path containing the target resistance value of risk relays to form a candidate topology set. The topology path with the lowest overall fatigue cumulative contribution is selected from the candidate healthy topology set and used as the relay combination topology with the best overall stress.

[0014] The beneficial effects of this invention are: This invention utilizes a photoresistor in the illumination control module to monitor the ambient light intensity along the railway line in real time, autonomously controlling the connection and disconnection between the AC power supply and the railway lighthouse signal lights. This overcomes the lag and limitations of traditional fixed-on methods, ensuring the lighthouses can operate promptly at night or when visibility is low. A brightness adjustment module is also included, using multiple resistors of varying resistance values ​​connected to the circuit to achieve multi-level adjustment of the signal light's brightness. With the cooperation of a microcontroller module and a wireless communication module, an external control platform can control the lighthouse status according to actual environmental conditions. To ensure electrical stability during brightness adjustment, a buffer circuit is added to the brightness adjustment module. During the period when the microcontroller module controls the resistor connection circuit to switch between brightness levels, the buffer drive input triggers the buffer coil, connecting the buffer switch terminal with a series transition resistor to the illumination control module. This provides a stable static clamping voltage divider for the circuit during the physical interval between different resistance value switching, maintaining the continuity of the power supply network and fundamentally eliminating the voltage surges and inrush currents that are easily generated during brightness adjustment. This invention not only enables timely automatic start and stop and flexible brightness control of railway lighthouses, but also ensures smooth transition of signal light efficiency and hardware safety during brightness switching, comprehensively optimizing the operation of railway lighthouses and providing reliable route guidance for safe train operation. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the module connection of the automatic brightness control device for a lighthouse in one embodiment of this application.

[0016] Figure 2 This is a circuit diagram of the illumination control module in one embodiment of this application.

[0017] Figure 3 This is a circuit diagram of a buffer drive circuit in one embodiment of this application.

[0018] Figure 4 This is a circuit diagram of a wireless communication module in one embodiment of this application.

[0019] Figure 5 This is a circuit diagram of the brightness adjustment module in one embodiment of this application.

[0020] Figure 6 This is a flowchart illustrating one embodiment of the automatic brightness control method for a lighthouse in this application. Detailed Implementation

[0021] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0022] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0023] like Figure 1 As shown, this embodiment of the invention provides an automatic lighthouse brightness control device, including: a light control module, a brightness adjustment module, a microcontroller module, and a wireless communication module. The microcontroller module can be a microcontroller chip.

[0024] The illumination control module uses a photoresistor to control the switching between the AC power supply and the signal lights on the lighthouse. The illumination control module is electrically connected to the brightness adjustment module. The brightness adjustment module uses multiple resistors connected to the circuit to control the brightness of the signal lights on the lighthouse. The brightness adjustment module is also electrically connected to the microcontroller module. The microcontroller module is connected to the wireless communication module and is connected to an external control platform through the wireless communication module. The brightness adjustment module includes a buffer circuit, which includes a buffer drive circuit, a buffer relay, and a transition resistor. The input of the buffer drive circuit is connected to the microcontroller module, and the output of the buffer drive circuit is connected to the coil of the buffer relay. The switch of the buffer relay is connected to the illumination control module through the transition resistor. The buffer circuit is used to provide static clamping voltage division during the switching of the resistor connection circuit.

[0025] like Figure 2 As shown, the lighting control module includes a signal light L1, a bidirectional thyristor VS of model BT137, resistors R3, R4, variable resistors R6, R7, R8, capacitor C6, cadmium sulfide photoresistor Rcds, diode VD1, bidirectional diode VD2 of model DB3, and optocoupler OP1 of model MOC3041.

[0026] One end of signal light L1 is connected to the AC220V power supply, one end of resistor R3, one end of resistor R4, the first stationary terminal of variable resistor R6, and the sliding terminal of variable resistor R6. The other end of signal light L1 is connected to the cathode of diode VD1 and the T2 pin of the bidirectional thyristor VS. The T1 pin of the bidirectional thyristor VS is electrically connected to the brightness control module. The anode of diode VD1 is connected to the cathode of the diode in optocoupler OP1. The anode of the diode in optocoupler OP1 is connected to the other end of resistor R3. One end of the bidirectional thyristor in optocoupler OP1 is connected to... The other end of resistor R4 is connected to the second stationary terminal of variable resistor R6 and one end of resistor R7 in optocoupler OP1. The other end of resistor R7 is connected to one end of capacitor C6, one end of resistor R8 and one end of bidirectional diode VD2. The other end of bidirectional diode VD2 is connected to the G pin of bidirectional thyristor VS. The other end of resistor R8 is connected to one end of cadmium sulfide photoresistor Rcds. The other end of cadmium sulfide photoresistor Rcds is connected to the brightness control module, AC220V power supply voltage and the other end of capacitor C6.

[0027] As light intensity decreases, the resistance of the cadmium sulfide photoresistor Rcds increases. When it reaches a certain threshold, the bidirectional diode VD2 triggers the bidirectional thyristor VS to conduct, illuminating the signal lamp L1. Simultaneously, after rectification by the current-limiting resistor R3 and diode VD1, power is supplied to the LED inside the optocoupler OP1. The opto-thyristor inside OP1 conducts when illuminated, increasing the series voltage drop across resistor R8 and the cadmium sulfide photoresistor Rcds. This strengthens the trigger signal of the bidirectional diode VD2, ensuring reliable conduction of the bidirectional thyristor VS. Similarly, as light intensity increases, the resistance of the cadmium sulfide photoresistor Rcds begins to decrease. When the resistance drops below a certain threshold, the bidirectional diode VD2 blocks, and the bidirectional thyristor VS turns off, extinguishing the signal lamp L1. At the same time, the light-emitting diode inside the optocoupler OP1 is also turned off, and the opto-thyristor inside the optocoupler OP1 is turned off, which reduces the series voltage drop of resistor R8 and cadmium sulfide photoresistor Rcds. This positive feedback enables the bidirectional thyristor VS to be reliably turned off.

[0028] In this embodiment, the buffer circuit includes a buffer drive circuit, a buffer relay, and a transition resistor connected in series at the switching terminal of the buffer relay. The input terminal of the buffer drive circuit is connected to the microcontroller chip, and the output terminal of the buffer drive circuit is connected to the coil of the buffer relay. One switching terminal of the buffer relay is connected to the T1 pin of the bidirectional thyristor VS, and the other switching terminal of the buffer relay is connected to one end of the transition resistor, the other end of the transition resistor is connected to the other end of the cadmium sulfide photoresistor Rcds.

[0029] Specifically, such as Figure 3As shown, the buffer drive circuit includes resistor R9, optocoupler OP2 (model TLP521), resistor R10, resistor R11, transistor Q1, and diode D2 (model IN4148).

[0030] One end of resistor R9 is set as the input terminal of the buffer drive circuit and connected to the microcontroller chip. The other end of resistor R9 is connected to the anode of the LED in optocoupler OP2. The cathode of the LED in optocoupler OP2 is grounded. The collector of the transistor in optocoupler OP2 is connected to a +3.3V voltage. The emitter of the transistor in optocoupler OP2 is connected to one end of resistor R10 and one end of resistor R11, respectively. The other end of resistor R11 is grounded. The other end of resistor R10 is connected to the base of transistor Q1. The emitter of transistor Q1... With the emitter grounded, the collector of transistor Q1 is set as the output terminal of the buffer drive circuit, and is connected to one end of the coil of buffer relay K1 and the anode of diode D2 respectively. The other end of the coil of buffer relay K1 and the cathode of diode D2 are connected to a +24V voltage. One end of the switch of buffer relay K1 is connected to the T1 pin (i.e., contact A) of the bidirectional thyristor VS. The other end of the switch of buffer relay K1 is connected to the other end (i.e., contact B) of cadmium sulfide photoresistor Rcds through a transition resistor. The transition resistor is connected to the microcontroller chip.

[0031] In this embodiment, the transition resistor is a digital potentiometer. When the microcontroller decides to switch from the current level A to the target level B, it first calculates the equivalent resistance Ra of level A and the equivalent resistance Rb of level B. The microcontroller sends a command to the digital potentiometer via SPI or I2C bus to dynamically adjust its resistance value to the arithmetic mean Rm of Ra and Rb (or a specific nonlinear transition value). Subsequently, the microcontroller closes the buffer relay K1. At this time, the resistor connected to the circuit is not a fixed resistor, but the median resistor for this A-to-B switch. After the main relay is switched during the safety clamping period, the buffer relay is then opened. At the instant the device of this invention switches brightness levels, the direct switching of resistors with different resistance values ​​into the circuit will cause a sudden change in the voltage division at the input of the optocoupler OP1, resulting in a momentary jump in the conduction angle of the bidirectional thyristor VS, thus causing the lighthouse to flicker. By setting the buffer circuit in this embodiment, when the microcontroller chip determines that the resistance level needs to be switched, the microcontroller first outputs a high-level signal to the buffer circuit, driving the transistor to conduct, so that the coil of the buffer relay is energized and its switch contacts close. Simultaneously, the microcontroller chip calculates the median resistance of the equivalent resistances of the two gears before and after the switch, and controls the digital potentiometer to adjust to the median resistance value. At this time, the median resistor is forcibly connected in parallel as a transition resistor, clamping the voltage divider at the control terminal of the optocoupler OP1 to a transition level. During the transition resistor clamping period, the microcontroller chip controls the original gear relay to open and the new gear relay to close. After the new gear relay is stably closed, the microcontroller synchronously removes the high-level signal of the buffer circuit, the buffer relay opens, and the transition resistor exits the circuit. Thus, the buffer relay circuit provides a static buffer during the resistance value switching period, achieving smoother brightness transition control of the lighthouse.

[0032] like Figure 4 As shown, the brightness adjustment module includes N+1 resistor connection circuits. Each resistor connection circuit is electrically connected to both the lighting control module and the microcontroller module. Different resistor connection circuits have different resistance values ​​connected to the lighting control module. Each resistor connection circuit includes a relay drive circuit, a relay K2, and n series resistors (n=0,1,…,N+1) disposed on the switch terminal of relay K2. The input terminal of the relay drive circuit is connected to the microcontroller chip, and the output terminal is connected to the coil of relay K2. One end of the switch of relay K2 is connected to the T1 pin of the bidirectional thyristor VS, and the other end is connected to the n series resistors. The resistor pin furthest from the other end of the switch of relay K2 is connected to the other end of the photoresistor Rcds. The relay drive circuit can be as follows: Figure 3As shown in the structure of the buffer drive circuit, the relay drive circuit in this embodiment can also adopt a transistor drive structure. The input terminal of the relay drive circuit (one end of the resistor) is connected to the microcontroller chip to receive high and low level control signals from the microcontroller. The base of the transistor is connected to the other end of the resistor, the emitter is grounded, and the collector serves as the output terminal of the relay drive circuit, connected to one end of the coil of relay K2. The other end of the coil is connected to +24V or other suitable operating power supply. Simultaneously, a freewheeling diode (such as 1N4148) can be connected in reverse parallel across the coil to release the self-induced electromotive force when the coil is de-energized, protecting the drive transistor.

[0033] like Figure 5 As shown, the serial communication interface of the wireless communication module U2 may include its RX pin and TX pin. The wireless communication module U2 is connected to the microcontroller chip through the RX pin and TX pin. By setting the wireless communication module U2, the staff can remotely control the lighthouse.

[0034] Figure 6 This is a flowchart illustrating an automatic lighthouse brightness control method in one embodiment. It should be understood that, although... Figure 6 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 6 At least some steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps. For example Figure 6 As shown, the automatic brightness control method for lighthouses disclosed in this invention specifically includes the following steps: S101. Construct a light dynamic hysteresis spectrum in the microcontroller module that includes external environment data and a light response model with preset light sensing inertia and light intensity change response rate, and construct a hardware fatigue state matrix based on the multidimensional stress state of each relay in the brightness adjustment module.

[0035] The microcontroller module's internal random access memory pre-allocated a contiguous address space to record the aforementioned optical dynamic hysteresis spectrum, which is a mathematical state mapping that dynamically evolves over time. The illumination-sensing inertial parameter configuration is used to simulate the physical delay characteristics of the gradual change in light within the natural environment; the light intensity change response rate configuration is used to define the microcontroller module's numerical sensitivity to alternating bright and dark external light. Simultaneously, the hardware fatigue state matrix is ​​planned as a multi-dimensional data array structure. The row dimension corresponds to the hardware number of each relay within the brightness adjustment module, and the column dimension records multi-dimensional stress states, covering the cumulative number of historical actions, the duration of a single continuous closure, and the effective value of the load thermal effect. During operation, the microcontroller module calls the floating-point unit to perform matrix initialization. After the control device's initial power-on reset, the microcontroller module converts the initial ambient illuminance into a digital reference point and stores it in the spectrum, assigning all stress parameters in the state matrix to zero. The microcontroller module's timer is set to trigger a data update request every fifty milliseconds to ensure that the model state is synchronized with real physical conditions.

[0036] S102. The microcontroller module continuously collects the instantaneous voltage division data of the photoresistor in the illumination control module as the external environment data in the photodynamic hysteresis spectrum, and calculates the target state value of the instantaneous fluctuation of the immune light intensity by performing real-time numerical integration on the illumination response model.

[0037] The photoresistor's resistance changes continuously and non-linearly with the ambient light intensity. The acquisition node, composed of the photoresistor and a fixed voltage divider resistor connected in series, converts the light intensity changes into a continuously fluctuating analog voltage signal. The microcontroller module's built-in analog-to-digital converter quantizes and samples the analog voltage signal at a sampling frequency of up to 1 kilohertz, acquiring instantaneous voltage divider data. To eliminate sudden light intensity disturbances caused by direct headlights from trains at night, the microcontroller module does not directly react to the instantaneous voltage divider data. Instead, it substitutes the instantaneous voltage divider data into the light response model and performs real-time numerical integration using a pre-defined Runge-Kutta algorithm. In the implementation scenario, the microcontroller module opens an independent direct memory access channel to handle the discrete voltage divider data output from the analog-to-digital converter, and then performs multi-step slope prediction and weighted averaging in a differential grid. The integration operation smooths out high-frequency instantaneous data spikes, extracting the target state value representing the day-night cycle trend of the real external environment. In the processing flow, the microcontroller module cyclically overwrites the old integration variables, thereby maintaining uninterrupted anti-interference state assessment within a limited memory space.

[0038] S103. By comparing the changing trend of the target state value in the preset brightness dimming threshold space through the microcontroller module, an electrical switching command corresponding to the target brightness level is generated.

[0039] The preset brightness dimming threshold space is composed of a series of discrete digital intervals, each corresponding to a specific luminous intensity level of the lighthouse signal light. The microcontroller module uses the smoothed target state value calculated in the previous step as input coordinates to perform positioning and matching within the threshold space. To prevent frequent relay oscillations caused by the target state value hovering slightly near two adjacent threshold boundaries, each boundary within the threshold space is equipped with a bidirectional tolerance band in the form of a Schmitt trigger. The microcontroller module tracks the direction of change of the target state value through historical data registers, i.e., confirming whether the external light is in a clear trend of continuous dimming or continuous brightening. In the implementation steps, the logic judgment unit of the microcontroller module calls conditional branch statements to compare the current target state value with the state value of the previous cycle. When it is found that the state value not only crosses the specific level threshold line but also exceeds the lower or upper limit of the tolerance band, the microcontroller module determines that the signal light brightness needs to be adjusted. Subsequently, the instruction encoder of the microcontroller module generates an electrical switching instruction containing a specific hexadecimal opcode based on the located target brightness interval. The instruction content clearly specifies the brightness level number to be switched to and pushes it into the high-priority execution queue.

[0040] S104. When a gear shifting action is detected based on an electrical switching command, the buffer circuit is closed first at the zero-crossing point based on AC phase monitoring, so that the optocoupler control terminal in the lighting control module is forced to clamp to a preset transition level to isolate electrical oscillations caused by a sudden change in the circuit topology of the control device.

[0041] The AC power supply exhibits sinusoidal waveform characteristics, with its voltage amplitude periodically crossing zero potential. If the load is switched off or on at a high voltage absolute value, strong electromagnetic interference and destructive arcing will occur. The zero-crossing detection pin inside the microcontroller module captures the pulse square wave synchronized with the AC power supply in real time, calculating the absolute physical moment of the zero-crossing point. Once the electrical switching command is popped from the execution queue, the microcontroller module immediately enters a phase-waiting state. Within the microsecond-level window period predicting the next zero-crossing point, the microcontroller module first outputs a high-level drive signal to the buffer circuit to close the buffer relay. During this action, the mechanical contacts of the buffer relay forcibly connect the transition resistor in parallel to a critical node in the lighting control circuit, forming a low-impedance shunt bypass. The resistance value of the transition resistor is rigorously calculated to clamp the input voltage of the optocoupler in the lighting control module to a preset safe level that neither triggers mis-conduction nor fails to absorb the parasitic inductance flyback energy during topology switching. This isolation measure completely prevents the propagation of severe voltage spikes to the subsequent microcontroller module.

[0042] S105. During the closed period of the buffer circuit, the cumulative fatigue contribution of multiple target resistance topology paths in the brightness adjustment module is analyzed based on the hardware fatigue state matrix. The risk relays and health relays in the brightness adjustment module are distinguished according to the cumulative fatigue contribution, and the relay combination topology with the best overall stress is selected.

[0043] In this system, due to the various series and parallel combinations of resistor arrays within the brightness adjustment module, achieving the same target resistance value often involves multiple completely different relay connection paths. The microcontroller module reads the number of actions and power-on heat generation data recorded in the hardware fatigue state matrix and applies them to an exponential weighted penalty function for calculation. If the comprehensive stress score of a relay exceeds the set safety threshold, the microcontroller module marks the component as a risk relay; otherwise, it classifies it as a healthy relay. In this implementation, the optimization algorithm module within the microcontroller module traverses all topological paths that can achieve the target resistance value, directly eliminating any path schemes containing risk relays, forming a candidate set consisting only of healthy relays. Next, the microcontroller module calculates the total cumulative fatigue contribution for each path in the candidate set and selects the path with the absolute smallest sum as the optimal combination topology. This selection mechanism ensures that each action prioritizes the hardware that has been idle for a long time and has the least wear, greatly balancing the lifespan of all hardware and preventing premature failure of local components.

[0044] S106. Disconnect the relay corresponding to the current brightness level in the brightness adjustment module and close the relay combination topology. At the next zero crossing point, disconnect the buffer circuit and update the action record data of the relay combination topology in the hardware fatigue state matrix.

[0045] In this process, the microcontroller module sends new level control signals in parallel to the corresponding relay drive circuits according to the selected optimal combination topology, while simultaneously canceling the holding signal of the old position relays. Since the buffer circuit is still in a closed clamping state, any charge surge caused by the main circuit topology reconfiguration is completely absorbed by the transition resistor. Subsequently, the microcontroller module continues to monitor the AC phase. At the moment when the relay contacts complete their mechanical bounce and reach the next AC voltage zero-crossing point, the microcontroller module cancels the high-level drive on the buffer circuit, disconnects the buffer relay, and allows the main control circuit to smoothly take over the brightness drive of the indicator lights. In the specific implementation, after all hardware actions are completed, the microcontroller module's background maintenance program is immediately activated. For the relays that just participated in the closing action, the count of their actions is incremented by one in the storage unit corresponding to the hardware fatigue state matrix, and an internal timer is started to record the duration of a new round of continuous closing. After the data update operation is completed, the microcontroller module backs up the entire matrix data to non-volatile memory to prevent fatigue data loss due to unexpected power failures.

[0046] In one embodiment, calculating the target state value of the instantaneous fluctuation of the immune light intensity by performing real-time numerical integration on the light response model includes the following steps: Input external environment data into the outer boundary node of the illumination response model; A differential propagation grid is constructed based on the preset illumination sensing inertia and light intensity change response rate of the illumination response model; In the differential transmission grid, the Runge-Kutta algorithm is used to numerically integrate the transmission process of external environmental data to the internal nodes of the differential transmission grid, and the numerical integration result is obtained. Extract the integral results of the center node of the differential propagation grid from the numerical integration results, and calculate the target state value of the immune transient fluctuation.

[0047] In this embodiment, the illumination response model is logically divided into outer boundary nodes and inner nodes. The outer boundary nodes directly map the actual fluctuations in external ambient illuminance. Upon receiving external environmental data containing the instantaneous voltage division characteristics of the photoresistor, the illumination response model applies this data as boundary driving conditions to the outermost computational nodes of the model. To ensure that the physical continuity of illuminance changes can be accurately expressed in the discrete model, the outer boundary nodes use specific boundary conditions to force data assignment, ensuring that the model boundary states remain absolutely consistent with the external environmental data. In a specific embodiment, the illumination response model is a multi-dimensional matrix structure, and the external environmental data is filtered and preprocessed to form normalized ambient illuminance input values. This operation transforms the randomly fluctuating ambient illuminance into a forced excitation source for the illumination response model to perform subsequent state deductions. The boundary node state vectors are synchronously refreshed in each discrete sampling period based on the latest acquired external environmental data vector. The continuously refreshed boundary node state vectors form a dynamically changing data envelope around the illumination response model. Relying on the preset light-sensing inertia and light intensity change response rate, the illuminance information contained in the dynamically changing data network line will gradually permeate and be transmitted to the internal nodes of the light response model.

[0048] Specifically, the conduction mesh consists of discrete nodes arranged in a regular topology, with adjacent nodes connected by virtual conduction channels. A pre-defined illumination-sensing inertia determines the node state maintenance tendency, while the light intensity change response rate defines the data transmission rate. The construction process requires determining the spatial and temporal step sizes, and then allocating conduction coefficients between nodes. In one specific implementation, the illumination response model is meshed according to the finite difference rule. To simulate the nonlinear scattering attenuation that occurs when light propagates through the medium, the conduction coefficients are calculated using a formula with a spatial exponential attenuation term: In the formula, Represents the conductivity coefficient. Represents the response rate to changes in light intensity. This represents the preset light-sensing inertia. Represents the time step. Represents the spatial step size. This represents the spatial attenuation factor. Introducing a negative exponential term to the base of the natural logarithm causes the conduction coefficient to exhibit a non-linear, sharp decrease with increasing spatial step size. The calculated conduction coefficient establishes a state-transfer algebraic relationship between nodes. When external environmental data acts on the outer boundary nodes, the states of internal nodes are delayed according to a specific law due to the non-linear constraints of the conduction coefficient. The network structure perfectly simulates diffuse reflection of light, effectively filtering out high-frequency light intensity fluctuations during inward transmission while preserving the true low-frequency day-night cycle.

[0049] Runge-Kutta algorithm, as a single-step numerical integration method, can effectively suppress the numerical divergence problem that easily occurs in differential grid computation, ensuring the stability of state derivation. The core task of numerical integration is to solve the differential equations of the state evolution of each internal node over time, deriving the illuminance state distribution of all internal nodes at the next time step. In the specific computational steps, for each internal node, the slope of the state change at the current time is calculated based on the state difference of its surrounding neighboring nodes at the current time and the data transmission coefficient. In one specific implementation, a fourth-order Runge-Kutta algorithm is used for numerical integration, with the specific iterative formula as follows: In the formula, This represents the integral state value of the internal node at the next time step. This represents the initial state value of the internal node at the current moment. , , , These represent the predicted slope values ​​calculated at four different positions within the current integration step. After four slope predictions and a weighted average, an integration step update that closely approximates the actual continuous change can be obtained. Adding the calculated integration step update to the initial state value of the internal node at the current moment completes one numerical integration of the process of external environment data being transmitted to the internal nodes of the grid. By continuously performing the above numerical integration iteration operation on the discrete time axis, the state of the internal nodes of the differential transmission grid will undergo a smooth dynamic evolution with the input of external environment data.

[0050] The differential propagation mesh is designed as a two-dimensional structure with a symmetrical topology, with the central node located at the geometric center furthest from all outer boundary nodes. Since external environmental data must be propagated and smoothed through layers of internal nodes before reaching the central node, the integral result at the central node has the greatest physical delay and the strongest high-frequency noise suppression capability. Extracting the integral result from the central node is equivalent to obtaining the illuminance reference value after multi-order spatial low-pass filtering. In one specific implementation, after locating the integral result of the central node from the numerical integration result matrix, a static offset is used to calculate the target state value immune to transient fluctuations. The calculation formula is as follows: In the formula, This represents the target state value of the final calculated transient immune fluctuation. This represents the integration result extracted from the center node of the differential propagation grid from the numerical integration result. This represents the static offset used to compensate for inherent hardware errors. The target state value obtained from the above formula can reflect the overall brightness of the real physical environment with extremely stable performance. Even if there are instantaneous changes in the external environment data, such as short-term occlusion or direct strong light, the integral result of the central node will only produce a small disturbance. Using this target state value as the criterion for generating electrical switching commands for the corresponding target brightness level can completely eliminate the frequent flickering of the lighthouse signal lights caused by short-term fluctuations in external lighting conditions, significantly improve the visual smoothness of the automatic dimming process, and greatly reduce the number of invalid actions of various relays in the brightness adjustment module, thereby extending the service life of various relays in the device.

[0051] In one implementation, the Runge-Kutta algorithm is used in the differential transmission grid to numerically integrate the transmission process of external environmental data to the internal nodes of the differential transmission grid, and the numerical integration result is obtained by the following steps: Obtain the initial light intensity change gradient vector of each internal node in the differential propagation grid at the current sampling time; The initial light intensity change gradient vector and external environment data are substituted into the first-order partial derivative formula of the Runge-Kutta algorithm to calculate the first slope prediction value. The second and third slope predictions are calculated based on the first slope prediction and at half a step of the differential propagation grid. The fourth slope prediction value is calculated at the full step length of the differential propagation grid based on the third slope prediction value; The target step size update is obtained by weighting the predicted values ​​of the first slope, the second slope, the third slope, and the fourth slope. The target step size update is superimposed on the initial light intensity change gradient vector to complete the real-time numerical integration of the transmission process of external environment data to internal nodes, and the numerical integration result is obtained.

[0052] In this embodiment, to accurately characterize the transient trend of external light energy transfer to the interior within a discrete mathematical space, it is necessary to pre-establish the state reference of each independent grid node at a specific time section. The differential transmission grid encompasses numerous internal nodes arranged in a row-column matrix. These internal nodes not only maintain the state left over from the integration operation of the previous cycle but are also constrained by the light intensity difference between adjacent nodes. The physical essence of obtaining the initial light intensity change gradient vector lies in quantitatively evaluating the uneven distribution of illuminance in the spatial topology at the current instant. During the calculation, the entire storage address space of the differential transmission grid is traversed, and the illuminance values ​​of all internal nodes at the current sampling time are extracted. Subsequently, for any specific internal node, the illuminance values ​​of adjacent nodes are extracted, and the spatial difference value is calculated based on the spatial distance. The aforementioned set of spatial difference values ​​constitutes a vector field characterizing the light flow trend. In a specific embodiment, a finite difference operator is used to perform spatial differentiation on the internal node state matrix to extract the initial light intensity change gradient vector. The calculation formula is: In the formula, This represents the gradient vector of the initial light intensity change of a specific internal node at the current sampling time. This represents the illuminance state value of the preceding node adjacent to a specific internal node at the current moment. Representing the illuminance state value of a specific internal node at the current moment, dividing by the spatial step size in the above formula transforms a simple numerical difference into a spatial rate of change with definite physical dimensions. The obtained initial light intensity change gradient vector indicates the initial dynamic direction of the diffusion of light energy within the grid.

[0053] External environmental data, acting as the external stimulus driving the state evolution of the illumination response model, determines the intensity of energy injection at the grid boundary; the initial light intensity change gradient vector reflects the inherent state distribution inertia within the grid. Substituting these two factors into the first-order partial derivative formula aims to evaluate the rate at which the internal node states will deviate if the current boundary conditions and internal state gradients are followed solely at the starting point of the current sampling time. In one specific implementation, an algebraic equation for calculating the first-order partial derivative is constructed using the conduction coefficient. The calculation formula is: In the formula, This represents the first predicted slope value calculated at the start of the time step. The dimensionless weighting coefficients represent the influence of external environmental data on the evolution of internal node states. Through the above weighted summation operation, the first slope prediction accurately captures the instantaneous tangent direction of the light intensity change in the initial state. This tangent direction represents the basic rate of change without any future trend correction. During the operation, the above formula is calculated concurrently for hundreds or thousands of internal nodes within the differential propagation grid. The obtained first slope prediction is not directly used to update the state of the internal nodes, but is properly stored in a register array as a key reference parameter for subsequent half-step probing operations.

[0054] The half-step position is equivalent to extrapolating half the time step forward in the time dimension. When calculating the second slope prediction value, the state of the internal nodes is pre-extended to the half-step position using the first slope prediction value, and the light intensity change gradient is re-evaluated in this virtual intermediate state. Subsequently, using the newly evaluated second slope prediction value, the state of the internal nodes is again extrapolated to the half-step position from the initial state, and then the third slope prediction value is calculated. In one specific implementation, the slope at the half-step position is calculated using previously stored variables. The calculation formula is: ,as well as In the formula, This represents the second slope prediction value derived from the first slope prediction value. This represents the third slope prediction value derived from the second slope prediction value. This represents the time derivative mapping function of the node states within the differential propagation grid. The two trial calculations at the half-step constitute the most ingenious error correction mechanism of the Runge-Kutta algorithm. The second slope prediction initially corrects the linear deviation at the starting point, while the third slope prediction performs a more in-depth secondary calibration based on the second slope prediction. By repeatedly probing and cross-checking at the midpoint of the time step, the true curvature can be approximated significantly.

[0055] The full step position marks the physical end of the current discrete integration period. The purpose of calculating the fourth slope prediction is to evaluate the instantaneous slope of change when the internal node states develop to the end of the integration period according to the most accurate intermediate state trend, i.e., the third slope prediction. In one specific implementation, the third slope prediction is used as the sole driving factor for the full step span. The calculation formula is: In the formula, This represents the fourth slope prediction value obtained at the full step length of the differential propagation grid. During the calculation, the illuminance state value of the internal nodes at the current moment is superimposed with the third slope prediction value amplified by the time step, constructing a virtual predicted state that closely approximates the actual physical final state. This virtual predicted state is then substituted into the time derivative mapping function to obtain the tangent slope at the end of the integration interval. Obtaining the fourth slope prediction value signifies that the Runge-Kutta algorithm completes full-domain probing from the starting point to the midpoint and then to the end point within a single iteration cycle. The fourth slope prediction value numerically integrates the hysteresis effect of grid boundary constraints and the nonlinear damping characteristics of state propagation between internal nodes. By performing a final slope extraction at the full step length, the boundary curvature change of the state curve as it approaches the next sampling cycle can be effectively captured.

[0056] The four slope predictions differ significantly in their contribution to reflecting the actual state change curve. The first and fourth slope predictions, located at the ends of the integration interval, are easily affected by local curvature abrupt changes, while the second and third slope predictions, located at the midpoint of the integration interval, better represent the average change trend over the entire step size. Therefore, the weighted average calculation must assign higher confidence weights to intermediate nodes. In one specific implementation, the classic Simpson's integral rule is used to assign weighting coefficients. The calculation formula is: In the formula, This represents the target step size update obtained through weighted averaging. In the above formula, the predicted second and third slope values ​​are given twice the weight of the endpoint slopes, and the sum is normalized by dividing by six. After multiplying by the time step, the slope dimension, originally representing the rate of change, is converted into the state increment dimension representing the absolute magnitude of change. The target step size update perfectly integrates the geometric features of the starting point tangent, the midpoint secant, and the ending point tangent, which is equivalent to fitting a polynomial curve with a maximum accuracy of fourth order within the integration interval and calculating the precise area covered by the curve. This weighted averaging mechanism can filter out high-frequency noise introduced by external environmental data with extremely high computational efficiency, demonstrating a very strong tracking ability.

[0057] After calculating the target step size update with high-order accuracy, this increment needs to be applied to the internal nodes of the differential propagation grid to drive the illumination response model to complete the physical state evolution on the time axis. The superposition operation is not a simple scalar addition, but involves the synchronous refresh of the entire differential propagation grid state matrix. The target step size update essentially represents the absolute change in illumination within the current discrete time step caused by both external environmental data excitation and internal state differences. In one specific implementation, state update arithmetic operations are performed to fuse the calculated increment into the gradient vector. The calculation formula is: In the formula, This represents the final numerical integration result obtained after real-time numerical integration. During the superposition operation, the memory controller reads the temporarily stored initial light intensity change gradient vector in parallel and adds it to the target step size update amount temporarily stored in the register. After superposition, the new numerical integration result immediately overwrites the original internal node state memory space, becoming the initial benchmark for the next sampling period. This iterative superposition process reproduces the dynamic hysteresis phenomenon of ambient light penetrating the medium and gradually propagating deeper at the macroscopic physical level. After the numerical integration result is updated, the data distribution inside the model is no longer a simple replication of the current instantaneous external environmental data, but a smooth evolutionary picture that integrates the preset illumination sensing inertia and historical light intensity memory.

[0058] In one implementation, obtaining the initial light intensity change gradient vector of each internal node in the differential propagation grid at the current sampling time includes the following steps: Retrieve the internal node illuminance distribution matrix of the differential transmission mesh at the previous sampling time; The spatial Laplacian operator is used to perform spatial second derivative operations on the illuminance distribution matrix of the internal nodes to extract the spatial second derivative matrix; The light intensity change responsivity of the illumination response model is multiplied by the spatial second derivative matrix to obtain the illumination state diffusion distribution. By combining external environmental data, the boundary conditions of the light diffusion distribution are corrected to generate a corrected local light intensity transformation matrix. The corrected local light intensity transformation matrix is ​​converted into the initial light intensity change gradient vector of each internal node at the current sampling time.

[0059] In this embodiment, during continuous cyclic sampling, after each time step of numerical integration, the resulting full-grid state data is permanently stored in a specific memory region as a historical baseline for the next simulation. The internal node illuminance distribution matrix, in the form of a two-dimensional digital array, accurately maps the illuminance distribution of the differential transmission grid at each discrete coordinate point in physical space. At the arrival of a new sampling clock edge, the permanently stored historical state data is loaded into a high-speed static random access memory according to a pre-allocated physical contiguous address space. The retrieval operation involves not only simple numerical copying but also strict data boundary overflow and parity checks to ensure that the matrix dimensions entering the differential operation stage perfectly match the grid's physical topology.

[0060] In the physical model of light energy diffusion, the energy flow direction and velocity at each point in space depend not only on the absolute light intensity difference between adjacent nodes, but also on the concavity and convexity of that point on the overall spatial distribution surface. The spatial Laplacian operator, as a core mathematical tool for calculating the divergence and gradient of multidimensional functions, can accurately quantify the spatial second derivative of the light intensity distribution at each node in the distribution matrix. The second derivative, in a physical sense, directly characterizes the source-sink driving force intensity of light energy converging towards the current node or dispersing outward from the current node within a local region. During the calculation, each non-edge node within the distribution matrix is ​​traversed, and the illuminance values ​​of adjacent nodes in the four orthogonal directions (up, down, left, right) are extracted. In one specific implementation, the standard two-dimensional discrete five-point difference scheme is used for the Laplacian operator operation. The calculation formula is: In the formula, This represents the value of a single element in the extracted spatial second derivative matrix. , , , These represent the illuminance values ​​of the four adjacent nodes located above, below, to the left, and to the right of the current processing node in the distribution matrix, respectively. This represents the illuminance value of the central node currently being processed. Represents the spatial step size.

[0061] To transform purely geometric properties into light intensity change rates with practical physical meaning, core parameters characterizing the medium's properties must be introduced. The light intensity change responsivity, as a purely physical property constant, defines the sensitivity and rate upper limit of the conduction response of a specific medium represented by a differential conduction grid to spatial light intensity imbalances. Dot multiplication, at the algebraic level, belongs to the Hadamard product operation, which involves multiplying corresponding elements of matrices of the same dimension. In one specific implementation, dot multiplication fusion is performed using scalar multiplication rules. During the dot multiplication operation, geometric curvature values ​​are read row-by-row and column-by-column from the spatial second derivative matrix and multiplied with the responsivity constant stored in a register. The newly generated diffusion distribution matrix not only preserves the concave-convex topology of the original light intensity surface but also transforms the geometric difference into the actual light energy exchange rate between nodes.

[0062] The edge nodes of the differential propagation mesh are directly exposed to the real physical world. Light intensity evolution is not only affected by the pull of internal adjacent nodes but also absolutely dominated by ambient light. When executing the Laplace operator, the outermost ring of nodes, lacking adjacent nodes in some directions, cannot calculate the complete second derivative, leading to undefined regions or truncation errors in the diffusion distribution matrix at the boundaries. Boundary condition correction using external environmental data essentially involves directly covering or weighting the inaccurate internal spontaneous diffusion trends at the boundary nodes with strong excitation signals from the external real physical world. In one specific implementation, a first-type Dirichlet boundary condition fusion rule is used for forced replacement correction. The arithmetic rule can be expressed as: when the node being processed belongs to the outermost topological ring of the differential propagation mesh, it is assigned a value... When processing internal nodes, preserve their original state. In the formula, This represents the elements in the generated modified local light intensity transformation matrix. The dimensionless weighting coefficient representing the influence of external environment data on the evolution of internal node states. This represents the normalized external environment data vector.

[0063] The local light intensity transformation matrix, after boundary correction, still maintains a two-dimensional topological array structure that perfectly corresponds to the physical differential transmission grid. However, when executing subsequent nonlinear differential equation solving algorithms, standard high-level numerical integration libraries and their internal pipelined arithmetic logic often require the input data to have a one-dimensional linear array sequence format to facilitate high-speed step-addressing computation using register indexes. The core purpose of the transformation operation is not to modify any physical values, but to flatten the spatially coupled multidimensional distribution into a set of mutually independent and continuously stored algebraic state variables at the data structure level. This algebraic dimensionality reduction mapping can greatly improve the memory access hit rate of subsequent multi-step slope probing operations. In a specific implementation, a row-first traversal serialization mapping rule is used to achieve the matrix-to-vector dimensionality reduction transformation. The mapping formula is abstracted as follows: In the formula, This represents the one-dimensional initial light intensity change gradient vector after the transformation. This represents the operation function that performs a linear mapping from a two-dimensional memory address to a one-dimensional contiguous address space. At the hardware execution layer, the linear offsets corresponding to the two-dimensional coordinates in the transformation matrix are automatically calculated, and the floating-point data within the matrix are extracted one by one and compactly arranged into the vector register set.

[0064] In one embodiment, when a gear shifting action is detected based on an electrical switching command, a buffer circuit is preferentially closed at the zero-crossing point based on AC phase monitoring, forcibly clamping the optocoupler control terminal in the lighting control module to a preset transition level to isolate electrical oscillations caused by abrupt changes in the control device circuit topology. This includes the following steps: When a gear shifting action is detected based on an electrical switching command, a zero-crossing detection comparator connected in parallel with the AC power supply in the control device is activated to monitor the AC phase. The zero-crossing point is captured by a zero-crossing detection comparator, which captures the absolute physical moment when the AC power supply voltage waveform crosses zero potential. When the zero crossing point arrives, a high-level drive signal is sent to the buffer drive input terminal of the buffer circuit; The high-level drive signal causes the buffer circuit to close preferentially. The transition resistor in the buffer circuit is connected to the circuit topology of the control device. Through the bypass shunting effect of the transition resistor, the optocoupler control terminal in the lighting control module is forced to clamp to the preset transition level and maintains the transition level to isolate electrical oscillations caused by abrupt changes in the circuit topology.

[0065] In this embodiment, the AC power supply exhibits sinusoidal periodic alternating characteristics. If the control circuit of the lighthouse signal light with inductive load characteristics is opened or closed at a random moment when the voltage amplitude is high, it is highly likely to cause strong electromagnetic interference and destructive high-voltage arcs. To completely eliminate the above safety hazards, a safe window with an absolute value of zero AC voltage must be found before performing any electrical circuit topology reconfiguration. Upon receiving an electrical switching command containing target brightness information, the control logic immediately wakes up the zero-crossing detection comparator, which has been in a dormant standby state. The zero-crossing detection comparator is directly connected in parallel with the two ends of the AC power supply in the hardware circuit and can sense the transient fluctuations of the mains waveform in real time. The zero-crossing detection comparator uses a high-impedance differential input architecture to collect the instantaneous AC voltage. The analytical formula for the instantaneous voltage is: In the formula, Represents the instantaneous voltage of an AC power source at a specific moment. Represents the peak amplitude of the AC power supply voltage waveform. The theoretical power frequency representing the AC power supply. It represents the absolute time variable calculated from the phase reference point.

[0066] The zero-crossing detection comparator integrates a highly sensitive Schmitt trigger circuit. When the instantaneous voltage of the input AC power supply reverses between positive and negative polarities and crosses the zero-volt reference line, the output level of the Schmitt trigger circuit will experience a steep jump, generating a digital square wave pulse following the power frequency cycle. Industrial power grids often contain a large amount of harmonic noise and high-frequency spikes, which can easily cause the zero-crossing detection comparator to generate false multiple-flip signals near zero potential. To pinpoint the true physical zero-crossing moment, the output pulse sequence must undergo multiple filtering and edge time difference calculation. The validity of the zero-crossing point is verified using digital timestamp difference calculation. The verification calculation formula is: In the formula, This represents the time difference between two consecutive pulse level transition edges. This represents the time of the currently captured level transition edge. This represents the time of the last valid level transition edge. Only when the calculated time difference falls strictly within the tolerance window allowed by the theoretical power frequency half-cycle will the currently captured level transition edge be confirmed as a valid and real zero-potential crossing event, and then the absolute time corresponding to the valid event will be extracted as the zero-crossing point.

[0067] in accordance with Figure 3 The buffer circuit structure shown immediately triggers a pin level transition at the confirmed true zero-crossing point, applying a high-level drive signal to resistor R9. The high-level drive signal flows through resistor R9, driving the LED inside optocoupler OP2 to emit light, thus turning on the phototransistor inside optocoupler OP2. After the phototransistor turns on, the current from the 24V power supply is injected into the base of transistor Q1 through resistor R10. The establishment process of the high-level drive signal is limited by the charging rate of the distributed capacitance. The transient charging equation is: In the formula, Represents the transient voltage during the setup process. Represents the logic supply voltage. This represents the equivalent series resistance. This represents the equivalent parasitic capacitance. The emitter of transistor Q1 is grounded, and its collector is connected to diode D2 and the relay K1 coil. The base current causes transistor Q1 to quickly enter saturation conduction, thus connecting the excitation circuit of relay K1 coil. Resistor R11 acts as a pull-down resistor to prevent transistor Q1 from being mis-conducted. The fast and stable signal transmission path ensures that the relay coil can immediately obtain sufficient electromagnetic driving force at the beginning of a new cycle.

[0068] After transistor Q1 is turned on, the 24V power supply forms a complete circuit to ground through the relay K1 coil and transistor Q1. The energized coil generates a magnetic field that attracts the normally open contact of relay K1. After the relay K1 contact closes, the transition resistor is physically connected in parallel to the critical network of the lighting control module through terminals A and B. When gear switching triggers the on / off of the main regulation circuit, the transition resistor creates a low-impedance discharge path. In one specific implementation, the clamping effect is determined based on the parallel voltage divider theorem. The clamping voltage calculation formula is: In the formula, This represents the preset transition level reached after the optocoupler control terminal is forcibly clamped. This represents the transient surge current generated at the moment of a topological abrupt change. This represents the resistance value of the connected transition resistor. This represents the equivalent input impedance of the optocoupler control terminal in the lighting control module. Diode D2, acting as a freewheeling diode, provides a reverse electromotive force discharge path for the relay coil at the moment transistor Q1 is turned off, protecting the switching transistor from high-voltage breakdown. The transition resistor successfully absorbs and dissipates stray charge surges, firmly clamping the critical node voltage within a safe range.

[0069] In one embodiment, capturing the absolute physical instant when the AC power supply voltage waveform crosses zero potential as the zero-crossing point using a zero-crossing detection comparator includes the following steps: The output digital pulse sequence of the zero-crossing detection comparator is acquired, and the rising and falling edges of the output digital pulse sequence are detected to generate a timestamp record sequence. Calculate the time difference between adjacent pulse edges in a timestamp record sequence; The time difference is compared with the theoretical power frequency cycle parameter of the AC power supply. High-frequency interference other than the theoretical power frequency cycle parameter is eliminated to locate the zero potential crossing event, and the timestamp corresponding to the zero potential crossing event is extracted as the zero crossing point.

[0070] In this embodiment, ideally, the high-low level transition of the square wave signal strictly corresponds to the physical instant when the AC power supply voltage crosses the zero-volt reference line. Whether it's the rising edge of the square wave signal climbing from low to high, or the falling edge dropping from high to low, an interrupt request is immediately generated. Each time the microcontroller module receives an interrupt request, its built-in hardware timer instantly latches the count value of the current free-running state. The absolute occurrence time is calculated by reading the hardware timer's count value and combining it with the clock source frequency. The calculation formula is: In the formula, The absolute timestamp representing the occurrence of a specific level transition edge. This represents the discrete count value latched by the hardware timer at the instant the transition edge is captured. This represents the duration of a single cycle of the hardware timer's operating clock source. Through cyclical capture and parsing operations, the continuous level transitions are converted into data nodes with a temporal order. Absolute timestamps are continuously stored in a first-in-first-out queue in the capture order, constructing a complete timestamp record sequence.

[0071] The unfiltered raw signal contains both valid zero-crossing phase transitions that truly represent the AC power grid, and high-frequency transition glitches induced by load start-up / shutdown or power grid harmonics. The most effective way to evaluate the physical properties of level transition events is to quantitatively analyze the time intervals between their occurrence. The time intervals of true zero-crossing events are necessarily rigidly constrained by the mechanical speed of the AC power grid generator sets, while the time intervals of high-frequency interference glitches exhibit extreme randomness and transience. During the calculation operation, the control logic sequentially pops consecutively stored time data points from the queue. The time intervals between pulse edges are extracted using a subtraction operation. The relative time interval sequence directly reflects the transient frequency change characteristics of the output signal, eliminating the influence of absolute time axis offset caused by hardware timer accumulation.

[0072] Under standard operating conditions of an AC power grid, a sinusoidal waveform experiences an absolute zero potential every half cycle. The theoretical power frequency cycle parameter is determined by the inherent properties of the power grid infrastructure and is pre-programmed. The calculated raw time difference is compared with the theoretical half-cycle parameter to construct a pure digital bandpass filter. When the time difference is much smaller than the theoretical parameter, the signal edge triggering the corresponding time difference is determined to be a false spike caused by high-frequency noise and is directly discarded. In one specific implementation, an absolute value inequality including a tolerance factor is constructed to perform event filtering. The determination formula is: In the formula, This represents the theoretical power frequency of the AC power supply, as defined above. This represents the safe time tolerance threshold defined based on the normal fluctuation range of the power grid frequency. Once the calculated raw time difference value satisfies the judgment inequality, the moment of occurrence of the latest pulse edge corresponding to the calculated raw time difference value is marked as a valid zero-potential crossing event. Subsequently, the absolute timestamp of the single event is independently extracted and assigned to the protected zero-crossing register.

[0073] In one embodiment, during the closed period of the buffer circuit, the cumulative fatigue contribution of multiple target resistance topologies in the brightness adjustment module is analyzed based on the hardware fatigue state matrix. Risk relays and healthy relays in the brightness adjustment module are distinguished according to their cumulative fatigue contribution, and the optimal relay combination topology with the best overall stress is selected through the following steps: Read the historical cumulative number of opening and closing times and the longest continuous power-on time for each relay in the brightness adjustment module from the hardware fatigue state matrix. The target resistance value required to achieve the electrical switching command is analyzed, and all multiple topological paths that can achieve the target resistance value are traversed in the resistor network of the brightness adjustment module. For each target resistance topology path, the historical cumulative number of opening and closing times and the longest continuous energizing time of each relay included in the target resistance topology path are input into a preset cost weighting function for weighted summation to calculate the overall fatigue cumulative contribution of the corresponding target resistance topology path. Compare the historical cumulative number of opening and closing times of each relay with the preset lifespan critical threshold. Based on the comparison results, distinguish between risk relays and healthy relays, and eliminate the topology path containing the target resistance value of risk relays to form a candidate topology set. The topology path with the lowest overall fatigue cumulative contribution is selected from the candidate healthy topology set and used as the relay combination topology with the best overall stress.

[0074] In this embodiment, the brightness adjustment module deploys multiple independent relays for switching resistor arrays. Each relay suffers from mechanical spring fatigue due to repeated impacts of mechanical contacts, as well as thermodynamic aging degradation due to prolonged flow of high current. To accurately quantify this irreversible physical degradation process in the digital space, key parameters characterizing the degree of wear must be extracted from the storage unit before each operation. The execution logic extracts fatigue index values ​​for specific hardware components from the data base through direct memory access addressing operations. The feature data extraction process uses the following matrix element parsing formula: as well as In the formula, The hardware fatigue state matrix representing solidified storage. This represents the unique hardware row index number corresponding to a specific relay within the brightness adjustment module. This represents the historical cumulative number of times the corresponding relay has been opened and closed. This represents the longest continuous energizing time of the corresponding relay in a single operation. The two discrete parameters described above characterize the current health status of the component from two orthogonal physical dimensions: operation frequency and thermal accumulation. The historical cumulative number of opening and closing operations is directly related to the metal fatigue fracture limit of the spring, while the longest continuous energizing time in a single operation deeply maps the degree of oxidation ablation and temperature rise creep on the contact surface.

[0075] The electrical switching command encapsulates a specific hexadecimal opcode representing the final dimming brightness. This opcode must be decoded into equivalent resistance parameters of the resistor network with actual physical meaning. The resistor network within the brightness adjustment module is composed of numerous fixed-value resistors and multiple relay switch contacts connected in series and parallel, exhibiting a highly redundant topology. This high redundancy means that achieving the equivalent target resistance between the same network endpoints often requires multiple completely different combinations of relay closing and opening schemes. In one specific implementation, the graph theory algorithm engine abstracts the resistor network as an undirected connected graph with resistance weights and uses a depth-first search algorithm to perform topology path traversal. During the traversal, the formula for verifying the equivalent resistance of any potential path is: In the formula, This represents the equivalent calculated resistance of the potential topology path currently being verified. The variable represents the on / off status of the corresponding network branch; it is assigned a value of 1 when closed and a value of zero when open. This represents the inherent physical resistance constant of the corresponding network branch. When the calculated equivalent resistance is exactly equal to the analytical target resistance, or when the absolute error between the two is less than a preset tolerance range, the search algorithm records the current combination pattern consisting of a specific set of relay actions as a qualified target resistance topology path. By iteratively performing the above verification across the entire mesh, a complete path list containing multiple alternative execution schemes can eventually be generated.

[0076] After obtaining all electrically feasible target resistance topologies, the decision logic needs to quantitatively evaluate each switching scheme from a purely hardware loss perspective. The overall health of a topology depends entirely on the sum of the individual fatigue conditions of all closed relays constituting that path. A pre-defined cost weighting function, as a multivariate mathematical model, aims to integrate the number of opening and closing operations with different physical dimensions and the energizing time into a single, dimensionless penalty score index. In one specific implementation, a linear weighted summation model is used to evaluate the comprehensive loss cost of a single path. The penalty score calculation formula is: In the formula, This represents the overall cumulative fatigue contribution of the topology path corresponding to the final calculated target resistance value. and This refers to the historical fatigue parameters of the currently selected closed relays within the path extracted in the previous step. This represents a pre-set penalty weighting coefficient based on the number of historical actions. This represents a pre-defined penalty weighting coefficient for continuous heating time. The summation operator is responsible for accumulating the scores of all components in the active state within the path. Through the above weighted summation mechanism, older relays that frequently participate in operation and carry current for extended periods will be assigned extremely high fatigue cost scores to the current path, while newer relays that have been in a dormant or idle state for a long time will only contribute a small score. The calculated overall cumulative fatigue contribution directly reflects the additional lifespan overdraft that adopting the current path scheme would impose on the brightness adjustment module hardware array.

[0077] Among all fatigue parameters, the number of opening and closing cycles of mechanical contacts has an absolute physical failure limit. Once this limit is approached, the contacts are highly susceptible to irreversible and severe hardware failures such as mechanical jamming or arcing. To minimize this risk that could cause the entire lighthouse signal light to malfunction, the defense logic requires the introduction of a veto-type forced fuse-breaking mechanism before multi-path optimization. The preset critical life threshold is calculated based on the electromechanical life test data provided by the relay manufacturer and combined with the environmental derating curve. In one specific implementation, a status indicator function is constructed to perform component screening and path stripping operations. The risk assessment inequality is: In the formula, This represents a pre-defined, insurmountable lifetime threshold constant based on hardware derating standards. The above inequality is applied to each relay in the network. If the condition is met, the relay is labeled as a risk element in the digital array and classified as a risk relay; otherwise, it is marked as a healthy relay. Subsequently, the cleaning program traverses all previously generated target resistance topology paths. If even one risk-labeled relay is mixed into the control sequence of any path, the cleaning program immediately removes the entire path from the candidate list.

[0078] After risk screening and cleansing, each remaining solution in the candidate topology set not only achieves the equivalent resistance value required for brightness adjustment but also completely eliminates potentially dangerous components that could cause system failures. At this point, the resource allocation logic shifts to pursuing the globally optimal solution that ensures equal lifespan for the entire device cluster. Although multiple paths within the set belong to the healthy group, their accumulated fatigue cost scores still vary. The relay combination topology with the optimal overall stress is inevitably the resistance link composed of hardware components with the least wear and the lowest heat generation history. In one specific implementation, an optimization comparison algorithm is invoked to perform an ascending-order search operation on the cost scores of all paths in the set. The comparison logic sequentially retrieves the contribution scores of each path for pairwise comparison and elimination, ultimately accurately locating the driving scheme with the globally minimum value. The path corresponding to this minimum value is extracted and formally transformed into the final topology matrix diagram controlling the underlying hardware to perform opening and closing actions. Ultimately, this achieves the effect of extending the lifespan of the control device with the lowest hardware cost.

[0079] The present invention also discloses a computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the automatic brightness control method for lighthouses described in any of the above embodiments.

[0080] The computer program can be stored in a machine-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The machine-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the machine-readable medium includes, but is not limited to, the above-mentioned components.

[0081] The lighthouse automatic brightness control method described in the above embodiments is stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above method.

[0082] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.

[0083] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the protection scope of this application.

Claims

1. An automatic brightness control device for a lighthouse, characterized in that, include: Light control module, brightness adjustment module, microcontroller module, and wireless communication module; The illumination control module uses a photoresistor to control the switching between the AC power supply and the signal lights on the lighthouse. The illumination control module is electrically connected to the brightness adjustment module. The brightness adjustment module uses multiple resistors connected to a circuit to control the brightness of the signal lights on the lighthouse. The brightness adjustment module is electrically connected to the microcontroller module. The microcontroller module is connected to the wireless communication module. The microcontroller module is connected to an external control platform through the wireless communication module. The brightness adjustment module includes a buffer circuit, which includes a buffer drive circuit, a buffer relay, and a transition resistor. The input terminal of the buffer drive circuit is connected to the microcontroller module, and the output terminal of the buffer drive circuit is connected to the coil of the buffer relay. The switch of the buffer relay is connected to the illumination control module through the transition resistor. The buffer circuit is used to provide static clamping voltage division during the switching of the resistor connection circuit.

2. The automatic lighthouse brightness control device according to claim 1, characterized in that, The illumination control module includes a signal light L1, a bidirectional thyristor VS, resistors R3 and R4, a variable resistor R6, resistors R7 and R8, a capacitor C6, a photoresistor Rcds, a diode VD1, a bidirectional diode VD2, and an optocoupler OP1. One end of the signal lamp L1 is connected to one end of the AC power supply, one end of resistor R3, one end of resistor R4, the first stationary terminal of variable resistor R6, and the sliding terminal of variable resistor R6. The other end of the signal lamp L1 is connected to the negative terminal of diode VD1 and the T2 pin of the bidirectional thyristor VS. The T1 pin of the bidirectional thyristor VS is electrically connected to the brightness adjustment module. The positive terminal of diode VD1 is connected to the negative terminal of the diode in optocoupler OP1. The positive terminal of the diode in optocoupler OP1 is connected to the other end of resistor R3. The bidirectional thyristor in optocoupler OP1... One end is connected to the other end of resistor R4. The other end of the bidirectional thyristor in the optocoupler OP1 is connected to the second stationary terminal of the variable resistor R6 and one end of resistor R7. The other end of resistor R7 is connected to one end of capacitor C6, one end of resistor R8, and one end of bidirectional diode VD2. The other end of bidirectional diode VD2 is connected to the G pin of bidirectional thyristor VS. The other end of resistor R8 is connected to one end of photoresistor Rcds. The other end of photoresistor Rcds is connected to the brightness adjustment module, the other end of the AC power supply, and the other end of capacitor C6. The buffer switch is connected between the T1 pin of the bidirectional thyristor VS and the other end of the photoresistor Rcds.

3. The automatic lighthouse brightness control device according to claim 2, characterized in that, The microcontroller module uses a microcontroller chip; the wireless communication module includes a wireless communication module, and the serial communication interface of the wireless communication module is electrically connected to the microcontroller chip. The brightness adjustment module includes N+1 resistor access circuits, each of which is electrically connected to both the illumination control module and the microcontroller module. Different resistor access circuits have different resistance values ​​connected to the illumination control module. Each resistor access circuit includes a relay drive circuit, a relay K2, and n series resistors (n=0,1,…,N+1) disposed on the switch terminal of the relay K2. The input terminal of the relay drive circuit is connected to the microcontroller chip, and the output terminal is connected to the coil of the relay K2. One end of the switch terminal of the relay K2 is connected to the T1 pin of the bidirectional thyristor VS, and the other end is connected to the n series resistors. The resistor pin furthest from the other end of the switch terminal of the relay K2 is connected to the other end of the photoresistor Rcds.

4. A method for automatic brightness control of a lighthouse, applied to the automatic brightness control device for a lighthouse as described in claim 1, characterized in that, The method includes the following steps: In the microcontroller module, a light dynamic hysteresis spectrum is constructed that includes external environmental data and a light response model with preset light sensing inertia and light intensity change response rate. A hardware fatigue state matrix is ​​also constructed based on the multidimensional stress state of each relay in the brightness adjustment module. The microcontroller module continuously collects the instantaneous voltage division data of the photoresistor in the illumination control module as the external environment data in the photodynamic hysteresis spectrum, and calculates the target state value of the instantaneous fluctuation of the immune light intensity by performing real-time numerical integration on the illumination response model. The microcontroller module compares the changing trend of the target state value in the preset brightness dimming threshold space and generates an electrical switching command for the corresponding target brightness level. When a gear shifting action is detected based on an electrical switching command, the buffer circuit is closed first at the zero-crossing point based on AC phase monitoring, so that the optocoupler control terminal in the lighting control module is forced to clamp to a preset transition level to isolate electrical oscillations caused by a sudden change in the circuit topology of the control device. During the closed period of the buffer circuit, the cumulative fatigue contribution of multiple target resistance topology paths in the brightness adjustment module is analyzed based on the hardware fatigue state matrix. The risk relays and health relays in the brightness adjustment module are distinguished according to the cumulative fatigue contribution, and the relay combination topology with the best overall stress is selected. Disconnect the relay corresponding to the current brightness level in the brightness adjustment module and close the relay combination topology. At the next zero crossing point, disconnect the buffer circuit and update the action record data of the relay combination topology in the hardware fatigue state matrix.

5. The automatic lighthouse brightness control method according to claim 4, characterized in that, The step of calculating the target state value of the instantaneous fluctuation of immune light intensity by performing real-time numerical integration on the light response model includes the following steps: Input external environment data into the outer boundary node of the illumination response model; A differential propagation grid is constructed based on the preset illumination sensing inertia and light intensity change response rate of the illumination response model; In the differential transmission grid, the Runge-Kutta algorithm is used to numerically integrate the transmission process of external environmental data to the internal nodes of the differential transmission grid, and the numerical integration result is obtained. Extract the integral results of the center node of the differential propagation grid from the numerical integration results, and calculate the target state value of the immune transient fluctuation.

6. The automatic lighthouse brightness control method according to claim 5, characterized in that, The step of numerically integrating the transmission process of external environmental data to the internal nodes of the differential transmission grid using the Runge-Kutta algorithm to obtain the numerical integration result includes the following steps: Obtain the initial light intensity change gradient vector of each internal node in the differential propagation grid at the current sampling time; Substitute the initial light intensity change gradient vector and external environment data into the first-order partial derivative formula of the Runge-Kutta algorithm to calculate the first slope prediction value. The second and third slope predictions are calculated based on the first slope prediction and at half a step of the differential propagation grid. The fourth slope prediction value is calculated at the full step length of the differential propagation grid based on the third slope prediction value; The target step size update is obtained by weighting the predicted values ​​of the first slope, the second slope, the third slope, and the fourth slope. The target step size update is superimposed on the initial light intensity change gradient vector to complete the real-time numerical integration of the transmission process of external environment data to internal nodes, and the numerical integration result is obtained.

7. The automatic lighthouse brightness control method according to claim 6, characterized in that, The steps for obtaining the initial light intensity change gradient vector of each internal node in the differential propagation grid at the current sampling time include the following: Retrieve the internal node illuminance distribution matrix of the differential transmission mesh at the previous sampling time; The spatial Laplacian operator is used to perform spatial second derivative operations on the illuminance distribution matrix of the internal nodes to extract the spatial second derivative matrix; The light intensity change responsivity of the illumination response model is multiplied by the spatial second derivative matrix to obtain the illumination state diffusion distribution. By combining external environmental data, the boundary conditions of the light diffusion distribution are corrected to generate a corrected local light intensity transformation matrix. The corrected local light intensity transformation matrix is ​​converted into the initial light intensity change gradient vector of each internal node at the current sampling time.

8. The automatic lighthouse brightness control method according to claim 4, characterized in that, When a gear shifting action is detected based on an electrical switching command, the buffer circuit is preferentially closed at the zero-crossing point based on AC phase monitoring, forcibly clamping the optocoupler control terminal in the lighting control module to a preset transition level to isolate electrical oscillations caused by abrupt changes in the control device circuit topology. This includes the following steps: When a gear shifting action is detected based on an electrical switching command, a zero-crossing detection comparator connected in parallel with the AC power supply in the control device is activated to monitor the AC phase. The zero-crossing point is captured by a zero-crossing detection comparator, which captures the absolute physical moment when the AC power supply voltage waveform crosses zero potential. When the zero crossing point arrives, a high-level drive signal is sent to the buffer drive input terminal of the buffer circuit; The high-level drive signal causes the buffer circuit to close preferentially. The transition resistor in the buffer circuit is connected to the circuit topology of the control device. Through the bypass shunting effect of the transition resistor, the optocoupler control terminal in the lighting control module is forced to clamp to the preset transition level and maintains the transition level to isolate electrical oscillations caused by abrupt changes in the circuit topology.

9. The automatic brightness control method for a lighthouse according to claim 8, characterized in that, The step of capturing the absolute physical instant when the AC power supply voltage waveform crosses zero potential as the zero-crossing point using a zero-crossing detection comparator includes the following steps: The output digital pulse sequence of the zero-crossing detection comparator is acquired, and the rising and falling edges of the output digital pulse sequence are detected to generate a timestamp record sequence. Calculate the time difference between adjacent pulse edges in a timestamp record sequence; The time difference is compared with the theoretical power frequency cycle parameter of the AC power supply. High-frequency interference other than the theoretical power frequency cycle parameter is eliminated to locate the zero potential crossing event, and the timestamp corresponding to the zero potential crossing event is extracted as the zero crossing point.

10. The automatic lighthouse brightness control method according to claim 4, characterized in that, The process of analyzing the cumulative fatigue contribution of multiple target resistance topologies in the brightness adjustment module based on the hardware fatigue state matrix during the buffer circuit closure, distinguishing between risk relays and healthy relays in the brightness adjustment module according to the cumulative fatigue contribution, and optimizing the relay combination topology with the optimal overall stress includes the following steps: Read the historical cumulative number of opening and closing times and the longest continuous power-on time for each relay in the brightness adjustment module from the hardware fatigue state matrix. The target resistance value required to achieve the electrical switching command is analyzed, and all multiple topological paths that can achieve the target resistance value are traversed in the resistor network of the brightness adjustment module. For each target resistance topology path, the historical cumulative number of opening and closing times and the longest continuous energizing time of each relay included in the target resistance topology path are input into a preset cost weighting function for weighted summation to calculate the overall fatigue cumulative contribution of the corresponding target resistance topology path. Compare the historical cumulative number of opening and closing times of each relay with the preset lifespan critical threshold. Based on the comparison results, distinguish between risk relays and healthy relays, and eliminate the topology path containing the target resistance value of risk relays to form a candidate topology set. The topology path with the lowest overall fatigue cumulative contribution is selected from the candidate healthy topology set and used as the relay combination topology with the best overall stress.