CN114615249B - Control method and system for air-insulated switching lamp and computer readable storage medium - Google Patents
Control method and system for air-insulated switching lamp and computer readable storage medium Download PDFInfo
- Publication number
- CN114615249B CN114615249B CN202210249209.6A CN202210249209A CN114615249B CN 114615249 B CN114615249 B CN 114615249B CN 202210249209 A CN202210249209 A CN 202210249209A CN 114615249 B CN114615249 B CN 114615249B
- Authority
- CN
- China
- Prior art keywords
- preset
- terminal
- control
- execution
- server
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y40/00—IoT characterised by the purpose of the information processing
- G16Y40/10—Detection; Monitoring
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Y—INFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
- G16Y40/00—IoT characterised by the purpose of the information processing
- G16Y40/30—Control
- G16Y40/35—Management of things, i.e. controlling in accordance with a policy or in order to achieve specified objectives
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/175—Controlling the light source by remote control
- H05B47/19—Controlling the light source by remote control via wireless transmission
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computing Systems (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Environmental & Geological Engineering (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Selective Calling Equipment (AREA)
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
本发明公开了一种隔空开关灯的控制方法、系统及计算机可读存储介质,属于物联网技术领域。本发明通过检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;当监测到所述预设遥控端产生按键信号时,基于所述按键信号生成状态数据并发送至所述预设服务器;基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。实现了基于物联网的隔空开关灯控制,避免了外界干扰和距离限制,提升了用户的寻车体验。
The invention discloses a control method, a system and a computer-readable storage medium for an air-spaced switch lamp, and belongs to the technical field of the Internet of Things. The present invention detects whether there is a network connection between the preset remote terminal and the preset execution terminal and the preset server; if both the preset remote terminal and the preset execution terminal have network connections with the preset server, the Whether the preset remote terminal generates a key signal; when it is detected that the preset remote terminal generates a key signal, generate status data based on the key signal and send it to the preset server; receive the status based on the preset server data and forward the state data to the preset execution end; when the preset execution end receives the state data, control the preset execution end to adjust the state of the preset signal light according to the state data . It realizes the control of light switch lights based on the Internet of Things, avoids external interference and distance restrictions, and improves the user's car-finding experience.
Description
技术领域technical field
本发明涉及物联网技术领域,尤其涉及隔空开关灯的控制方法、系统及计算机可读存储介质。The invention relates to the technical field of the Internet of Things, in particular to a control method, system and computer-readable storage medium for an air-spaced switch lamp.
背景技术Background technique
由于自行车绿色环保,骑乘自行车的人越来越多,但在公共场所,如学校、商场、工厂、写字楼等的停车场常常停放着许多自行车,由于一方面自行车款式大同小异,另一方面为了规范停车场的秩序,停车场的管理人员经常会整理停放的自行车,将自行车移位,导致使用者在找寻自行车时要花费很多时间,很难一下子找到自己的自行车,给使用者带来相当大的不便。Because bicycles are green and environmentally friendly, more and more people ride bicycles, but in public places, such as parking lots of schools, shopping malls, factories, office buildings, etc., there are often many bicycles parked. The order of the parking lot, the management personnel of the parking lot often sort out the bicycles parked and shift the bicycles, causing users to spend a lot of time looking for bicycles, it is difficult to find their own bicycles at once, which brings considerable inconvenience to users. the inconvenience.
为此,现有技术中通过在自行车上添加遥控灯,用户使用遥控器控制遥控灯开关的方式来帮助寻车。但是,此类遥控技术大多为红外遥控或者蓝牙遥控,这两种技术一是容易受到外界干扰,一是容易受到距离限制,无法完全解决用户的寻车问题。For this reason, in the prior art, by adding a remote control light on the bicycle, the user uses a remote controller to control the remote control light switch to help find the car. However, most of these remote control technologies are infrared remote control or Bluetooth remote control. These two technologies are susceptible to external interference and distance restrictions, and cannot completely solve the problem of car search for users.
发明内容Contents of the invention
本发明的主要目的在于提供一种隔空开关灯的控制方法、系统及计算机可读存储介质,旨在解决如何提供一种不易受到外界干扰和距离限制的寻车方案的技术问题。The main purpose of the present invention is to provide a control method, system and computer-readable storage medium for air-spaced switch lamps, aiming to solve the technical problem of how to provide a car-finding solution that is less susceptible to external interference and distance restrictions.
为实现上述目的,本发明提供一种隔空开关灯的控制方法,所述隔空开关灯的控制方法包括以下步骤:In order to achieve the above object, the present invention provides a control method for an air-isolated switch light, which includes the following steps:
检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;Detect whether there is a network connection between the preset remote terminal, the preset execution terminal and the preset server;
若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;If both the preset remote control terminal and the preset execution terminal have a network connection with the preset server, then monitor whether the preset remote control terminal generates a button signal;
当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;When it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate state data based on the key signal and send the state data to the preset server;
基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;receiving the state data based on the preset server and forwarding the state data to the preset execution end;
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。When the preset execution terminal receives the status data, the preset execution terminal is controlled to adjust the status of the preset signal light according to the status data.
可选地,所述检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接的步骤之后还包括:Optionally, after the step of detecting whether there is a network connection between the preset remote terminal, the preset execution terminal, and the preset server, the step further includes:
若所述预设遥控端和/或预设执行端与预设服务器之间不存在网络连接,则对所述预设遥控端和/或预设执行端进行初始化配置。If there is no network connection between the preset remote terminal and/or the preset execution terminal and the preset server, initial configuration is performed on the preset remote control terminal and/or the preset execution terminal.
可选地,所述对所述预设遥控端进行初始化配置的步骤包括:Optionally, the step of initializing the preset remote control terminal includes:
基于预设开发软件为所述预设遥控端配置无线网络连接参数、预设协议客户端连接参数、开关逻辑函数以及执行函数。Based on the preset development software, configure wireless network connection parameters, preset protocol client connection parameters, switch logic functions and execution functions for the preset remote terminal.
可选地,所述对所述预设执行端进行初始化配置的步骤包括:Optionally, the step of initializing and configuring the preset execution terminal includes:
基于预设开发软件为所述预设执行端配置无线网络连接参数、预设协议客户端连接参数、订阅逻辑函数以及回调函数。Based on the preset development software, configure wireless network connection parameters, preset protocol client connection parameters, subscription logic functions and callback functions for the preset execution end.
可选地,所述对所述预设遥控端和/或预设执行端进行初始化配置的步骤之后包括:Optionally, after the step of initializing the preset remote control terminal and/or the preset execution terminal includes:
当所述预设遥控端和预设执行端均成功连接至所述无线网络和预设协议客户端时,确定所述预设遥控端和预设执行端与预设服务器之间均存在网络连接。When both the preset remote control terminal and the preset execution terminal are successfully connected to the wireless network and the preset protocol client, it is determined that there is a network connection between the preset remote control terminal, the preset execution terminal and the preset server. .
可选地,所述基于所述按键信号生成状态数据的步骤包括:Optionally, the step of generating state data based on the key signal comprises:
基于所述按键信号生成按键标志位,将所述按键标志位代入所述开关逻辑函数中,以调用所述执行函数生成状态数据。A key flag is generated based on the key signal, and the key flag is substituted into the switch logic function to call the execution function to generate state data.
可选地,所述基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端的步骤之后包括:Optionally, the step of receiving the status data based on the preset server and forwarding the status data to the preset execution end includes:
控制预设执行端通过所述订阅逻辑函数动态获取来自所述预设服务器中预设协议客户端的状态数据。The control preset execution end dynamically obtains the state data from the preset protocol client in the preset server through the subscription logic function.
可选地,所述基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端的步骤之后还包括:Optionally, after the step of receiving the status data based on the preset server and forwarding the status data to the preset execution end, the step further includes:
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设蜂鸣器进行状态调整。When the preset execution end receives the state data, the preset execution end is controlled to adjust the state of the preset buzzer according to the state data.
此外,为实现上述目的,本发明还提供一种隔空开关灯的控制系统,所述隔空开关灯的控制系统包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的隔空开关灯的控制程序,所述隔空开关灯的控制程序被所述处理器执行时实现如上所述的隔空开关灯的控制方法的步骤。In addition, in order to achieve the above object, the present invention also provides a control system for spaced switch lights, the control system for spaced switch lights includes: a memory, a processor, and a The control program of the space switch light running on the processor, when the control program of the space switch light is executed by the processor, the steps of the above-mentioned control method of the space switch light are realized.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有隔空开关灯的控制程序,所述隔空开关灯的控制程序被处理器执行时实现如上所述的隔空开关灯的控制方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores the control program of the space switch light, and the control program of the space switch light is processed When the device is executed, the steps of the above-mentioned control method for the air switch light are realized.
本发明提出一种隔空开关灯的控制方法、系统及计算机可读存储介质,克服了现有的红外遥控寻车或蓝牙遥控寻车技术中存在的易受外界干扰和易受距离限制的问题。在所述隔空开关灯的控制方法中,通过检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。本发明实现了基于物联网的隔空开关灯控制,避免了外界干扰和距离限制,只要连接上网络后就可以实现远程控制,在室外场景中,只需要接入互联网即可随时随地控制,无需收到距离限制,灵活度高;还支持多设备连接控制,只要灯控组件接入互联网,即可实现自定义控制,集成度高;能够完全解决用户的寻车问题,提升了用户的寻车体验。The present invention proposes a control method, system and computer-readable storage medium for an air-isolated switch light, which overcomes the disadvantages of being susceptible to external interference and being easily limited by distance in the existing infrared remote control car search or Bluetooth remote car search technology. question. In the control method of the air switch light, by detecting whether there is a network connection between the preset remote control terminal and the preset execution terminal and the preset server; if the preset remote control terminal and the preset execution terminal are both connected to If the preset server has a network connection, then monitor whether the preset remote terminal generates a key signal; when it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate status data based on the key signal and sending the state data to the preset server; receiving the state data based on the preset server and forwarding the state data to the preset execution end; when the preset execution end receives the state data, control the preset executing end to adjust the state of the preset signal light according to the state data. The present invention realizes the control of space-isolated switch lights based on the Internet of Things, avoids external interference and distance restrictions, and can realize remote control as long as it is connected to the network. In outdoor scenes, it can be controlled anytime and anywhere only by connecting to the Internet. There is no need to receive distance restrictions, and the flexibility is high; it also supports multi-device connection control, as long as the light control component is connected to the Internet, custom control can be realized, with high integration; it can completely solve the user's car-finding problem and improve the user's search car experience.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境的隔空开关灯的控制系统结构示意图;Fig. 1 is a schematic structural diagram of the control system of the space switch light of the hardware operating environment involved in the embodiment of the present invention;
图2为本发明隔空开关灯的控制方法一实施例的流程示意图;Fig. 2 is a schematic flow chart of an embodiment of the control method of the air-spaced switch lamp of the present invention;
图3为本发明图2实施例中涉及的各参与方交互的场景示意图。FIG. 3 is a schematic diagram of the interaction scene of the participants involved in the embodiment of FIG. 2 of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明实施例的主要解决方案是:一种隔空开关灯的控制方法,所述隔空开关灯的控制方法包括以下步骤:The main solution of the embodiment of the present invention is: a control method for an air-isolated switch light, and the control method for the air-isolated switch light includes the following steps:
检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;Detect whether there is a network connection between the preset remote terminal, the preset execution terminal and the preset server;
若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;If both the preset remote control terminal and the preset execution terminal have a network connection with the preset server, then monitor whether the preset remote control terminal generates a button signal;
当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;When it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate state data based on the key signal and send the state data to the preset server;
基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;receiving the state data based on the preset server and forwarding the state data to the preset execution end;
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。When the preset execution terminal receives the status data, the preset execution terminal is controlled to adjust the status of the preset signal light according to the status data.
由于现有技术中通过在自行车上添加遥控灯,用户使用遥控器控制遥控灯开关的方式来帮助寻车。但是,此类遥控技术大多为红外遥控或者蓝牙遥控,这两种技术一是容易受到外界干扰,一是容易受到距离限制,无法完全解决用户的寻车问题。Because in the prior art, by adding a remote control light on the bicycle, the user uses a remote controller to control the remote control light switch to help find the car. However, most of these remote control technologies are infrared remote control or Bluetooth remote control. These two technologies are susceptible to external interference and distance restrictions, and cannot completely solve the problem of car search for users.
本发明提供一种隔空开关灯的控制方法,克服了现有的红外遥控寻车或蓝牙遥控寻车技术中存在的易受外界干扰和易受距离限制的问题。通过实施本发明,能够实现基于物联网的隔空开关灯控制,避免了外界干扰和距离限制,只要连接上网络后就可以实现远程控制,在室外场景中,只需要接入互联网即可随时随地控制,无需收到距离限制,灵活度高;还支持多设备连接控制,只要灯控组件接入互联网,即可实现自定义控制,集成度高;能够完全解决用户的寻车问题,提升了用户的寻车体验。The invention provides a control method for switching lamps in space, which overcomes the problems of easy external interference and distance limitation existing in the existing infrared remote control car search or bluetooth remote car search technology. Through the implementation of the present invention, it is possible to realize the control of space-isolated switch lights based on the Internet of Things, avoiding external interference and distance restrictions, and remote control can be realized as long as it is connected to the network. In outdoor scenes, it only needs to be connected to the Internet. Anywhere control, no need to receive distance restrictions, high flexibility; also supports multi-device connection control, as long as the light control components are connected to the Internet, custom control can be realized, with high integration; it can completely solve the user's car-finding problem and improve the The user's car search experience.
参照图1,图1为本发明实施例方案涉及的硬件运行环境的隔空开关灯的控制系统结构示意图。Referring to FIG. 1 , FIG. 1 is a schematic structural diagram of a control system of a space switch lamp in a hardware operating environment related to the solution of an embodiment of the present invention.
如图1所示,该隔空开关灯的控制系统可以包括:处理器1001,例如中央处理器(Central Processing Unit,CPU),通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真(WIreless-FIdelity,WI-FI)接口)。存储器1005可以是高速的随机存取存储器(RandomAccess Memory,RAM)存储器,也可以是稳定的非易失性存储器(Non-Volatile Memory,NVM),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储设备。As shown in FIG. 1 , the control system for the air switch light may include: a
本领域技术人员可以理解,图1中示出的结构并不构成对隔空开关灯的控制系统的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 1 does not constitute a limitation on the control system of the space switch lamp, and may include more or less components than shown in the figure, or combine certain components, or be different layout of the components.
如图1所示,作为一种存储介质的存储器1005中可以包括操作系统、数据存储模块、网络通信模块、用户接口模块以及隔空开关灯的控制程序。As shown in FIG. 1 , the
在图1所示的隔空开关灯的控制系统中,网络接口1004主要用于与其他设备进行数据通信;用户接口1003主要用于与用户进行数据交互;本发明隔空开关灯的控制系统中的处理器1001、存储器1005可以设置在隔空开关灯的控制系统中,所述隔空开关灯的控制系统通过处理器1001调用存储器1005中存储的隔空开关灯的控制程序,并执行如下操作:In the control system of the spaced switch lamp shown in Figure 1, the
检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;Detect whether there is a network connection between the preset remote terminal, the preset execution terminal and the preset server;
若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;If both the preset remote control terminal and the preset execution terminal have a network connection with the preset server, then monitor whether the preset remote control terminal generates a button signal;
当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;When it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate state data based on the key signal and send the state data to the preset server;
基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;receiving the state data based on the preset server and forwarding the state data to the preset execution end;
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。When the preset execution terminal receives the status data, the preset execution terminal is controlled to adjust the status of the preset signal light according to the status data.
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接的步骤之后还包括:After the step of detecting whether there is a network connection between the preset remote terminal, the preset execution terminal and the preset server, it also includes:
若所述预设遥控端和/或预设执行端与预设服务器之间不存在网络连接,则对所述预设遥控端和/或预设执行端进行初始化配置。If there is no network connection between the preset remote terminal and/or the preset execution terminal and the preset server, initial configuration is performed on the preset remote control terminal and/or the preset execution terminal.
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述对所述预设遥控端进行初始化配置的步骤包括:The step of initializing the configuration of the preset remote terminal includes:
基于预设开发软件为所述预设遥控端配置无线网络连接参数、预设协议客户端连接参数、开关逻辑函数以及执行函数。Based on the preset development software, configure wireless network connection parameters, preset protocol client connection parameters, switch logic functions and execution functions for the preset remote terminal.
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述对所述预设执行端进行初始化配置的步骤包括:The step of initializing the configuration of the preset execution terminal includes:
基于预设开发软件为所述预设执行端配置无线网络连接参数、预设协议客户端连接参数、订阅逻辑函数以及回调函数。Based on the preset development software, configure wireless network connection parameters, preset protocol client connection parameters, subscription logic functions and callback functions for the preset execution end.
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述对所述预设遥控端和/或预设执行端进行初始化配置的步骤之后包括:After the step of initializing the configuration of the preset remote control terminal and/or the preset execution terminal includes:
当所述预设遥控端和预设执行端均成功连接至所述无线网络和预设协议客户端时,确定所述预设遥控端和预设执行端与预设服务器之间均存在网络连接。When both the preset remote control terminal and the preset execution terminal are successfully connected to the wireless network and the preset protocol client, it is determined that there is a network connection between the preset remote control terminal, the preset execution terminal and the preset server. .
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述基于所述按键信号生成状态数据的步骤包括:The step of generating state data based on the key signal comprises:
基于所述按键信号生成按键标志位,将所述按键标志位代入所述开关逻辑函数中,以调用所述执行函数生成状态数据。A key flag is generated based on the key signal, and the key flag is substituted into the switch logic function to call the execution function to generate state data.
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端的步骤之后包括:The step of receiving the status data based on the preset server and forwarding the status data to the preset execution end includes:
控制预设执行端通过所述订阅逻辑函数动态获取来自所述预设服务器中预设协议客户端的状态数据。The control preset execution end dynamically obtains the state data from the preset protocol client in the preset server through the subscription logic function.
进一步地,处理器1001可以调用存储器1005中存储的隔空开关灯的控制程序,还执行以下操作:Further, the
所述基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端的步骤之后还包括:After the step of receiving the status data based on the preset server and forwarding the status data to the preset execution end, the step further includes:
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设蜂鸣器进行状态调整。When the preset execution end receives the state data, the preset execution end is controlled to adjust the state of the preset buzzer according to the state data.
本发明实施例提供了一种隔空开关灯的控制方法,参照图2,图2为本发明一种隔空开关灯的控制方法一实施例的流程示意图。An embodiment of the present invention provides a control method for an air-space switch lamp. Referring to FIG. 2 , FIG. 2 is a schematic flowchart of an embodiment of a control method for an air-space switch light according to the present invention.
本实施例中,所述隔空开关灯的控制方法包括:In this embodiment, the control method of the air switch lamp includes:
步骤S10,检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;Step S10, detecting whether there is a network connection between the preset remote control terminal, the preset execution terminal and the preset server;
需要说明的是,本实施例中,执行主体为如图1所述的隔空开关灯的控制系统,参照图3,所述隔空开关灯的控制系统中包括预设遥控端100、预设服务器200和预设执行端300。It should be noted that, in this embodiment, the execution subject is the control system of the space switch lamp as shown in FIG. 1. Referring to FIG. A
具体实现中,所述预设遥控端100为遥控器,所述预设执行端300为遥控灯,二者均由外壳和开发板组成。本实施例中采用两个mixgo ce的开发板,分别作为遥控器和遥控灯,将MIXIO网页端服务器作为预设服务器200发送订阅数据,实现远程控制开关灯亮灭的操作。In a specific implementation, the preset
可以理解的是,本实施例依赖的隔空开关灯的控制系统是基于互联网进行运作的,故要保证其正常运行,就需要确认遥控器和遥控灯均处于与服务器连接的状态,否则就会出现遥控无效的状况。It can be understood that the control system of the space switch light that this embodiment relies on is based on the Internet, so to ensure its normal operation, it is necessary to confirm that both the remote control and the remote control light are connected to the server, otherwise the There will be a situation where the remote control is invalid.
作为一个实例,本实施例中,步骤S10之后包括:若所述预设遥控端和/或预设执行端与预设服务器之间不存在网络连接,则对所述预设遥控端和/或预设执行端进行初始化配置。其中,所述对所述预设遥控端进行初始化配置的步骤包括:基于预设开发软件为所述预设遥控端配置无线网络连接参数、预设协议客户端连接参数、开关逻辑函数以及执行函数。所述对所述预设执行端进行初始化配置的步骤包括:基于预设开发软件为所述预设执行端配置无线网络连接参数、预设协议客户端连接参数、订阅逻辑函数以及回调函数。As an example, in this embodiment, after step S10, it includes: if there is no network connection between the preset remote terminal and/or the preset execution terminal and the preset server, then the preset remote terminal and/or The default execution terminal performs initial configuration. Wherein, the step of initializing the configuration of the preset remote terminal includes: configuring wireless network connection parameters, preset protocol client connection parameters, switch logic functions, and execution functions for the preset remote terminal based on preset development software . The step of initially configuring the preset execution terminal includes: configuring wireless network connection parameters, preset protocol client connection parameters, subscription logic functions and callback functions for the preset execution terminal based on preset development software.
可以理解的是,所述预设遥控端和/或预设执行端与预设服务器之间不存在网络连接包括3种情况,一是预设遥控端与预设服务器之间不存在网络连接,二是预设执行端与预设服务器之间不存在网络连接,三是二者与预设服务器之间都不存在网络连接。It can be understood that the absence of network connection between the preset remote terminal and/or the preset execution terminal and the preset server includes three situations, one is that there is no network connection between the preset remote terminal and the preset server, The second is that there is no network connection between the default execution terminal and the default server, and the third is that there is no network connection between the two and the default server.
需要说明的是,本实施例中需要进行的初始化配置除了对预设遥控端和预设执行端进行配置之外,还包括对预设服务器的初始化配置,即进行MixIO网页注册,注册完成后进入页面并创建项目,项目创建完成后对其进行设置,本实施例中,对其进行的设置为添加“指示灯”组件并为其命名,至此,预设服务器的初始化配置完成。It should be noted that, in addition to the configuration of the preset remote control terminal and the preset execution terminal, the initialization configuration required in this embodiment also includes the initialization configuration of the preset server, that is, registering on the MixIO webpage, and entering page and create a project. After the project is created, set it. In this embodiment, the setting is to add the "light" component and name it. So far, the initialization configuration of the preset server is completed.
本实施例中,所述预设开发软件为mixly2.0,配置无线网络连接参数和预设协议客户端连接参数的步骤为:找到软件窗口中“图形化程序选择区”中的“物联网”模块中的“MixIO”,选择“连接Wi-Fi名称”和“创建MQTT客户端连接”两个模块。其中,所述预设协议即MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)协议,它是ISO标准(ISO/IEC PRF20922)下基于发布/订阅范式的消息协议。它工作在TCP/IP协议族上,是为硬件性能低下的远程设备以及网络状况糟糕的情况下而设计的发布/订阅型消息协议,为此,它需要一个消息中间件。MQTT是一个基于客户端-服务器的消息发布/订阅传输协议。MQTT协议是轻量、简单、开放和易于实现的,这些特点使它适用范围非常广泛。在很多情况下,包括受限的环境中,如:机器与机器(M2M)通信和物联网(IoT)。其在,通过卫星链路通信传感器、偶尔拨号的医疗设备、智能家居、及一些小型化设备中已广泛使用。In this embodiment, the preset development software is mixly2.0, and the steps of configuring the wireless network connection parameters and the preset protocol client connection parameters are: find the "Internet of Things" in the "graphical program selection area" in the software window "MixIO" in the module, select the two modules of "Connect Wi-Fi Name" and "Create MQTT Client Connection". Wherein, the preset protocol is the MQTT (Message Queuing Telemetry Transport) protocol, which is a message protocol based on the publish/subscribe paradigm under the ISO standard (ISO/IEC PRF20922). It works on the TCP/IP protocol family and is a publish/subscribe message protocol designed for remote devices with low hardware performance and poor network conditions. For this reason, it needs a message middleware. MQTT is a client-server based message publish/subscribe transport protocol. The MQTT protocol is lightweight, simple, open and easy to implement. These characteristics make it widely applicable. In many cases, including constrained environments such as machine-to-machine (M2M) communication and the Internet of Things (IoT). It is used extensively in sensors communicating via satellite links, medical devices that occasionally dial, smart homes, and some miniaturized devices.
应理解的是,由于本实施例是基于mixly2.0开发软件进行的程序编写,故需要将编写完成的程序下载至开发板中以使预设遥控端和预设执行端能够对程序进行实现和应用。It should be understood that since this embodiment is based on the programming of the mixly2.0 development software, it is necessary to download the completed program to the development board so that the preset remote terminal and the preset execution terminal can implement and implement the program. application.
本实施例中,所述开关逻辑函数以及执行函数会写入至预设遥控端的开发板中,其中,所述开关逻辑函数用于实现单按键控制开关逻辑,思路如下:对于只有单个按键来控制板载RGB灯的亮暗,其难点就在于判断按键按下所对应的灯是亮还是灭的命令。这里在编程中我们引入新的变量即表示开关的状态,我们给他命名为“n”,当“n”为0时,代表此时RGB灯为关闭状态,此时按下开关,我们希望RGB灯打开,所以“n”会变成1,此时通过MQTT协议发送数据(即所述状态数据)使小灯变亮;反向同理,当“n”=1时,代表此时RGB灯为打开状态,如果检测到按键被按下,则代表此时RGB灯将会熄灭,所以“n”赋值为0,并且通过MQTT协议发送小灯熄灭数据。所述执行函数是用于表征RGB灯状态的函数,本实施例中,提供了两个执行函数,其中一个执行函数state_1中将RGB值均设置为255,即呈现白色,用于控制RGB灯亮,另一个执行函数state_0中将RGB值均设置为0,即呈现黑色,用于控制RGB灯灭。In this embodiment, the switch logic function and execution function will be written into the development board of the preset remote control terminal, wherein the switch logic function is used to realize the single button control switch logic, the idea is as follows: for only a single button to control The onboard RGB lights are dimmed, and the difficulty lies in judging whether the corresponding light is on or off when the button is pressed. Here in programming, we introduce a new variable to indicate the state of the switch. We name it "n". When "n" is 0, it means that the RGB light is off at this time. Press the switch at this time, and we hope that the RGB The light is turned on, so "n" will become 1. At this time, the data (that is, the status data) is sent through the MQTT protocol to make the small light brighter; the reverse is the same, when "n"=1, it means that the RGB light at this time It is in the open state, if it is detected that the button is pressed, it means that the RGB light will be off at this time, so "n" is assigned a value of 0, and the small light off data is sent through the MQTT protocol. The execution function is a function used to characterize the state of the RGB light. In this embodiment, two execution functions are provided, and the RGB value is set to 255 in one of the execution functions state_1, that is, it appears white, and is used to control the RGB light. In another execution function state_0, the RGB values are set to 0, that is, black is displayed, which is used to control the RGB lights to turn off.
本实施例中,所述订阅逻辑函数以及回调函数会写入预设执行端的开发板中,其中,所述订阅逻辑函数用于接收“指示灯”的消息,同时启用回调函数,所述回调函数包括3个参数:项目名称,组件名称以及接收到的状态数据,当状态数据为1时,调用执行函数state_1控制RGB灯亮;当状态数据为0时,调用执行函数state_0控制RGB灯灭。In this embodiment, the subscription logic function and the callback function will be written into the development board of the preset execution terminal, wherein the subscription logic function is used to receive the message of "indicator light", and enable the callback function at the same time, the callback function It includes 3 parameters: project name, component name and received state data. When the state data is 1, call the execution function state_1 to control the RGB light on; when the state data is 0, call the execution function state_0 to control the RGB light off.
作为一个实例,当完成对所述预设遥控端和/或预设执行端进行初始化配置的步骤之后,当所述预设遥控端和预设执行端均成功连接至所述无线网络和预设协议客户端时,确定所述预设遥控端和预设执行端与预设服务器之间均存在网络连接。As an example, after the initial configuration of the preset remote terminal and/or the preset execution terminal is completed, when both the preset remote control terminal and the preset execution terminal are successfully connected to the wireless network and the preset When using the protocol client, it is determined that there is a network connection between the preset remote control terminal, the preset execution terminal and the preset server.
可以理解的是,当完成初始化设置后,预设遥控端和预设执行端均能够与WI-FI和MQTT客户端建立连接,此时预设遥控端产生的状态数据可以顺利地通过预设服务器传递到预设执行端。It is understandable that after the initialization is completed, both the preset remote terminal and the preset execution terminal can establish connections with WI-FI and MQTT clients, and the status data generated by the preset remote terminal can pass through the preset server smoothly. passed to the default execution side.
步骤S20,若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;Step S20, if both the preset remote terminal and the preset execution terminal have a network connection with the preset server, then monitor whether the preset remote terminal generates a button signal;
可以理解的是,若所述预设遥控端和预设执行端均与预设服务器存在网络连接,说明系统中的各部分均已完成初始化设置,只需要监测用户是否使用所述预设遥控端进行遥控操作即用户是否按键即可。It can be understood that if both the preset remote control terminal and the preset execution terminal have network connections with the preset server, it means that all parts in the system have been initialized, and it is only necessary to monitor whether the user uses the preset remote control terminal. To carry out remote control operation, that is, whether the user presses the button or not.
步骤S30,当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;Step S30, when it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate status data based on the key signal and send the status data to the preset server;
作为一个实例,本实施例中,步骤S30中基于所述按键信号生成状态数据的步骤包括:基于所述按键信号生成按键标志位,将所述按键标志位代入所述开关逻辑函数中,以调用所述执行函数生成状态数据。As an example, in this embodiment, the step of generating state data based on the key signal in step S30 includes: generating a key flag bit based on the key signal, and substituting the key flag bit into the switch logic function to call The execute function generates state data.
基于上述说明可知,当用户按动遥控器上的按键时,遥控器中开发板内预置的程序会执行,所述按键标志位即表示按键被按下,此时根据n的值进行判断生成的状态数据是1还是0,生成后再将n的值进行更改,以避免下次按键动作发生时,生成与上次一致的状态数据。Based on the above description, it can be seen that when the user presses a button on the remote controller, the preset program in the development board of the remote controller will be executed, and the button flag indicates that the button is pressed. At this time, it is judged and generated according to the value of n Whether the state data is 1 or 0, change the value of n after generation to avoid generating the same state data as last time when the next button action occurs.
步骤S40,基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;Step S40, based on the preset server receiving the status data and forwarding the status data to the preset execution end;
可以理解的是,本实施例中,所述预设服务器是作为数据转运的平台,用于接收来自预设遥控端的数据并将接收到的状态数据发送至所述预设执行端。It can be understood that, in this embodiment, the preset server is used as a data transfer platform for receiving data from the preset remote control terminal and sending the received status data to the preset execution terminal.
作为一个实例,本实施例中,步骤S40之后包括:控制预设执行端通过所述订阅逻辑函数动态获取来自所述预设服务器中预设协议客户端的状态数据。As an example, in this embodiment, after step S40, it includes: controlling the preset executing end to dynamically acquire the state data from the preset protocol client in the preset server through the subscription logic function.
需要说明的是,所述逻辑订阅函数中还包括一个获取周期,例如每隔1秒获取一次数据,或者每隔0.5秒获取一次数据,可根据实际需求进行适当修改,本实施例对此不加以限制。It should be noted that the logic subscription function also includes an acquisition cycle, such as acquiring data every 1 second, or acquiring data every 0.5 seconds, which can be appropriately modified according to actual needs, and this embodiment does not add limit.
步骤S50,当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。Step S50, when the preset execution terminal receives the status data, control the preset execution terminal to adjust the status of the preset signal light according to the status data.
可以理解的是,所述预设执行端包括预设信号灯,本实施例中,所述预设信号灯优选为RGB灯,当所述状态数据为1时,则控制所述预设信号灯亮,当所述状态数据为0时,则控制所述预设信号灯灭。It can be understood that the preset execution terminal includes a preset signal light. In this embodiment, the preset signal light is preferably an RGB light. When the state data is 1, the preset signal light is controlled to be on. When the state data is 0, the preset signal light is controlled to be off.
作为一个实例,本实施例中,还存在与步骤S50并列的步骤:当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设蜂鸣器进行状态调整。As an example, in this embodiment, there is also a step in parallel with step S50: when the preset execution terminal receives the status data, control the preset execution terminal to buzz the preset according to the status data to adjust the state of the device.
可以理解的是,所述预设执行端还包括预设蜂鸣器,当所述状态数据为1时,则控制所述预设蜂鸣器进行鸣叫,当所述状态数据为0时,则控制所述预设蜂鸣器停止鸣叫。It can be understood that the preset execution end also includes a preset buzzer, and when the status data is 1, the preset buzzer is controlled to beep; when the status data is 0, then Control the preset buzzer to stop sounding.
本实施例可用于需要进行隔空开关灯的多种场景,例如在自行车上安装预设执行端,可帮助用户寻找停车场中的自行车;再例如在卫生间放置预设执行端,可以帮助用户在夜间起床去卫生间时,不必开启大灯以免太过晃眼,同时也能起到照明的作用。This embodiment can be used in a variety of scenarios that need to switch lights in the air. For example, installing a preset execution terminal on a bicycle can help users find bicycles in the parking lot; for example, placing a preset execution terminal in the bathroom can help users When you get up to go to the bathroom at night, you don't have to turn on the headlights to avoid being too dazzling, and it can also play a role in lighting.
在本实施例中提出了一种隔空开关灯的控制方法,克服了现有的红外遥控寻车或蓝牙遥控寻车技术中存在的易受外界干扰和易受距离限制的问题。本实施例通过检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;In this embodiment, a control method for switching lights in space is proposed, which overcomes the problems of easy external interference and distance limitation existing in the existing infrared remote control car search or Bluetooth remote car search technology. In this embodiment, by detecting whether there is a network connection between the preset remote terminal and the preset execution terminal and the preset server; Whether the preset remote terminal generates a button signal;
当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。When it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate state data based on the key signal and send the state data to the preset server; based on the preset server receiving The state data and forward the state data to the preset execution end; when the preset execution end receives the state data, control the preset execution end to set the preset signal light according to the state data Make status adjustments.
本实施例实现了基于物联网的隔空开关灯控制,避免了外界干扰和距离限制,只要连接上网络后就可以实现远程控制,在室外场景中,只需要接入互联网即可随时随地控制,无需收到距离限制,灵活度高;还支持多设备连接控制,只要灯控组件接入互联网,即可实现自定义控制,集成度高;能够完全解决用户的寻车问题,提升了用户的寻车体验。This embodiment realizes the remote control of light switches based on the Internet of Things, avoiding external interference and distance restrictions, and can realize remote control as long as it is connected to the network. In outdoor scenes, it only needs to be connected to the Internet to control it anytime and anywhere , no need to receive distance restrictions, high flexibility; it also supports multi-device connection control, as long as the light control component is connected to the Internet, custom control can be realized, with high integration; it can completely solve the user's car-finding problem and improve the user's convenience. Find a car experience.
此外,本发明实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有隔空开关灯的控制程序,所述隔空开关灯的控制程序被处理器执行时实现如下操作:In addition, the embodiment of the present invention also proposes a computer-readable storage medium, the computer-readable storage medium stores the control program of the space switch light, and when the control program of the space switch light is executed by the processor Implement the following operations:
检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接;Detect whether there is a network connection between the preset remote terminal, the preset execution terminal and the preset server;
若所述预设遥控端和预设执行端均与预设服务器存在网络连接,则监测所述预设遥控端是否产生按键信号;If both the preset remote control terminal and the preset execution terminal have a network connection with the preset server, then monitor whether the preset remote control terminal generates a button signal;
当监测到所述预设遥控端产生按键信号时,控制所述预设遥控端基于所述按键信号生成状态数据并将所述状态数据发送至所述预设服务器;When it is detected that the preset remote terminal generates a key signal, control the preset remote terminal to generate state data based on the key signal and send the state data to the preset server;
基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端;receiving the state data based on the preset server and forwarding the state data to the preset execution end;
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。When the preset execution terminal receives the status data, the preset execution terminal is controlled to adjust the status of the preset signal light according to the status data.
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述检测预设遥控端和预设执行端与预设服务器之间是否均存在网络连接的步骤之后还包括:After the step of detecting whether there is a network connection between the preset remote terminal, the preset execution terminal and the preset server, it also includes:
若所述预设遥控端和/或预设执行端与预设服务器之间不存在网络连接,则对所述预设遥控端和/或预设执行端进行初始化配置。If there is no network connection between the preset remote terminal and/or the preset execution terminal and the preset server, initial configuration is performed on the preset remote control terminal and/or the preset execution terminal.
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述对所述预设遥控端进行初始化配置的步骤包括:The step of initializing the configuration of the preset remote terminal includes:
基于预设开发软件为所述预设遥控端配置无线网络连接参数、预设协议客户端连接参数、开关逻辑函数以及执行函数。Based on the preset development software, configure wireless network connection parameters, preset protocol client connection parameters, switch logic functions and execution functions for the preset remote terminal.
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述对所述预设执行端进行初始化配置的步骤包括:The step of initializing the configuration of the preset execution terminal includes:
基于预设开发软件为所述预设执行端配置无线网络连接参数、预设协议客户端连接参数、订阅逻辑函数以及回调函数。Based on the preset development software, configure wireless network connection parameters, preset protocol client connection parameters, subscription logic functions and callback functions for the preset execution end.
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述对所述预设遥控端和/或预设执行端进行初始化配置的步骤之后包括:After the step of initializing the preset remote control terminal and/or the preset execution terminal includes:
当所述预设遥控端和预设执行端均成功连接至所述无线网络和预设协议客户端时,确定所述预设遥控端和预设执行端与预设服务器之间均存在网络连接。When both the preset remote control terminal and the preset execution terminal are successfully connected to the wireless network and the preset protocol client, it is determined that there is a network connection between the preset remote control terminal, the preset execution terminal and the preset server. .
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述基于所述按键信号生成状态数据的步骤包括:The step of generating state data based on the key signal comprises:
基于所述按键信号生成按键标志位,将所述按键标志位代入所述开关逻辑函数中,以调用所述执行函数生成状态数据。A key flag is generated based on the key signal, and the key flag is substituted into the switch logic function to call the execution function to generate state data.
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端的步骤之后包括:The step of receiving the status data based on the preset server and forwarding the status data to the preset execution end includes:
控制预设执行端通过所述订阅逻辑函数动态获取来自所述预设服务器中预设协议客户端的状态数据。The control preset execution end dynamically obtains the state data from the preset protocol client in the preset server through the subscription logic function.
进一步地,所述隔空开关灯的控制程序被处理器执行时还实现如下操作:Further, when the control program of the air switch light is executed by the processor, the following operations are also realized:
所述基于所述预设服务器接收所述状态数据并将所述状态数据转发至所述预设执行端的步骤之后还包括:After the step of receiving the status data based on the preset server and forwarding the status data to the preset execution end, the step further includes:
当所述预设执行端接收到所述状态数据时,控制所述预设执行端根据所述状态数据对预设信号灯进行状态调整。When the preset execution terminal receives the status data, the preset execution terminal is controlled to adjust the status of the preset signal light according to the status data.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , magnetic disk, optical disk), including several instructions to make a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210249209.6A CN114615249B (en) | 2022-03-10 | 2022-03-10 | Control method and system for air-insulated switching lamp and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210249209.6A CN114615249B (en) | 2022-03-10 | 2022-03-10 | Control method and system for air-insulated switching lamp and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114615249A CN114615249A (en) | 2022-06-10 |
CN114615249B true CN114615249B (en) | 2022-11-22 |
Family
ID=81863261
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210249209.6A Active CN114615249B (en) | 2022-03-10 | 2022-03-10 | Control method and system for air-insulated switching lamp and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114615249B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7032002B1 (en) * | 2000-09-06 | 2006-04-18 | Xanboo, Inc. | Service broker for processing data from a data network |
CN109286679A (en) * | 2018-11-05 | 2019-01-29 | 艾欧创想智能科技(武汉)有限公司 | Wisdom method for controlling street lamps, system, server and storage medium |
CN110335452A (en) * | 2019-06-21 | 2019-10-15 | 深圳市富高康电子有限公司 | Vehicular lamp remote control system and method |
CN112002140A (en) * | 2019-05-27 | 2020-11-27 | 上海博泰悦臻网络技术服务有限公司 | Vehicle searching method, device, medium, vehicle-mounted terminal and mobile terminal for parking lot |
CN112002113A (en) * | 2019-05-26 | 2020-11-27 | 苏州见微智能科技有限公司 | Intelligent remote control system and method based on NB-IoT network |
WO2021169104A1 (en) * | 2020-02-28 | 2021-09-02 | 平安国际智慧城市科技股份有限公司 | Signal data processing method, system, computer device, and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107895468A (en) * | 2017-10-30 | 2018-04-10 | 广东美的制冷设备有限公司 | Remote control matching method, device and computer-readable recording medium |
-
2022
- 2022-03-10 CN CN202210249209.6A patent/CN114615249B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7032002B1 (en) * | 2000-09-06 | 2006-04-18 | Xanboo, Inc. | Service broker for processing data from a data network |
CN109286679A (en) * | 2018-11-05 | 2019-01-29 | 艾欧创想智能科技(武汉)有限公司 | Wisdom method for controlling street lamps, system, server and storage medium |
CN112002113A (en) * | 2019-05-26 | 2020-11-27 | 苏州见微智能科技有限公司 | Intelligent remote control system and method based on NB-IoT network |
CN112002140A (en) * | 2019-05-27 | 2020-11-27 | 上海博泰悦臻网络技术服务有限公司 | Vehicle searching method, device, medium, vehicle-mounted terminal and mobile terminal for parking lot |
CN110335452A (en) * | 2019-06-21 | 2019-10-15 | 深圳市富高康电子有限公司 | Vehicular lamp remote control system and method |
WO2021169104A1 (en) * | 2020-02-28 | 2021-09-02 | 平安国际智慧城市科技股份有限公司 | Signal data processing method, system, computer device, and storage medium |
Non-Patent Citations (2)
Title |
---|
城市LED照明系统远程监控平台设计与开发;彭可等;《计算机测量与控制》;20160925(第09期);第109-112页 * |
基于SOPC的嵌入式Web服务器系统设计与实现;陈川等;《科技导报》;20110818(第23期);第64-67页 * |
Also Published As
Publication number | Publication date |
---|---|
CN114615249A (en) | 2022-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113412469B (en) | Device network configuration method, device, electronic device and storage medium | |
CN110618627B (en) | Household equipment control method and device, electronic equipment and storage medium | |
Wang et al. | Design of smart home system based on WiFi smart plug | |
CN113572799B (en) | Method and device for accessing equipment to control platform and server | |
CN105471686B (en) | Terminal control method, device and system | |
CN105700365B (en) | The generation method and device at the home wiring control interface of mobile terminal | |
CN110687820B (en) | Control method and device of intelligent household equipment, terminal equipment and storage medium | |
US10797944B2 (en) | Zigbee light link network commissioning | |
WO2020168568A1 (en) | Data processing method and apparatus, electronic device and readable storage medium | |
CN110324217B (en) | Equipment triggering control method and device, electronic equipment and storage medium | |
CN109219028B (en) | Equivalent device Bluetooth communication method and device based on cloud | |
CN114615249B (en) | Control method and system for air-insulated switching lamp and computer readable storage medium | |
CN109709880B (en) | Control method and control system of projector | |
CN106998501B (en) | Television control method and device | |
CN110808980A (en) | Network distribution method and system of intelligent lamp, intelligent lamp and storage medium | |
CN108966200B (en) | Bluetooth communication method and device for inquiring equivalent equipment based on Bluetooth connection | |
CN109151786B (en) | Bluetooth communication method and device based on gateway scheduling connection | |
CN116708062B (en) | Device management method and electronic device | |
CN102929216A (en) | Method for wirelessly controlling electronic device with quick response code and product thereof | |
CN111199637A (en) | Infrared code updating method, terminal device and computer readable storage medium | |
WO2023202678A1 (en) | Device control method and apparatus, electronic device, and storage medium | |
CN105246127A (en) | A method and device for adding an intelligent device | |
CN110708744A (en) | Communication control method, home appliance device, and computer-readable storage medium | |
CN109089249B (en) | Bluetooth communication method and device based on gateway inquiry buffer node | |
WO2016192443A1 (en) | Method and system for setting intelligent terminal working scenario |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |