Equipment state acquisition method and device, equipment, storage medium and program product
By integrating the low-level time when different input terminals are turned on and the current output terminals, the problem of zero-crossing detection technology in the prior art is solved, and the accuracy and control accuracy of the equipment control state are improved.
Patent Information
- Application Number
- CN202411750910.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
Smart Images

Figure CN119620630A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of device detection, and in particular, to a method, apparatus, device, storage medium, and program product for acquiring device status. Background Art
[0002] In order to meet the scenario of controlling the same controlled device from different locations, double-control switches came into being; double-control switches allow users to control the same controlled device such as lights and appliances from two different locations. The control device can be implemented as a traditional mechanical switch or an intelligent switch. The intelligent switch has rich functions such as software remote control and timing, which can provide greater convenience to the user.
[0003] In the related art, mechanical switches are simple physical contact switches that connect or disconnect circuits through physical actions. Therefore, the process of controlling a controlled device based on a mechanical switch does not involve the control state of the controlled device. When controlling a controlled device, an intelligent switch usually uses zero-crossing detection technology to infer the control state of the controlled device, such as performing a switch action when the AC voltage waveform passes through the zero voltage point, thereby adjusting the control state.
[0004] However, if the control state is directly judged by the results obtained by the general zero-crossing detection technology analysis, misjudgment problems may occur. For example, the control state is judged to be closed based on the analysis results, but the actual controlled device is in the open state, which may make it difficult to effectively control the controlled device and affect the control accuracy of the device. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for obtaining device status, which can more comprehensively and comprehensively grasp the on-off information of the controlled device by integrating the low-level duration of different input terminals and current output terminals when they are turned on, thereby facilitating obtaining a more accurate device control status and improving the control accuracy of the first control device over the controlled device. The technical solution is as follows.
[0006] In one aspect, a method for acquiring device status is provided, the method comprising:
[0007] receiving a device calibration operation, the device calibration operation being used to calibrate a device state of a first control device, the first control device being used to control a controlled device, the first control device comprising a first input terminal, a second input terminal, and a first current output terminal, the first current output terminal being connected to the controlled device;
[0008] In response to the device calibration operation, the first input terminal is controlled to be connected with the first current output terminal, and a first low-level duration is obtained; wherein the low-level duration is used to characterize the low-level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit;
[0009] Controlling the second input terminal to be connected to the first current output terminal to obtain a second low level duration;
[0010] Based on the first low-level duration and the second low-level duration, a device control state of the first control device on the controlled device is determined, and the device control state is used to characterize the influence result of the first control device on the controlled device.
[0011] On the other hand, a device state acquisition apparatus is provided, the apparatus comprising:
[0012] a receiving module, configured to receive a device calibration operation, wherein the device calibration operation is used to calibrate a device state of a first control device, wherein the first control device is used to control a controlled device, wherein the first control device comprises a first input terminal, a second input terminal, and a first current output terminal, wherein the first current output terminal is connected to the controlled device;
[0013] A control module, configured to control the first input terminal to be connected to the first current output terminal in response to the device calibration operation, and obtain a first low-level duration; wherein the low-level duration is used to characterize the low-level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit;
[0014] The control module is further used to control the second input terminal to be connected with the first current output terminal to obtain a second low level duration;
[0015] A determination module is used to determine a device control state of the first control device on the controlled device based on the first low-level duration and the second low-level duration, wherein the device control state is used to characterize the influence result of the first control device on the controlled device.
[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a device status acquisition method as described in any of the above-mentioned embodiments of the present application.
[0017] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a device status acquisition method as described in any of the above-mentioned embodiments of the present application.
[0018] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the device status acquisition method described in any of the above embodiments.
[0019] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0020] In the case of calibrating the first control device based on the device calibration operation, the first input terminal and the second input terminal of the first control device are controlled to be connected to the first current output terminal respectively, so as to obtain the first low level duration and the second low level duration, and then the device control state of the controlled device by the first control device is determined by combining the two low level durations. Among them, when the control state of the controlled device by the first control device is inferred by the zero-crossing detection circuit, it is not simply based on the analysis result of the zero-crossing detection circuit on the on-off condition of the alternating current, but the device control state is analyzed by the low level duration of the zero-crossing signal. The low level duration can reflect the on-off of the alternating current while showing richer voltage and current detail information. The low level duration under the conduction of different input terminals and current output terminals can be combined to more fully and comprehensively grasp the on-off information of the controlled device, thereby helping to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a structural block diagram of an acquisition system provided by an exemplary embodiment of the present application;
[0023] Figure 2 is a flow chart of a method for obtaining device status provided by an exemplary embodiment of the present application;
[0024] Figure 3 is a flow chart of a method for acquiring device status provided by another exemplary embodiment of the present application;
[0025] Figure 4 is a flowchart of a method for acquiring device status provided by another exemplary embodiment of the present application;
[0026] Figure 5 is a flow chart of a method for acquiring device status provided by another exemplary embodiment of the present application;
[0027] Figure 6 is a wiring diagram of a double-control switch provided by an exemplary embodiment of the present application;
[0028] Figure 7 is a schematic circuit diagram of a zero-crossing detection circuit provided by an exemplary embodiment of the present application;
[0029] Figure 8 It is a schematic diagram of zero-crossing signals in a normal lamp in an exemplary embodiment of the present application when the lamp is turned on and the lamp is turned off without an induced voltage;
[0030] Fig. 9 It is a schematic diagram of a zero-crossing signal when an ordinary lamp has an induced voltage or a high-voltage lamp has a low induced voltage, and when the lamp is turned on and the lamp is turned off, provided by an exemplary embodiment of the present application;
[0031] Fig.10 It is a schematic diagram of a zero-crossing signal when a high-voltage lamp is turned on and off in the presence of a high induced voltage provided by an exemplary embodiment of the present application;
[0032] Fig.11 is an overall flow chart of a switch state detection and self-calibration method provided by an exemplary embodiment of the present application;
[0033] Fig.12 is a structural block diagram of a device state acquisition apparatus provided by an exemplary embodiment of the present application;
[0034] Fig.13 It is a structural block diagram of a terminal provided by another exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0036] First, a brief introduction is given to the terms involved in the embodiments of the present application.
[0037] Two-way Switch: Usually refers to two independent switches that can control the same electrical appliance (such as a lamp). It is particularly suitable for scenarios where device control operations (such as device switch operations) need to be implemented from two different locations. For example, two-way switches are installed at both ends of a long corridor, so that users can turn on or off the appliance from either end without having to walk back to the original position repeatedly. A two-way switch includes two contacts, normally open (NO) and normally closed (NC), which is a pair.
[0038] Zero-crossing detection circuit: It is a circuit used to detect when an alternating current (AC) signal passes through zero point (i.e. the moment when the voltage is zero). The principle is to detect the waveform of the alternating current and identify the moment when the voltage waveform transitions from the positive half cycle to the negative half cycle (or from the negative half cycle to the positive half cycle). This moment is the moment when the voltage passes through zero point. When the voltage approaches zero point, the zero-crossing detection circuit generates a trigger signal, which is used to trigger the switching element to switch at the voltage zero point, thereby accurately controlling the timing of the device switching.
[0039] Zero-crossing signal: It is a square wave signal generated when the voltage waveform of the alternating current passes through the zero voltage point. The waveform of the current in the AC power supply changes periodically. Whenever the current changes from positive to negative, or from negative to positive, it will cross the zero voltage point (i.e., zero crossing point). The zero crossing point is the critical moment of current change. Many power control systems (such as dimmers, smart switches, etc.) use the zero crossing point to perform control operations.
[0040] Induced voltage: It is the voltage generated by electromagnetic induction. When the power transmission lines and electrical equipment are working, the current is constantly changing, which will generate a changing magnetic field around them. When the changing magnetic field encounters the conductor, it will induce an electric potential. This process of generating electromotive force is called electromagnetic induction. The voltage generated by electromagnetic induction and electrostatic induction on the conductor near the power lines and electrical equipment is called induced voltage.
[0041] In the related art, the mechanical switch is a simple physical contact switch, and its principle is to connect or disconnect the circuit through physical action. Therefore, the process of controlling the controlled device based on the mechanical switch does not involve the control state of the controlled device. When controlling the controlled device, the intelligent switch usually uses zero-crossing detection technology to infer the control state of the controlled device, such as performing a switching action when the AC voltage waveform passes through the zero voltage point, thereby adjusting the control state. However, if the control state is directly judged by the results obtained by the general zero-crossing detection technology analysis, there is a risk of misjudgment. For example, based on the analysis results, the control state is judged to be closed, but the actual controlled device is in the open state, which makes it easy to fail to effectively control the controlled device, affecting the control accuracy of the device.
[0042] In the embodiment of the present application, a device status acquisition method is introduced. By integrating the low-level duration of different input terminals and current output terminals when they are turned on, the on-off information of the controlled device can be more abundant and comprehensive, thereby helping to obtain a more accurate device control state and improve the control accuracy of the first control device over the controlled device. The device status acquisition method proposed in the embodiment of the present application can be applied to a variety of device control scenarios such as home lighting scenarios, home device control scenarios, and industrial device control scenarios, which are not limited here.
[0043] It should be noted that before collecting relevant data of users and during the process of collecting relevant data of users, this application can display a prompt interface, pop-up window or output voice prompt information, and the prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining relevant data of users after obtaining the confirmation operation issued by the user to the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the user to the prompt interface or pop-up window is not obtained), the relevant steps of obtaining relevant data of users are terminated, that is, the relevant data of users are not obtained. In other words, all user data collected by this application are collected with the consent and authorization of the user, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant regions.
[0044] The acquisition system involved in the embodiment of the present application is described. The device status acquisition method provided in the embodiment of the present application can be implemented by the first control device alone, or can be implemented by the first control device and the server through data interaction. The embodiment of the present application does not limit this. Optionally, the first control device executing the device status acquisition method is used as an example for description.
[0045] For illustration, please refer to Figure 1 , the acquisition system involves a first control device 110 and a controlled device 130, the first control device 110 is used to control the controlled device 130; optionally, the acquisition system includes the first control device 110, the second control device 120 and the controlled device 130, the first control device 110 and the second control device 120 are two control devices used to independently control the controlled device 130. For example: the first control device 110 is an intelligent switch, the controlled device 130 is a light bulb, and the second control device 120 is another mechanical switch that controls the light bulb.
[0046] In some embodiments, the first control device 110 receives a device calibration operation.
[0047] The device calibration operation is used to calibrate the device state of the first control device. The first control device 110 is used to control the controlled device 130. The first control device 110 includes a first input terminal, a second input terminal and a first current output terminal, and the first current output terminal is connected to the controlled device.
[0048] Illustratively, the first input terminal and the second input terminal are two optional input terminals in the first control device 110 for receiving current input, such as selecting the first input terminal to receive current; or selecting the second input terminal to receive current, etc.
[0049] In some embodiments, in response to a device calibration operation, the first input terminal and the first current output terminal are controlled to be connected to obtain a first low level duration.
[0050] The low level duration is used to characterize the low level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit. In schematic form, the first low level duration represents the low level duration of the zero-crossing signal detected by the zero-crossing detection circuit when the first input terminal and the first current output terminal are turned on.
[0051] In some embodiments, the second input terminal is controlled to be conductive with the first current output terminal to obtain a second low level duration.
[0052] In an illustrative manner, the second low level duration represents the duration of the low level in the zero-crossing signal detected by the zero-crossing detection circuit when the second input terminal is connected to the first current output terminal. Optionally, after obtaining the first low level duration, the first input terminal and the first current output terminal are disconnected, and the second input terminal and the first current output terminal are connected, thereby obtaining the second low level duration.
[0053] In some embodiments, the device control state of the controlled device by the first controlling device is determined based on the first low level duration and the second low level duration.
[0054] Optionally, the first low-level duration and the second low-level duration are used as low-level durations determined by the first control device during the device calibration phase. The first low-level duration and the second low-level duration are combined to determine a measured calibration threshold; thereby, the calibration threshold is used to analyze the device control state of the first control device on the controlled device, and the device control state is used to characterize the impact of the first control device on the controlled device.
[0055] Illustratively, the device control state indicates that the controlled device controlled by the first control device is in an off state; or, the device control state indicates that the controlled device controlled by the first control device is in an on state, etc., which is not limited here.
[0056] It is worth noting that the above-mentioned first control device and the second control device can be implemented as terminals such as smart switches and smart remote controls, and the above-mentioned controlled devices can be implemented as terminals such as smart bulbs and smart speakers or smart home appliances, etc.; terminals include but are not limited to mobile terminals such as mobile phones, tablet computers, portable laptop computers, intelligent voice interaction devices, smart home appliances, car terminals, etc., and can also be implemented as desktop computers, etc.; the above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of at least two physical servers, or a cloud server.
[0057] In combination with the above-mentioned noun introduction and application scenarios, the device status acquisition method provided by the present application is described, and the method is applied to the first control device as an example. Figure 2 As shown, the method includes the following steps 210 to 240.
[0058] Step 210: Receive a device calibration operation.
[0059] The first control device is used to control the controlled device.
[0060] Illustratively, the first control device is a device used to control the operating state of the controlled device, and the operating state includes at least one of multiple dimensions such as operation on state, operation off state, operation sleep state, operation intensity state, and operation energy efficiency state; the controlled device is a device controlled by the first control device and used to display the operating state.
[0061] Optionally, the first control device is a switch device for controlling the controlled device to turn on and off; and / or, the first control device is a rotary button for controlling the display brightness of the controlled device; and / or, the first control device is a sensor device for controlling the energy efficiency state of the controlled device, etc. Optionally, the controlled device is at least one of a light bulb, a fan, an air conditioner, and the like.
[0062] For example, the first control device is a smart switch, and the controlled device is a light bulb. The smart switch is connected to the light bulb to form a circuit. By controlling the on or off of the smart switch, the light bulb can be adjusted to be in the on state or the off state.
[0063] The device calibration operation is used to calibrate the device state of the first control device.
[0064] Illustratively, the device calibration operation is an operation performed on the first control device in order to ensure that the first control device can accurately and reliably control the controlled device.
[0065] Optionally, the first control device includes a calibration control, and a trigger operation on the calibration control is used as a device calibration operation; based on the device control operation, the first control device is automatically triggered to perform a calibration process to analyze and adjust the control of the controlled device by the first control device.
[0066] The first control device includes a first input terminal, a second input terminal and a first current output terminal, and the first current output terminal is connected to the controlled device.
[0067] Schematically, the first input terminal and the second input terminal are two optional input terminals of the first control device for receiving current input, such as selecting to input current from the first input terminal; or selecting to input current from the second input terminal, etc.; the first current output terminal is connected to the controlled device controlled by the first control device.
[0068] Among them, in order to ensure the safety of the equipment circuit, the controlled equipment is usually connected to the neutral wire (Neutralwire, N). The neutral wire is a key part in the power system and is usually grounded to the ground to ensure the safe operation of electrical equipment. In the AC system, the neutral wire is usually the reference point of the voltage. Relative to the live wire (Live wire, L), the potential of the neutral wire is zero, so it can provide a safe voltage return path to prevent equipment or users from being harmed by high voltage.
[0069] Step 220: In response to the device calibration operation, the first input terminal and the first current output terminal are controlled to be connected to obtain a first low level duration.
[0070] Illustratively, the device calibration operation is used to trigger the first control device to calibrate the control status of the operating state of the controlled device; if the first control device receives the device calibration operation, it enters the device calibration process.
[0071] Optionally, the first control device includes, in addition to the first input terminal, the second input terminal and the first current output terminal, a plurality of device components, and different device components are used to implement different component functions. Schematically, the plurality of device components generally include a micro control component and a relay.
[0072] Among them, the micro-control component can also be called a micro-processor, which is used to receive input signals (such as trigger signals and voice signals received through mobile phone applications, voice programs, etc.) and control the state of the first control device. The micro-processing component is usually also responsible for processing the communication between the first control device and other smart devices.
[0073] Among them, the relay is a component controlled by current or voltage, which is used to realize electrical control of the first control device; the micro control component can achieve the control purpose of the first control device by controlling the working state of the relay; the relay can be mechanical or solid (such as a solid-state relay).
[0074] Illustratively, after the first control device receives the device calibration operation, the micro-control component is automatically triggered to control the first control device to enter the device calibration process based on the device calibration operation.
[0075] In some embodiments, after the micro-control component controls the first control device to enter the device calibration phase, the micro-control component controls the input terminal connected to the first current output terminal, so as to obtain the first low level duration when the first input terminal is connected to the first current output terminal.
[0076] In some embodiments, after controlling the first control device to enter the device calibration phase, the input terminal connected to the first current output terminal is controlled by controlling the power supply status of the relay coil in the relay, so as to obtain the first low level duration when the first input terminal is connected to the first current output terminal.
[0077] Schematically, the relay is composed of multiple contacts and a relay coil, the multiple contacts include common contacts, normally open contacts and normally closed contacts; the relay coil adjusts the connection status of the contacts through electromagnetic induction based on the power-on status, thereby adjusting the input terminal that is connected to the first current output terminal.
[0078] The low level duration is used to represent the low level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit.
[0079] Among them, the zero-crossing signal is a signal generated when an AC voltage or current signal passes through the zero voltage point; when the voltage of the AC signal changes from a positive value to a negative value, or from a negative value to a positive value, the zero-crossing signal passes through the zero point (that is, the moment when the voltage is zero). This zero-crossing phenomenon is usually used to synchronize or trigger the action of the control circuit; the zero-crossing signal is essentially a pulse signal corresponding to the zero crossing point of the AC signal, so the zero-crossing signal is graphically displayed as a square wave or pulse signal, which changes synchronously with the zero crossing point of the AC waveform.
[0080] Since the zero-crossing signal appears as a square wave signal, the zero-crossing signal is usually composed of at least one level of a high voltage segment and a low voltage segment. Due to the manifestation of the zero-crossing signal, the low-level duration can be determined based on the zero crossing. The low-level duration is used to characterize the duration of the low level of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit, that is, it represents the duration of the low-level segment.
[0081] Illustratively, when the first input terminal and the first current output terminal are conductive, the zero-crossing detection circuit generates a first zero-crossing signal when detecting the first control device, and the first low-level duration represents the duration of the low level in the first zero-crossing signal.
[0082] In some embodiments, the first zero-crossing signal is a signal generated within a first duration, and the first low-level duration represents a duration of a low level within the first duration.
[0083] Optionally, the first duration is a detection cycle, such as the first zero-crossing signal is a signal generated within a detection cycle, and the first low-level duration represents a duration of a low level within a detection cycle.
[0084] Among them, the detection cycle is usually a preset duration determined by voltage and frequency. For example: since the standard voltage for domestic households is 220V±10% and the frequency is 50Hz, the detection cycle of a zero-crossing signal is fixed at 20ms; then the first low-level duration is analyzed to represent the low-level duration of a complete first zero-crossing signal collected within 20ms.
[0085] Optionally, the first time duration is a pre-set time duration that is greater than the detection period, such as 5s, 3s, etc.; zero-crossing signals corresponding to multiple detection periods are collected within the first time duration as the first zero-crossing signal within the first time duration, and the low-level duration is analyzed from the first zero-crossing signal, that is, the sum of the low-level durations corresponding to the zero-crossing signals collected in each detection period is obtained to obtain the first low-level duration corresponding to the first time duration.
[0086] Step 230, controlling the second input terminal to be connected to the first current output terminal to obtain a second low level duration.
[0087] In some embodiments, after the first input terminal is controlled to be conductive with the first current output terminal and the first low level duration is obtained, the second input terminal is controlled to be conductive with the first current output terminal to obtain the second low level duration.
[0088] Optionally, the first input terminal and the second input terminal are different input terminals, the first input terminal is any one of the two input terminals, and the second input terminal is another input terminal other than the first input terminal.
[0089] In some embodiments, after the micro-control component controls the first control device to collect and obtain the first low-level duration, the micro-control component controls the input terminal connected to the first current output terminal so that the second input terminal is connected to the first current output terminal to obtain the second low-level duration.
[0090] In some embodiments, after controlling the first control device to enter the device calibration phase, the input terminal connected to the first current output terminal is controlled by controlling the power supply status of the relay coil in the relay, so as to obtain the second low level duration when the second input terminal is connected to the first current output terminal.
[0091] Illustratively, the relay coil adjusts the connection state of the contacts through electromagnetic induction based on the power-on state, such as adopting a power-on state different from the above-mentioned first input terminal and first current output terminal conduction, so that the first current output terminal is connected to the second input terminal.
[0092] Illustratively, when the second input terminal is conductively connected to the first current output terminal, the zero-crossing detection circuit generates a second zero-crossing signal when detecting the first control device, and the second low-level duration represents the duration of the low level in the second zero-crossing signal.
[0093] In some embodiments, the second zero-crossing signal is a signal generated within a second time period, and the second low-level time period represents a low-level duration within the second time period.
[0094] The second duration and the first duration are usually the same, but may also be different, which is not limited here.
[0095] Optionally, the second duration is a detection cycle, such as the second zero-crossing signal is a signal generated within a detection cycle, and the second low-level duration represents a duration of a low level within a detection cycle.
[0096] Optionally, the second time duration is a pre-set time duration that is greater than the detection period, such as 5s, 3s, etc.; zero-crossing signals corresponding to multiple detection periods are collected within the second time duration as the second zero-crossing signal within the second time duration, and the low-level duration is analyzed from the second zero-crossing signal, that is, the sum of the low-level durations corresponding to the zero-crossing signals collected in each detection period is obtained to obtain the second low-level duration corresponding to the second time duration.
[0097] Step 240: Determine the device control state of the controlled device by the first control device based on the first low level duration and the second low level duration.
[0098] Optionally, based on the pre-setting of the device circuit, different input terminals are connected to the first current output terminal, which has different effects on the controlled device. Optionally, when the first input terminal is connected to the first current output terminal, the controlled device is in a first operating state (such as an on state); when the second input terminal is connected to the first current output terminal, the controlled device is in a second operating state (such as an off state).
[0099] Based on the above situation, the first low-level duration represents the duration of the low level of the controlled device in the first operating state, and the second low-level duration represents the duration of the low level of the controlled device in the second operating state; after obtaining the first low-level duration and the second low-level duration, the duration difference between the first low-level duration and the second low-level duration is obtained. If the duration difference is greater than the preset threshold, it is determined that the device control state of the controlled device by the first control device can be correctly evaluated based on the low-level duration, and therefore the device control state is obtained based on the low-level duration collected in the future time period.
[0100] In some embodiments, the first low-level duration and the second low-level duration obtained during the device calibration process are integrated to obtain a calibration threshold of the device calibration stage, so as to measure the low-level duration collected when the first control device controls the controlled device in the future time period with the calibration threshold to evaluate the device control status of the controlled device by the first control device.
[0101] The device control state is used to characterize the effect of the first control device on the controlled device.
[0102] Illustratively, the device control state indicates that the first control device is used to control the switch state of the controlled device, such as the device control state indicates that the first control device is used to control the controlled device in an on state, or the device control state indicates that the first control device is used to control the controlled device in an off state; or, the device control state indicates that the first control device is used to control the intensity state of the controlled device, such as the device control state indicates that the first control device is used to control the controlled device in a high-brightness state, or the device control state indicates that the first control device is used to control the controlled device in a low-brightness state, etc. The device control state here is used to characterize the control effect of the control device on the controlled device, and is not limited here.
[0103] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0104] To sum up, when inferring the control state of the controlled device by the first control device through the zero-crossing detection circuit, it is not simply relying on the analysis result of the zero-crossing detection circuit on the on-off condition of the AC power, but analyzing the device control state through the low-level duration of the zero-crossing signal. The low-level duration can reflect the on-off of the AC power while showing richer voltage and current detail information. Combining the low-level duration under the conduction of different input terminals and current output terminals, the on-off information of the controlled device can be more abundant and comprehensive, which helps to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device.
[0105] In an optional embodiment, a calibration threshold determined by the first control device during the device calibration process is obtained based on the first low-level duration and the second low-level duration, so as to analyze the device control state of the first control device over the controlled device in the future time period based on the calibration threshold. Figure 3 As shown above Figure 2 The illustrated embodiment may also be implemented as steps 310 to 350 as follows; wherein step 240 may also be implemented as steps 340 to 350 as follows.
[0106] Step 310, receiving a device calibration operation.
[0107] Illustratively, the first control device is a device for controlling the operating state of the controlled device, and the operating state includes at least one of multiple dimensions such as an operating on state, an operating off state, an operating dormant state, an operating intensity state, and an operating energy efficiency state.
[0108] The device calibration operation is used to calibrate the device state of a first control device, the first control device includes a first input terminal, a second input terminal and a first current output terminal, and the first current output terminal is connected to the controlled device.
[0109] Step 320: In response to the device calibration operation, the first input terminal and the first current output terminal are controlled to be connected to obtain a first low level duration.
[0110] In some embodiments, after the micro-control component controls the first control device to enter the device calibration phase, the micro-control component controls the input terminal connected to the first current output terminal, so as to obtain the first low level duration when the first input terminal is connected to the first current output terminal.
[0111] In some embodiments, after controlling the first control device to enter the device calibration phase, the input terminal connected to the first current output terminal is controlled by controlling the power supply status of the relay coil in the relay, so as to obtain the first low level duration when the first input terminal is connected to the first current output terminal.
[0112] Among them, the low level duration is used to characterize the low level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit; the first low level duration is used to characterize the low level duration of the zero-crossing signal collected when the first input terminal and the first current output terminal are turned on.
[0113] Step 330, controlling the second input terminal to be connected to the first current output terminal to obtain a second low level duration.
[0114] In some embodiments, after the first input terminal is controlled to be conductive with the first current output terminal and the first low level duration is obtained, the second input terminal is controlled to be conductive with the first current output terminal to obtain the second low level duration.
[0115] The second low level duration is used to characterize the low level duration of the zero-crossing signal collected when the second input terminal and the first current output terminal are turned on.
[0116] Optionally, based on the pre-setting of the device circuit, different input terminals are connected to the first current output terminal, which has different effects on the controlled device. Optionally, when the first input terminal is connected to the first current output terminal, the controlled device is in a first operating state (such as an on state); when the second input terminal is connected to the first current output terminal, the controlled device is in a second operating state (such as an off state).
[0117] Schematically, the first input terminal and the second input terminal are signal input terminals for controlling the current to flow through the controlled device through a relay, and the first current output terminal is used to supply power to the controlled device; the operating state of the controlled device (on state or off state, etc.) is determined by the conduction state of different input terminals and the first current output terminal.
[0118] The first input terminal is a port for starting the controlled device to enter a running state. When the first input terminal is connected to the first current output terminal, current flows through the controlled device, and the controlled device is in an on state.
[0119] The second input terminal is a port for stopping or shutting down the operating state of the controlled device. When the second input terminal is connected to the first current output terminal, the current flows through other parts of the circuit and the controlled device is in a shut-down state.
[0120] Step 340: Based on the first low-level duration and the second low-level duration, a calibration threshold for evaluating the control state of the first control device over the controlled device is obtained.
[0121] Illustratively, the first low level duration and the second low level duration describe the duration of the low level under different conduction conditions of different device circuits. The combination of the first low level duration and the second low level duration can more completely describe the operation of the device circuit corresponding to the first control device.
[0122] The calibration threshold is a threshold parameter used to evaluate the control state of the first control device over the controlled device.
[0123] In an optional embodiment, numerical calculation is performed on the first low-level duration and the second low-level duration to obtain a duration evaluation benchmark.
[0124] The numerical operation includes at least one of a mean operation and a weighted sum operation.
[0125] Optionally, the mean operation is used to obtain the duration average of the first low level duration and the second low level duration as a duration evaluation benchmark. For example, if the first low level duration is 8ms and the second low level duration is 10ms, the duration average used as the duration evaluation benchmark is 9ms.
[0126] Optionally, the weighted sum operation is an operation of adjusting the first low-level duration and the second low-level duration based on a preset weight and performing a sum operation. Schematically, the first low-level duration is adjusted by the first weight to obtain a first adjustment value; the second low-level duration is adjusted by the second weight to obtain a second adjustment value, and the sum of the first adjustment value and the second adjustment value is used as a duration evaluation benchmark, wherein the first weight and the second weight may be different or the same, which is not limited here.
[0127] In an optional embodiment, an upper threshold value of the evaluation duration and a lower threshold value of the evaluation duration are obtained as calibration thresholds based on a duration evaluation benchmark.
[0128] Illustratively, adjustments are made based on the duration evaluation benchmark to obtain an evaluation duration upper limit threshold and an evaluation duration lower limit threshold as calibration thresholds for evaluating the operating state of the controlled device by the first control device.
[0129] The upper limit threshold of the evaluation duration is used to evaluate the device shutdown state, and the lower limit threshold of the evaluation duration is used to evaluate the device startup state.
[0130] Illustratively, the first operating state includes a device off state and a device on state, the device off state is used to characterize that the controlled device controlled by the first control device is in an off state, and the device on state is used to characterize that the controlled device controlled by the first control device is in an on state.
[0131] For example: when it is not less than the upper threshold of the evaluation duration, it means that the controlled device controlled by the first control device is in the off state (such as the light bulb controlled by the smart switch is in the off state); when it is not greater than the lower threshold of the evaluation duration, it means that the controlled device controlled by the first control device is in the on state (such as the light bulb controlled by the smart switch is in the light state), etc.
[0132] In some embodiments, a duration adjustment parameter is obtained.
[0133] Illustratively, the duration adjustment parameter is a pre-set parameter value used to adjust the duration evaluation benchmark. For example, the duration adjustment parameter is a value such as 0.2, 1, or 1.2.
[0134] In some embodiments, a first duration adjustment is performed on the duration evaluation benchmark using a duration adjustment parameter to obtain an evaluation duration upper limit threshold.
[0135] Among them, the first duration adjustment is a form of adjustment.
[0136] Optionally, taking the first duration adjustment as a sum adjustment as an example, the sum of the duration evaluation threshold and the duration adjustment parameter is used as the evaluation duration upper limit threshold. For example, if the duration evaluation threshold is 8 and the duration adjustment parameter is 0.2, then the evaluation duration upper limit threshold is 8.2.
[0137] Optionally, taking the first duration adjustment as a product adjustment as an example, the product of the duration evaluation threshold and the first duration adjustment parameter is used as the evaluation duration upper limit threshold, and the first duration adjustment parameter is a parameter in the duration adjustment parameter that can be used to determine the evaluation duration upper limit threshold. For example, if the duration evaluation threshold is 8 and the first duration adjustment parameter is 1.2, then the evaluation duration upper limit threshold is 9.6.
[0138] In some embodiments, a second duration adjustment is performed on the duration evaluation benchmark using a duration adjustment parameter to obtain an evaluation duration lower limit threshold.
[0139] Among them, the second duration adjustment is another form of adjustment.
[0140] Optionally, taking the second duration adjustment as a difference adjustment as an example, the difference between the duration evaluation threshold and the duration adjustment parameter is used as the evaluation duration lower limit threshold. For example, if the duration evaluation threshold is 8 and the duration adjustment parameter is 0.2, the evaluation duration lower limit threshold is 7.8.
[0141] Optionally, taking the second duration adjustment as a product adjustment as an example, the product of the duration evaluation threshold and the second duration adjustment parameter is used as the evaluation duration lower limit threshold, the second duration adjustment parameter is a parameter in the duration adjustment parameter that can be used to determine the evaluation duration lower limit threshold, and the second duration adjustment parameter is less than the first duration adjustment parameter. For example, if the duration evaluation threshold is 8 and the duration adjustment parameter is 0.8, then the evaluation duration lower limit threshold is 6.4.
[0142] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0143] Step 350: determining the device control state of the first control device over the controlled device in a future time period by calibrating the threshold.
[0144] Illustratively, the device control state in a future time period is evaluated by calibration parameters including an upper threshold value of the evaluation duration and a lower threshold value of the evaluation duration; wherein the future time period is a time period after the current moment.
[0145] In an optional embodiment, the third low level duration of the first control device is detected by a zero-crossing detection circuit in a future time period.
[0146] Indicatively, any time period after the calibration threshold is taken as a future time period, and in the future time period, the first control device is continuously detected by the zero-crossing detection circuit and a third zero-crossing signal is obtained. The third zero-crossing signal describes the zero-crossing signal detected by the zero-crossing detection circuit in the future time period, and the duration of the low level in the third zero-crossing signal is analyzed to obtain the third low level duration.
[0147] In some embodiments, a device control operation is received; and a third low level duration is obtained based on the device control operation through a zero-crossing detection circuit in a future time period.
[0148] The device control operation is used to adjust the device state of the controlled device through the first control device; the third low level duration is the low level duration obtained by the zero-crossing detection circuit detecting the first control device based on the device control operation.
[0149] Illustratively, the device control operation includes at least one of the following forms: a turn-on control operation for controlling the controlled device to turn on through a first control device; a turn-off control operation for controlling the controlled device to turn off through a first control operation; a brightness adjustment control operation for controlling the brightness change of the controlled device through the first control operation; an energy efficiency adjustment control operation for controlling the energy efficiency consumption of the controlled device through the first control operation, etc.
[0150] In an optional embodiment, the device control state of the first controlling device over the controlled device is determined by analyzing the third low level duration based on the calibration threshold.
[0151] Schematically, the third low level duration is compared with the calibration threshold; when the calibration threshold includes an evaluation duration upper limit threshold and an evaluation duration lower limit threshold, the third low level duration is compared with the evaluation duration upper limit threshold and the evaluation duration lower limit threshold respectively to determine the device control state.
[0152] In one embodiment, in response to the third low level duration being not less than the evaluation duration upper limit threshold, it is determined that the device control state of the controlled device by the first control device is the device off state.
[0153] Indicatively, the evaluation duration upper limit threshold is a threshold used to evaluate the device shutdown state. When the third low level duration is not less than the evaluation duration upper limit threshold, it means that the third low level duration is relatively long. Usually, the low level duration is relatively long when the device is turned off (refer to the following Figures 8 to 9 , which will be discussed later), therefore, the device control state is determined to be the device off state, that is, the first control device controls the controlled device to enter the off state.
[0154] In one embodiment, in response to the third low level duration being not greater than the evaluation duration lower limit threshold, it is determined that the device control state of the controlled device by the first control device is the device on state.
[0155] Indicatively, the evaluation duration lower limit threshold is a threshold used to evaluate the device on state. When the third low level duration is not greater than the evaluation duration lower limit threshold, it means that the third low level duration is short. Usually, the low level duration is short when the device is on (refer to the following Figures 8 to 9 , which will be discussed later), therefore, the device control state is determined to be the device on state, that is, the first control device controls the controlled device to enter the on state.
[0156] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0157] To sum up, when inferring the control state of the controlled device by the first control device through the zero-crossing detection circuit, it is not simply relying on the analysis result of the zero-crossing detection circuit on the on-off condition of the AC power, but analyzing the device control state through the low-level duration of the zero-crossing signal. The low-level duration can reflect the on-off of the AC power while showing richer voltage and current detail information. Combining the low-level duration under the conduction of different input terminals and current output terminals, the on-off information of the controlled device can be more abundant and comprehensive, which helps to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device.
[0158] In an embodiment of the present application, the calibration threshold is determined by obtaining the first low-level duration and the second low-level duration during the calibration phase, so that the device control state of the controlled device by the first control device can be evaluated more specifically through the relationship between the third low-level duration counted in the future time period and the calibration threshold. The evaluation process can also be improved to improve the accuracy of state judgment when the calibration threshold includes an upper threshold for the evaluation duration and a lower threshold for the evaluation duration.
[0159] In an optional embodiment, considering that there may be some special circumstances (such as induced voltage, device type of controlled device, etc.) that cause the low level duration to be shorter in the device off state and longer in the device on state (i.e., different from the usual situation), when the device control state of the controlled device by the first control device is obtained based on the calibration threshold, the device operation state of the controlled device can be obtained, so as to compare the device control state with the device operation state of the controlled device to determine the use of the calibration threshold. Schematically, as Figure 4 As shown above Figure 2 The illustrated step 240 may also be implemented as the following steps 410 to 440 .
[0160] Step 410 , determining a first evaluation logic by calibrating a threshold value.
[0161] The first evaluation logic is used to evaluate the control status of the first control device over the controlled device.
[0162] Illustratively, the first evaluation logic is an evaluation method determined by combining a preset evaluation logic and a calibration threshold.
[0163] Optionally, the calibration threshold is a single value, and the first evaluation logic is: when the low level duration is not less than the calibration threshold, the device is in the on state, and when the low level is less than the calibration threshold, the device is in the off state; or, the first evaluation logic is: when the low level duration is not greater than the calibration threshold, the device control state of the controlled device by the first control device is the device on state, and when the low level is greater than the calibration threshold, the device control state of the controlled device by the first control device is the device off state, etc.
[0164] In some embodiments, the calibration threshold includes an upper threshold of the evaluation duration and a lower threshold of the evaluation duration; the first evaluation logic is: when the low-level duration is not less than the upper threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-off state; when the low-level duration is not greater than the lower threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-on state, etc.
[0165] Step 420: Analyze the third low-level duration using the first evaluation logic to obtain a state control result of the first control device on the controlled device.
[0166] Illustratively, after the first evaluation logic is determined by using the preset evaluation logic and the calibration threshold, the third low-level duration in the future time period is first analyzed by the first evaluation logic, and the result obtained by the analysis is called the state control result.
[0167] In some embodiments, the calibration threshold includes an upper threshold of the evaluation duration and a lower threshold of the evaluation duration; the first evaluation logic is: when the low-level duration is not less than the upper threshold of the evaluation duration, the device control state of the controlled device by the first control device is the device-off state; when the low-level duration is not greater than the lower threshold of the evaluation duration, the device control state of the controlled device by the first control device is the device-on state.
[0168] The third low-level duration is compared with the upper and lower thresholds of the evaluation duration respectively. If the third low-level duration is not less than the upper threshold of the evaluation duration, the state control result is the device-off state, indicating that the first control device currently turns off the controlled device, and the controlled device is determined to be in the off state; if the third low-level duration is not greater than the lower threshold of the evaluation duration, the state control result is the device-on state, indicating that the first control device currently turns on the controlled device, and the controlled device is determined to be in the on state.
[0169] Step 430: Obtain the device operation result of the controlled device based on the device control operation performance.
[0170] Optionally, based on the device control operation for the first control device, the third low-level duration in the future time period is determined, and the controlled device will also adjust its performance state accordingly based on the device control operation received by the first control device. The state of the controlled device based on the device control operation is called the device operation result.
[0171] Illustratively, the device operation results include an on state and an off state. For example, if the controlled device is a light bulb, the on state represents that the light bulb is lit, and the off state represents that the light bulb is off. Alternatively, the device operation results include an on state, an off state, and a brightness state. For example, if the controlled device is a light bulb, the on state represents that the light bulb is lit, the off state represents that the light bulb is off, and the brightness state represents the brightness level of the light bulb, etc., which are not limited here.
[0172] Step 440: Based on the difference between the state control result and the device operation result, obtain the device control state of the controlled device by the first control device.
[0173] Illustratively, after determining the state control result of the first control device over the controlled device and the device operation result of the controlled device itself, the state control result and the device operation result are compared to obtain the device control state of the first control device over the controlled device.
[0174] Compared with the state control result, taking the difference between the state control result and the equipment operation result as the influencing parameter for adjusting the state control result helps to obtain a more accurate equipment control state and improve the calibration accuracy.
[0175] In an optional embodiment, when the state control result is the same as the device operation result, the state control result is used as the device control state of the first controlling device over the controlled device.
[0176] In schematic form, if the state control result is the same as the device operation result, it means that the current control status of the controlled device by the first control device is consistent with the performance of the controlled device itself. Therefore, the state control result obtained by using the first evaluation logic is more accurate, and the state control result can be used as the device control status of the controlled device by the first control device.
[0177] Optionally, based on this, the first evaluation logic can be used to continue to evaluate the device control state of the first control device over the controlled device in the future time period. That is, if the first control device receives a device control operation for adjusting the controlled device again, the low-level voltage can be continuously evaluated based on the first evaluation logic to determine the device control state.
[0178] In an optional embodiment, when the state control result is different from the device operation result, the first evaluation logic is adjusted to obtain a second evaluation logic corresponding to the calibration threshold; the second evaluation logic is used to determine the device control state of the first control device on the controlled device in the future time period.
[0179] In schematic form, if the state control result is different from the device operation result, it means that the current control status of the controlled device by the first control device is inconsistent with the performance of the controlled device itself. Therefore, the accuracy of the state control result obtained by using the first evaluation logic is poor, and it is not appropriate to use the state control result obtained by using the first evaluation logic as the device control state. Therefore, the first evaluation logic needs to be adjusted to obtain a second evaluation logic different from the first evaluation logic as the evaluation logic for determining the device control state.
[0180] In some embodiments, taking into account special circumstances such as induced voltage, device type of controlled device, etc., which may cause the low level duration to be shorter when the device is off and longer when the device is on, when adjusting the first evaluation logic, a logic inversion method may be used to obtain the second evaluation logic.
[0181] Indicatively, the first evaluation logic is: when the low-level duration is not less than the upper limit threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-off state; when the low-level duration is not greater than the lower limit threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-on state; the second evaluation logic obtained by inverting the first evaluation logic is: when the low-level duration is not less than the upper limit threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-on state; when the low-level duration is not greater than the lower limit threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-off state.
[0182] Optionally, after obtaining the second evaluation logic by means of logic inversion, the second evaluation logic is applied to the determination of the device control state between the current first control device and the controlled device; for example: the first control device is the smart switch B, and the controlled device is the high-voltage lamp M controlled by the smart switch. After obtaining the second evaluation logic by means of logic inversion, the second evaluation logic is applied to the scenario where the smart switch B determines the device control state of the high-voltage lamp M. The control of the high-voltage lamp M by other control devices, the control of other controlled devices (such as ordinary lamps, etc.) by other control devices, and the control of other controlled devices (such as ordinary lamps, etc.) by the smart switch B are not limited to the determination of the second evaluation logic and are not limited here.
[0183] In some embodiments, the logic parameters preset in the first evaluation logic may be adjusted to obtain the second evaluation logic.
[0184] Indicatively, the first evaluation logic is: when the low-level duration is not less than the upper threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-off state; when the low-level duration is not greater than the lower threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-on state; wherein the upper threshold of the evaluation duration and the lower threshold of the evaluation duration are information determined based on the first duration adjustment parameter (logical parameter), such as the first duration adjustment parameter is 0.2, the logical parameter is adjusted, and the second duration adjustment parameter is obtained as 0.5 (such as randomly selected or determined in advance based on regularity analysis, etc.), and a new upper threshold of the evaluation duration and a new lower threshold of the evaluation duration are determined by the second duration adjustment parameter, and the second evaluation logic is obtained as follows: when the low-level duration is not less than the new upper threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-on state; when the low-level duration is not greater than the new lower threshold of the evaluation duration, the control state of the controlled device by the first control device is the device-off state, etc.
[0185] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0186] To sum up, when inferring the control state of the controlled device by the first control device through the zero-crossing detection circuit, it is not simply relying on the analysis result of the zero-crossing detection circuit on the on-off condition of the AC power, but analyzing the device control state through the low-level duration of the zero-crossing signal. The low-level duration can reflect the on-off of the AC power while showing richer voltage and current detail information. Combining the low-level duration under the conduction of different input terminals and current output terminals, the on-off information of the controlled device can be more abundant and comprehensive, which helps to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device.
[0187] In the embodiment of the present application, the content of flexibly adjusting the evaluation logic according to the difference between the device control result and the device operation result is introduced. Since the device control result of the first control device on the controlled device may be affected by factors such as the induced voltage and the type of the controlled device, resulting in a difference between the device control result and the device operation result of the controlled device itself, it can be flexibly decided whether to adjust the preset first evaluation logic to adopt the second evaluation logic according to the difference, thereby improving the comprehensiveness of the analysis of the evaluation method, facilitating the use of a more appropriate evaluation logic to analyze the control of the controlled device by the first control device in the future time period, and improving the accuracy of the analysis of the device control.
[0188] In an optional embodiment, the first control device and the second control device are two control devices for controlling the controlled device respectively, and the first control device and the second control device are referred to as a set of double-control switches. Figure 5As shown, the first control device is used as the execution subject, the above Figure 2 The illustrated embodiment may also be implemented as steps 510 to 540 as follows; wherein step 220 may also be implemented as step 520 as follows, and step 230 may also be implemented as step 530 as follows.
[0189] Step 510, receiving a device calibration operation.
[0190] The first control device is used to control the controlled device.
[0191] Illustratively, the first control device is a device used to control the device operating state of the controlled device, and the device operating state includes at least one of multiple dimensions such as operation on state, operation off state, operation sleep state, operation intensity state, and operation energy efficiency state; the controlled device is a device controlled by the first control device and used to display the device operating state.
[0192] The device calibration operation is used to calibrate the device state of the first control device.
[0193] Illustratively, the device calibration operation is an operation performed on the first control device in order to ensure that the first control device can accurately and reliably control the controlled device.
[0194] Optionally, the first control device includes a calibration control, and a trigger operation on the calibration control is used as a device calibration operation; or the first control device includes a calibration area, and a region trigger operation on the calibration area is used as a device calibration operation. Based on the device control operation, the first control device is automatically triggered to perform a calibration process to analyze and adjust the control of the controlled device by the first control device.
[0195] The first control device includes a first input terminal, a second input terminal and a first current output terminal, and the first current output terminal is connected to the controlled device.
[0196] Schematically, the first input terminal and the second input terminal are two optional input terminals of the first control device for receiving current input, such as selecting to input current from the first input terminal; or selecting to input current from the second input terminal, etc.; the first current output terminal is connected to the controlled device controlled by the first control device.
[0197] In some embodiments, the first control device sets the first input terminal and the second input terminal as current input terminals only because it is desired to set the first control device and the second control device to jointly control the controlled device, that is, the first control device and the second control device are two control devices used to control the controlled devices respectively.
[0198] Optionally, the first control device is an intelligent control device (such as an intelligent switch, an intelligent rotary button, etc.), and the second control device is a mechanical control device (such as a traditional mechanical switch, a traditional mechanical rotary button, etc.); or, the first control device is an intelligent control device, and the second control device is also an intelligent control device, etc., which is not limited here.
[0199] The second control device comprises a second current output terminal and a current input terminal, the second current output terminal is connected to the first input terminal or the second input terminal of the first control device, and the current input terminal of the second control device is used to receive current.
[0200] Schematically, the second current output end of the second control device is implemented as two optional current output ends, such as the second current output end includes a first output end and a second output end, and the current is input to the first input end or the second input end corresponding to the first control device through the first output end or the second output end of the second control device. For example: the current is input to the first input end corresponding to the first control device through the first output end of the second control device; or, the current is input to the first input end corresponding to the first control device through the second output end of the second control device; or, the current is input to the second input end corresponding to the first control device through the first output end of the second control device; or, the current is input to the second input end corresponding to the first control device through the second output end of the second control device.
[0201] That is, when the first control device and the second control device are used to control the controlled device respectively, the first control device and the second control device can be called dual-control devices (such as dual-control switches). In the circuit where the dual-control device controls one controlled device, the first control device and the second control device each have two main current input terminals, usually marked as L1A and L1B. L1A and L1B are two alternating control ports. These two ports are the switching points of the current path and are connected to two different lines between the controlled device and the power supply. By alternately connecting the live wire (L) and the controlled device through the two ports L1A and L1B, the first control device and the second control device can switch the current path at different positions, thereby controlling the state of the controlled device (such as controlling the switch state of the controlled device through the dual-control switch). That is, the working principle of the dual-control device involves alternating control of the flow direction of the current.
[0202] Indicative, such as Figure 6As shown, taking the dual-control device implemented as a dual-control switch as an example, compared with the traditional situation of setting two mechanical switches to control the light bulb, if one mechanical switch 610 is retained and the other mechanical switch is replaced with an intelligent switch 620, the purpose of combining a mechanical switch 610 and an intelligent switch 620 to control the light bulb 630 can be achieved. In this way, it can ensure that the mechanical switch 610 can control the light bulb 630 normally, and the function of voice or remote control of the light bulb 630 can be realized through the intelligent switch 620.
[0203] Among them, the intelligent switch 620 is the first control device, the mechanical switch 610 is the second control device, and the light bulb 630 is the controlled device. Figure 6 The figure shows a schematic connection method between the mechanical switch 610, the intelligent switch 620 and the light bulb 630.
[0204] The mechanical switch 610 includes a current input terminal L1 and two current output terminals (L1A and L1B). The current input terminal L1 of the mechanical switch 610 is connected to the AC input L. The AC input L represents the live wire and is used to introduce the power current into the mechanical switch 610. Taking the current input terminal L1 and the current output terminal L1B of the mechanical switch 610 as an example, the current flows into the smart switch 620 through the current output terminal L1B.
[0205] The smart switch 620 includes two current input terminals (a first input terminal L1A and a second input terminal L1B) and a current output terminal (L1); the current output terminal L1 of the smart switch 620 is connected to one end of the light bulb 630, and the other end of the light bulb 630 is connected to the AC input N. The AC input N represents the neutral line, which is used to ensure the integrity of the circuit and the normal flow of current, and to ensure the safety and stability of the light bulb 630 and even the circuit; in a popular sense, since it is expressed as the AC input N, the current output terminal of the second control device can also be called the input terminal, and the first input terminal and the second input terminal can be called the output terminal. This is only an illustrative explanation.
[0206] Figure 6 In the wiring diagram of the dual-control switch, the current output terminal L1A of the mechanical switch 610 is connected to the current input terminal L1B of the intelligent switch 620, and the current output terminal L1B of the mechanical switch 610 is connected to the current input terminal L1A of the intelligent switch 620; it can also be realized by connecting the current output terminal L1A of the mechanical switch 610 to the current input terminal L1A of the intelligent switch 620, and connecting the current output terminal L1B of the mechanical switch 610 to the current input terminal L1B of the intelligent switch 620, that is, two L1As can be connected and two L1Bs can be connected to achieve the purpose of dual control. The principle of dual control is to change the direction of current flow and control the state of the controlled device through the cooperation of two control devices.
[0207] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0208] Step 520, in response to the device calibration operation, when controlling the first input terminal and the first current output terminal to be turned on, analyze the device circuit of the first control device from at least one dimension of the controlled device dimension and the induced voltage dimension through the zero-crossing detection circuit to obtain the first low level duration.
[0209] Illustratively, the device calibration operation is used to trigger the first control device to calibrate the control status of the device operating state of the controlled device; if the first control device receives the device calibration operation, it enters the device calibration process.
[0210] Optionally, the first control device includes, in addition to the first input terminal, the second input terminal and the first current output terminal, a plurality of device components, and different device components are used to implement different component functions. Schematically, the plurality of device components include at least one of a micro control component, a relay, a communication component and the like.
[0211] Among them, the micro-control component can also be called a micro-processor, which is used to receive input signals and control the state of the first control device; the relay is a component controlled by current or voltage, which is used to realize electrical control of the first control device; the micro-control component can achieve the control purpose of the first control device by controlling the working state of the relay.
[0212] The communication module (such as Wi-Fi, Zigbee, Bluetooth, etc.) is used to allow the user to remotely control the first control device, or to achieve automatic control through linkage with other smart devices. For example, the user can control the state of the first control device through a mobile phone application, a voice assistant, etc., and even set automatic functions such as timing.
[0213] Optionally, after the first control device receives the device calibration operation, a device calibration signal is generated, and the micro-control component of the first control device controls the first control device to enter the device calibration process based on the device calibration signal.
[0214] Schematically, during the device calibration process, the micro-control component controls the first input terminal of the first control device to be connected to the first current output terminal; Figure 6 As shown, taking the first input terminal L1A of the intelligent switch 620 as an example, the control wire 640 is connected to the first input terminal L1A, so that the first input terminal L1A is connected to the first current output terminal L1.
[0215] Among them, the zero-crossing detection circuit is a preset circuit for detecting the device status of the first control device; the core function of the zero-crossing detection circuit is to use the zero point of the AC voltage waveform to achieve precise control operation; therefore, the zero-crossing signal of the first control device in the device circuit operation state can be detected through the zero-crossing detection circuit.
[0216] The above-mentioned zero-crossing signal is a signal generated when an AC voltage or current signal passes through the zero voltage point; when the voltage of the AC signal changes from a positive value to a negative value, or from a negative value to a positive value, the zero-crossing signal passes through the zero point (that is, the moment when the voltage is zero). This zero-crossing phenomenon is usually used to synchronize or trigger the action of the control circuit.
[0217] Since the zero-crossing signal is a square wave signal, the zero-crossing signal is usually composed of at least one of a high voltage segment and a low voltage segment. Due to the form of the zero-crossing signal, the low-level duration can be determined based on the zero-crossing. Usually, each time the sine wave passes through the zero point, the zero-crossing signal outputs a pulse, the low-level (0) segment indicates that the sine wave is in the positive half cycle, and the high-level (1) segment indicates that the sine wave is in the negative half cycle. However, the specific implementation method depends on more factors, which will be described in detail in the following examples.
[0218] like Figure 7 As shown in FIG. 1 , a schematic circuit diagram of a zero-crossing detection circuit is shown. Figure 6 As an example, the smart switch 620 shown in FIG. Figure 7 The zero-crossing detection circuit and the switch state detection logic of the software are shown, and the zero-crossing detection circuit of the intelligent switch 620 is described as follows.
[0219] The three ports of the intelligent switch 620 are L1, L1A and L1B. For the relay 710 of the intelligent switch (such as the model HF3F-L / 12-1Z), the internal number 5 represents the normally closed contact (NC) of the relay, the number 3 represents the normally open contact (NO) of the relay, and the number 4 represents the common terminal (COM) of the relay. The relay 710 includes the above three contacts and the relay coil 711. The working state of the relay coil 711 directly determines the action of the relay contact. The line with the number 1 represents that the relay coil 711 is connected to the OA1 pin of the microcontroller unit (MCU), and the line with the number 2 represents that the relay coil 711 is connected to the OB1 pin of the MCU. The MCU controls OA1 and OB1 to output different levels to realize the control of the relay coil.
[0220] Normally closed contact NC means that when there is no external action (such as current, button press, etc.), the normally closed contact is closed; when the external action occurs, the normally closed contact opens; it is often used in relays to control the disconnection of the circuit. Normally open contact NO means that when there is no external action, the normally open contact is open; only under external action, the normally open contact will close; it is often used in relays to control the connection of the circuit. Common terminal COM is a terminal in a relay or switch, usually used as a reference terminal for connecting input or output signals. In multi-point switching, it is often used together with normally open contacts and normally closed contacts.
[0221] Indicatively, in the process of controlling the relay through the MCU, the contact connection is adjusted by the conduction of the relay coil 711. For example: when OA1 is at a high level and OB1 is at a low level, the magnetic field generated by the relay coil 711 attracts the internal paddle from the NO contact to the NC contact, that is, the internal paddle of the relay is connected to the NC contact, and the circuit between L1 and L1A is turned on; when OA1 is at a low level and OB1 is at a high level, the magnetic field generated by the relay coil 711 attracts the internal paddle from the NC contact to the NO contact, that is, the internal paddle of the relay is connected to the NO contact, and the circuit between L1 and L1B is turned on.
[0222] also, Figure 7 F1 shown in the figure is a fuse used to protect the circuit from overcurrent damage; D11 and D12 are two diodes, which are usually used to convert AC signals into unidirectional pulse signals; R35, R34, R40, R33, and R47 are resistors ( Figure 7 The symbol next to the resistor represents the resistance value and tolerance of the resistor. For example, the resistance value of 3.9M / 5% is 3.9 megohms, and there is a tolerance of 5%, which means that the actual resistance value of the resistor may fluctuate within the range of ±5% of 3.9 megohms); C20 is a capacitor; in microcontroller components, INT1 usually refers to External Interrupt 1. INT1 is a specific external interrupt pin used to respond to changes in external signals or events, thereby triggering the interrupt handler of the microcontroller component; Q4 is a transistor; when Q4 is not conducting, INT1 outputs a high level (such as 3.3v), and when Q4 is conducting, INT1 outputs a low level (such as 0V).
[0223] Indicative, combined Figure 6 and Figure 7 , if according to Figure 6 The double control switch wiring diagram connects the mechanical switch 610 and the intelligent switch 620. When the mechanical switch 610 remains unchanged and the intelligent switch 620 is used, Figure 7 In the case where the zero-crossing detection circuit shown detects the intelligent switch 620, the working principle of the zero-crossing detection circuit is explained as follows.
[0224] (1) When the intelligent switch 620 is turned to L1A, the current flows from the AC input L into L1 of the mechanical switch 610, and then flows into L1A of the intelligent switch 620 via L1B of the mechanical switch 610; then Figure 7 As shown, it flows through relay 710, F1, L1 of intelligent switch 620 in sequence, and Figure 6 As shown, the current flows to the bulb 630, and the bulb 630 is lit. Since no current flows through the resistor R35 in the zero-crossing detection circuit, Q4 is not turned on, and INT1 outputs a high-level signal as a zero-crossing signal.
[0225] (2) Turn the intelligent switch 620 to L1B, and the current flows from the AC input L to L1 of the mechanical switch 610, and then flows through L1B of the mechanical switch 610 to L1A of the intelligent switch 620; then Figure 7 As shown, the current flows through D12, R35, R34, R40, R33, the ground wire, and L1 of the smart switch B in sequence; wherein, the resistor R33 in the zero-crossing detection circuit generates a voltage division current to drive Q4 to turn on, so that INT1 detects the state of the zero-crossing point, and the output zero-crossing signal is a square wave signal; since the zero-crossing point is the moment when the voltage is zero in the AC cycle, if INT1 in the zero-crossing detection circuit detects the state of the zero-crossing point, the smart switch is controlled to switch at the zero-crossing point. At this time, even if the current flows through the L1 end, the smart switch 620 will prevent the current from passing through the bulb 630, because it turns off the bulb 630 at the zero-crossing point, avoiding the unstable switching behavior of the bulb 630 when the voltage is zero. Optionally, since the standard voltage for domestic households is 220V±10% and the frequency is 50Hz, the period of the zero-crossing signal is fixed to 20ms.
[0226] In some embodiments, for the above two situations (1) and (2), the behavior of the controlled device (such as the light bulb 630) can be well controlled by the zero-crossing detection circuit. However, the controlled device may also cause deviations in the operation of the device circuit due to its own state, induced voltage, etc., making the device control state of the controlled device by the first control device unstable. Therefore, it is necessary to perform a device calibration operation on the first control device to achieve the calibration purpose. In principle, the situations that affect the device control state of the controlled device by the first control device include the following (3) to (5).
[0227] (3) In the light-off state, the bulb 630 is connected in series with R35, R34, R40, and R33. Different bulbs 630 have different internal resistances. According to the series characteristics, the voltage division of R33 resistor will be different, resulting in different driving times of Q4 and different low-level durations of zero-crossing signals. The greater the impedance of the bulb 630, the shorter the low-level duration of the zero-crossing signal.
[0228] (4) After some of the bulbs 630 are turned off, the stored electrical energy is released slowly, causing the voltage across R33 to increase slowly and the conduction time of Q4 to increase slowly, making the zero-crossing signal output a stable square wave signal for more than 10 seconds.
[0229] (5) When the light is on in the dual-control wiring, an induced voltage of about 110V maximum will be generated at the floating terminal L1B. The induced voltage is applied to the series resistor through D11, causing Q4 to turn on, and INT1 will also abnormally output a zero-crossing signal.
[0230] Based on the above situations (3) to (5), in the process of analyzing the device control state through the zero-crossing detection circuit, the device circuit of the first control device is analyzed from at least one dimension of the controlled device dimension and the induced voltage dimension through the zero-crossing detection circuit to obtain the first low level duration.
[0231] The controlled device dimension is used to determine the device type of the controlled device, and the induced voltage dimension is used to characterize the induced voltage condition in the device circuit.
[0232] Illustratively, the controlled device dimension is used to characterize the state of the controlled device itself, such as at least one of the multiple states such as the device type of the controlled device, the internal resistance of the controlled device, the temperature of the controlled device, the operating time of the controlled device, etc., such as the above-mentioned case (3); the induced voltage dimension is used to characterize the state of the induced voltage generated during the operation of the device circuit of the first control device, such as the above-mentioned cases (4) and (5).
[0233] Among them, the low level duration is used to characterize the duration of the low level of the zero-crossing signal. Since the zero-crossing signal output by the zero-crossing detection circuit is not only related to the voltage, but also affected by at least one of the controlled device dimension and the induced voltage dimension, the device circuit of the first control device is analyzed from at least one of the controlled device dimension and the induced voltage dimension to obtain a more accurate first low level duration.
[0234] That is: the device circuit of the first control device is detected from at least one dimension of the controlled device dimension and the induced voltage dimension through the zero-crossing detection circuit to obtain a first zero-crossing signal; and the first low-level duration is obtained based on the first zero-crossing signal.
[0235] like Figure 8 As shown, it is a schematic diagram of zero-crossing signals when the lamp is turned on and off in the case of an ordinary lamp and no induced voltage.
[0236] Ordinary lamps usually refer to lamps that use standard low-voltage alternating current (such as household power grid voltage, usually 110V / 220VAC). Ordinary lamps usually do not require special voltage conversion equipment during use and can work normally by directly connecting to the household power supply.
[0237] For the case of ordinary lamps and the absence of induced voltage, such as when the lamp is turned off, it is shown as image 810, where curve 811 represents the change of 220V AC voltage (AV), and the zero-crossing signal 812 is a square wave pattern. In one cycle, the high voltage duration is 10ms and the low voltage duration is also 10ms, corresponding to the above situation (2).
[0238] For ordinary lamps and the absence of induced voltage, when the lamp is turned on, it is shown as image 820, where curve 821 represents the change of 220V AC voltage, and zero-crossing signal 822 is a continuous high voltage segment, corresponding to the above situation (1).
[0239] That is: Figure 8 As shown, in the case of an ordinary lamp and no induced voltage, when the lamp is turned off, the zero-crossing signal is a square wave with a period of 20ms, a high level time of 10ms, and a low level time of 10ms; when the lamp is turned on, the zero-crossing signal is a continuous high level.
[0240] like Fig. 9 As shown, it is a schematic diagram of zero-crossing signals when an ordinary lamp has an induced voltage or a high-voltage lamp has a low induced voltage, and when the lamp is turned on and off.
[0241] High-voltage lamps are lamps designed for higher voltages, such as 380V or higher. High-voltage lamps may be used in industrial, commercial or outdoor locations, especially in large-area lighting applications; high-voltage lamps are usually equipped with transformers or electronic devices to convert the voltage to a suitable operating voltage.
[0242] For the above situation, when the lamp is turned off, it is shown as image 910, where curve 911 represents the change of 220V AC voltage (AV), and zero-crossing signal 912 is a square wave pattern, in which the high voltage duration in one cycle is 10ms and the low voltage duration is also 10ms; at this time, since the lamp is in the off state, it has not been affected by the induced voltage, corresponding to the above situation (2).
[0243] For the above situation, when the lamp is turned on, it is displayed as image 920, where curve 921 represents the change of 220V AC voltage (AV), and the zero-crossing signal 922 is ideally in the form of a continuous high voltage segment. However, due to the induced voltage generated when the lamp is turned on (the induced voltage of an ordinary lamp or the low induced voltage of a high-voltage lamp), the zero-crossing signal becomes a square wave with a period of 20ms, a high level duration of 16ms, and a low level duration of 4ms.
[0244] The reason why the zero-crossing signal 922 occurs is that the neutral and live wires used in the alternating current will generate an induced voltage of about 60V-110V at the suspended terminal L1B of the first control device due to winding or excessive length. Figure 7 As shown, the induced voltage is applied to the series resistor through D11 to turn on Q4, resulting in INT1 also outputting a square wave signal when the light is on.
[0245] like Fig.10 As shown, it is a schematic diagram of the zero-crossing signal when the high-voltage lamp is turned on and off when a high-induced voltage exists in the high-voltage lamp.
[0246] For the high voltage lamp with high induced voltage, when the lamp is turned off, it is shown as image 1010, where curve 1011 represents the change of 220V AC voltage, and zero-crossing signal 1012 is a square wave, in which the high voltage duration is 16ms and the low voltage duration is 4ms in one cycle. The reason for this situation is: when the lamp is turned off, Figure 7 As shown in the figure, since the high-voltage lamp is connected in series with R35, R34, R40, and R33, the internal resistance of different lamps is different. Different from the case of ordinary lamps, if high-voltage lamps are used, according to the series characteristics, the R33 resistor voltage division size will be different, resulting in different driving time of Q4, so the low-level duration of the zero-crossing signal is different; and the greater the impedance of the high-voltage lamp, the shorter the low-level duration of the zero-crossing signal. Since the internal resistance of the high-voltage lamp is large, the low-level duration of the zero-crossing signal is shortened when turning off the light, rather than the 10ms low-level duration of ordinary lamps.
[0247] In the case of high induced voltage in high-voltage lamps, for example, when the lamp is turned on, it is shown as image 1020, where curve 1021 represents the change of 220V AC voltage (AV), and zero-crossing signal 1022 is a square wave with a period of 20ms, a high level duration of 12ms, and a low level duration of 8ms. The reason for this is that when the high-voltage lamp encounters a high induced voltage, the internal resistance of the high-voltage lamp will amplify the induced voltage generated by the L1B terminal of the first control device, so that the induced voltage exceeds the induced voltage of 110V corresponding to ordinary lamps, and in extreme cases it can reach 130V, which leads to a longer low-level duration of the zero-crossing signal when the light is turned on than when the light is turned off; high-voltage lamps are the most common large-internal-resistance lamps, and other large-internal-resistance lamps on the market will also show this special zero-crossing signal.
[0248] It is worth noting that the low-level duration determined based on the zero-crossing signal detected by the zero-crossing detection circuit under different conditions is only an illustrative example. Due to changes in the lamp state, the induced voltage state, the increased voltage state, etc., corresponding changes will also occur, which are not limited here.
[0249] Optionally, as above Figure 8 , Fig. 9 , Fig.10The low level duration varies accordingly due to different situations, and the low level duration is shorter than the high level duration, so it is more indicative to analyze the situation of the first control state; that is: when the first input terminal and the first current output terminal are controlled to be turned on, the device circuit of the first control device is analyzed from at least one dimension of the controlled device dimension and the induced voltage dimension through the zero-crossing detection circuit, so as to obtain the first low level duration with the help of the identified zero-crossing signal, as the low level duration used for calibration analysis.
[0250] Step 530, when controlling the second input terminal to be conductive with the first current output terminal, analyze the device circuit of the first control device from at least one of the controlled device dimension and the induced voltage dimension through the zero-crossing detection circuit to obtain the second low level duration.
[0251] Illustratively, referring to the above-mentioned considerations for obtaining the first low-level duration, when controlling the second input terminal and the first current output terminal to be turned on, the device circuit of the first control device is analyzed from at least one dimension of the controlled device dimension and the induced voltage dimension through the zero-crossing detection circuit, so as to obtain the second low-level duration with the help of the identified zero-crossing signal, as another low-level duration used in calibration analysis.
[0252] Step 540: Determine the device control state of the controlled device by the first control device based on the first low level duration and the second low level duration.
[0253] In an illustrative manner, the first low-level duration and the second low-level duration obtained during the device calibration process are integrated to obtain a calibration threshold for the device calibration phase, thereby using the calibration threshold to measure the low-level duration collected when the first control device controls the controlled device in a future time period to evaluate the device control status of the controlled device by the first control device.
[0254] The device control state is used to characterize the effect of the first control device on the controlled device.
[0255] Illustratively, the device control state indicates that the first control device is used to control the switch state of the controlled device, such as the device control state indicates that the first control device is used to control the controlled device in an on state, or the device control state indicates that the first control device is used to control the controlled device in an off state; or, the device control state indicates that the first control device is used to control the intensity state of the controlled device, such as the device control state indicates that the first control device is used to control the controlled device in a high-brightness state, or the device control state indicates that the first control device is used to control the controlled device in a low-brightness state, etc. The device control state here is used to characterize the control effect of the control device on the controlled device, and is not limited here.
[0256] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0257] To sum up, when inferring the control state of the controlled device by the first control device through the zero-crossing detection circuit, it is not simply relying on the analysis result of the zero-crossing detection circuit on the on-off condition of the AC power, but analyzing the device control state through the low-level duration of the zero-crossing signal. The low-level duration can reflect the on-off of the AC power while showing richer voltage and current detail information. Combining the low-level duration under the conduction of different input terminals and current output terminals, the on-off information of the controlled device can be more abundant and comprehensive, which helps to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device.
[0258] In the embodiment of the present application, the content of obtaining the low-level duration through multi-dimensional analysis is introduced. In the process of obtaining the low-level duration, the induced voltage that may be generated by the device circuit after power-on and / or the device condition of the controlled device are considered, so as to more accurately obtain the low-level duration, thereby using the low-level duration to more accurately analyze and determine the device control state, thereby improving the accuracy of state determination.
[0259] In an optional embodiment, taking the first control device as a smart switch, the controlled device as a light bulb, and the device control state of the controlled device by the first control device as a switch state as an example, the above device state acquisition method is called "a switch state detection and calibration method"; Fig.11 As shown, the switch state detection and self-calibration method can be implemented as the following process.
[0260] Step 1110: Press and hold the button for 10 seconds until the indicator light flashes, triggering entry into the self-calibration mode.
[0261] Indicatively, the button is a trigger control on a first control device (hereinafter referred to as a device), such as a smart switch (eg Figure 6 The smart switch 620 in the device, such as a built-in smart switch in a control software on a mobile phone terminal, etc., performs a long press operation on the button for a preset time (such as 10s, etc.) as a device calibration operation, thereby triggering the device to enter the self-calibration mode. The indicator light is the indication content on the device, and the switch state detected by the device is displayed through the indicator light (such as the first control device is in the on state, which means that the first control device currently needs to control the controlled device to turn on, etc.).
[0262] Reference Figure 6After the mechanical switch 610, the smart switch 620 and the light bulb 630 are connected according to the wiring diagram of the double-control switch, the user controls the light fixture by pressing the button of the smart switch 620 while the mechanical switch 610 is not in operation. Under normal circumstances, the switch state of the light bulb 630 will be consistent with the indicator light of the device (smart switch 620), that is, both on and off.
[0263] If the actual switch state of the bulb 630 is inconsistent with the indicator light of the device (for example, the bulb 630 is lit, but the indicator light indicates that the smart switch 620 controls the bulb 630 to be off; or, the bulb 630 is off, but the indicator light indicates that the smart switch 620 controls the bulb 630 to be lit), the user needs to press and hold the button of the smart switch 620 for 10 seconds and wait for the indicator light to flash quickly before releasing it. At this time, the device enters the automatic calibration mode.
[0264] Step 1111, the device automatically switches the relay to terminal A.
[0265] Schematically, the device includes a relay, and the relay A terminal indicates the L1A terminal of the zero-crossing detection circuit of the intelligent switch (such as Figure 6 The relay B terminal corresponds to the L1B terminal of the zero-crossing detection circuit of the intelligent switch (such as Figure 6 L1B segment in the intelligent switch 620).
[0266] In the case where the device enters the automatic calibration mode, refer to Figure 6 The device will first control the relay to make the L1 terminal and L1A inside the device conductive. This process is achieved by turning the relay to the A terminal.
[0267] Step 1112, start a 20s countdown to wait for the zero-crossing signal to stabilize.
[0268] Indicatively, since some special lamps will have a gradually increasing low-level duration of the zero-crossing signal, and there will be frequent jitters of ±1ms after the low-level duration slowly increases to the maximum, you can wait for 20 seconds to wait for the zero-crossing signal to stabilize before counting; here 20 seconds is the preset duration and is not limited here.
[0269] Step 1113, after the countdown ends, the average low-level duration of the zero-crossing signal within 5 seconds is counted.
[0270] Indicatively, after the countdown ends, the low level duration of the zero-crossing signal in 250 cycles within 5 seconds is counted, wherein 5 seconds can be regarded as the first duration for obtaining the first low level duration, and other values such as 8 seconds and 10 seconds can also be taken, which are not limited here.
[0271] Step 1114, record the low level duration A.
[0272] Indicatively, the first duration is 5s, and the sum of the low-level durations in the zero-crossing signal counted within 5s is taken as the low-level duration A (first low-level duration); or, the quotient of the sum of the low-level durations in the zero-crossing signal counted within 5s and 5s is taken as the low-level duration A (first low-level duration), etc., which is not limited here.
[0273] For example, the average duration of the low level of the zero-crossing signal within 5 seconds is calculated as the low level duration A to reduce the detection error.
[0274] Step 1121, the device automatically switches the relay to the B terminal.
[0275] Indicatively, after counting the low level average time of the zero-crossing signal at the A end, the device controls the relay to make the L1 end and L1B inside the device conductive, and this process is achieved by turning the relay to the B end.
[0276] Step 1122, start a 20s countdown to wait for the zero-crossing signal to stabilize.
[0277] Illustratively, referring to the above step 1112, a countdown is set to wait for the zero-crossing signal to become stable before counting; 20 seconds is a preset time length, which is not limited here.
[0278] Step 1123, after the countdown ends, the average low level duration of the zero-crossing signal within 5 seconds is counted.
[0279] Indicatively, referring to the above step 1113, after the countdown ends, the low level duration of the zero-crossing signal in 250 cycles within 5 seconds is counted, wherein 5 seconds can be regarded as the second duration for obtaining the second low level duration, which is not limited here.
[0280] Step 1124, record the low level duration B.
[0281] Indicatively, the second time duration is 5s, and the sum of the low-level time durations in the zero-crossing signal counted within 5s is taken as the low-level time duration B (the second low-level time duration); or, the quotient of the sum of the low-level time durations in the zero-crossing signal counted within 5s and 5s is taken as the low-level time duration B (the second low-level time duration), etc., which is not limited here.
[0282] Step 1130, average low level duration.
[0283] Indicatively, considering the power supply fluctuation of the power grid and the aging of lamps, the average value X of the low-level duration A and the low-level duration B is taken, that is: X=(A+B) / 2, and the average value is the above-mentioned duration evaluation benchmark.
[0284] Step 1131, obtaining a calibration threshold based on the average low-level duration.
[0285] Indicatively, the average value X±0.2ms is used as the judgment threshold of the switch state, wherein 0.2ms is the duration adjustment parameter.
[0286] That is: the low level duration threshold T1 of the zero-crossing signal = X-0.2ms (ie: the lower limit threshold of the evaluation duration); the low level duration threshold T2 of the zero-crossing signal = X+0.2ms (ie: the upper limit threshold of the evaluation duration).
[0287] Step 1132, switch state detection logic at this time (first evaluation logic).
[0288] Indicatively, under normal circumstances, the low-level duration of the zero-crossing signal when turning off the light is greater than the low-level duration of the zero-crossing signal when turning on the light, so the default switch state detection logic is: when the low-level duration of the zero-crossing signal input by INT1 (the third low-level duration) is less than X-0.2ms, it is considered that the lamp is currently in the on state; when the low-level duration of the zero-crossing signal input by INT1 is greater than X+0.2ms, it is considered that the lamp is currently in the off state.
[0289] That is: when the low level duration of the zero-crossing signal is ≤T1, the switch state is the light-on state (the device considers that the controlled device is in the on state); when the low level duration of the zero-crossing signal is ≥T2, the switch state is the light-off state (the device considers that the controlled device is in the off state).
[0290] Step 1140, manually trigger the switch to observe whether the switch state and the load state are synchronized.
[0291] Illustratively, the controlled trigger switch performs a device control operation on the first control device; the switch state is a state control result determined based on the first evaluation logic; and the load state is a device operation result determined based on the device control operation.
[0292] If after automatic calibration, the indicator light status (reflecting the switch status) and the lamp status (reflecting the load status) of the smart switch are the same, it means that the current first evaluation logic is suitable as the evaluation logic for evaluating the device control status. Then the switch status evaluated by the first evaluation logic can be used as the device control status, and the following step 1150 is executed.
[0293] If after automatic calibration, the indicator light status (reflecting the switch status) of the smart switch is opposite to the lamp status (reflecting the load status), it means that a special situation has occurred where the low-level duration of the zero-crossing signal when turning off the light is shorter than the low-level duration of the zero-crossing signal when turning on the light. Therefore, the current first evaluation logic is not suitable as the evaluation logic for evaluating the control status of the device, and the first evaluation logic needs to be adjusted.
[0294] Step 1141, press and hold the button for 10 seconds, the indicator light starts to flash quickly, then release it and press and hold it again for 5 seconds to automatically reverse the judgment logic.
[0295] Indicatively, the user can long press the button of the smart switch for 10 seconds, wait for the command light to flash quickly, and then release it, and then long press the same button for 5 seconds, wait for the indicator light to flash quickly, and then release it. The device will swap the logic of switch status detection, that is, reverse the first evaluation logic to the second evaluation logic.
[0296] Step 1142, switch status detection logic at this time.
[0297] Indicatively, the second evaluation logic after inversion is: when the low-level duration of the zero-crossing signal input by INT1 is less than X-0.2ms, it is considered that the lamp is currently in the off state; when the low-level duration of the zero-crossing signal input by INT1 is greater than X+0.2ms, it is considered that the lamp is currently in the on state.
[0298] That is, when the low level duration of the zero-crossing signal is ≥ T2, the switch state is the light-on state; when the low level duration of the zero-crossing signal is ≤ T1, the switch state is the light-off state.
[0299] After the second evaluation logic is obtained, the following step 1150 is performed.
[0300] Step 1150, save T1 and T2 and the detection logic in the device flash to ensure that they are still effective after power failure and restart.
[0301] Illustratively, if the switch state of the smart switch and the lamp state are the same, the first evaluation logic is stored to evaluate the device control state of the first control device over the controlled device in a future time period; if the switch state of the smart switch and the lamp state are different, the second evaluation logic is stored to evaluate the device control state of the first control device over the controlled device in a future time period.
[0302] It is worth noting that the above are merely illustrative examples and are not limited to the embodiments of the present application.
[0303] To sum up, when inferring the control state of the controlled device by the first control device through the zero-crossing detection circuit, it is not simply relying on the analysis result of the zero-crossing detection circuit on the on-off condition of the AC power, but analyzing the device control state through the low-level duration of the zero-crossing signal. The low-level duration can reflect the on-off of the AC power while showing richer voltage and current detail information. Combining the low-level duration under the conduction of different input terminals and current output terminals, the on-off information of the controlled device can be more abundant and comprehensive, which helps to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device.
[0304] In an embodiment of the present application, a method for judging the state of a load switch according to the low-level duration of a zero-crossing signal is introduced. The load lamp can be automatically switched on and off by the device, and the low-level duration of the zero-crossing signal in two states is recorded. A calibration threshold of the switch state is calculated based on this duration, thereby achieving compatibility with different lamps and different induced voltages, solving the problem that a single-fire switch must be connected in parallel with a capacitor to determine the state under abnormal circumstances, simplifying the state determination process, and improving the accuracy and efficiency of state determination.
[0305] Fig.12 is a structural block diagram of a device state acquisition apparatus provided by an exemplary embodiment of the present application, such as Fig.12 As shown, the device includes the following parts:
[0306] A receiving module 1210 is used to receive a device calibration operation, where the device calibration operation is used to calibrate a device state of a first control device, where the first control device is used to control a controlled device, where the first control device includes a first input terminal, a second input terminal, and a first current output terminal, where the first current output terminal is connected to the controlled device;
[0307] The control module 1220 is used to control the first input terminal and the first current output terminal to be connected in response to the device calibration operation, and obtain a first low-level duration; wherein the low-level duration is used to represent the low-level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit;
[0308] The control module 1220 is further used to control the second input terminal to be connected to the first current output terminal to obtain a second low level duration;
[0309] The determination module 1230 is used to determine the device control state of the first control device on the controlled device based on the first low-level duration and the second low-level duration, and the device control state is used to characterize the influence result of the first control device on the controlled device.
[0310] In an optional embodiment, the determination module 1230 is also used to obtain a calibration threshold for evaluating the control state of the controlled device by the first control device based on the first low-level duration and the second low-level duration; and determine the device control state of the controlled device by the first control device in a future time period through the calibration threshold.
[0311] In an optional embodiment, the determination module 1230 is also used to perform numerical operations on the first low-level duration and the second low-level duration to obtain a duration evaluation benchmark, and the numerical operation includes at least one of a mean operation and a weighted sum operation; based on the duration evaluation benchmark, an upper limit threshold of the evaluation duration and a lower limit threshold of the evaluation duration are obtained as the calibration threshold, and the upper limit threshold of the evaluation duration is used to evaluate the device shutdown state, and the lower limit threshold of the evaluation duration is used to evaluate the device startup state.
[0312] In an optional embodiment, the determination module 1230 is also used to obtain a duration adjustment parameter; perform a first duration adjustment on the duration evaluation benchmark using the duration adjustment parameter to obtain the evaluation duration upper limit threshold; perform a second duration adjustment on the duration evaluation benchmark using the duration adjustment parameter to obtain the evaluation duration lower limit threshold.
[0313] In an optional embodiment, the determination module 1230 is also used to receive a device control operation, and the device control operation is used to adjust the device state of the controlled device through the first control device; detect the third low level duration generated by the first control device based on the device control operation through the zero-crossing detection circuit within the future time period; analyze the third low level duration based on the calibration threshold to determine the device control state of the controlled device by the first control device.
[0314] In an optional embodiment, the determination module 1230 is also used to determine that the device control state of the controlled device by the first control device is a device-off state in response to the third low-level duration being not less than the evaluation duration upper limit threshold; or, in response to the third low-level duration being not greater than the evaluation duration lower limit threshold, determine that the device control state of the controlled device by the first control device is a device-on state.
[0315] In an optional embodiment, the determination module 1230 is also used to determine a first evaluation logic through the calibration threshold, wherein the first evaluation logic is used to evaluate the control of the first control device over the controlled device; use the first evaluation logic to analyze the third low-level duration to obtain a state control result of the first control device over the controlled device; obtain a device operation result of the controlled device based on the device control operation performance; and based on the difference between the state control result and the device operation result, obtain the device control state of the controlled device by the first control device.
[0316] In an optional embodiment, the determination module 1230 is also used to, when the state control result is the same as the device operation result, use the state control result as the device control state of the controlled device by the first control device; or, when the state control result is different from the device operation result, adjust the first evaluation logic to obtain a second evaluation logic corresponding to the calibration threshold; and use the second evaluation logic to determine the device control state of the controlled device by the first control device in the future time period.
[0317] In an optional embodiment, the first control device and the second control device are two control devices used to respectively control the controlled device; wherein the second control device includes a second current output terminal and a current input terminal, the second current output terminal is connected to the first input terminal or the second input terminal of the first control device, and the current input terminal of the second control device is used to connect to the live wire to receive current.
[0318] In an optional embodiment, the control module 1220 is also used to respond to the device calibration operation, and when controlling the first input terminal and the first current output terminal to be turned on, analyze the device circuit of the first control device from at least one dimension of a controlled device dimension and an induced voltage dimension through the zero-crossing detection circuit to obtain the first low-level duration; wherein the controlled device dimension includes the device type of the controlled device, and the induced voltage dimension is used to characterize the induced voltage condition in the device circuit.
[0319] In an optional embodiment, the first control device includes a relay, and the relay is composed of a plurality of contacts and a relay coil;
[0320] The control module 1220 is also used to input a high level signal to the first end of the relay coil and a low level signal to the second end of the relay coil; control the common contact among the multiple contacts to be connected to the normally open contact based on electromagnetic induction, so as to control the first input end to be connected to the first current output end, and obtain the first low level duration;
[0321] The control module 1220 is also used to input a low-level signal to the first end of the relay coil and a high-level signal to the second end of the relay coil; based on electromagnetic induction control, a common contact among the multiple contacts is connected to a normally closed contact to control the conduction between the second input end and the first current output end, and obtain the second low-level duration.
[0322] To sum up, when inferring the control state of the controlled device by the first control device through the zero-crossing detection circuit, it is not simply relying on the analysis result of the zero-crossing detection circuit on the on-off condition of the AC power, but analyzing the device control state through the low-level duration of the zero-crossing signal. The low-level duration can reflect the on-off of the AC power while showing richer voltage and current detail information. Combining the low-level duration under the conduction of different input terminals and current output terminals, the on-off information of the controlled device can be more abundant and comprehensive, which helps to obtain a more accurate device control state, improve the calibration accuracy of the first control device, and thus improve the control accuracy of the first control device over the controlled device.
[0323] It should be noted that the device state acquisition device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device state acquisition device provided in the above embodiment and the device state acquisition method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0324] Fig.13 The block diagram of the structure of an electronic device 1300 provided by an exemplary embodiment of the present application is shown. The electronic device 1300 may be a portable mobile terminal, such as a smart phone, a vehicle-mounted terminal, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The electronic device 1300 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0325] Typically, the electronic device 1300 includes a processor 1301 and a memory 1302 .
[0326] The processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0327] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1302 is used to store at least one instruction, which is used to be executed by the processor 1301 to implement the device status acquisition method provided in the method embodiment of the present application.
[0328] In some embodiments, the electronic device 1300 further includes one or more sensors, including but not limited to: a proximity sensor, a gyroscope sensor, and a pressure sensor.
[0329] The proximity sensor, also called a distance sensor, is usually disposed on the front panel of the electronic device 1300. The proximity sensor is used to collect the distance between the user and the front of the electronic device 1300.
[0330] The gyroscope sensor can detect the body direction and rotation angle of the electronic device 1300, and the gyroscope sensor can cooperate with the acceleration sensor to collect the user's 3D actions on the electronic device 1300. The processor 1301 can implement the following functions based on the data collected by the gyroscope sensor: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0331] The pressure sensor can be set on the side frame of the electronic device 1300 and / or the lower layer of the display screen. When the pressure sensor is set on the side frame of the electronic device 1300, it can detect the user's holding signal of the electronic device 1300, and the processor 1301 performs left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor. When the pressure sensor is set on the lower layer of the display screen, the processor 1301 controls the operability controls on the UI interface according to the user's pressure operation on the display screen. The operability controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0332] In some embodiments, the electronic device 1300 also includes other components, which can be understood by those skilled in the art. Fig.13 The structure shown in the figure does not constitute a limitation on the electronic device 1300, and may include more or less components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0333] The embodiment of the present application also provides a computer device, which can be implemented as a terminal or a server. The computer device includes a processor and a memory, in which at least one instruction, at least one program, code set or instruction set is stored, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the device status acquisition method provided by the above-mentioned method embodiments.
[0334] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the device status acquisition method provided by the above-mentioned method embodiments.
[0335] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the device status acquisition method described in any of the above embodiments.
[0336] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0337] Those skilled in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or by a program to instruct the relevant hardware to complete, and the program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc. The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for acquiring device status, characterized in that: The method comprises: receiving a device calibration operation, the device calibration operation being used to calibrate a device state of a first control device, the first control device being used to control a controlled device, the first control device comprising a first input terminal, a second input terminal, and a first current output terminal, the first current output terminal being connected to the controlled device; In response to the device calibration operation, the first input terminal is controlled to be connected with the first current output terminal, and a first low-level duration is obtained; wherein the low-level duration is used to characterize the low-level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit; Controlling the second input terminal to be connected to the first current output terminal to obtain a second low level duration; Based on the first low-level duration and the second low-level duration, a device control state of the first control device on the controlled device is determined, and the device control state is used to characterize the influence result of the first control device on the controlled device.
2. The method according to claim 1, characterized in that: The determining, based on the first low-level duration and the second low-level duration, a device control state of the controlled device by the first control device includes: Based on the first low-level duration and the second low-level duration, obtaining a calibration threshold for evaluating a control state of the controlled device by the first control device; The device control state of the first control device over the controlled device in a future time period is determined by using the calibration threshold.
3. The method according to claim 2, characterized in that The acquiring, based on the first low-level duration and the second low-level duration, a calibration threshold for evaluating a control state of the controlled device by the first control device includes: Performing a numerical operation on the first low-level duration and the second low-level duration to obtain a duration evaluation benchmark, wherein the numerical operation includes at least one of a mean operation and a weighted sum operation; Based on the duration evaluation benchmark, an evaluation duration upper threshold and an evaluation duration lower threshold are obtained as the calibration threshold, wherein the evaluation duration upper threshold is used to evaluate the device shutdown state, and the evaluation duration lower threshold is used to evaluate the device startup state.
4. The method according to claim 3, characterized in that The obtaining of an upper threshold value and a lower threshold value of the evaluation duration based on the duration evaluation benchmark includes: Get duration adjustment parameters; Performing a first duration adjustment on the duration evaluation benchmark using the duration adjustment parameter to obtain the evaluation duration upper limit threshold; A second duration adjustment is performed on the duration evaluation benchmark using the duration adjustment parameter to obtain the evaluation duration lower limit threshold.
5. The method according to claim 2, characterized in that: The determining, by using the calibration threshold, the device control state of the first control device on the controlled device in a future time period includes: receiving a device control operation, wherein the device control operation is used to adjust a device state of the controlled device through the first control device; Detecting, by the zero-crossing detection circuit, a third low-level duration generated by the first control device based on the device control operation within the future time period; The third low-level duration is analyzed based on the calibration threshold to determine the device control state of the controlled device by the first control device.
6. The method according to claim 5, characterized in that The analyzing the third low level duration based on the calibration threshold to determine the device control state of the controlled device by the first control device includes: In response to the third low level duration being not less than the evaluation duration upper limit threshold, determining that the device control state of the controlled device by the first control device is a device off state; or, In response to the third low level duration being not greater than the evaluation duration lower limit threshold, it is determined that the device control state of the controlled device by the first control device is a device-on state.
7. The method according to claim 5, characterized in that The analyzing the third low level duration based on the calibration threshold to determine the device control state of the controlled device by the first control device includes: Determine a first evaluation logic by using the calibration threshold, where the first evaluation logic is used to evaluate the control situation of the first control device over the controlled device; Analyzing the third low-level duration using the first evaluation logic to obtain a state control result of the controlled device by the first control device; Obtaining a device operation result of the controlled device based on the device control operation performance; Based on the difference between the state control result and the device operation result, the device control state of the controlled device by the first control device is obtained.
8. The method according to claim 7, characterized in that The acquiring, based on the difference between the state control result and the device operation result, the device control state of the controlled device by the first control device includes: In the case where the state control result is the same as the device operation result, the state control result is used as the device control state of the first control device on the controlled device; or, When the state control result is different from the device operation result, the first evaluation logic is adjusted to obtain a second evaluation logic corresponding to the calibration threshold; and the second evaluation logic is used to determine the device control state of the first control device on the controlled device in the future time period.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The first control device and the second control device are two control devices for respectively controlling the controlled device; The second control device comprises a second current output terminal and a current input terminal, the second current output terminal is connected to the first input terminal or the second input terminal of the first control device, and the current input terminal of the second control device is used to connect to a live wire to receive current.
10. The method according to any one of claims 1 to 8, characterized in that: In response to the device calibration operation, controlling the first input terminal to be connected to the first current output terminal to obtain a first low level duration includes: In response to the device calibration operation, when the first input terminal is controlled to be conductive with the first current output terminal, the device circuit of the first control device is analyzed from at least one dimension of a controlled device dimension and an induced voltage dimension by the zero-crossing detection circuit to obtain the first low-level duration; The controlled device dimension includes the device type of the controlled device, and the induced voltage dimension is used to characterize the induced voltage condition in the device circuit.
11. The method according to any one of claims 1 to 8, characterized in that: The first control device includes a relay, and the relay is composed of a plurality of contacts and a relay coil; The controlling the first input terminal to be connected to the first current output terminal to obtain a first low level duration includes: Input a high-level signal to the first end of the relay coil, and input a low-level signal to the second end of the relay coil; control a common contact among the multiple contacts to be connected to a normally open contact based on electromagnetic induction, so as to control the first input end to be connected to the first current output end, and obtain the first low-level duration; The controlling the second input terminal to be connected to the first current output terminal to obtain a second low level duration includes: A low-level signal is input to the first end of the relay coil, and a high-level signal is input to the second end of the relay coil; based on electromagnetic induction control, a common contact among the multiple contacts is connected to a normally closed contact to control the conduction between the second input end and the first current output end, and obtain the second low-level duration.
12. A device status acquisition device, characterized in that: The device comprises: a receiving module, configured to receive a device calibration operation, wherein the device calibration operation is used to calibrate a device state of a first control device, wherein the first control device is used to control a controlled device, wherein the first control device comprises a first input terminal, a second input terminal, and a first current output terminal, wherein the first current output terminal is connected to the controlled device; A control module, configured to control the first input terminal to be connected to the first current output terminal in response to the device calibration operation, and obtain a first low-level duration; wherein the low-level duration is used to characterize the low-level duration of the zero-crossing signal generated when the first control device is detected by the zero-crossing detection circuit; The control module is further used to control the second input terminal to be connected with the first current output terminal to obtain a second low level duration; A determination module is used to determine a device control state of the first control device on the controlled device based on the first low-level duration and the second low-level duration, wherein the device control state is used to characterize the influence result of the first control device on the controlled device.
13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the device status acquisition method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the device status acquisition method according to any one of claims 1 to 11.
15. A computer program product, characterized in that It comprises computer instructions, and when the computer instructions are executed by a processor, the device status acquisition method as described in any one of claims 1 to 11 is implemented.