Sun visor LED lamp light intensity automatic control system and control method
Patent Information
- Application Number
- CN202611330955.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-09-29
AI Technical Summary
[0003]在驾乘人员开启化妆镜盖时,镜盖边缘会随开启位置变化,先后改变外界光线、LED直射光及镜面反射光进入光照传感器的路径;同时,镜盖开启时间较短,开启速度受人为操作影响,车辆振动又会引起检测位置偏移,且车内照明控制不宜长期依赖摄像装置识别人脸,也不适合额外设置独立照度测量设备;
[0063]1、 本方案利用镜盖开启时各光路依次遮挡和释放的变化关系,分离环境光、镜面反射光和LED直射光,降低多光照混叠造成的亮度误判;
Smart Images

Figure CN122846546A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive sun visor lighting control technology, and more specifically, to an automatic control system and method for the light intensity of LED lights for sun visors. Background Technology
[0002] Existing sun visor LED lights mostly control the start and stop of the lights based on the opening and closing status of the mirror cover. They also combine the light sensor set near the sun visor to collect changes in the light inside the vehicle, and then send the mirror cover status, light detection results and light working status to the control terminal via wireless communication. The control terminal then generates dimming commands according to preset brightness levels or corresponding relationships.
[0003] When passengers open the vanity mirror cover, the edge of the cover changes with the opening position, altering the paths of external light, direct LED light, and reflected light from the mirror into the light sensor. Meanwhile, the opening time of the cover is short, the opening speed is affected by human operation, vehicle vibration can cause the detection position to shift, and the interior lighting control should not rely on camera devices to recognize faces for a long time, nor is it suitable to set up additional independent illuminance measurement equipment.
[0004] In the above situation, the light detection value obtained after the lens cover is opened already contains multiple light components. The existing control method cannot accurately distinguish whether the change in the detection value is caused by changes in external light, direct LED light entering the detection area, or enhanced mirror reflection. Therefore, under the same external light conditions, different lens cover opening speeds, opening paths, or stopping positions will correspond to different control brightness. In practice, the LED light will suddenly brighten, then drop in brightness, and repeatedly adjust during or after the lens cover is opened.
[0005] The technical problem to be solved by this application is: how to use the changing relationship between the sequential blocking and release of different light paths during the opening of the mirror cover to obtain the detection results corresponding to ambient light, mirror reflected light and direct LED light, and determine the control brightness of the sunshade LED light accordingly. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an automatic control system and method for the light intensity of a sunshade LED light. By performing zero-drive and half-rated drive paired sampling at each position of the mirror cover opening, combined with optical path boundary identification, response fitting, and wireless measurement correction, ambient light, specular reflected light, and direct LED light are separated, and a light intensity sequence of the sunshade LED light is generated accordingly, thereby solving the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: an automatic control method for the light intensity of an LED light on a sunshade, comprising:
[0008] S1. Obtain the mirror cover opening position code, divide the rated drive code by two and discard the remainder to obtain the half rated drive code, and collect the off light illumination value and spot light illumination value of the sun visor edge node bit by bit with the zero drive code and half rated drive code, and transmit them to the edge computing node through wireless networking to form an opening sequence.
[0009] S2. Subtract the lamp-off illumination value corresponding to the same position code from the lamp-on illumination value, divide the difference by half the rated drive code to form a unit response value, take the absolute value of adjacent differences to form a change sequence, perform zero-sustaining long-term modulation point detection, connect adjacent positions in descending order of change value, when merging branches, subtract the change value of the merged position from the birth change value of the disappearing branch to obtain the persistence length, write the position code and persistence length corresponding to the positive response increment into the candidate table, select candidate position pairs that satisfy the previous and next order from the candidate table, and determine the reflection boundary position and direct light boundary position based on the segmented fitting result and persistence length of the candidate position pairs;
[0010] S3. Divide the block into segments according to the two boundary positions, and perform the adjacent violator merging algorithm on the unit response value. When the mean of the left block is higher than that of the right block, merge the blocks and recalculate the mean according to the number of positions. Repeat this process until the mean no longer decreases to obtain the response fitting sequence.
[0011] S4. Read the light value of the lamp-off position corresponding to the last position code of the turn-on sequence as the ambient light value, and verify the measured unit response value of the last position. Subtract the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct light boundary position to obtain the initial reflection response value. Subtract the response fitting value corresponding to the direct light boundary position from the response fitting value corresponding to the last position code to obtain the initial direct light response value. Allocate the measured unit response value of the last position according to the ratio of the two initial response values to obtain the reflection response value and the direct light response value.
[0012] S5. The target illumination value minus the ambient light value is the supplementary light amount. Negative values are recorded as zero. The sum of the two response values is the unit drive illumination amount. When it is not zero, the supplementary light amount is divided by the unit drive illumination amount to obtain the light intensity value, which is limited to zero to the rated drive code. When it is zero, the light intensity value is recorded as zero. It is wirelessly transmitted to the edge node of the sunshade and the sunshade LED lights are controlled according to the ambient light conditions.
[0013] In a preferred embodiment, S1 includes:
[0014] S11. After the mirror cover is opened, the sun visor edge node generates a position code in the order of increasing displacement. The vehicle edge computing node generates a three-step drive sequence of zero drive code, half rated drive code and zero drive code according to the received position code and executes it in sequence. The sequence is then sent to the sun visor edge node through wireless networking.
[0015] The process of generating a three-step drive sequence based on the received location code, executing the zero-drive code, half-rated drive code, and zero-drive code in sequence is as follows: The vehicle edge computing node uses the received location code as the sequence index, establishes the starting step with the zero-drive code, divides the rated drive code by two and discards the remainder to obtain the half-rated drive code, establishes the intermediate step with the half-rated drive code, and establishes the ending step with the zero-drive code. The adjacent execution sequence numbers are written in the order of the starting step, intermediate step, and ending step to form a three-step drive sequence bound to the location code.
[0016] S12. Before switching from the current position code to the next position code, the sunshade edge node drives the sunshade LED light according to the three-beat drive sequence. At the end of each beat, the illumination value is collected. Based on the zero drive illumination value of the previous and next beats, linear interpolation is performed on the sampling time of the middle beat. The interpolation result is recorded as the off-light illumination value, and the half rated drive illumination value of the middle beat is recorded as the spot light illumination value.
[0017] S13. After completing the three-shot sampling of the current position code, the sun visor edge node binds the off-light illumination value and the on-light illumination value to the current position code to form a position record, and sends it to the vehicle edge computing node through wireless networking. The vehicle edge computing node arranges the position records in ascending order of the position code, sends a supplementary transmission command for the current position code that is missing any driving shot, and forms an opening sequence after each position code corresponds to a complete position record.
[0018] In a preferred embodiment, S2 includes:
[0019] S21. The vehicle edge computing node reads the start sequence in ascending order of position code, subtracts the light-off light value corresponding to the same position code from the light-on light value, divides the difference by half the rated drive code to form the unit response value, and then subtracts the unit response value corresponding to the previous position code from the unit response value corresponding to the next position code to obtain the response increment, and takes the absolute value of the response increment to form the change sequence.
[0020] The semi-rated drive code is an integer drive code obtained by dividing the rated drive code by two and discarding the remainder; the difference between the spot light illumination value and the off light illumination value corresponding to the same position code is used to represent the light sensor quantization increment generated by the sunshade LED light under the semi-rated drive code at the current position code; dividing the difference by the semi-rated drive code is used to unify the light sensor quantization increment obtained under each position code to the same drive code scale, so as to compare the unit response values between different position codes;
[0021] S22. Perform zero-sustainability long-term co-modulation point detection on the change sequence, add position vertices in descending order of change value and ascending order of position code, and connect adjacent position vertices that have been added; when merging two connected branches, retain the branch added first and cancel the branch added later, and obtain the persistence length by subtracting the change value of the merged position from the birth change value of the canceled branch, and write the position code and persistence length corresponding to the positive response increment into the candidate table.
[0022] The process of performing zero-persistence long-term homodyne detection is as follows: establish position vertices based on each position code, use the corresponding change value as the order of adding position vertices, and add position vertices one by one in descending order of change value; when the change values are the same, add them in ascending order of position code; for each added position vertex, check whether the position vertices corresponding to the previous and next position codes have been added, and establish a connection if they have been added; when the newly added position vertex is not connected to other position vertices, a new connected component is formed; when it is connected to only one connected component, it is merged into the connected component; when it is connected to two connected components, the first connected component is retained and the second connected component is cancelled, and the birth change value of the cancelled connected component and the change value of the current merged position are recorded, and the difference between the two is the persistence length;
[0023] The change value is the absolute value of the response increment corresponding to the current position encoding; the birth change value is the change value corresponding to the position vertex that forms the connected component when the connected component is first formed.
[0024] A position vertex is a graph vertex that corresponds one-to-one with a position code in the open sequence. When the position codes corresponding to two position vertices are adjacent and both have been added, a connection is established between the two position vertices.
[0025] A connected component is a set of connected vertices consisting of added vertices and their connections. Any two vertices in the set can be reached by connecting adjacent vertices, and there are no added vertices outside the set that are connected to vertices in the set.
[0026] In a preferred embodiment, S2 further includes:
[0027] S23. Select candidate position pairs from the candidate table that satisfy the sequential order and divide the opening sequence into three position segments. Perform the adjacent violator merging algorithm on the unit response value in each position segment. When the mean of the left block is higher than the mean of the right block, merge the two blocks and recalculate the mean according to the number of position codes. Repeat until the mean of each block does not decrease. Calculate the arithmetic mean of all unit response values. Square the difference between each unit response value and the arithmetic mean and sum them to obtain the sum of squares of the unit response deviation of the whole sequence. Square the difference between the fitted value of each position code in the three position segments and the unit response value corresponding to the same position code and sum them to obtain the sum of squares of the fitted residuals. Divide the sum of squares of the fitted residuals by the sum of squares of the unit response deviation of the whole sequence to form the fitting cost. Add the persistence lengths corresponding to the two candidate positions in the current candidate position pair to obtain the candidate persistence length sum. Add the persistence lengths corresponding to all candidate positions in the candidate table to obtain the candidate table persistence length sum. Divide the candidate persistence length sum by the candidate table persistence length sum to obtain the persistence ratio. Subtract the persistence ratio from one to form the topology cost. Add the fitting cost and the topology cost to form the comprehensive cost.
[0028] The process of executing the adjacent violator merging algorithm is as follows: Within each position segment, each unit response value is established as a single-value block in ascending order of position codes. The mean values of adjacent single-value blocks are compared sequentially. When the mean value of the left block is higher than the mean value of the right block, the two single-value blocks are merged. The sum of the unit response values contained in the two single-value blocks is divided by the total number of position codes to obtain the merged mean value. The comparison is then repeated from the merged block backward. The process continues until all adjacent blocks satisfy the condition that the mean value of the left block is not higher than the mean value of the right block. The mean value of each single-value block is then written into all position codes contained in that single-value block.
[0029] The left block mean and right block mean refer to the arithmetic mean of the unit response values contained in the first single-value block and the arithmetic mean of the unit response values contained in the second single-value block, which are arranged in ascending order of position coding.
[0030] The three-segment fitted value refers to the fitted sequence formed by combining the fitted values of the three position segments in ascending order of position codes after performing the adjacent violator merging algorithm on the three position segments respectively, writing the mean of the single-value block to which each position code belongs as the fitted value of that position code;
[0031] S24. Read the first candidate position pair in ascending order of comprehensive cost, and record them as the reflection boundary position and direct light boundary position along the opening direction of the mirror cover. When the total length of the candidate table is zero, the sum of squares of the unit response deviation of the whole sequence is zero, or the candidate position pair is empty, the vehicle edge computing node binds each position code to the three-step sequence of zero driving code, half rated driving code, and zero driving code, and sends it to the sun visor edge node through wireless networking to re-collect the opening sequence. Otherwise, the reflection boundary position and direct light boundary position are sent through wireless networking for segmented intensity control of the sun visor LED light.
[0032] In a preferred embodiment, S3 includes:
[0033] S31. Divide the unit response value into three position segments based on the reflection boundary position and the direct sunlight boundary position. In each position segment, establish a single-value block according to the position code. At the cost of the sum of squares of the difference between the fitted value and the unit response value, and with the constraint that the fitted value does not decrease along the position code and the block boundary does not cross the reflection boundary position and the direct sunlight boundary position, when the mean of the left block is higher than the mean of the right block, merge the two blocks and recalculate the block mean by dividing the sum of the responses of the two blocks by the number of positions, until the mean of adjacent blocks does not decrease, forming the initial fitted sequence.
[0034] The process of establishing a single-value block is as follows: read the unit response value in ascending order of position code within each position segment, establish an initial block with a position code and its unit response value, and write the start position code, end position code, number of positions, response sum and block average into the initial block. The start position code and end position code are both the current position code, the number of positions is one, and the response sum and block average are both the current unit response value.
[0035] The method of recalculating the block mean by dividing the sum of the two responses by the number of positions means: after merging two adjacent blocks, add the sum of the responses of the two blocks to get the merged sum of responses, add the number of positions of the two blocks to get the number of merged positions, and then divide the merged sum of responses by the number of merged positions to get the new block mean.
[0036] S32. For a merged block containing two or more location codes, delete one location code at a time and recalculate the block mean using the remaining unit response value. Use the absolute value of the difference between the deleted unit response value and the recalculated block mean to form the deletion residual. Then, form the re-collection order by descending order of deletion residual and ascending order of location code.
[0037] A merged block is a block formed by merging two adjacent blocks within the same location segment because the mean of the previous block is higher than the mean of the next block. The merged block covers all adjacent location codes contained in the two original blocks and records the start location code, end location code, number of locations, response sum, and block mean of the merged block.
[0038] In a preferred embodiment, S3 further includes:
[0039] S33. The edge computing node reads the first location code of the re-sampling sequence in each merged block that has not been written with a re-sampling mark, and sends a three-step instruction of zero driving code, half rated driving code and zero driving code bound to the location code through wireless networking. After the sunshade edge node returns the re-sampling unit response value, it replaces the original unit response value and writes the re-sampling mark, and then repeats S31 and S32.
[0040] The re-sampling mark is a binary field bound to a location code, with an initial value of zero. After the sunshade edge node completes the three-shot re-sampling corresponding to the location code and the edge computing node receives the valid re-sampling unit response value and replaces the original unit response value, the re-sampling mark is written as one. When the three-shot re-sampling is not completed or the re-sampling unit response value is not replaced, the re-sampling mark remains zero.
[0041] S34. When the start and end positions of the blocks in the current round are the same as those in the previous round, and the block average is the same, the re-sampling sequence is empty, or the position codes in the re-sampling sequence are all written to the re-sampling mark, stop the iteration, write the block average into the position code in the block, and connect them according to the position codes to form a response fitting sequence.
[0042] In a preferred embodiment, S4 includes:
[0043] S41. Read the light value of the off lamp corresponding to the last position code of the turn-on sequence as the ambient light value, generate a four-step verification sequence executed according to the zero drive code, one-quarter rated drive code, three-quarters rated drive code, and zero drive code, and send it to the edge node of the sunshade through wireless networking.
[0044] S42. The edge node of the sunshade performs a four-shot verification sequence under the last position code and collects the illumination value shot by shot. Based on the first and last illumination values, linear interpolation is performed on the two lighting sampling times respectively. The corresponding interpolation value is subtracted from the two lighting illumination values to obtain the two net lighting values. Then, the sum of the products of the two driving codes and the corresponding net lighting values is divided by the sum of the squares of the two driving codes to obtain the last measured unit response value.
[0045] S43. Read the response fitting values corresponding to the reflection boundary position, direct sunlight boundary position and last position code from the response fitting sequence. Subtract the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct sunlight boundary position to obtain the initial reflection response value. Subtract the response fitting value corresponding to the direct sunlight boundary position from the response fitting value corresponding to the last position code to obtain the initial direct sunlight response value. Add the two initial response values to obtain the initial total response value.
[0046] S44. When the initial total response value is non-zero, the reflection response value is obtained by multiplying the last measured unit response value by the ratio of the initial reflection response value to the initial total response value, and the direct response value is obtained by multiplying the last measured unit response value by the ratio of the initial direct response value to the initial total response value. When the initial total response value is zero, both the reflection response value and the direct response value are written as zero, forming the spectroscopic results corresponding to the ambient light value, reflection response value, and direct response value.
[0047] In a preferred embodiment, S5 includes:
[0048] S51. Convert the target illumination value and ambient light value into the quantization unit of the light sensor, subtract the ambient light value from the target illumination value to obtain the supplementary light amount, write zero when the supplementary light amount is negative, and form the unit driving illumination amount by the sum of the reflection response value and the direct response value.
[0049] The target illumination value refers to the illuminance corresponding to the light sensor output value that is written into the edge computing node by the vehicle setting terminal after the mirror cover is opened, which represents the expected illumination area of the sun visor LED light.
[0050] The process of converting to quantization units for light sensors is as follows: edge computing nodes read sensor calibration points arranged in ascending order of degrees. Each sensor calibration point includes a calibration illuminance and a calibration quantization value. When the target illumination value is between two adjacent calibration illuminances, the target illumination quantization value is obtained by multiplying the difference between the target illumination value and the previous calibration illuminance by the difference between the two calibration quantization values, and then adding the previous calibration quantization value. When the target illumination value is before the first calibration illuminance, the first calibration quantization value is read; when it is after the last calibration illuminance, the last calibration quantization value is read.
[0051] S52. When the unit drive illumination is non-zero, the edge computing node first sends a three-step verification sequence of zero drive code, rated drive code, and zero drive code through wireless networking. Based on the zero drive illumination value before and after, linear interpolation is performed on the rated drive sampling time. The rated illumination is obtained by subtracting the interpolation result from the rated drive illumination value. When the rated illumination is not higher than the supplementary light, the rated drive code is written as the light intensity value. When the rated illumination is higher than the supplementary light, the zero drive code and the rated drive code are used as the lower bound code and the upper bound code, respectively. The three-step verification is performed repeatedly by taking the midpoint of the two integers. When the midpoint illumination is not higher than the supplementary light, the midpoint is used to replace the lower bound code. When the midpoint illumination is higher than the supplementary light, the midpoint is used to replace the upper bound code. This process continues until the upper bound code and the lower bound code differ by one bit, thus obtaining the adjacent drive code and the corresponding illumination.
[0052] The midpoint illumination refers to the midpoint driving code obtained by dividing the sum of the lower bound code and the upper bound code by two and taking the integer part by the edge computing node. The edge nodes of the sunshade are controlled by wireless networking to execute the zero driving code, the midpoint driving code, and the zero driving code in sequence. At the sampling time of the middle frame, linear interpolation is performed on the zero driving illumination values of the two frames before and after. The net illumination is obtained by subtracting the interpolation result from the illumination value of the middle frame.
[0053] In a preferred embodiment, S5 further includes:
[0054] S53. Subtract the lower bound illumination amount from the supplementary light amount to obtain the upper bound number of beats. Subtract the supplementary light amount from the upper bound illumination amount to obtain the lower bound number of beats. Divide the upper bound number of beats and the lower bound number of beats by the first common divisor of the two in descending order of their values to obtain the reduced upper bound number of beats and the reduced lower bound number of beats. Use the sum of the two as the periodic number of beats. Set the cumulative value to zero from the first beat of the period. Before generating each beat, add the reduced upper bound number of beats to the cumulative value. When the cumulative value reaches the periodic number of beats, write the upper bound code and subtract the periodic number of beats from the cumulative value. When the cumulative value does not reach the periodic number of beats, write the lower bound code. Continue until the number of generated beats reaches the periodic number of beats to form a light intensity sequence in which the periodic average illumination amount equals the supplementary light amount.
[0055] S54. The edge computing node writes the light intensity sequence into a sequence version and sends it to the sunshade edge node via wireless networking. The sunshade edge node presses the button to drive the sunshade LED light and sends back the executed button number. The edge computing node resends the light intensity sequence from the first unconfirmed button number and re-executes S51 to S53 after the ambient light value is updated.
[0056] An automatic control system for the light intensity of a sunshade LED light, the system comprising a sequence acquisition module, a boundary recognition module, a response fitting module, a light path decomposition module, and an intensity control module:
[0057] The sequence acquisition module is used to obtain the opening position code of the mirror cover. The rated drive code is divided by two and the remainder is discarded to obtain the half rated drive code. The edge nodes of the sun visor collect the light value of the off light and the light value of the spot light bit by bit with the zero drive code and the half rated drive code. The data is then transmitted to the edge computing node through the wireless network to form the opening sequence.
[0058] The boundary identification module is used to subtract the lamp-off illumination value corresponding to the same position code from the spot lamp illumination value, divide the resulting difference by half the rated drive code to form a unit response value, take the absolute value of the adjacent difference to form a change sequence, perform zero-sustaining long-term same modulation point detection, connect adjacent positions in descending order of change value, when merging branches, subtract the change value of the merged position from the birth change value of the disappearing branch to obtain the persistence length, write the position code corresponding to the positive response increment and the persistence length into the candidate table, select candidate position pairs that satisfy the front-to-back order from the candidate table, and determine the reflection boundary position and the direct light boundary position based on the piecewise fitting result and persistence length of the candidate position pairs;
[0059] The response fitting module is used to segment the response by two boundary positions, perform an adjacent violator merging algorithm on the unit response value, merge the left block when the mean is higher than the right block and recalculate the mean according to the number of positions, repeat until the mean no longer decreases, and obtain the response fitting sequence.
[0060] The optical path decomposition module is used to read the light value of the lamp-off position corresponding to the last position code of the turn-on sequence as the ambient light value, and verify the measured unit response value of the last position; the initial reflection response value is obtained by subtracting the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct light boundary position, and the initial direct light response value is obtained by subtracting the response fitting value corresponding to the direct light boundary position from the response fitting value corresponding to the last position code; the measured unit response value of the last position is allocated according to the ratio of the two initial response values to obtain the reflection response value and the direct light response value.
[0061] The intensity control module is used to subtract the ambient light value from the target illumination value to obtain the supplementary light amount. Negative values are recorded as zero. The sum of the two response values is the unit drive illumination amount. When it is not zero, the supplementary light amount is divided by the unit drive illumination amount to obtain the light intensity value, which is limited to zero to the rated drive code. When it is zero, the light intensity value is recorded as zero. It is wirelessly transmitted to the edge node of the sunshade and controls the sunshade LED lights according to the ambient light conditions.
[0062] The technical effects and advantages of this invention are as follows:
[0063] 1. This solution utilizes the changing relationship between the sequential blocking and release of light paths when the mirror cover is opened to separate ambient light, mirror reflected light, and direct LED light, thereby reducing brightness misjudgment caused by the superposition of multiple illuminations.
[0064] 2. Ambient light components are eliminated by zero-drive and half-rated-drive sampling under the same position encoding, and the variation between samples is corrected by linear interpolation, which improves the response consistency under different opening speeds.
[0065] 3. Zero-duration coherence is used to extract optical path boundary candidates, and then segmented order-preserving fitting is used for verification, which can relatively suppress local anomalies caused by vehicle vibration and positional shift.
[0066] 4. Determine the re-sampling location based on the deletion residual, and perform fixed-point re-sampling through wireless networking to reduce the range of invalid re-sampling, improve the integrity of the start sequence and the traceability of results;
[0067] 5. Use the last four-step verification to correct the total response, and then allocate the reflection response and direct response according to the fitting ratio to ensure that the spectral results correspond to the fully open state of the lens cover. Attached Figure Description
[0068] Figure 1 This is a flowchart of the LED light control process for the sunshade of the present invention;
[0069] Figure 2 This is a diagram of the LED light control system for the sunshade of the present invention. Detailed Implementation
[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] Refer to the instruction manual appendix Figure 1-2 The present invention provides an automatic control method for the light intensity of an LED light for a sunshade, comprising:
[0072] S1. Obtain the mirror cover opening position code, divide the rated drive code by two and discard the remainder to obtain the half rated drive code, and collect the off light illumination value and spot light illumination value of the sun visor edge node bit by bit with the zero drive code and half rated drive code, and transmit them to the edge computing node through wireless networking to form an opening sequence.
[0073] During the period when the lens cover is open, the illumination values of the off light and the illumination values of the on light need to have the same location attribution and a clear sampling sequence in order to eliminate the influence of lens cover displacement and ambient light changes on the calculation of unit response value;
[0074] This implementation method distinguishes each lens cover opening process by opening batch number, locks the sampling range by location code, and then uses zero drive code, half rated drive code and zero drive code to form a three-step drive sequence. The command is issued, light is collected and the location is recorded and collected through wireless networking. The following is an explanation in the above processing order.
[0075] Position assignment is first established by the displacement of the lens cover; the closed stop position of the lens cover is taken as the zero point of displacement, and the fully open stop position is taken as the end point of the stroke. The opening stroke is divided according to the position interval width. The position interval width is the product of the specified opening speed and the total duration of three steps, and rounded up to an integer multiple of the resolution of the displacement sensor.
[0076] When the sun visor moves from the closed stop position into the open stroke, the edge node of the sun visor increments the local batch count by one and writes it as the open batch number. Then, the current displacement is divided by the position interval width and the remainder is discarded. The resulting integer is written as the position code.
[0077] When the location code is equal to the confirmed location code plus one, S11 sends the start batch number and location code from the sun visor edge node to the vehicle edge computing node. The vehicle edge computing node uses the two to form a sequence index, writes the zero drive code into the starting frame, divides the rated drive code by two and discards the remainder to obtain the half rated drive code, writes the half rated drive code into the middle frame, writes the zero drive code into the ending frame, and writes the adjacent execution sequence number and uniform frame length in sequence to form a three-frame drive sequence, which is then sent to the sun visor edge node via wireless networking.
[0078] When the position code is repeated, the generated three-step drive sequence is used. When the position code rolls back or crosses one position, the current batch is terminated and the unconfirmed three-step drive sequence is deleted.
[0079] After the three-step drive enters the execution phase, the edge node of the sun visor first checks the start batch number and position code, then latches the current position code, and after the check is consistent, drives the sun visor LED light according to the execution sequence number.
[0080] S12 sets the same number of drive carrier cycles for each frame, and reads the quantization value of the light sensor at the end of the last drive carrier cycle of each frame, and obtains the initial zero drive light value, the half rated drive light value and the end zero drive light value in sequence.
[0081] When processing the ambient light reference for the intermediate shot, the duration obtained by subtracting the sampling time of the starting shot from the sampling time of the intermediate shot is divided by the duration obtained by subtracting the sampling time of the starting shot from the sampling time of the ending shot. Then, it is multiplied by the difference between the ending zero-drive illumination value and the starting zero-drive illumination value, and the starting zero-drive illumination value is added. The result is written as the lamp-off illumination value, and the half-rated drive illumination value is written as the spot lamp illumination value.
[0082] When the three phases use the same phase length, the light value when the light is turned off is equal to the sum of the initial zero-drive light value and the final zero-drive light value divided by two. If the current position code changes before the three phases are completed, all collected light values are deleted and no position record is formed. If any drive phase is not completed and the current position code is still maintained, the three-phase drive sequence is re-executed from the initial phase.
[0083] After the sampling results are formed, the edge nodes of the sun visor are written with a three-bit completion code according to the completion status of the start, middle and end shots. Each time a shot is completed, the corresponding bit is written as 1.
[0084] When all three are in a single moment, S13 will write the batch number, location code, light-off illumination value, light-on illumination value, and photo completion code into the location record, and use the batch number and location code to form a composite key, which will be sent to the vehicle edge computing node via wireless networking.
[0085] The vehicle-mounted edge computing node only writes the location records with complete codes to the cache of the currently enabled batch. Duplicate location records corresponding to the same composite key are only confirmed once. Location records arriving out of order are temporarily stored according to the location code. Location records with an enabled batch number earlier than the current enabled batch number are directly deleted.
[0086] When the sampling completion code has zero bits, the vehicle edge computing node sends a retransmission instruction carrying the start batch number, location code, and missing sampling number. The sun visor edge node reads the missing illumination value from the local sampling cache and retransmits it. If the local sampling cache does not have the missing illumination value, the three-sampling drive sequence is re-executed if the current location code is kept. If the current location code has changed, the current start batch is written as sampling incomplete.
[0087] After detecting the fully open stop position, the vehicle edge computing node checks that the first position code to the last position code has a complete position record. Then, it connects the off-light illumination value and the on-light illumination value in ascending order of the position codes to form an opening sequence for S2 to read.
[0088] When the lens cover opening stroke is 96 mm and the position interval width is 4 mm, the position code is 0 to 24 in sequence; the rated drive code is 1023, and the rated drive code is divided by 2 and the remainder is discarded to obtain the half rated drive code 511. Each beat contains eight drive carrier cycles.
[0089] After the mirror cover enters the position interval corresponding to position code six, three samplings are obtained in sequence as 300, 420 and 304. When the three sampling durations are the same, the illumination value of the light-off lamp is written as 302 and the illumination value of the light-on lamp is written as 420. When the end sampling data is missing in the wireless transmission, the sunshade edge node retransmits the end sampling data from the local sampling buffer according to the retransmission instruction.
[0090] The above processing ensures that two illumination values encoded at the same location maintain a consistent spatial reference, and prevents duplicate, out-of-order, missing, and old open batch data from altering the open sequence, providing a complete and unique input for subsequent unit response value and change sequence calculations.
[0091] S2. Subtract the lamp-off illumination value corresponding to the same position code from the lamp-on illumination value, divide the difference by half the rated drive code to form a unit response value, take the absolute value of adjacent differences to form a change sequence, perform zero-sustaining long-term modulation point detection, connect adjacent positions in descending order of change value, when merging branches, subtract the change value of the merged position from the birth change value of the disappearing branch to obtain the persistence length, write the position code and persistence length corresponding to the positive response increment into the candidate table, select candidate position pairs that satisfy the previous and next order from the candidate table, and determine the reflection boundary position and direct light boundary position based on the segmented fitting result and persistence length of the candidate position pairs;
[0092] To determine the release boundary between the reflected light path and the direct light path by the opening sequence, it is necessary to first eliminate the ambient light component, then extract candidate boundaries from the response changes of adjacent positions, and verify the explanatory power of the candidate boundaries by segmented order-preserving fitting.
[0093] This implementation binds the response increment to the left position code between adjacent positions, uses zero-maintenance long-term homology to form a candidate table, calculates the fitting cost and topological cost for the candidate position pairs, and finally outputs the unique reflection boundary position and direct sunlight boundary position.
[0094] After the sequence enters boundary analysis, the vehicle edge computing node only reads the location records in the current batch whose completion code is all one, and sorts them in ascending order by location code;
[0095] Operation S21 subtracts the illumination value of the lamp under the same position code from the illumination value of the lamp under the same position code. The difference represents the quantization increment of the illumination sensor generated by the action of the half-rated driving code under the current position code. The difference is then divided by the actual half-rated driving code, and the quotient is stored as a unit response value according to a uniform fixed-point bit width. This is used to unify the quantization increment of the illumination sensor obtained under each position code to the same driving code scale. Subsequently, the unit response value corresponding to the next position code is subtracted from the unit response value corresponding to the previous position code to form the response increment. The response increment is then bound to the previous position code to represent the response change that occurs when moving from the current position code to the next position code.
[0096] The vehicle-mounted edge computing node takes the absolute value of the response increment to obtain the change value, and connects them in ascending order according to the position code to form a change sequence; the last position code does not have a following unit response value, so no response increment is generated, nor is a change value established;
[0097] If any location record is missing, the half-rated drive code is zero, or the location codes are not arranged in adjacent order, the current activation sequence will not be entered into subsequent calculations, and a re-acquisition instruction carrying the activation batch number and the missing location code will be sent to the sunshade edge node.
[0098] The establishment of topological relationships begins with the changing position vertex. Process S22 establishes a position vertex for each position code in the changing sequence and writes the position code, response increment, change value, joining state, and the connected component to the position vertex.
[0099] The vehicle-mounted edge computing nodes first arrange the position vertices in descending order of change value, and when the change values are the same, they are arranged in ascending order of position code. Then, the position vertices are written as added in turn. The newly added position vertex is adjacent to the position vertex corresponding to the previous position code and the next position code. A connection is established only when the adjacent position vertex has been added.
[0100] When neither of the two adjacent vertices has been added, the newly added vertex forms a connected component, and is recorded as the birth position with the current position code and the birth change value with the current change value; when only one adjacent vertex has been added, the newly added vertex is assigned to the connected component to which the adjacent vertex belongs.
[0101] When two adjacent vertices have been added and belong to the same connected component, only two connections are added; when two adjacent vertices belong to different connected components, the connected component with the earlier birth order is retained, and the connected component with the later birth order is cancelled. The current change value is recorded as the merged change value, and the persistent length is obtained by subtracting the merged change value from the birth change value of the cancelled connected component.
[0102] The first and last vertices of the change sequence are checked only for the adjacent vertices on one side that exist; after all vertices are added, zero is used as the termination change value for the uncancelled connected components, and the difference between its birth change value and zero is calculated.
[0103] The vehicle-mounted edge computing node reads the birth position of each canceled connected branch and terminated connected branch. When the response increment corresponding to the birth position is positive, the candidate position code, response increment, birth change value, merge change value and persistence length are written into the candidate table. When the response increment is not positive, it is not written into the candidate table.
[0104] After the candidate list is formed, S23 enumerates two different candidate position codes in ascending order of candidate position codes. The first candidate position code is used as the reflection candidate position, and the second candidate position code is used as the direct candidate position. It is required that the first position code to the reflection candidate position, the next position code of the reflection candidate position to the direct candidate position, and the next position code of the direct candidate position to the last position code all contain a unit response value.
[0105] The above three ranges are respectively used as the first candidate position segment, the second candidate position segment, and the third candidate position segment in this segment operation;
[0106] Within each candidate location segment, the vehicle-mounted edge computing node establishes a location code and its unit response value as a response block, and compares the block average of adjacent response blocks in turn. When the block average of the previous response block is higher than the block average of the next response block, the response sum of the two response blocks and the number of locations are added together. Then, the block average is recalculated by dividing the merged response sum by the number of merged locations. The comparison is resumed from the merged response block backward until the block average of all adjacent response blocks does not decrease along the location code.
[0107] The block average of each response block is written into the code of each position it covers, forming a candidate fitting sequence for the current candidate position pair; the candidate fitting sequence is only used for pricing of candidate position pairs, and is not used as the response fitting sequence read by S3 after pricing is completed;
[0108] The vehicle-mounted edge computing node first calculates the arithmetic mean of all unit response values, then squares the difference between each unit response value and the arithmetic mean and sums them to form the sum of squares of the unit response deviations of the entire sequence. Subsequently, the difference between the fitted value of each position encoding in the candidate fitted sequence and the unit response value corresponding to the same position encoding is squared and summed to obtain the sum of squares of the fitted residuals. The fitted cost is obtained by dividing the sum of squares of the fitted residuals by the sum of squares of the unit response deviations of the entire sequence.
[0109] The total persistence length of the candidate table is obtained by adding the persistence lengths corresponding to all candidate positions in the candidate table. The two persistence lengths corresponding to the reflection candidate position and the direct candidate position are added to obtain the candidate persistence length sum. The persistence ratio is obtained by dividing the candidate persistence length sum by the total persistence length of the candidate table. The persistence ratio is then subtracted by one to form the topology cost. The fitting cost is added to the topology cost to obtain the comprehensive cost, which is then bound to the candidate position pair and written into the candidate position pair table.
[0110] After all candidate location pairs have been priced, the vehicle edge computing node arranges the candidate location pairs in S24 in ascending order of comprehensive cost; if the comprehensive costs are the same, they are first arranged in ascending order of reflection candidate location codes, and if the reflection candidate location codes are still the same, they are then arranged in ascending order of direct candidate location codes.
[0111] The first candidate position after arrangement is written as the reflection boundary position and the direct sunlight boundary position along the opening direction of the lens cover, and is bound to the opening batch number and boundary version. It is sent to the edge node of the sun visor through wireless networking and is also available for S3 to read.
[0112] When the total persistent length of the candidate table is zero, the sum of squared deviations of the unit response of the entire sequence is zero, or the candidate position pair table is empty, the vehicle edge computing node will write the currently enabled batch to be re-acquired, generate a new acquisition version for each position encoding, and send the three-step acquisition task of zero-drive code, half-rated drive code, and zero-drive code through wireless networking.
[0113] After the sun visor edge node returns to the closed stop position and opens again, it executes a new acquisition version to form a new opening sequence. The vehicle edge computing node deletes the original change sequence, candidate table and candidate position pair table, and then re-executes S21 to S24.
[0114] A batch that was originally started will only trigger a re-acquisition once. If the newly started sequence still cannot form candidate position pairs, the boundary invalidation flag and the zero-drive control result will be output. Repeated acquisition tasks will only be confirmed once. Data earlier than the current acquisition version will not be included in the calculation.
[0115] Taking the unit response values corresponding to the six position codes as 0.10, 0.12, 0.45, 0.47, 0.90 and 0.92 as an example, the five response increments are bound to the first five position codes in sequence, and their values are 0.02, 0.33, 0.02, 0.43 and 0.02.
[0116] The two positive response candidate positions formed by the zero-maintenance long-term homology operation correspond to the response increments of 0.33 and 0.43, respectively. The unit response value is divided into three non-empty candidate position segments from the previous candidate position to the next candidate position. After the three candidate position segments are fitted in order-preserving order, the reflection boundary position and the direct boundary position are output by sorting the comprehensive cost.
[0117] Therefore, the local response fluctuations in the changing sequence are first filtered by the persistence length of the connected components, and then verified by the segmented fitting of the whole sequence. The two boundary positions obtained have unique positional codes and can be directly connected to the subsequent response fitting and the calculation of the reflected response value and the direct response value.
[0118] S3. Divide the block into segments according to the two boundary positions, and perform the adjacent violator merging algorithm on the unit response value. When the mean of the left block is higher than that of the right block, merge the blocks and recalculate the mean according to the number of positions. Repeat this process until the mean no longer decreases to obtain the response fitting sequence.
[0119] Even after the reflection boundary and the direct sunlight boundary are determined, there may still be local inversions caused by sampling perturbations in the unit response value;
[0120] This implementation performs order-preserving fitting within the range defined by two boundary positions, determines the re-sampling order by the influence of the coding of each position within the merged block on the block mean, and then supplements the corresponding unit response value through wireless networking to form a response fitting sequence for the calculation and reading of reflected response value and direct response value.
[0121] According to the rule in S2 that the boundary position represents the left boundary between adjacent positions, the first position is encoded up to the reflection boundary position and divided into the first boundary position segment, the position after the reflection boundary position is encoded up to the direct sunlight boundary position and divided into the second boundary position segment, and the position after the direct sunlight boundary position is encoded up to the last position and divided into the third boundary position segment.
[0122] Operation S31 reads the unit response value in ascending order of position code within each boundary position segment, and establishes each position code as a single value block, writing the start position code, end position code, number of positions, response sum value and block average value;
[0123] When the mean value of the left block is higher than the mean value of the right block in adjacent response blocks, the sum of the response values and the number of positions of the two response blocks are added together, and the sum of the merged response values is divided by the number of merged positions to recalculate the block mean value. Then, the comparison is made backward from the merged block until the block mean value of all adjacent response blocks does not decrease.
[0124] The block mean is stored as a fractional pair consisting of response sum and number of positions. The mean comparison is performed by cross-multiplication of the results. The resulting block mean is written into the covered position code to form the initial fitted sequence.
[0125] For a merged block that covers more than two position codes, process S32 temporarily deducts the unit response value corresponding to one position code from the response sum value, reduces the number of positions by one, divides the remaining response sum value by the remaining number of positions to obtain the average value of the deleted positions, and then uses the absolute value of the difference between the deducted unit response value and the average value of the deleted positions to form the deleted position residual; after completing one calculation, the original unit response value and number of positions are restored so that each deleted position residual is obtained based on the same merged block;
[0126] Each merged block is sorted by position code in descending order of deletion residual; if the deletion residuals are the same, they are sorted by position code in ascending order to form a re-sampling sequence; no re-sampling sequence is generated for single-value blocks.
[0127] When wireless re-collection begins, the vehicle-mounted edge computing node reads the re-collection order in ascending order according to the starting position code of the merged block, and selects the first position code marked as zero from each merged block in S33. After writing the re-collection version and re-collection task number, it sends the three-step instruction of zero driving code, half rated driving code and zero driving code bound to the position code through wireless networking.
[0128] After the sun visor edge node enters the binding position code, it performs three-shot sampling and returns the three-shot illumination value, the completion code, the re-sampling version, the re-sampling task number, and the position code. After the vehicle edge computing node verifies that the version, task number, driving sequence, completion code, and sampling position are consistent, it performs linear interpolation on the intermediate sampling time based on the zero driving illumination values before and after. The intermediate illumination value is subtracted from the interpolation result and then divided by half of the rated driving code to obtain the re-sampling unit response value. The original unit response value corresponding to the same position code is replaced and the re-sampling mark is written as one.
[0129] Duplicate records are not replaced repeatedly. Old re-collection versions are deleted directly. When three scans are not completed or the location code changes, the re-collection mark is kept at zero. After each round of replacement, S31 and S32 are re-executed. The re-collection mark that has been written as one continues to be bound to the location code.
[0130] After each round of fitting, S34 arranges the response blocks according to the boundary position segment and the starting position code. When the number of response blocks in the current round is the same as that in the previous round, the starting position code and the ending position code of the response blocks in the same order are the same, and the result of the cross-multiplication of the block mean scores is the same, the block structure is considered to be consistent.
[0131] The iteration ends when the block structure is consistent, the re-sampling order is empty, or all position codes within the re-sampling order are written to the re-sampling mark. The block mean of each response block is written to the covered position code, and the blocks are connected in ascending order of position codes to form a response fitting sequence.
[0132] The same location code is only validly re-acquired once in the current batch. The number of re-acquired locations is limited, and the iteration ends accordingly. When the wireless connection is interrupted, the re-acquired version, re-acquired task and re-acquired flag are retained. After the connection is restored, unconfirmed re-acquired tasks continue to be sent.
[0133] For example, the three unit response values within the second boundary segment are 0.20, 0.35, and 0.25 respectively. The average value of the last two single-value blocks after merging is 0.30. The residual value of each bit in the merged block is calculated and the re-sampling sequence is formed. The re-sampling unit response value replaces the original value and is then refitted.
[0134] After the above processing, the response fitting sequence remains unchanged within each boundary segment, and provides a definite input for calculating the reflected response value and the direct response value.
[0135] S4. Read the light value of the lamp-off position corresponding to the last position code of the turn-on sequence as the ambient light value, and verify the measured unit response value of the last position. Subtract the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct light boundary position to obtain the initial reflection response value. Subtract the response fitting value corresponding to the direct light boundary position from the response fitting value corresponding to the last position code to obtain the initial direct light response value. Allocate the measured unit response value of the last position according to the ratio of the two initial response values to obtain the reflection response value and the direct light response value.
[0136] After the mirror cover reaches the fully open stop position, both the reflected light path and the direct light path are in the released state. At this time, it is necessary to use the last measured response to correct the increments of the two types of light paths in the response fitting sequence.
[0137] In this implementation, under the last position encoding, a four-step verification sequence consisting of zero drive code, quarter rated drive code, three-quarter rated drive code and zero drive code is sent and executed through wireless networking. Based on the four-step acquisition results, the last measured unit response value is obtained. Then, based on the response fitting values corresponding to the reflection boundary position, direct light boundary position and last position encoding, the reflection response value and direct light response value are determined to form the spectral result for light intensity calculation.
[0138] The fully open state is confirmed when the current position code is equal to the last position code and the mirror cover remains in the fully open stop position.
[0139] The vehicle-mounted edge computing node reads the light value corresponding to the off-light position code of the last position of the turn-on sequence and writes it as the ambient light value. Then, in S41, the rated drive code is divided by four and the remainder is discarded to obtain a quarter rated drive code. The rated drive code is multiplied by three and divided by four and the remainder is discarded to obtain a three-quarter rated drive code. It is then bound to the adjacent execution sequence number, unified beat length and verification version with the start zero drive code and the end zero drive code in sequence to form a four-beat verification sequence and sent to the sun visor edge node through wireless networking.
[0140] If the verification version is duplicated, it will not be executed repeatedly; instructions earlier than the current verification version will be deleted directly. When the front lens cover leaves the last position encoding after four scans, all collected illumination values will be invalidated.
[0141] After the four-shot signal returns, the edge node of the sunshade reads the illumination value at the end of the last driving carrier cycle of each shot, and sends back the four sampling times, four driving codes and the shot completion code.
[0142] S42 performs linear interpolation on the first and last illumination values by subtracting the first sampling time from the two lighting sampling times, and then using the proportion of the duration obtained by subtracting the first sampling time from the last sampling time to the duration obtained by the last sampling time, to obtain the lighting extinguishing reference at the two lighting sampling times. The lighting values of the two lighting times are subtracted from the lighting extinguishing reference at the same time to form a one-quarter driving net lighting value and a three-quarter driving net lighting value.
[0143] The vehicle edge computing node uses the sum of the products of the two actual driving codes and the corresponding net light value as the numerator and the sum of the squares of the two actual driving codes as the denominator. The resulting quotient is used as the two-point fitting slope with a fixed intercept of zero and is written as the last measured unit response value.
[0144] If any net lamp value is negative, or any illumination value reaches the illumination sensor saturation code or the complete scan code has zero bits, the current four-scan record is invalid and a four-scan verification is re-executed; if it is invalid again, write the beam splitting invalid flag and the zero drive control result.
[0145] The response fitting sequence is used to determine the distribution ratio of the last measured unit response value between the two types of optical paths. According to the rule that the boundary position represents the left boundary between adjacent positions, S43 reads the response fitting values corresponding to the reflection boundary position, the direct boundary position, and the last position code. The initial reflection response value is obtained by subtracting the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct boundary position. The initial direct response value is obtained by subtracting the response fitting value corresponding to the direct boundary position from the response fitting value corresponding to the last position code. The two are then added together to obtain the initial total response value.
[0146] When any difference is negative, the current response fitting sequence is inconsistent with the optical path release order. The vehicle edge computing node writes a beam splitting invalid mark and stops subsequent proportional allocation.
[0147] When allocating the correction amount, under the condition that the initial total response value is non-zero, S44 multiplies the last measured unit response value by the ratio of the initial reflected response value to the initial total response value to obtain the reflected response value; and multiplies the last measured unit response value by the ratio of the initial direct response value to the initial total response value to obtain the direct response value.
[0148] When the initial total response value is zero, both the reflected response value and the direct response value are written to zero, and a spectroscopic invalidation flag is written. The ambient light value, reflected response value, direct response value, spectroscopic invalidation flag, and the currently activated batch number together form the spectroscopic result for S5 to read.
[0149] For example, if the response fitting values corresponding to the reflection boundary position, direct sunlight boundary position, and last position are 0.18, 0.48, and 0.98 respectively, then the initial reflection response value is 0.30, the initial direct sunlight response value is 0.50, and the initial total response value is 0.80. After obtaining the measured unit response value of 0.88 for the last position through four-step verification, the reflection response value is written as 0.33, and the direct sunlight response value is written as 0.55.
[0150] Therefore, the response fitting sequence gives the allocation ratio of the two types of optical paths, and the last wireless measurement result provides the overall response correction benchmark, forming the spectral splitting result corresponding to the current fully open state.
[0151] S5. The target illumination value minus the ambient light value is the supplementary light amount. Negative values are recorded as zero. The sum of the two response values is the unit drive illumination amount. When it is not zero, the supplementary light amount is divided by the unit drive illumination amount to obtain the light intensity value, which is limited to zero to the rated drive code. When it is zero, the light intensity value is recorded as zero. It is wirelessly transmitted to the edge node of the sunshade and the sunshade LED lights are controlled according to the ambient light conditions.
[0152] After the spectral results are generated, the vehicle-mounted edge computing node needs to convert the target illuminance into sensor quantization values, and then generate a sequence of light intensity to be executed based on the relationship between the driver code and the illumination quantity measured wirelessly.
[0153] This implementation method unifies the calculation criteria for illuminance and quantization values, determines adjacent drive codes through endpoint verification and integer binary search, allocates the number of frames according to the distance ratio of the corresponding illumination amount, and completes wireless transmission and retransmission using sequence version.
[0154] The illuminance caliber is first unified within the vehicle edge computing node; when processing S51, the target lighting value written by the vehicle setting terminal adopts the illuminance unit, the calibration illuminance in the sensor calibration table is strictly incremented, and each calibration illuminance is bound to a calibration quantification value.
[0155] When the target illumination value is equal to a calibrated illuminance, the calibrated quantized value corresponding to that calibrated illuminance is read directly. When it is between two adjacent calibrated illuminances, the difference obtained by subtracting the previous calibrated illuminance from the target illumination value is divided by the difference obtained by subtracting the previous calibrated illuminance from the next calibrated illuminance, multiplied by the difference between the two calibrated quantized values and added to the previous calibrated quantized value to obtain the target illumination quantized value.
[0156] When the target illumination value is outside the two ends of the calibration range, the corresponding endpoint calibration quantization value is read, and the ambient light value is kept as the sensor quantization value output by S4. The supplementary light amount is obtained by subtracting the ambient light value from the target illumination quantization value. When the result is negative, it is written as zero. The reflection response value and the direct response value are added to form the unit driving illumination amount.
[0157] When the target illumination value is missing, the spectral result has an invalid marker, or the unit driving illumination is zero, a one-beat light intensity sequence containing only the zero driving code is directly generated.
[0158] The actual measurement of the rated endpoint is used to establish the drive code search range; when the unit drive lighting quantity is non-zero, the S52 sends the zero drive code, rated drive code and zero drive code three-shot verification sequence through wireless networking by the vehicle edge computing node; the sun visor edge node samples step by step during the last position encoding period.
[0159] Linear interpolation is performed on the intermediate sampling time using the zero-drive illumination values before and after the zero-drive illumination values, and the rated illumination is obtained by subtracting the interpolation result from the rated drive illumination value.
[0160] When the rated illumination is zero, a zero-drive code sequence is generated and written to the illumination failure flag; when the rated illumination is not higher than the supplementary illumination, the rated drive code is established as a one-beat light intensity sequence, and the amount of insufficient supplementation obtained by subtracting the rated illumination from the supplementary illumination is recorded.
[0161] When the rated illumination is higher than the supplementary illumination, a lower limit record is established using the zero drive code and the zero illumination, and an upper limit record is established using the rated drive code and the rated illumination. The sum of the two drive codes is divided by two and the remainder is discarded to obtain the midpoint drive code. Then, the three-step verification of the zero drive code, the midpoint drive code, and the zero drive code is performed wirelessly.
[0162] When the midpoint illumination is not higher than the supplementary illumination, the lower bound record is replaced by the midpoint driving code and the midpoint illumination. When the midpoint illumination is higher than the supplementary illumination, the upper bound record is replaced by the same code, until the upper bound code and the lower bound code differ by one bit.
[0163] If the midpoint illumination value is not between the current lower bound illumination value and the upper bound illumination value, the same midpoint driving code is re-verified. If it still does not match, the search is stopped and the lower bound record is read.
[0164] After the upper and lower boundary codes are adjacent, the number of beats is determined according to the position of the supplementary light amount between the two illumination amounts; operation S53 first converts the supplementary light amount, the lower boundary illumination amount and the upper boundary illumination amount into fixed-point integers with the same denominator, subtracts the lower boundary illumination amount from the supplementary light amount to obtain the upper boundary number of beats, and subtracts the supplementary light amount from the upper boundary illumination amount to obtain the lower boundary number of beats.
[0165] Divide the two beat numbers in turn, replacing the dividend with the remainder, until the remainder is zero. Read the previous divisor as the common divisor, and then divide it by the upper and lower beat numbers respectively to obtain the reduced upper and lower beat numbers. The sum of the two is written as the periodic beat number.
[0166] When generating a sequence, the accumulated value is set to zero. Before each write, the upper bound number of reduced cycles is added. When the accumulated value reaches the number of cycles, the upper bound code is written and the number of cycles is subtracted. If it does not reach the number of cycles, the lower bound code is written. The generation stops after the number of cycles is reached.
[0167] Each beat uses the same beat length, so the time average of the illumination amount corresponding to the upper and lower bound codes within one cycle is equal to the supplementary light amount; when the upper and lower bound illumination amounts are the same and equal to the supplementary light amount, the lower bound code is read to form a beat sequence; when the upper and lower bound illumination amounts are the same but not equal to the supplementary light amount, the difference between the supplementary light amount and the lower bound illumination amount is recorded at the same time.
[0168] The sequence execution is constrained by both the wireless version and the time stamp number. After entering S54, the vehicle edge computing node increments the sequence version and writes the time stamp number within the cycle for each drive code, and then sends it to the sun visor edge node through wireless networking.
[0169] After the sun visor edge node fully receives the current sequence version, it replaces the old version, drives the sun visor LED lights in a loop according to the time number, and sends back the sequence version, execution cycle number, and executed time number;
[0170] The vehicle-mounted edge computing node only advances the confirmation sequence number when all previous sequences have been confirmed. Duplicate confirmations will not be updated again, and the confirmation records of the old sequence version will be directly deleted. After wireless reconnection, it will continue to send from the first unconfirmed sequence number of the current sequence version.
[0171] When the mirror cover is closed, the light intensity sequence is immediately terminated and a zero-drive code is written. The sequence that has been fully received continues to be executed during the temporary wireless interruption. After S4 reacquires the ambient light value, the vehicle edge computing node re-executes S51 to S53 and generates a new sequence version.
[0172] Taking a target illumination quantization value of 800, an ambient light value of 300, and a supplementary light value of 500 as an example, the lower bound code corresponds to an illumination value of 480, and the upper bound code corresponds to an illumination value of 540. Therefore, the upper bound number of beats is 20, and the lower bound number of beats is 40. After simplification, these are one beat and two beats respectively, and the cycle number of beats is three beats.
[0173] The cumulative generated light intensity sequence contains one upper bound code and two lower bound codes, with a periodic average illumination of 500. The edge nodes of the sunshade cyclically execute this three-beat sequence and complete the confirmation according to the sequence version and beat number, so that the ambient light conditions, the measured results of the driver code, and the wireless execution status jointly constrain the light intensity of the sunshade LED lights.
[0174] exist Figure 1It should be noted that: This diagram illustrates the execution flow of the automatic control method for the LED light intensity of the sun visor; after the visor is opened, three-step sampling is completed according to the position code to form an opening sequence, then the unit response value and change sequence are calculated to identify the reflection boundary position and the direct light boundary position; subsequently, the unit response value is segmented and sequence-preservingly fitted and fixed-point re-sampled to obtain the response fitting sequence, and verification and optical path decomposition are completed at the last position; finally, the supplementary light amount is calculated based on the target illumination value, ambient light value, reflection response value, and direct light response value, generating a light intensity sequence and controlling the LED light of the sun visor to execute according to the steps; solid arrows indicate the normal processing sequence and data transmission direction, and dashed arrows indicate the abnormal processing path; if an effective boundary position is not obtained, the opening sequence is re-collected through wireless networking and then returned to the front-end processing stage for recalculation;
[0175] exist Figure 2 It should be noted that: This diagram illustrates the composition and information transmission relationships of the automatic control system for the LED light intensity of the sun visor; the sun visor side consists of a visor displacement detector, a light sensor, sun visor edge nodes, an LED driver circuit, and the sun visor LED light, responsible for generating position codes, collecting image-by-image light values, and executing driver codes; the vehicle control side consists of an on-board setting terminal, an on-board edge computing node, and version and image number records, responsible for providing target illumination values, completing boundary identification, response fitting, spectral calculation, and light intensity arrangement; solid arrows indicate the transmission direction of displacement, light value, sampling command, sampling result, driver code, and execution confirmation; the dashed arrow pointing from the LED driver circuit to the light sensor indicates the optical feedback relationship formed after the LED illumination acts on the detection area, and does not indicate a communication connection; the outer dashed frame is used to distinguish the sun visor side and the vehicle control side, and does not indicate data transmission.
[0176] Furthermore, the present invention also includes an automatic control system for the light intensity of a sunshade LED light, the system comprising a sequence acquisition module, a boundary recognition module, a response fitting module, a light path decomposition module, and an intensity control module:
[0177] The sequence acquisition module is used to obtain the opening position code of the mirror cover. The rated drive code is divided by two and the remainder is discarded to obtain the half rated drive code. The edge nodes of the sun visor collect the light value of the off light and the light value of the spot light bit by bit with the zero drive code and the half rated drive code. The data is then transmitted to the edge computing node through the wireless network to form the opening sequence.
[0178] The boundary identification module is used to subtract the lamp-off illumination value corresponding to the same position code from the spot lamp illumination value, divide the resulting difference by half the rated drive code to form a unit response value, take the absolute value of the adjacent difference to form a change sequence, perform zero-sustaining long-term same modulation point detection, connect adjacent positions in descending order of change value, when merging branches, subtract the change value of the merged position from the birth change value of the disappearing branch to obtain the persistence length, write the position code corresponding to the positive response increment and the persistence length into the candidate table, select candidate position pairs that satisfy the front-to-back order from the candidate table, and determine the reflection boundary position and the direct light boundary position based on the piecewise fitting result and persistence length of the candidate position pairs;
[0179] The response fitting module is used to segment the response by two boundary positions, perform an adjacent violator merging algorithm on the unit response value, merge the left block when the mean is higher than the right block and recalculate the mean according to the number of positions, repeat until the mean no longer decreases, and obtain the response fitting sequence.
[0180] The optical path decomposition module is used to read the light value of the lamp-off position corresponding to the last position code of the turn-on sequence as the ambient light value, and verify the measured unit response value of the last position; the initial reflection response value is obtained by subtracting the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct light boundary position, and the initial direct light response value is obtained by subtracting the response fitting value corresponding to the direct light boundary position from the response fitting value corresponding to the last position code; the measured unit response value of the last position is allocated according to the ratio of the two initial response values to obtain the reflection response value and the direct light response value.
[0181] The intensity control module is used to subtract the ambient light value from the target illumination value to obtain the supplementary light amount. Negative values are recorded as zero. The sum of the two response values is the unit drive illumination amount. When it is not zero, the supplementary light amount is divided by the unit drive illumination amount to obtain the light intensity value, which is limited to zero to the rated drive code. When it is zero, the light intensity value is recorded as zero. It is wirelessly transmitted to the edge node of the sunshade and controls the sunshade LED lights according to the ambient light conditions.
[0182] Overall execution and implementation instructions: When the mirror cover is opened, the edge node of the sun visor generates a position code according to the opening displacement, and performs zero-drive, half-rated drive and zero-drive sampling in sequence under each position code to obtain the off-light illumination value and spot light illumination value corresponding to the same position, and then sends them to the vehicle edge computing node through wireless networking;
[0183] The vehicle-mounted edge computing node first eliminates the influence of ambient light and calculates the unit response value at each location. Then, it uses zero-maintenance long-term coherence to identify candidate locations where the reflected and direct light paths have changed. The candidate locations are verified by segmented order-preserving fitting and local abnormal responses are corrected. Subsequently, a four-step verification is performed with the lens cover fully open, and the total response is decomposed into reflected response and direct response.
[0184] Finally, the supplementary light amount is calculated based on the target illumination value, ambient light value, and two types of responses. The adjacent driving codes and their execution counts are determined through wireless measurement, forming a light intensity sequence and sending it to the sunshade edge node for execution.
[0185] For example, when a driver opens the sun visor mirror cover to fix their makeup, the mirror cover will sequentially block and release the mirror reflection light path and the LED direct light path during the opening process; the edge node of the sun visor collects the illumination values of the light when the lights are off and on at each open position, and the vehicle edge computing node identifies the boundary position of the two light paths based on this, and re-issues the wireless re-sampling command for abnormal sampling positions.
[0186] After the mirror cover is fully opened, the system re-verifies the current lighting response, calculating ambient light, specular reflected light, and direct LED light separately. When the interior environment is dark, the system increases the execution ratio of the upper limit drive code. When light from outside enters the vehicle, the system decreases the execution ratio of the upper limit drive code, so that the sun visor LED lights automatically adjust their brightness according to the current environment and target lighting requirements.
[0187] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for automatically controlling the light intensity of an LED light for a sunshade, characterized in that, include: S1. Obtain the mirror cover opening position code, divide the rated drive code by two and discard the remainder to obtain the half rated drive code, and collect the off light illumination value and spot light illumination value of the sun visor edge node bit by bit with the zero drive code and half rated drive code, and transmit them to the edge computing node through wireless networking to form an opening sequence. S2. Subtract the lamp-off illumination value corresponding to the same position code from the lamp-on illumination value, divide the difference by half the rated drive code to form a unit response value, take the absolute value of adjacent differences to form a change sequence, perform zero-sustaining long-term modulation point detection, connect adjacent positions in descending order of change value, when merging branches, subtract the change value of the merged position from the birth change value of the disappearing branch to obtain the persistence length, write the position code and persistence length corresponding to the positive response increment into the candidate table, select candidate position pairs that satisfy the previous and next order from the candidate table, and determine the reflection boundary position and direct light boundary position based on the segmented fitting result and persistence length of the candidate position pairs; S3. Divide the block into segments according to the two boundary positions, and perform the adjacent violator merging algorithm on the unit response value. When the mean of the left block is higher than that of the right block, merge the blocks and recalculate the mean according to the number of positions. Repeat this process until the mean no longer decreases to obtain the response fitting sequence. S4. Read the light value of the lamp-off position corresponding to the last position code of the turn-on sequence as the ambient light value, and verify the measured unit response value of the last position. The initial reflection response value is obtained by subtracting the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct sunlight boundary position. The initial direct sunlight response value is obtained by subtracting the response fitting value corresponding to the direct sunlight boundary position from the response fitting value corresponding to the last position code. The last measured unit response value is allocated according to the ratio of the two initial response values to obtain the reflection response value and the direct sunlight response value. S5. The target illumination value minus the ambient light value is the supplementary light amount. Negative values are recorded as zero. The sum of the two response values is the unit drive illumination amount. When it is not zero, the supplementary light amount is divided by the unit drive illumination amount to obtain the light intensity value, which is limited to zero to the rated drive code. When it is zero, the light intensity value is recorded as zero. It is wirelessly transmitted to the edge node of the sunshade and the sunshade LED lights are controlled according to the ambient light conditions.
2. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 1, characterized in that: S1 includes: S11. After the mirror cover is opened, the sun visor edge node generates a position code in the order of increasing displacement. The vehicle edge computing node generates a three-step drive sequence of zero drive code, half rated drive code and zero drive code according to the received position code and executes it in sequence. The sequence is then sent to the sun visor edge node through wireless networking. S12. Before switching from the current position code to the next position code, the sunshade edge node drives the sunshade LED light according to the three-beat drive sequence. At the end of each beat, the illumination value is collected. Based on the zero drive illumination value of the previous and next beats, linear interpolation is performed on the sampling time of the middle beat. The interpolation result is recorded as the off-light illumination value, and the half rated drive illumination value of the middle beat is recorded as the spot light illumination value. S13. After completing the three-shot sampling of the current position code, the sun visor edge node binds the off-light illumination value and the on-light illumination value to the current position code to form a position record, and sends it to the vehicle edge computing node through wireless networking. The vehicle edge computing node arranges the position records in ascending order of the position code, sends a supplementary transmission command for the current position code that is missing any driving shot, and forms an opening sequence after each position code corresponds to a complete position record.
3. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 2, characterized in that: S2 includes: S21. The vehicle edge computing node reads the start sequence in ascending order of position code, subtracts the light-off light value corresponding to the same position code from the light-on light value, divides the difference by half the rated drive code to form the unit response value, and then subtracts the unit response value corresponding to the previous position code from the unit response value corresponding to the next position code to obtain the response increment, and takes the absolute value of the response increment to form the change sequence. S22. Perform zero-sustainability long-term co-modulation point detection on the change sequence, add position vertices in descending order of change value and ascending order of position code, and connect the added adjacent position vertices; when merging two connected branches, retain the branch added first and cancel the branch added later, and obtain the persistence length by subtracting the change value of the merged position from the birth change value of the canceled branch, and write the position code and persistence length corresponding to the positive response increment into the candidate table.
4. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 3, characterized in that: S2 also includes: S23. Select candidate position pairs from the candidate table that satisfy the sequential order and divide the opening sequence into three position segments. Perform the adjacent violator merging algorithm on the unit response value in each position segment. When the mean of the left block is higher than the mean of the right block, merge the two blocks and recalculate the mean according to the number of position codes. Repeat until the mean of each block does not decrease. Calculate the arithmetic mean of all unit response values. Square the difference between each unit response value and the arithmetic mean and sum them to obtain the sum of squares of the unit response deviation of the whole sequence. Square the difference between the fitted value of each position code in the three position segments and the unit response value corresponding to the same position code and sum them to obtain the sum of squares of the fitted residuals. Divide the sum of squares of the fitted residuals by the sum of squares of the unit response deviation of the whole sequence to form the fitting cost. Add the persistence lengths corresponding to the two candidate positions in the current candidate position pair to obtain the candidate persistence length sum. Add the persistence lengths corresponding to all candidate positions in the candidate table to obtain the candidate table persistence length sum. Divide the candidate persistence length sum by the candidate table persistence length sum to obtain the persistence ratio. Subtract the persistence ratio from one to form the topology cost. Add the fitting cost and the topology cost to form the comprehensive cost. S24. Read the first candidate position pair in ascending order of comprehensive cost, and record them as the reflection boundary position and direct light boundary position along the opening direction of the mirror cover. When the total length of the candidate table is zero, the sum of squares of the unit response deviation of the whole sequence is zero, or the candidate position pair is empty, the vehicle edge computing node binds each position code to the three-step sequence of zero driving code, half-rated driving code, and zero driving code and sends it to the sun visor edge node through wireless networking to re-collect the opening sequence. Otherwise, the reflection boundary position and direct light boundary position are sent through wireless networking.
5. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 4, characterized in that: S3 includes: S31. Divide the unit response value into three position segments based on the reflection boundary position and the direct sunlight boundary position. In each position segment, establish a single-value block according to the position code. At the cost of the sum of squares of the difference between the fitted value and the unit response value, and with the constraint that the fitted value does not decrease along the position code and the block boundary does not cross the reflection boundary position and the direct sunlight boundary position, when the mean of the left block is higher than the mean of the right block, merge the two blocks and recalculate the block mean by dividing the sum of the responses of the two blocks by the number of positions, until the mean of adjacent blocks does not decrease, forming the initial fitted sequence. S32. For a merged block containing two or more location codes, delete one location code at a time and recalculate the block mean using the remaining unit response values. Use the absolute value of the difference between the deleted unit response value and the recalculated block mean to form the deletion residual. Then, form the re-collection order by descending order of deletion residual and ascending order of location codes.
6. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 5, characterized in that: S3 also includes: S33. The edge computing node reads the first location code of the re-sampling sequence in each merged block that has not been written with a re-sampling mark, and sends a three-step instruction of zero driving code, half rated driving code and zero driving code bound to the location code through wireless networking. After the sunshade edge node returns the re-sampling unit response value, it replaces the original unit response value and writes the re-sampling mark, and then repeats S31 and S32. S34. When the start and end positions of the blocks in the current round are the same as those in the previous round, and the block average is the same, the re-sampling sequence is empty, or the position codes in the re-sampling sequence are all written to the re-sampling mark, stop the iteration, write the block average into the position code in the block, and connect them according to the position codes to form a response fitting sequence.
7. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 6, characterized in that: S4 includes: S41. Read the light value of the off lamp corresponding to the last position code of the turn-on sequence as the ambient light value, generate a four-step verification sequence executed according to the zero drive code, one-quarter rated drive code, three-quarters rated drive code, and zero drive code, and send it to the edge node of the sunshade through wireless networking. S42. The edge node of the sunshade performs a four-shot verification sequence under the last position code and collects the illumination value shot by shot. Based on the first and last illumination values, linear interpolation is performed on the two lighting sampling times respectively. The corresponding interpolation value is subtracted from the two lighting illumination values to obtain the two net lighting values. Then, the sum of the products of the two driving codes and the corresponding net lighting values is divided by the sum of the squares of the two driving codes to obtain the last measured unit response value. S43. Read the response fitting values corresponding to the reflection boundary position, direct sunlight boundary position and last position code from the response fitting sequence. Subtract the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct sunlight boundary position to obtain the initial reflection response value. Subtract the response fitting value corresponding to the direct sunlight boundary position from the response fitting value corresponding to the last position code to obtain the initial direct sunlight response value. Add the two initial response values to obtain the initial total response value. S44. When the initial total response value is non-zero, the reflection response value is obtained by multiplying the last measured unit response value by the ratio of the initial reflection response value to the initial total response value, and the direct response value is obtained by multiplying the last measured unit response value by the ratio of the initial direct response value to the initial total response value. When the initial total response value is zero, both the reflection response value and the direct response value are written as zero, forming the spectroscopic results corresponding to the ambient light value, reflection response value, and direct response value.
8. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 7, characterized in that: S5 includes: S51. Convert the target illumination value and ambient light value into the quantization unit of the light sensor, subtract the ambient light value from the target illumination value to obtain the supplementary light amount, write zero when the supplementary light amount is negative, and form the unit driving illumination amount by the sum of the reflection response value and the direct response value. S52. When the unit drive illumination is non-zero, the edge computing node first sends a three-step verification sequence of zero drive code, rated drive code, and zero drive code through wireless networking. Based on the zero drive illumination value before and after, linear interpolation is performed on the rated drive sampling time. The rated illumination is obtained by subtracting the interpolation result from the rated drive illumination value. When the rated illumination is not higher than the supplementary light, the rated drive code is written as the light intensity value. When the rated illumination is higher than the supplementary light, the zero drive code and the rated drive code are used as the lower bound code and the upper bound code, respectively. The three-step verification is performed repeatedly by taking the midpoint of the two integers. When the midpoint illumination is not higher than the supplementary light, the midpoint is used to replace the lower bound code. When the midpoint illumination is higher than the supplementary light, the midpoint is used to replace the upper bound code. This process continues until the upper bound code and the lower bound code differ by one bit, thus obtaining the adjacent drive code and the corresponding illumination.
9. The method for automatically controlling the light intensity of an LED light for a sunshade according to claim 8, characterized in that: S5 also includes: S53. Subtract the lower bound illumination amount from the supplementary light amount to obtain the upper bound number of beats. Subtract the supplementary light amount from the upper bound illumination amount to obtain the lower bound number of beats. Divide the upper bound number of beats and the lower bound number of beats by the first common divisor of the two in descending order of their values to obtain the reduced upper bound number of beats and the reduced lower bound number of beats. Use the sum of the two as the periodic number of beats. Set the cumulative value to zero from the first beat of the period. Before generating each beat, add the reduced upper bound number of beats to the cumulative value. When the cumulative value reaches the periodic number of beats, write the upper bound code and subtract the periodic number of beats from the cumulative value. When the cumulative value does not reach the periodic number of beats, write the lower bound code. Continue until the number of generated beats reaches the periodic number of beats to form a light intensity sequence in which the periodic average illumination amount equals the supplementary light amount. S54. The edge computing node writes the light intensity sequence into a sequence version and sends it to the sunshade edge node via wireless networking. The sunshade edge node presses the button to drive the sunshade LED light and sends back the executed button number. The edge computing node resends the light intensity sequence from the first unconfirmed button number and re-executes S51 to S53 after the ambient light value is updated.
10. An automatic control system for the light intensity of a sunshade LED light, used to implement the automatic control method for the light intensity of a sunshade LED light according to any one of claims 1-9, the system comprising a sequence acquisition module, a boundary recognition module, a response fitting module, an optical path decomposition module, and an intensity control module, characterized in that: The sequence acquisition module is used to obtain the opening position code of the mirror cover. The rated drive code is divided by two and the remainder is discarded to obtain the half rated drive code. The edge nodes of the sun visor collect the light value of the off light and the light value of the spot light bit by bit with the zero drive code and the half rated drive code. The data is then transmitted to the edge computing node through the wireless network to form the opening sequence. The boundary identification module is used to subtract the lamp-off illumination value corresponding to the same position code from the spot lamp illumination value, divide the resulting difference by half the rated drive code to form a unit response value, take the absolute value of the adjacent difference to form a change sequence, perform zero-sustaining long-term same modulation point detection, connect adjacent positions in descending order of change value, when merging branches, subtract the change value of the merged position from the birth change value of the disappearing branch to obtain the persistence length, write the position code corresponding to the positive response increment and the persistence length into the candidate table, select candidate position pairs that satisfy the front-to-back order from the candidate table, and determine the reflection boundary position and the direct light boundary position based on the piecewise fitting result and persistence length of the candidate position pairs; The response fitting module is used to segment the response by two boundary positions, perform an adjacent violator merging algorithm on the unit response value, merge the left block when the mean is higher than the right block and recalculate the mean according to the number of positions, repeat until the mean no longer decreases, and obtain the response fitting sequence. The optical path decomposition module is used to read the light value of the lamp-off lamp corresponding to the last position code of the turn-on sequence as the ambient light value, and to verify the actual measured unit response value of the last position. The initial reflection response value is obtained by subtracting the response fitting value corresponding to the reflection boundary position from the response fitting value corresponding to the direct sunlight boundary position. The initial direct sunlight response value is obtained by subtracting the response fitting value corresponding to the direct sunlight boundary position from the response fitting value corresponding to the last position code. The last measured unit response value is allocated according to the ratio of the two initial response values to obtain the reflection response value and the direct sunlight response value. The intensity control module is used to subtract the ambient light value from the target illumination value to obtain the supplementary light amount. Negative values are recorded as zero. The sum of the two response values is the unit drive illumination amount. When it is not zero, the supplementary light amount is divided by the unit drive illumination amount to obtain the light intensity value, which is limited to zero to the rated drive code. When it is zero, the light intensity value is recorded as zero. It is wirelessly transmitted to the edge node of the sunshade and controls the sunshade LED lights according to the ambient light conditions.