A photoelectric sensor precision control method, controller, medium and product

By comparing the detected light intensity value with the reference light intensity value obtained from the photoelectric sensor, the environmental influence coefficient is determined and the comprehensive compensation parameters are calculated. This solves the problem of the impact of environmental factors on the accuracy of the photoelectric sensor, realizes dynamic compensation and adaptive optimization, and improves detection accuracy and reliability.

CN119779376BActive Publication Date: 2026-06-09SHENZHEN HUAYIFENG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HUAYIFENG TECH CO LTD
Filing Date
2024-12-25
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing methods for controlling the accuracy of photoelectric sensors are insufficient to effectively eliminate the coupling effects of environmental factors such as temperature, humidity, and light on measurement accuracy, leading to unstable detection accuracy.

Method used

By acquiring the light intensity value detected by the photoelectric sensor under the current environmental data and comparing it with the reference light intensity value, the environmental impact coefficient is determined. The comprehensive compensation parameter is calculated using a preset weight table for dynamic adjustment, and the parameter is applied to the photoelectric sensor. An environmental impact coefficient table is established to quickly find the matching coefficient. Combined with a self-testing mechanism, the normal working status of the sensor is ensured.

Benefits of technology

It achieves dynamic compensation for the measurement accuracy of photoelectric sensors, eliminates interference from environmental factors, improves detection accuracy and reliability, simplifies calculations, extends sensor lifespan, and continuously improves the accuracy and adaptability of compensation through an adaptive optimization mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119779376B_ABST
    Figure CN119779376B_ABST
Patent Text Reader

Abstract

A photoelectric sensor precision control method, controller, medium and product, the method comprises: obtaining a first detection light intensity value generated by a first reference light signal and a second detection light intensity value generated by a second reference light signal collected by a photoelectric sensor under current environmental data; comparing the first detection light intensity value with the first reference light intensity value and the second detection light intensity value with the second reference light intensity value respectively to obtain a first intensity deviation value and a second intensity deviation value; if the first intensity deviation value is not within a preset first error range or the second intensity deviation value is not within a preset second error range, then determining an environmental temperature influence coefficient, an environmental humidity influence coefficient and an environmental illumination intensity influence coefficient; determining a comprehensive compensation parameter; and applying the comprehensive compensation parameter to the photoelectric sensor. The method is implemented to improve the accuracy of photoelectric sensor precision control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optoelectronic technology, and in particular to a method, controller, medium and product for controlling the accuracy of a photoelectric sensor. Background Technology

[0002] With the continuous improvement of industrial automation, photoelectric sensors, due to their non-contact, fast-response, and high-precision characteristics, are widely used in industrial inspection, medical equipment, smart homes, and other fields. In practical applications, the detection accuracy of photoelectric sensors directly affects production quality and equipment reliability; therefore, ensuring the detection accuracy of photoelectric sensors has become a key focus of the industry.

[0003] Currently, the main method for controlling the accuracy of photoelectric sensors is to acquire the measurement data collected by the photoelectric sensor, fit the measurement data to a preset data model to obtain the fitting curve corresponding to the measurement data, compare the fitting curve with the preset calibration curve to determine the degree of difference between the two curves, and calibrate the accuracy of the photoelectric sensor based on the degree of difference.

[0004] However, there are limitations to using a pre-set data model for fitting. Due to the complexity and variability of the actual working environment, factors such as ambient temperature, humidity, and light can simultaneously affect the detection accuracy of photoelectric sensors, and there are coupling effects between these environmental factors. A single data fitting model is difficult to fully reflect the combined effects of various environmental factors. Summary of the Invention

[0005] This application provides a method, controller, medium, and product for controlling the precision of photoelectric sensors, which can improve the accuracy of precision control of photoelectric sensors.

[0006] In a first aspect, this application provides a method for controlling the accuracy of a photoelectric sensor, applied to a controller. The method includes: acquiring, under current environmental data, a first detected light intensity value generated by the photoelectric sensor acquiring a first reference light signal and a second detected light intensity value generated by the photoelectric sensor acquiring a second reference light signal, wherein the current environmental data includes ambient temperature, ambient humidity, and ambient light intensity; the first reference light signal corresponds to a first reference light intensity value, and the second reference light signal corresponds to a second reference light intensity value; the intensity of the first reference light signal is higher than that of the second reference light signal; and comparing the first detected light intensity value with the first reference light intensity value and the second detected light intensity value with the second reference light intensity value, respectively, to obtain a first intensity deviation value and a second intensity deviation value. Deviation value; if the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value, determine the ambient temperature influence coefficient, the ambient humidity influence coefficient, and the ambient light intensity influence coefficient; according to the ambient temperature influence coefficient, the ambient humidity influence coefficient, the ambient light intensity influence coefficient, the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight, determine the comprehensive compensation parameter, the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight are determined through a preset environmental influence weight table; apply the comprehensive compensation parameter to the photoelectric sensor.

[0007] By employing the above technical solution, the controller acquires the detected light intensity values ​​of two reference light signals (high and low) collected by the photoelectric sensor under the current environmental data, and compares them with the reference light intensity values ​​to obtain the intensity deviation value. When the intensity deviation value exceeds the preset error range, the controller determines various environmental influence coefficients based on the current environmental data (ambient temperature, ambient humidity, and light intensity) and the intensity deviation value. Then, based on these environmental influence coefficients and a preset environmental influence weight table, it determines comprehensive compensation parameters and applies them to the photoelectric sensor. This solution achieves dynamic compensation and adjustment of the photoelectric sensor's measurement accuracy, effectively eliminating the interference of environmental factors on the measurement results and improving the accuracy and reliability of the photoelectric sensor's precision control.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, if the first intensity deviation value is not within a preset first error range or the second intensity deviation value is not within a preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value, an ambient temperature influence coefficient, an ambient humidity influence coefficient, and an ambient light intensity influence coefficient are determined. Specifically, this includes: searching a first environmental influence coefficient table for the first ambient temperature influence coefficient, the first ambient humidity influence coefficient, and the first ambient light intensity influence coefficient that best match the first intensity deviation value. The first environmental influence coefficient table includes the first intensity... The correspondence between the deviation value and the environmental impact coefficient; find the second environmental temperature influence coefficient, the second environmental humidity influence coefficient, and the second environmental light intensity influence coefficient that best match the second intensity deviation value in the second environmental impact coefficient table, which includes the correspondence between the second intensity deviation value and the environmental impact coefficient; based on the first environmental temperature influence coefficient, the first environmental humidity influence coefficient, the first environmental light intensity influence coefficient, the second environmental temperature influence coefficient, the second environmental humidity influence coefficient, and the second environmental light intensity influence coefficient, determine the environmental temperature influence coefficient, the environmental humidity influence coefficient, and the environmental light intensity influence coefficient.

[0009] By adopting the above technical solution, the controller pre-establishes two environmental influence coefficient tables, which store the correspondence between the intensity deviation values ​​of high and low reference light signals and the environmental influence coefficients. This allows for the rapid lookup of the most matching environmental temperature influence coefficient, environmental humidity influence coefficient, and environmental light intensity influence coefficient, simplifying complex calculations, improving response speed, and ensuring the accuracy and reliability of compensation.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, before acquiring the first detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the second detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal under the current environmental data, the method further includes: acquiring the working time of the photoelectric sensor; if the working time exceeds a preset time threshold, acquiring the self-test parameters of the photoelectric sensor; determining whether the photoelectric sensor is in a normal working state based on the self-test parameters; if the photoelectric sensor is in the normal working state, then performing the step of acquiring the first detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the second detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal under the current environmental data.

[0011] By adopting the above technical solution, the controller only performs subsequent compensation if the photoelectric sensor's operating time exceeds the limit and the self-test parameters determine that the photoelectric sensor is in normal working condition. By adding a status monitoring mechanism for the photoelectric sensor, abnormalities in the sensor itself can be detected in a timely manner, ensuring that compensation is performed under stable operating conditions. This eliminates measurement deviations caused by sensor malfunctions, avoids ineffective compensation, improves the reliability and effectiveness of photoelectric sensor precision control, and also extends the sensor's lifespan.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of determining whether the photoelectric sensor is in normal working condition based on the self-test parameters, the method further includes: if the photoelectric sensor is not in normal working condition, determining the self-test anomaly type of the photoelectric sensor, the self-test anomaly type including at least one of signal acquisition anomaly, voltage anomaly, and temperature anomaly; determining and executing the processing strategy corresponding to the self-test anomaly type from a preset anomaly processing strategy library.

[0013] By adopting the above technical solution, when the controller detects an abnormality in the photoelectric sensor, it can intelligently identify the type of self-test anomaly and, in conjunction with a preset anomaly handling strategy library, quickly match and execute corresponding handling strategies for different types of self-test anomalies, thereby achieving automatic fault diagnosis and handling. This categorized processing greatly improves the accuracy and efficiency of fault handling, avoiding the blindness and ineffectiveness that may result from using a uniform processing method.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after determining the processing strategy corresponding to the self-test anomaly type from the preset anomaly processing strategy library, the method further includes: if the number of times the processing strategy is executed exceeds a preset number threshold and the photoelectric sensor is not in the normal working state, generating a photoelectric sensor anomaly report, the photoelectric sensor anomaly report including the self-test anomaly type and historical processing strategies; and sending the photoelectric sensor anomaly report to the management terminal.

[0015] By adopting the above technical solution, when the normal working state cannot be restored after multiple executions of the processing strategy, the controller will automatically generate an abnormal report containing photoelectric sensor data. This effectively avoids invalid repeated processing, promptly reminds the management to intervene manually, helps to quickly locate the root cause of the problem, and improves the maintainability and fault handling efficiency of photoelectric sensors.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, after applying the comprehensive compensation parameter to the photoelectric sensor, the method further includes: acquiring a third detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and a fourth detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal; if the deviation between the third detected light intensity value and the first reference light intensity value is within a preset first error range and the deviation between the fourth detected light intensity value and the second reference light intensity value is within a preset second error range, then storing the current environmental data and the comprehensive compensation parameter.

[0017] By adopting the above technical solution, after applying the comprehensive compensation parameters, the controller again collects two high and low reference optical signals and detects the deviation value, realizing real-time verification of the compensation effect. When the compensated measurement results meet the accuracy requirements, the controller stores the current environmental data and comprehensive compensation parameters, establishing a database of the correspondence between the current environmental conditions and the effective compensation parameters. This self-verification and data storage mechanism not only ensures the effectiveness of the compensation but also provides a reference for subsequent rapid compensation under similar environmental conditions.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, after obtaining the third detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the fourth detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal, the method further includes: if the deviation between the third detected light intensity value and the first reference light intensity value is not within the preset first error range or the deviation between the fourth detected light intensity value and the second reference light intensity value is not within the preset second error range, then adjusting the preset environmental impact weight table to obtain an optimized environmental impact weight table; and calculating the comprehensive compensation parameter based on the optimized environmental impact weight table and applying it to the photoelectric sensor.

[0019] By adopting the above technical solution, the controller can automatically adjust the preset environmental influence weight table when it detects that the compensation effect is not ideal. This adaptive optimization mechanism can dynamically adjust the influence weight of each environmental factor according to the actual compensation effect, making the compensation more in line with the actual situation. Through repeated verification and optimization, the accuracy and adaptability of the compensation are continuously improved, thus forming a closed-loop optimization process that is constantly self-improving.

[0020] In a second aspect, embodiments of this application provide a controller comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the controller to perform the method as described in the first aspect and any possible implementation thereof.

[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a controller, cause the controller to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a controller, cause the controller to perform the method described in the first aspect and any possible implementation thereof.

[0023] Understandably, the controller provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0025] 1. By adopting the above technical solution, the controller acquires the detected light intensity values ​​of two reference light signals (high and low) collected by the photoelectric sensor under the current environmental data, and compares them with the reference light intensity values ​​to obtain the intensity deviation value. When the intensity deviation value exceeds the preset error range, the controller determines various environmental influence coefficients based on the current environmental data (ambient temperature, ambient humidity, and light intensity) and the intensity deviation value. Then, based on these environmental influence coefficients and a preset environmental influence weight table, it determines comprehensive compensation parameters and applies them to the photoelectric sensor. This solution achieves dynamic compensation and adjustment of the photoelectric sensor's measurement accuracy, effectively eliminating the interference of environmental factors on the measurement results and improving the accuracy and reliability of the photoelectric sensor's precision control.

[0026] 2. By adopting the above technical solution, the controller pre-establishes two environmental influence coefficient tables, which store the correspondence between the intensity deviation values ​​of high and low reference light signals and the environmental influence coefficients. This allows for the rapid lookup of the most matching environmental temperature influence coefficient, environmental humidity influence coefficient, and environmental light intensity influence coefficient, simplifying complex calculations, improving response speed, and ensuring the accuracy and reliability of compensation.

[0027] 3. By adopting the above technical solution, the controller only performs subsequent compensation if the photoelectric sensor's operating time exceeds the limit and the self-test parameters determine that the photoelectric sensor is in normal working condition. By adding a status monitoring mechanism for the photoelectric sensor, abnormalities in the sensor itself can be detected in a timely manner, ensuring that compensation is performed under stable operating conditions. This eliminates measurement deviations caused by sensor malfunctions, avoids ineffective compensation, improves the reliability and effectiveness of photoelectric sensor precision control, and also extends the sensor's lifespan. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating a photoelectric sensor accuracy control method in an embodiment of this application.

[0029] Figure 2 This is another schematic flowchart of the photoelectric sensor accuracy control method in the embodiments of this application;

[0030] Figure 3 This is a schematic diagram of the physical device structure of the controller in an embodiment of this application. Detailed Implementation

[0031] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0033] The following describes the process of the method provided in this implementation. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating a photoelectric sensor accuracy control method in an embodiment of this application.

[0034] S101. Under the current environmental data, the photoelectric sensor acquires a first detection light intensity value generated by acquiring a first reference light signal and a second detection light intensity value generated by acquiring a second reference light signal. The current environmental data includes the ambient temperature value, the ambient humidity value, and the ambient light intensity value. The first reference light signal corresponds to a first reference light intensity value, and the second reference light signal corresponds to a second reference light intensity value. The intensity of the first reference light signal is higher than that of the second reference light signal.

[0035] The current environmental data refers to the real-time set of physical parameters of the environment in which the photoelectric sensor is located; the ambient temperature value refers to the real-time temperature value in the environment, in degrees Celsius; the ambient humidity value refers to the relative humidity percentage in the environment; the ambient light intensity value refers to the brightness level of the light in the environment, in lux; the reference light signal refers to the light signal emitted by a standard light source with known and stable intensity; the first reference light signal and the second reference light signal represent light signals emitted by two standard light sources with different intensity levels, and the intensity of the first reference light signal is greater than that of the second reference light signal; the detected light intensity value refers to the electrical quantization value obtained by the photoelectric sensor after receiving the accurate light signal; the reference light intensity value refers to the standard output value that the photoelectric sensor should produce when receiving the reference light signal under standard environmental conditions. For example, the first reference light signal can be a standard light signal generated by a 100cd LED light source, with a corresponding first reference light intensity value of 5.0V; the second reference light signal can be a standard light signal generated by a 50cd LED light source, with a corresponding second reference light intensity value of 2.5V.

[0036] Specifically, firstly, the controller collects real-time environmental data, including ambient temperature, humidity, and light intensity, using integrated environmental sensors. Then, the controller directs the light source to sequentially emit two preset intensity reference light signals. The intensity of the first reference light signal is significantly higher than that of the second reference light signal to cover different measurement ranges. The controller collects and records the detected light intensity values ​​output by the photoelectric sensor when receiving these two reference light signals, using these values ​​as the first and second detected light intensity values, respectively.

[0037] S102. The first detected light intensity value is compared with the first reference light intensity value, and the second detected light intensity value is compared with the second reference light intensity value to obtain the first intensity deviation value and the second intensity deviation value.

[0038] The comparison operation refers to the process of quantitatively comparing the reference light intensity value and the detected light intensity value. The first detected light intensity value refers to the actual measured output of the photoelectric sensor to the first reference light signal. The first reference light intensity value refers to the ideal output value that the first reference light signal should obtain under standard conditions. The second detected light intensity value refers to the actual measured output of the photoelectric sensor to the second reference light signal. The second reference light intensity value refers to the ideal output value that the second reference light signal should obtain under standard conditions. The intensity deviation value is used to indicate the degree of difference between the reference light intensity value and the detected light intensity value. For example, when the first detected light intensity value is 4.8V and the first reference light intensity value is 5.0V, the first intensity deviation value is -0.2V, indicating that the measured value is 0.2V lower than the ideal value.

[0039] Specifically, first, the controller reads the standard reference light intensity values ​​corresponding to the two reference light signals. Then, the controller calculates the difference between the two sets of detected light intensity values ​​and the reference light intensity values ​​through mathematical operations: subtracting the first reference light intensity value from the first detected light intensity value yields the first intensity deviation value, and subtracting the second reference light intensity value from the second detected light intensity value yields the second intensity deviation value. The intensity deviation value can be directly obtained by using algebraic difference to retain the directional information of the intensity deviation, or the absolute value can be taken to focus only on the magnitude of the intensity deviation. The controller stores the two calculated intensity deviation values ​​in a dedicated deviation data buffer for subsequent judgment and analysis. The calculation process uses high-precision floating-point arithmetic to ensure calculation accuracy.

[0040] S103. If the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value, determine the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient.

[0041] The preset first error range refers to the allowable deviation range for measuring high-intensity reference light signals; the preset second error range refers to the allowable deviation range for measuring low-intensity reference light signals; the ambient temperature influence coefficient refers to the degree of influence of ambient temperature changes on measurement accuracy; the ambient humidity influence coefficient refers to the degree of influence of ambient humidity changes on measurement accuracy; the ambient light intensity influence coefficient refers to the degree of influence of ambient light intensity on measurement accuracy. These environmental influence coefficients are dimensionless values, typically between 0 and 1, with larger values ​​indicating more significant influence from the environmental factor. For example, an ambient temperature influence coefficient of 0.8 indicates a strong influence of ambient temperature changes on the measurement results, while an ambient temperature influence coefficient of 0.2 indicates a weak influence of ambient temperature changes on the measurement results.

[0042] Specifically, the controller compares the first intensity deviation value with a preset first error range and the second intensity deviation value with a preset second error range. If any intensity deviation value exceeds the preset error range, the controller initiates an environmental impact analysis program. This program comprehensively considers the current ambient temperature, ambient humidity, ambient light intensity, and the two intensity deviation values, calculating the environmental impact coefficients of the three environmental factors using a preset environmental impact analysis model. The preset environmental impact analysis model can be based on a neural network algorithm or employ multiple regression analysis; it is trained using a large amount of historical data. The controller stores the calculated three environmental impact coefficients, awaiting subsequent calls from the comprehensive compensation parameter calculation program. The entire analysis process is executed in real time, ensuring timely reflection of the impact of environmental changes on measurement accuracy.

[0043] S104. Based on the environmental temperature influence coefficient, the environmental humidity influence coefficient, the environmental light intensity influence coefficient, the environmental temperature weight, the environmental humidity weight, and the environmental light intensity weight, determine the comprehensive compensation parameters. The environmental temperature weight, the environmental humidity weight, and the environmental light intensity weight are determined through a preset environmental influence weight table.

[0044] Among them, the environmental temperature influence coefficient refers to the impact of environmental temperature changes on the measurement results; the environmental humidity influence coefficient refers to the impact of environmental humidity changes on the measurement results; the environmental light intensity influence coefficient refers to the impact of environmental light intensity changes on the measurement results; the environmental temperature weight refers to the importance coefficient of the environmental temperature factor in the calculation of the comprehensive compensation parameters; the environmental humidity weight refers to the importance coefficient of the environmental humidity factor in the calculation of the comprehensive compensation parameters; the environmental light intensity weight refers to the importance coefficient of the environmental light intensity factor in the calculation of the comprehensive compensation parameters; the preset environmental influence weight table is a data comparison table storing the weight coefficients of each environmental factor; and the comprehensive compensation parameter refers to the final correction parameter calculated based on the degree of influence of each environmental factor. For example, when the environmental temperature influence coefficient is 0.8 and the environmental temperature weight is 0.5, then the contribution value of the environmental temperature to the final comprehensive compensation parameter is 0.4.

[0045] Specifically, first, the controller looks up the environmental temperature weight, environmental humidity weight, and environmental light intensity weight corresponding to the current environmental conditions from a preset environmental impact weight table. Then, the controller multiplies each environmental impact coefficient by its corresponding environmental weight value to obtain the weighted impact value of that environmental factor. Next, the controller performs a comprehensive calculation on the three weighted impact values ​​according to a preset mathematical calculation model to obtain the final comprehensive compensation parameters. The preset mathematical calculation model can be a simple linear superposition or a nonlinear model considering the interactions between environmental factors. The controller needs to ensure the numerical stability of the calculation process and verify the validity of the calculation results.

[0046] S105. Apply the comprehensive compensation parameters to the photoelectric sensor.

[0047] The comprehensive compensation parameter refers to the calibration factor used to correct the measurement results of the photoelectric sensor; application refers to the process of writing the comprehensive compensation parameter into the control register or configuration area of ​​the photoelectric sensor; and the photoelectric sensor refers to a photoelectric detection device that requires precision control. For example, the comprehensive compensation parameter can be a correction coefficient in the range of 0.8-1.2, which is directly multiplied by the original output value of the photoelectric sensor to obtain the corrected measurement result.

[0048] Specifically, first, the controller checks the current operating status of the photoelectric sensor to ensure it is in a receptive configuration state. Then, the controller writes the comprehensive compensation parameters to the designated storage area of ​​the photoelectric sensor via a predefined communication interface. After writing, the controller requests the photoelectric sensor to read back the parameter values ​​for verification, ensuring the comprehensive compensation parameters are written correctly. If the writing of the comprehensive compensation parameters fails or the read-back parameter values ​​are inconsistent, the writing operation needs to be retried or an exception handling procedure needs to be triggered. After the comprehensive compensation parameters are successfully applied, the controller instructs the photoelectric sensor to use the new comprehensive compensation parameters for subsequent measurements.

[0049] Optionally, under normal circumstances, if the first intensity deviation value is not within a preset first error range or the second intensity deviation value is not within a preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value, the determination of the ambient temperature influence coefficient, the ambient humidity influence coefficient, and the ambient light intensity influence coefficient can be achieved in the following way, which is not limited here: Find the first ambient temperature influence coefficient, the first ambient humidity influence coefficient, and the first ambient light intensity influence coefficient that best match the first intensity deviation value in the first environmental influence coefficient table. The first environmental influence coefficient table includes the first intensity... The correspondence between the deviation value and the environmental impact coefficient; find the second environmental temperature influence coefficient, the second environmental humidity influence coefficient, and the second environmental light intensity influence coefficient that best match the second intensity deviation value in the second environmental impact coefficient table, which includes the correspondence between the second intensity deviation value and the environmental impact coefficient; based on the first environmental temperature influence coefficient, the first environmental humidity influence coefficient, the first environmental light intensity influence coefficient, the second environmental temperature influence coefficient, the second environmental humidity influence coefficient, and the second environmental light intensity influence coefficient, determine the environmental temperature influence coefficient, the environmental humidity influence coefficient, and the environmental light intensity influence coefficient.

[0050] By employing the above technical solution, the controller acquires the detected light intensity values ​​of two reference light signals (high and low) collected by the photoelectric sensor under the current environmental data, and compares them with the reference light intensity values ​​to obtain the intensity deviation value. When the intensity deviation value exceeds the preset error range, the controller determines various environmental influence coefficients based on the current environmental data (ambient temperature, ambient humidity, and light intensity) and the intensity deviation value. Then, based on these environmental influence coefficients and a preset environmental influence weight table, it determines comprehensive compensation parameters and applies them to the photoelectric sensor. This solution achieves dynamic compensation and adjustment of the photoelectric sensor's measurement accuracy, effectively eliminating the interference of environmental factors on the measurement results and improving the accuracy and reliability of the photoelectric sensor's precision control.

[0051] The following provides a more detailed description of the process of the method provided in this implementation. Please refer to [link / reference]. Figure 2 This is another flowchart illustrating the photoelectric sensor precision control method in this application embodiment.

[0052] S201. Obtain the operating time of the photoelectric sensor;

[0053] The operating time refers to the continuous operating time of the photoelectric sensor after the last calibration or reset; the photoelectric sensor is a sensing device used to convert light signals into electrical signals.

[0054] Specifically, the controller reads the operating time counter inside the photoelectric sensor, which starts counting from the last calibration or reset operation. If the photoelectric sensor supports power-down protection, the controller also needs to read the historical operating time stored in non-volatile memory. Then, the controller adds the current count value to the historical operating time to obtain the total operating time of the photoelectric sensor. The total operating time can be recorded in hours, accumulated from the last calibration time. A total operating time of 168 hours indicates that the photoelectric sensor has been operating continuously for 7 days.

[0055] S202. If the working time exceeds the preset time threshold, the self-test parameters of the photoelectric sensor are obtained.

[0056] The preset duration threshold refers to the threshold value for triggering the sensor's self-test; the self-test parameters refer to the set of monitoring data reflecting the functional status of the photoelectric sensor, including key parameters such as signal acquisition status, power supply voltage, and operating temperature; acquisition refers to the process of reading the internal status data of the photoelectric sensor. For example, the preset duration threshold can be set to 720 hours (i.e., 30 days), and the self-test parameters can include specific values ​​such as signal conversion accuracy, power supply voltage deviation, and chip temperature.

[0057] Specifically, first, the controller compares the acquired operating time with a preset time threshold. If the operating time exceeds the preset time threshold, a self-test program for the photoelectric sensor is triggered. The controller sends a self-test command to the photoelectric sensor via a predefined communication protocol, requiring the photoelectric sensor to perform internal status detection. Then, the controller reads the self-test data returned by the photoelectric sensor item by item to obtain the self-test parameters of the photoelectric sensor, including but not limited to: the operating status of the signal acquisition channel, the accuracy index of the analog-to-digital converter, the voltage parameters of the power supply circuit, and the temperature value of the sensor chip.

[0058] S203. Determine whether the photoelectric sensor is in normal working condition based on the self-test parameters.

[0059] The self-test parameters are a set of multi-dimensional indicators reflecting the working status of the photoelectric sensor; the normal working state refers to the operating state in which all performance indicators of the photoelectric sensor meet the preset requirements; the state judgment is the process of comparing the self-test parameters with the normal range of the preset parameters; the judgment result is a Boolean value that determines whether the photoelectric sensor is in a normal working state. For example, when the power supply voltage is within the range of 4.8V-5.2V, the chip temperature is below 85℃, and the signal acquisition error is less than 1%, the photoelectric sensor is determined to be in a normal working state.

[0060] Specifically, first, the controller reads the normal range of each self-test parameter. Then, the controller compares each self-test parameter with its corresponding preset normal range: checking whether the status flag of the signal acquisition channel is normal, whether the power supply voltage is within the allowable deviation range, whether the chip temperature is below the warning value, and whether the analog-to-digital conversion accuracy meets the requirements, etc. If all self-test parameters are within the preset normal range, the photoelectric sensor is determined to be in normal working condition; otherwise, it is determined to be in abnormal working condition. The controller records the judgment results and specific anomalies in the status log to provide a basis for subsequent processing.

[0061] S204. If the photoelectric sensor is in the normal working state, then the steps of acquiring the first detection light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the second detection light intensity value generated by the photoelectric sensor acquiring the second reference light signal under the current environmental data are executed.

[0062] Specifically, when the controller determines that the photoelectric sensor is in normal working condition, it begins to perform precision control on the photoelectric sensor. For details, please refer to step S101, which will not be repeated here.

[0063] S205. If the photoelectric sensor is not in the normal working state, determine the self-test anomaly type of the photoelectric sensor. The self-test anomaly type includes at least one of signal acquisition anomaly, voltage anomaly, and temperature anomaly. Determine the processing strategy corresponding to the self-test anomaly type from the preset anomaly processing strategy library and execute it.

[0064] Among them, self-test anomaly types refer to the specific classifications of abnormal operating states of photoelectric sensors; signal acquisition anomalies refer to malfunctions in the photoelectric conversion or signal processing circuits of the photoelectric sensor; voltage anomalies refer to the power supply voltage of the photoelectric sensor exceeding the preset voltage operating range; temperature anomalies refer to the chip temperature of the photoelectric sensor exceeding the preset temperature threshold; the preset anomaly handling strategy library refers to a database storing the corresponding handling strategies for various self-test anomaly types; and the handling strategy refers to the repair or remedial measures for specific self-test anomaly types. For example, when a voltage anomaly is detected, the corresponding handling strategy may include specific operational steps such as resetting the power supply or adjusting power supply parameters.

[0065] Specifically, first, the controller analyzes the abnormal items in the self-test parameters to determine the specific type of self-test anomaly: if the signal acquisition channel status is abnormal or the conversion accuracy is out of tolerance, it is determined to be a signal acquisition anomaly; if the power supply voltage exceeds the 4.5V-5.5V range, it is determined to be a voltage anomaly; if the chip temperature exceeds 90℃, it is determined to be a temperature anomaly. Then, based on the identified self-test anomaly type, the controller searches for a matching processing strategy from the preset anomaly handling strategy library. Finally, it executes the processing operations according to the steps defined by the processing strategy, such as restarting the photoelectric sensor, adjusting parameters, and switching operating modes. The entire processing process needs to record the content and results of the executed processing strategies to provide a basis for subsequent analysis.

[0066] S206. If the number of times the processing strategy is executed exceeds the preset threshold and the photoelectric sensor is not in the normal working state, a photoelectric sensor abnormality report is generated. The photoelectric sensor abnormality report includes the self-test abnormality type and historical processing strategies. The photoelectric sensor abnormality report is sent to the management terminal.

[0067] Among them, the preset threshold number refers to the maximum number of times the processing strategy is allowed to be executed repeatedly; the execution count refers to the cumulative number of times the processing strategy has been executed for the same self-test anomaly type; the photoelectric sensor anomaly report refers to the data document that records the photoelectric sensor fault information; the historical processing strategy refers to the record of all processing methods previously attempted; and the management terminal represents the upper-level management system used to receive and process photoelectric sensor anomaly reports. For example, if the preset threshold number is 3 times, and the system still fails to recover after three consecutive restart operations, a photoelectric sensor anomaly report needs to be generated and reported.

[0068] Specifically, first, the controller counts the number of times the handling strategy for the current self-test anomaly type is executed and compares it to a preset threshold. When the number of executions exceeds the preset threshold, the controller collects all anomaly information, including anomaly type, occurrence time, environmental conditions, and self-test parameters. Simultaneously, it compiles historical execution records of handling strategies, including the strategy content, execution time, and execution result for each execution. Then, the controller organizes this information into a photoelectric sensor anomaly report according to a predetermined format. Finally, the photoelectric sensor anomaly report is sent to the management terminal via a network communication interface. The entire process of generating and sending the photoelectric sensor anomaly report must ensure data integrity and security, requiring data encryption and transmission confirmation when necessary.

[0069] S207. Under the current environmental data, the photoelectric sensor collects a first detection light intensity value generated by a first reference light signal and a second detection light intensity value collected by the photoelectric sensor collects a second reference light signal. The current environmental data includes the ambient temperature value, the ambient humidity value, and the ambient light intensity value. The first reference light signal corresponds to a first reference light intensity value, and the second reference light signal corresponds to a second reference light intensity value. The intensity of the first reference light signal is higher than that of the second reference light signal.

[0070] For details, please refer to step S101, which will not be repeated here.

[0071] S208. The first detected light intensity value is compared with the first reference light intensity value, and the second detected light intensity value is compared with the second reference light intensity value to obtain the first intensity deviation value and the second intensity deviation value.

[0072] For details, please refer to step S102, which will not be repeated here.

[0073] S209. If the first intensity deviation value is not within the preset first error range or the second intensity deviation value is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value and the second intensity deviation value, determine the ambient temperature influence coefficient, the ambient humidity influence coefficient and the ambient light intensity influence coefficient.

[0074] For details, please refer to step S103, which will not be repeated here.

[0075] S210. Based on the environmental temperature influence coefficient, the environmental humidity influence coefficient, the environmental light intensity influence coefficient, the environmental temperature weight, the environmental humidity weight, and the environmental light intensity weight, determine the comprehensive compensation parameters. The environmental temperature weight, the environmental humidity weight, and the environmental light intensity weight are determined through a preset environmental influence weight table.

[0076] For details, please refer to step S104, which will not be repeated here.

[0077] S211. Apply the comprehensive compensation parameters to the photoelectric sensor.

[0078] For details, please refer to step S105, which will not be repeated here.

[0079] S212. Obtain the third detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the fourth detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal;

[0080] The first reference light signal refers to the reference light signal emitted by a standard light source with higher intensity; the second reference light signal refers to the reference light signal emitted by a standard light source with lower intensity; the third detected light intensity value refers to the measured output value of the photoelectric sensor on the first reference light signal after applying comprehensive compensation parameters; and the fourth detected light intensity value refers to the measured output value of the photoelectric sensor on the second reference light signal after applying comprehensive compensation parameters. For example, after applying comprehensive compensation parameters, a third detected light intensity value of 4.95V is measured for a 100cd first reference light signal, and a fourth detected light intensity value of 2.48V is measured for a 50cd second reference light signal.

[0081] Specifically, first, the controller waits for the photoelectric sensor to complete the loading of comprehensive compensation parameters and internal state update. Then, the controller controls the light source device to emit two reference light signals again according to a predetermined sequence, with each reference light signal being emitted for a sufficient duration to ensure measurement stability. The controller records the measurement output of the photoelectric sensor for these two reference light signals after compensation, obtaining the third and fourth detected light intensity values, respectively. To ensure the reliability of the measurement data, each reference light signal is measured repeatedly and the data is filtered to remove outliers, and the average value is taken as the final result.

[0082] S213. If the deviation between the third detected light intensity value and the first reference light intensity value is within the preset first error range and the deviation between the fourth detected light intensity value and the second reference light intensity value is within the preset second error range, then the current environmental data and the comprehensive compensation parameter are stored.

[0083] Here, the deviation value refers to the difference between the detected light intensity value and the reference light intensity value; the preset first error range refers to the allowable deviation range for measuring high-intensity light signals; the preset second error range refers to the allowable deviation range for measuring low-intensity light signals; the current environmental data refers to the ambient temperature, ambient humidity, and ambient light intensity during measurement; and the comprehensive compensation parameter is a calibration factor used to correct the photoelectric sensor. For example, when the third detected light intensity value is 4.95V, the first reference light intensity value is 5.0V, and the preset first error range is ±0.1V, the deviation value of -0.05V is within the allowable range.

[0084] Specifically, first, the controller calculates the difference between the third detected light intensity value and the first reference light intensity value, and the difference between the fourth detected light intensity value and the second reference light intensity value. Then, the controller compares these two deviation values ​​with their corresponding preset error ranges. When both deviation values ​​are within their respective preset error ranges, it indicates that the current comprehensive compensation parameters can effectively improve measurement accuracy. At this point, the controller writes the current environmental data and the corresponding comprehensive compensation parameters as a valid data pair into the parameter storage area of ​​the photoelectric sensor.

[0085] S214. If the deviation between the third detected light intensity value and the first reference light intensity value is not within the preset first error range or the deviation between the fourth detected light intensity value and the second reference light intensity value is not within the preset second error range, then the preset environmental impact weight table is adjusted to obtain an optimized environmental impact weight table; based on the optimized environmental impact weight table, the comprehensive compensation parameter is calculated and applied to the photoelectric sensor.

[0086] The preset environmental impact weight table is a dataset of environmental factor weights used to calculate the comprehensive compensation parameters; the optimized environmental impact weight table refers to a new dataset of environmental factor weights adjusted based on the verification results; and weight adjustment refers to the process of reassessing the degree of impact of each environmental factor based on the verification results. For example, when the impact of ambient temperature is underestimated, the preset temperature weight can be appropriately increased from 0.3 to 0.4, while adjusting the weights of other environmental factors accordingly.

[0087] Specifically, first, the controller analyzes the specific circumstances of the deviation exceeding the limits, including the magnitude of the deviation and the measurement range in which it occurred. Then, based on the deviation characteristics and current environmental data, the controller assesses the reasonableness of the weights for each environmental factor. Based on the assessment results, the controller optimizes the preset environmental impact weight table: appropriately increasing the weights of environmental factors whose impact is underestimated, and correspondingly decreasing the weights of factors whose impact is overestimated, while ensuring that the sum of all weights remains 1. The controller recalculates the comprehensive compensation parameters using the adjusted optimized environmental impact weight table, and finally applies the new comprehensive compensation parameters to the photoelectric sensor and performs verification testing again. The entire optimization process may require multiple iterations until a suitable weight configuration is found.

[0088] The controller in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference]. Figure 3 This is a schematic diagram of the physical device structure of the controller in an embodiment of this application.

[0089] It should be noted that, Figure 3 The controller structure shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0090] like Figure 3As shown, the controller includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 302 or programs loaded from storage portion 308 into Random Access Memory (RAM) 303, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 303. The CPU 301, ROM 302, and RAM 303 are interconnected via bus 304. Input / output (I / O) interface 305 is also connected to bus 304.

[0091] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.

[0092] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.

[0093] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0095] Specifically, the controller in this embodiment includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the photoelectric sensor accuracy control method provided in the above embodiment.

[0096] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the controller described in the above embodiments; or it may exist independently and not assembled into the controller. The storage medium carries one or more computer programs that, when executed by a processor of the controller, cause the controller to implement the photoelectric sensor precision control method provided in the above embodiments.

[0097] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0098] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0099] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for controlling the accuracy of a photoelectric sensor, characterized in that, Applied to a controller, the method includes: acquiring, under current environmental data, a first detected light intensity value generated by a photoelectric sensor acquiring a first reference light signal and a second detected light intensity value generated by the photoelectric sensor acquiring a second reference light signal, wherein the current environmental data includes environmental temperature, environmental humidity, and environmental light intensity; the first reference light signal corresponds to a first reference light intensity value, the second reference light signal corresponds to a second reference light intensity value, and the intensity of the first reference light signal is higher than that of the second reference light signal; comparing the first detected light intensity value with the first reference light intensity value and the second detected light intensity value with the second reference light intensity value respectively to obtain a first intensity deviation value and a second intensity deviation value; if the first intensity deviation value is not... If the second intensity deviation value is not within the preset first error range or is not within the preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value, an ambient temperature influence coefficient, an ambient humidity influence coefficient, and an ambient light intensity influence coefficient are determined; according to the ambient temperature influence coefficient, the ambient humidity influence coefficient, the ambient light intensity influence coefficient, the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight, a comprehensive compensation parameter is determined, wherein the ambient temperature weight, the ambient humidity weight, and the ambient light intensity weight are determined through a preset environmental influence weight table; the comprehensive compensation parameter is applied to the photoelectric sensor; If the first intensity deviation value is not within a preset first error range or the second intensity deviation value is not within a preset second error range, then based on the ambient temperature value, the ambient humidity value, the ambient light intensity value, the first intensity deviation value, and the second intensity deviation value, an ambient temperature influence coefficient, an ambient humidity influence coefficient, and an ambient light intensity influence coefficient are determined. Specifically, this includes: searching a first ambient temperature influence coefficient, a first ambient humidity influence coefficient, and a first ambient light intensity influence coefficient that best match the first intensity deviation value in a first environmental influence coefficient table, where the first environmental influence coefficient table includes the correspondence between the first intensity deviation value and the environmental influence coefficient; searching a second ambient temperature influence coefficient, a second ambient humidity influence coefficient, and a second ambient light intensity influence coefficient that best match the second intensity deviation value in a second environmental influence coefficient table, where the second environmental influence coefficient table includes the correspondence between the second intensity deviation value and the environmental influence coefficient; and determining the ambient temperature influence coefficient, the ambient humidity influence coefficient, and the ambient light intensity influence coefficient based on the first ambient temperature influence coefficient, the first ambient humidity influence coefficient, the first ambient light intensity influence coefficient, the second ambient temperature influence coefficient, the second ambient humidity influence coefficient, and the second ambient light intensity influence coefficient.

2. The method according to claim 1, characterized in that, Before the steps of acquiring the first detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the second detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal under the current environmental data, the method further includes: acquiring the working time of the photoelectric sensor; if the working time exceeds a preset time threshold, acquiring the self-test parameters of the photoelectric sensor; determining whether the photoelectric sensor is in normal working condition based on the self-test parameters; if the photoelectric sensor is in normal working condition, then executing the steps of acquiring the first detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the second detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal under the current environmental data.

3. The method according to claim 2, characterized in that, After the step of determining whether the photoelectric sensor is in normal working condition based on the self-test parameters, the method further includes: if the photoelectric sensor is not in normal working condition, determining the self-test anomaly type of the photoelectric sensor, wherein the self-test anomaly type includes at least one of signal acquisition anomaly, voltage anomaly, and temperature anomaly; determining and executing the processing strategy corresponding to the self-test anomaly type from a preset anomaly processing strategy library.

4. The method according to claim 3, characterized in that, After determining the processing strategy corresponding to the self-test anomaly type from the preset anomaly handling strategy library, the method further includes: if the number of times the processing strategy is executed exceeds a preset number threshold and the photoelectric sensor is not in the normal working state, then generating a photoelectric sensor anomaly report, the photoelectric sensor anomaly report including the self-test anomaly type and historical processing strategies; and sending the photoelectric sensor anomaly report to the management terminal.

5. The method according to claim 1, characterized in that, After applying the comprehensive compensation parameters to the photoelectric sensor, the method further includes: acquiring a third detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and a fourth detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal; if the deviation between the third detected light intensity value and the first reference light intensity value is within a preset first error range and the deviation between the fourth detected light intensity value and the second reference light intensity value is within a preset second error range, then storing the current environmental data and the comprehensive compensation parameters.

6. The method according to claim 5, characterized in that, After the steps of obtaining the third detected light intensity value generated by the photoelectric sensor acquiring the first reference light signal and the fourth detected light intensity value generated by the photoelectric sensor acquiring the second reference light signal, the method further includes: if the deviation between the third detected light intensity value and the first reference light intensity value is not within the preset first error range or the deviation between the fourth detected light intensity value and the second reference light intensity value is not within the preset second error range, then the preset environmental impact weight table is adjusted to obtain an optimized environmental impact weight table; based on the optimized environmental impact weight table, the comprehensive compensation parameter is calculated and applied to the photoelectric sensor.

7. A controller, characterized in that, The controller includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the controller to perform the method as described in any one of claims 1 to 6.

8. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on the controller, the controller causes the controller to perform the method as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, When the computer program product is run on the controller, the controller performs the method as described in any one of claims 1 to 6.