Sensor control method, device, equipment and storage medium

By using the second sensor in the sensor system to correct the detection results of the first sensor, the problem of low detection accuracy in different materials and color environments is solved, which improves the detection accuracy of the system and reduces power consumption.

CN115113294BActive Publication Date: 2025-05-16HEGII SANITARY WARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210875587.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-05-16
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

In environments of different materials and colors, the detection results of infrared sensors are low in accuracy, and they cannot effectively deal with the absorption and feedback value attenuation of materials and colors.

Method used

By acquiring the detection result of the first sensor, it is determined whether the preset correction conditions are met. If it is met, the second sensor is activated for detection, and the initialization setting parameters of the first sensor are updated according to the results of the second sensor to improve the detection accuracy.

Benefits of technology

It enhances the resistance to material interference and anti-chromatic interference of the sensor system, improves detection accuracy, and enters a dormant state after short detection through the second sensor, reducing system power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115113294B_ABST
    Figure CN115113294B_ABST
Patent Text Reader

Abstract

The present invention discloses a sensor control method, device, equipment and storage medium, the method comprising: obtaining a first detection result of a first sensor, judging whether the first detection result meets a preset correction condition; if the first detection result meets the correction condition, starting a second sensor for detection, and controlling the second sensor to enter a non-working state after obtaining a second detection result of the second sensor; correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor; controlling the first sensor after the initialization setting parameters are updated to detect a target object in a first sensing area. The present invention corrects the first sensor by the second sensor, thereby improving the accuracy of the sensor detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of bathroom equipment, and in particular to a sensor control method, device, equipment and storage medium. Background Art

[0002] As the living standards of society continue to improve, people's requirements for the quality of home life are getting higher and higher. Touchless bathroom equipment is gradually favored by consumers due to its advantages of intelligence and low bacterial cross contamination.

[0003] Currently, most contactless bathroom products use infrared sensing technology. However, when infrared sensing faces objects of different colors and materials, different infrared absorption and feedback attenuation problems will occur, resulting in low accuracy of the detection results. Summary of the invention

[0004] The main purpose of the present invention is to provide a sensor control method, device, equipment and storage medium, aiming to solve the problem of low accuracy of sensor detection results in environments with different materials and colors.

[0005] To achieve the above object, the present invention provides a sensor control method, the method comprising:

[0006] Obtaining a first detection result of a first sensor, and determining whether the first detection result meets a preset calibration condition;

[0007] If the first detection result meets the calibration condition, the second sensor is started to perform detection, and after obtaining the second detection result of the second sensor, the second sensor is controlled to enter a non-working state;

[0008] Correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor;

[0009] The first sensor after the initialization setting parameter is updated is controlled to detect the target object in the first sensing area.

[0010] Optionally, before the step of obtaining the first detection result of the first sensor and determining whether the first detection result meets a preset calibration condition, the method further includes:

[0011] Initializing the first sensor according to a preset initial data table;

[0012] The first sensor after the initialization is controlled to perform detection.

[0013] Optionally, the step of obtaining a first detection result of the first sensor and determining whether the first detection result meets a preset calibration condition includes:

[0014] receiving a first detection result fed back by the first sensor, and acquiring a first distance value in the first detection result;

[0015] determining whether the first distance value is within a distance threshold of the calibration condition;

[0016] If the first distance value is within the distance threshold, the first detection result meets the correction condition.

[0017] Optionally, the step of determining whether the first distance value is within a distance threshold of the correction condition includes:

[0018] Obtaining a preset sensitivity parameter, and obtaining an upper distance limit value and a lower distance limit value according to the sensitivity parameter and the distance threshold;

[0019] Determine a distance range according to the upper distance limit value and the lower distance limit value;

[0020] It is determined whether the first distance value is within the distance range.

[0021] Optionally, the step of starting the second sensor to perform detection and controlling the second sensor to enter a non-working state after obtaining a second detection result of the second sensor includes:

[0022] Controlling the second sensor to perform detection in a second sensing area, and controlling the first sensor to enter a standby state;

[0023] A second detection result fed back by the second sensor is received, and the second sensor is controlled to enter a shutdown, sleep or standby state.

[0024] Optionally, the step of correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor includes:

[0025] Acquire a second distance value in the second detection result, use the second distance value to replace the first distance value in the first detection result, correct the first detection result, and obtain a corrected third detection result;

[0026] Querying a preset reference database to determine a target detection data table that matches the third detection result;

[0027] The target detection data table is called to initialize the first sensor, and the third sensing value and the third distance value in the detection data table are used as the initialization setting parameters.

[0028] Optionally, the step of controlling the first sensor after the initialization setting parameter is updated to detect the target object includes:

[0029] Controlling the first sensor to change from a standby state to a working state to scan whether there is a target object in the working area;

[0030] Dynamically obtain the scanning result fed back by the first sensor, and control the actuator to turn on or off according to the scanning result.

[0031] In addition, to achieve the above object, the present invention further provides a sensor control device, the sensor control device comprising:

[0032] A judgment module, used for obtaining a first detection result of the first sensor, and judging whether the first detection result meets a preset calibration condition;

[0033] a start-up module, configured to start the second sensor for detection if the first detection result meets the calibration condition, and control the second sensor to enter a non-working state after obtaining a second detection result of the second sensor;

[0034] a correction module, configured to correct the first detection result according to the second detection result, so as to update the initialization setting parameters of the first sensor;

[0035] The control module is used to control the first sensor after the initialization setting parameters are updated to detect the target object in the first sensing area.

[0036] In addition, to achieve the above-mentioned purpose, the present invention also provides an electronic device, which includes: a memory, a processor, and a sensor control program stored in the memory and executable on the processor, wherein the sensor control program is configured to implement the steps of the sensor control method described above.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a sensor control program is stored, and when the sensor control program is executed by a processor, the steps of the sensor control method described above are implemented.

[0038] The present invention obtains a first detection result of a first sensor, and determines whether the first detection result meets a preset correction condition; if the first detection result meets the correction condition, the second sensor is started to perform detection, and after obtaining the second detection result of the second sensor, the second sensor is controlled to enter a non-working state; the first detection result is corrected according to the second detection result to update the initialization setting parameters of the first sensor; the first sensor after the initialization setting parameters are updated is controlled to perform detection of a target object in a first sensing area, and whether to calibrate the first sensor is determined according to the second detection result. After the detection parameters of the first sensor are calibrated by the second sensor, the ability of the first sensor to resist material interference and color difference interference can be enhanced, and the detection accuracy of the sensor system can be improved; and the second sensor is controlled to enter a dormant state after performing a short-time detection, so as to reduce the power consumption of the sensor system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention;

[0040] Figure 2 It is a flow chart of the first embodiment of the sensor control method of the present invention;

[0041] Figure 3 A schematic diagram of the logic framework of the sensor system of the sensor control method of the present invention;

[0042] Figure 4 A schematic diagram of the structure of a sensor system of the sensor control method of the present invention;

[0043] Figure 5 A trend fitting diagram of the sensing distance and AD value of the sensor control method of the present invention;

[0044] Figure 6 is a flow chart of a second embodiment of a sensor control method of the present invention;

[0045] Figure 7 Schematic diagram of the sensor control device of the present invention.

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0048] Most bathroom sensing products use infrared sensing technology, but the infrared sensing solution has no anti-color difference function and cannot cope with the problem of different colors and materials absorbing infrared and attenuating feedback values. The anti-color difference solution used by general bathroom sensing products has high power consumption. When powered by batteries, the service life is very short and the batteries need to be replaced frequently. An AC power supply solution is required, which has power distribution requirements for the use environment and high construction costs.

[0049] The main technical scheme of the present invention is: obtaining a first detection result of a first sensor, and determining whether the first detection result meets a preset correction condition; if the first detection result meets the correction condition, starting a second sensor for detection, and controlling the second sensor to enter a sleep state after obtaining a second detection result of the second sensor; correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor; and controlling the first sensor after the initialization setting parameters are updated to detect a target object within a first sensing area.

[0050] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of an electronic device of the hardware operating environment involved in the embodiment of the present invention.

[0051] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0052] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0053] like Figure 1As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a sensor control program.

[0054] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device, and the electronic device calls the sensor control program stored in the memory 1005 through the processor 1001, and executes the sensor control method provided in the embodiment of the present invention.

[0055] The embodiment of the present invention provides a sensor control method, referring to Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a sensor control method of the present invention.

[0056] In this embodiment, the sensor control method includes:

[0057] Step S10, obtaining a first detection result of a first sensor, and determining whether the first detection result meets a preset calibration condition;

[0058] Figure 3 It is a logical framework diagram of the sensor system. Figure 3 As shown, the controller is the central part of the sensor system, which can control the working state of the sensor and the actuator. The sensor senses the changes in environmental factors in its working environment and transmits the sensing results to the controller. The actuator is turned on or off according to the control information transmitted by the controller. When the actuator is a solenoid valve, the opening of the solenoid valve can make the sensor system discharge water. The controller can be an MCU (Micro-Controller Unit), and there can be multiple sensors and actuators connected to the controller.

[0059] Figure 4 is a schematic diagram of the sensor system. Figure 4 As shown, the sensor system includes a first sensor 1 and a second sensor 2. In some embodiments, the first sensor 1 and the second sensor 2 are arranged in parallel and have the same sensing direction. This embodiment is described with the number of sensors being 2. In some embodiments, the first sensor belongs to a first sensor group, and the number of first sensors in the first sensor group may be multiple, and the second sensor belongs to a second sensor group, and the number of second sensors in the second sensor group may be multiple.

[0060] Figure 4The two sensors in can be sensors of different types or with different anti-color interference capabilities. In terms of anti-color interference capability, the infrared sensor has weak anti-color interference capability, and its sensing distance for dark objects is much smaller than that for light objects, and is easily affected by the surrounding environment and light. The laser sensor and the microwave sensor have strong anti-color interference capability, and the sensing distance for dark objects is not shortened compared to the sensing distance for light objects. In terms of power consumption, the working power consumption and standby power consumption of the infrared sensor are relatively low. Whether it is a laser sensor or a microwave sensor, its working power consumption and standby power consumption are at a relatively high level. In this embodiment, the first sensor has weaker anti-color interference capability than the second sensor, and the power consumption of the first sensor is lower than that of the second sensor. Specifically, the first sensor can be an infrared sensor, and the second sensor can be a laser sensor.

[0061] As an example, before the step of obtaining the first detection result of the first sensor and determining whether the first detection result meets the preset correction condition, the method may further include:

[0062] Step A1, initializing the first sensor according to a preset initial data table;

[0063] Step A2, controlling the initialized first sensor to perform detection.

[0064] The preset initial data table comes from the reference database of the first sensor. The reference database can store the first sensor-material-color-distance-AD (Analog to Digital) value associated data. The AD value represents the sensing value of the sensor to the surrounding environment. Different sensing values ​​can correspond to the sensing distance between the target object detected by the sensor and the sensor. Under different material and color environments, for the first sensor, the correlation between its sensing distance and sensing value presents different changing trends. When the material or color in the environment is determined, a series of tests can be performed on the sensing distance and sensing value of the first sensor to obtain a reference data table of the same material or the same color. The reference database is obtained from the reference data table obtained from a series of tests on different materials. Trend fitting is performed on the distance and sensing value in the reference data table to obtain the L=f(AD) curve. Figure 5It is a trend fitting diagram of sensing distance and AD value under different materials or colors. In the comparison database, the comparison data table of the standard whiteboard can be used as the initial data table, marked as Tab0, L0=f0(AD), to initialize the first sensor. The comparison data table of stainless steel material is marked as Tab1, L1=f1(AD). The comparison data table of leather material is marked as Tab2, L2=f2(AD). The comparison data table of the standard blackboard is marked as Tab3, L3=f3(AD). Tab0 and Tab1 and other comparison data tables can be extended and expanded to multiple groups of data according to actual needs. The comparison data table can be built in the register.

[0065] The sensor may include a sensing circuit and a sensing probe. The sensing circuit receives a control signal sent by the controller and activates the sensing probe to work. When the controller controls the initialized first sensor to perform detection, the first sensor receives the sensing signal fed back by the environment, and then feeds back the AD value and the corresponding sensing distance to the controller according to Tab0.

[0066] In real life scenarios, the installation environment of bathroom equipment is usually dominated by white, and the reference data table of the standard whiteboard is used as the basis for initialization data, which is close to the usage and makes it easier for the first sensor to feedback the sensing distance to the controller according to the AD value.

[0067] As an example, the step of obtaining a first detection result of a first sensor and determining whether the first detection result meets a preset calibration condition may include:

[0068] Step B1, receiving a first detection result fed back by the first sensor, and obtaining a first distance value in the first detection result;

[0069] Step B2, determining whether the first distance value is within the distance threshold of the calibration condition;

[0070] Step B3: If the first distance value is within the distance threshold, the first detection result meets the correction condition.

[0071] The calibration condition may include a preset distance threshold, which may be adjusted according to the use environment of the sensor system. When the space of the use environment is large, the distance threshold is set to be larger, and when the space of the use environment is small, the distance threshold is set to be smaller. The preset distance threshold may be represented by Target0. When the first sensor is working, the first detection result is fed back to the controller. The first detection result may include a first sensing value and a first distance value, which are represented in the form of (AD10, L10). Comparing L10 and Target0, when L10 is less than or equal to Target0, it indicates that the first distance value is within the distance threshold and meets the calibration condition. When L10 is greater than Target0, it indicates that the first distance value is not within the distance threshold and does not meet the calibration condition. There is a corresponding relationship between AD10 and L10, and AD10 may also be used as a determination condition for the distance threshold.

[0072] When judging whether the first distance value is within the distance threshold, the preset sensitivity parameter can also be obtained, and the upper and lower limits of the distance are obtained according to the sensitivity parameter and the distance threshold, and the distance range is determined according to the upper and lower limits of the distance; judge whether the first distance value is within the distance range. The preset sensitivity parameter can be represented by c, and the upper limit of the distance is represented by Target0*(1+c)%, and the lower limit of the distance is represented by Target0*(1-c)%. The distance range can be determined as [Target0*(1-c)%, Target0*(1+c)%]. When L10 is less than or equal to Target0*(1+c)% and L10 is greater than or equal to Target0*(1-c)%, the first distance value is within the distance range. Otherwise, if it is not within the distance range, the first sensor can continue to detect. Exemplarily, the sensitivity parameter c can be set to 10%-60%.

[0073] The sensitivity of the first sensor to the monitoring range can be adjusted through the sensitivity parameter, and different degrees of adjustment can be made according to the use environment of the sensor system to meet the customer's requirements for different use environments.

[0074] Step S20, if the first detection result meets the calibration condition, start the second sensor to perform detection, and control the second sensor to enter a sleep state after obtaining a second detection result of the second sensor;

[0075] like Figure 5As shown in the figure, after the first sensor is initialized using Tab0, the sensing distance it detects conforms to the variation rule of f0(AD), and when the color in the environment changes from white to black, the first distance value it feedbacks is still f0(AD), and the actual situation should be f3(AD). Errors may occur in the detection of the first sensor, which can be corrected by the second sensor with stronger anti-color interference ability. When the first sensor detects that the target object enters its detection area, the controller activates the second sensor, and the second sensor takes over the detection from the first sensor, and the second sensor feeds back a second detection result with higher accuracy to the controller.

[0076] As an example, the step of starting the second sensor to perform detection and controlling the second sensor to enter a sleep state after obtaining a second detection result of the second sensor may include:

[0077] Step C1, controlling the second sensor to perform detection in a second sensing area, and controlling the first sensor to enter a standby state;

[0078] Step C2, receiving a second detection result fed back by the second sensor, and controlling the second sensor to turn off or enter a standby state.

[0079] The controller can send a detection signal to the sensing circuit of the second sensor to activate the sensing probe of the second sensor. The second sensor can be a precision ranging sensor such as a laser sensor, a microwave radar or a pyroelectric sensor. When the second sensor is a laser sensor, the laser sensor can include a laser transmitter to emit laser light to the second sensing area, and the laser probe receives the laser light reflected from the target area to obtain an AD value. The second sensing area is the effective detection area when the second sensor is working. When the second sensor enters the working state, the controller can also control the first sensor to enter the standby state to reduce the overall power consumption of the sensor system. After the second sensor performs detection, the second detection result is fed back to the controller. The controller can control the second sensor to turn off or enter the standby state after receiving the second detection result. The power consumption of the second sensor in the standby state is lower than that in the working state.

[0080] After the second sensor performs a short-term detection and feeds back a detection result with higher accuracy, the second sensor is controlled to enter a sleep state from a working state, providing a basis for the controller to determine whether to calibrate the first sensor. This can help improve the detection accuracy of the sensor system without significantly increasing the power consumption of the sensor system.

[0081] Step S30, correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor;

[0082] like Figure 5As shown, for the first sensor, when querying f0(AD10) to obtain L10 based on AD10 detected by itself, the material or color in its working environment may have changed, resulting in L10 being inconsistent with the actual distance. However, L20 in the second detection result is closer to the actual distance, and the second detection result can be used to calibrate the first detection result, so that the first sensor is re-initialized according to the changed material or color conditions, and continues to detect in the changed environment, then the curve queried by the first sensor based on the AD value is a series of curves close to the actual environment.

[0083] A correction distance threshold can also be set. When the difference between L20 and L10 is less than the correction distance threshold, it is determined that the first sensor has a high detection accuracy for the sensing distance, and the current environment of the sensor system has not changed. The subsequent calibration steps can be omitted, and the first sensor can be continuously used for detection. When the difference between L20 and L10 is greater than or equal to the correction distance threshold, it indicates that the current environment of the sensor system may have changed, and the first sensor can be calibrated to improve the detection accuracy of the first sensor.

[0084] A calibration period for the first sensor may also be set. If the first sensor is not calibrated within the calibration period, the second sensor may be activated for calibration when the calibration period is reached in combination with whether the first detection result is within the distance threshold, thereby ensuring the detection accuracy of the sensor system.

[0085] As an example, the step of correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor may include:

[0086] Step D1, obtaining a second distance value in the second detection result, using the second distance value to replace the first distance value in the first detection result, correcting the first detection result, and obtaining a corrected third detection result;

[0087] Step D2, querying a preset reference database to determine a target detection data table that matches the third detection result;

[0088] Step D3, calling the target detection data table to initialize the first sensor, and using the third sensing value and the third distance value in the detection data table as the initialization setting parameters.

[0089] The second detection result may include (AD20, L20), where AD20 is the second sensing value and L20 is the second distance value, and the third detection result is (AD10, L20). The reference database may be a pre-established first sensor-material-color-distance-AD value database, which stores reference data tables of the first sensor under different material or color conditions. Each reference data table contains the changing relationship between the AD value of the first sensor and the sensing distance, which can be represented by L=f(AD). Take (AD10, L20) as a point on the L=f(AD) curve, and query the curve L containing this point. x , then L x The corresponding reference data table is a target detection data table that matches the third detection result, which can be represented by Tab x. After the controller determines the target detection data table Tab x, it can initialize the first sensor again according to Tab x, and change the data table query basis of the first sensor from L0=f0(AD) to L x =f x (AD). Initialize the setting parameters, namely the AD value in Tab x and the corresponding distance value.

[0090] After the controller calibrates the first sensor, the first sensor can adapt to the changed environmental conditions, and the distance value queried according to the AD value is close to the actual distance value, and the detection accuracy of the first sensor is improved.

[0091] Step S40 , controlling the first sensor after initialization setting parameter update to detect the target object in the first sensing area.

[0092] After the controller calibrates the first sensor, the first sensor can continue to detect, and the controller controls the operation of the actuator according to the detection result fed back by the first sensor. The controller can be connected to multiple actuators to achieve different functions of the sensor system. The first sensing area is the effective detection area when the first sensor is working. The target object can be a person or a pet, etc.

[0093] In this embodiment, the controller determines whether to calibrate the first sensor according to the second detection result. After the detection parameters of the first sensor are calibrated by the second sensor, the first sensor's ability to resist material interference and color difference interference can be enhanced, thereby improving the detection accuracy of the sensor system. In addition, the second sensor is controlled to enter a sleep state after a short detection, thereby reducing the power consumption of the sensor system.

[0094] Further, in the second embodiment of the sensor control method of the present invention, referring to Figure 6 , the method comprising:

[0095] Step S11, controlling the first sensor to change from a standby state to a working state, scanning whether there is a target object in the working area;

[0096] After calibrating the first sensor, the controller can control the second sensor to exit the detection state, send a detection signal to the sensing circuit of the first sensor, wake up the first sensor in the standby state, and enter the working state to scan the working area.

[0097] The target object can be a person or a pet. The target object to be scanned is different for different application products of the sensor system. When the first sensor is an infrared sensor, the infrared sensor can include an infrared transmitter and an infrared probe. The infrared transmitter transmits an infrared signal to the working area, and the infrared probe receives the infrared signal fed back from the working area to determine whether there is a target object in the working area.

[0098] Step S12, dynamically obtaining the scanning result fed back by the first sensor, and controlling the actuator to turn on or off according to the scanning result.

[0099] Take the case where the sensor system is applied to shower products and the actuator is a solenoid valve. The controller receives the scanning result fed back by the first sensor. If the scanning result indicates that there is a target object in the working area, the controller controls the solenoid valve to open and the sensing system to discharge water. If the scanning result indicates that there is no target object in the working area, the first sensor is controlled to continue scanning. When the sensor system discharges water, the first sensor continues to scan the target object in the working area. When the target object is scanned to leave the working area, the controller controls the solenoid valve to close and the sensing system stops discharging water. When the sensor system completes the water circulation process, Tab0 can be used again to initialize the first sensor.

[0100] In this embodiment, the controller controls the operation of the actuator according to the scanning results of the sensor, so that the bathroom product can intelligently discharge water according to the existence status of the target object in the working area, reduce the difficulty of using the contactless bathroom product, and improve the user experience.

[0101] The embodiment of the present invention also provides a sensor control device, such as Figure 7 As shown, the sensor control device includes:

[0102] The judgment module 101 is used to obtain a first detection result of a first sensor and judge whether the first detection result meets a preset calibration condition;

[0103] A starting module 102, configured to start the second sensor for detection if the first detection result meets the calibration condition, and control the second sensor to enter a non-working state after obtaining a second detection result of the second sensor;

[0104] A correction module 103, configured to correct the first detection result according to the second detection result to update the initialization setting parameters of the first sensor;

[0105] The control module 104 is used to control the first sensor after the initialization setting parameters are updated to detect the target object in the first sensing area.

[0106] Optionally, the sensor control device further includes an initialization module, configured to:

[0107] Initializing the first sensor according to a preset initial data table;

[0108] The first sensor after the initialization is controlled to perform detection.

[0109] Optionally, the determining module 101 is further configured to:

[0110] receiving a first detection result fed back by the first sensor, and acquiring a first distance value in the first detection result;

[0111] determining whether the first distance value is within a distance threshold of the calibration condition;

[0112] If the first distance value is within the distance threshold, the first detection result meets the correction condition.

[0113] Optionally, the determining module 101 is further configured to:

[0114] Obtaining a preset sensitivity parameter, and obtaining an upper distance limit value and a lower distance limit value according to the sensitivity parameter and the distance threshold;

[0115] Determine a distance range according to the upper distance limit value and the lower distance limit value;

[0116] It is determined whether the first distance value is within the distance range.

[0117] Optionally, the startup module 102 is further configured to:

[0118] Controlling the second sensor to perform detection in a second sensing area, and controlling the first sensor to enter a standby state;

[0119] A second detection result fed back by the second sensor is received, and the second sensor is controlled to enter a shutdown, sleep or standby state.

[0120] Optionally, the correction module 103 is further used for:

[0121] Acquire a second distance value in the second detection result, use the second distance value to replace the first distance value in the first detection result, correct the first detection result, and obtain a corrected third detection result;

[0122] Querying a preset reference database to determine a target detection data table that matches the third detection result;

[0123] The target detection data table is called to initialize the first sensor, and the third sensing value and the third distance value in the detection data table are used as the initialization setting parameters.

[0124] Optionally, the control module 104 is further configured to:

[0125] Controlling the first sensor to change from a standby state to an operating state, and scanning whether there is a target object in the first sensing area;

[0126] Dynamically obtain the scanning result fed back by the first sensor, and control the actuator to turn on or off according to the scanning result.

[0127] An embodiment of the present invention further provides an electronic device, the electronic device comprising: a memory, a processor, and a sensor control program stored in the memory and executable on the processor, the sensor control program being configured to implement the steps of the sensor control method described above. The specific implementation of the electronic device of the embodiment of the present invention is referred to the above-mentioned embodiments of the sensor control method, which will not be described in detail here.

[0128] The embodiment of the present invention further provides a computer-readable storage medium, on which a sensor control program is stored, and when the sensor control program is executed by a processor, the steps of the sensor control method described above are implemented. The specific implementation of the computer-readable storage medium in the embodiment of the present invention refers to the above-mentioned embodiments of the sensor control method, which will not be repeated here.

[0129] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0130] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0132] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A sensor control method, characterized in that: The sensor control method is applied to a sensor system, wherein the sensor system includes a first sensor and a second sensor having the same sensing direction, and the sensor control method includes the following steps: Obtaining a first detection result of a first sensor, and determining whether the first detection result meets a preset calibration condition; If the first detection result meets the calibration condition, the second sensor is started to perform detection, and after obtaining the second detection result of the second sensor, the second sensor is controlled to enter a non-working state; Correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor; Controlling the first sensor after the initialization setting parameters are updated to detect the target object in the first sensing area; The step of correcting the first detection result according to the second detection result to update the initialization setting parameters of the first sensor includes: Acquire a second distance value in the second detection result, use the second distance value to replace the first distance value in the first detection result, correct the first detection result, and obtain a corrected third detection result; Querying a preset reference database to determine a target detection data table that matches the third detection result; The target detection data table is called to initialize the first sensor, and the third sensing value and the third distance value in the detection data table are used as the initialization setting parameters.

2. The sensor control method according to claim 1, characterized in that: Before the step of obtaining the first detection result of the first sensor and determining whether the first detection result meets the preset calibration condition, the method further includes: Initializing the first sensor according to a preset initial data table; The first sensor after the initialization is controlled to perform detection.

3. The sensor control method according to claim 1, wherein: The step of obtaining a first detection result of the first sensor and determining whether the first detection result meets a preset calibration condition includes: receiving a first detection result fed back by the first sensor, and acquiring a first distance value in the first detection result; determining whether the first distance value is within a distance threshold of the calibration condition; If the first distance value is within the distance threshold, the first detection result meets the correction condition.

4. The sensor control method according to claim 3, characterized in that: The step of determining whether the first distance value is within the distance threshold of the calibration condition comprises: Obtaining a preset sensitivity parameter, and obtaining an upper distance limit value and a lower distance limit value according to the sensitivity parameter and the distance threshold; Determine a distance range according to the upper distance limit value and the lower distance limit value; It is determined whether the first distance value is within the distance range.

5. The sensor control method according to claim 1, wherein: The step of starting the second sensor to perform detection and controlling the second sensor to enter a non-working state after obtaining a second detection result of the second sensor includes: Controlling the second sensor to perform detection in a second sensing area, and controlling the first sensor to enter a standby state; A second detection result fed back by the second sensor is received, and the second sensor is controlled to enter a shutdown, sleep or standby state.

6. The sensor control method according to any one of claims 1 to 5, characterized in that: The sensor system further includes an actuator, and the step of controlling the first sensor after the initialization setting parameter is updated to detect the target object in the first sensing area includes: Controlling the first sensor to change from a standby state to an operating state, and scanning whether there is a target object in the first sensing area; Dynamically obtain the scanning result fed back by the first sensor, and control the actuator to turn on or off according to the scanning result.

7. A sensor control device, characterized in that: The sensor control device comprises: A judgment module, used for obtaining a first detection result of the first sensor, and judging whether the first detection result meets a preset calibration condition; a start-up module, configured to start the second sensor for detection if the first detection result meets the calibration condition, and control the second sensor to enter a non-working state after obtaining a second detection result of the second sensor; a correction module, configured to correct the first detection result according to the second detection result, so as to update the initialization setting parameters of the first sensor; A control module, used for controlling the first sensor after the initialization setting parameters are updated to detect the target object in the first sensing area; The correction module is also used for: Acquire a second distance value in the second detection result, use the second distance value to replace the first distance value in the first detection result, correct the first detection result, and obtain a corrected third detection result; Querying a preset reference database to determine a target detection data table that matches the third detection result; The target detection data table is called to initialize the first sensor, and the third sensing value and the third distance value in the detection data table are used as the initialization setting parameters.

8. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a sensor control program stored in the memory and executable on the processor, wherein the sensor control program is configured to implement the steps of the sensor control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a sensor control program, and when the sensor control program is executed by a processor, the steps of the sensor control method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Inductor and automatic induction flusher

    CN212692903U

  • Method for calibrating a sensor system

    WO2018184829A1