CN105187476B - A kind of apparatus control method and system based on wechat public platform - Google Patents
- ️Fri Sep 07 2018
CN105187476B - A kind of apparatus control method and system based on wechat public platform - Google Patents
A kind of apparatus control method and system based on wechat public platform Download PDFInfo
-
Publication number
- CN105187476B CN105187476B CN201510317603.9A CN201510317603A CN105187476B CN 105187476 B CN105187476 B CN 105187476B CN 201510317603 A CN201510317603 A CN 201510317603A CN 105187476 B CN105187476 B CN 105187476B Authority
- CN
- China Prior art keywords
- cloud server
- user
- public platform
- information Prior art date
- 2015-06-10 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 230000009471 action Effects 0.000 claims description 5
- 230000008569 process Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000004378 air conditioning Methods 0.000 description 2
- 238000001816 cooling Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000004888 barrier function Effects 0.000 description 1
- 230000006854 communication Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005057 refrigeration Methods 0.000 description 1
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/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/52—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services
-
- 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/10—Protocols in which an application is distributed across nodes in the network
-
- 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
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种基于微信公众平台的设备控制方法及系统,该设备控制方法包括:当微信客户端接收到用户输入的推送请求时,将推送请求通过微信公众平台发送至云端服务器;云端服务器通过微信公众平台向该用户的微信客户端推送相应被控设备的图形化脚本指令集;微信客户端显示所接收的图形化脚本指令集,并接收用户对所选择的图形化脚本指令进行编辑的编辑信息,且经微信公众平台提交至云端服务器;云端服务器将编辑信息转换为相应的脚本程序,并发送至相应的本地控制器;相应本地控制器对所接收的脚本程序进行解析,并驱动相应的被控设备。实施本发明的技术方案,使得用户能够对本地设备进行个性化的功能控制,赋予了设备应用更大的想象空间。
The invention discloses a device control method and system based on a WeChat public platform. The device control method includes: when a WeChat client receives a push request input by a user, the push request is sent to a cloud server through the WeChat public platform; the cloud server Push the graphical script instruction set of the corresponding controlled device to the user’s WeChat client through the WeChat public platform; the WeChat client displays the received graphical script instruction set, and receives the user’s edit of the selected graphical script instruction The edited information is submitted to the cloud server through the WeChat public platform; the cloud server converts the edited information into a corresponding script program and sends it to the corresponding local controller; the corresponding local controller analyzes the received script program and drives the corresponding the controlled device. The implementation of the technical solution of the present invention enables the user to perform personalized function control on the local equipment, and gives greater imagination space for the application of the equipment.
Description
技术领域technical field
本发明涉及移动互联网领域,尤其涉及一种基于微信公众平台的设备控制方法及系统。The present invention relates to the field of mobile Internet, in particular to a device control method and system based on the WeChat public platform.
背景技术Background technique
随着物联网技术的发展,人与设备间开放、多元、复杂的跨界交互需求对传统的自控技术提出了新的挑战。而各行各业对于智能家居、智慧社区等未来生活的设想方案也是层出不穷,这些都体现了人们对于更加开放,更具个性化生活的诉求。反观现实的生活,移动互联网的触角已伸至我们日常生活的方方面面,其中微信当属其中最具代表的移动应用之一。利用移动应用对线下设备进行操控成为了满足上述需求的一个突破口。With the development of Internet of Things technology, open, diverse, and complex cross-border interaction requirements between people and equipment pose new challenges to traditional self-control technologies. And all walks of life have endless plans for future life such as smart homes and smart communities, all of which reflect people's demands for a more open and personalized life. In contrast to real life, the tentacles of the mobile Internet have extended to all aspects of our daily life, among which WeChat is undoubtedly one of the most representative mobile applications. Using mobile applications to control offline devices has become a breakthrough to meet the above needs.
目前,有很多这种基于物联网的人与底层设备对接的尝试,但都只是单纯地进行远程数据监测或者限于单一的常规控制,而缺乏对于设备更加灵活的个性化操作。At present, there are many attempts to connect people and underlying devices based on the Internet of Things, but all of them are simply for remote data monitoring or limited to a single routine control, and lack more flexible and personalized operations for devices.
发明内容Contents of the invention
本发明要解决的技术问题在于,针对现有技术的上述对底层设备的控制缺乏个性化操作的缺陷,提供一种基于微信公众平台的设备控制方法及系统。The technical problem to be solved by the present invention is to provide a device control method and system based on the WeChat public platform, aiming at the above-mentioned defect of lack of individualized operation in the control of the underlying device in the prior art.
本发明解决其技术问题所采用的技术方案是:构造一种基于微信公众平台的设备控制方法,包括:The technical solution adopted by the present invention to solve the technical problem is to construct a device control method based on the WeChat public platform, including:
S1.当接收到用户输入的对用户标识与本地控制器标识进行绑定的绑定信息时,将所述绑定信息通过微信公众平台发送至云端服务器,而且,在被控设备与本地控制器连接后,本地控制器将被控设备的设备标识信息上报给云端服务器;S1. When receiving the binding information input by the user to bind the user ID and the local controller ID, send the binding information to the cloud server through the WeChat public platform, and, between the controlled device and the local controller After connection, the local controller reports the device identification information of the controlled device to the cloud server;
S2.当微信客户端接收到用户输入的推送请求时,将所述推送请求通过微信公众平台发送至云端服务器;S2. When the WeChat client receives the push request input by the user, the push request is sent to the cloud server through the WeChat public platform;
S3.云端服务器通过微信公众平台向该用户的微信客户端推送相应被控设备的图形化脚本指令集;S3. The cloud server pushes the graphical script instruction set of the corresponding controlled device to the user's WeChat client through the WeChat public platform;
S4.微信客户端显示所接收的图形化脚本指令集,并接收用户对所选择的图形化脚本指令进行编辑的编辑信息,且将所述编辑信息经微信公众平台提交至云端服务器;S4. The WeChat client terminal displays the received graphical script instruction set, and receives editing information for the user to edit the selected graphical script instruction, and submits the editing information to the cloud server through the WeChat public platform;
S5.云端服务器将所接收的编辑信息转换为相应的脚本程序,并发送至相应的本地控制器;S5. The cloud server converts the received editing information into a corresponding script program, and sends it to a corresponding local controller;
S6.相应本地控制器对所接收的脚本程序进行解析,并驱动相应的被控设备。S6. The corresponding local controller parses the received script program and drives the corresponding controlled device.
在本发明所述的基于微信公众平台的设备控制方法中,所述步骤S4包括:In the device control method based on the WeChat public platform of the present invention, the step S4 includes:
S41.云端服务器将所接收的编辑信息转换为相应的脚本程序;S41. The cloud server converts the received editing information into a corresponding script program;
S42.云端服务器对所述脚本程序进行预编译,并判断是否合法,若是,则执行步骤S43;若否,则执行步骤S44;S42. The cloud server precompiles the script program, and judges whether it is legal, and if so, executes step S43; if not, executes step S44;
S43.将预编译后的脚本程序发送至相应本地控制器;S43. Send the precompiled script program to the corresponding local controller;
S44.将预编译失败信息发送至相应用户的微信客户端。S44. Send the precompilation failure information to the WeChat client of the corresponding user.
在本发明所述的基于微信公众平台的设备控制方法中,在所述步骤S1之后,还包括:In the device control method based on the WeChat public platform of the present invention, after the step S1, it also includes:
S7.本地控制器对所接入的被控设备的运行状态进行实时监控,并向云端服务器发送被控设备的运行状态信息;S7. The local controller monitors the running state of the connected controlled device in real time, and sends the running state information of the controlled device to the cloud server;
S8.云端服务器向相应用户的微信客户端推送所述运行状态信息;S8. The cloud server pushes the running status information to the WeChat client of the corresponding user;
S9.微信客户端显示所接收的运行状态信息。S9. The WeChat client terminal displays the received running status information.
在本发明所述的基于微信公众平台的设备控制方法中,在所述步骤S4中,微信客户端接收用户通过拖拽的方式对所选择的图形化脚本指令进行编辑的编辑信息。In the device control method based on the Wechat public platform of the present invention, in the step S4, the Wechat client receives editing information that the user edits the selected graphical script instruction by dragging and dropping.
在本发明所述的基于微信公众平台的设备控制方法中,所述图形化脚本指令的类型包括变量类、运算类、逻辑控制类、动作执行类。In the device control method based on the WeChat public platform of the present invention, the types of the graphical script instructions include variables, operations, logic control, and action execution.
本发明还构造一种基于微信公众平台的设备控制系统,包括:The present invention also constructs a device control system based on the WeChat public platform, including:
至少一个被控设备;at least one charged device;
与所述至少一个被控设备连接的本地控制器;a local controller connected to the at least one controlled device;
云端服务器;cloud server;
微信客户端;其中,WeChat client; among them,
所述微信客户端,用于当接收到用户输入的对用户标识与本地控制器标识进行绑定的绑定信息时,将所述绑定信息通过微信公众平台发送至云端服务器;当接收到用户输入的推送请求时,将所述推送请求通过微信公众平台发送至云端服务器;及显示从云端服务器所接收的图形化脚本指令集,并接收用户对所选择的图形化脚本指令进行编辑的编辑信息,且将所述编辑信息经微信公众平台提交至云端服务器;The WeChat client is configured to send the binding information to the cloud server through the WeChat public platform when receiving the binding information input by the user to bind the user identifier and the local controller identifier; When an input push request is sent, the push request is sent to the cloud server through the WeChat public platform; and the graphical script instruction set received from the cloud server is displayed, and the editing information for editing the selected graphical script instruction is received by the user , and submit the edited information to the cloud server via the WeChat public platform;
云端服务器,用于在接收到所述推送请求时,通过微信公众平台向相应用户的微信客户端推送相应被控设备的图形化脚本指令集;及将所接收的编辑信息转换为相应的脚本程序,并发送至相应本地控制器;The cloud server is used to push the graphical script instruction set of the corresponding controlled device to the WeChat client of the corresponding user through the WeChat public platform when receiving the push request; and convert the received editing information into a corresponding script program , and sent to the corresponding local controller;
本地控制器,用于在被控设备与本地控制器连接后,将被控设备的标识信息上报给云端服务器;及对所接收的脚本程序进行解析,并驱动相应的被控设备。The local controller is used to report the identification information of the controlled device to the cloud server after the controlled device is connected to the local controller; analyze the received script program, and drive the corresponding controlled device.
在本发明所述的基于微信公众平台的设备控制系统中,所述云端服务器,还用于对所述脚本程序进行预编译,及判断是否合法,并在不合法时将预编译失败信息发送至相应用户的微信客户端。In the device control system based on the WeChat public platform of the present invention, the cloud server is also used to precompile the script program, and judge whether it is legal, and send the precompilation failure information to The corresponding user's WeChat client.
在本发明所述的基于微信公众平台的设备控制系统中,所述本地控制器,还用于对所接入的被控设备的运行状态进行实时监控,并向云端服务器发送被控设备的运行状态信息;In the device control system based on the WeChat public platform of the present invention, the local controller is also used to monitor the running status of the connected controlled device in real time, and send the running status of the controlled device to the cloud server. status information;
所述云端服务器,还用于向相应用户的微信客户端推送所述运行状态信息;The cloud server is also used to push the running status information to the WeChat client of the corresponding user;
所述微信客户端,还用于显示所接收的运行状态信息。The WeChat client is also used to display the received running status information.
在本发明所述的基于微信公众平台的设备控制系统中,所述微信客户端,用于接收用户通过拖拽的方式对所选择的图形化脚本指令进行编辑的编辑信息。In the device control system based on the Wechat public platform of the present invention, the Wechat client is used to receive editing information for users to edit the selected graphical script instructions by dragging and dropping.
在本发明所述的基于微信公众平台的设备控制系统中,所述图形化脚本指令的类型包括变量类、运算类、逻辑控制类、动作执行类。In the device control system based on the WeChat public platform according to the present invention, the types of the graphical script instructions include variable types, operation types, logic control types, and action execution types.
实施本发明的技术方案,利用微信所建立的社交公众平台,为用户提供远程脚本定制功能,使得用户能够对本地设备进行个性化的功能控制,赋予了设备应用更大的想象空间。Implementing the technical solution of the present invention, the social public platform established by WeChat is used to provide users with a remote script customization function, so that users can perform personalized function control on local devices, and endow devices with greater imagination space.
另外,用户可采用拖拽方式对图形化脚本指令进行编辑,使得用户能够低技术门槛的进行控制操作。In addition, users can edit graphical script instructions by dragging and dropping, so that users can perform control operations with low technical barriers.
附图说明Description of drawings
下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with accompanying drawing and embodiment, in the accompanying drawing:
图1是本发明基于微信公众平台的设备控制方法实施例一的流程图;Fig. 1 is a flowchart of Embodiment 1 of the device control method based on the WeChat public platform of the present invention;
图2是本发明对图形化脚本指令进行编辑实施例一的示意图;Fig. 2 is a schematic diagram of Embodiment 1 of editing graphical script instructions in the present invention;
图3是图1中步骤S4优选实施例的流程图;Fig. 3 is the flowchart of the preferred embodiment of step S4 in Fig. 1;
图4是本发明基于微信公众平台的设备控制系统实施例一的逻辑图。Fig. 4 is a logic diagram of Embodiment 1 of the device control system based on the WeChat public platform of the present invention.
具体实施方式Detailed ways
图1是本发明基于微信公众平台的设备控制方法实施例一的流程图,该实施例的设备控制方法包括以下步骤:Fig. 1 is the flow chart of Embodiment 1 of the device control method based on WeChat public platform of the present invention, the device control method of this embodiment includes the following steps:
S1.当接收到用户输入的对用户标识与本地控制器标识进行绑定的绑定信息时,将所述绑定信息通过微信公众平台发送至云端服务器,而且,在被控设备与本地控制器连接后,本地控制器将被控设备的设备标识信息上报给云端服务器。在该步骤中,需说明的是,在进行关联前,用户应首先关注微信公众号,进入相应流程进行账户注册,输入用户标识,例如微信号或者手机号。在将用户标识与本地控制器标识进行关联时,再输入本地控制器的ID号,例如扫描设置在本地控制器上的二维码,且通过微信公众平台提交绑定信息至云端服务器,云端服务器的数据库表便将相应的本地控制器标识与用户标识进行记录,从而实现绑定。当然,在另一些实施例中,在云端服务器记录后,将所收集的绑定信息再下发到本地控制器,本地控制器通过界面进行推送,用户在本地控制器上进行确认,此时才完成绑定操作;S1. When receiving the binding information input by the user to bind the user ID and the local controller ID, send the binding information to the cloud server through the WeChat public platform, and, between the controlled device and the local controller After connection, the local controller reports the device identification information of the controlled device to the cloud server. In this step, it needs to be explained that before the association, the user should first follow the WeChat official account, enter the corresponding process to register the account, and enter the user identification, such as WeChat ID or mobile phone number. When associating the user ID with the local controller ID, enter the ID number of the local controller, for example, scan the QR code set on the local controller, and submit the binding information to the cloud server through the WeChat public platform, and the cloud server The corresponding local controller ID and user ID are recorded in the database table, thereby realizing the binding. Of course, in some other embodiments, after the cloud server records, the collected binding information is sent to the local controller, and the local controller pushes through the interface, and the user confirms on the local controller. Complete the binding operation;
S2.当微信客户端接收到用户输入的推送请求时,将所述推送请求通过微信公众平台发送至云端服务器。在该步骤中,需说明的是,用户触发推送请求可通过点击公众平台上对应的控件来实现;S2. When the WeChat client receives the push request input by the user, it sends the push request to the cloud server through the WeChat public platform. In this step, it should be noted that the user can trigger the push request by clicking the corresponding control on the public platform;
S3.云端服务器通过微信公众平台向该用户的微信客户端推送相应被控设备的图形化脚本指令集;S3. The cloud server pushes the graphical script instruction set of the corresponding controlled device to the user's WeChat client through the WeChat public platform;
S4.微信客户端显示所接收的图形化脚本指令集,并接收用户对所选择的图形化脚本指令进行编辑的编辑信息,且将所述编辑信息经微信公众平台提交至云端服务器。在一个实施例中,用户在根据实际需求从所显示的图形化脚本指令集中选择出特定的图形化脚本指令并对其进行编辑时,可通过拖拽的方式进行;S4. The WeChat client terminal displays the received graphical script instruction set, receives editing information of the user editing the selected graphical script instruction, and submits the editing information to the cloud server through the WeChat public platform. In one embodiment, when the user selects a specific graphical script instruction from the displayed graphical script instruction set according to actual needs and edits it, it can be done by dragging and dropping;
S5.云端服务器将所接收的编辑信息转换为相应的脚本程序,并发送至相应的本地控制器;S5. The cloud server converts the received editing information into a corresponding script program, and sends it to a corresponding local controller;
S6.相应本地控制器对所接收的脚本程序进行解析,并驱动相应的被控设备。S6. The corresponding local controller parses the received script program and drives the corresponding controlled device.
在上述实施例的基础上,优选地,步骤S1之后,还可包括:On the basis of the above embodiments, preferably, after step S1, it may further include:
S7.本地控制器对所接入的被控设备的运行状态进行实时监控,并向云端服务器发送被控设备的运行状态信息;S7. The local controller monitors the running state of the connected controlled device in real time, and sends the running state information of the controlled device to the cloud server;
S8.云端服务器向相应用户的微信客户端推送所述运行状态信息;S8. The cloud server pushes the running status information to the WeChat client of the corresponding user;
S9.微信客户端显示所接收的运行状态信息。S9. The WeChat client terminal displays the received running status information.
在上述实施例中,图形化脚本指令的类型可包括以下几类:In the above embodiment, the types of graphical script instructions may include the following categories:
变量类:用户可自定义嵌入被控设备的运行状态信息的侦测变量或外部触发变量,被控设备的运行状态信息的侦测变量例如为温度传感器状态值变量,外部触发变量例如为开启空调,这些可作为程序执行的判断以及逻辑控制对象等;Variable category: users can customize the detection variable or external trigger variable embedded in the operation status information of the controlled equipment. The detection variable of the operation status information of the controlled equipment is, for example, the state value variable of the temperature sensor, and the external trigger variable is, for example, turning on the air conditioner , these can be used as judgments for program execution and logic control objects, etc.;
逻辑控制类:该类别中提供程序基本的结构,例如顺序结构、选择结构、循环结构等,实现对系统所提供的状态变量或执行过程的逻辑控制;Logic control class: This class provides the basic structure of the program, such as sequence structure, selection structure, loop structure, etc., to realize the logic control of the state variables or execution process provided by the system;
运算类:以系统所提供的变量为操作数,实现基本的数字运算或者逻辑运算,例如逻辑或运算、逻辑与运算等;Operation class: use the variables provided by the system as operands to realize basic digital operations or logical operations, such as logical or operations, logical and operations, etc.;
动作执行类:结合不同的被控设备所提供的运行状态信息以及执行功能,实现程序对于被控设备的特定操作,例如,关闭窗户执行指令,打开空调制冷执行指令。Action Execution Class: Combining the operating status information and execution functions provided by different controlled devices, realize the specific operations of the program on the controlled devices, for example, execute commands to close windows, and execute commands to turn on air conditioning and refrigeration.
在一个实施例中,用户对所选择的图形化脚本指令进行如图2所示的编辑,其中,201为while型循环;202为“如果...否则...”型选择结构;203为温度传感器状态值变量;204为手动开启空调触发变量;205为逻辑或运算指令;206为关闭窗户执行指令;207为打开空调制冷执行指令;208为顺序结构;209为保持当前状态执行指令。当用户完成编辑后,在程序运行时,若点击了开始按钮,并且如果温度大于30℃或手动开启空调,就关闭窗户并打开空调制冷,否则保持当前状态。In one embodiment, the user edits the selected graphical script instruction as shown in Figure 2, wherein, 201 is a while-type loop; 202 is an "if...otherwise..." type selection structure; 203 is 204 is a trigger variable for manually opening the air conditioner; 205 is a logic or operation instruction; 206 is an execution instruction for closing windows; 207 is an execution instruction for opening air conditioning and cooling; 208 is a sequential structure; 209 is an execution instruction for maintaining the current state. After the user finishes editing, when the program is running, if the start button is clicked, and if the temperature is greater than 30°C or the air conditioner is manually turned on, close the window and turn on the air conditioner for cooling, otherwise keep the current state.
图3是图1中步骤S4优选实施例的流程图,在该实施例中,步骤S4具体包括:Fig. 3 is a flowchart of a preferred embodiment of step S4 in Fig. 1, in this embodiment, step S4 specifically includes:
S41.云端服务器将所接收的编辑信息转换为相应的脚本程序;S41. The cloud server converts the received editing information into a corresponding script program;
S42.云端服务器对所述脚本程序进行预编译,并判断是否合法,若是,则执行步骤S43;若否,例如假如用户设置了温度大于50℃时开启空调,此时认为不合法,则执行步骤S44;S42. The cloud server precompiles the script program and judges whether it is legal. If yes, execute step S43; S44;
S43.将预编译后的脚本程序发送至相应本地控制器,然后可执行步骤S5;S43. Send the precompiled script program to the corresponding local controller, and then execute step S5;
S44.将预编译失败信息发送至相应用户的微信客户端。S44. Send the precompilation failure information to the WeChat client of the corresponding user.
另外,还需说明的是,在用户请求推送图形化脚本指令集前,还需要对被控设备的接入进行初始化。In addition, it should be noted that before the user requests to push the graphical script instruction set, the access of the controlled device needs to be initialized.
在一个实施例中,初始化的过程为:在被控设备与本地控制器连接后,可向本地控制器下载相应被控设备的固件包,该固件包用于指导本地控制器与被控设备的通信过程以及用户所能施加的功能控制,与此同时,本地控制器将所接入的被控设备的标识信息上传至云端服务器,并激活云端服务器中相应的控制模块,至此完成被控设备接入的初始化。In one embodiment, the initialization process is: after the controlled device is connected to the local controller, the firmware package of the corresponding controlled device can be downloaded to the local controller, and the firmware package is used to guide the connection between the local controller and the controlled device. The communication process and the function control that can be imposed by the user. At the same time, the local controller uploads the identification information of the connected controlled device to the cloud server, and activates the corresponding control module in the cloud server. So far, the controlled device is connected. input initialization.
在另一个实施例中,初始化的过程为:在被控设备与本地控制器连接后,用户可通过微信客户端选择添加相应的被控设备,云端服务器将被控设备的添加信息发送至本地控制器,本地控制器搜索所接入的被控设备,确认后向云端服务器请求下载相应被控设备的固件包,至此完成被控设备接入的初始化。In another embodiment, the initialization process is: after the controlled device is connected to the local controller, the user can choose to add the corresponding controlled device through the WeChat client, and the cloud server will send the added information of the controlled device to the local controller The local controller searches for the connected controlled device, and after confirmation, requests the cloud server to download the firmware package of the corresponding controlled device, thus completing the initialization of the controlled device access.
图4是本发明基于微信公众平台的设备控制系统实施例一的逻辑图,该设备控制系统包括:微信客户端10、云端服务器20、本地控制器30和被控设备40、40′,被控设备例如为智能空调、智能窗帘等,当然在其它实施例中被控设备可为其它智能设备,例如智能家居设备,且数量可为任意个。而且,在该实施例中:4 is a logic diagram of Embodiment 1 of the device control system based on the WeChat public platform of the present invention. The device control system includes: a WeChat client 10, a cloud server 20, a local controller 30, and controlled devices 40, 40'. The devices are, for example, smart air conditioners, smart curtains, etc. Of course, in other embodiments, the controlled devices can be other smart devices, such as smart home devices, and the number can be arbitrary. Also, in this example:
微信客户端10,用于当接收到用户输入的对用户标识与本地控制器标识进行绑定的绑定信息时,将该绑定信息通过微信公众平台发送至云端服务器20;当接收到用户输入的推送请求时,将该推送请求通过微信公众平台发送至云端服务器20;及显示从云端服务器20所接收的图形化脚本指令集,并接收用户对所选择的图形化脚本指令进行编辑的编辑信息,例如,用户通过拖拽的方式对所选择的图形化脚本指令进行编辑,然后将该编辑信息经微信公众平台提交至云端服务器20;WeChat client 10 is used to send the binding information to the cloud server 20 through the WeChat public platform when receiving the binding information input by the user to bind the user identification and the local controller identification; when receiving the user input When the push request is sent, the push request is sent to the cloud server 20 through the WeChat public platform; and the graphical script instruction set received from the cloud server 20 is displayed, and the editing information for editing the selected graphical script instruction is received by the user , for example, the user edits the selected graphical script instruction by dragging and dropping, and then submits the editing information to the cloud server 20 via the WeChat public platform;
云端服务器20,用于在接收到推送请求时,通过微信公众平台向相应用户的微信客户端10推送相应被控设备的图形化脚本指令集;及将所接收的编辑信息转换为相应的脚本程序,并发送至相应本地控制器;The cloud server 20 is used to push the graphical script instruction set of the corresponding controlled device to the WeChat client 10 of the corresponding user through the WeChat public platform when receiving the push request; and convert the received editing information into a corresponding script program , and sent to the corresponding local controller;
本地控制器30,用于在被控设备40、40′与本地控制器30连接后,将被控设备40、40′的标识信息上报给云端服务器20;及对所接收的脚本程序进行解析,并驱动相应的被控设备40、40′。The local controller 30 is configured to report the identification information of the controlled device 40, 40' to the cloud server 20 after the controlled device 40, 40' is connected to the local controller 30; and analyze the received script program, And drive the corresponding controlled devices 40, 40'.
在一个优选实施例中,云端服务器20还用于对脚本程序进行预编译,及判断是否合法,并在不合法时将预编译失败信息发送至相应用户的微信客户端10。In a preferred embodiment, the cloud server 20 is also used to precompile the script program, and judge whether it is legal, and send the precompilation failure information to the WeChat client 10 of the corresponding user if it is not legal.
在另一个优选实施例中,本地控制器30,还用于对所接入的被控设备40、40′的运行状态进行实时监控,并向云端服务器20发送被控设备40、40′的运行状态信息。云端服务器20还用于向相应用户的微信客户端10推送该运行状态信息;微信客户端10还用于显示所接收的运行状态信息。In another preferred embodiment, the local controller 30 is also used to monitor the running status of the connected controlled devices 40, 40' in real time, and send the running state of the controlled devices 40, 40' to the cloud server 20. status information. The cloud server 20 is also used to push the running status information to the WeChat client 10 of the corresponding user; the WeChat client 10 is also used to display the received running status information.
关于本地控制器30,优选地,为了降低本地控制器30的功耗,该本地控制器30在软件架构上可采用了事件触发机制,将云端服务器下发的各类控制信息以及被控设备输入的运行状态信息通过事件触发的形式进入事件处理队列,由主循环进行统一管理。同时,可采用软件定时中断,对事件处理队列实施定时触发扫描,使本地控制器在空闲时间处于休眠状态,从而达到低功耗运行的目的。Regarding the local controller 30, preferably, in order to reduce the power consumption of the local controller 30, the local controller 30 can adopt an event trigger mechanism in the software architecture to input various control information issued by the cloud server and the controlled device. The running status information of the system enters the event processing queue in the form of event triggering, and is managed uniformly by the main loop. At the same time, software timing interrupts can be used to implement timing trigger scanning on the event processing queue, so that the local controller is in a dormant state during idle time, so as to achieve the purpose of low power consumption operation.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的权利要求范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of the claims of the present invention.
Claims (6)
1. A device control method based on WeChat public platform is characterized by comprising the following steps:
s1, when binding information which is input by a user and used for binding a user identifier and a local controller identifier is received, the binding information is sent to a cloud server through a WeChat public platform, and after a controlled device is connected with the local controller, the local controller reports device identifier information of the controlled device to the cloud server;
s2, when the WeChat client receives a pushing request input by a user, the pushing request is sent to a cloud server through a WeChat public platform;
s3, the cloud server pushes a graphical script instruction set of corresponding controlled equipment to a WeChat client of the user through a WeChat public platform, and the type of the graphical script instruction comprises the following steps: variable class, logic control class, operation class and action execution class;
s4, displaying the received graphical script instruction set by the WeChat client, receiving edit information edited by a user on the selected graphical script instruction, and submitting the edit information to a cloud server through a WeChat public platform;
s5, the cloud server converts the received editing information into a corresponding script program and sends the corresponding script program to a corresponding local controller;
s6, analyzing the received script program by the corresponding local controller, and driving the corresponding controlled equipment;
wherein the step S4 includes:
s41, the cloud server converts the received editing information into a corresponding script program;
s42, the cloud server performs pre-compiling on the script program, judges whether the script program is legal or not, and executes the step S43 if the script program is legal; if not, go to step S44;
s43, sending the pre-compiled script program to a corresponding local controller;
and S44, sending the precompilation failure information to the WeChat client of the corresponding user.
2. The WeChat public platform-based device control method according to claim 1, further comprising, after the step S1:
s7, the local controller monitors the running state of the accessed controlled equipment in real time and sends the running state information of the controlled equipment to the cloud server;
s8, the cloud server pushes the running state information to a WeChat client of a corresponding user;
and S9, displaying the received running state information by the WeChat client.
3. The WeChat public platform-based device control method according to claim 1, wherein in the step S4,
and the WeChat client receives editing information edited by the user on the selected graphical script instruction in a dragging mode.
4. An equipment control system based on a WeChat public platform, comprising:
at least one controlled device;
a local controller connected to the at least one controlled device;
a cloud server;
a WeChat client; wherein,
the WeChat client is used for sending binding information input by a user to a cloud server through a WeChat public platform when the binding information is received, wherein the binding information is used for binding a user identifier and a local controller identifier; when a pushing request input by a user is received, the pushing request is sent to a cloud server through a WeChat public platform; and displaying a graphical script instruction set received from the cloud server, receiving edit information edited by a user on the selected graphical script instruction, and submitting the edit information to the cloud server through a WeChat public platform, wherein the type of the graphical script instruction comprises: variable class, logic control class, operation class and action execution class;
the cloud server is used for pushing a graphical script instruction set of corresponding controlled equipment to a WeChat client of a corresponding user through a WeChat public platform when the pushing request is received; converting the received editing information into a corresponding script program and sending the script program to a corresponding local controller; the system is also used for pre-compiling the script program, judging whether the script program is legal or not and sending pre-compiling failure information to the WeChat client of the corresponding user when the script program is illegal;
the local controller is used for reporting the identification information of the controlled equipment to the cloud server after the controlled equipment is connected with the local controller; and analyzing the received script program and driving the corresponding controlled equipment.
5. The WeChat public platform-based device control system according to claim 4, wherein the local controller is further configured to monitor an operation state of the accessed controlled device in real time, and send operation state information of the controlled device to the cloud server;
the cloud server is further used for pushing the running state information to the WeChat client of the corresponding user;
the WeChat client is also used for displaying the received running state information.
6. The WeChat public platform-based equipment control system according to claim 4, wherein the WeChat client is configured to receive edit information for a user to edit the selected graphical script instruction by dragging.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510317603.9A CN105187476B (en) | 2015-06-10 | 2015-06-10 | A kind of apparatus control method and system based on wechat public platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510317603.9A CN105187476B (en) | 2015-06-10 | 2015-06-10 | A kind of apparatus control method and system based on wechat public platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105187476A CN105187476A (en) | 2015-12-23 |
CN105187476B true CN105187476B (en) | 2018-09-07 |
Family
ID=54909318
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510317603.9A Expired - Fee Related CN105187476B (en) | 2015-06-10 | 2015-06-10 | A kind of apparatus control method and system based on wechat public platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105187476B (en) |
Families Citing this family (9)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105512851A (en) * | 2016-01-13 | 2016-04-20 | 东北林业大学 | Intelligent mobile warehouse management system |
CN105763418A (en) * | 2016-01-29 | 2016-07-13 | 四川长虹电器股份有限公司 | Method for sharing household appliance control based on WeChat relationship |
US10318247B2 (en) * | 2016-03-18 | 2019-06-11 | Ford Global Technologies, Llc | Scripting on a telematics control unit |
CN106027309B (en) * | 2016-06-14 | 2019-05-07 | 青岛海信传媒网络技术有限公司 | The acquisition methods and device of device status information |
CN106249674A (en) * | 2016-07-26 | 2016-12-21 | 佛山市顺德区震德塑料机械有限公司 | A kind of injection machine based on wechat public platform monitoring method |
CN106789601A (en) * | 2017-02-08 | 2017-05-31 | 奥秘智能科技(洛阳)有限公司 | Universal data collection and supervisor control and method based on wechat public platform |
CN107547362B (en) * | 2017-09-11 | 2020-07-14 | 广州大学 | Laboratory equipment management control method and system based on WeChat public platform |
CN107645497B (en) * | 2017-09-11 | 2021-02-09 | 东南大学 | Internet of things equipment control and authority sharing system and method based on public number |
CN108170512A (en) * | 2017-12-27 | 2018-06-15 | 德阳源创能源科技有限公司 | Script drives analysis method and device |
Citations (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102263776A (en) * | 2010-05-26 | 2011-11-30 | 魏星 | Intelligent household remote control system and intelligent household server |
CN103533059A (en) * | 2013-10-17 | 2014-01-22 | 中国地质大学(武汉) | Remote control method for security of Internet of things based on WeChat |
CN104270294A (en) * | 2014-10-28 | 2015-01-07 | 上海斐讯数据通信技术有限公司 | Household appliance control system and method on basis of public cloud |
CN104270468A (en) * | 2014-10-23 | 2015-01-07 | 深圳市领耀东方科技股份有限公司 | System for controlling device for internet of things through Wechat |
CN104660695A (en) * | 2015-02-09 | 2015-05-27 | 陈正涛 | Intelligent control system and intelligent control method based on wechat public platform |
-
2015
- 2015-06-10 CN CN201510317603.9A patent/CN105187476B/en not_active Expired - Fee Related
Patent Citations (5)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102263776A (en) * | 2010-05-26 | 2011-11-30 | 魏星 | Intelligent household remote control system and intelligent household server |
CN103533059A (en) * | 2013-10-17 | 2014-01-22 | 中国地质大学(武汉) | Remote control method for security of Internet of things based on WeChat |
CN104270468A (en) * | 2014-10-23 | 2015-01-07 | 深圳市领耀东方科技股份有限公司 | System for controlling device for internet of things through Wechat |
CN104270294A (en) * | 2014-10-28 | 2015-01-07 | 上海斐讯数据通信技术有限公司 | Household appliance control system and method on basis of public cloud |
CN104660695A (en) * | 2015-02-09 | 2015-05-27 | 陈正涛 | Intelligent control system and intelligent control method based on wechat public platform |
Also Published As
Publication number | Publication date |
---|---|
CN105187476A (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105187476B (en) | 2018-09-07 | A kind of apparatus control method and system based on wechat public platform |
CN107168085B (en) | 2021-09-24 | Intelligent household equipment remote control method, device, medium and computing equipment |
US11246171B2 (en) | 2022-02-08 | Method, system and device for connecting devices |
US9467518B2 (en) | 2016-10-11 | System, a method and a computer program product for automated remote control |
CN106649024A (en) | 2017-05-10 | Method and device for real-time monitoring of application performance |
CN111104341A (en) | 2020-05-05 | Automatic testing method, device, equipment and storage medium for intelligent household equipment |
KR102383791B1 (en) | 2022-04-08 | Providing personal assistant service in an electronic device |
CN105389076A (en) | 2016-03-09 | METHOD OF PROVIDING NOTIFICATION BY ELECTRONIC DEVICE and ELECTRONIC DEVICE |
US11711431B2 (en) | 2023-07-25 | Internet of things configurable event and action sequencing framework |
US20160132866A1 (en) | 2016-05-12 | Device, system, and method for creating virtual credit card |
CN108463832A (en) | 2018-08-28 | Electronic equipment and process execution method based on hardware diagnostic result |
US20250085676A1 (en) | 2025-03-13 | Device control method, apparatus and system, and electronic device and storage medium |
CN108431765A (en) | 2018-08-21 | The generation of equipment application |
CN108702480A (en) | 2018-10-23 | Electronic equipment and method for driving its display |
CN105630326A (en) | 2016-06-01 | Electronic device and method of controlling object in electronic device |
CN101098273A (en) | 2008-01-02 | A wireless remote LED display control system |
CN104750498A (en) | 2015-07-01 | Method for controlling mouse module and electronic device |
CN105677697A (en) | 2016-06-15 | Method for providing point of interest and electronic device thereof |
CN104809057A (en) | 2015-07-29 | Application test system, application test method and storage medium |
CN109426578A (en) | 2019-03-05 | The method and apparatus for handling client failure |
CN108604362A (en) | 2018-09-28 | Electronic device and method for controlling display, and server and method therefor |
US20190238515A1 (en) | 2019-08-01 | System and methods for anonymous identification and interaction between electronic devices |
KR20170087799A (en) | 2017-07-31 | Electronic device and method for controlling thereof |
CN104281078A (en) | 2015-01-14 | Infrared device centralized control system |
US10782851B2 (en) | 2020-09-22 | Portable terminal apparatus and control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2015-12-23 | C06 | Publication | |
2015-12-23 | PB01 | Publication | |
2016-01-20 | C10 | Entry into substantive examination | |
2016-01-20 | SE01 | Entry into force of request for substantive examination | |
2018-09-07 | GR01 | Patent grant | |
2018-09-07 | GR01 | Patent grant | |
2024-06-28 | CF01 | Termination of patent right due to non-payment of annual fee | |
2024-06-28 | CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180907 |