Passive Infrared Detector Testing Method, Device, System and Medium
By automatically adjusting the transmission power of WiFi devices to reach the environmental security threshold, the problem of low manual testing efficiency of PIR devices is solved, and efficient automatic testing and accurate environmental security threshold determination are achieved.
Patent Information
- Application Number
- CN202310149742.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-02-21
AI Technical Summary
In the prior art, the manual testing efficiency of passive infrared detector (PIR) devices is low, making it difficult to effectively deal with the impact of the transmission power of WiFi devices on their functions.
By acquiring the infrared radiation data collected by the passive infrared detector in the test environment, adjusting the transmission power of the WiFi device according to the relationship between the data and the preset threshold until the environmental security threshold is reached, automatic testing is achieved.
Automatic testing is realized, saving manpower and time, improving testing efficiency, and ensuring the normal operation of PIR devices under the influence of WiFi devices.
Smart Images

Figure CN116256071B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of automatic testing, and particularly relates to a method, device, system and medium for testing passive infrared detectors. Background Art
[0002] PIR (Passive infrared detectors) devices do not emit any energy themselves but only passively receive and detect infrared radiation from the environment. In actual use, when WiFi devices in the same environment are turned on, the functions of PIR devices will be affected to a certain extent.
[0003] In related technologies, hardware engineers and software engineers need to manually find the threshold at which the real-time transmission power of WiFi devices can significantly affect the functions of PIR devices to be tested. Manual testing is significantly less efficient.
[0004] Application Content
[0005] The main purpose of the present application is to provide a method, device, system and medium for testing passive infrared detectors, aiming to solve the technical problem of low efficiency of manual testing of PIR devices.
[0006] To achieve the above object, the present application provides a method for testing a passive infrared detector, including:
[0007] Obtaining current infrared radiation data collected by a passive infrared detector in a test environment; wherein, in the test environment, a WiFi device is running;
[0008] Determining a power adjustment strategy for the WiFi device according to the numerical magnitude relationship between the current infrared radiation data and a preset output threshold;
[0009] Adjusting the real-time transmission power of the WiFi device once according to the power adjustment strategy and a preset adjustment step amplitude, so that the current infrared radiation data approaches the preset output threshold, and returning to execute obtaining the current infrared radiation data collected by the passive infrared detector in the test environment until the numerical magnitude relationship between the current infrared radiation data and the preset output threshold changes, and obtaining the final transmission power of the WiFi device; wherein, the current infrared radiation data is positively correlated with the real-time transmission power;
[0010] Taking the final transmission power as the environmental safety threshold of the passive infrared detector.
[0011] In a possible embodiment of the present application, determining a power adjustment strategy for the WiFi device according to the numerical magnitude relationship between the current infrared radiation data and a preset output threshold includes:
[0012] Determine whether the current infrared radiation data is greater than a preset output threshold;
[0013] If the current infrared radiation data is greater than the preset output threshold, then determine whether the first infrared radiation data collected by the passive infrared detector is greater than the preset output threshold;
[0014] If the first infrared radiation data is greater than the preset output threshold, then determine that the power adjustment strategy is a power decreasing strategy;
[0015] If the first infrared radiation data is less than or equal to the preset output threshold, then determine that the numerical size relationship between the current infrared radiation data and the preset output threshold has changed.
[0016] In a possible embodiment of the present application, determining whether the first infrared radiation data collected by the passive infrared detector is greater than the preset output threshold includes:
[0017] Obtain the current reading of the power adjustment counter;
[0018] Determine whether the current reading is less than or equal to the initial reading;
[0019] If the current reading is less than or equal to the initial reading, then determine that the first infrared radiation data is greater than the preset output threshold;
[0020] Adjust the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude, including:
[0021] According to the power decreasing strategy, adjust the real-time transmission power of the WiFi device to decrease by a preset adjustment step amplitude;
[0022] Control the current reading of the power adjustment counter to decrease by a preset number of steps.
[0023] In a possible embodiment of the present application, after determining whether the current infrared radiation data is greater than the preset output threshold, the method further includes:
[0024] If the current infrared radiation data is less than or equal to the preset output threshold, then determine whether the first infrared radiation data collected by the passive infrared detector is less than or equal to the preset output threshold;
[0025] If the first infrared radiation data is less than or equal to the preset output threshold, then determine that the power adjustment strategy is a power increasing strategy;
[0026] If the first infrared radiation data is greater than the preset output threshold, then determine that the numerical size relationship between the current infrared radiation data and the preset output threshold has changed.
[0027] In a possible embodiment of the present application, determining whether the first infrared radiation data collected by the passive infrared detector is less than or equal to a preset output threshold includes:
[0028] Obtain the current reading of the power adjustment counter;
[0029] Determine whether the current reading is greater than the initial reading;
[0030] If the current reading is greater than the initial reading, determine that the first infrared radiation data is less than or equal to the preset output threshold;
[0031] Adjust the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude, including:
[0032] Adjust the real-time transmission power of the WiFi device to increase by a preset adjustment step amplitude according to the power increase strategy;
[0033] Control the current reading of the power adjustment counter to increase by a preset number of steps.
[0034] In a possible embodiment of the present application, after adjusting the real-time transmission power of the WiFi device to increase by a preset adjustment step amplitude according to the power increase strategy, the method further includes:
[0035] Obtain the adjusted real-time transmission power of the WiFi device;
[0036] Determine whether the adjusted real-time transmission power reaches the maximum transmission power;
[0037] If it reaches, use the maximum transmission power as the environmental safety threshold of the passive infrared detector;
[0038] If it does not reach, return to execute obtaining the current infrared radiation data collected by the passive infrared detector in the test environment.
[0039] In a possible embodiment of the present application, after using the final transmission power as the environmental safety threshold of the passive infrared detector, the method further includes:
[0040] Output the test log file.
[0041] In a second aspect, the present application further provides a passive infrared detector test device, and the device includes:
[0042] A data acquisition module, configured to acquire the current infrared radiation data collected by the passive infrared detector in the test environment; wherein, in the test environment, the WiFi device is running;
[0043] A strategy determination module, configured to determine the power adjustment strategy of the WiFi device according to the numerical size relationship between the current infrared radiation data and the preset output threshold;
[0044] A power adjustment module, configured to adjust the real-time transmission power of a WiFi device once according to a power adjustment strategy and a preset adjustment step amplitude, so that the current infrared radiation data approaches a preset output threshold, and return to the control data acquisition module to execute acquiring the current infrared radiation data collected by the passive infrared detector in the test environment until the numerical magnitude relationship between the current infrared radiation data and the preset output threshold changes. The control data acquisition module is configured to acquire the final transmission power of the WiFi device; wherein, the current infrared radiation data is positively correlated with the real-time transmission power.
[0045] A result determination module, configured to use the final transmission power as the environmental safety threshold of the passive infrared detector.
[0046] In a third aspect, the present application further provides a passive infrared detector test system, including:
[0047] A WiFi device, where the WiFi device and the passive infrared detector are placed in the same test environment; and
[0048] A control device, where the controller is respectively connected to the WiFi device and the passive infrared detector, configured to acquire the transmission power of the WiFi device and acquire the current infrared radiation data of the passive infrared detector. The control device includes a processor, a memory, and a passive infrared detector test program stored in the memory. When the passive infrared detector test program is run by the processor, the steps of the above passive infrared detector test method are implemented.
[0049] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a passive infrared detector test program is stored. When the passive infrared detector test program is executed by a processor, the above passive infrared detector test method is implemented.
[0050] A passive infrared detector test method proposed in an embodiment of the present application, based on the characteristic that the current infrared radiation data is positively correlated with the real-time transmission power, determines the power adjustment strategy of the WiFi device through the numerical magnitude relationship between the current infrared radiation data collected by the passive infrared detector and the preset output threshold, that is, determines whether the implementation transmission power of the WiFi device increases or decreases to make the current infrared radiation data approach the preset output threshold. Repeat the above adjustment steps until the numerical magnitude relationship between the current infrared radiation data and the preset output threshold changes. At this time, the final transmission power of the WiFi device is also the "critical value" for whether the passive infrared detector works normally, so as to automatically test and obtain the environmental safety threshold of the passive infrared detector.
[0051] It is not difficult to see that the passive infrared detector test method provided by the present application realizes automatic testing, thus saving a large amount of manpower and testing time and improving the testing efficiency. Brief Description of the Drawings
[0052] Figure 1 It is a schematic structural diagram of a passive infrared detector test system of the present application;
[0053] Figure 2 is Figure 1 a schematic structural diagram of the control device in;
[0054] Figure 3 It is a schematic diagram of the first embodiment of the passive infrared detector test method of the present application;
[0055] Figure 4 It is a schematic diagram of the second embodiment of the passive infrared detector test method of the present application;
[0056] Figure 5 is Figure 4 a detailed flowchart of step S220 in;
[0057] Figure 6 is Figure 4 a detailed flowchart of step S250 in;
[0058] Figure 7 It is a schematic diagram of the third embodiment of the passive infrared detector test method of the present application;
[0059] Figure 8 It is a module schematic diagram of the passive infrared detector test device of the present application.
[0060] The realization, functional features and advantages of the object of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0061] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] Below the embodiments of the present application, the passive infrared detector test system applied in the technical implementation of the present application will be described:
[0063] Referring to Figure 1 , Figure 1 is a schematic structural diagram of a passive infrared detector test system provided by an exemplary embodiment. As Figure 1 shown, the passive infrared detector test system may include a WiFi device 11 and a control device 12.
[0064] The WiFi device 11 may be any device with WiFi function, such as a TV with WiFi function, a mobile phone, a smart wearable device (such as a smart bracelet, etc.), an earphone, etc.
[0065] The WiFi device 11 and the PIR device 13 are placed in the same test environment. It can be understood that the specific settings of the test environment follow the corresponding test specifications. The WiFi device 11 and the PIR device 13 can be connected to a control device 12. Specifically, both the WiFi device 11 and the PIR device 13 can be connected to the control device 12 in a wired manner to avoid interference of wireless signals in the wireless transmission mode with the test results.
[0066] Specifically, referring to Figure 2 , Figure 2 is a schematic structural diagram of the control device 12 for the hardware operating environment involved in the solution of the embodiment of the present application.
[0067] As Figure 2 shown, the control device 12 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) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further 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 (WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0068] Those skilled in the art can understand that Figure 2 the structure shown in
[0069] does not constitute a limitation on the control device, and may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements. Figure 2 shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a passive infrared detector test program.
[0070] In Figure 2In the control device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the control device 12 of the present application can be arranged in the control device 12, and the control device 12 calls the passive infrared detector test program stored in the memory 1005 through the processor 1001 and executes the passive infrared detector test method provided by the embodiments of the present application.
[0071] In some embodiments, the control device 12 further has a display screen for displaying test data or a test log file.
[0072] Based on the above hardware structure but not limited to the above hardware structure, the present application provides a first embodiment of a passive infrared detector test method. Refer to Figure 3 , Figure 3 which shows a flowchart of the first embodiment of the passive infrared detector test method of the present application.
[0073] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here.
[0074] In this embodiment, the passive infrared detector test method includes:
[0075] Step S100: Obtain the current infrared radiation data collected by the passive infrared detector in the test environment; wherein, in the test environment, the WiFi device is running.
[0076] Specifically, the PIR device to be tested is placed in the test environment built according to the test specifications, and both the PIR device and the WiFi device are connected to the control device. Then, the tester can configure test parameters such as the initial transmission power of the WiFi device, the preset output threshold of the PIR device, the preset adjustment step amplitude, and the automatic test time in the control device. After completing the configuration of the test parameters, the tester can issue an automatic test start command to the control device. Then, the control device controls the WiFi device to turn on and start running at the initial transmission power. After the WiFi device runs for a period of time, or after the WiFi device runs stably, the PIR device can be controlled to start running.
[0077] After the PIR device starts running, the current infrared radiation data is collected. The current infrared radiation data collected for the first time is the infrared radiation data obtained when the WiFi device is running at the initial transmission frequency, and the subsequent current infrared radiation data is the infrared radiation data obtained when the WiFi device is running at the real-time transmission frequency.
[0078] Step S200: Determine the power adjustment strategy of the WiFi device according to the numerical size relationship between the current infrared radiation data and the preset output threshold.
[0079] Among them, the preset output threshold is approximately equal to the upper limit value of the infrared radiation value detected when the PIR device works normally. Therefore, when the current infrared radiation data is greater than the preset output threshold, it can be approximately considered that the PIR device is not working normally at this time.
[0080] The numerical size relationship between the current infrared radiation data and the preset output threshold includes at least two types: "the current infrared radiation data is greater than the preset output threshold" or "the current infrared radiation data is less than or equal to the preset output threshold".
[0081] The power adjustment strategy includes, but is not limited to, the power reduction strategy and the power increase strategy. Since the current infrared radiation data is positively correlated with the real-time transmission power, when the numerical size relationship is "the current infrared radiation data is greater than the preset output threshold", the control target at this time is to control the current infrared radiation data of the passive infrared detector to decrease, and the corresponding power adjustment strategy can be the power reduction strategy.
[0082] When the numerical size relationship is "the current infrared radiation data is less than or equal to the preset output threshold", the control target at this time is to control the current infrared radiation data of the passive infrared detector to increase, and the corresponding power adjustment strategy can be the power increase strategy.
[0083] It is worth mentioning that in an example, after the control device obtains the continuously monitored current infrared radiation data, it can generate a corresponding infrared radiation curve graph for multiple infrared radiation data according to the detection time and display the infrared radiation curve. Among them, the vertical coordinate axis of the infrared radiation curve graph has a preset output threshold horizontal line, and the numerical size relationship between the two can be judged by whether the infrared radiation curve exceeds the preset output threshold horizontal line.
[0084] Step S300: Adjust the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude, so that the current infrared radiation data approaches the preset output threshold, and return to execute step S100 until the numerical size relationship between the current infrared radiation data and the preset output threshold changes, and execute step S400: Obtain the final transmission power of the WiFi device.
[0085] Step S500: Take the final transmission power as the environmental safety threshold of the passive infrared detector.
[0086] The preset adjustment step amplitude is a relatively small value, and its value can be determined according to the accuracy of the finally obtained environmental safety threshold, that is, the test accuracy. For example, in one example, the preset adjustment step amplitude can be set to 0.5 db.
[0087] Specifically, during the test, in order to avoid doing useless work and quickly measure the finally required environmental safety threshold, the "stepping" method can be used to adjust the test environment parameters. That is, each time only a relatively small step amplitude is adjusted, and then how to adjust is determined again according to the change of the test result data. Therefore, in this embodiment, each time the real-time transmission power of the WiFi device is adjusted, only a preset adjustment step amplitude can be adjusted. For example, in one example, it can specifically be increased by 0.5 db or decreased by 0.5 db.
[0088] After the real-time transmission power of the WiFi device is adjusted, at this time, the influence of the real-time transmission power of the WiFi device on the PIR device also changes accordingly, resulting in a change in the currently collected infrared radiation data of the PIR device. Therefore, it is necessary to obtain new currently collected infrared radiation data again, that is, to continue to execute the above steps S100 to S300 until the numerical size relationship between the currently collected infrared radiation data and the preset output threshold changes, that is, the currently collected infrared radiation data undergoes a critical change.
[0089] Specifically, when the numerical size relationship before adjustment is "the currently collected infrared radiation data is greater than the preset output threshold", the control target at this time is to control the currently collected infrared radiation data of the passive infrared detector to decrease, and the corresponding power adjustment strategy can be a power reduction strategy. After at least one adjustment, for example, after at least one control to reduce the transmission power of the WiFi device by 0.5 db, the numerical size relationship between the currently collected infrared radiation data and the preset output threshold becomes "the currently collected infrared radiation data is less than or equal to the preset output threshold", so it is determined that: after at least one adjustment step, the PIR device is just adjusted from the abnormal working state to the normal working state. Therefore, it can be understood that the real-time transmission power of the WiFi device at this time, that is, the final transmission power, is also the "critical value" for whether the passive infrared detector works normally, so as to automatically test the environmental safety threshold of the passive infrared detector.
[0090] Alternatively, when the numerical size relationship before adjustment is "the current infrared radiation data is less than or equal to the preset output threshold", the control target at this time is to increase the current infrared radiation data of the passive infrared detector, and the corresponding power adjustment strategy can be the power increase strategy. After at least one adjustment, that is, after at least one time of controlling the transmission power of the WiFi device to increase by 0.5 dB, the numerical size relationship between the obtained current infrared radiation data and the preset output threshold becomes "the current infrared radiation data is greater than the preset output threshold", so it is determined that: after at least one adjustment step, the PIR device just adjusts from the normal working state to the abnormal working state. Therefore, it can be understood that the real-time transmission power of the WiFi device at this time, that is, the final transmission power, is also the "critical value" for determining whether the passive infrared detector works normally, so as to automatically test and obtain the environmental safety threshold of the passive infrared detector.
[0091] It can be seen that in this embodiment, based on the characteristic that the current infrared radiation data is positively correlated with the real-time transmission power, the power adjustment strategy of the WiFi device is determined by the numerical size relationship between the current infrared radiation data collected by the passive infrared detector and the preset output threshold, that is, it is determined whether the implementation transmission power of the WiFi device increases or decreases to make the current infrared radiation data approach the preset output threshold. Repeat the above adjustment steps until the numerical size relationship between the current infrared radiation data and the preset output threshold changes. At this time, the final transmission power of the WiFi device is also the "critical value" for determining whether the passive infrared detector works normally, so as to automatically test and obtain the environmental safety threshold of the passive infrared detector, thereby saving a large amount of manpower and test time and improving the test efficiency.
[0092] It can be understood that the environmental safety threshold means that when the transmission power of the WiFi device in the working environment of the PIR device does not exceed this environmental safety threshold, the PIR device can still work normally.
[0093] In addition, in this embodiment, by adjusting in a step-by-step manner, the test accuracy of the final test result can also be relatively high, so as to accurately test the influence of the transmission power of the WiFi device on the PIR device, and then accurately test and obtain the environmental safety threshold of the passive infrared detector.
[0094] Based on the above embodiment, the second embodiment of the automatic test method for the passive infrared detector of the present application is proposed. Refer to Figure 4 , Figure 4 which is the schematic flowchart of the second embodiment of the automatic test method of the present application.
[0095] In this embodiment, step S200 specifically includes:
[0096] Step S210, determine whether the current infrared radiation data is greater than the preset output threshold.
[0097] If the current infrared radiation data is greater than the preset output threshold, then step S220 is executed to determine whether the first infrared radiation data collected by the passive infrared detector is greater than the preset output threshold.
[0098] If the first infrared radiation data is greater than the preset output threshold, then step S230 is executed to determine that the power adjustment strategy is a power decreasing strategy.
[0099] If the first infrared radiation data is less than or equal to the preset output threshold, then step S240 is executed to determine that the numerical magnitude relationship between the current infrared radiation data and the preset output threshold has changed.
[0100] If the current infrared radiation data is less than or equal to the preset output threshold, then step S250 is executed to determine whether the first infrared radiation data collected by the passive infrared detector is less than or equal to the preset output threshold.
[0101] If the first infrared radiation data is less than or equal to the preset output threshold, then step 260 is executed to determine that the power adjustment strategy is a power increasing strategy.
[0102] If the first infrared radiation data is greater than the preset output threshold, then step S270 is executed to determine that the numerical magnitude relationship between the current infrared radiation data and the preset output threshold has changed.
[0103] Among them, the first infrared radiation data is the current radiation data first collected by the passive infrared detector after the start of the test, that is, the starting endpoint value of the aforementioned infrared radiation data curve. Each time the current infrared radiation data at the current detection moment is obtained, the control device needs to determine whether the numerical relationship between the current infrared radiation data and the preset output threshold has changed.
[0104] It can be understood that before the numerical magnitude relationship changes, the numerical magnitude relationship of the currently measured current infrared radiation data is the same as that of the first infrared radiation data. Therefore, specifically, to determine whether the numerical relationship between the current infrared radiation data and the preset output threshold has changed, it can be determined whether the two have changed according to the numerical magnitude relationship corresponding to the current infrared radiation data and the numerical magnitude relationship corresponding to the first infrared radiation data.
[0105] Thus, in this application, it is first determined whether the current infrared radiation data is greater than the preset output threshold. If it is greater than the preset output threshold, then it is determined whether the first infrared radiation data collected by the passive infrared detector is greater than the preset output threshold. If the first infrared radiation data is greater than the preset output threshold, then their numerical magnitude relationship is the same.
[0106] And according to the fact that the first infrared radiation data is greater than the preset output threshold, it can be determined that if it is desired to make the current infrared radiation data approach the preset output threshold, then the current infrared radiation data needs to be reduced. Moreover, since the infrared radiation data is positively correlated with the real-time transmission power of the WiFi device, the transmission power needs to be reduced. Therefore, the power adjustment strategy is determined to be a power decreasing strategy.
[0107] Of course, if the first infrared radiation data is less than or equal to the preset output threshold, it can be determined that the numerical size relationship between the current infrared radiation data and the preset output threshold has changed, that is, after the previous adjustment steps, the current infrared radiation data has been made to approach and cross the preset output threshold.
[0108] In addition, it can be understood that if the current infrared radiation data is the first infrared radiation data, then it only needs to be judged once again.
[0109] On the contrary, if the current infrared radiation data is less than or equal to the preset output threshold, it is judged whether the first infrared radiation data collected by the passive infrared detector is less than or equal to the preset output threshold. If the first infrared radiation data is less than or equal to the preset output threshold, then the numerical size relationship between the two is the same.
[0110] And according to the fact that the first infrared radiation data is less than or equal to the preset output threshold, it can be determined that if it is desired to make the current infrared radiation data approach the preset output threshold, then the current infrared radiation data needs to be increased. Moreover, since the infrared radiation data is positively correlated with the real-time transmission power of the WiFi device, the transmission power should be increased. Therefore, the power adjustment strategy is determined to be a power increasing strategy.
[0111] Thus, it can be seen that in this embodiment, the adjustment strategy of the power is accurately determined through the above method.
[0112] As an embodiment, please refer to Figure 5 , step S220 specifically includes:
[0113] Step S221, obtain the current reading of the power adjustment counter.
[0114] Step S222, judge whether the current reading is less than or equal to the initial reading.
[0115] If the current reading is less than or equal to the initial reading, then execute step S223, determine that the first infrared radiation data is greater than the preset output threshold.
[0116] At this time, step S300 specifically includes:
[0117] Step S310, according to the power decreasing strategy, adjust the real-time transmission power of the WiFi device to decrease by a preset adjustment step amplitude.
[0118] Step S320: Control the current reading of the power adjustment counter to decrease by a preset number of steps.
[0119] Specifically, in this embodiment, the control device is also configured with a counter for recording the number of power adjustments. In one example, the power adjustment counter can be a step counter.
[0120] Before starting the test, the power adjustment counter has an initial reading. Then, during each adjustment process, the power adjustment counter counts once. In one example, the initial reading is 0, and each time the power is adjusted, the power adjustment counter is incremented by 1 or decremented by 1. Of course, in some other examples, the initial reading can also be 10 or 100, etc., and this embodiment does not limit this.
[0121] It can be understood that in this embodiment, in order to accurately distinguish whether the power adjustment process in a power adjustment counter is an increasing process or a decreasing process, this embodiment defines that during the increasing process, the power adjustment counter performs an addition counting operation, and during the decreasing process, the power adjustment counter performs a subtraction counting operation. Of course, in some other embodiments, it can also be defined that during the increasing process, the power adjustment counter performs a subtraction counting operation, and during the decreasing process, the power adjustment counter performs an addition counting operation.
[0122] Thus, it can be determined whether the power adjustment counter is performing an addition count or a subtraction count according to whether the current reading of the power counter is less than the initial reading. When it is less than the initial reading, it can be determined that a subtraction count is being performed, and it can be determined that a power decreasing operation is being performed, thereby determining that the first infrared radiation data is greater than the preset output threshold.
[0123] At this time, adjust the real-time transmission power of the WiFi device to decrease by a preset adjustment step amplitude, such as reducing by 5 db. And control the current reading of the power adjustment counter to decrease by a preset number of steps, such as controlling the current reading - 1.
[0124] As another embodiment, please refer to Figure 6 , step S250 specifically includes:
[0125] Step S251: Obtain the current reading of the power adjustment counter;
[0126] Step S252: Determine whether the current reading is greater than the initial reading;
[0127] If the current reading is greater than the initial reading, then execute step S253: Determine that the first infrared radiation data is less than the preset output threshold;
[0128] At this time, step S300 specifically includes:
[0129] Step S330: According to the power increasing strategy, adjust the real-time transmission power of the WiFi device to increase by a preset adjustment step amplitude.
[0130] Step S340: Control the current reading of the power adjustment counter to increase by a preset number of steps.
[0131] Specifically, in this embodiment, it is possible to determine whether the power adjustment counter is performing an addition count or a subtraction count based on whether the current reading of the power counter is less than the initial reading. When it is greater than the initial reading, it can be determined that an addition count is being performed, and thus it can be determined that a power increasing operation is being carried out, and it is further determined that the first infrared radiation data is less than the preset output threshold.
[0132] At this time, adjust the real-time transmission power of the WiFi device to increase by a preset adjustment step amplitude, such as increasing by 5 dB. And control the current reading of the power adjustment counter to increase by a preset number of steps, such as controlling the current reading +1.
[0133] Of course, it can be understood that after the test is completed, the power adjustment counter can be reset to return to the initial reading, such as setting it to 0.
[0134] Based on the above embodiment, the third embodiment of the passive infrared detector test method of the present application is proposed. Refer to Figure 7 , Figure 7 which is the flowchart of the third embodiment of the passive infrared detector test method of the present application.
[0135] It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0136] In this embodiment, the method includes:
[0137] Step S100: Obtain the current infrared radiation data collected by the passive infrared detector in the test environment.
[0138] Among them, in the test environment, the WiFi device is running.
[0139] Step S200: Determine the power adjustment strategy of the WiFi device according to the numerical size relationship between the current infrared radiation data and the preset output threshold.
[0140] Step S330: According to the power increasing strategy, adjust the real-time transmission power of the WiFi device to increase by a preset adjustment step amplitude.
[0141] Step S600: Obtain the adjusted real-time transmission power of the WiFi device;
[0142] Step S700: Determine whether the adjusted real-time transmission power reaches the maximum transmission power;
[0143] If it is reached, execute step S800, and use the maximum transmission power as the environmental safety threshold of the passive infrared detector.
[0144] If it is not reached, return to execute step S100 to obtain the current infrared radiation data collected by the passive infrared detector in the test environment until the numerical size relationship between the current infrared radiation data and the preset output threshold changes, and then execute step S400 to obtain the final transmission power of the WiFi device; wherein, the current infrared radiation data is positively correlated with the real-time transmission power.
[0145] Step S500, use the final transmission power as the environmental safety threshold of the passive infrared detector.
[0146] Specifically, in this embodiment, during the power adjustment process, especially during the power increasing adjustment process, it is possible that after the power adjustment, the real-time transmission power of the WiFi device may reach the maximum transmission power of the WiFi device. Therefore, in each adjustment process, after the control device adjusts the real-time transmission power of the WiFi device, it immediately determines whether the adjusted real-time transmission power of the WiFi device reaches the maximum transmission power. If it reaches, stop the automatic test. Specifically, use the maximum transmission power as the environmental safety threshold of the passive infrared detector.
[0147] If it is not reached, continue to execute the subsequent automatic test steps.
[0148] In this embodiment, through the test process of determining whether the adjusted real-time transmission power reaches the maximum transmission power, the automatic test method of this embodiment is more perfect.
[0149] As an embodiment, after step S500, the method further includes
[0150] Step S900, output the test log file.
[0151] Specifically, the test log file includes but is not limited to the environmental safety threshold, the final reading of the power adjustment counter, the start time of the test, the end time of the test, the finally obtained infrared radiation data curve, the time of each power adjustment, the number of power adjustments, the power adjustment curve, etc.
[0152] In this embodiment, the test log file can be automatically generated to facilitate the tester to verify the test results.
[0153] Based on the same inventive concept, refer to Figure 8 , this application also provides a passive infrared detector test device, and the device includes:
[0154] A data acquisition module, configured to acquire the current infrared radiation data collected by a passive infrared detector in a test environment; wherein, in the test environment, a WiFi device is operating.
[0155] A policy determination module, configured to determine a power adjustment policy for the WiFi device according to the numerical magnitude relationship between the current infrared radiation data and a preset output threshold.
[0156] A power adjustment module, configured to adjust the real-time transmission power of the WiFi device once according to the power adjustment policy and a preset adjustment step amplitude, so that the current infrared radiation data approaches the preset output threshold; wherein, the current infrared radiation data is positively correlated with the real-time transmission power, and return to control the data acquisition module to execute acquiring the current infrared radiation data collected by the passive infrared detector in the test environment until the numerical magnitude relationship between the current infrared radiation data and the preset output threshold changes, and the control data acquisition module is configured to acquire the final transmission power of the WiFi device.
[0157] A result determination module, configured to use the final transmission power as the environmental safety threshold of the passive infrared detector.
[0158] It should be noted that the various embodiments of the network attack traceability device in this embodiment and the technical effects achieved thereby can refer to the various embodiments of the network attack traceability method in the foregoing embodiments, and will not be elaborated here.
[0159] In addition, an embodiment of the present application also proposes a computer storage medium, on which a passive infrared detector test program is stored. When the passive infrared detector test program is executed by a processor, the steps of the passive infrared detector test method as described above are implemented. Therefore, it will not be elaborated here. In addition, the description of the beneficial effects of using the same method will not be elaborated either. For the technical details not disclosed in the embodiment of the computer-readable storage medium involved in the present application, please refer to the description of the method embodiment of the present application. By way of example, the program instructions can be deployed to be executed on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected through a communication network.
[0160] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The above program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the above storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.
[0161] In addition, it should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in this application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement this without creative efforts.
[0162] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware, including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, in more cases, software program implementation is a better implementation method for this application. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disc of a computer, and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various embodiments of this application.
[0163] The above are only the preferred embodiments of this application, and do not limit the patent scope of this application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of this application.
Claims
1. A method for testing a passive infrared detector, characterized in that, Including: Obtain the current infrared radiation data collected by the passive infrared detector in the test environment; wherein, in the test environment, the WiFi device is operating; Determine the power adjustment strategy of the WiFi device according to the numerical magnitude relationship between the current infrared radiation data and the preset output threshold; Adjust the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude, so that the current infrared radiation data approaches the preset output threshold, and return to execute obtaining the current infrared radiation data collected by the passive infrared detector in the test environment until the numerical magnitude relationship between the current infrared radiation data and the preset output threshold changes, and obtain the final transmission power of the WiFi device; wherein, the current infrared radiation data is positively correlated with the real-time transmission power; Use the final transmission power as the environmental safety threshold of the passive infrared detector.
2. The passive infrared detector testing method according to claim 1, wherein The determining the power adjustment strategy of the WiFi device according to the numerical magnitude relationship between the current infrared radiation data and the preset output threshold includes: Judge whether the current infrared radiation data is greater than the preset output threshold; If the current infrared radiation data is greater than the preset output threshold, then judge whether the first infrared radiation data collected by the passive infrared detector is greater than the preset output threshold; If the first infrared radiation data is greater than the preset output threshold, then determine the power adjustment strategy as a power decreasing strategy; If the first infrared radiation data is less than or equal to the preset output threshold, then determine that the numerical magnitude relationship between the current infrared radiation data and the preset output threshold has changed.
3. The passive infrared detector testing method according to claim 2, characterized in that, The judging whether the first infrared radiation data collected by the passive infrared detector is greater than the preset output threshold includes: Obtain the current reading of the power adjustment counter; Judge whether the current reading is less than or equal to the initial reading; If the current reading is less than or equal to the initial reading, then determine that the first infrared radiation data is greater than the preset output threshold; The adjusting the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude includes: Adjust the real-time transmission power of the WiFi device to decrease by one preset adjustment step amplitude according to the power decreasing strategy; Control the current reading of the power adjustment counter to decrease by a preset number of steps.
4. The passive infrared detector testing method according to claim 2, characterized in that, After the judging whether the current infrared radiation data is greater than the preset output threshold, the method further includes: If the current infrared radiation data is less than or equal to the preset output threshold, then judge whether the first infrared radiation data collected by the passive infrared detector is less than or equal to the preset output threshold; If the first infrared radiation data is less than or equal to the preset output threshold, then determine the power adjustment strategy as a power increasing strategy; If the first infrared radiation data is greater than the preset output threshold, then determine that the numerical magnitude relationship between the current infrared radiation data and the preset output threshold has changed.
5. The passive infrared detector testing method according to claim 4, wherein Determining whether the first infrared radiation data collected by the passive infrared detector is less than or equal to the preset output threshold includes: Obtaining the current reading of the power adjustment counter; Determining whether the current reading is greater than the initial reading; If the current reading is greater than the initial reading, determining that the first infrared radiation data is less than or equal to the preset output threshold; Adjusting the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude includes: Adjusting the real-time transmission power of the WiFi device to increase by one preset adjustment step amplitude according to the power increase strategy; Controlling the current reading of the power adjustment counter to increase by a preset number of steps.
6. The passive infrared detector testing method according to claim 5, characterized in that After adjusting the real-time transmission power of the WiFi device to increase by one preset adjustment step amplitude according to the power increase strategy, the method further includes: Obtaining the adjusted real-time transmission power of the WiFi device; Determining whether the adjusted real-time transmission power reaches the maximum transmission power; If it reaches, using the maximum transmission power as the environmental safety threshold of the passive infrared detector; If it does not reach, returning to execute obtaining the current infrared radiation data collected by the passive infrared detector in the test environment.
7. The method for testing a passive infrared detector according to any one of claims 1 to 6, characterized in that, After using the final transmission power as the environmental safety threshold of the passive infrared detector, the method further includes: Outputting a test log file.
8. A passive infrared detector testing device, characterized in that, The device includes: A data acquisition module, configured to acquire the current infrared radiation data collected by the passive infrared detector in the test environment; wherein, in the test environment, the WiFi device is running; A strategy determination module, configured to determine the power adjustment strategy of the WiFi device according to the numerical size relationship between the current infrared radiation data and the preset output threshold; A power adjustment module, configured to adjust the real-time transmission power of the WiFi device once according to the power adjustment strategy and the preset adjustment step amplitude, so that the current infrared radiation data approaches the preset output threshold, and return to control the data acquisition module to execute acquiring the current infrared radiation data collected by the passive infrared detector in the test environment until the numerical size relationship between the current infrared radiation data and the preset output threshold changes, and control the data acquisition module to acquire the final transmission power of the WiFi device; wherein, the current infrared radiation data is positively correlated with the real-time transmission power; A result determination module, configured to use the final transmission power as the environmental safety threshold of the passive infrared detector.
9. A passive infrared detector test system, characterized in that, Including: A WiFi device, where the WiFi device and the passive infrared detector are placed in the same test environment; And A control device, wherein the controller is respectively connected to the WiFi device and the passive infrared detector, and is configured to obtain the transmission power of the WiFi device and the current infrared radiation data of the passive infrared detector. The control device includes a processor, a memory, and a passive infrared detector test program stored in the memory. When the passive infrared detector test program is run by the processor, the steps of the passive infrared detector test method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, characterized in that, A passive infrared detector test program is stored on the computer-readable storage medium. When the passive infrared detector test program is executed by a processor, the passive infrared detector test method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Lamp control method, device and equipment and storage medium
CN111542157A
Infrared temperature measurement method, device and equipment and computer readable storage medium
CN111721425A