[go: up one dir, main page]

CN114690667A - Load control method and device, intelligent switch and storage medium - Google Patents

Load control method and device, intelligent switch and storage medium Download PDF

Info

Publication number
CN114690667A
CN114690667A CN202210286667.7A CN202210286667A CN114690667A CN 114690667 A CN114690667 A CN 114690667A CN 202210286667 A CN202210286667 A CN 202210286667A CN 114690667 A CN114690667 A CN 114690667A
Authority
CN
China
Prior art keywords
response
load
circuit
load circuit
relay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210286667.7A
Other languages
Chinese (zh)
Inventor
黄洪波
贺龙胜
路虎
陈煜平
庞辉荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Oribo Technology Co Ltd
Original Assignee
Shenzhen Oribo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Oribo Technology Co Ltd filed Critical Shenzhen Oribo Technology Co Ltd
Priority to CN202210286667.7A priority Critical patent/CN114690667A/en
Publication of CN114690667A publication Critical patent/CN114690667A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Power Sources (AREA)

Abstract

本申请实施例公开了一种负载控制方法、装置、智能开关及存储介质。该方法应用于负载控制电路,负载控制电路包括开关以及至少一个负载电路,负载电路用于连接并控制对应的负载。该方法包括:响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略;响应策略至少包括负载电路对于连续的两个置位指令的响应间隔时长;根据响应策略,控制负载电路响应置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。

Figure 202210286667

The embodiments of the present application disclose a load control method, a device, an intelligent switch, and a storage medium. The method is applied to a load control circuit, the load control circuit includes a switch and at least one load circuit for connecting and controlling a corresponding load. The method includes: in response to at least two consecutive setting instructions directed to the load circuit, determining a response strategy corresponding to the load circuit; the response strategy at least includes the response interval duration of the load circuit to the two consecutive setting instructions; according to the response strategy , the control load circuit responds to the set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

Figure 202210286667

Description

负载控制方法、装置、智能开关及存储介质Load control method, device, intelligent switch and storage medium

技术领域technical field

本申请涉及智能家居技术领域,更具体地,涉及一种负载控制方法、装置、智能开关及存储介质。The present application relates to the field of smart home technology, and more particularly, to a load control method, device, smart switch and storage medium.

背景技术Background technique

随着电子技术的不断发展,智能开关在智能家电设备中被广泛应用。然而,智能开关的开关面板对灯具开关进行快速连续控制时,开关面板可能会因为继电器内部PWM信号突变或继电器短时间内频繁取电导致复位重启,影响智能开关的使用以及用户的使用体验。With the continuous development of electronic technology, smart switches are widely used in smart home appliances. However, when the switch panel of the smart switch performs rapid and continuous control of the light switch, the switch panel may reset and restart due to the sudden change of the internal PWM signal of the relay or the frequent power supply of the relay in a short period of time, which affects the use of the smart switch and the user experience.

发明内容SUMMARY OF THE INVENTION

鉴于上述问题,本申请提出了一种负载控制方法、装置、智能开关及存储介质,以解决上述技术问题。In view of the above problems, the present application proposes a load control method, device, intelligent switch and storage medium to solve the above technical problems.

第一方面,本申请提供了一种负载控制方法,该方法应用于负载控制电路,负载控制电路包括开关以及至少一个负载电路,负载电路用于连接并控制对应的负载。该方法包括:响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略;响应策略至少包括负载电路对于连续的两个置位指令的响应间隔时长;根据响应策略,控制负载电路响应置位指令。In a first aspect, the present application provides a load control method, which is applied to a load control circuit. The load control circuit includes a switch and at least one load circuit, and the load circuit is used to connect and control a corresponding load. The method includes: in response to at least two consecutive setting instructions directed to the load circuit, determining a response strategy corresponding to the load circuit; the response strategy at least includes the response interval duration of the load circuit to the two consecutive setting instructions; according to the response strategy , the control load circuit responds to the set command.

第二方面,本申请提供了一种负载控制装置,该装置包括确定响应策略模块,用于响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略;响应策略至少包括负载电路对于连续的两个置位指令的响应间隔时长;控制模块,用于根据响应策略,控制负载电路响应置位指令。In a second aspect, the present application provides a load control device, which includes a response strategy determination module for determining a response strategy corresponding to the load circuit in response to at least two consecutive setting instructions directed to the load circuit; the response strategy It at least includes the response interval length of the load circuit to two consecutive setting instructions; the control module is used to control the load circuit to respond to the setting instructions according to the response strategy.

第三方面,本申请提供了一种智能开关,该智能开关包括一个或多个处理器以及存储器;一个或多个程序被存储在存储器中并被配置为由一个或多个处理器执行,一个或多个程序配置用于执行上述的方法。In a third aspect, the present application provides a smart switch, the smart switch includes one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, a or a plurality of programs configured to perform the above-described method.

第四方面,本申请提供的一种存储有处理器可执行的程序代码的计算机可读存储介质,该计算机可读存储介质包括存储的程序代码,其中,在程序代码运行时执行上述的方法。In a fourth aspect, the present application provides a computer-readable storage medium storing program codes executable by a processor, where the computer-readable storage medium includes stored program codes, wherein the above method is executed when the program codes are executed.

本申请提供一种负载控制方法、装置、智能开关及存储介质。在该方法中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。The present application provides a load control method, device, intelligent switch and storage medium. In this method, the load control circuit determines the response interval duration of the load circuit to the two consecutive setting commands according to at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.

图1示出了本申请提出的一种负载控制方法的应用环境示意图。FIG. 1 shows a schematic diagram of an application environment of a load control method proposed in the present application.

图2示出了本申请第一实施例提供的一种负载控制方法的流程图。FIG. 2 shows a flowchart of a load control method provided by the first embodiment of the present application.

图3示出了本申请第二实施例提出的一种负载控制方法的流程图。FIG. 3 shows a flowchart of a load control method proposed by the second embodiment of the present application.

图4示出了本申请第三实施例提出的一种负载控制方法的流程图。FIG. 4 shows a flowchart of a load control method proposed by the third embodiment of the present application.

图5示出了本申请提供的一种负载控制装置的结构框图。FIG. 5 shows a structural block diagram of a load control device provided by the present application.

图6示出了本申请实施例提出的智能开关的结构框图。FIG. 6 shows a structural block diagram of the smart switch proposed in the embodiment of the present application.

图7示出了本申请实施例提出的计算机可读存储介质的结构框图。FIG. 7 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

随着电子技术的不断发展,智能开关在智能家电设备中被广泛应用。然而,智能开关的开关面板对灯具开关进行快速连续控制时,开关面板可能会因为继电器内部PWM信号突变或继电器短时间内频繁取电导致复位重启,影响智能开关的使用以及用户的使用体验。With the continuous development of electronic technology, smart switches are widely used in smart home appliances. However, when the switch panel of the smart switch performs rapid and continuous control of the light switch, the switch panel may reset and restart due to the sudden change of the internal PWM signal of the relay or the frequent power supply of the relay in a short period of time, which affects the use of the smart switch and the user experience.

针对上述问题,本申请提供一种负载控制方法、装置、智能开关及存储介质。在该方法中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。In view of the above problems, the present application provides a load control method, device, intelligent switch and storage medium. In this method, the load control circuit determines the response interval duration of the load circuit to the two consecutive setting commands according to at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

为了便于详细说明本申请方案,下面先结合附图对本申请实施例中的应用环境进行介绍。In order to facilitate the detailed description of the solution of the present application, the application environment in the embodiments of the present application is first introduced below with reference to the accompanying drawings.

请参阅图1,图1是本申请提出的一种负载控制方法的应用环境示意图。如图1所示,该负载控制方法可以应用在负载控制电路100,也可以应用在包括负载控制电路100的智能开关。负载控制电路100可以包括开关110以及至少一个负载电路120。开关110用于获取置位指令,负载电路120用于连接并控制对应的负载200。负载控制电路100根据指向负载电路120的连续的至少两个置位指令,确定负载电路120对于连续的两个置位指令的响应间隔时长,进而控制负载电路120按照响应间隔时长依次响应至少两个置位指令。Please refer to FIG. 1. FIG. 1 is a schematic diagram of an application environment of a load control method proposed in the present application. As shown in FIG. 1 , the load control method can be applied to the load control circuit 100 , and can also be applied to an intelligent switch including the load control circuit 100 . The load control circuit 100 may include a switch 110 and at least one load circuit 120 . The switch 110 is used to obtain a setting instruction, and the load circuit 120 is used to connect and control the corresponding load 200 . The load control circuit 100 determines the response interval duration of the load circuit 120 to the two consecutive setting commands according to the at least two consecutive setting commands directed to the load circuit 120, and then controls the load circuit 120 to respond to at least two consecutive setting commands in sequence according to the response interval duration. set command.

在一些实施例中,负载电路120可以包括至少一个负载支路121,每个负载支路121设有对应的继电器123,继电器123用于控制对应的负载支路121的通断。In some embodiments, the load circuit 120 may include at least one load branch 121 , each load branch 121 is provided with a corresponding relay 123 , and the relay 123 is used to control the on-off of the corresponding load branch 121 .

在一些实施例中,负载电路120还可以包括取电电路125,其中取电电路125可以为开态取电电路以及闭态取电电路。In some embodiments, the load circuit 120 may further include a power taking circuit 125, wherein the power taking circuit 125 may be an open state power taking circuit and a closed state power taking circuit.

在一些实施例中,负载电路120还可以包括通信模块127,通信模块127用于在开关110完成上电的情况下,与服务器300建立网络连接,进而通过服务器300与外部的通信设备400建立连接,其中外部的通信设备可以为但不限于为手机、平板电脑、台式电脑等电子装置。In some embodiments, the load circuit 120 may further include a communication module 127 , and the communication module 127 is configured to establish a network connection with the server 300 when the switch 110 is powered on, and then establish a connection with the external communication device 400 through the server 300 , wherein the external communication device may be, but not limited to, electronic devices such as mobile phones, tablet computers, and desktop computers.

下面将结合附图具体描述本申请的各实施例。The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

请参阅图2,图2示意性地示出本申请第一实施例提供的一种负载控制方法。该方法可以包括以下步骤S210至步骤S220。Please refer to FIG. 2 , which schematically shows a load control method provided by the first embodiment of the present application. The method may include the following steps S210 to S220.

步骤S210,响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略。Step S210, in response to at least two consecutive setting instructions directed to the load circuit, determine a response strategy corresponding to the load circuit.

连续是指任意两个置位指令之间的时间间隔不超过响应策略中的响应间隔时长。作为一种方式,若至少两个置位指令之间的时间间隔不超过响应策略中的响应间隔时长,则负载控制电路确定至少两个置位指令为连续的至少两个置位指令,负载控制电路响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略。例如,至少两个置位指令之间的时间间隔为10ms,响应间隔时长为20ms,则负载控制电路确定至少两个置位指令为连续的至少两个置位指令,负载控制电路响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略。Continuous means that the time interval between any two setting commands does not exceed the response interval duration in the response strategy. In one way, if the time interval between the at least two setting instructions does not exceed the response interval duration in the response strategy, the load control circuit determines that the at least two setting instructions are consecutive at least two setting instructions, and the load control The circuit determines a response strategy corresponding to the load circuit in response to successive at least two set commands directed to the load circuit. For example, if the time interval between at least two setting commands is 10ms, and the response interval is 20ms, the load control circuit determines that the at least two setting commands are consecutive at least two setting commands, and the load control circuit responds to pointing the load At least two consecutive set commands of the circuit determine the response strategy corresponding to the load circuit.

负载电路可以包括至少一个负载支路,每个负载支路设有对应的继电器。响应策略包括第一响应策略以及第二响应策略。第一响应策略为控制负载支路上的继电器按照响应间隔时长依次响应至少两个置位指令。第二响应策略为控制多个负载支路上的继电器按照响应间隔时长依次响应至少两个置位指令。The load circuit may include at least one load branch, and each load branch is provided with a corresponding relay. The response strategy includes a first response strategy and a second response strategy. The first response strategy is to control the relays on the load branch to sequentially respond to at least two setting commands according to the response interval duration. The second response strategy is to control the relays on the multiple load branches to respond to at least two setting commands in sequence according to the response interval duration.

作为一种方式,负载控制电路可以根据负载支路的个数确定对应于负载电路的响应策略,若负载电路只包括一个负载支路,则负载控制电路确定响应策略为第一响应策略。例如,两个置位指令分别为“开启第一开关”以及“关闭第一开关”,响应间隔时长为20ms,则负载控制电路控制负载支路上的继电器响应“开启第一开关”的置位指令后,间隔20ms,再响应“关闭第一开关”的置位指令。As one way, the load control circuit may determine the response strategy corresponding to the load circuit according to the number of load branches. If the load circuit includes only one load branch, the load control circuit determines the response strategy as the first response strategy. For example, if the two setting commands are "turn on the first switch" and "turn off the first switch" respectively, and the response interval is 20ms, the load control circuit controls the relay on the load branch to respond to the set command of "turn on the first switch" Then, at an interval of 20ms, it will respond to the setting command of "close the first switch".

若负载电路包括多个负载支路,则连续的两个置位指令可以依据其指向的负载支路来分类,例如,置位指令的类型包括至少两个置位指令指向同一个负载支路或至少两个置位指令指向多个负载支路。在负载电路包括多个负载支路的情况下,负载控制电路可以根据置位指令的类型来确定对应于该类型的响应策略。具体而言,负载控制电路可以存储有置位指令与指向对象之间对应关系的映射表,负载控制电路获取到指向继电器的连续的至少两个置位指令,基于上述的映射表,负载控制电路可以确定置位指令的类型,从而确定连续的至少两个置位指令的类型。负载控制电路确定置位指令的类型后,基于置位指令的类型,确定响应策略的类型。If the load circuit includes multiple load branches, two consecutive set instructions can be classified according to the load branches they point to. For example, the type of set instructions includes at least two set instructions pointing to the same load branch or At least two set instructions point to multiple load branches. In the case that the load circuit includes a plurality of load branches, the load control circuit may determine a response strategy corresponding to the type of the set command according to the type of the set instruction. Specifically, the load control circuit may store a mapping table of the correspondence between the setting instructions and the pointing objects, and the load control circuit obtains at least two consecutive setting instructions pointing to the relay. Based on the above mapping table, the load control circuit The type of the set instruction may be determined, thereby determining the type of at least two consecutive set instructions. After the load control circuit determines the type of the set command, it determines the type of the response strategy based on the type of the set command.

若负载控制电路确定至少两个置位指令指向同一个负载支路,则负载控制电路确定响应策略为第一响应策略。例如,两个置位指令分别为“开启第一开关”以及“关闭第一开关”,响应间隔时长为20ms,则负载控制电路控制负载支路上的继电器响应“开启第一开关”的置位指令后,间隔20ms,再响应“关闭第一开关”的置位指令。若负载控制电路确定至少两个置位指令指向多个负载支路,则负载控制电路确定响应策略为第二响应策略。例如,两个置位指令分别为“开启第一开关”以及“开启第二开关”,响应间隔时长为20ms,则负载控制电路控制第一负载支路响应“开启第一开关”的置位指令后,间隔20ms,再控制第二负载支路响应“开启第二开关”的置位指令。该方法能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。If the load control circuit determines that at least two setting commands point to the same load branch, the load control circuit determines that the response strategy is the first response strategy. For example, if the two setting commands are "turn on the first switch" and "turn off the first switch" respectively, and the response interval is 20ms, the load control circuit controls the relay on the load branch to respond to the set command of "turn on the first switch" Then, at an interval of 20ms, it will respond to the setting command of "close the first switch". If the load control circuit determines that the at least two setting commands point to multiple load branches, the load control circuit determines that the response strategy is the second response strategy. For example, if the two setting commands are "turn on the first switch" and "turn on the second switch" respectively, and the response interval is 20ms, the load control circuit controls the first load branch to respond to the set command of "turn on the first switch" Then, at an interval of 20ms, the second load branch is controlled to respond to the setting command of "turn on the second switch". The method can avoid system reset and restart due to high power consumption caused by high power consumption or sudden change of pulse width when the relay frequently takes power in a short period of time.

在其他一些实施例中,若至少两个置位指令之间的时间间隔超过响应策略中的响应间隔时长,则负载控制电路确定至少两个置位指令不是连续的至少两个置位指令,负载控制电路根据至少两个置位指令之间的时间间隔依次响应至少两个置位指令。例如,两个置位指令分别为“开启第一开关”以及“关闭第一开关”,两个置位指令之间的时间间隔为30ms,则负载控制电路确定至少两个置位指令不是连续的至少两个置位指令,负载控制电路控制负载支路上的继电器响应“开启第一开关”的置位指令后,间隔30ms,再响应“关闭第一开关”的置位指令。In some other embodiments, if the time interval between the at least two set commands exceeds the response interval duration in the response strategy, the load control circuit determines that the at least two set commands are not consecutive at least two set commands, and the load The control circuit sequentially responds to the at least two setting instructions according to the time interval between the at least two setting instructions. For example, if the two setting instructions are "turn on the first switch" and "close the first switch" respectively, and the time interval between the two setting instructions is 30ms, the load control circuit determines that the at least two setting instructions are not consecutive For at least two set commands, the load control circuit controls the relay on the load branch to respond to the set command of "turn on the first switch", and then respond to the set command of "close the first switch" after an interval of 30ms.

步骤S220,根据响应策略,控制负载电路响应置位指令。Step S220, according to the response strategy, control the load circuit to respond to the set instruction.

在本申请实施例中,负载电路可以包括至少一个负载支路,每个负载支路设有对应的继电器。响应策略包括第一响应策略以及第二响应策略。若负载控制电路确定响应策略为第一响应策略,则负载控制电路控制负载支路上的继电器按照响应间隔时长依次响应至少两个置位指令。例如,两个置位指令分别为“开启第一开关”以及“关闭第一开关”,响应间隔时长为20ms,则负载控制电路控制负载支路上的继电器响应“开启第一开关”的置位指令后,间隔20ms,再响应“关闭第一开关”的置位指令。若负载控制电路确定响应策略为第二响应策略,则负载控制电路控制多个负载支路上的继电器按照响应间隔时长依次响应至少两个置位指令。例如,两个置位指令分别为“开启第一开关”以及“开启第二开关”,响应间隔时长为20ms,则负载控制电路控制第一负载支路响应“开启第一开关”的置位指令后,间隔20ms,再控制第二负载支路响应“开启第二开关”的置位指令。该方法能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。In this embodiment of the present application, the load circuit may include at least one load branch, and each load branch is provided with a corresponding relay. The response strategy includes a first response strategy and a second response strategy. If the load control circuit determines that the response strategy is the first response strategy, the load control circuit controls the relays on the load branch to sequentially respond to at least two setting commands according to the response interval duration. For example, if the two setting commands are "turn on the first switch" and "turn off the first switch" respectively, and the response interval is 20ms, the load control circuit controls the relay on the load branch to respond to the set command of "turn on the first switch" Then, at an interval of 20ms, it will respond to the setting command of "close the first switch". If the load control circuit determines that the response strategy is the second response strategy, the load control circuit controls the relays on the multiple load branches to sequentially respond to at least two setting commands according to the response interval duration. For example, if the two setting commands are "turn on the first switch" and "turn on the second switch" respectively, and the response interval is 20ms, the load control circuit controls the first load branch to respond to the set command of "turn on the first switch" Then, at an interval of 20ms, the second load branch is controlled to respond to the setting command of "turn on the second switch". The method can avoid system reset and restart due to high power consumption caused by high power consumption or sudden change of pulse width when the relay frequently takes power in a short period of time.

本申请提供一种负载控制方法、装置、智能开关及存储介质。在该方法中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。The present application provides a load control method, device, intelligent switch and storage medium. In this method, the load control circuit determines the response interval duration of the load circuit to the two consecutive setting commands according to at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

请参阅图3,图3示意性地示出本申请第二实施例提供的一种负载控制方法。该方法可以包括以下步骤S310至步骤S330。Please refer to FIG. 3 , which schematically shows a load control method provided by the second embodiment of the present application. The method may include the following steps S310 to S330.

步骤S310,构建响应策略。Step S310, constructing a response policy.

负载电路可以包括继电器,响应策略可以包括负载电路对于连续两个置位指令的响应间隔时长,其中,响应间隔时长可以通过继电器的信号脉冲宽度或继电器的响应时间来确定,但不局限于此。The load circuit may include a relay, and the response strategy may include the duration of the response interval of the load circuit to two consecutive setting commands, wherein the duration of the response interval may be determined by the signal pulse width of the relay or the response time of the relay, but is not limited thereto.

在一些实施例中,响应间隔时长可以通过继电器的信号脉冲宽度来确定。作为一种方式,负载控制电路可以连接示波器,示波器用于检测继电器的最小置位脉宽并发送至负载控制电路,负载控制电路获取继电器的最小置位脉宽后,确定第一预设阈值区间并将第一预设阈值区间作为继电器的信号脉冲宽度的取值区间,其中,第一预设阈值区间中包含继电器的最小置位脉宽。例如,继电器的最小置位脉宽为20ms,则第一预设阈值区间可以为10ms至30ms,即继电器的信号脉冲宽度的取值区间为10ms至30ms,则相应间隔时长的取值范围为10ms至30ms,示意性的,相应间隔时长为20ms。In some embodiments, the response interval duration may be determined by the signal pulse width of the relay. As a way, the load control circuit can be connected to an oscilloscope, and the oscilloscope is used to detect the minimum set pulse width of the relay and send it to the load control circuit. After obtaining the minimum set pulse width of the relay, the load control circuit determines the first preset threshold interval The first preset threshold interval is used as the value interval of the signal pulse width of the relay, wherein the first preset threshold interval includes the minimum set pulse width of the relay. For example, if the minimum setting pulse width of the relay is 20ms, the first preset threshold interval can be 10ms to 30ms, that is, the value interval of the relay signal pulse width is 10ms to 30ms, and the value range of the corresponding interval duration is 10ms To 30ms, illustratively, the corresponding interval duration is 20ms.

在另一些实施例中,相应间隔时长可以通过继电器的响应时间来确定。作为一种方式,负载控制电路可以连接示波器,示波器用于检测继电器的最小置位时长并发送至负载控制电路,负载控制电路获取继电器的最小置位时长后,确定第二预设阈值区间并将第二预设阈值区间作为继电器的响应时间的取值区间,其中,第二预设阈值区间中包含继电器的最小置位时长。例如,继电器的最小置位时长为20ms,则第二预设阈值区间可以为10ms至30ms,即继电器的响应时间的取值区间为10ms至30ms,则相应间隔时长的取值范围为10ms至30ms,示意性的,相应间隔时长为20ms。In other embodiments, the corresponding interval duration may be determined by the response time of the relay. As a way, the load control circuit can be connected to an oscilloscope, and the oscilloscope is used to detect the minimum setting duration of the relay and send it to the load control circuit. After the load control circuit obtains the minimum setting duration of the relay, it determines the second preset threshold interval and uses The second preset threshold interval is used as a value interval of the response time of the relay, wherein the second preset threshold interval includes the minimum setting duration of the relay. For example, if the minimum setting time of the relay is 20ms, the second preset threshold interval can be 10ms to 30ms, that is, the range of the response time of the relay is 10ms to 30ms, and the range of the corresponding interval time is 10ms to 30ms , illustratively, the corresponding interval duration is 20ms.

步骤S320,响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略。Step S320, in response to at least two consecutive setting instructions directed to the load circuit, determine a response strategy corresponding to the load circuit.

步骤S330,根据响应策略,控制负载电路响应置位指令。Step S330, according to the response strategy, control the load circuit to respond to the set command.

在本实施例中,步骤S320至步骤S330的具体实施,可以参考上文实施例所提供的步骤S210至步骤S220的阐述,此处不再一一赘述。In this embodiment, for the specific implementation of steps S320 to S330, reference may be made to the descriptions of steps S210 to S220 provided in the above embodiments, and details are not repeated here.

本申请提供一种负载控制方法、装置、智能开关及存储介质。在该方法中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。The present application provides a load control method, device, intelligent switch and storage medium. In this method, the load control circuit determines the response interval duration of the load circuit to the two consecutive setting commands according to at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

请参阅图4,图4示意性地示出本申请第三实施例提供的一种负载控制方法。该方法可以包括以下步骤S410至步骤S470。Please refer to FIG. 4 , which schematically shows a load control method provided by the third embodiment of the present application. The method may include the following steps S410 to S470.

步骤S410,响应于开关的上电状态,控制通信模块与服务器建立网络连接。Step S410, in response to the power-on state of the switch, control the communication module to establish a network connection with the server.

在本申请实施例中,负载控制电路可以包括通信模块,通信模块用于在开关完成上电的情况下,与服务器建立网络连接,进而通过服务器与外部的通信设备建立连接,使得负载控制电路可以通过外部的通信设备获取置位指令,其中外部的通信设备可以为但不限于为手机、平板电脑、台式电脑等电子装置。In the embodiment of the present application, the load control circuit may include a communication module, and the communication module is used to establish a network connection with the server when the switch is powered on, and then establish a connection with an external communication device through the server, so that the load control circuit can The setting instruction is acquired through an external communication device, wherein the external communication device may be, but not limited to, an electronic device such as a mobile phone, a tablet computer, and a desktop computer.

作为一种方式,通信模块向服务器发送连接请求,若服务器向通信模块发送允许连接的应答信号,则通信模块与服务器建立网络连接;若服务器向通信模块发送拒绝连接的应答信号或一定时间内没有发送应答信号,则通信模块无法与服务器建立网络连接。As a method, the communication module sends a connection request to the server. If the server sends a response signal allowing the connection to the communication module, the communication module establishes a network connection with the server; If a response signal is sent, the communication module cannot establish a network connection with the server.

进一步地,通信模块可以设有设备标识库,设备标识库中存储有多个设备标识码以及对应的登陆地址。通信模块可以获取连接同一个服务器的通信设备的设备信息,读取设备信息中的设备标识码并与设备标识库中的设备标识码进行对比。若设备标识库中包含该通信设备的设备标识码,则通信模块通过服务器与该通信设备建立网络连接。在一些实施例中,若设备标识库中包含该通信设备的设备标识码,则通信模块直接通过服务器与该通信设备建立网络连接。在另一些实施例中,若设备标识库中包含该通信设备的设备标识码,则通信模块向该通信设备的服务器发送建立连接请求,若该通信设备通过服务器向通信模块发送允许连接的应答信号,则通信模块通过服务器与该通信设备建立网络连接;若该通信设备通过服务器向通信模块发送拒绝连接的应答信号或一定时间内没有发送应答信号,则通信模块无法通过服务器与该通信设备建立网络连接。若设备标识库中不包含该通信设备的设备标识码,则通信模块无法通过服务器与该通信设备建立网络连接。若通信模块通过服务器与通信设备建立网络连接,则负载控制电路可以通过外部的通信设备或开关按键获取置位指令。若通信模块无法通过服务器与通信设备建立网络连接,则负载控制电路智能通过开关按键获取置位指令。Further, the communication module may be provided with a device identification library, in which a plurality of device identification codes and corresponding login addresses are stored. The communication module can acquire the device information of the communication devices connected to the same server, read the device identification code in the device information and compare it with the device identification code in the device identification library. If the device identification code of the communication device is contained in the device identification library, the communication module establishes a network connection with the communication device through the server. In some embodiments, if the device identification library contains the device identification code of the communication device, the communication module directly establishes a network connection with the communication device through the server. In other embodiments, if the device identification library contains the device identification code of the communication device, the communication module sends a connection establishment request to the server of the communication device, and if the communication device sends a response signal allowing the connection to the communication module through the server , the communication module establishes a network connection with the communication device through the server; if the communication device sends a response signal rejecting the connection to the communication module through the server or does not send a response signal within a certain period of time, the communication module cannot establish a network with the communication device through the server. connect. If the device identification code of the communication device is not included in the device identification library, the communication module cannot establish a network connection with the communication device through the server. If the communication module establishes a network connection with the communication device through the server, the load control circuit can obtain the setting instruction through the external communication device or the switch button. If the communication module cannot establish a network connection with the communication device through the server, the load control circuit intelligently obtains the setting instruction through the switch button.

步骤S420,响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略。Step S420, in response to at least two consecutive setting instructions directed to the load circuit, determine a response strategy corresponding to the load circuit.

步骤S430,根据响应策略,控制负载电路响应置位指令。Step S430, according to the response strategy, control the load circuit to respond to the set instruction.

在本实施例中,步骤S420至步骤S430的具体实施,可以参考上文实施例所提供的步骤S210至步骤S220的阐述,此处不再一一赘述。In this embodiment, for the specific implementation of steps S420 to S430, reference may be made to the descriptions of steps S210 to S220 provided in the above embodiments, and details are not repeated here.

步骤S440,确定取电控制指令,在负载电路导通的情况下,响应于取电控制指令,控制取电电路导通。Step S440 , determining the power-taking control instruction, and in the case that the load circuit is turned on, the power-taking circuit is controlled to be turned on in response to the power-taking control instruction.

负载电路还可以包括取电电路,取电电路用于控制负载控制电路的取电类型,其中取电电路可以为开态取电电路以及闭态取电电路。The load circuit may further include a power taking circuit, and the power taking circuit is used to control the power taking type of the load control circuit, wherein the power taking circuit may be an open state power taking circuit and a closed state power taking circuit.

在一些实施例中,取电电路为开态取电电路,即负载电路导通时,取电电路导通;在另一些实施例中,取电电路可以为闭态取电电路,即负载电路不导通时,取电电路导通。In some embodiments, the power-taking circuit is an open-state power-taking circuit, that is, when the load circuit is turned on, the power-taking circuit is turned on; in other embodiments, the power-taking circuit may be a closed-state power-taking circuit, that is, the load circuit When not conducting, the power taking circuit is conducting.

由于闭态取电时系统供电能力较弱,容易因为取电不足而导致复位重启,所以在本申请实施例中,取电电路为开态取电电路,在负载电路导通的情况下,负载控制电路基于取电控制指令,控制取电电路导通。Since the power supply capability of the system is weak when the power is taken in the closed state, it is easy to cause a reset and restart due to insufficient power supply. Therefore, in the embodiment of the present application, the power taking circuit is an open-state power taking circuit. When the load circuit is turned on, the load The control circuit controls the power-taking circuit to conduct based on the power-taking control instruction.

本申请提供一种负载控制方法、装置、智能开关及存储介质。在该方法中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。The present application provides a load control method, device, intelligent switch and storage medium. In this method, the load control circuit determines the response interval duration of the load circuit to the two consecutive setting commands according to at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

请参阅图5,本申请提供的一种负载控制装置的结构框图,该装置500应用于负载控制电路,所述负载控制电路包括开关以及至少一个负载电路,所述负载电路用于连接并控制对应的负载。该装置500包括:确定响应策略模块510以及控制模块520。Please refer to FIG. 5 , which is a structural block diagram of a load control device provided by the present application. The device 500 is applied to a load control circuit. The load control circuit includes a switch and at least one load circuit, and the load circuit is used to connect and control the corresponding load. The apparatus 500 includes: a response strategy determination module 510 and a control module 520 .

确定响应策略模块510用于响应于指向负载电路的连续的至少两个置位指令,确定对应于负载电路的响应策略;响应策略至少包括负载电路对于连续的两个置位指令的响应间隔时长;控制模块520用于根据响应策略,控制负载电路响应置位指令。The determining response strategy module 510 is configured to determine a response strategy corresponding to the load circuit in response to at least two consecutive setting instructions directed to the load circuit; the response strategy at least includes the response interval duration of the load circuit to the two consecutive setting instructions; The control module 520 is configured to control the load circuit to respond to the set command according to the response strategy.

本申请提供一种负载控制装置。在该装置中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述装置通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。The present application provides a load control device. In the device, the load control circuit determines the response interval length of the load circuit to the two consecutive setting commands according to the at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above-mentioned device can avoid system reset and restart due to high power consumption caused by high power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of consecutively multiple setting commands.

作为一种方式,负载电路包括继电器。该装置500还包括:确定间隔时长模块,用于获取继电器的最小置位时长;将包含最小置位时长的第一预设阈值区间确定为继电器的响应时间的取值区间;基于从响应时间的取值区间中选取的响应时间,确定所选取的响应时间对应的响应间隔时长。As one approach, the load circuit includes a relay. The device 500 further includes: a determining interval duration module for obtaining the minimum setting duration of the relay; determining the first preset threshold interval including the minimum setting duration as the value interval of the response time of the relay; based on the response time from the response time The response time selected in the value interval determines the response interval duration corresponding to the selected response time.

在一些实施例中,确定间隔时长模块还用于获取继电器的最小置位时长;将包含最小置位时长的第二预设阈值区间确定为继电器的响应时间的取值区间;基于从响应时间的取值区间中选取的继电器的响应时间,确定所选取的继电器的响应时间为响应间隔时长。In some embodiments, the determining interval duration module is further configured to obtain the minimum setting duration of the relay; determine the second preset threshold interval including the minimum setting duration as the value interval of the response time of the relay; based on the response time from the response time The response time of the selected relay in the value interval determines the response time of the selected relay as the response interval length.

在一些实施例中,负载电路包括至少一个负载支路,每个所述负载支路设有对应的继电器。确定响应策略模块510还用于响应于指向继电器的连续的至少两个置位指令,确定置位指令的类型;若至少两个置位指令指向同一个负载支路,则确定响应策略为第一响应策略;第一响应策略包括:控制负载支路上的继电器按照响应间隔时长依次响应至少两个置位指令。In some embodiments, the load circuit includes at least one load branch, each of which is provided with a corresponding relay. The determining response strategy module 510 is further configured to determine the type of the setting instruction in response to at least two consecutive setting instructions directed to the relay; if the at least two setting instructions point to the same load branch, then determine that the response strategy is the first A response strategy; the first response strategy includes: controlling the relays on the load branch to sequentially respond to at least two setting instructions according to the response interval duration.

在一些实施例中,负载的数量为多个,负载电路包括多个负载支路,多个负载支路分别设置有对应的继电器。确定响应策略模块510还用于响应于指向继电器的连续的至少两个置位指令,确定置位指令的类型;若至少两个置位指令分别指向多个负载支路,则确定响应策略为第二响应策略;第二响应策略包括:控制多个负载支路上的继电器按照响应间隔时长依次响应对应的置位指令。In some embodiments, the number of loads is multiple, the load circuit includes multiple load branches, and the multiple load branches are respectively provided with corresponding relays. The determining response strategy module 510 is further configured to determine the type of the setting instruction in response to at least two consecutive setting instructions directed to the relay; if the at least two setting instructions respectively point to multiple load branches, then determine that the response strategy is the first one. Two response strategies; the second response strategy includes: controlling the relays on a plurality of load branches to respond to the corresponding setting commands in sequence according to the response interval duration.

作为一种方式,该装置600还包括控制电路导通模块,用于确定取电控制指令;在负载电路导通的情况下,响应于取电控制指令,控制取电电路导通。In one way, the apparatus 600 further includes a control circuit conduction module for determining the power-taking control instruction; in the case that the load circuit is turned on, the power-taking circuit is controlled to be turned on in response to the power-taking control instruction.

作为一种方式,负载控制电路还包括通信模块。该装置600还包括建立网络连接模块,用于响应于开关的上电状态,控制通信模块与服务器建立网络连接。In one way, the load control circuit further includes a communication module. The apparatus 600 further includes a network connection establishment module for controlling the communication module to establish a network connection with the server in response to the power-on state of the switch.

本申请提供的一种负载控制装置的结构框图,需要说明的是,本申请中装置实施例与前述方法实施例是相互对应的,装置实施例中各个单元的具体实施原理与前述方法实施例中的原理是相似的,装置实施例中的具体内容可以参见方法实施例,而在装置实施例中不再赘述。The structural block diagram of a load control device provided in the present application, it should be noted that the device embodiments in the present application correspond to the foregoing method embodiments, and the specific implementation principles of each unit in the device embodiments are the same as those in the foregoing method embodiments. The principle is similar, the specific content in the apparatus embodiment may refer to the method embodiment, and will not be repeated in the apparatus embodiment.

请参阅图6,本申请提供的一种智能开关的结构框图。Please refer to FIG. 6 , which is a structural block diagram of an intelligent switch provided by the present application.

基于上述的负载控制方法、装置,本申请实施例还提供的另一种可以执行前述负载控制方法的智能开关600。智能开关600包括相互耦合的一个或多个(图中仅示出一个)处理器610、存储器620。其中,该存储器620中存储有可以执行前述实施例中内容的程序,而处理器610可以执行该存储器620中存储的程序。Based on the above load control method and device, the embodiments of the present application further provide another smart switch 600 that can execute the foregoing load control method. The smart switch 600 includes one or more processors 610 and a memory 620 (only one is shown in the figure) coupled with each other. Wherein, the memory 620 stores a program that can execute the content in the foregoing embodiments, and the processor 610 can execute the program stored in the memory 620 .

其中,处理器610可以包括一个或者多个用于处理数据的核。处理器610利用各种接口和线路连接整个智能开关600内的各个部分,通过运行或执行存储在存储器620内的指令、程序、代码集或指令集,以及调用存储在存储器620内的数据,执行智能开关600的各种功能和处理数据。可选地,处理器610可以采用数字信号处理(Digital SignalProcessing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器610可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics ProcessingUnit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器610中,单独通过一块通信芯片进行实现。The processor 610 may include one or more cores for processing data. The processor 610 uses various interfaces and lines to connect various parts of the entire smart switch 600, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 620, and calling the data stored in the memory 620. Various functions and processing data of the smart switch 600. Optionally, the processor 610 may employ at least one of a digital signal processing (Digital Signal Processing, DSP), a Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and a Programmable Logic Array (Programmable Logic Array, PLA) implemented in hardware. The processor 610 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used for rendering and drawing of the display content; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 610, and is implemented by a communication chip alone.

存储器620可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器620可用于存储指令、程序、代码、代码集或指令集。存储器620可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。The memory 620 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory). Memory 620 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 620 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.

请参阅图7,本申请提供的一种计算机可读存储介质。该计算机可读介质700中存储有程序代码,程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 7 , a computer-readable storage medium provided by the present application. The computer-readable medium 700 stores program codes, and the program codes can be invoked by the processor to execute the methods described in the above method embodiments.

计算机可读存储介质700可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质700包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质700具有执行上述方法中的任何方法步骤的程序代码710的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码710可以例如以适当形式进行压缩。The computer readable storage medium 700 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 700 includes a non-transitory computer-readable storage medium. Computer readable storage medium 700 has storage space for program code 710 to perform any of the method steps in the above-described methods. These program codes can be read from or written to one or more computer program products. Program code 710 may be compressed, for example, in a suitable form.

综上所述,本申请提供一种负载控制方法、装置、智能开关及存储介质。在该方法中,负载控制电路根据指向负载电路的连续的至少两个置位指令,确定负载电路对于连续的两个置位指令的响应间隔时长,进而控制负载电路按照响应间隔时长依次响应至少两个置位指令。上述方法通过设置连续多次置位指令的响应间隔时间,能够避免继电器短时间内频繁取电时系统耗电过高或脉宽突变造成高耗电而导致系统复位重启。In conclusion, the present application provides a load control method, device, intelligent switch and storage medium. In this method, the load control circuit determines the response interval duration of the load circuit to the two consecutive setting commands according to at least two consecutive setting commands directed to the load circuit, and then controls the load circuit to respond to at least two consecutive setting commands in sequence according to the response interval duration. a set command. The above method can avoid system reset and restart due to excessive power consumption or high power consumption caused by sudden change of pulse width when the relay frequently draws power in a short period of time by setting the response interval time of the continuous multiple reset commands.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless expressly and specifically defined otherwise.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any description of a process or method in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing a specified logical function or step of the process , and the scope of the preferred embodiments of the present application includes alternative implementations in which the functions may be performed out of the order shown or discussed, including performing the functions substantially concurrently or in the reverse order depending upon the functions involved, which should It is understood by those skilled in the art to which the embodiments of the present application belong.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。The logic and/or steps represented in flowcharts or otherwise described herein, for example, may be considered an ordered listing of executable instructions for implementing the logical functions, may be embodied in any computer-readable medium, For use with, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions from an instruction execution system, apparatus, or apparatus) or equipment.

应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of this application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or a combination of the following techniques known in the art: Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.

最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征图进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: it can still be Modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements to some of the technical feature diagrams; and these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of the present application .

Claims (10)

1.一种负载控制方法,其特征在于,应用于负载控制电路,所述负载控制电路包括开关以及至少一个负载电路,所述负载电路用于连接并控制对应的负载;所述方法包括:1. A load control method, characterized in that it is applied to a load control circuit, wherein the load control circuit comprises a switch and at least one load circuit, and the load circuit is used to connect and control a corresponding load; the method comprises: 响应于指向所述负载电路的连续的至少两个置位指令,确定对应于所述负载电路的响应策略;所述响应策略至少包括所述负载电路对于连续的两个置位指令的响应间隔时长;In response to at least two consecutive set instructions directed to the load circuit, a response strategy corresponding to the load circuit is determined; the response strategy at least includes the response interval duration of the load circuit to the two consecutive set commands ; 根据所述响应策略,控制所述负载电路响应所述置位指令。According to the response strategy, the load circuit is controlled to respond to the set command. 2.如权利要求1所述的方法,其特征在于,所述负载电路包括继电器;所述方法还包括:2. The method of claim 1, wherein the load circuit comprises a relay; the method further comprises: 获取所述继电器的最小置位脉宽;Obtain the minimum set pulse width of the relay; 将包含所述最小置位脉宽的第一预设阈值区间确定为所述继电器的信号脉冲宽度的取值区间;Determining the first preset threshold interval including the minimum set pulse width as the value interval of the signal pulse width of the relay; 基于从所述信号脉冲宽度的取值区间中选取的信号脉冲宽度,确定所选取的信号脉冲宽度对应的所述响应间隔时长。Based on the signal pulse width selected from the value interval of the signal pulse width, the response interval duration corresponding to the selected signal pulse width is determined. 3.如权利要求1所述的方法,其特征在于,所述负载电路包括继电器;所述方法还包括:3. The method of claim 1, wherein the load circuit comprises a relay; the method further comprises: 获取所述继电器的最小置位时长;Get the minimum set duration of the relay; 将包含所述最小置位时长的第二预设阈值区间确定为所述继电器的响应时间的取值区间;Determining the second preset threshold interval including the minimum setting duration as the value interval of the response time of the relay; 基于从所述响应时间的取值区间中选取的继电器的响应时间,确定所选取的继电器的响应时间为所述响应间隔时长。Based on the response time of the relay selected from the value interval of the response time, the selected response time of the relay is determined as the response interval duration. 4.如权利要求1所述的方法,其特征在于,所述负载电路包括至少一个负载支路,每个所述负载支路设有对应的继电器;所述响应于指向所述负载电路的连续的至少两个置位指令,确定对应于所述负载电路的响应策略,包括:4. The method of claim 1, wherein the load circuit comprises at least one load branch, each of the load branches is provided with a corresponding relay; The at least two set instructions, determine the response strategy corresponding to the load circuit, including: 响应于指向所述继电器的连续的至少两个置位指令,确定所述置位指令的类型;determining the type of the set command in response to at least two consecutive set commands directed to the relay; 若至少两个所述置位指令指向同一个负载支路,则确定所述响应策略为第一响应策略;所述第一响应策略包括:控制所述负载支路上的所述继电器按照所述响应间隔时长依次响应至少两个所述置位指令。If at least two of the setting instructions point to the same load branch, the response strategy is determined to be a first response strategy; the first response strategy includes: controlling the relays on the load branch to respond according to the response The interval duration responds to at least two of the set commands in sequence. 5.如权利要求1所述的方法,其特征在于,所述负载的数量为多个,所述负载电路包括多个负载支路,多个所述负载支路分别设置有对应的继电器;所述响应于指向所述负载电路的连续的至少两个置位指令,确定对应于所述负载的响应策略,包括:5. The method according to claim 1, wherein the number of the loads is multiple, the load circuit comprises multiple load branches, and the multiple load branches are respectively provided with corresponding relays; and determining a response strategy corresponding to the load in response to at least two consecutive set instructions directed to the load circuit, including: 响应于指向所述继电器的连续的至少两个置位指令,确定所述置位指令的类型;determining the type of the set command in response to at least two consecutive set commands directed to the relay; 若至少两个所述置位指令分别指向多个所述负载支路,则确定所述响应策略为第二响应策略;所述第二响应策略包括:控制多个所述负载支路上的所述继电器按照所述响应间隔时长依次响应对应的置位指令。If at least two of the setting instructions respectively point to a plurality of the load branches, the response strategy is determined to be a second response strategy; the second response strategy includes: controlling the The relay responds to the corresponding setting commands in sequence according to the response interval duration. 6.如权利要求1所述的方法,其特征在于,所述负载控制电路包括取电电路;所述响应于指向所述负载电路的连续的至少两个置位指令,确定对应于所述负载电路的响应策略之后,所述方法还包括:6 . The method of claim 1 , wherein the load control circuit comprises a power take-up circuit; the determination of the load corresponding to the load is determined in response to at least two consecutive set instructions directed to the load circuit. 7 . After the response strategy of the circuit, the method further includes: 确定取电控制指令;Determine the power-taking control command; 在所述负载电路导通的情况下,响应于所述取电控制指令,控制所述取电电路导通。When the load circuit is turned on, the power taking circuit is controlled to be turned on in response to the power taking control instruction. 7.如权利要求1~6中任一项所述的方法,其特征在于,所述负载控制电路还包括通信模块;所述响应于指向所述负载电路的连续的至少两个置位指令,确定对应于所述负载电路的响应策略之前,所述方法还包括:响应于所述开关的上电状态,控制所述通信模块与服务器建立网络连接。7. The method according to any one of claims 1 to 6, wherein the load control circuit further comprises a communication module; and in response to at least two consecutive setting instructions directed to the load circuit, Before determining the response strategy corresponding to the load circuit, the method further includes: in response to the power-on state of the switch, controlling the communication module to establish a network connection with the server. 8.一种负载控制装置,其特征在于,所述装置包括:8. A load control device, characterized in that the device comprises: 确定响应策略模块,用于响应于指向所述负载电路的连续的至少两个置位指令,确定对应于所述负载电路的响应策略;所述响应策略至少包括所述负载电路对于连续的两个置位指令的响应间隔时长;A response strategy determination module, configured to determine a response strategy corresponding to the load circuit in response to at least two consecutive setting instructions directed to the load circuit; the response strategy at least includes the load circuit for two consecutive set instructions The response interval length of the set command; 控制模块,用于根据所述响应策略,控制所述负载电路响应所述置位指令。A control module, configured to control the load circuit to respond to the setting instruction according to the response strategy. 9.一种智能开关,其特征在于,包括一个或多个处理器以及存储器;9. An intelligent switch, comprising one or more processors and a memory; 一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行权利要求1-7任一所述的方法。One or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method of any of claims 1-7. 10.一种存储有处理器可执行的程序代码的计算机可读存储介质,其特征在于,所述计算机可读存储介质包括存储的程序代码,其中,在所述程序代码运行时执行权利要求1-7任一所述的方法。10. A computer-readable storage medium storing program codes executable by a processor, wherein the computer-readable storage medium comprises stored program codes, wherein, when the program codes are executed, claim 1 is executed -7 Any of the described methods.
CN202210286667.7A 2022-03-22 2022-03-22 Load control method and device, intelligent switch and storage medium Pending CN114690667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210286667.7A CN114690667A (en) 2022-03-22 2022-03-22 Load control method and device, intelligent switch and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210286667.7A CN114690667A (en) 2022-03-22 2022-03-22 Load control method and device, intelligent switch and storage medium

Publications (1)

Publication Number Publication Date
CN114690667A true CN114690667A (en) 2022-07-01

Family

ID=82138960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210286667.7A Pending CN114690667A (en) 2022-03-22 2022-03-22 Load control method and device, intelligent switch and storage medium

Country Status (1)

Country Link
CN (1) CN114690667A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4143410A (en) * 1976-12-30 1979-03-06 Lockheed Aircraft Corporation Electric power system control utilizing low level signals and miniature gage wiring
US4349748A (en) * 1979-03-21 1982-09-14 Dynascan Corporation Timer and power control system
JP2002122368A (en) * 2000-08-11 2002-04-26 Hoshizaki Electric Co Ltd Ice dispenser
CN202282301U (en) * 2011-10-17 2012-06-20 苏峰 Relay with function of controlling frequent action
CN102791060A (en) * 1998-10-09 2012-11-21 阿佐特克(私人)有限公司 Intelligent electrical devices
CN106369559A (en) * 2016-10-17 2017-02-01 中山市华艺灯饰照明股份有限公司 On-off method based on sequential logic control and switch applying on-off method
CN110562006A (en) * 2019-08-30 2019-12-13 广东志高暖通设备股份有限公司 Low-voltage protection method and device, computer equipment and storage medium
WO2020093680A1 (en) * 2018-11-07 2020-05-14 舒可士(深圳)科技有限公司 Switch control method, device, electronic apparatus, and computer readable storage medium
CN211702003U (en) * 2020-03-11 2020-10-16 广东核电合营有限公司 Delay circuit and system for nuclear power station
CN113805051A (en) * 2021-09-08 2021-12-17 深圳市欧瑞博科技股份有限公司 Switch performance testing method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4143410A (en) * 1976-12-30 1979-03-06 Lockheed Aircraft Corporation Electric power system control utilizing low level signals and miniature gage wiring
US4349748A (en) * 1979-03-21 1982-09-14 Dynascan Corporation Timer and power control system
CN102791060A (en) * 1998-10-09 2012-11-21 阿佐特克(私人)有限公司 Intelligent electrical devices
JP2002122368A (en) * 2000-08-11 2002-04-26 Hoshizaki Electric Co Ltd Ice dispenser
CN202282301U (en) * 2011-10-17 2012-06-20 苏峰 Relay with function of controlling frequent action
CN106369559A (en) * 2016-10-17 2017-02-01 中山市华艺灯饰照明股份有限公司 On-off method based on sequential logic control and switch applying on-off method
WO2020093680A1 (en) * 2018-11-07 2020-05-14 舒可士(深圳)科技有限公司 Switch control method, device, electronic apparatus, and computer readable storage medium
CN110562006A (en) * 2019-08-30 2019-12-13 广东志高暖通设备股份有限公司 Low-voltage protection method and device, computer equipment and storage medium
CN211702003U (en) * 2020-03-11 2020-10-16 广东核电合营有限公司 Delay circuit and system for nuclear power station
CN113805051A (en) * 2021-09-08 2021-12-17 深圳市欧瑞博科技股份有限公司 Switch performance testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111399959B (en) Multitasking operation method, device, electronic device and storage medium
CN106211254B (en) A kind of method for connecting network and mobile terminal
CN110377141B (en) Application processing method and device, electronic equipment and storage medium
CN113986788B (en) Data processing method and device, chip, electronic equipment and medium
CN106161804A (en) A kind of audio play control method and mobile terminal
CN115130679A (en) Data management method and related device and media program product
CN111970749A (en) Network connection method and device, intelligent household equipment and intelligent household system
CN107566622A (en) A kind of temprature control method and mobile terminal
CN106445074A (en) Control method for application and mobile terminal
US11388673B2 (en) Control method and device
CN110602772A (en) WiFi module control method, control device, electronic device and storage medium
CN111752632B (en) Mobile terminal control method and device, mobile terminal and storage medium
CN110795172B (en) Foreground process control method and device, electronic equipment and storage medium
CN114690667A (en) Load control method and device, intelligent switch and storage medium
CN114413441B (en) Key control method, key control device, computer equipment, storage medium and program product
CN107728898A (en) A kind of information processing method and mobile terminal
CN109537696B (en) Intelligent flushing control method and device, intelligent equipment and storage medium
CN107562267B (en) Mobile terminal control method and mobile terminal
CN114281724B (en) Data transmission method and device and electronic equipment
CN114745813B (en) Device control method, device, electronic device and storage medium
CN107509237B (en) Wireless network connection method, mobile terminal and readable storage medium
CN107396434B (en) Wireless network connection method and mobile terminal
WO2021072760A1 (en) Touch screen reporting method and apparatus, electronic device, and storage medium
CN117032829A (en) Function module loading method, electronic equipment and computer storage medium
CN114660976A (en) Switch control method and device, intelligent switch and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination