Switch control method, switch device, and storage medium

By controlling the conduction phase of the switching device, the continuous conduction of the electronic switch at high voltage points is avoided, which solves the problems of relay silver point adhesion and semiconductor switching device burnout, thus extending the life of the switching device and controlling costs.

CN115276623BActive Publication Date: 2026-07-03NINGBO GONEO ELECTRIC APPLIANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NINGBO GONEO ELECTRIC APPLIANCE CO LTD
Filing Date
2022-08-29
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing electronic switches, when controlling high-power loads, suffer from inrush current that causes relay silver contacts to stick together or semiconductor switching devices to burn out, affecting their service life. In addition, the addition of a voltage zero-crossing detection circuit increases product costs.

Method used

By controlling the conduction phase of the switching device, two adjacent conductions are made at high and low voltage points or the voltage difference meets the threshold condition, thus avoiding multiple consecutive conductions at high voltage points. The switching control method is executed by a processor and the corresponding program is stored in the storage medium.

Benefits of technology

Without significantly increasing product costs, improve the service life of switching devices and reduce damage to switching devices caused by inrush current.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115276623B_ABST
    Figure CN115276623B_ABST
Patent Text Reader

Abstract

This application discloses a switch control method, a switch device, and a storage medium, relating to the field of intelligent device control. The method includes: acquiring a first trigger signal, the first trigger signal indicating that a switch device is turned on; responding to the first trigger signal and when the switch device acquires a second trigger signal, turning on in a first phase; controlling the switch device to turn on in a second phase, the second trigger signal being the most recently acquired trigger signal prior to the first trigger signal; wherein the first phase corresponds to a first voltage of an AC power supply, and the second phase corresponds to a second voltage of the AC power supply; the voltage difference between the first voltage and the second voltage is greater than a difference threshold, or both the first voltage and the second voltage are less than a voltage threshold. The switch control method, switch device, and storage medium provided in this application can, to a certain extent, improve the service life of the switch device without significantly increasing product costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent device control, and in particular to a switch control method, a switch device, and a storage medium. Background Technology

[0002] Current electronic switches typically use relays or semiconductor devices as switching devices. When an electronic switch controls a high-power load to conduct at a high voltage point, it will generate a large inrush current. Repeated large inrush currents can cause the silver contacts of the relay to stick together or the semiconductor switching device to burn out, affecting the service life of the electronic switch.

[0003] In related technologies, inrush current is typically reduced by adding a zero-crossing voltage detection circuit and controlling the electronic switch to turn on at zero voltage. However, the additional zero-crossing voltage detection circuit increases product cost. Summary of the Invention

[0004] This application provides a switch control method, a switch device, and a storage medium, which can improve the service life of the switch device to a certain extent without significantly increasing product costs. The technical solution is as follows.

[0005] On one hand, a switch control method is provided, the method being applied to a switch device connected to an AC power source, the method comprising:

[0006] Acquire a first trigger signal, the first trigger signal being used to indicate that the switching device is turned on;

[0007] In response to the first trigger signal and when the switching device acquires the second trigger signal, the first phase is turned on, and the switching device is controlled to turn on the second phase, wherein the second trigger signal is the trigger signal most recently acquired before the first trigger signal;

[0008] Wherein, the first phase corresponds to the first voltage of the AC power supply, and the second phase corresponds to the second voltage of the AC power supply; the voltage difference between the first voltage and the second voltage is greater than a difference threshold, or both the first voltage and the second voltage are less than a voltage threshold.

[0009] Optionally, the phase difference between the first phase and the second phase is 90° + k × 360°, where k is a non-negative integer.

[0010] Optionally, the step of controlling the switching device to turn on in the second phase in response to the first trigger signal and when the switching device acquires the second trigger signal includes:

[0011] In response to the first trigger signal, a first action zone is determined in the phase period corresponding to the AC power supply. The first action zone is used to indicate the selectable time range for turning on the switching device. The first action zone corresponding to the first trigger signal and the second action zone corresponding to the second trigger signal are in the same position in the phase period corresponding to the AC power supply, and the first action zone and the second action zone are each divided into N sub-intervals.

[0012] In response to the switching device receiving the second trigger signal, it is turned on in the first sub-interval of the second operating area, and the switching device is controlled to turn on in the second sub-interval of the first operating area.

[0013] Wherein, the first sub-interval is the interval in which the first phase is located, the second sub-interval is the interval in which the second phase is located, and the first sub-interval and the second sub-interval are separated by at least one of the sub-intervals.

[0014] Optionally, when the first operating zone is half a cycle of the AC power supply and N is an even number, the first sub-interval is spaced (N / 2-1) or (N / 2-2) sub-intervals apart from the corresponding sub-interval within the first operating zone and the second sub-interval.

[0015] When the first operating zone is half a cycle of the AC power supply and N is an odd number, the first sub-interval is spaced [N / 2] or [N / 2-1] sub-intervals apart from the corresponding sub-interval within the first operating zone and the second sub-interval.

[0016] When the first operating zone is one cycle of AC power and N is an even number, the first sub-interval is spaced (N / 4-1) or (N / 4-2) sub-intervals apart from the corresponding sub-interval in the first operating zone and the second sub-interval.

[0017] When the first operating zone is one cycle of AC power and N is an odd number, the first sub-interval is spaced [N / 4] or [N / 4-1] sub-intervals apart from the corresponding sub-interval within the first operating zone and the second sub-interval.

[0018] Optionally, before the switching device is turned on in the second sub-interval of the first operating zone, the method further includes:

[0019] The N sub-intervals are labeled sequentially according to time.

[0020] Determine the second sub-interval corresponding to the first trigger signal;

[0021] Wherein, the labels of the sub-intervals corresponding to the N consecutive conduction operations of the switching device change sequentially from small to large, and the labels of the N sub-intervals arranged in the time sequence satisfy any one of the following conditions:

[0022] When the first operating zone is half a cycle of the AC power supply, the labels of the N sub-intervals arranged in the time order first traverse the odd numbers and then the even numbers, the odd numbers and the even numbers increase sequentially, and the odd numbers and the even numbers are selected from the range [1, N].

[0023] When the first operating zone is one cycle of AC power supply, the sub-interval numbers corresponding to the first and third time periods in the first operating zone are odd numbers, and the sub-interval numbers corresponding to the second and fourth time periods are even numbers. The first, second, third, and fourth time periods are all quarter-cycle time periods and are arranged in the order of time. The odd and even numbers in the first operating zone increase sequentially, and the odd and even numbers are selected from the range [1, N].

[0024] Optionally, before the switching device is turned on in the second sub-interval of the first operating zone, the method further includes:

[0025] Count the number of times the trigger signal is acquired;

[0026] The second sub-interval corresponding to the first trigger signal is determined based on the number of times the trigger signal is acquired.

[0027] Optionally, the method further includes:

[0028] Acquire a power-on signal, the power-on signal being used to indicate that the switching device is connected to the AC power supply;

[0029] Randomly select counting positions and count the number of cycles of the AC power supply at set intervals, wherein the set interval is equal to the cycle of the AC power supply;

[0030] Determining the first operating region in the phase period corresponding to the AC power supply includes: determining the first operating region in the next period after the period corresponding to the first trigger signal, based on the number of cycles of the AC power supply.

[0031] Optionally, the method further includes:

[0032] The counting position is marked during each cycle of the AC power supply;

[0033] Determining the first action zone within the phase period corresponding to the AC power supply further includes: within the period corresponding to the first action zone, taking the time corresponding to the counting position as the start time of the first action zone.

[0034] On the other hand, a switching device is provided, the switching device including a processor and a memory, the memory storing at least one program, the at least one program being loaded and executed by the processor to implement the switching control method as described in the embodiments of this application above.

[0035] In another aspect, a computer-readable storage medium is provided, wherein at least one program is stored therein, the at least one program being loaded and executed by a processor to implement the switch control method as described in the embodiments of this application above.

[0036] The beneficial effects of the technical solutions provided in this application include at least the following:

[0037] The switch control method provided in this application controls the phase of the switch device each time it is turned on, ensuring that the voltage difference between the first voltage and the second voltage corresponding to two consecutive turns of the switch device is greater than a threshold difference. This results in two consecutive turns of the switch device occurring at voltage high and low points, respectively. Alternatively, both the first and second voltages are less than the threshold voltage, ensuring that two consecutive turns of the switch device occur at voltage low points, thus avoiding the situation where the switch device turns on multiple times consecutively at voltage high points. Compared to related technologies that randomly select the turn-on time or add a voltage zero-crossing detection circuit, the switch control method provided in this application can improve the service life of the switch device to a certain extent without significantly increasing product costs. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart of a switch control method provided in an embodiment of this application;

[0040] Figure 2 This is a flowchart of another switch control method provided in an embodiment of this application;

[0041] Figure 3 This is a control schematic diagram of a switch control method provided in an embodiment of this application;

[0042] Figure 4This is a control schematic diagram of another switch control method provided in the embodiments of this application;

[0043] Figure 5 This is a schematic diagram of the structure of a switching device provided in an embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0045] In related technologies, a switching device is installed between the AC power supply and electrical loads such as lighting fixtures. This switching device controls whether the power circuit containing the electrical load is conducting. When the user's input meets certain conditions, the switching device can respond to the user's input and conduct, thus allowing the electrical load to draw power and operate normally. Typically, the timing of the switching device's conduction is randomly selected. Since the magnitude of AC voltage also varies over time, when the switching device's conduction time corresponds to a voltage high point, the inrush current generated at the moment of conduction will be relatively large. In scenarios where the switching device conducts multiple times consecutively within a short period, if the switching device conducts at a voltage high point each time, the repeated large inrush currents may cause the silver contacts of the relays in the switching device to stick together or the semiconductor switching devices to burn out, thereby affecting the service life of the switching device.

[0046] To prevent the electronic components inside the switching device from burning out and thus extend its lifespan, related technologies typically incorporate a zero-crossing voltage detection circuit. This circuit controls the switching device to turn on near zero voltage to minimize the inrush current generated each time it turns on. However, the added zero-crossing voltage detection circuit increases product cost.

[0047] In response, this application provides a switch control method that can improve the service life of a switch device to a certain extent without significantly increasing product costs.

[0048] like Figure 1 As shown, this application provides a switch control method, which is applied to a switch device connected to an AC power source. The switch control method provided in this application includes:

[0049] S101, Obtain the first trigger signal.

[0050] The first trigger signal is used to indicate that the switching device is turned on.

[0051] In this embodiment, the first trigger signal is the trigger signal acquired at the current moment. Before the first trigger signal, the switching device may have acquired other trigger signals at least once, and the switching device can turn on in response to each trigger signal acquired.

[0052] like Figure 3 and Figure 4 As shown, the voltage of the AC power supply changes periodically with time according to a sinusoidal function. The conduction moment of the switching device in response to the trigger signal can correspond to a phase and voltage of the AC power supply. In some embodiments, the phase or voltage corresponding to the conduction of the switching device can be determined based on the moment when the switching device switches from the off state to the on state, or it can also be determined based on the moment when the processor sends an action signal to the actuating element.

[0053] S102. In response to the first trigger signal and when the switching device acquires the second trigger signal, the first phase is turned on, and the switching device is controlled to turn on in the second phase.

[0054] In this embodiment, the second trigger signal is the most recently acquired trigger signal preceding the first trigger signal. In other words, the second trigger signal and the first trigger signal are trigger signals acquired twice consecutively by the switching device. Specifically, the switching device can first acquire the second trigger signal and, in response to the second trigger signal, turn on in the first phase. Then, the switching device can acquire the first trigger signal and, in response to the first trigger signal, turn on in the second phase.

[0055] For example, in a button-type switch, when the user switches the button to the "on" state, the switch can receive a trigger signal and thus turn on; as another example, in a motion-activated switch (such as a voice-activated switch), when the external environment input meets certain conditions (such as the sound reaching a certain decibel level), the switch can receive a trigger signal and thus turn on.

[0056] It is understood that both the first trigger signal and the second trigger signal are trigger signals used to indicate the activation of the switching device. The terms "first" and "second" are used only for easy distinction and should not be interpreted as indicating their order of occurrence.

[0057] In the switch control method provided in this application embodiment, the first phase corresponding to the switch device being turned on in response to the second trigger signal and the second phase corresponding to the switch device being turned on in response to the first trigger signal satisfy the following: the first phase corresponds to the first voltage of the AC power supply, and the second phase corresponds to the second voltage of the AC power supply; the voltage difference between the first voltage and the second voltage is greater than the difference threshold, or both the first voltage and the second voltage are less than the voltage threshold.

[0058] Therefore, the switch control method provided in this application embodiment controls the phase of the switch device each time it is turned on, ensuring that the voltage difference between the first voltage and the second voltage corresponding to two adjacent turns of the switch device is greater than a threshold difference. This results in the switch device turning on at voltage high and low points respectively for two consecutive turns. Alternatively, both the first and second voltages are less than the threshold voltage, ensuring that both adjacent turns of the switch device turn on at voltage low points, thus avoiding the situation where the switch device turns on multiple times consecutively at voltage high points. Compared to related technologies that randomly select the turn-on time or add a voltage zero-crossing detection circuit, the switch control method provided in this application embodiment can improve the service life of the switch device to a certain extent without significantly increasing product costs.

[0059] In this embodiment, the difference threshold and voltage threshold can be set by the product developer. For example, the difference threshold can be 100%-10% of the maximum AC power supply voltage, such as 100%, 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, etc. Specifically, when the difference threshold is 10% of the maximum AC power supply voltage, if the switching device turns on in response to the second trigger signal at the maximum AC power supply voltage Umax, then after receiving the first trigger signal, the switching device can turn on in response to the first trigger signal within the voltage range of [0, 90% * Umax].

[0060] The voltage threshold can be 10%-90% of the maximum voltage value of the AC power supply, for example, it can be 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%, etc. Specifically, when the voltage threshold can be 90% of the maximum voltage value of the AC power supply, if the switching device turns on in response to the second trigger signal at 90%*Umax, then after the switching device receives the first trigger signal, the switching device can turn on in response to the first trigger signal within the voltage range of [0, 90%*Umax]. In the embodiments of this application, the difference threshold and the voltage threshold are related to the maximum voltage value of the AC power supply.

[0061] Optionally, in the embodiments of this application, the phase difference between the first phase and the second phase can be 90°+k×360°, where k is a non-negative integer.

[0062] As mentioned above, the voltage of the AC power supply changes periodically with time according to a sinusoidal function. For ease of explanation, taking the first and second phases as examples where the first and second phases are in the same period, with a phase difference of 90° between them, we can see that when the first phase is selected from the range [π / 4, 3π / 4], the corresponding first voltage value is relatively high, while when the second phase is selected from the range [3π / 4, 5π / 4], the corresponding second voltage value is relatively low. This ensures that the voltage difference between the first and second voltages is greater than a threshold value. When the first and second phases happen to be near π / 2 and π respectively, the first and second voltages are located near the highest and lowest voltages, respectively. This effectively prevents the switching device from conducting twice consecutively near the highest voltage, thus minimizing the average value of the inrush current generated by the two conductions.

[0063] When the first and second phases happen to be around π / 4 and 3π / 4 respectively, the first and second voltages are quite similar. However, the voltage values ​​at these positions are relatively small, satisfying the condition that both the first and second voltages are less than a voltage threshold. Correspondingly, this voltage threshold can be roughly determined as the voltage value corresponding to a phase of π / 4.

[0064] In some embodiments, the switch control method may include: in response to a second trigger signal, controlling a switch device to conduct in a first phase and setting a first marker bit at the first phase; continuously setting candidate marker bits at predetermined time intervals, the predetermined time interval being equal to the cycle of the AC power supply; after receiving the first trigger signal, the switch device determines the next candidate marker bit adjacent to the first trigger signal and uses it as the target marker bit; and the value obtained by adding 90° to the phase corresponding to the target marker bit is used as the second phase. The first phase when the switch device conducts in response to the second trigger signal may be randomly selected, for example, when the second trigger signal is the first trigger signal acquired by the switch device; or, the first phase may be determined based on the phase corresponding to the most recently acquired trigger signal before the second trigger signal.

[0065] like Figure 2 As shown in the illustration, this application also provides a switch control method, which is applied to a switch device connected to an AC power source. The switch control method provided in this application can be executed by a processor in the switch device, and the method may include:

[0066] S201, Obtain the first trigger signal.

[0067] The first trigger signal is the trigger signal acquired at the current moment. The first trigger signal can be acquired by the switching device in response to certain conditions of the external environment. For example, for a button-type switch, the switching device can acquire a trigger signal when the user switches the button to the "on" state; as another example, for a motion-activated switch, the switching device can acquire a trigger signal when the sound reaches a certain decibel level.

[0068] S202. In response to the first trigger signal, determine the first operating zone in the phase period corresponding to the AC power supply.

[0069] After receiving the first trigger signal, the switching device can determine the approximate time range within which it will perform the conduction operation. In other words, the first action zone can be used to indicate the selectable time range for turning on the switching device. Furthermore, the time interval between the starting position of the first action zone and the time of receiving the first trigger signal can, to some extent, reflect the response speed of the switching device.

[0070] It should be noted that the first operating zone is a selectable time range for the switching device to perform a conducting operation. The switching device can change from an open state to a conducting state at a specific moment within this first operating zone. This first operating zone should not be construed as indicating the duration for which the switching device remains conducting.

[0071] It should also be noted that, as mentioned above, the voltage of alternating current changes periodically with time according to a sinusoidal function. Based on this, when the phase is within the range of 0°-360°, this phase can also be understood as changing periodically with time. That is to say, the "phase period" in this embodiment can be understood as the period of phase change when the phase of the alternating current is within the range of 0°-360°. During the continuous supply of AC power, there are multiple consecutive phase periods, and this phase period is the same as the voltage change period.

[0072] In this embodiment, for each acquired trigger signal, the switching device responds to the trigger signal, determines the corresponding operating region, and then performs the conduction operation corresponding to the current trigger signal within that operating region. That is, before acquiring the first trigger signal, the switching control method provided in this embodiment may further include: acquiring a second trigger signal, and responding to the second trigger signal by determining a second operating region within the phase period corresponding to the AC power supply. This second operating region can be used to indicate a selectable time range for turning on the switching device in response to the second trigger signal.

[0073] The first operating region corresponding to the first trigger signal and the second operating region corresponding to the second trigger signal are located at the same position within the phase cycle corresponding to the AC power supply. In this embodiment, "same position within the phase cycle" can be understood as: when the phase value is within the range of 0°-360°, the phase value variation range corresponding to the first operating region and the second operating region is the same. For example, the phase value variation range of both the first operating region and the second operating region is 36°-216°, or the phase value variation range of both the first operating region and the second operating region is 36°-396°. In some embodiments, the first operating region and the second operating region may overlap; or, the first operating region and the second operating region may be separated by at least one cycle.

[0074] Optionally, the first and second action regions can each be equally divided into N sub-intervals. Since the first and second action regions are in the same position within the phase period, and both action regions are equally divided, the m-th sub-interval of the first action region and the m-th sub-interval of the second action region are also in the same position within the phase period, where m is selected from the range [1, N]. When comparing two sub-intervals within different phase periods, the two sub-intervals can be mapped to the same phase period for comparison.

[0075] In response to different trigger signals, the switching device can be turned on in different sub-intervals. When the N value and the phase value variation range corresponding to the operating zone (i.e., the operating zone span) are determined, the phase difference between different sub-intervals can be determined. By controlling the switching device to be turned on in different sub-intervals, the relationship between the first and second voltages corresponding to two adjacent turn-on operations of the switching device can be modulated.

[0076] In this embodiment, the switching device responds to a second trigger signal and conducts within a first sub-interval of the second operating region; and the switching device responds to a first trigger signal and conducts within a second sub-interval of the first operating region, wherein the first sub-interval is the interval containing the first phase, and the second sub-interval is the interval containing the second phase. The first and second sub-intervals may be separated by at least one sub-interval. By controlling the number of separated sub-intervals, the conditions can be met between the first voltage corresponding to the first phase and the second voltage corresponding to the first phase: the voltage difference between the first voltage and the second voltage is greater than a difference threshold, or both the first voltage and the second voltage are less than a voltage threshold.

[0077] Optionally, the second sub-interval corresponding to the first trigger signal and the first sub-interval corresponding to the second trigger signal can satisfy any of the following conditions:

[0078] When the first operating zone is half a cycle of the AC power supply and N is an even number, the first sub-interval is spaced (N / 2-1) or (N / 2-2) sub-intervals apart from the corresponding sub-interval and the second sub-interval within the first operating zone.

[0079] When the first operating zone is half a cycle of the AC power supply and N is an odd number, the first sub-interval is spaced [N / 2] or [N / 2-1] sub-intervals apart from the corresponding sub-interval and the second sub-interval within the first operating zone;

[0080] When the first operating zone is one cycle of AC power and N is an even number, the first sub-interval is spaced (N / 4-1) or (N / 4-2) sub-intervals apart from the corresponding sub-interval and the second sub-interval within the first operating zone.

[0081] When the first operating zone is one cycle of the AC power supply and N is an odd number, the first sub-interval is spaced [N / 4] or [N / 4-1] sub-intervals apart from the corresponding sub-interval and the second sub-interval within the first operating zone.

[0082] In this embodiment of the application, the number of sub-intervals between the first sub-interval and the second sub-interval is controlled according to the value of N, so as to ensure that the phase difference between the first phase corresponding to the first sub-interval and the second phase corresponding to the second sub-interval is basically around 90°, thereby making the voltage difference between the first voltage corresponding to the first phase and the second voltage corresponding to the second phase greater than the difference threshold, or making both the first voltage and the second voltage less than the voltage threshold.

[0083] Figure 3 An exemplary embodiment is shown where the first operating region is half a cycle of the AC power supply and N is 10. When the switching device is turned on for the first time (e.g., in response to a second trigger signal), the turning position corresponds to the first sub-interval in the second operating region arranged chronologically (i.e., the first sub-interval corresponding to the second trigger signal). When it is turned on for the second time (e.g., in response to the first trigger signal), the turning position corresponds to the sixth sub-interval in the first operating region arranged chronologically (i.e., the second sub-interval corresponding to the first trigger signal). After mapping the first sub-interval in the second operating region to the first operating region, there is a four-interval gap between the first and second sub-intervals. Each sub-interval spans 18°. When the switching device is turned on at the same position in each sub-interval, for example, at the beginning of each sub-interval, the phase difference between the second phase corresponding to the first trigger signal and the first phase corresponding to the second trigger signal is 90°.

[0084] Furthermore, after the first trigger signal, the switching device may acquire a third trigger signal, which is the most recently acquired trigger signal after the first trigger signal. In response to this third trigger signal, when the switching device is turned on for the third time, this turn-on position may correspond to the second sub-interval (hereinafter referred to as the third sub-interval) arranged in chronological order within the third operating zone. Therefore, when mapped to the same cycle, the third sub-interval is separated from the second sub-interval by three sub-intervals, and the phase difference between the second phase corresponding to the first trigger signal and the third phase corresponding to the third trigger signal can be 72°, which is close to 90°. The switching device repeats this process after receiving another trigger signal.

[0085] Furthermore, when the first operating zone is half a cycle of the AC power supply and N is 11, the first sub-interval can be the first sub-interval arranged in chronological order in the second operating zone, and the second sub-interval can be the seventh sub-interval arranged in chronological order in the first operating zone. After mapping the first sub-interval in the second operating zone to the first operating zone, there is a five-interval gap between the first and second sub-intervals. The phase difference between the second phase corresponding to the first trigger signal and the first phase corresponding to the second trigger signal can be approximately 98°, which is close to 90°. The third sub-interval corresponding to the third trigger signal can be the second sub-interval arranged in chronological order in the third operating zone. There is a four-interval gap between the third sub-interval and the second sub-interval. The phase difference between the second phase corresponding to the first trigger signal and the third phase corresponding to the third trigger signal can be approximately 82°. The switching device repeats this process after receiving the trigger signal again. In this embodiment, [N / 2] or [N / 2-1] represents rounding. For example, when N is 11, [N / 2] takes the value 5, and [N / 2-1] takes the value 4.

[0086] When the first operating region is half a cycle of the AC power supply and N is 9, the first sub-interval in the second operating region is mapped to the first operating region. There are four sub-intervals between the first sub-interval and the second sub-interval. The phase difference between the first phase and the second phase can be about 100°. There are three sub-intervals between the third sub-interval and the second sub-interval. The phase difference between the second phase and the third phase can be about 80°.

[0087] In other words, in the embodiments of this application, when the first operating region is half a cycle of the AC power supply, the phase difference between the first phase and the second phase can be [90-180° / N, 90+180° / N], where N can be an integer not less than 3.

[0088] Figure 4 An exemplary embodiment is shown where the first operating region is one cycle of AC power and N is 20. Compared to Figure 3In the corresponding embodiment, the interval between the sub-intervals corresponding to two consecutive conductions of the switching device is approximately [N / 2] sub-intervals. Figure 4 In the corresponding embodiment, the sub-intervals corresponding to two consecutive conductions of the switching device should be spaced approximately [N / 4] sub-intervals apart. As mentioned above, in the embodiments of this application, [N / 4] or [N / 4-1] represents rounding. For example, when N is 19, [N / 4] takes the value of 4, and [N / 4-1] takes the value of 3; or, for example, when N is 21, [N / 4] takes the value of 5, and [N / 4-1] takes the value of 4.

[0089] In this embodiment of the application, when the first operating region is one cycle of the AC power supply, the phase difference between the first phase and the second phase can be [90-360° / N, 90+360° / N], where N can be an integer not less than 5.

[0090] In other embodiments, the action zone corresponding to the trigger signal can also be of other lengths. Currently, the cycle of standard AC power is 20ms. To reduce the amount of computation, N in this embodiment is preferably an even number. When the first action zone is half a cycle of AC power, N can be selected from an integer between [8, 12]; when the first action zone is one cycle of AC power, N can be selected from an integer between [18, 22].

[0091] For ease of explanation, Figure 3 and Figure 4 The trigger position for each acquired trigger signal is marked. In actual data processing, the trigger position corresponding to each trigger signal may or may not be marked.

[0092] Optionally, the switch control method may further include: acquiring a power-on signal, the power-on signal being used to indicate that the switch device is connected to an AC power source; randomly selecting a counting position and counting the number of AC power cycles at set intervals, wherein the set time is equal to the AC power cycle. Correspondingly, determining the first operating zone in the phase cycle corresponding to the AC power source may include: determining the first operating zone in the next cycle corresponding to the first trigger signal based on the number of AC power cycles.

[0093] After the switching device is connected to AC power, it receives a power-on signal, indicating that it is functioning normally. The switching device can then randomly select a time to begin counting; this selected time serves as the counting position and is marked. The switching device can mark the counting position again at intervals of one cycle, thus the time span between two adjacent counting positions constitutes one cycle.

[0094] After acquiring the first trigger signal, the switching device can use the time span between the most recent counting position before the first trigger signal (hereinafter referred to as the first counting position) and the most recent counting position after the first trigger signal (hereinafter referred to as the second counting position) as the period in which the first trigger signal is located. Then, the time span between the second counting position and its next counting position (hereinafter referred to as the third counting position) can be used as the next period, and the first operating zone corresponding to the first trigger signal can be determined within this period. In some embodiments, the switching device may not mark the counting positions, but only count the number of AC power cycles based on timing.

[0095] By setting the action interval within the next cycle of the trigger signal, sufficient data processing time can be reserved for the switching device to determine the sub-interval corresponding to the trigger signal acquired at the current moment. In other embodiments, the action interval can also be set within the k-th cycle after the trigger signal, where k is a non-negative integer.

[0096] Further optionally, the switch control method may also include: marking the counting position in each cycle of the AC power supply; determining the first operating zone in the phase cycle corresponding to the AC power supply; and further including: taking the time corresponding to the counting position as the start time of the first operating zone in the cycle corresponding to the first operating zone.

[0097] To facilitate determining the location of the action zone and shorten the response time of the switching device, the time corresponding to the counting position can be used as the start time of the action zone, that is, the start time of each cycle can be used as the start time of the action zone. In other embodiments, the time corresponding to a set time after the counting position can also be used as the start time of the action zone.

[0098] S203. Mark N sub-intervals in chronological order.

[0099] As mentioned above, the voltage of the AC power supply changes over time, and the "time sequence" in this embodiment can be understood as the order of earlier to later times. Figure 3 and Figure 4 In this context, the time sequence is represented from left to right.

[0100] In this embodiment of the application, the labels of the N sub-intervals arranged in chronological order satisfy any one of the following conditions:

[0101] When the first operating zone is half a cycle of the AC power supply, the labels of the N sub-intervals arranged in chronological order first traverse odd numbers and then even numbers, with odd and even numbers increasing sequentially, and the odd and even numbers being selected from the range [1, N]; or

[0102] When the first operating zone is one cycle of the AC power supply, the sub-interval numbers corresponding to the first and third time periods in the first operating zone are odd numbers, and the sub-interval numbers corresponding to the second and fourth time periods are even numbers. The first, second, third, and fourth time periods are all quarter-cycle time periods and are arranged in chronological order. The odd and even numbers in the first operating zone increase sequentially, and the odd and even numbers are selected from the range [1, N].

[0103] like Figure 3 As shown, when the first operating zone is half a cycle of the AC power supply, the N sub-intervals are labeled from left to right as 1, 3...N-3, N-1, 2, 4...N-2, N. That is, the N sub-intervals arranged in chronological order can be essentially divided into two parts: the earlier first part is labeled with successively increasing odd numbers, and the later second part is labeled with successively increasing even numbers. In some embodiments, when N is odd, the first part may include more sub-intervals than the second part.

[0104] like Figure 4 As shown, when the first operating zone is one cycle of AC power, the N sub-intervals are labeled from left to right as 1, 3...N / 2-3, N / -1, 2, 4...N / 2-2, N / 2, N / 2+1, N / 2+3...N-3, N / -1, N / 2+2, N / 2+4...N-2, N. That is, the N sub-intervals arranged in chronological order can be essentially divided into four equal parts, where the first and third parts are labeled with successively increasing odd numbers, and the second and fourth parts are labeled with successively increasing even numbers. In some embodiments, when N is odd, the number of sub-intervals included in the first or third part may be greater than the number of sub-intervals included in the other parts.

[0105] S204. Determine the second sub-interval corresponding to the first trigger signal.

[0106] In this embodiment, the labels of the sub-intervals corresponding to N consecutive conduction operations of the switching device can change sequentially from small to large. That is, the labels of the sub-intervals corresponding to N consecutive conduction operations can be 1, 2, 3, 4, 5...N. In this way, the conduction time of two adjacent conductions of the switching device is approximately one-quarter of a cycle apart, so the phase difference can be maintained at about 90°.

[0107] Optionally, the switch control method may further include: counting the number of times the trigger signal is acquired; and determining the second sub-interval corresponding to the first trigger signal based on the number of times the trigger signal is acquired.

[0108] For example, such as Figure 3As shown, when the switching device receives a trigger signal for the first time, the target sub-interval corresponding to that trigger signal can be determined as the first sub-interval in the action area; when the switching device receives a trigger signal for the second time, the target sub-interval corresponding to that trigger signal can be determined as the sixth sub-interval in the action area; when the switching device receives a trigger signal for the third time, the target sub-interval corresponding to that trigger signal can be determined as the second sub-interval in the action area, and so on. By determining the number of times the first trigger signal is received at the current moment, the second sub-interval corresponding to that first trigger signal can be determined.

[0109] After the switching device receives N trigger signals, the number of signals received can be reset to zero, and the above steps can be repeated.

[0110] In some embodiments, the switching device may not need to mark the aforementioned N sub-intervals. In this case, determining the second sub-interval corresponding to the first trigger signal may include:

[0111] In response to the switching device acquiring the second trigger signal, the first phase is turned on; the phase difference or number of sub-intervals between the second phase and the first phase is determined according to the duration span of the first operating zone and the value of N; the second sub-interval corresponding to the first trigger signal is determined according to the phase difference. As shown above, the phase difference between the second phase and the first phase can be [90-180° / N, 90+180° / N], where N can be an integer not less than 3; or the phase difference can be [90-360° / N, 90+360° / N], where N can be an integer not less than 5.

[0112] S205, The control switch is turned on in the second sub-section.

[0113] In the embodiments of this application, such as Figure 3 and Figure 4 As shown, in response to the first trigger signal, the switching device can perform a conduction operation at the beginning of the second sub-interval. Since the switching device requires a certain reaction time to conduct, performing the conduction operation at the beginning of the second sub-interval can effectively ensure that the switching device completes the transition from the off state to the on state within the corresponding time range of the second sub-interval.

[0114] In other embodiments, in response to the first trigger signal, the switching device can also be controlled to perform a conduction operation at any time in the second sub-interval.

[0115] The switch control method provided in this application determines the corresponding action range based on the trigger signal, and the action range is divided into N sub-ranges. By controlling the switch device to conduct in different sub-ranges, the relationship between the first voltage and the second voltage corresponding to two adjacent conduction operations of the switch device can be modulated.

[0116] In this embodiment, the value of N needs to meet a certain range. If N is too large or too small, the switching device may continuously conduct at a higher voltage position. Therefore, before obtaining the first trigger signal, the value of N can be determined through the following steps:

[0117] Set the initial value of N to N0, and turn on the switching device at least twice consecutively according to the above switching control method; determine the third voltage corresponding to the current trigger signal and the fourth voltage corresponding to the previous trigger signal; determine the difference between the third voltage and the fourth voltage; in response to the difference not being greater than the difference threshold, compare the third voltage and the fourth voltage with the voltage threshold respectively; in response to the third voltage and the fourth voltage not being less than the voltage threshold, replace N0 with N0+1 and repeat the above steps; in response to the difference being greater than the first voltage threshold or the third voltage and the fourth voltage being less than the voltage threshold, take the current value of N0 as the final value of N.

[0118] In this embodiment, the third and fourth voltages can be acquired using voltage sensors, and the initial value of N can start from a small value and be gradually increased during testing to ultimately determine a suitable value for N. In other embodiments, the initial value of N can also start from a small value and be gradually decreased during testing to ultimately determine a suitable value for N.

[0119] Figure 5 A schematic diagram of a switching device provided in an exemplary embodiment of this application is shown. The switching device may include a processor 501 and a memory 502. The processor 501 includes one or more processing cores, and executes various functional applications and data processing by running software programs and modules. The memory 502 is connected to the processor 501 via a bus. The memory 502 can be used to store at least one instruction, which the processor 501 uses to execute to implement the various steps in the above method embodiments.

[0120] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into the terminal. The computer-readable storage medium stores at least one instruction, at least one program segment, code set, or instruction set. The at least one instruction, at least one program segment, code set, or instruction set is loaded and executed by a processor to implement the above-described switch control method.

[0121] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0122] It should be noted that in this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance, nor are they used to indicate a specific order. The term "multiple" refers to two or more, unless otherwise expressly defined.

[0123] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A switching control method, characterized in that, The method is applied to a switching device connected to an AC power source, and the method includes: A first trigger signal is acquired, which is used to indicate that the switching device is turned on; wherein, the most recently acquired trigger signal before the first trigger signal is the second trigger signal; In response to the switching device being turned on in the first phase when it receives the second trigger signal, the switching device is controlled to be turned on in the second phase based on the first trigger signal; Wherein, the first phase corresponds to the first voltage of the AC power supply, and the second phase corresponds to the second voltage of the AC power supply; the voltage difference between the first voltage and the second voltage is greater than a difference threshold, or both the first voltage and the second voltage are less than a voltage threshold.

2. The method according to claim 1, characterized in that, The phase difference between the first phase and the second phase is 90° + k × 360°, where k is a non-negative integer.

3. The method according to claim 1, characterized in that, The step of responding to the switching device being turned on in the first phase when it receives the second trigger signal, and controlling the switching device to be turned on in the second phase based on the first trigger signal, includes: In response to the first trigger signal, a first action zone is determined in the phase period corresponding to the AC power supply. The first action zone is used to indicate the selectable time range for turning on the switching device. The first action zone corresponding to the first trigger signal and the second action zone corresponding to the second trigger signal are in the same position in the phase period corresponding to the AC power supply, and the first action zone and the second action zone are each divided into N sub-intervals. In response to the switching device receiving the second trigger signal, it is turned on in the first sub-interval of the second operating area, and the switching device is controlled to turn on in the second sub-interval of the first operating area. Wherein, the first sub-interval is the interval in which the first phase is located, the second sub-interval is the interval in which the second phase is located, and the first sub-interval and the second sub-interval are separated by at least one of the sub-intervals.

4. The method according to claim 3, characterized in that, When the first operating zone is half a cycle of the AC power supply and N is an even number, the first sub-interval is spaced (N / 2-1) or (N / 2-2) sub-intervals apart from the corresponding sub-interval within the first operating zone and the second sub-interval. When the first operating zone is half a cycle of the AC power supply and N is an odd number, the first sub-interval is spaced [N / 2] or [N / 2-1] sub-intervals apart from the corresponding sub-interval within the first operating zone and the second sub-interval. When the first operating zone is one cycle of AC power and N is an even number, the first sub-interval is spaced (N / 4-1) or (N / 4-2) sub-intervals apart from the corresponding sub-interval in the first operating zone and the second sub-interval. When the first operating zone is one cycle of AC power and N is an odd number, the first sub-interval is spaced [N / 4] or [N / 4-1] sub-intervals apart from the corresponding sub-interval within the first operating zone and the second sub-interval.

5. The method according to claim 3, characterized in that, Before the switching device is turned on in the second sub-interval of the first operating zone, the method further includes: The N sub-intervals are labeled sequentially according to time. Determine the second sub-interval corresponding to the first trigger signal; Wherein, the labels of the sub-intervals corresponding to the N consecutive conduction operations of the switching device change sequentially from small to large, and the labels of the N sub-intervals arranged in the time sequence satisfy any one of the following conditions: When the first operating zone is half a cycle of the AC power supply, the labels of the N sub-intervals arranged in the time order first traverse the odd numbers and then the even numbers, the odd numbers and the even numbers increase sequentially, and the odd numbers and the even numbers are selected from the range [1, N]. When the first operating zone is one cycle of AC power supply, the sub-interval numbers corresponding to the first and third time periods in the first operating zone are odd numbers, and the sub-interval numbers corresponding to the second and fourth time periods are even numbers. The first, second, third, and fourth time periods are all quarter-cycle time periods and are arranged in the order of time. The odd and even numbers in the first operating zone increase sequentially, and the odd and even numbers are selected from the range [1, N].

6. The method according to any one of claims 3-5, characterized in that, Before the switching device is turned on in the second sub-interval of the first operating zone, the method further includes: Count the number of times the trigger signal is acquired; The second sub-interval corresponding to the first trigger signal is determined based on the number of times the trigger signal is acquired.

7. The method according to any one of claims 3-5, characterized in that, The method further includes: Acquire a power-on signal, the power-on signal being used to indicate that the switching device is connected to the AC power supply; Randomly select counting positions and count the number of cycles of the AC power supply at set intervals, wherein the set interval is equal to the cycle of the AC power supply; Determining the first action zone in the phase cycle corresponding to the AC power supply includes: determining the first action zone in the next cycle corresponding to the first trigger signal based on the cycle number of the AC power supply.

8. The method according to claim 7, characterized in that, The method further includes: The counting position is marked during each cycle of the AC power supply; Determining the first action zone within the phase period corresponding to the AC power supply further includes: within the period corresponding to the first action zone, taking the time corresponding to the counting position as the start time of the first action zone.

9. A switching device, characterized in that, The switching device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the switching control method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the switch control method as described in any one of claims 1 to 8.