WO2022109937A1 - Control method for distributed user equipment - Google Patents

Control method for distributed user equipment Download PDF

Info

Publication number
WO2022109937A1
WO2022109937A1 PCT/CN2020/131830 CN2020131830W WO2022109937A1 WO 2022109937 A1 WO2022109937 A1 WO 2022109937A1 CN 2020131830 W CN2020131830 W CN 2020131830W WO 2022109937 A1 WO2022109937 A1 WO 2022109937A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
user equipment
control
app
data
Prior art date
Application number
PCT/CN2020/131830
Other languages
French (fr)
Chinese (zh)
Inventor
韩帅
孙乐平
吴宛潞
郭小璇
肖静
秦丽娟
Original Assignee
广西电网有限责任公司电力科学研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广西电网有限责任公司电力科学研究院 filed Critical 广西电网有限责任公司电力科学研究院
Priority to PCT/CN2020/131830 priority Critical patent/WO2022109937A1/en
Publication of WO2022109937A1 publication Critical patent/WO2022109937A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present invention relates to the technical field of equipment control, in particular to a control method of distributed user equipment.
  • the present invention provides a control method for distributed user equipment, and the specific technical solutions are as follows:
  • a control method for distributed user equipment The user equipment is connected to a server through a WIFI gateway, and the server is connected to a control APP.
  • the user equipment communicates with the WIFI gateway through the LonTalk protocol;
  • the server communicates with the WIFI gateway through the TCP/IP Sokcet protocol;
  • the server communicates with the control APP through the WebSokcet protocol;
  • the control method includes the following steps:
  • S1 Collect and upload the status data of the user equipment to the server through the WIFI gateway;
  • the server stores the state data of the user equipment in the database and pushes it to the control APP;
  • S3 The user checks the status of the user equipment through the control APP and sends a control command
  • the LonTalk protocol follows the ISO/OSI model and provides all seven-layer services defined by the OSI reference model. It is a direct object-oriented network protocol, which is not supported by communication buses such as RS485. This establishes a common standard for the exchange of control status information between devices, integrates those isolated systems and products in the past, and solves the problem of interoperability between products of different manufacturers, so that a system can be formed within a residential area. Unified network control system.
  • Socket transmits data at the byte level, and the transmitted data can be customized.
  • the amount of data is small, which can save the traffic cost of mobile phone applications; the data transmission time is short and the performance is high; it is suitable for real-time information exchange between the client and the server; it can be encrypted, Strong data security.
  • the WebSokcet protocol implements multiplexing, is full-duplex communication, supports persistent connections, and the server actively pushes information to the client, which solves the problem of delay in the synchronization of the http protocol.
  • the user equipment is connected to the WIFI gateway through a LonWorks module.
  • the WIFI gateway converts the information of the LonWorks module into WIFI interface information, collects the data of the LonWorks module, and converts the LonTalk communication protocol to the TCP/IP protocol and transmits it from the WIFI interface to the server.
  • the LonWorks module includes the LonWorks chip.
  • the user equipment binds variables through the LonWorks chip.
  • the LonWorks chip immediately pushes the state data of the user equipment to the server connected to the upper layer.
  • the data interaction method between the server and the control APP includes establishing a secure communication connection, sending and pushing data, maintaining and disconnecting the connection, and the details are as follows:
  • the control APP carries the SessionID to carry out the WebSokcet connection request. After the server receives the request, it first checks the validity of the SessionID, establishes a connection with the control APP after the verification is passed, and pushes the currently collected state information of the user equipment to the control APP;
  • control APP When controlling the APP to control the device, the control APP first detects the connection status with the server, and if the connection is not interrupted, it sends a control command to the server. The results are fed back to the control APP;
  • the user equipment pushes the status information to the server through the WIFI gateway; after the server receives the status information of the user equipment, it first checks all WebSokcet connections, and pushes the status data of the user equipment to all available connections;
  • Control the APP to regularly detect the connection status with the server. If it is found to be disconnected, it will continuously try to connect to the server.
  • the user equipment communicates with the WIFI gateway through the LonTalk protocol, which effectively solves the shortcomings of network instability, poor penetration and coverage with blind spots caused by using the wireless communication module as the internal network of the smart home.
  • the server communicates with the WIFI gateway through the TCP/IP Sokcet protocol; the server communicates with the control APP through the WebSokcet protocol, which can quickly and safely obtain the real-time status of the device without wasting a lot of mobile phone resources.
  • Fig. 1 is the schematic flow chart of the present invention
  • Fig. 2 is a schematic flow chart of a server and a control APP establishing a secure communication connection
  • Fig. 3 is a schematic flow chart of server and control APP data distribution and push
  • Fig. 4 is the structural representation of control APP
  • Fig. 5 is the schematic flow chart of the login module of the control APP
  • Fig. 6 is the schematic flow chart of the home page module of the control APP
  • Fig. 7 is the schematic flow chart of the room module of the control APP.
  • FIG. 8 is a schematic flowchart of a device module controlling an APP
  • FIG. 9 is a schematic flowchart of controlling an energy-consuming module of an APP.
  • a control method of distributed user equipment the user equipment is connected to a server through a WIFI gateway, the server is connected to a control APP, and the server and the WIFI gateway communicate through the TCP/IP Sokcet protocol; the server Communicate with the control APP through the WebSokcet protocol; the control method includes the following steps:
  • S1 Collect and upload the status data of the user equipment to the server through the WIFI gateway;
  • the server stores the state data of the user equipment in the database and pushes it to the control APP;
  • S3 The user checks the status of the user equipment through the control APP and sends a control command
  • the user equipment is connected with the WIFI gateway through the LonWorks module.
  • the WIFI gateway converts the information of the LonWorks module into the information of the WIFI interface, collects the data of the LonWorks module and converts the LonTalk communication protocol to the TCP/IP protocol and transmits it from the WIFI interface to the server.
  • the user can directly view the bottom layer and LonWorks through the control APP connected to the server.
  • the status information of the user equipment connected to the module is controlled and managed accordingly.
  • the WIFI gateway adopts LH-GW300B programmable gateway.
  • the WIFI gateway communicates with the LonWorks module using the LonTalk protocol.
  • the LonWorks module includes the LonWorks chip, and the user equipment binds variables through the LonWorks chip. When the state of the user equipment changes, the LonWorks chip immediately pushes the state data of the user equipment to the server connected to the upper layer.
  • the user equipment in this embodiment includes an intake pump and a terminal electric energy meter; the intake pump is connected to the controller through a relay, the terminal electric energy meter is connected to the controller, the controller is connected to the LonWorks module, and the LonWorks module and the WIFI gateway are connected through HF-A21 -SMT module connection, HF-A21-SMT module mainly converts the information of LonWorks serial port into WIFI interface information.
  • the controller controls the start and stop of the inlet water pump through the relay, and the controller collects the energy consumption data of the terminal electric energy meter and uploads it to the server.
  • the data interaction method between the server and the control APP includes establishing a secure communication connection, sending and pushing data, maintaining and disconnecting the connection, as follows:
  • the control APP carries the SessionID to make a WebSokcet connection request.
  • the server After receiving the request, the server first checks the validity of the SessionID, establishes a WebSokcet two-way connection with the control APP after the verification is passed, and pushes the currently collected state information of the user equipment to the control APP.
  • the control APP When the control APP has a request instruction, the control APP carries the SessionID to request the server.
  • the server receives the request from the control APP, it first checks whether the carried SessionID is invalid in the background. If there is no invalid server, obtain the user name corresponding to the SessionID, execute the corresponding command according to the user name, and push the execution result to the specified WebSokcet connection through the SessionID.
  • Control the APP to regularly detect the connection status with the server. If it is found to be disconnected, it will continuously try to connect to the server.
  • control APP includes a login module, a home page module, a room module, a device module, an energy consumption module, and a message module.
  • the login module mainly implements user management functions, including user login, user registration and forgotten password retrieval functions.
  • the startup process is shown in Figure 5.
  • the control APP will enter the startup program, and in the program login page, the program will determine whether the user has successfully logged in. If you have successfully logged in, you do not need to enter the user password to log in with the user password in the cache. If you succeed, you will directly enter the home page, and if you fail, you will enter the login page. If you have not logged in, go directly to the login page. On the user login page, if there is no registration, you can enter the registration page. On the registration page, first verify the mobile phone verification code, and then enter the user information details page after success. If the save is successful, it will jump back to the login page.
  • the password retrieval page On the user login page, if the user forgets the password, he can enter the password retrieval page. On the password retrieval page, first verify the mobile phone verification code. If the mobile phone number exists, enter the password modification page. If the modification is successful, the login page is returned.
  • the home page module mainly manages user modes, including mode setting, mode addition, and mode editing.
  • the user can perform mode setting, display mode setting, and mode adding operations on the home page.
  • the mode displayed on the home page As the current mode, the background will go to the back to obtain the detailed data of the device in the mode, and set the device on or off accordingly.
  • the program When the user clicks the setting of the mode, the program will enter the setting page of the mode. In the setting page, the user can set the status of the device according to the needs, and return to the home page after completion.
  • the program When the user clicks the new mode, the program will enter the new mode page and set the mode. name and device status, and return to the home page when done.
  • the program When the user clicks more modes, the program will enter the more modes page, where the user can add, edit, delete and set the current mode.
  • the room module mainly implements the management of rooms on each floor, including adding rooms, deleting rooms, adding devices in rooms, and setting devices.
  • the user can choose to add a room or enter the room details page on the page.
  • the Add button he enters the Add Room page, selects the floor and room name on the page, and returns to the Room page after saving.
  • the user clicks the corresponding room button the room details page is displayed, and the equipment of the room is displayed on the page. The equipment can be set, and the equipment can be added as needed. You can also choose to delete the room. If the deletion is successful, you will be returned to the room home page.
  • the device module mainly implements the classification management function of the device, including opening, closing, adding, and so on of the device. After entering the equipment module, the user can switch the equipment on and off, enter the equipment setting or enter the parameter page of the inlet pump.
  • the user can directly control the switch of the device, and some devices have other control items, such as air conditioner, TV and so on. It requires the user to enter the device settings page to perform detailed operations.
  • the inlet pump has a parameter details page.
  • the parameter details page there is a display of the inlet water level and a curve display of the history of the liquid level today.
  • Timing setting button Users can also click the timing setting button to enter the timing setting page, where the switch, switching time, running time, and minimum liquid level of the timing control can be controlled on the page. After the setting is successful, the details page will be returned.
  • the user wants to view the history of the liquid level in the details, he can also click the history query button to enter the liquid level query page.
  • the query page select the query time period and enter the liquid level history detail page.
  • the liquid level data will be displayed in the form of a curve graph.
  • the energy consumption module mainly realizes the display and query of energy consumption data, including water consumption, electricity consumption and electricity consumption load.
  • the user can choose whether to use electricity or water to use energy on the page.
  • the electricity consumption page On the electricity consumption page, the total electricity consumption trend graph of the day, the power and consumption data of each floor, and the energy consumption data of several important devices are displayed. Users can also click the More button and choose to query historical data of electricity consumption and electricity load data. Enter the power consumption historical data query page, then select the conditions, and enter the details data page after completion. Also in the water use interface, you can also select the query of water history, and the steps are similar to the query of electricity consumption.
  • the message module mainly displays the alarm data of the equipment, including the overload alarm of the equipment, the energy consumption exceeding the limit alarm and the moving alarm of the people leaving home.

Abstract

The present invention relates to the technical field of equipment control, and more particularly, relates to a control method for distributed user equipment. In the present invention, user equipment communicates with a WiFi gateway by means of a LonTalk protocol, so as to effectively solve the defects such as low stability, poor penetration performance and a coverage blind spot of a smart home internal network provided by a wireless communication module. A server communicates with a WiFi gateway by means of a TCP/IP socket protocol, and communicates with a control application (APP) by means of a WebSocket protocol, such that a real-time state of equipment can be quickly and securely obtained without inefficiently using a large amount of resources of a mobile phone.

Description

一种分散式用户设备的控制方法A control method for distributed user equipment 技术领域technical field
本发明涉及设备控制技术领域,具体涉及一种分散式用户设备的控制方法。The present invention relates to the technical field of equipment control, in particular to a control method of distributed user equipment.
背景技术Background technique
随着智能家居概念的普及以及智能家居设备的普遍应用,人们对智能家居的网络通讯要求不断提高。目前大多数智能家居多采用无线连接的通讯方式,在网络稳定性和性能上,无法与传统的电脑相比,导致设备控制及数据传输实时性差。With the popularization of the concept of smart home and the widespread application of smart home devices, people's requirements for network communication in smart homes are constantly improving. At present, most smart homes use wireless connection communication methods. In terms of network stability and performance, they cannot be compared with traditional computers, resulting in poor real-time device control and data transmission.
发明内容SUMMARY OF THE INVENTION
为了解决上述问题,本发明提供了一种分散式用户设备的控制方法,具体技术方案如下:In order to solve the above problems, the present invention provides a control method for distributed user equipment, and the specific technical solutions are as follows:
一种分散式用户设备的控制方法,用户设备通过WIFI网关与服务器连接,服务器与控制APP连接。用户设备与WIFI网关通过LonTalk协议通信;所述服务器与WIFI网关通过TCP/IP的Sokcet协议进行通信;所述服务器与控制APP通过WebSokcet协议进行通信;A control method for distributed user equipment. The user equipment is connected to a server through a WIFI gateway, and the server is connected to a control APP. The user equipment communicates with the WIFI gateway through the LonTalk protocol; the server communicates with the WIFI gateway through the TCP/IP Sokcet protocol; the server communicates with the control APP through the WebSokcet protocol;
控制方法包括以下步骤:The control method includes the following steps:
S1:通过WIFI网关采集上传用户设备的状态数据至服务器;S1: Collect and upload the status data of the user equipment to the server through the WIFI gateway;
S2:服务器将用户设备的状态数据存储至数据库并推送至控制APP;S2: The server stores the state data of the user equipment in the database and pushes it to the control APP;
S3:用户通过控制APP查看用户设备的状态并发送控制指令;S3: The user checks the status of the user equipment through the control APP and sends a control command;
S4:服务器收到控制指令后通过WIFI网关下发至用户设备控制用户设备的状态。S4: After the server receives the control instruction, the server sends it to the user equipment through the WIFI gateway to control the state of the user equipment.
LonTalk协议遵循ISO/OSI模型,提供了OSI参考模型所定义的全部七层服务,是直接面向对象的网络协议,这是RS485等通信总线所不支持的。这为设备之间交换控制状态信息建立了一个通用的标准,使以往那些孤立的系统和产品融为一体,解决了不同厂家产品之间的互操作性问题,从而可以在居民小区家庭内部构成一个统一的网络控制系统。The LonTalk protocol follows the ISO/OSI model and provides all seven-layer services defined by the OSI reference model. It is a direct object-oriented network protocol, which is not supported by communication buses such as RS485. This establishes a common standard for the exchange of control status information between devices, integrates those isolated systems and products in the past, and solves the problem of interoperability between products of different manufacturers, so that a system can be formed within a residential area. Unified network control system.
Socket传输数据为字节级,传输数据可自定义,数据量小,可节约手机应用的流量费用;传输数据时间短,性能高;适合于客户端和服务器端之间信息实时交互;可以加密,数据安全性强。Socket transmits data at the byte level, and the transmitted data can be customized. The amount of data is small, which can save the traffic cost of mobile phone applications; the data transmission time is short and the performance is high; it is suitable for real-time information exchange between the client and the server; it can be encrypted, Strong data security.
WebSokcet协议实现了多路服用,是全双工通讯,支持持久连接,由服务端主动推送信息给客户端,解决了http协议的同步有延迟问题。The WebSokcet protocol implements multiplexing, is full-duplex communication, supports persistent connections, and the server actively pushes information to the client, which solves the problem of delay in the synchronization of the http protocol.
通过上述三种协议在系统各环节的应用,可有效提高通讯效率,达到实时控制的效果。Through the application of the above three protocols in each link of the system, the communication efficiency can be effectively improved and the effect of real-time control can be achieved.
优选地,所述用户设备通过LonWorks模块与WIFI网关连接。Preferably, the user equipment is connected to the WIFI gateway through a LonWorks module.
优选地,所述WIFI网关将LonWorks模块的信息转换为WIFI接口信息,并采集LonWorks模块的数据并将LonTalk通信协议转换TCP/IP协议从WIFI接口传输到服务器中。Preferably, the WIFI gateway converts the information of the LonWorks module into WIFI interface information, collects the data of the LonWorks module, and converts the LonTalk communication protocol to the TCP/IP protocol and transmits it from the WIFI interface to the server.
LonWorks模块包括LonWorks芯片,用户设备通过LonWorks芯片绑定变量,用户设备 的状态改变时,LonWorks芯片立即向上层连接的服务器推送用户设备的状态数据。The LonWorks module includes the LonWorks chip. The user equipment binds variables through the LonWorks chip. When the state of the user equipment changes, the LonWorks chip immediately pushes the state data of the user equipment to the server connected to the upper layer.
优选地,所述服务器与控制APP的数据交互方法包括建立安全通信连接、数据下发和推送、连接保持和断开,具体如下:Preferably, the data interaction method between the server and the control APP includes establishing a secure communication connection, sending and pushing data, maintaining and disconnecting the connection, and the details are as follows:
(1)建立安全通信连接:(1) Establish a secure communication connection:
1)用户在控制APP登录界面进行用户登录,登录成功后服务器将控制APP传过来的SessionID保存;1) The user logs in the user on the login interface of the control APP. After the login is successful, the server saves the SessionID passed by the control APP;
2)控制APP携带SessionID进行WebSokcet连接请求,服务器收到请求后首先检查SessionID的有效性,验证通过后与控制APP建立连接,并向控制APP推送当前采集到的用户设备的状态信息;2) The control APP carries the SessionID to carry out the WebSokcet connection request. After the server receives the request, it first checks the validity of the SessionID, establishes a connection with the control APP after the verification is passed, and pushes the currently collected state information of the user equipment to the control APP;
(2)数据下发和推送:(2) Data distribution and push:
1)控制APP控制设备时,控制APP首先检测和服务器的连接状态,如果连接没有中断则向服务器发送控制指令,服务器收到控制指令后通过WIFI网关下发控制指令控制用户设备,并将控制的结果反馈给控制APP;1) When controlling the APP to control the device, the control APP first detects the connection status with the server, and if the connection is not interrupted, it sends a control command to the server. The results are fed back to the control APP;
2)当用户设备状态改变时,用户设备通过WIFI网关向服务器推送状态信息;服务器收到用户设备的状态信息后首先检查所有的WebSokcet连接,并向所有的可用连接推送用户设备的状态数据;2) When the status of the user equipment changes, the user equipment pushes the status information to the server through the WIFI gateway; after the server receives the status information of the user equipment, it first checks all WebSokcet connections, and pushes the status data of the user equipment to all available connections;
(3)连接保持和断开:(3) The connection is maintained and disconnected:
控制APP定时检测与服务器的连接状态,如发现处于断开状态则不断的去尝试连接服务器。Control the APP to regularly detect the connection status with the server. If it is found to be disconnected, it will continuously try to connect to the server.
本发明的有益效果为:The beneficial effects of the present invention are:
本发明中用户设备与WIFI网关通过LonTalk协议进行通讯,有效的解决了以无线通讯模块作为智能家居内部网络产生的网络不稳定、穿透性不强、覆盖有盲点的缺点。服务器与WIFI网关通过TCP/IP的Sokcet协议进行通信;服务器与控制APP通过WebSokcet协议进行通信,可以在不浪费手机大量资源的前提下,快速、安全的获得设备的实时状态。In the present invention, the user equipment communicates with the WIFI gateway through the LonTalk protocol, which effectively solves the shortcomings of network instability, poor penetration and coverage with blind spots caused by using the wireless communication module as the internal network of the smart home. The server communicates with the WIFI gateway through the TCP/IP Sokcet protocol; the server communicates with the control APP through the WebSokcet protocol, which can quickly and safely obtain the real-time status of the device without wasting a lot of mobile phone resources.
附图说明Description of drawings
图1为本发明的流程示意图;Fig. 1 is the schematic flow chart of the present invention;
图2为服务器与控制APP建立安全通信连接的流程示意图;Fig. 2 is a schematic flow chart of a server and a control APP establishing a secure communication connection;
图3为服务器与控制APP数据下发和推送的流程示意图;Fig. 3 is a schematic flow chart of server and control APP data distribution and push;
图4为控制APP的结构示意图;Fig. 4 is the structural representation of control APP;
图5为控制APP的登录模块的流程示意图;Fig. 5 is the schematic flow chart of the login module of the control APP;
图6为控制APP的首页模块的流程示意图;Fig. 6 is the schematic flow chart of the home page module of the control APP;
图7为控制APP的房间模块的流程示意图;Fig. 7 is the schematic flow chart of the room module of the control APP;
图8为控制APP的设备模块的流程示意图;8 is a schematic flowchart of a device module controlling an APP;
图9为控制APP的用能模块的流程示意图。FIG. 9 is a schematic flowchart of controlling an energy-consuming module of an APP.
具体实施方式Detailed ways
为了更好的理解本发明,下面结合附图和具体实施例对本发明作进一步说明:In order to better understand the present invention, the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments:
如图1所示,一种分散式用户设备的控制方法,用户设备通过WIFI网关与服务器连接,服务器与控制APP连接,所述服务器与WIFI网关通过TCP/IP的Sokcet协议进行通信;所述服务器与控制APP通过WebSokcet协议进行通信;控制方法包括以下步骤:As shown in Fig. 1, a control method of distributed user equipment, the user equipment is connected to a server through a WIFI gateway, the server is connected to a control APP, and the server and the WIFI gateway communicate through the TCP/IP Sokcet protocol; the server Communicate with the control APP through the WebSokcet protocol; the control method includes the following steps:
S1:通过WIFI网关采集上传用户设备的状态数据至服务器;S1: Collect and upload the status data of the user equipment to the server through the WIFI gateway;
S2:服务器将用户设备的状态数据存储至数据库并推送至控制APP;S2: The server stores the state data of the user equipment in the database and pushes it to the control APP;
S3:用户通过控制APP查看用户设备的状态并发送控制指令;S3: The user checks the status of the user equipment through the control APP and sends a control command;
S4:服务器收到控制指令后通过WIFI网关下发至用户设备控制用户设备的状态。S4: After the server receives the control instruction, the server sends it to the user equipment through the WIFI gateway to control the state of the user equipment.
用户设备通过LonWorks模块与WIFI网关连接。WIFI网关将LonWorks模块的信息转换为WIFI接口信息,采集LonWorks模块的数据并将LonTalk通信协议转换TCP/IP协议从WIFI接口传输到服务器中,用户可通过与服务器连接的控制APP直接查看底层与LonWorks模块连接的用户设备的状态信息并进行相应的控制及管理。其中,WIFI网关采用LH-GW300B可编程网关。WIFI网关与LonWorks模块采用LonTalk协议通信。The user equipment is connected with the WIFI gateway through the LonWorks module. The WIFI gateway converts the information of the LonWorks module into the information of the WIFI interface, collects the data of the LonWorks module and converts the LonTalk communication protocol to the TCP/IP protocol and transmits it from the WIFI interface to the server. The user can directly view the bottom layer and LonWorks through the control APP connected to the server. The status information of the user equipment connected to the module is controlled and managed accordingly. Among them, the WIFI gateway adopts LH-GW300B programmable gateway. The WIFI gateway communicates with the LonWorks module using the LonTalk protocol.
LonWorks模块包括LonWorks芯片,用户设备通过LonWorks芯片绑定变量,用户设备的状态改变时,LonWorks芯片立即向上层连接的服务器推送用户设备的状态数据。The LonWorks module includes the LonWorks chip, and the user equipment binds variables through the LonWorks chip. When the state of the user equipment changes, the LonWorks chip immediately pushes the state data of the user equipment to the server connected to the upper layer.
本实施例中的用户设备包括进水泵、终端电能计量表;进水泵通过继电器与控制器连接,终端电能计量表与控制器连接,控制器与LonWorks模块连接,LonWorks模块与WIFI网关通过HF-A21-SMT模块连接,HF-A21-SMT模块主要是将LonWorks串口的信息转换为WIFI接口信息。控制器通过继电器控制进水泵的启停,控制器采集终端电能表的用能数据并上传至服务器。The user equipment in this embodiment includes an intake pump and a terminal electric energy meter; the intake pump is connected to the controller through a relay, the terminal electric energy meter is connected to the controller, the controller is connected to the LonWorks module, and the LonWorks module and the WIFI gateway are connected through HF-A21 -SMT module connection, HF-A21-SMT module mainly converts the information of LonWorks serial port into WIFI interface information. The controller controls the start and stop of the inlet water pump through the relay, and the controller collects the energy consumption data of the terminal electric energy meter and uploads it to the server.
服务器与控制APP的数据交互方法包括建立安全通信连接、数据下发和推送、连接保持和断开,具体如下:The data interaction method between the server and the control APP includes establishing a secure communication connection, sending and pushing data, maintaining and disconnecting the connection, as follows:
(1)如图2所示,建立安全通信连接:(1) As shown in Figure 2, establish a secure communication connection:
1)用户在控制APP登录界面进行用户登录,登录成功后服务器将控制APP传过来的SessionID保存;1) The user logs in the user on the login interface of the control APP. After the login is successful, the server saves the SessionID passed by the control APP;
2)控制APP携带SessionID进行WebSokcet连接请求,服务器收到请求后首先检查SessionID的有效性,验证通过后与控制APP建立WebSokcet双向连接,并向控制APP推送当前采集到的用户设备的状态信息。2) The control APP carries the SessionID to make a WebSokcet connection request. After receiving the request, the server first checks the validity of the SessionID, establishes a WebSokcet two-way connection with the control APP after the verification is passed, and pushes the currently collected state information of the user equipment to the control APP.
(2)如图3所示,数据下发和推送:(2) As shown in Figure 3, data delivery and push:
当控制APP有请求指令时,控制APP携带SessionID向服务器请求。当服务器收到控制APP穿过来的请求时候,先去校验携带过来的SessionID在后台是否失效。如没有失效服务器则去获取SessionID对应的用户名,根据用户名去执行相应的指令,并把执行结果通过SessionID向指定的WebSokcet连接推送。When the control APP has a request instruction, the control APP carries the SessionID to request the server. When the server receives the request from the control APP, it first checks whether the carried SessionID is invalid in the background. If there is no invalid server, obtain the user name corresponding to the SessionID, execute the corresponding command according to the user name, and push the execution result to the specified WebSokcet connection through the SessionID.
(3)连接保持和断开:(3) Connection maintained and disconnected:
控制APP定时检测与服务器的连接状态,如发现处于断开状态则不断的去尝试连接服务器。Control the APP to regularly detect the connection status with the server. If it is found to be disconnected, it will continuously try to connect to the server.
如图4所示,控制APP包括登录模块、首页模块、房间模块、设备模块、用能模块、消息模块。As shown in Figure 4, the control APP includes a login module, a home page module, a room module, a device module, an energy consumption module, and a message module.
登录模块主要实现用户管理功能,包括用户登录、用户注册和忘记密码找回等功能。启动流程如图5所示。首先控制APP会进入启动程序,在程序登录页面中程序会判断用户是否已经登录成功过了。如果成功登录过了,则无需输入用户密码使用缓存中的用户密码登录,成功则直接进入首页,失败就进入登录页面。如果没有登录过则直接进入登录页面。在用户登录页面可以如果没有注册则可以进入注册页面,在注册页面中首先验证手机验证码,成功后进入用户信息详情面,保存成功则跳回到登录页。在用户登录页面如果用户忘记密码则可以进入密码找回页面,在密码找回页面中首先验证手机验证码,如果手机号存在则进入密码修改页,修改成功返回登录页。The login module mainly implements user management functions, including user login, user registration and forgotten password retrieval functions. The startup process is shown in Figure 5. First, the control APP will enter the startup program, and in the program login page, the program will determine whether the user has successfully logged in. If you have successfully logged in, you do not need to enter the user password to log in with the user password in the cache. If you succeed, you will directly enter the home page, and if you fail, you will enter the login page. If you have not logged in, go directly to the login page. On the user login page, if there is no registration, you can enter the registration page. On the registration page, first verify the mobile phone verification code, and then enter the user information details page after success. If the save is successful, it will jump back to the login page. On the user login page, if the user forgets the password, he can enter the password retrieval page. On the password retrieval page, first verify the mobile phone verification code. If the mobile phone number exists, enter the password modification page. If the modification is successful, the login page is returned.
如图6所示,首页模块主要对用户模式进行管理,包括模式的设定、模式的添加、模式的编辑。用户进入控制APP首页后,可以在首页中进行模式设定、显示的模式设置、模式添加的操作。当用户将首页中显示的模式设为当前模式,后台会到后始去获取模式中设备的详细数据,对设备进行相应的打开或关闭设置。当用户点击模式的设置,程序会进入该模式的设置页面,在设置页面中用户根据需求去设置设备的状态,完成后返回到首页当用户点击新增模式,程序进入新增模式页面,设置模式名称和设备状态,完成后返回到首页。当用户点击更多模式,程序会进入到更多模式页面,在页面中用户可以对模式进行增加、编辑、删除和设置当前模式的操作。As shown in FIG. 6 , the home page module mainly manages user modes, including mode setting, mode addition, and mode editing. After entering the home page of the control APP, the user can perform mode setting, display mode setting, and mode adding operations on the home page. When the user sets the mode displayed on the home page as the current mode, the background will go to the back to obtain the detailed data of the device in the mode, and set the device on or off accordingly. When the user clicks the setting of the mode, the program will enter the setting page of the mode. In the setting page, the user can set the status of the device according to the needs, and return to the home page after completion. When the user clicks the new mode, the program will enter the new mode page and set the mode. name and device status, and return to the home page when done. When the user clicks more modes, the program will enter the more modes page, where the user can add, edit, delete and set the current mode.
如图7所示,房间模块主要实现对各楼层的房间进行管理,包括房间的添加、房间的删除、房间里的设备的添加和设备的设置。用户进入房间模块后,可在页面中选择增加房间或进入房间详情页。当用户点击添加按钮,进入增加房间页,在页面中选择楼层和房间名称,保存后返回到房间页。当用户点击相应房间按钮,进入房间详情页,在页面展示该房间的设备,可以设置设备,也可以根据需要增加设备。也可以选择删除该房间,删除成功返回到房 间主页。As shown in Figure 7, the room module mainly implements the management of rooms on each floor, including adding rooms, deleting rooms, adding devices in rooms, and setting devices. After entering the room module, the user can choose to add a room or enter the room details page on the page. When the user clicks the Add button, he enters the Add Room page, selects the floor and room name on the page, and returns to the Room page after saving. When the user clicks the corresponding room button, the room details page is displayed, and the equipment of the room is displayed on the page. The equipment can be set, and the equipment can be added as needed. You can also choose to delete the room. If the deletion is successful, you will be returned to the room home page.
如图8所示,设备模块主要实现对设备的分类管理功能,包括设备的开启、关闭、添加等。用户进入设备模块后,可在页面中开关设备、进入设备设置或进入进水泵的参数页。As shown in FIG. 8 , the device module mainly implements the classification management function of the device, including opening, closing, adding, and so on of the device. After entering the equipment module, the user can switch the equipment on and off, enter the equipment setting or enter the parameter page of the inlet pump.
在页面上用户可以直接控制设备的开关,有些设备还有其它控制项,如空调、电视等。就需要用户进入设备设置页进行详细的操作。On the page, the user can directly control the switch of the device, and some devices have other control items, such as air conditioner, TV and so on. It requires the user to enter the device settings page to perform detailed operations.
这个页面比较特别的就是进水泵,进水泵有个参数详情页,在参数详情页中有进水液位的显示、本日液位历史的曲线展示。The special feature of this page is the inlet pump. The inlet pump has a parameter details page. In the parameter details page, there is a display of the inlet water level and a curve display of the history of the liquid level today.
用户还可以点击定时设置按钮进入定时设置页,在页面中可以对定时控制的开关、开关时间、运行时长、最低液位进行控制,设置成功后返回详情页。Users can also click the timing setting button to enter the timing setting page, where the switch, switching time, running time, and minimum liquid level of the timing control can be controlled on the page. After the setting is successful, the details page will be returned.
用户在详情中如果想查看液位的历史,还可以点击历史查询按钮进入液位查询页。在查询页中选择查询的时间段后进入到液位历史详细页。在详情页中液位数据会将液位的数据以曲线图的方式显示出来。If the user wants to view the history of the liquid level in the details, he can also click the history query button to enter the liquid level query page. In the query page, select the query time period and enter the liquid level history detail page. In the details page, the liquid level data will be displayed in the form of a curve graph.
如图9所示,用能模块主要实现对用能数据的显示和查询,包括用水、用电和用电负荷。用户进入用能模块后,可在页面中选择是用电或用水用能页。在用电页显示有本日总用电趋势图、每层楼的功率和用量数据和重要的几个设备的用能数据。用户还可以点击更多按钮,选择查询用电历史数据和用电负荷数据。进入用电历史数据查询页,之后选择条件,完成后进入详情数据页。同样在用水界面也可以选择水历史的查询,步骤与用电查询类似。As shown in Figure 9, the energy consumption module mainly realizes the display and query of energy consumption data, including water consumption, electricity consumption and electricity consumption load. After entering the energy consumption module, the user can choose whether to use electricity or water to use energy on the page. On the electricity consumption page, the total electricity consumption trend graph of the day, the power and consumption data of each floor, and the energy consumption data of several important devices are displayed. Users can also click the More button and choose to query historical data of electricity consumption and electricity load data. Enter the power consumption historical data query page, then select the conditions, and enter the details data page after completion. Also in the water use interface, you can also select the query of water history, and the steps are similar to the query of electricity consumption.
消息模块主要显示设备的报警数据,包括设备的过载报警、用能超限报警和离家人员移动报警等。The message module mainly displays the alarm data of the equipment, including the overload alarm of the equipment, the energy consumption exceeding the limit alarm and the moving alarm of the people leaving home.
本发明不局限于以上所述的具体实施方式,以上所述仅为本发明的较佳实施案例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The present invention is not limited to the specific embodiments described above, and the above descriptions are only preferred implementation examples of the present invention, and are not intended to limit the present invention. Substitutions and improvements, etc., should all be included within the protection scope of the present invention.

Claims (4)

  1. 一种分散式用户设备的控制方法,其特征在于:用户设备通过WIFI网关与服务器连接,服务器与控制APP连接,所述服务器与WIFI网关通过TCP/IP的Sokcet协议进行通信;所述服务器与控制APP通过WebSokcet协议进行通信;控制方法包括以下步骤:A control method for distributed user equipment, characterized in that: the user equipment is connected to a server through a WIFI gateway, the server is connected to a control APP, and the server and the WIFI gateway communicate through the TCP/IP Sokcet protocol; the server and the control The APP communicates through the WebSokcet protocol; the control method includes the following steps:
    S1:通过WIFI网关采集上传用户设备的状态数据至服务器;S1: Collect and upload the status data of the user equipment to the server through the WIFI gateway;
    S2:服务器将用户设备的状态数据存储至数据库并推送至控制APP;S2: The server stores the state data of the user equipment in the database and pushes it to the control APP;
    S3:用户通过控制APP查看用户设备的状态并发送控制指令;S3: The user checks the status of the user equipment through the control APP and sends a control command;
    S4:服务器收到控制指令后通过WIFI网关下发至用户设备控制用户设备的状态。S4: After the server receives the control instruction, the server sends it to the user equipment through the WIFI gateway to control the state of the user equipment.
  2. 根据权利要求1所述的一种分散式用户设备的控制方法,其特征在于:所述用户设备通过LonWorks模块与WIFI网关连接。The method for controlling distributed user equipment according to claim 1, wherein the user equipment is connected to the WIFI gateway through a LonWorks module.
  3. 根据权利要求2所述的一种分散式用户设备的控制方法,其特征在于:所述WIFI网关将LonWorks模块的信息转换为WIFI接口信息,并采集LonWorks模块的数据并将LonTalk通信协议转换TCP/IP协议从WIFI接口传输到服务器中。The method for controlling distributed user equipment according to claim 2, wherein the WIFI gateway converts the information of the LonWorks module into WIFI interface information, collects the data of the LonWorks module and converts the LonTalk communication protocol into TCP/ The IP protocol is transmitted from the WIFI interface to the server.
  4. 根据权利要求1所述的一种分散式用户设备的控制方法,其特征在于:所述服务器与控制APP的数据交互方法包括建立安全通信连接、数据下发和推送、连接保持和断开,具体如下:A method for controlling distributed user equipment according to claim 1, wherein the data interaction method between the server and the control APP comprises establishing a secure communication connection, sending and pushing data, maintaining and disconnecting the connection, and specifically as follows:
    (1)建立安全通信连接:(1) Establish a secure communication connection:
    1)用户在控制APP登录界面进行用户登录,登录成功后服务器将控制APP传过来的SessionID保存;1) The user logs in the user on the login interface of the control APP. After the login is successful, the server saves the SessionID passed by the control APP;
    2)控制APP携带SessionID进行WebSokcet连接请求,服务器收到请求后首先检查SessionID的有效性,验证通过后与控制APP建立连接,并向控制APP推送当前采集到的用户设备的状态信息;2) The control APP carries the SessionID to carry out the WebSokcet connection request. After the server receives the request, it first checks the validity of the SessionID, establishes a connection with the control APP after the verification is passed, and pushes the currently collected state information of the user equipment to the control APP;
    (2)数据下发和推送:(2) Data distribution and push:
    1)控制APP控制设备时,控制APP首先检测和服务器的连接状态,如果连接没有中断则向服务器发送控制指令,服务器收到控制指令后通过WIFI网关下发控制指令控制用户设备,并将控制的结果反馈给控制APP;1) When controlling the APP to control the device, the control APP first detects the connection status with the server, and if the connection is not interrupted, it sends a control command to the server. The results are fed back to the control APP;
    2)当用户设备状态改变时,用户设备通过WIFI网关向服务器推送状态信息;服务器收到用户设备的状态信息后首先检查所有的WebSokcet连接,并向所有的可用连接推送用户设备的状态数据;2) When the status of the user equipment changes, the user equipment pushes the status information to the server through the WIFI gateway; after the server receives the status information of the user equipment, it first checks all WebSokcet connections, and pushes the status data of the user equipment to all available connections;
    (3)连接保持和断开:(3) Connection maintained and disconnected:
    控制APP定时检测与服务器的连接状态,如发现处于断开状态则不断的去尝试连接服务器。Control the APP to regularly detect the connection status with the server. If it is found to be disconnected, it will continuously try to connect to the server.
PCT/CN2020/131830 2020-11-26 2020-11-26 Control method for distributed user equipment WO2022109937A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/131830 WO2022109937A1 (en) 2020-11-26 2020-11-26 Control method for distributed user equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/131830 WO2022109937A1 (en) 2020-11-26 2020-11-26 Control method for distributed user equipment

Publications (1)

Publication Number Publication Date
WO2022109937A1 true WO2022109937A1 (en) 2022-06-02

Family

ID=81755103

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/131830 WO2022109937A1 (en) 2020-11-26 2020-11-26 Control method for distributed user equipment

Country Status (1)

Country Link
WO (1) WO2022109937A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060168178A1 (en) * 2004-12-21 2006-07-27 Electronics And Telecommunications Research Institute Platform-independent system for remotely controlling home devices and method thereof
CN105897573A (en) * 2016-05-20 2016-08-24 复旦大学 Smart home gateway system supporting multiple protocols and multiple services
CN105915422A (en) * 2016-06-28 2016-08-31 合肥润东通信科技股份有限公司 IoT (Internet of Things) gateway system
CN111083224A (en) * 2019-12-19 2020-04-28 广西电网有限责任公司电力科学研究院 Control method of distributed user equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060168178A1 (en) * 2004-12-21 2006-07-27 Electronics And Telecommunications Research Institute Platform-independent system for remotely controlling home devices and method thereof
CN105897573A (en) * 2016-05-20 2016-08-24 复旦大学 Smart home gateway system supporting multiple protocols and multiple services
CN105915422A (en) * 2016-06-28 2016-08-31 合肥润东通信科技股份有限公司 IoT (Internet of Things) gateway system
CN111083224A (en) * 2019-12-19 2020-04-28 广西电网有限责任公司电力科学研究院 Control method of distributed user equipment

Similar Documents

Publication Publication Date Title
CN110912789B (en) Intelligent household Internet of things communication method based on Alicloud IoT Hub platform
CN107800621B (en) Novel intelligent home gateway supporting multiple access protocols
CN204350030U (en) Based on the multi-functional household things-internet gateway device of Set Top Box
CN111025925A (en) Intelligent home furnishing system based on cloud computing
CN103676914A (en) Intelligent home control method and device
CN105093944A (en) Intelligent household system and cloud data processing method based on the intelligent household system
CN111355806A (en) Intelligent home control system based on 5G smart phone
CN104880952A (en) Intelligent household management system based on operation service
CN110519093A (en) A kind of information acquisition system network architecture based on ubiquitous electric power Internet of Things
CN113835348A (en) Intelligent household control system
CN110557356B (en) Automatic demand response-oriented plug-and-play access terminal and implementation method
CN206100019U (en) Intelligence house node management system
WO2022109937A1 (en) Control method for distributed user equipment
CN111565384A (en) Intelligent home gateway capable of preventing network from being disconnected and implementation method
CN202889380U (en) An air conditioner gateway system with a touch screen
CN110784541A (en) Information processing method, device, system and storage medium
CN111245689B (en) Intelligent bathroom system based on convergence gateway and control method thereof
CN111083224A (en) Control method of distributed user equipment
CN204836236U (en) Low -power consumption thing networking framework based on act on behalf of equipment
CN214901321U (en) Lock networking system based on Bluetooth router and lock networking system applied to hotel
CN204741470U (en) Remote switch control system based on internet
CN206115535U (en) Intelligence lock low -power consumption remote control system
CN109005244B (en) Environment-aware open service system and application method
CN209761044U (en) Energy-saving system for controlling on-off of room power supply through intelligent door lock
CN113382043A (en) Indoor wisdom management system

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20962828

Country of ref document: EP

Kind code of ref document: A1