Optical sensor anti-power-frequency stroboflash processing method based on multi-data-point extreme value segmented fusion

By acquiring the extreme values ​​of the optical sensor within the power frequency cycle, constructing bright and dark peak data groups in segments, and calculating their average values, the problem of data distortion caused by power frequency flicker in the optical sensor is solved, achieving more accurate ambient light intensity measurement and reducing hardware power consumption.

CN121577151APending Publication Date: 2026-02-27CHONGQING RESONANT ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511765285.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

When optical sensors collect light signals, data distortion caused by power frequency flicker can prevent them from accurately reflecting the true ambient light intensity.

Method used

By collecting multiple light-sensing data within the power frequency cycle, extreme values ​​are obtained and bright and dark peak data groups are formed. Using the extreme values ​​as the starting point, data groups are constructed in segments, and the average value of the bright and dark peak data is calculated to obtain ambient light data, avoiding interference from the maximum and minimum values.

Benefits of technology

This effectively reduces data errors, making the output ambient light data closer to the actual ambient light intensity perceived by the human eye, and reducing hardware power consumption and data transmission costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121577151A_ABST
    Figure CN121577151A_ABST
Patent Text Reader

Abstract

The invention relates to an optical sensor anti-power-frequency stroboflash processing method based on multi-data-point extreme value segmentation fusion, and the method comprises the following steps: S1, collecting a plurality of pieces of light sensing data in a power frequency period, and forming a collection data group; s2, acquiring a corresponding extreme value from the acquired data set; s3, sequentially selecting light sensing data by taking the extreme value in the step S2 as a starting point in the acquisition data set, and forming a light sensing data set; the light sensation data set comprises a bright peak data set and a dark peak data set; s4, obtaining bright peak light sensing data according to the average value of the bright peak data set, and obtaining dark peak light sensing data according to the average value of the dark peak data set; s5, obtaining ambient light data according to the average value of the bright peak light sensing data and the dark peak light sensing data; the extreme value is obtained in one power frequency period, then the bright peak data set and the dark peak data set are constructed in a segmented mode by taking the extreme value as the starting point, and then the bright peak light sensing data and the dark peak light sensing data are averaged, so that the finally output ambient light data are closer to the actual ambient light intensity sensed by human eyes, and the data error is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of light sensors, and in particular to a light sensor anti-power frequency flicker processing method based on multi-data point extreme value segmentation fusion. BACKGROUND

[0002] A light sensor is an electronic component that can convert light signals into electrical signals. Its function is to perceive the intensity, color or direction of light emitted by a light source and convert the light information into electrical signals that can be processed by a device. Daily light sources include fluorescent lamps and incandescent lamps. Both fluorescent lamps and incandescent lamps are powered by mains electricity, and the power frequency of mains electricity is fixed. For example, the power frequency of mains electricity in China is 50Hz, and the power frequency of mains electricity in Europe and the United States is 60Hz. This causes periodic brightness fluctuations in light sources with flicker. Taking the power frequency of 50Hz of mains electricity in China as an example, the power frequency cycle is 20ms, which means that the brightness of the light source emitted by the daily light source completes one cycle of fluctuation every 20ms, from bright to dark and then to bright. When the light sensor collects the intensity of the light, it falls on the "bright peak", resulting in higher data collected by the light sensor; when it falls on the "dark peak", it results in lower data collected by the light sensor, which cannot reflect the true ambient light, thereby causing the problem of distorted data. SUMMARY

[0003] The purpose of the present application is to provide a light sensor anti-power frequency flicker processing method based on multi-data point extreme value segmentation fusion to solve the problem of distorted data collected by the light sensor as described in the background.

[0004] To achieve the above purpose, the technical solution adopted by the present application is: A light sensor anti-power frequency flicker processing method based on multi-data point extreme value segmentation fusion, comprising the following steps: S1. Collecting a plurality of light sensing data within a power frequency cycle and forming a collection data group; S2. Obtaining the corresponding extreme value from the collection data group; S3. Selecting light sensing data in turn from the extreme value in step S2 in the collection data group as the starting point and forming a light sensing data group; the light sensing data group includes a bright peak data group and a dark peak data group; S4. Obtaining bright peak light sensing data according to the average value of the bright peak data group and dark peak light sensing data according to the average value of the dark peak data group; S5. Obtaining ambient light data according to the average value of the bright peak light sensing data and the dark peak light sensing data.

[0005] Compared with the prior art, the beneficial effects of the scheme are: by obtaining the extreme values, that is, the maximum value (the highest brightness point) and the minimum value (the lowest brightness point) in one power frequency cycle, and then constructing the bright peak data group and the dark peak data group by taking the extreme values as the starting points, it is equivalent to dividing the power frequency cycle into a bright peak segment and a dark peak segment, then obtaining the bright peak light sense data according to the average value of the bright peak data group, and obtaining the dark peak light sense data according to the average value of the dark peak data group; at this time, the minimum value (the lowest brightness point) is not involved in the bright peak light sense data, and the maximum value (the highest brightness point) is not involved in the dark peak light sense data, thereby avoiding the mutual interference of the maximum value (the highest brightness point) and the minimum value (the lowest brightness point), so that the bright peak light sense data represents the light sense value of the real bright state in the power frequency cycle, and the dark peak light sense data represents the light sense value of the real dark state in the power frequency cycle; then the bright peak light sense data and the dark peak light sense data are averaged again, at this time, it is equivalent to calculating two real bright state light sense values, rather than the original data in one power frequency cycle, so that the finally output environmental light data is closer to the actual environmental light intensity perceived by the human eye, and the data error is significantly reduced.

[0006] As a preferred embodiment of the present application; the step of forming the light sense data group in the execution step S3 is as follows: S301. Assigning a position number to each light sense data in the collected data group and forming a numbered group, S302. Taking the position number corresponding to the light sense data collected at the middle point of the power frequency cycle as the middle value, and dividing the numbered group into a pre-data group and a post-data group by the middle value, S303. Determining the position number corresponding to the extreme value in the numbered group, If the position number corresponding to the extreme value is located in the pre-data group, then the extreme value is taken as the starting point to sequentially obtain the light sense data in the collected data group and form the light sense data group; If the position number corresponding to the extreme value is located in the post-data group, then the extreme value is taken as the starting point to sequentially obtain the light sense data in the collected data group and form the light sense data group.

[0007] Compared with the prior art, the beneficial effects of the scheme are: assigning a position number to each light sense data, determining the specific position of each light sense data in the power frequency cycle, no matter how the power frequency cycle fluctuates, the extreme value is always the inflection point of the light intensity change in the power frequency cycle, that is, the bright peak is the inflection point of the transition from rising to falling, and the dark peak is the inflection point of the transition from falling to rising; and the pre-data group and the post-data group provide a direction judgment basis to ensure that the direction of obtaining the light sense data is always consistent with the light intensity change trend; since the data after the bright peak should gradually become dark, the bright segment is taken from the bright peak; the data before the dark peak should gradually become bright, so the dark segment is taken from the dark peak, which can automatically adapt to the power frequency cycle fluctuation and the extreme value position change, and has stronger adaptability to complex power grid environment.

[0008] As a preferred embodiment of the present application; in the execution of step S1, the interval time of adjacent two times of collecting light sensing data is same, and the interval time is obtained according to the power frequency cycle and the collection times.

[0009] Compared with the prior art, the beneficial effects of the present application are: since the interval time is obtained according to the power frequency cycle and the collection times, the sampling points are uniformly distributed in the whole power frequency cycle, and meanwhile, the equal interval sampling can completely cover the full cycle change from the bright peak to the dark peak and then to the bright peak, thereby avoiding missing the strobe characteristics due to the sampling points being concentrated in a certain section.

[0010] As a preferred embodiment of the present application; in the execution of step S302, the position number corresponding to the first time of collecting light sensing data to the middle value forms a pre-data group, and the middle value to the position number corresponding to the last time of collecting light sensing data forms a post-data group, wherein the post-data group includes the middle value.

[0011] Compared with the prior art, the beneficial effects of the present application are: taking the middle value as the boundary, it is ensured that each position number has a unique attribution regardless of whether the collection times are odd or even; and the design of the post-data group containing the middle value solves the attribution problem of the middle point in sampling, thereby avoiding the boundary point being missed.

[0012] As a preferred embodiment of the present application; the adjacent two position numbers are increased or decreased, and the position number corresponding to the extreme value is located in the position of the number group according to the comparison result of the position number and the middle value.

[0013] Compared with the prior art, the beneficial effects of the present application are: regardless of whether the position number is increased or decreased according to the sampling time, the position of the extreme value in the number group can be uniformly determined only by comparing with the middle value; and meanwhile, relying on the ordered nature of the number itself and the reference effect of the middle value, the sampling strategy of different hardware can be seamlessly adapted As a preferred embodiment of the present application; in the execution of step S303, the number of light sensing data is the collection number in a half power frequency cycle.

[0014] Compared with the prior art, the beneficial effects of the present application are: regardless of the position of the extreme value in the number group, the selected light sensing data is the light sensing data in a half power frequency cycle, thereby ensuring that the obtained light sensing data group covers the complete characteristic section from the extreme value to the end of the half power frequency cycle; and the obtained light sensing data is the complete fluctuation interval near the extreme value.

[0015] As a preferred embodiment of the present application; whether the last time of collecting the ambient light data is covered is judged according to the ambient light data in step S5 and the last time of collecting the ambient light data.

[0016] Compared with the prior art, the beneficial effects of the scheme are as follows: when the ambient light changes significantly, the update is covered immediately to ensure that the device responds quickly; when the ambient light changes slowly, frequent fine-tuning is avoided, and both real changes and slow changes can be captured quickly, and the response speed and stability are adapted to different scenes.

[0017] As a preferred embodiment of the present application, the step of judging whether to cover the last ambient light data is as follows: S501. Setting a judgment threshold; S502. According to the ambient light data in S5 and the last ambient light data, the difference between the two is obtained, and it is judged whether the difference is greater than the judgment threshold in S501, If yes, send the ambient light data in step S5, and cover the last ambient light data at the same time; If not, continue to send the last ambient light data.

[0018] Compared with the prior art, the beneficial effects of the scheme are as follows: only when the difference exceeds the threshold, the data is sent, avoiding repeated sending of the same or similar data when the ambient light is stable; reducing hardware power consumption and data transmission cost.

[0019] In addition to the technical problems solved by the application, the technical features constituting the technical scheme, and the advantages brought by these technical features, other technical problems solved by the application, other technical features included in the technical scheme, and the advantages brought by these technical features will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 The flowchart of the light sensor anti-power frequency flicker processing method based on multi-data point extreme value segmentation fusion of the present application is shown. DETAILED DESCRIPTION

[0021] The technical scheme of the present application will be described in detail below with reference to the accompanying drawings.

[0022] Embodiment one, please refer to Figure 1 The light sensor anti-power frequency flicker processing method based on multi-data point extreme value segmentation fusion of the present application includes the following steps: step S1. Collecting a plurality of light sensing data in a power frequency period and forming a collection data group, the interval time of adjacent two times of collecting light sensing data is the same. The interval time is obtained according to the power frequency period and the number of collections, and the product of the power frequency period and the number of collections is equal to the interval time. Each light sensing data is assigned a position number, the position numbers between adjacent two position numbers are increased according to the interval time, and all the position numbers form a number group.

[0023] Step S2. Obtaining corresponding extreme values from the collection data group, the extreme values include maximum value and minimum value.

[0024] Step S3. The position number corresponding to the light sensing data collected at the middle point of the power frequency cycle is taken as the middle value, and the middle value divides the number group into a pre-data group and a post-data group. The pre-data group is composed of the position number corresponding to the first collected light sensing data to the middle value, and the post-data group is composed of the middle value to the position number corresponding to the last collected light sensing data, wherein the post-data group includes the middle value.

[0025] Determine the position of the position number corresponding to the extreme value in the number group.

[0026] If the position number corresponding to the extreme value is less than the middle value, it indicates that the position number corresponding to the extreme value is located in the pre-data group, then the extreme value is taken as the starting point to sequentially obtain light sensing data in the collected data group and form a light sensing data group. The light sensing data group includes a bright peak data group and a dark peak data group; the number of obtained light sensing data is the number of collections in half a power frequency cycle.

[0027] If the position number corresponding to the extreme value is greater than or equal to the middle value, it indicates that the position number corresponding to the extreme value is located in the post-data group, then the extreme value is taken as the starting point to sequentially obtain light sensing data in the collected data group and form a light sensing data group. The light sensing data group includes a bright peak data group and a dark peak data group; the number of obtained light sensing data is the number of collections in half a power frequency cycle.

[0028] Step S4. Obtain bright peak light sensing data according to the average value of the bright peak data group, and obtain dark peak light sensing data according to the average value of the dark peak data group.

[0029] Step S5. Obtain ambient light data according to the bright peak light sensing data and the dark peak light sensing data; the ambient light data is the average value of the bright peak light sensing data and the dark peak light sensing data.

[0030] The core feature of power frequency stroboscopic is periodic bright-dark alternation, and there must be one highest brightness point and one lowest brightness point in one power frequency cycle. The extreme value (maximum and minimum) is taken as the starting point to select light sensing data from the selected collection data group, and the selected light sensing data forms a new bright peak data group and a dark peak data group; at the same time, the number of selected light sensing data is the number of collections in half a power frequency cycle. No matter where the extreme value is located in the number group, the selected light sensing data is the light sensing data in half a power frequency cycle, so that the selected light sensing data covers the complete fluctuation interval near the extreme value.

[0031] For example, when the position number corresponding to the extreme value (maximum) is located in the pre-data group, the number of collections in half a power frequency cycle is taken from the extreme value as the starting point, covering the bright peak and the dark descending segment of the latter half cycle, that is, the complete fluctuation interval near the bright peak.

[0032] Similarly, the position number corresponding to the maximum value is located in the post-data set. From the maximum value as the starting point, the number of samples in half of the power frequency cycle is taken, covering the bright rising segment and bright peak in the first half cycle, and the complete fluctuation interval near the bright peak. Through this segmented smoothing processing, the influence of the highest and lowest brightness points is reduced.

[0033] The bright peak light sensing data is the average of the bright peak interval, and the dark peak light sensing data is the average of the dark valley interval. The average of the two is equivalent to taking the average of the brightness in one power frequency cycle, which offsets the periodic brightness fluctuation of the light source and accurately reflects the true ambient light brightness after removing the flicker interference.

[0034] According to the ambient light data and the last ambient light data, the difference between the two is obtained, determine whether the difference is greater than the threshold value, if so, send the ambient light data in step 4, and cover the last ambient light data; if not, continue to save the last ambient light data.

[0035] Only when the change exceeds the threshold value, the data is sent, avoiding repeated sending of the same / similar data when the ambient light is stable (such as natural light during the day, which will not send data every second); reducing hardware power consumption (such as sensor, communication module power consumption) and data transmission cost (such as Internet of Things device traffic / bandwidth).

[0036] Example one, Select the power frequency as 50Hz, the power frequency corresponding to the power frequency of 50Hz is 20ms, and the collection number is 20 times. First, the interval time is obtained by the power frequency cycle and the collection number, that is, interval time = 20 / 20 = 1ms.

[0037] According to the interval time and the collection number, the light sensing data is collected to form an initial data set, and the initial data set is {a1, a2, a3…a20}. The specific data is {80, 95, 110, 125, 146, 158, 165, 180, 170, 163, 152…75, 92}.

[0038] Each light sensing data is assigned a position number. Since the interval time between the adjacent two sides of the collected light sensing data is 1ms in this embodiment, the position number of the first collected light sensing data is 1, and the position number of the next collected light sensing data is 2, that is, the position number of the light sensing data a1 is 1, the position number of the light sensing data a2 is 2, and the position number of the light sensing data a20 is 20. The number group is [1, 2…19, 20].

[0039] The extreme value includes the maximum value and the minimum value, and according to the initial data set, the maximum value is 180, the minimum value is 75, the position number corresponding to the maximum value is 8, and the position number corresponding to the minimum value is 19, The position number corresponding to the light sensing data collected at the middle point of the power frequency cycle is taken as the middle value; since the power frequency cycle in the embodiment is 20 ms, the middle point of the power frequency cycle is 10 ms. The position number corresponding to the light sensing data collected at 10 ms is 10; the position number 10 is taken as the middle value.

[0040] The position number corresponding to the maximum value is 8, the position number corresponding to the maximum value is 8, which is less than the middle value 10, the collection number in the embodiment is 20, and the time interval is 1 ms, so the collection number in the half power frequency cycle is 10. Then 10 light sensing data are sequentially obtained from the extreme value (maximum value) as a starting point, and a bright peak data set is formed. The bright peak data set is [180, 170, 163, 152…100, 93, 80], and the average value of the collected data set is calculated to obtain the bright peak data. At the same time, the position number corresponding to the minimum value is 19, and the position number corresponding to the minimum value is 19, which is greater than the middle value 10. The collection number in the embodiment is 20, and the time interval is 1 ms, so the collection number in the half power frequency cycle is 10. Then 10 light sensing data are sequentially obtained from the extreme value (minimum value) as a starting point, and a dark peak data set is formed. The dark peak data set is [75…130, 145, 152], and the average value of the dark peak data set is calculated to obtain the dark peak data.

[0041] According to the ambient light sensing data of the dark peak data and the bright peak data, the ambient light sensing data is the average value of the dark peak data and the bright peak data.

[0042] The bright peak data is the average of the bright peak interval, and the dark peak data is the average of the dark peak interval. The average of the two is equivalent to taking the middle value of the "brightest" and "darkest" in 1 power frequency cycle, which exactly offsets the periodic brightness fluctuation of the light source, and accurately reflects the true ambient light brightness after removing the flicker interference.

[0043] According to the ambient light data and the last ambient light data, the difference between the two is obtained, It is judged whether the difference is greater than the threshold value, if yes, the ambient light data is sent, and the last ambient light data is overwritten; if not, the last ambient light data is continued to be saved.

[0044] The threshold is to determine whether the current ambient light change is large enough. After all, whether it is getting brighter or darker, only when the change reaches a certain level does the device (such as smart lighting, display adjustment) need to respond, and small fluctuations do not need to be processed. Only when the change exceeds the threshold will the data be sent, avoiding "repeatedly sending the same / similar data when the ambient light is stable" (such as natural light during the day, which does not change every second); reduce hardware power consumption (such as sensor, communication module power consumption) and data transmission cost (such as Internet of Things device traffic / bandwidth).

[0045] Embodiment two, the difference between this embodiment and the above-mentioned embodiment one is that when assigning a position number to each light sensing data, the interval time between adjacent two position numbers is decreasing.

[0046] Example two, The power frequency is selected as 50Hz, the power frequency period corresponding to the power frequency of 50Hz is 20ms, the collection times is 20, first, the interval time is obtained by the power frequency period and the collection times, the interval time is equal to the power frequency period divided by the collection times, that is, the interval time = 20 / 20 = 1ms.

[0047] According to the interval time and the collection times, the light sensing data is collected to form a collection data group, the collection data group is {a1, a2, a3…a20}, and the specific data is {80, 95, 110, 125, 146, 158, 165, 180, 170, 163, 152…75, 92}.

[0048] Each light sensing data is assigned a position number, since the interval time of the collection data group of the adjacent two light sensing data in this embodiment is 1ms, the position number of the first collection light sensing data is a1, the position number of the next collection light sensing data is a2, that is, the position number of the light sensing data a1 is 20, the position number of the light sensing data a2 is 19, the position number of the light sensing data a20 is 1, and the number group is [20, 19…2, 1].

[0049] The extreme value is obtained from the initial data group, the extreme value includes the maximum value and the minimum value, according to the initial data group, the maximum value is 180, the minimum value is 75, the position number corresponding to the maximum value is 13, and the position number corresponding to the minimum value is 2.

[0050] The position number corresponding to the light sensing data collected at the middle point of the power frequency period is taken as the middle value; since the power frequency period in this embodiment is 20ms, the middle point of the power frequency period is 10ms. The position number corresponding to the light sensing data collected at 10ms is 10; the position number 10 is taken as the middle value.

[0051] The position number corresponding to the maximum value is 13, the position number corresponding to the maximum value is greater than the middle value 10, the collection times in the embodiment are 20 times, the same interval time is 1 ms, and therefore the collection times in a half power frequency cycle are 10 times. Then 10 light sensing data are sequentially obtained from the extreme value (maximum value) as a starting point, and a bright peak data group is formed, the collection data group [180, 170, 163, 152, 100…93, 80] is obtained, and the average value of the collection data group is calculated to obtain the bright peak data.

[0052] Meanwhile, the position number corresponding to the minimum value is 2, the position number corresponding to the minimum value is less than the middle value 10, the collection times in the embodiment are 20 times, the same interval time is 1 ms, and therefore the collection times in a half power frequency cycle are 10 times. Then 10 light sensing data are sequentially obtained from the extreme value (maximum value) as a starting point, and a bright peak data group is formed, the collection data group [75…130, 145, 152] is obtained, and the average value of the collection data group is calculated to obtain the dark peak data.

[0053] According to the ambient light sensing data of the dark peak data and the bright peak data, the ambient light sensing data is the average value of the dark peak data and the bright peak data.

[0054] If the embodiment of the present application involves directional indication (such as up, down, left, right, front, back, etc.), the directional indication is only used to explain the relative position relationship, motion condition, etc. between components in a certain specific posture (as shown in the drawings), if the specific posture changes, the directional indication also changes accordingly.

[0055] The above embodiments only describe the preferred embodiments of the present application, and do not limit the scope of the present application, and various modifications and improvements to the technical solutions of the present application made by ordinary engineering technical personnel without departing from the design spirit of the present application should fall within the protection scope determined by the claims of the present application.

Claims

1. A method for processing power frequency flicker in optical sensors based on multi-data-point extremum segmentation fusion, characterized in that, The process includes the following steps: S1. Collecting several light-sensing data points within the power frequency cycle and forming a data collection group; S2. Obtain the corresponding extreme values ​​from the collected data set; S3. Starting from the extreme values ​​in step S2, select light-sensing data sequentially from the data acquisition group and form a light-sensing data group; the light-sensing data group includes a bright peak data group and a dark peak data group; S4. Obtain the bright peak light sensitivity data based on the average value of the bright peak data group, and obtain the dark peak light sensitivity data based on the average value of the dark peak data group; S5. Obtain ambient light data based on the average value of the bright peak light perception data and the dark peak light perception data.

2. The optical sensor anti-power frequency flicker processing method based on multi-data-point extreme value segmentation fusion according to claim 1, characterized in that: The steps for forming the light-sensing data set during step S3 are as follows: S301. Assign a location number to each photosensitive data in the collected data group and form a numbered group. S302. Using the location number corresponding to the optical sensing data collected at the midpoint of the power frequency cycle as the intermediate value, the intermediate value divides the number group into a pre-data group and a post-data group. S303. Determine the position number corresponding to the extreme value within the numbering group. If the position number corresponding to the extreme value is located in the preceding data group, then the extreme value is the starting point to acquire light-sensing data sequentially in the data acquisition group and form a light-sensing data group. If the position number corresponding to the extreme value is located in the subsequent data group, then the extreme value is used as the starting point to acquire light-sensing data sequentially from the beginning of the data group and form a light-sensing data group.

3. The optical sensor anti-power frequency flicker processing method based on multi-data-point extreme value segmentation fusion according to claim 1, characterized in that: During step S1, the interval between two consecutive acquisitions of light sensing data is the same, and the interval is obtained based on the power frequency cycle and the number of acquisitions.

4. The optical sensor anti-power frequency flicker processing method based on multi-data-point extreme value segmentation fusion according to claim 2, characterized in that: When performing step S302, the location number corresponding to the first collection of light sensing data is used to form a pre-data group, and the location number corresponding to the last collection of light sensing data is used to form a post-data group, wherein the post-data group includes the intermediate value.

5. The optical sensor anti-power frequency flicker processing method based on multi-data-point extreme value segmentation fusion according to claim 4, characterized in that: The position number of an extreme value is determined by the comparison between the position number and the median value, which is either increasing or decreasing.

6. The optical sensor anti-power frequency flicker processing method based on multi-data-point extreme value segmentation fusion according to claim 2, characterized in that: When performing step S303, the amount of light-sensing data acquired is the amount collected within half a power frequency cycle.

7. The method for anti-power frequency flicker processing of optical sensors based on multi-data-point extreme value segmentation fusion according to any one of claims 1-6, characterized in that: Determine whether to overwrite the previous ambient light data based on the ambient light data in step S5 and the previous ambient light data.

8. The optical sensor anti-power frequency flicker processing method based on multi-data-point extreme value segmentation fusion according to claim 7, characterized in that: The steps to determine whether to overwrite the previous ambient light data are as follows: S501. Set the judgment threshold; S502. Based on the ambient light data in S5 and the previous ambient light data, obtain the difference between the two, and determine whether the difference is greater than the judgment threshold in S501. If so, send the ambient light data from step S5, while overwriting the previous ambient light data; If not, continue sending the previous ambient light data.