Movatterモバイル変換


[0]ホーム

URL:


CN114980191A - Information processing method, apparatus, storage medium and program product - Google Patents

Information processing method, apparatus, storage medium and program product
Download PDF

Info

Publication number
CN114980191A
CN114980191ACN202210558025.8ACN202210558025ACN114980191ACN 114980191 ACN114980191 ACN 114980191ACN 202210558025 ACN202210558025 ACN 202210558025ACN 114980191 ACN114980191 ACN 114980191A
Authority
CN
China
Prior art keywords
main control
controlled device
control unit
wake
user equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210558025.8A
Other languages
Chinese (zh)
Inventor
郭伟松
李洋
张立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Cloud Computing LtdfiledCriticalAlibaba Cloud Computing Ltd
Priority to CN202210558025.8ApriorityCriticalpatent/CN114980191A/en
Publication of CN114980191ApublicationCriticalpatent/CN114980191A/en
Priority to PCT/CN2023/094368prioritypatent/WO2023221948A1/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例提供信息处理方法、设备、存储介质及程序产品,其方法包括:接收用户设备发送的查询请求,用以查询被控设备的状态,被控设备包括WiFi单元和主控单元;若查询到被控设备处于低功耗状态且确定被控设备处于WiFi单元工作的心跳状态时,则向被控设备的WiFi单元发送唤醒包,以使WiFi单元根据唤醒包,确定是否唤醒被控设备的主控单元;若接收到主控单元发送的用于表示处于非低功耗状态的目标消息,则将目标消息发送至用户设备,以使用户设备向主控单元发送目标指令,用以指示主控单元执行相应的目标功能,目标指令是由用户设备基于目标消息生成的。能够保证低成本、高产量的前提下,实现了双向保活和远程唤醒的能力。

Figure 202210558025

The embodiments of the present application provide an information processing method, device, storage medium, and program product. The method includes: receiving a query request sent by a user equipment to query the status of a controlled device, where the controlled device includes a WiFi unit and a main control unit; When it is found that the controlled device is in a low power consumption state and it is determined that the controlled device is in the heartbeat state of the WiFi unit working, a wake-up packet is sent to the WiFi unit of the controlled device, so that the WiFi unit can determine whether to wake up the controlled device according to the wake-up packet. The main control unit; if the target message sent by the main control unit to indicate that it is in a non-low power consumption state is received, the target message is sent to the user equipment, so that the user equipment sends a target instruction to the main control unit to indicate The main control unit executes the corresponding target function, and the target instruction is generated by the user equipment based on the target message. On the premise of ensuring low cost and high output, the ability to keep alive in both directions and wake up remotely is realized.

Figure 202210558025

Description

Translated fromChinese
信息处理方法、设备、存储介质及程序产品Information processing method, apparatus, storage medium and program product

技术领域technical field

本申请实施例涉及计算机技术领域,尤其涉及一种信息处理方法、设备、存储介质及程序产品。The embodiments of the present application relate to the field of computer technologies, and in particular, to an information processing method, device, storage medium, and program product.

背景技术Background technique

随着市场需求不断地变革,越来越多的电子产品(比如,门铃、门锁等)向可视化、智能化发展。通过使用该电子产品的应用程序(Application,APP)能够实现远程控制该电子产品,比如远程查看门铃、门锁监控画面,保存并查看门口录像等,已成为大众化需求。With the continuous changes in market demand, more and more electronic products (such as doorbells, door locks, etc.) are developing towards visualization and intelligence. By using the application (Application, APP) of the electronic product, it is possible to remotely control the electronic product, such as remotely viewing the doorbell, door lock monitoring screen, saving and viewing the door video, etc., which has become a popular demand.

然而,可视门铃、可视门锁是电池类设备,耗电的主控单元通常是不带电工作的,需要双向保活并支持APP远程唤醒主控来执行相应操作,并且,双向保活并支持APP远程唤醒主控执行相应操作的能力需要WiFi模组来实现。However, video doorbells and video door locks are battery-type devices, and the main control unit that consumes power usually works without electricity. It requires two-way keep-alive and supports APP to remotely wake up the main control to perform corresponding operations. Moreover, the two-way keep-alive and The ability to support the APP to remotely wake up the master to perform corresponding operations requires a WiFi module.

目前,双向保活和远程唤醒需要WiFi模组支持MQTT协议且具备可编程能力,但是,普通WiFi模组不支持MQTT协议和不具备编程能力,同时,无法通过空中下载技术(Over-the-Air Technology,OTA)实现功能升级。因此,双向保活和远程唤醒的WiFi模组目前使用的是高端WiFi模组,但是,高端WiFi模组成本高,产能低,无法大面积推广。故,现有技术中实现双向保活和远程唤醒的能力具有局限性,进而无法广泛地、有效地应用于可远程控制的电子产品。Currently, two-way keep-alive and remote wake-up require the WiFi module to support the MQTT protocol and have programmability. However, ordinary WiFi modules do not support the MQTT protocol and do not have programming capabilities. Technology, OTA) to achieve function upgrade. Therefore, the two-way keep-alive and remote wake-up WiFi modules currently use high-end WiFi modules. However, high-end WiFi modules have high cost and low production capacity, and cannot be widely promoted. Therefore, the capability of realizing bidirectional keep-alive and remote wake-up in the prior art has limitations, and thus cannot be widely and effectively applied to electronic products that can be remotely controlled.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供一种信息处理方法、设备、存储介质及程序产品,以解决现有技术实现双向保活和远程唤醒的能力具有局限性,进而无法广泛地、有效地应用于可远程控制的电子产品的问题。The embodiments of the present application provide an information processing method, device, storage medium, and program product, so as to solve the limitation of the ability of the prior art to realize bidirectional keep-alive and remote wake-up, and thus cannot be widely and effectively applied to remote controllable problems with electronics.

第一方面,本申请实施例提供一种信息处理方法,应用于服务端,所述方法包括:In a first aspect, an embodiment of the present application provides an information processing method, which is applied to a server, and the method includes:

接收用户设备发送的查询请求,用以查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;Receive a query request sent by the user equipment to query the state of the controlled device, where the controlled device includes a WiFi unit and a main control unit;

若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,则向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元;If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in the heartbeat state of the WiFi unit working, a wake-up packet is sent to the WiFi unit of the controlled device, so that the WiFi The unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet;

若接收到所述主控单元发送的用于表示处于非低功耗状态的目标消息,则将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。If receiving a target message indicating that the main control unit is in a non-low power consumption state, send the target message to the user equipment, so that the user equipment sends the target to the main control unit an instruction to instruct the main control unit to execute a corresponding target function, and the target instruction is generated by the user equipment based on the target message.

可选的,所述服务端存储有所述被控设备的状态,所述被控设备的状态包括低功耗状态或非低功耗状态;Optionally, the server stores the state of the controlled device, and the state of the controlled device includes a low power consumption state or a non-low power consumption state;

所述若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,则向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元,包括:If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, send a wake-up packet to the WiFi unit of the controlled device, so that all The WiFi unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet, including:

若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至所述用户设备,以使所述用户设备调用用于表示发送唤醒包的指令;If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, a message indicating that the controlled device is in a low power consumption state is sent to the controlled device. the user equipment, so that the user equipment invokes an instruction for sending a wake-up packet;

若接收到所述用户设备发送的用于表示发送唤醒包的指令,则将所述唤醒包发送至所述WiFi单元,以使所述WiFi单元将所述唤醒包与预定义的消息包进行比对,当比对一致时确定唤醒所述被控设备的主控单元。If an instruction for sending a wake-up packet sent by the user equipment is received, the wake-up packet is sent to the WiFi unit, so that the WiFi unit compares the wake-up packet with a predefined message packet Yes, when the comparison is consistent, it is determined to wake up the main control unit of the controlled device.

可选的,所述将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,包括:Optionally, the sending the target message to the user equipment, so that the user equipment sends a target instruction to the main control unit, so as to instruct the main control unit to execute the corresponding target function, including:

将所述目标消息发送至所述用户设备,以使所述用户设备接收到所述目标消息时触发预定义功能,生成目标指令;sending the target message to the user equipment, so that when the user equipment receives the target message, a predefined function is triggered and a target instruction is generated;

接收所述用户设备发送的目标指令,并将所述目标指令发送至所述主控单元,以使所述主控单元执行所述预定义功能对应的操作,并在所述用户设备上显示。The target instruction sent by the user equipment is received, and the target instruction is sent to the main control unit, so that the main control unit executes the operation corresponding to the predefined function and displays it on the user equipment.

可选的,所述方法还包括:Optionally, the method further includes:

若查询到所述被控设备处于非低功耗状态,则向所述主控单元发送目标指令,以使所述主控单元执行预定义功能对应的操作,并在所述用户设备上显示;If it is found that the controlled device is in a non-low power consumption state, a target instruction is sent to the main control unit, so that the main control unit performs an operation corresponding to a predefined function, and displays it on the user equipment;

其中,所述目标指令是由所述用户设备通过触发所述预定义功能生成的。The target instruction is generated by the user equipment by triggering the predefined function.

可选的,所述确定所述被控设备处于所述WiFi单元工作的心跳状态,包括:Optionally, the determining that the controlled device is in a heartbeat state in which the WiFi unit is working includes:

若在心跳周期内接收到所述WiFi单元发送的心跳包,则确定所述被控设备处于所述WiFi单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the WiFi unit is received within the heartbeat period, it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, and the communication link with the controlled device is maintained by means of MQTT.

可选的,若所述被控设备处于非低功耗状态,则所述心跳包由所述主控单元发送;所述方法还包括:Optionally, if the controlled device is in a non-low power consumption state, the heartbeat packet is sent by the main control unit; the method further includes:

若在心跳周期内接收到所述主控单元发送的心跳包,则确定所述被控设备处于所述主控单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the main control unit is received within the heartbeat cycle, it is determined that the controlled device is in the heartbeat state of the main control unit, and the communication link with the controlled device is maintained in the way of MQTT road.

第二方面,本申请实施例提供一种信息处理方法,应用于用户设备;所述方法包括:In a second aspect, an embodiment of the present application provides an information processing method, which is applied to a user equipment; the method includes:

向服务端发送查询请求,以使所述服务端查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;Send a query request to the server, so that the server can query the state of the controlled device, and the controlled device includes a WiFi unit and a main control unit;

若接收到所述服务端发送的用于表示所述被控设备处于低功耗状态的消息时,调用用于表示发送唤醒包的指令,并将所述用于表示发送唤醒包的指令发送至所述服务端,以使所述服务端将所述唤醒包发送至所述WiFi单元,用以确定是否唤醒所述被控设备的主控单元;If a message sent by the server to indicate that the controlled device is in a low power consumption state is received, the instruction for sending a wake-up packet is invoked, and the instruction for sending a wake-up packet is sent to the server, so that the server sends the wake-up packet to the WiFi unit, so as to determine whether to wake up the main control unit of the controlled device;

若接收到所述服务端发送的用于表示处于非低功耗状态的目标消息时,则向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是基于所述目标消息生成的,所述目标消息是由所述主控单元发送至所述服务端的。If a target message sent by the server to indicate that it is in a non-low power consumption state is received, a target instruction is sent to the main control unit to instruct the main control unit to execute the corresponding target function, and the The target instruction is generated based on the target message, and the target message is sent to the server by the main control unit.

第三方面,本申请实施例提供一种信息处理方法,应用于主控单元;所述方法包括:In a third aspect, an embodiment of the present application provides an information processing method, which is applied to a main control unit; the method includes:

将被控设备的状态上报至服务端,以使服务端根据用户端的查询请求,查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;reporting the state of the controlled device to the server, so that the server can query the state of the controlled device according to the query request of the client, where the controlled device includes a WiFi unit and a main control unit;

若接收到所述WiFi单元发送的唤醒指令,则执行上电操作并将用于表示处于非低功耗状态的目标消息发送至服务端,以使所述服务端将所述目标消息至用户设备;其中,所述唤醒指令是由所述用户设备向所述单元发送唤醒包,以使所述WiFi单元根据所述唤醒包确定的;所述唤醒包是由服务端查询到所述被控设备处于低功耗状态,且确定所述WiFi单元工作在心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至用户设备,以使用户设备确定发送的;If a wake-up instruction sent by the WiFi unit is received, a power-on operation is performed and a target message indicating that the WiFi unit is in a non-low power consumption state is sent to the server, so that the server sends the target message to the user equipment ; Wherein, the wake-up instruction is sent by the user equipment to the unit to make a wake-up packet, so that the WiFi unit is determined according to the wake-up packet; the wake-up packet is queried by the server to the controlled device In a low power consumption state, and when it is determined that the WiFi unit is working in a heartbeat state, a message indicating that the controlled device is in a low power consumption state is sent to the user equipment, so that the user equipment determines that it is sent;

若接收到所述用户设备发送的目标指令,则执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。If a target instruction sent by the user equipment is received, a corresponding target function is executed, and the target instruction is generated by the user equipment based on the target message.

第四方面,本申请实施例提供一种电子设备,包括:处理器,以及与所述处理器通信连接的存储器;In a fourth aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

所述存储器存储计算机执行指令;the memory stores computer-executable instructions;

所述处理器执行所述存储器存储的计算机执行指令,以实现如第一方面、第二方面以及第三方面任一项所述的方法。The processor executes computer-implemented instructions stored in the memory to implement the method of any of the first, second, and third aspects.

第五方面,本申请实施例提供一种被控设备,包括WiFi单元和主控单元;In a fifth aspect, an embodiment of the present application provides a controlled device, including a WiFi unit and a main control unit;

其中,所述主控单元用于执行如第三方面所述的信息处理方法。Wherein, the main control unit is configured to execute the information processing method according to the third aspect.

第六方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如第一方面、第二方面以及第三方面任一项所述的方法。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the first aspect, the second The method of any of the aspects and the third aspect.

第七方面,本申请实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现如第一方面、第二方面以及第三方面任一项所述的方法。In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspect, the second aspect, and the third aspect.

本申请实施例提供的信息处理方法、设备、存储介质及程序产品,该方法中,当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本、高产量的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In the information processing method, device, storage medium, and program product provided by the embodiments of the present application, in the method, when the user equipment triggers a certain function operation, the server queries the status of the electronic device, and if it is in a low power consumption state, the server The message of the low power consumption state is forwarded to the client, and the client calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device. After power-on, the message in the non-low power consumption state is sent to the server, which is forwarded to the client by the server, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control unit for execution. Or the client can execute the main control unit through a certain protocol, which can be realized through the ordinary WiFi module (ie WiFi unit), the main control unit and the server, which can ensure low cost and high output, and realize two-way security. The ability to live and wake up remotely is widely and effectively applied to electronic products that can be remotely controlled.

附图说明Description of drawings

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

图1为本申请实施例提供的信息处理方法的场景示意图;1 is a schematic diagram of a scenario of an information processing method provided by an embodiment of the present application;

图2为本申请实施例提供的信息处理方法的流程示意图;2 is a schematic flowchart of an information processing method provided by an embodiment of the present application;

图3为本申请另一实施例提供的信息处理方法的流程示意图;3 is a schematic flowchart of an information processing method provided by another embodiment of the present application;

图4为本申请再一实施例提供的信息处理方法的流程示意图;4 is a schematic flowchart of an information processing method provided by still another embodiment of the present application;

图5为本申请实施例提供的信息处理装置的结构示意图;5 is a schematic structural diagram of an information processing apparatus provided by an embodiment of the present application;

图6为本申请再一实施例提供的信息处理装置的结构示意图;FIG. 6 is a schematic structural diagram of an information processing apparatus provided by still another embodiment of the present application;

图7为本申请又一实施例提供的信息处理装置的结构示意图;FIG. 7 is a schematic structural diagram of an information processing apparatus provided by another embodiment of the present application;

图8为本申请实施例提供的电子设备的硬件结构示意图。FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

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

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例还能够包括除了图示或描述的那些实例以外的其他顺序实例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to Describe a particular order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are also capable of including other sequential instances than those illustrated or described. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

目前,实现双向保活和远程唤醒需要WiFi模组支持MQTT协议且具备可编程能力。使用高端WiFi模组替换无法解决以下问题:1,价格高,增加硬件产品成本2,芯片产能低短时间无法弥补,市面上支持此能力的WiFi芯片相对较少,硬件厂商无法大面积推广3,使用Hi1131这类不支持MQTT协议和不具备编程能力的WiFi模组市场存量大,无法通过空中下载技术(Over-the-Air Technology,OTA)实现功能升级,即普通WiFi模组不支持MQTT协议和不具备编程能力,同时,无法通过空中下载技术(Over-the-Air Technology,OTA)实现功能升级。因此,双向保活和远程唤醒的WiFi模组目前使用的是高端WiFi模组,但是,高端WiFi模组成本高,产能低,无法大面积推广。故,现有技术中实现双向保活和远程唤醒的能力具有局限性,进而无法广泛地、有效地应用于可远程控制的电子产品。At present, the realization of two-way keep-alive and remote wake-up requires that the WiFi module supports the MQTT protocol and has programmability. Replacing high-end WiFi modules cannot solve the following problems: 1. High price and increased hardware product cost 2. Low chip production capacity cannot be compensated for in a short period of time. There are relatively few WiFi chips on the market that support this capability, and hardware manufacturers cannot promote it on a large scale. 3. There is a large market for WiFi modules that do not support the MQTT protocol and do not have programming capabilities such as Hi1131, and function upgrades cannot be achieved through Over-the-Air Technology (OTA), that is, ordinary WiFi modules do not support the MQTT protocol and There is no programming ability, and at the same time, function upgrades cannot be achieved through Over-the-Air Technology (OTA). Therefore, the two-way keep-alive and remote wake-up WiFi modules currently use high-end WiFi modules. However, high-end WiFi modules have high cost and low production capacity, and cannot be widely promoted. Therefore, the capability of realizing bidirectional keep-alive and remote wake-up in the prior art has limitations, and thus cannot be widely and effectively applied to electronic products that can be remotely controlled.

为了解决上述问题,本申请的发明构思为:对普通WiFi模组进行改造,将普通WiFi模组的WiFi单元只做收发包和唤醒,不做业务逻辑处理,即录制固定的非TLS加密的心跳包,WiFi单元做定时发送,保持心跳,并且,设定固定的唤醒指令,收到后唤醒主芯片,无需具有可编程能力,或只具备有限的编程、设置功能即可;普通WiFi模组的主控单元负责完成设备的音视频编解码功能,并具备可编程能力,即执行相应的功能。然后由服务端做存储和转发。因此,通过普通WiFi模组、主控以及服务端即可实现,能够保证低成本、高产量的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In order to solve the above-mentioned problems, the inventive concept of the present application is to transform the ordinary WiFi module, and the WiFi unit of the ordinary WiFi module is only used to send and receive packets and wake up, without business logic processing, that is, to record a fixed non-TLS encrypted heartbeat Packet, the WiFi unit will send it regularly, keep the heartbeat, and set a fixed wake-up command, wake up the main chip after receiving it, no need to have programmable ability, or only limited programming and setting functions; The main control unit is responsible for completing the audio and video encoding and decoding functions of the equipment, and has the ability to programmability, that is, to perform corresponding functions. Then it is stored and forwarded by the server. Therefore, it can be realized through ordinary WiFi modules, main control and server, which can realize the ability of two-way keep-alive and remote wake-up under the premise of ensuring low cost and high output, and then widely and effectively used in remote control. of electronic products.

图1为本申请实施例提供的信息处理方法的场景示意图。用户设备(比如手机、平板电脑等智能设备)中安装有可控设备的应用程序即APP,这里的可控设备可以是可视门铃、人脸/可视门锁等电池类消费电子产品,用户通过在APP上操作,触发某项功能(即预定义功能,比如观看门口直播的直播功能或回看某个时间段的门口视频的回看功能等)。FIG. 1 is a schematic diagram of a scenario of an information processing method provided by an embodiment of the present application. User devices (such as mobile phones, tablet computers and other smart devices) are installed with controllable device applications, namely APPs. The controllable devices here can be battery-based consumer electronic products such as video doorbells, face/video door locks, etc. By operating on the APP, trigger a certain function (that is, a predefined function, such as the live broadcast function of watching the live broadcast of the door or the review function of watching the video of the door in a certain period of time, etc.).

由于普通WiFi单元(即普通WiFi芯片)不具备可编程能力或业务逻辑处理能力,只负责收发包和唤醒主控,因此,用户在APP上点击某项功能时,先向服务端发送查询请求,只有可控设备处于非低功耗状态(即主控单元上电状态或在线状态)时,该功能的操作才会真正被触发,生成响应的指令发送给主控单元,此时,不经过WiFi单元,由主控单元执行该功能的操作。Because ordinary WiFi units (ie ordinary WiFi chips) do not have programmable capabilities or business logic processing capabilities, they are only responsible for sending and receiving packets and waking up the master. Therefore, when users click a function on the APP, they first send a query request to the server. Only when the controllable device is in a non-low power consumption state (that is, the main control unit is powered on or online), the operation of this function will be triggered, and the command to generate a response will be sent to the main control unit. At this time, without WiFi unit, the operation of this function is performed by the main control unit.

如果可控设备处于低功耗状态,则首先要确定可控设备是否在保活状态,即可控设备是否保持与服务端之间的链路,如果在心跳周期内收到过WiFi单元发送的心跳包(当主控单元在线时,心跳包是由主控发送的),说明可控设备在WiFi单元工作的心跳状态,即可控设备与服务端链路是通的状态,可控设备与服务端保持着通信。If the controllable device is in a low power consumption state, first determine whether the controllable device is in the keep-alive state, that is, whether the controllable device maintains the link with the server, and if it has received a message sent by the WiFi unit within the heartbeat cycle Heartbeat packet (when the main control unit is online, the heartbeat packet is sent by the main control), indicating the heartbeat state of the controllable device working in the WiFi unit, that is, the state that the link between the controllable device and the server is connected, and the controllable device and the server are connected. The server maintains the communication.

本实施例中低功耗原理为:被控设备由多块芯片组成:主控芯片和WiFi芯片,并且通过物理连接进行通信,常见的形式有USB。其中,主控芯片通常负责完成设备的音视频编解码功能,并具备可编程能力,设备消息上下行、视频等业务功能为了降低功耗会运行在主控芯片上。WiFi芯片负责TCP/IP协议栈功能,包含网络数据的收、发、封包、解包。但是低端WIFI芯片不具备可编程能力,或只具备有限的编程、设置功能。低功耗时,主控芯片直接掉电,只运行WiFi芯片来保持与服务端的心跳连接。当WiFi芯片接收到特定唤醒消息(比如唤醒包)后,将唤醒主控芯片,主控芯片启动完成后,即可恢复正常状态。The principle of low power consumption in this embodiment is that the controlled device is composed of multiple chips: a main control chip and a WiFi chip, and communicates through a physical connection, a common form being USB. Among them, the main control chip is usually responsible for completing the audio and video encoding and decoding functions of the device, and has programmable capabilities. The device message upstream and downstream, video and other business functions will run on the main control chip in order to reduce power consumption. The WiFi chip is responsible for the functions of the TCP/IP protocol stack, including receiving, sending, encapsulating, and unpacking network data. However, low-end WIFI chips do not have programmability, or only have limited programming and setting functions. When the power consumption is low, the main control chip is directly powered off, and only the WiFi chip is run to maintain the heartbeat connection with the server. When the WiFi chip receives a specific wake-up message (such as a wake-up packet), it will wake up the main control chip, and after the main control chip is started, it can return to a normal state.

然后由服务端将可控设备处于低功耗状态的消息发送给用户设备,用户设备接收到该消息后,调用发送唤醒包的接口,使得服务端将唤醒包发给WiFi单元,由WiFi单元与自身配置的固定包的信息进行比对(这里仅仅是字符比对,并不涉及业务逻辑处理,因此,WiFi单元可以不具备高端WiFi模组的能力),确定是不是唤醒包,如果确定是唤醒包,则WiFi单元唤醒主控单元,主控单元上电,在主控单元上电过程中,用户设备一直处于加载状态,同时,主控将处于非低功耗状态的消息发给服务端,由服务端发送用户设备,用户设备真正触发该项功能的操作,生成相应的指令发给主控单元执行。Then, the server sends the message that the controllable device is in a low power consumption state to the user equipment. After receiving the message, the user equipment calls the interface for sending the wake-up packet, so that the server sends the wake-up packet to the WiFi unit, and the WiFi unit communicates with the WiFi unit. Compare the information of the fixed package configured by yourself (here is only a character comparison, and does not involve business logic processing, so the WiFi unit may not have the capabilities of high-end WiFi modules), and determine whether it is a wake-up package. If it is determined to be a wake-up packet, the WiFi unit wakes up the main control unit, and the main control unit is powered on. During the power-on process of the main control unit, the user equipment is always in the loading state. The server sends the user equipment, and the user equipment actually triggers the operation of the function, generates corresponding instructions and sends them to the main control unit for execution.

其中,用户设备将相应的指令(即目标指令)发给主控单元的链路可以是两条,一条为用户设备把目标指令发给服务端,由服务端转发给主控单元(因为用户设备和服务端一直保持通信);另一条是用户设备通过某种协议(比如传输控制协议(TransmissionControl Protocol,TCP协议)),将目标指令发送给主控单元。There may be two links for the user equipment to send the corresponding instructions (ie target instructions) to the main control unit, one for the user equipment to send the target instructions to the server, and the server to forward them to the main control unit (because the user equipment Keep communicating with the server); the other is that the user equipment sends the target instruction to the main control unit through a certain protocol (such as Transmission Control Protocol (TCP)).

此外,当主控单元在线时,心跳包是由主控发送的,当主控单元掉电之前,首先会将自己的这个消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)链接断掉,断掉了以后设置WiFi单元建立这个MQTT的链接,在建立时将TLS加密去掉,即发送心跳包无需加密;其次,主控单元将自己那种固定的心跳包放到WiFi单元上,然后设定了心跳周期,即间隔多久发送一次;最后,对WiFi单元设置一个唤醒包,并设置在什么情况下收到这个唤醒包,最终退出完成掉电,当主控收到唤醒指令后,实现上电。In addition, when the main control unit is online, the heartbeat packet is sent by the main control. When the main control unit is powered off, it will first disconnect its own Message Queuing Telemetry Transport (MQTT) link. After that, set the WiFi unit to establish this MQTT link, and remove the TLS encryption during establishment, that is, send the heartbeat packet without encryption; secondly, the main control unit puts its own fixed heartbeat packet on the WiFi unit, and then sets the heartbeat Period, that is, how long to send at an interval; finally, set a wake-up packet for the WiFi unit, and set the conditions under which the wake-up packet is received, and finally exit to complete the power-off. When the master receives the wake-up command, it will power on.

其中,MQTT定义了一系列控制报文,包括PINGREQ:心跳请求、PINGRESP:心跳响应、PUBLISH:发布消息、SUBSCRIBE:订阅消息。MQTT定义了心跳包PINGREQ,设备(这里可以指可控设备)将该数据包(比如心跳包)按一定频率发送给云端(即服务端,比如物联网平台),请求云端确认链接是否有效。当云端收到PINGREQ后,会回复PINGRESP,通知设备已收到PINGREQ请求。设备接收到PINGRESP后,会确认当前链接是否有效。其中,PINGREQ/PINGRESP里不包含任何的可变参数。MQTT还提供了发布消息和订阅消息的机制:通过定义数据格式,设备、云、APP可以完成休眠状态同步、休眠指令下发等功能。Among them, MQTT defines a series of control packets, including PINGREQ: heartbeat request, PINGRESP: heartbeat response, PUBLISH: publish message, SUBSCRIBE: subscribe message. MQTT defines the heartbeat packet PINGREQ. The device (here can refer to the controllable device) sends the data packet (such as the heartbeat packet) to the cloud (ie the server, such as the Internet of Things platform) at a certain frequency, and requests the cloud to confirm whether the link is valid. When the cloud receives the PINGREQ, it will reply to PINGRESP to notify the device that the PINGREQ request has been received. After the device receives the PINGRESP, it will confirm whether the current link is valid. Among them, PINGREQ/PINGRESP does not contain any variable parameters. MQTT also provides a mechanism for publishing and subscribing messages: by defining the data format, devices, clouds, and APPs can complete functions such as sleep state synchronization and sleep command issuance.

传输层安全性协议(Transport Layer Security,TLS)为两个通信端建立可靠的加密通道。一般先使用非对称加密进行秘钥的交换。秘钥交换完成后,使用交换得到的秘钥、加密方式进行对称加密。其中,对称加密的特点是使用相同的原文-秘钥-加密方式,加密后的密文是恒定的,并且对密文使用相同的秘钥-加密方式进行解密,得到的原文也是一样的;非对称加密处于TLS建立链接的过程,实际信息通信使用的是对称加密。但TLS的对称加密过程中,会为实际数据增加sequence num,不断增加。因此相同源数据时,加密后的数据也不相同。Transport Layer Security (Transport Layer Security, TLS) establishes a reliable encrypted channel for two communication ends. Generally, asymmetric encryption is used to exchange keys. After the key exchange is completed, use the exchanged key and encryption method to perform symmetric encryption. Among them, the characteristic of symmetric encryption is that the same original text-key-encryption method is used, the encrypted ciphertext is constant, and the same key-encryption method is used to decrypt the ciphertext, and the obtained original text is also the same; Symmetric encryption is in the process of establishing a link with TLS, and symmetric encryption is used for actual information communication. However, during the symmetric encryption process of TLS, the sequence num will be added to the actual data, which will continue to increase. Therefore, when the source data is the same, the encrypted data is also different.

因此,本申请对普通WiFi模组进行改造,将普通WiFi模组的WiFi单元只做收发包和唤醒,不做业务逻辑处理,即录制固定的非TLS加密的心跳包,WiFi单元做定时发送,保持心跳,并且,设定固定的唤醒指令,收到后唤醒主控芯片(即主控单元),无需具有可编程能力,或只具备有限的编程、设置功能即可。通过改造可控设备的主控单元,实现状态上报给服务端,然后由服务端做存储和转发,同时,主控单元还负责完成可控设备的音视频编解码功能,并具备可编程能力,即执行相应的功能。区别于目前的高端WiFi模组,必须具有可编程能力,且支持MQTT协议和支持加密,并具有一定的存储能力,通过将高端WiFi模组具备的功能进行分解,即通过普通WiFi模组+服务端(这里的服务端是部署在云端的服务)即可实现,能够保证低成本、高产量的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。Therefore, in this application, the ordinary WiFi module is modified, and the WiFi unit of the ordinary WiFi module is only used to send and receive packets and wake up, without business logic processing, that is, to record a fixed non-TLS encrypted heartbeat packet, and the WiFi unit to send it regularly. Keep the heartbeat, and set a fixed wake-up command, wake up the main control chip (ie the main control unit) after receiving it, without the need for programmable capability, or only with limited programming and setting functions. By transforming the main control unit of the controllable device, the status is reported to the server, which is then stored and forwarded by the server. That is, the corresponding function is executed. Different from the current high-end WiFi modules, they must have programmable capabilities, support MQTT protocol and encryption, and have certain storage capabilities. By decomposing the functions of high-end WiFi modules, that is, through ordinary WiFi modules + services The server (the server here is the service deployed in the cloud) can be realized, and the ability of two-way keep-alive and remote wake-up can be realized under the premise of ensuring low cost and high output, and then it can be widely and effectively used in remote control. of electronic products.

下面以具体实施例对本申请的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present application will be described in detail below with specific examples. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

图2为本申请实施例提供的信息处理方法的流程示意图,本实施例的方法可以由服务端执行,这里的服务端可以为云端(即采用应用程序虚拟化技术的软件平台),比如服务器。如图2所示,本实施例的方法,可以包括:2 is a schematic flowchart of an information processing method provided by an embodiment of the present application. The method in this embodiment may be executed by a server, where the server may be a cloud (ie, a software platform using application virtualization technology), such as a server. As shown in FIG. 2, the method of this embodiment may include:

S201:接收用户设备发送的查询请求,用以查询被控设备的状态,所述被控设备包括WiFi单元和主控单元。S201: Receive a query request sent by a user equipment to query the state of a controlled device, where the controlled device includes a WiFi unit and a main control unit.

其中,这里的WiFi单元为支持TCP协议栈的WiFi模组。被控设备的状态包括低功耗状态、非低功耗状态。这里的低功耗状态用于表示被控设备中主控单元处于掉电状态,即当主控单元掉电或不在线,只有WiFi芯片带电,说明被控设备处于低功耗状态(以可视门锁为例,可视门锁300UA以下就是低功耗状态);当主控单元上电或在线,说明被控设备处于非低功耗状态。主控单元在掉电之前会将被控设备处于低功耗状态的消息上报给服务端,主控单元在上电后,会将被控设备处于非低功耗状态的消息上报给服务端,服务端对该被控设备的状态进行更新并存储。The WiFi unit here is a WiFi module supporting the TCP protocol stack. The state of the controlled device includes a low-power state and a non-low-power state. The low-power state here is used to indicate that the main control unit in the controlled device is in a power-down state, that is, when the main control unit is powered off or not online, only the WiFi chip is powered, indicating that the controlled device is in a low-power state (with visual Take a door lock as an example, the video door lock below 300UA is a low power consumption state); when the main control unit is powered on or online, it means that the controlled device is in a non-low power consumption state. Before the main control unit is powered off, it will report the message that the controlled device is in a low power consumption state to the server. After the main control unit is powered on, it will report the message that the controlled device is in a non-low power consumption state to the server. The server updates and stores the state of the controlled device.

本实施例中,用户设备上安装有远程操作或控制被控设备的APP,以观看门口直播的直播功能为例,当用户在APP上点击该直播功能时,APP(或用户设备)先向服务端查询设备是否处于低功耗状态。由于服务端存储有被控设备最近一次的状态,因此服务端直接从存储模块中查找即可。In this embodiment, an APP for remotely operating or controlling the controlled device is installed on the user equipment. Taking the live broadcast function of watching the live broadcast at the door as an example, when the user clicks the live broadcast function on the APP, the APP (or the user equipment) first sends the service The terminal queries whether the device is in a low power consumption state. Since the server stores the latest state of the controlled device, the server can directly look it up from the storage module.

S202、若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,则向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元。S202. If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, send a wake-up packet to the WiFi unit of the controlled device, so that all The WiFi unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet.

本实施例中,如果服务端查询到被控设备不处于低功耗状态,则触发观看直播操作,将这个观看直播的指令发给服务端,服务端接收到这个观看直播的指令后发给主控单元;如果服务端查询到被控单元处于低功耗状态,会将该低功耗状态的消息反馈给用户设备,用户设备调用一个唤醒主控的接口,服务端会发唤醒包发给WiFi单元。为了保证服务端能给WiFi单元发送唤醒包,需要确定被控设备处于所述WiFi单元工作的心跳状态,保证服务端与被控设备的链路是通的状态。In this embodiment, if the server finds that the controlled device is not in a low power consumption state, it triggers a live viewing operation, sends the live viewing instruction to the server, and the server receives the live viewing instruction and sends it to the host. control unit; if the server finds that the controlled unit is in a low power consumption state, it will feed back the message of the low power consumption state to the user equipment, the user equipment will call an interface to wake up the master, and the server will send a wakeup packet to the WiFi unit. In order to ensure that the server can send a wake-up packet to the WiFi unit, it is necessary to determine that the controlled device is in the heartbeat state of the WiFi unit, and to ensure that the link between the server and the controlled device is in a connected state.

由于WiFi单元不具有可编程能力或业务逻辑处理能力,所以当WiFi单元接收到唤醒包后,并无法解析该唤醒包,但是可以根据接收到的唤醒包与自身配置中的固定包进行字符比对,进而确定是否是唤醒指令,来唤醒主控单元。Since the WiFi unit does not have programmability or business logic processing capability, when the WiFi unit receives the wake-up packet, it cannot parse the wake-up packet, but it can perform character comparison between the received wake-up packet and the fixed packet in its own configuration. , and then determine whether it is a wake-up command to wake up the main control unit.

S203、若接收到所述主控单元发送的用于表示处于非低功耗状态的目标消息,则将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。S203. If a target message sent by the main control unit and used to indicate that it is in a non-low power consumption state is received, send the target message to the user equipment, so that the user equipment can send the main control unit to the main control unit. A target instruction is sent to instruct the main control unit to execute a corresponding target function, where the target instruction is generated by the user equipment based on the target message.

本实施例中,WiFi单元收到唤醒包后会执行唤醒主控的操作,主控上电初始化完成后会上报非低功耗状态,这个状态会有服务端发送给用户设备,用户设备收到状态后会再次触发观看直播操作(此时APP一直在loading),生成目标指令,并将该目标指令发送给主控单元,主控单元根据目标指令执行相应的目标功能,比如编解码视频等操作,然后在用户设备的界面上渲染出直播视频画面。In this embodiment, after receiving the wake-up packet, the WiFi unit will perform the operation of waking up the main control. After the main control is powered on and initialized, it will report a non-low power consumption state. This state will be sent to the user equipment by the server, and the user equipment will receive it. After the status, the watch live broadcast operation will be triggered again (the APP is always loading at this time), the target command will be generated, and the target command will be sent to the main control unit. The main control unit executes the corresponding target function according to the target command, such as encoding and decoding video operations. , and then render the live video image on the interface of the user equipment.

本申请提供的信息处理方法,当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本、高产量的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In the information processing method provided by the present application, when the user equipment triggers a certain function operation, the server queries the state of the electronic device, and if it is in a low power consumption state, the server forwards the message of the low power consumption state to the client, and the client The terminal calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device. After the main control unit is powered on, it sends a message that is in a non-low power consumption state To the server, the server forwards it to the client, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control unit for execution or the client sends it to the main control unit through a certain protocol to execute, It can be realized by ordinary WiFi module (ie WiFi unit), main control unit and server, which can realize the ability of two-way keep-alive and remote wake-up under the premise of ensuring low cost and high output, and then widely and effectively applied for electronic products that can be controlled remotely.

可选的,所述服务端存储有所述被控设备的状态,所述被控设备的状态包括低功耗状态或非低功耗状态。Optionally, the server stores the state of the controlled device, and the state of the controlled device includes a low power consumption state or a non-low power consumption state.

其中,所述若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,则向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元,可以通过以下步骤实现:Wherein, if it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, a wake-up packet is sent to the WiFi unit of the controlled device to To make the WiFi unit determine whether to wake up the main control unit of the controlled device according to the wake-up packet, the following steps can be implemented:

步骤a1、若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至所述用户设备,以使所述用户设备调用用于表示发送唤醒包的指令。Step a1: If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, a message will be used to indicate that the controlled device is in a low power consumption state Sent to the user equipment, so that the user equipment invokes an instruction for sending a wake-up packet.

步骤a2、若接收到所述用户设备发送的用于表示发送唤醒包的指令,则将所述唤醒包发送至所述WiFi单元,以使所述WiFi单元将所述唤醒包与预定义的消息包进行比对,当比对一致时确定唤醒所述被控设备的主控单元。Step a2: If an instruction for sending a wake-up packet sent by the user equipment is received, send the wake-up packet to the WiFi unit, so that the WiFi unit associates the wake-up packet with a predefined message. The packets are compared, and when the comparison is consistent, it is determined to wake up the main control unit of the controlled device.

本实施例中,服务端存储被控设备的状态,而不是由WiFi芯片存储,解决了WiFi芯片存储能力不足的问题。服务端查询存储的被控设备的状态,如果查询到存储的状态是被控设备处于低功耗状态,同时,服务端与被控设备保持着连接,则需要WiFi单元唤醒主控单元。In this embodiment, the server stores the state of the controlled device instead of the WiFi chip, which solves the problem of insufficient storage capacity of the WiFi chip. The server queries the stored state of the controlled device. If the stored state is that the controlled device is in a low power consumption state, and the server is connected to the controlled device, the WiFi unit is required to wake up the main control unit.

其中,服务端是否与被控设备保持着连接,可以通过心跳检测,比如,服务端在心跳周期内可以正常接收到WiFi单元发送的心跳包,则说明被控设备处于所述WiFi单元工作的心跳状态,服务端与被控设备保持着连接。Among them, whether the server is connected to the controlled device can be detected by heartbeat. For example, if the server can normally receive the heartbeat packet sent by the WiFi unit within the heartbeat cycle, it means that the controlled device is in the heartbeat of the WiFi unit. state, the server keeps a connection with the controlled device.

具体地,首先服务端将该状态发送至用户设备,当用户设备得知被控设备处于低功耗状态时,需要调用发送唤醒包的指令或接口,然后发送给服务端,通过服务端将唤醒包或唤醒指令转发给WiFi单元,然后WiFi单元经过与配置的唤醒包(即预定义的消息包)进行比对,当比对一致时,确定是唤醒包,则唤醒主控单元,如果不是唤醒包,则不做任何操作。Specifically, the server first sends the status to the user equipment. When the user equipment knows that the controlled device is in a low power consumption state, it needs to call the instruction or interface for sending a wake-up packet, and then send it to the server, and the server will wake up the device. The packet or wake-up command is forwarded to the WiFi unit, and then the WiFi unit is compared with the configured wake-up packet (ie, the predefined message packet). When the comparison is consistent, it is determined to be a wake-up packet, and the main control unit is woken up. package, do nothing.

其中,WiFi芯片(即WiFi单元)具备简单的字符比对功能,如果接收的数据(即接收的唤醒包)与设置需要唤醒的数据(即预定义的唤醒包)相同时,可触发主控芯片(即主控单元)唤醒。由于完整MQTT数据包中的部分数据是不断变化的(如TCP包里的sequence num),因此进行全数据包的比对是不可行的。WiFi芯片提供了只对应用层数据对比的API。因此只需要定义恒定的MQTT协议的唤醒数据,并设置给WiFi即可实现唤醒。Among them, the WiFi chip (that is, the WiFi unit) has a simple character comparison function. If the received data (that is, the received wake-up packet) is the same as the data that needs to be woken up (that is, the predefined wake-up packet), the main control chip can be triggered. (ie the main control unit) wakes up. Since part of the data in the complete MQTT packet is constantly changing (such as the sequence num in the TCP packet), it is not feasible to compare the entire packet. The WiFi chip provides an API that only compares application layer data. Therefore, it is only necessary to define the wake-up data of the constant MQTT protocol and set it to WiFi to achieve wake-up.

可选的,所述将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,包括:Optionally, the sending the target message to the user equipment, so that the user equipment sends a target instruction to the main control unit, so as to instruct the main control unit to execute the corresponding target function, including:

步骤b1、将所述目标消息发送至所述用户设备,以使所述用户设备接收到所述目标消息时触发预定义功能,生成目标指令。Step b1: Send the target message to the user equipment, so that when the user equipment receives the target message, a predefined function is triggered to generate a target instruction.

步骤b2、接收所述用户设备发送的目标指令,并将所述目标指令发送至所述主控单元,以使所述主控单元执行所述预定义功能对应的操作,并在所述用户设备上显示。Step b2: Receive the target instruction sent by the user equipment, and send the target instruction to the main control unit, so that the main control unit executes the operation corresponding to the predefined function, and sends the target instruction to the user equipment. displayed above.

本实施例中,如果主控被唤醒,则开始上电,并将用于表示处于非低功耗状态的目标消息发送给服务端,由服务端转发给用户设备,当用户设备接收到用于表示处于非低功耗状态的目标消息时,则再次触发功能操作,生成控制指令(即目标指令),然后将该目标指令发送给主控单元,主控单元执行相应的功能。比如,触发的是直播功能,则主控单元开始执行直播操作:开启摄像头拍摄当前位置的视频画面并呈现在用户设备上。In this embodiment, if the master is woken up, it starts to power on, and sends a target message indicating that it is in a non-low power consumption state to the server, and the server forwards it to the user equipment. When the target message indicates that it is in a non-low power consumption state, the function operation is triggered again to generate a control command (ie, target command), and then send the target command to the main control unit, and the main control unit executes the corresponding function. For example, if the live broadcast function is triggered, the main control unit starts to perform the live broadcast operation: turn on the camera to capture a video image of the current position and present it on the user equipment.

具体地,如果主控上电,会上报自身状态给服务端,由服务端通知给客户端,然后由用户设备生成控制指令发送给主控单元去执行,这里用户设备发送指令给主控可以通过两种链路,一种是由服务端发送指令给主控单元,另一种是通过TCP协议发送,不使用服务端。Specifically, if the main control is powered on, it will report its own status to the server, the server will notify the client, and then the user equipment will generate a control command and send it to the main control unit for execution. There are two kinds of links, one is that the server sends instructions to the main control unit, and the other is sent through the TCP protocol without using the server.

可选的,所述方法还可以通过以下步骤实现:Optionally, the method can also be implemented by the following steps:

若查询到所述被控设备处于非低功耗状态,则向所述主控单元发送目标指令,以使所述主控单元执行预定义功能对应的操作,并在所述用户设备上显示。If it is found that the controlled device is in a non-low power consumption state, a target instruction is sent to the main control unit, so that the main control unit executes an operation corresponding to a predefined function and displays it on the user equipment.

其中,所述目标指令是由所述用户设备通过触发所述预定义功能生成的。The target instruction is generated by the user equipment by triggering the predefined function.

本实施例中,如果服务端查询存储的被控设备的状态为非低功耗状态,说明主控单元在线或带电工作,由于服务端与用户设备一直是通信状态,则无需服务端再去向用户设备上报被控设备处于非低功耗状态的目标消息,用户设备即可触发功能操作,生成目标指令,发送给主控单元,使得主控单元接收到目标指令后执行相应的功能。比如,触发的是直播功能,则主控单元开始执行直播操作:开启摄像头拍摄当前位置的视频画面并呈现在用户设备上。In this embodiment, if the state of the controlled device queried and stored by the server is a non-low power consumption state, it means that the main control unit is online or working with power on. Since the server and the user equipment are always in a communication state, the server does not need to go to the user again The device reports the target message that the controlled device is in a non-low power consumption state, and the user equipment can trigger the function operation, generate the target command, and send it to the main control unit, so that the main control unit executes the corresponding function after receiving the target command. For example, if the live broadcast function is triggered, the main control unit starts to perform the live broadcast operation: turn on the camera to capture a video image of the current position and present it on the user equipment.

可选的,所述确定所述被控设备处于所述WiFi单元工作的心跳状态,可以通过以下步骤实现:Optionally, the determining that the controlled device is in a heartbeat state in which the WiFi unit is working may be implemented by the following steps:

若在心跳周期内接收到所述WiFi单元发送的心跳包,则确定所述被控设备处于所述WiFi单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the WiFi unit is received within the heartbeat period, it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, and the communication link with the controlled device is maintained by means of MQTT.

本实施例中,当主控单元在线时,心跳包是由主控发送的,当主控单元掉电之前,首先会将自己的这个消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)链接断掉,断掉了以后设置WiFi单元建立这个MQTT的链接,在建立时将TLS加密去掉,即发送心跳包无需加密;其次,主控单元将自己那种固定的心跳包放到WiFi单元上,然后设定了心跳周期,即间隔多久发送一次;最后,对WiFi单元设置一个唤醒包,并设置在什么情况下收到这个唤醒包,最终退出完成掉电,当主控收到唤醒指令后,实现上电。In this embodiment, when the main control unit is online, the heartbeat packet is sent by the main control. Before the main control unit is powered off, it first disconnects its own Message Queuing Telemetry Transport (MQTT) link , after the disconnection, set the WiFi unit to establish the MQTT link, and remove the TLS encryption during establishment, that is, no encryption is required to send the heartbeat packet; secondly, the main control unit puts its own fixed heartbeat packet on the WiFi unit, and then set The heartbeat cycle is determined, that is, how often is the interval sent; finally, set a wake-up packet for the WiFi unit, and set the conditions under which this wake-up packet is received, and finally exit to complete the power-down. When the master receives the wake-up command, the above Electricity.

具体地,如果由WiFi单元发送心跳包,说明主控是掉电状态,即设备处于低功耗状态也就是WiFi工作状态,并且通过发送心跳包告诉服务端要以MQTT的方式保持与所述被控设备的通信链路。即如果是WiFi单元发送的心跳包,则会通知服务端所述被控设备处于所述WiFi单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。Specifically, if the heartbeat packet is sent by the WiFi unit, it means that the main control is in a power-down state, that is, the device is in a low-power state, that is, the WiFi working state, and the server is told to keep the connection with the host by sending a heartbeat packet by means of MQTT. The communication link of the control device. That is, if it is a heartbeat packet sent by the WiFi unit, the server will be notified that the controlled device is in the heartbeat state of the WiFi unit, and the communication link with the controlled device is maintained by means of MQTT.

可选的,若所述被控设备处于非低功耗状态,则所述心跳包由所述主控单元发送;所述方法还可以通过以下步骤实现:Optionally, if the controlled device is in a non-low power consumption state, the heartbeat packet is sent by the main control unit; the method can also be implemented by the following steps:

若在心跳周期内接收到所述主控单元发送的心跳包,则确定所述被控设备处于所述主控单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the main control unit is received within the heartbeat cycle, it is determined that the controlled device is in the heartbeat state of the main control unit, and the communication link with the controlled device is maintained in the way of MQTT road.

本实施例中,被控设备在非低功耗状态下时,由主控发心跳包给服务端,等待接收用户设备的操作指示。In this embodiment, when the controlled device is in a non-low power consumption state, the master sends a heartbeat packet to the server, and waits to receive an operation instruction from the user equipment.

其中,为了支持TCP协议,需要伪造MQTT数据,主控芯片必须要将TCP/IP协议栈的详细信息获取到并设置给WiFi芯片。具体地,为了支持TCP协议,MQTT对TCP应用层做了修改,ping(设备)-pong(云端)-ack(设备)。即获取到当前MQTT的所有协议信息后,将此类信息设置给WiFi。设置完成后,WiFi可以自行发送MQTT数据包。Among them, in order to support the TCP protocol, it is necessary to forge MQTT data, and the main control chip must obtain and set the detailed information of the TCP/IP protocol stack to the WiFi chip. Specifically, in order to support the TCP protocol, MQTT has modified the TCP application layer, ping (device)-pong (cloud)-ack (device). That is, after obtaining all the protocol information of the current MQTT, set such information to WiFi. After the setup is complete, WiFi can send MQTT packets by itself.

应用场景下,在云端对设备下发指令,云端收到用户的控制指令后为了保障设备能收到指令,需要设备网络确认(acknowledge,ask)后才会下发指令给设备。TCP只是简单的request-response,不能保证云端下发到设备指令的成功率。In the application scenario, the cloud sends commands to the device. After the cloud receives the user's control command, in order to ensure that the device can receive the command, the device network acknowledgement (ask) is required before the command is sent to the device. TCP is just a simple request-response, and cannot guarantee the success rate of commands sent from the cloud to the device.

保活时不能使用MQTT的ping-pong-ack的模式,因为TCP在收到pong后无法回复ack,保活的方式采用发送固定消息包(比如心跳包),发送频率与心跳间隔一致。物联网服务能保证发送消息包的设备是在线状态(由于无法保证服务下发指令的成功率,低功耗状态时不接收服务端指令)。如果是主控单元发送的心跳包,则会通知服务端所述被控设备处于所述主控单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。The ping-pong-ack mode of MQTT cannot be used during keep-alive, because TCP cannot reply ack after receiving pong. The keep-alive method is to send fixed message packets (such as heartbeat packets), and the sending frequency is consistent with the heartbeat interval. The IoT service can ensure that the device that sends the message packet is in an online state (because the success rate of the command issued by the service cannot be guaranteed, and the server command is not received in the low-power state). If it is a heartbeat packet sent by the main control unit, the server will be notified that the controlled device is in the heartbeat state of the main control unit, and the communication link with the controlled device is maintained by means of MQTT.

在实际应用中,WiFi芯片只做保活和唤醒。录制固定的非TLS加密的心跳包,WiFi芯片做定时发送。设定固定的唤醒指令,收到后唤醒主芯片。保活时不能使用MQTT ping-pong-ack的模式,因为TCP在收到pong后无法回复ack;保活的方式采用发送固定消息包,发送频率与心跳间隔一致,并通知服务端以MQTT的方式保持与所述被控设备的通信链路。物联网服务能保证发送消息包的设备是在线状态(由于无法保证服务下发指令的成功率,低功耗状态时不接收服务端指令)。设备会在低功耗、在线两种状态下进行切换。云端保存设备状态信息供安装有APP的用户设备查询,区分不同状态下的功能。设备低功耗状态下属性设置保存在云端(支持APP查询),设备的主控芯片上线时进行更新。In practical applications, the WiFi chip only does keep-alive and wake-up. Record fixed non-TLS encrypted heartbeat packets, and the WiFi chip will send them regularly. Set a fixed wake-up command, wake up the main chip after receiving it. The MQTT ping-pong-ack mode cannot be used during keep-alive, because TCP cannot reply ack after receiving pong; the keep-alive method is to send fixed message packets, the sending frequency is consistent with the heartbeat interval, and notify the server to use MQTT Maintain a communication link with the controlled device. The IoT service can ensure that the device that sends the message packet is in an online state (because the success rate of the command issued by the service cannot be guaranteed, and the server command is not received in the low-power state). The device will switch between two states of low power consumption and online. The cloud saves the device state information for query by the user device with the APP installed, and distinguishes the functions in different states. In the low-power state of the device, the property settings are saved in the cloud (supports APP query), and the device's main control chip is updated when it goes online.

因此,端云一体,设备端只需要发送指令,协议转换和编程由云端完成。基础工作单元由WiFi模组变成了WiFi模组+云端,能力更强,价格更低,使用性更为广泛。Therefore, the device and cloud are integrated, and the device only needs to send instructions, and the protocol conversion and programming are completed by the cloud. The basic work unit has changed from a WiFi module to a WiFi module + cloud, with stronger capabilities, lower prices, and wider usability.

参见图3所示,图3为本申请另一实施例提供的信息处理方法的流程示意图,本实施例的方法可以由用户设备执行,这里的用户设备可以为手机、平板等智能设备,该用户设备上安装有可控设备的APP。如图3所示,本实施例的方法,可以包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of an information processing method provided by another embodiment of the present application. The method in this embodiment may be executed by a user equipment, and the user equipment here may be a smart device such as a mobile phone and a tablet. An APP for the controllable device is installed on the device. As shown in FIG. 3, the method of this embodiment may include:

S301、向服务端发送查询请求,以使所述服务端查询被控设备的状态,所述被控设备包括WiFi单元和主控单元。S301. Send a query request to a server, so that the server can query the state of a controlled device, where the controlled device includes a WiFi unit and a main control unit.

本实施例中,用户设备上安装有远程操作或控制被控设备的APP,以观看门口直播的直播功能为例,当用户在APP上点击该直播功能时,APP(或用户设备)先向服务端查询设备是否处于低功耗状态。由于服务端存储有被控设备最近一次的状态,因此服务端直接从存储模块中查找即可。In this embodiment, an APP for remotely operating or controlling the controlled device is installed on the user equipment. Taking the live broadcast function of watching the live broadcast at the door as an example, when the user clicks the live broadcast function on the APP, the APP (or the user equipment) first sends the service The terminal queries whether the device is in a low power consumption state. Since the server stores the latest state of the controlled device, the server can directly look it up from the storage module.

S302、若接收到所述服务端发送的用于表示所述被控设备处于低功耗状态的消息时,调用用于表示发送唤醒包的指令,并将所述用于表示发送唤醒包的指令发送至所述服务端,以使所述服务端将所述唤醒包发送至所述WiFi单元,用以确定是否唤醒所述被控设备的主控单元。S302. When receiving a message sent by the server to indicate that the controlled device is in a low power consumption state, call an instruction to indicate sending a wake-up packet, and use the instruction to indicate that a wake-up packet is sent. Send to the server, so that the server sends the wake-up packet to the WiFi unit, so as to determine whether to wake up the main control unit of the controlled device.

本实施例中,如果服务端查询到被控设备不处于低功耗状态,则触发观看直播操作,将这个观看直播的指令发给服务端,服务端接收到这个观看直播的指令后发给主控单元;如果服务端查询到被控单元处于低功耗状态,会将该低功耗状态的消息反馈给用户设备,用户设备接收到用于表示所述被控设备处于低功耗状态的目标消息时,调用唤醒主控的接口或指令,使得服务端发唤醒包发给WiFi单元。为了保证服务端能给WiFi单元发送唤醒包,需要确定被控设备处于所述WiFi单元工作的心跳状态,保证服务端与被控设备的链路是通的状态。In this embodiment, if the server finds that the controlled device is not in a low power consumption state, it triggers a live viewing operation, sends the live viewing instruction to the server, and the server receives the live viewing instruction and sends it to the host. control unit; if the server finds that the controlled unit is in a low power consumption state, it will feed back the message of the low power consumption state to the user equipment, and the user equipment receives a target indicating that the controlled device is in a low power consumption state When the message is received, the interface or command of the wake-up master is called, so that the server sends a wake-up packet to the WiFi unit. In order to ensure that the server can send a wake-up packet to the WiFi unit, it is necessary to determine that the controlled device is in the heartbeat state of the WiFi unit, and to ensure that the link between the server and the controlled device is in a connected state.

由于WiFi单元不具有可编程能力或业务逻辑处理能力,所以当WiFi单元接收到唤醒包后,并无法解析该唤醒包,但是可以根据接收到的唤醒包与自身配置中的固定包进行字符比对,进而确定是否是唤醒指令,来唤醒主控单元。Since the WiFi unit does not have programmability or business logic processing capability, when the WiFi unit receives the wake-up packet, it cannot parse the wake-up packet, but it can perform character comparison between the received wake-up packet and the fixed packet in its own configuration. , and then determine whether it is a wake-up command to wake up the main control unit.

S303、若接收到所述服务端发送的用于表示处于非低功耗状态的目标消息时,则向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是基于所述目标消息生成的,所述目标消息是由所述主控单元发送至所述服务端的。S303, if receiving a target message sent by the server to indicate that it is in a non-low power consumption state, send a target instruction to the main control unit to instruct the main control unit to execute the corresponding target function, The target instruction is generated based on the target message, and the target message is sent to the server by the main control unit.

本实施例中,WiFi单元收到唤醒包后会执行唤醒主控的操作,主控上电初始化完成后会上报非低功耗状态,这个状态会有服务端发送给用户设备,用户设备收到状态后会再次触发观看直播操作(此时APP一直在loading),生成目标指令,并将该目标指令发送给主控单元,主控单元根据目标指令执行相应的目标功能,比如编解码视频等操作,然后在用户设备的界面上渲染出直播视频画面。In this embodiment, after receiving the wake-up packet, the WiFi unit will perform the operation of waking up the main control. After the main control is powered on and initialized, it will report a non-low power consumption state. This state will be sent to the user equipment by the server, and the user equipment will receive it. After the status, the watch live broadcast operation will be triggered again (the APP is always loading at this time), the target command will be generated, and the target command will be sent to the main control unit. The main control unit executes the corresponding target function according to the target command, such as encoding and decoding video operations. , and then render the live video image on the interface of the user equipment.

本申请提供的信息处理方法,当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In the information processing method provided by the present application, when the user equipment triggers a certain function operation, the server queries the state of the electronic device, and if it is in a low power consumption state, the server forwards the message of the low power consumption state to the client, and the client The terminal calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device. After the main control unit is powered on, it sends a message that is in a non-low power consumption state To the server, the server forwards it to the client, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control unit for execution or the client sends it to the main control unit through a certain protocol to execute, It can be realized by ordinary WiFi module (ie WiFi unit), main control unit and server, which can realize the ability of two-way keep-alive and remote wake-up under the premise of ensuring low cost. Controlled electronics.

本申请实施例提供的方法,用户设备可以实现上述以服务端为执行主体时,用户设备所能执行的操作,其实现原理和技术效果类似,此处不再赘述。In the method provided by the embodiment of the present application, the user equipment can implement the above operations that can be performed by the user equipment when the server is the main body of execution, and the implementation principles and technical effects thereof are similar, and are not repeated here.

参见图4所示,图4为本申请再一实施例提供的信息处理方法的流程示意图,本实施例的方法可以由被控设备的主控单元执行,这里的被控设备可以为可视门铃、人脸/可视门锁等电池类消费电子产品,该被控设备包括WiFi单元和主控单元,WiFi单元和主控单元通过物理连接,比如USB。如图4所示,本实施例的方法,可以包括:Referring to FIG. 4, FIG. 4 is a schematic flowchart of an information processing method provided by another embodiment of the present application. The method of this embodiment may be executed by a main control unit of a controlled device, and the controlled device here may be a video doorbell , face/visual door locks and other battery-based consumer electronic products, the controlled device includes a WiFi unit and a main control unit, and the WiFi unit and the main control unit are physically connected, such as USB. As shown in FIG. 4 , the method of this embodiment may include:

S401、将被控设备的状态上报至服务端,以使服务端根据用户端的查询请求,查询被控设备的状态,所述被控设备包括WiFi单元和主控单元。S401. Report the state of the controlled device to the server, so that the server can query the state of the controlled device according to a query request of the client, where the controlled device includes a WiFi unit and a main control unit.

本实施例中,被控设备采用主从架构:WiFi芯片+主芯片(即主控芯片)。低功耗状态下主芯片关闭,WiFi与物联网平台(即服务端或云端)保持心跳,由于WiFi芯片能力不同,flash和内存大小有差异,因此,主控单元上电或掉电时,可以将被控设备的状态上报给云端,并在云端存储,以供云端查询,节约了WiFi芯片的flash和内存。In this embodiment, the controlled device adopts a master-slave architecture: WiFi chip + master chip (ie, master control chip). In the low-power state, the main chip is turned off, and the WiFi and the IoT platform (ie, the server or the cloud) keep the heartbeat. Due to the different capabilities of the WiFi chips, the flash and memory sizes are different. Therefore, when the main control unit is powered on or powered off, it can be Report the status of the controlled device to the cloud, and store it in the cloud for cloud query, saving the flash and memory of the WiFi chip.

S402、若接收到所述WiFi单元发送的唤醒指令,则执行上电操作并将用于表示处于非低功耗状态的目标消息发送至服务端,以使所述服务端将所述目标消息至用户设备;其中,所述唤醒指令是由所述用户设备向所述WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包确定的;所述唤醒包是由服务端查询到所述被控设备处于低功耗状态,且确定所述WiFi单元工作在心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至用户设备,以使用户设备确定发送的。S402. If a wake-up instruction sent by the WiFi unit is received, perform a power-on operation and send a target message indicating that it is in a non-low power consumption state to the server, so that the server sends the target message to the server. User equipment; wherein, the wake-up instruction is sent by the user equipment to the WiFi unit, so that the WiFi unit is determined according to the wake-up packet; the wake-up packet is queried by the server. When the controlled device is in a low power consumption state, and it is determined that the WiFi unit is working in a heartbeat state, a message indicating that the controlled device is in a low power consumption state is sent to the user equipment, so that the user equipment determines that it is sent.

本实施例中,如果服务端查询到被控设备不处于低功耗状态,则触发观看直播操作,将这个观看直播的指令发给服务端,服务端接收到这个观看直播的指令后发给主控单元;如果服务端查询到被控单元处于低功耗状态,会将该低功耗状态的消息反馈给用户设备,用户设备调用一个唤醒主控的接口,服务端会发唤醒包发给WiFi单元。为了保证服务端能给WiFi单元发送唤醒包,需要确定被控设备处于所述WiFi单元工作的心跳状态,保证服务端与被控设备的链路是通的状态。In this embodiment, if the server finds that the controlled device is not in a low power consumption state, it triggers a live viewing operation, sends the live viewing instruction to the server, and the server receives the live viewing instruction and sends it to the host. control unit; if the server finds that the controlled unit is in a low power consumption state, it will feed back the message of the low power consumption state to the user equipment, the user equipment will call an interface to wake up the master, and the server will send a wakeup packet to the WiFi unit. In order to ensure that the server can send a wake-up packet to the WiFi unit, it is necessary to determine that the controlled device is in the heartbeat state of the WiFi unit, and to ensure that the link between the server and the controlled device is in a connected state.

由于WiFi单元不具有可编程能力或业务逻辑处理能力,所以当WiFi单元接收到唤醒包后,并无法解析该唤醒包,但是可以根据接收到的唤醒包与自身配置中的固定包进行字符比对,进而确定是否是唤醒指令,来唤醒主控单元。Since the WiFi unit does not have programmability or business logic processing capability, when the WiFi unit receives the wake-up packet, it cannot parse the wake-up packet, but it can perform character comparison between the received wake-up packet and the fixed packet in its own configuration. , and then determine whether it is a wake-up command to wake up the main control unit.

其中,当WiFi单元收到唤醒包后会执行唤醒主控的操作,主控上电初始化完成后会上报非低功耗状态,这个状态会有服务端发送给用户设备,用户设备收到状态后会再次触发观看直播操作(此时APP一直在loading),生成目标指令,并将该目标指令发送给主控单元。Among them, when the WiFi unit receives the wake-up packet, it will perform the operation of waking up the main control. After the main control is powered on and initialized, it will report a non-low power consumption state. This state will be sent to the user equipment by the server. After the user equipment receives the state The live viewing operation will be triggered again (the APP is always loading at this time), the target command will be generated, and the target command will be sent to the main control unit.

S403、若接收到所述用户设备发送的目标指令,则执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。S403. If a target instruction sent by the user equipment is received, execute a corresponding target function, where the target instruction is generated by the user equipment based on the target message.

本实施例中,主控单元接收用户设备发送的目标指令,主控单元根据目标指令执行相应的目标功能,比如编解码视频等操作,然后在用户设备的界面上渲染出直播视频画面。In this embodiment, the main control unit receives the target instruction sent by the user equipment, the main control unit executes the corresponding target function according to the target instruction, such as encoding and decoding video operations, and then renders the live video image on the interface of the user equipment.

具体地,当主控单元在线时,心跳包是由主控发送的,当主控单元掉电之前,首先会将自己的这个消息队列遥测传输(Message Queuing Telemetry Transport,MQTT)链接断掉,断掉了以后设置WiFi单元建立这个MQTT的链接,在建立时将TLS加密去掉,即发送心跳包无需加密;其次,主控单元将自己那种固定的心跳包放到WiFi单元上,然后设定了心跳周期,即间隔多久发送一次;最后,对WiFi单元设置一个唤醒包,并设置在什么情况下收到这个唤醒包,最终退出完成掉电,当主控收到唤醒指令后,实现上电。Specifically, when the main control unit is online, the heartbeat packet is sent by the main control. When the main control unit is powered off, it first disconnects its own Message Queuing Telemetry Transport (MQTT) link. After it is dropped, set the WiFi unit to establish the MQTT link, and remove the TLS encryption during establishment, that is, no encryption is required to send the heartbeat packet; secondly, the main control unit puts its own fixed heartbeat packet on the WiFi unit, and then sets the Heartbeat cycle, that is, how long to send at an interval; finally, set a wake-up packet for the WiFi unit, and set the conditions under which this wake-up packet is received, and finally exit to complete the power-off. When the master receives the wake-up command, it will power on.

本申请提供的信息处理方法,当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In the information processing method provided by the present application, when the user equipment triggers a certain function operation, the server queries the state of the electronic device, and if it is in a low power consumption state, the server forwards the message of the low power consumption state to the client, and the client The terminal calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device. After the main control unit is powered on, it sends a message that is in a non-low power consumption state To the server, the server forwards it to the client, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control unit for execution or the client sends it to the main control unit through a certain protocol to execute, It can be realized by ordinary WiFi module (ie WiFi unit), main control unit and server, which can realize the ability of two-way keep-alive and remote wake-up under the premise of ensuring low cost. Controlled electronics.

本申请实施例提供的方法,主控单元以及被控设备可以实现上述以服务端或用户设备为执行主体时,主控单元以及被控设备所能执行的操作,其实现原理和技术效果类似,此处不再赘述。In the method provided by the embodiment of the present application, the main control unit and the controlled device can implement the above-mentioned operations that the main control unit and the controlled device can perform when the server or user equipment is the execution subject, and the implementation principles and technical effects thereof are similar. It will not be repeated here.

基于同样的思路,本申请实施例还提供了上述方法对应的装置,如图5所示,图5为本申请实施例提供的信息处理装置的结构示意图。该信息处理装置应用于服务端;信息处理装置可以包括:Based on the same idea, an embodiment of the present application also provides an apparatus corresponding to the above method, as shown in FIG. 5 , which is a schematic structural diagram of an information processing apparatus provided by an embodiment of the present application. The information processing apparatus is applied to the server; the information processing apparatus may include:

接收模块501,用于接收用户设备发送的查询请求,用以查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;A receivingmodule 501, configured to receive a query request sent by a user equipment, to query the state of a controlled device, where the controlled device includes a WiFi unit and a main control unit;

发送模块502,用于在查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元;The sendingmodule 502 is configured to send a wake-up packet to the WiFi unit of the controlled device when it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, so that the WiFi unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet;

处理模块503,用于在接收到所述主控单元发送的用于表示处于非低功耗状态的目标消息时,将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。Theprocessing module 503 is configured to send the target message to the user equipment when receiving the target message sent by the main control unit to indicate that it is in a non-low power consumption state, so that the user equipment can send the target message to the user equipment. The main control unit sends a target instruction to instruct the main control unit to execute a corresponding target function, and the target instruction is generated by the user equipment based on the target message.

本实施例中,通过设置接收模块501、发送模块502以及处理模块503,用于当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In this embodiment, by setting thereceiving module 501, the sendingmodule 502 and theprocessing module 503, when the user equipment triggers a certain function operation, the server inquires about the status of the electronic device, if it is in a low power consumption state, the server will The message of the low power consumption state is forwarded to the client, and the client calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device, on the main control unit After the power is turned on, the message in the non-low power consumption state is sent to the server, and the server forwards it to the client, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control unit to execute or The client executes the main control unit through a certain protocol, which can be realized by the ordinary WiFi module (ie WiFi unit), the main control unit and the server, which can realize the two-way keep-alive and remote wake-up under the premise of ensuring low cost. It can be widely and effectively applied to electronic products that can be remotely controlled.

可选的,所述服务端存储有所述被控设备的状态,所述被控设备的状态包括低功耗状态或非低功耗状态;发送模块,具体用于:Optionally, the server stores the state of the controlled device, and the state of the controlled device includes a low power consumption state or a non-low power consumption state; the sending module is specifically used for:

在查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至所述用户设备,以使所述用户设备调用用于表示发送唤醒包的指令;When it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, a message indicating that the controlled device is in a low power consumption state is sent to the controlled device. the user equipment, so that the user equipment invokes an instruction for sending a wake-up packet;

在接收到所述用户设备发送的用于表示发送唤醒包的指令时,将所述唤醒包发送至所述WiFi单元,以使所述WiFi单元将所述唤醒包与预定义的消息包进行比对,当比对一致时确定唤醒所述被控设备的主控单元。Sending the wake-up packet to the WiFi unit when receiving an instruction sent by the user equipment to indicate sending a wake-up packet, so that the WiFi unit compares the wake-up packet with a predefined message packet Yes, when the comparison is consistent, it is determined to wake up the main control unit of the controlled device.

可选的,处理模块,具体用于:Optional, processing module, specifically for:

将所述目标消息发送至所述用户设备,以使所述用户设备接收到所述目标消息时触发预定义功能,生成目标指令;sending the target message to the user equipment, so that when the user equipment receives the target message, a predefined function is triggered and a target instruction is generated;

接收所述用户设备发送的目标指令,并将所述目标指令发送至所述主控单元,以使所述主控单元执行所述预定义功能对应的操作,并在所述用户设备上显示。The target instruction sent by the user equipment is received, and the target instruction is sent to the main control unit, so that the main control unit executes the operation corresponding to the predefined function and displays it on the user equipment.

可选的,处理模块,还用于:Optionally, the processing module is also used to:

在查询到所述被控设备处于非低功耗状态,则向所述主控单元发送目标指令,以使所述主控单元执行预定义功能对应的操作,并在所述用户设备上显示;When it is found that the controlled device is in a non-low power consumption state, a target instruction is sent to the main control unit, so that the main control unit performs an operation corresponding to a predefined function, and displays it on the user equipment;

其中,所述目标指令是由所述用户设备通过触发所述预定义功能生成的。The target instruction is generated by the user equipment by triggering the predefined function.

可选的,发送模块,还具体用于:Optionally, the sending module is also specifically used for:

若在心跳周期内接收到所述WiFi单元发送的心跳包,则确定所述被控设备处于所述WiFi单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the WiFi unit is received within the heartbeat period, it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, and the communication link with the controlled device is maintained by means of MQTT.

可选的,若所述被控设备处于非低功耗状态,则所述心跳包由所述主控单元发送;处理模块,还用于:Optionally, if the controlled device is in a non-low power consumption state, the heartbeat packet is sent by the main control unit; the processing module is further configured to:

若在心跳周期内接收到所述主控单元发送的心跳包,则确定所述被控设备处于所述主控单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the main control unit is received within the heartbeat cycle, it is determined that the controlled device is in the heartbeat state of the main control unit, and the communication link with the controlled device is maintained in the way of MQTT road.

本申请实施例提供的装置,可以实现上述如图1-2所示的实施例的方法,其实现原理和技术效果类似,此处不再赘述。The apparatus provided by the embodiment of the present application can implement the method of the above-mentioned embodiment shown in FIGS. 1-2 , and the implementation principle and technical effect thereof are similar, and are not repeated here.

如图6所示,图6为本申请再一实施例提供的信息处理装置的结构示意图。该信息处理装置应用于用户设备;信息处理装置可以包括:As shown in FIG. 6 , FIG. 6 is a schematic structural diagram of an information processing apparatus provided by still another embodiment of the present application. The information processing apparatus is applied to user equipment; the information processing apparatus may include:

发送模块601,用于向服务端发送查询请求,以使所述服务端查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;A sendingmodule 601, configured to send a query request to a server, so that the server can query the state of a controlled device, where the controlled device includes a WiFi unit and a main control unit;

第一处理模块602,用于在接收到所述服务端发送的用于表示所述被控设备处于低功耗状态的消息时,调用用于表示发送唤醒包的指令,并将所述用于表示发送唤醒包的指令发送至所述服务端,以使所述服务端将所述唤醒包发送至所述WiFi单元,用以确定是否唤醒所述被控设备的主控单元;Thefirst processing module 602 is configured to, when receiving a message sent by the server to indicate that the controlled device is in a low power consumption state, invoke an instruction that indicates sending a wake-up packet, and use the message to indicate that the controlled device is in a low power consumption state. Sending an instruction to send a wake-up packet to the server, so that the server sends the wake-up packet to the WiFi unit to determine whether to wake up the main control unit of the controlled device;

第二处理模块603,用于在接收到所述服务端发送的用于表示处于非低功耗状态的目标消息时,向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是基于所述目标消息生成的,所述目标消息是由所述主控单元发送至所述服务端的。Thesecond processing module 603 is configured to send a target instruction to the main control unit to instruct the main control unit to execute a target message sent by the server to indicate that it is in a non-low power consumption state For the corresponding target function, the target instruction is generated based on the target message, and the target message is sent to the server by the main control unit.

本实施例中,通过设置发送模块601、第一处理模块602以及第二处理模块603,用于当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In this embodiment, by setting the sendingmodule 601, thefirst processing module 602 and thesecond processing module 603, when the user equipment triggers a certain function operation, the server inquires the status of the electronic device, if it is in a low power consumption state, Then the server forwards the message of the low power consumption state to the client, and the client calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device. After the main control unit is powered on, it sends a message that is in a non-low power consumption state to the server, which is forwarded to the client by the server, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control. The unit executes or the client sends the main control unit to execute through a certain protocol, which can be realized through the ordinary WiFi module (that is, the WiFi unit), the main control unit and the server, which can realize the two-way security under the premise of ensuring low cost. The ability to live and wake up remotely is widely and effectively applied to electronic products that can be remotely controlled.

本申请实施例提供的装置,可以实现上述如图1以及图3所示的实施例的方法,其实现原理和技术效果类似,此处不再赘述。The apparatus provided in this embodiment of the present application can implement the methods in the above-mentioned embodiments shown in FIG. 1 and FIG. 3 , and the implementation principles and technical effects thereof are similar, and details are not described herein again.

如图7所示,图7为本申请又一实施例提供的信息处理装置的结构示意图。该信息处理装置应用于被控设备的主控单元;信息处理装置可以包括:As shown in FIG. 7 , FIG. 7 is a schematic structural diagram of an information processing apparatus provided by another embodiment of the present application. The information processing apparatus is applied to the main control unit of the controlled device; the information processing apparatus may include:

发送模块701,用于将被控设备的状态上报至服务端,以使服务端根据用户端的查询请求,查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;The sendingmodule 701 is used to report the state of the controlled device to the server, so that the server can query the state of the controlled device according to the query request of the client, and the controlled device includes a WiFi unit and a main control unit;

第一处理模块702,用于在接收到所述WiFi单元发送的唤醒指令时,执行上电操作并将用于表示处于非低功耗状态的目标消息发送至服务端,以使所述服务端将所述目标消息至用户设备;其中,所述唤醒指令是由所述用户设备向所述WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包确定的;所述唤醒包是由服务端查询到所述被控设备处于低功耗状态,且确定所述WiFi单元工作在心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至用户设备,以使用户设备确定发送的;Thefirst processing module 702 is configured to, when receiving the wake-up instruction sent by the WiFi unit, perform a power-on operation and send a target message indicating that it is in a non-low power consumption state to the server, so that the server Send the target message to the user equipment; wherein, the wake-up instruction is sent by the user equipment to the WiFi unit, so that the WiFi unit determines according to the wake-up packet; the wake-up packet is determined by When the server finds that the controlled device is in a low power consumption state, and determines that the WiFi unit is working in a heartbeat state, it sends a message indicating that the controlled device is in a low power consumption state to the user equipment, so that The user equipment determines to send;

第二处理模块703,用于在接收到所述用户设备发送的目标指令时,执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。Thesecond processing module 703 is configured to execute a corresponding target function when receiving a target instruction sent by the user equipment, where the target instruction is generated by the user equipment based on the target message.

本实施例中,通过设置发送模块701、第一处理模块702以及第二处理模块703,用于当用户设备触发某种功能操作时,服务端查询电子设备的状态,如果处于低功耗状态,则服务端将低功耗状态的消息转发给客户端,由客户端调用唤醒包接口并通过服务端将唤醒包发送给电子设备的WiFi单元,然后由WiFi单元唤醒电子设备的主控单元,在主控单元上电后,将处于非低功耗状态的消息发送给服务端,由服务端转发给客户端,然后由客户端发送使用某种功能的指令给服务端,服务端转发给主控单元去执行或客户端通过某种协议给主控单元去执行,通过普通WiFi模组(即WiFi单元)、主控单元以及服务端即可实现,能够保证低成本的前提下,实现了双向保活和远程唤醒的能力,进而广泛地、有效地应用于可远程控制的电子产品。In this embodiment, by setting the sendingmodule 701, thefirst processing module 702 and thesecond processing module 703, when the user equipment triggers a certain function operation, the server inquires the status of the electronic device, if it is in a low power consumption state, Then the server forwards the message of the low power consumption state to the client, and the client calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the main control unit of the electronic device. After the main control unit is powered on, it sends a message that is in a non-low power consumption state to the server, which is forwarded to the client by the server, and then the client sends an instruction to use a certain function to the server, and the server forwards it to the main control. The unit executes or the client sends the main control unit to execute through a certain protocol, which can be realized through the ordinary WiFi module (that is, the WiFi unit), the main control unit and the server, which can realize the two-way security under the premise of ensuring low cost. The ability to live and wake up remotely is widely and effectively applied to electronic products that can be remotely controlled.

本申请实施例提供的装置,可以实现上述如图1以及图4所示的实施例的方法,其实现原理和技术效果类似,此处不再赘述。The apparatus provided in this embodiment of the present application can implement the methods in the above-mentioned embodiments shown in FIG. 1 and FIG. 4 , and the implementation principles and technical effects thereof are similar, and are not repeated here.

结合图1所示,本申请实施例提供了一种被控设备,包括WiFi单元和主控单元;With reference to FIG. 1 , an embodiment of the present application provides a controlled device, including a WiFi unit and a main control unit;

其中,所述主控单元用于执行如第三方面所述的方法。Wherein, the main control unit is configured to execute the method according to the third aspect.

具体地,所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元,若唤醒所述主控单元,所述主控单元将用于表示处于非低功耗状态的目标消息发送至服务端,以使所述服务端将所述目标消息至用户设备;Specifically, the WiFi unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet. sending the target message to the server, so that the server sends the target message to the user equipment;

若所述主控单元接收到所述用户设备发送的目标指令,则所述主控单元执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。If the main control unit receives the target instruction sent by the user equipment, the main control unit executes the corresponding target function, and the target instruction is generated by the user equipment based on the target message.

本申请实施例提供的被控设备,可以实现上述如图1-图4所示的实施例的方法,其实现原理和技术效果类似,此处不再赘述。The controlled device provided in this embodiment of the present application can implement the methods of the above-mentioned embodiments shown in FIG. 1 to FIG. 4 , and the implementation principles and technical effects thereof are similar, and details are not described herein again.

图8为本申请实施例提供的电子设备的硬件结构示意图。如图8所示,本实施例提供的设备800包括:处理器801,以及与所述处理器通信连接的存储器。其中,处理器801、存储器802通过总线803连接。FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application. As shown in FIG. 8 , the device 800 provided in this embodiment includes: aprocessor 801, and a memory communicatively connected to the processor. Theprocessor 801 and thememory 802 are connected through abus 803 .

在具体实现过程中,处理器801执行所述存储器802存储的计算机执行指令,使得处理器801执行上述方法实施例中的方法。In a specific implementation process, theprocessor 801 executes the computer-executed instructions stored in thememory 802, so that theprocessor 801 executes the methods in the foregoing method embodiments.

处理器801的具体实现过程可参见上述方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。For the specific implementation process of theprocessor 801, reference may be made to the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again in this embodiment.

在上述的图8所示的实施例中,应理解,处理器可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application SpecificIntegrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合发明所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the above-mentioned embodiment shown in FIG. 8, it should be understood that the processor may be a central processing unit (English: Central Processing Unit, referred to as: CPU), or other general-purpose processors, digital signal processors (English: Digital signal processor). Signal Processor, referred to as DSP), application specific integrated circuit (English: Application Specific Integrated Circuit, referred to as: ASIC) and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in conjunction with the invention can be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

存储器可能包含高速RAM存储器,也可能还包括非易失性存储NVM,例如至少一个磁盘存储器。The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory.

总线可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component Interconnect,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,本申请附图中的总线并不限定仅有一根总线或一种类型的总线。The bus may be an Industry Standard Architecture (Industry Standard Architecture, ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus, or the like. The bus can be divided into address bus, data bus, control bus and so on. For convenience of representation, the buses in the drawings of the present application are not limited to only one bus or one type of bus.

本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现上述方法实施例的信息处理方法。Embodiments of the present application further provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the information processing methods of the above method embodiments are implemented.

本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现如上所述的信息处理方法。Embodiments of the present application further provide a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned information processing method.

上述的计算机可读存储介质,上述可读存储介质可以是由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。可读存储介质可以是通用或专用计算机能够存取的任何可用介质。The above-mentioned computer-readable storage medium, the above-mentioned readable storage medium can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.

一种示例性的可读存储介质耦合至处理器,从而使处理器能够从该可读存储介质读取信息,且可向该可读存储介质写入信息。当然,可读存储介质也可以是处理器的组成部分。处理器和可读存储介质可以位于专用集成电路(Application Specific IntegratedCircuits,简称:ASIC)中。当然,处理器和可读存储介质也可以作为分立组件存在于设备中。An exemplary readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium may be located in application specific integrated circuits (Application Specific Integrated Circuits, ASIC for short). Of course, the processor and the readable storage medium may also exist in the device as discrete components.

本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by program instructions related to hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

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

Claims (12)

Translated fromChinese
1.一种信息处理方法,其特征在于,应用于服务端,所述方法包括:1. An information processing method, characterized in that, applied to a server, the method comprising:接收用户设备发送的查询请求,用以查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;Receive a query request sent by the user equipment to query the state of the controlled device, where the controlled device includes a WiFi unit and a main control unit;若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,则向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元;If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in the heartbeat state of the WiFi unit working, a wake-up packet is sent to the WiFi unit of the controlled device, so that the WiFi The unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet;若接收到所述主控单元发送的用于表示处于非低功耗状态的目标消息,则将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。If receiving a target message indicating that the main control unit is in a non-low power consumption state, send the target message to the user equipment, so that the user equipment sends the target to the main control unit an instruction to instruct the main control unit to execute a corresponding target function, and the target instruction is generated by the user equipment based on the target message.2.根据权利要求1所述的方法,其特征在于,所述服务端存储有所述被控设备的状态,所述被控设备的状态包括低功耗状态或非低功耗状态;2. The method according to claim 1, wherein the server stores the state of the controlled device, and the state of the controlled device includes a low power consumption state or a non-low power consumption state;所述若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,则向所述被控设备的WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包,确定是否唤醒所述被控设备的主控单元,包括:If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, send a wake-up packet to the WiFi unit of the controlled device, so that all The WiFi unit determines whether to wake up the main control unit of the controlled device according to the wake-up packet, including:若查询到所述被控设备处于低功耗状态且确定所述被控设备处于所述WiFi单元工作的心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至所述用户设备,以使所述用户设备调用用于表示发送唤醒包的指令;If it is queried that the controlled device is in a low power consumption state and it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, a message indicating that the controlled device is in a low power consumption state is sent to the controlled device. the user equipment, so that the user equipment invokes an instruction for sending a wake-up packet;若接收到所述用户设备发送的用于表示发送唤醒包的指令,则将所述唤醒包发送至所述WiFi单元,以使所述WiFi单元将所述唤醒包与预定义的消息包进行比对,当比对一致时确定唤醒所述被控设备的主控单元。If an instruction for sending a wake-up packet sent by the user equipment is received, the wake-up packet is sent to the WiFi unit, so that the WiFi unit compares the wake-up packet with a predefined message packet Yes, when the comparison is consistent, it is determined to wake up the main control unit of the controlled device.3.根据权利要求1或2所述的方法,其特征在于,所述将所述目标消息发送至所述用户设备,以使所述用户设备向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,包括:3. The method according to claim 1 or 2, wherein the sending the target message to the user equipment causes the user equipment to send a target instruction to the main control unit to indicate The main control unit performs corresponding target functions, including:将所述目标消息发送至所述用户设备,以使所述用户设备接收到所述目标消息时触发预定义功能,生成目标指令;sending the target message to the user equipment, so that when the user equipment receives the target message, a predefined function is triggered and a target instruction is generated;接收所述用户设备发送的目标指令,并将所述目标指令发送至所述主控单元,以使所述主控单元执行所述预定义功能对应的操作,并在所述用户设备上显示。The target instruction sent by the user equipment is received, and the target instruction is sent to the main control unit, so that the main control unit executes the operation corresponding to the predefined function and displays it on the user equipment.4.根据权利要求1或2所述的方法,其特征在于,所述方法还包括:4. The method according to claim 1 or 2, wherein the method further comprises:若查询到所述被控设备处于非低功耗状态,则向所述主控单元发送目标指令,以使所述主控单元执行预定义功能对应的操作,并在所述用户设备上显示;If it is found that the controlled device is in a non-low power consumption state, a target instruction is sent to the main control unit, so that the main control unit performs an operation corresponding to a predefined function, and displays it on the user equipment;其中,所述目标指令是由所述用户设备通过触发所述预定义功能生成的。The target instruction is generated by the user equipment by triggering the predefined function.5.根据权利要求1或2所述的方法,其特征在于,所述确定所述被控设备处于所述WiFi单元工作的心跳状态,包括:5. The method according to claim 1 or 2, wherein the determining that the controlled device is in a heartbeat state in which the WiFi unit is working comprises:若在心跳周期内接收到所述WiFi单元发送的心跳包,则确定所述被控设备处于所述WiFi单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the WiFi unit is received within the heartbeat period, it is determined that the controlled device is in a heartbeat state in which the WiFi unit is working, and the communication link with the controlled device is maintained by means of MQTT.6.根据权利要求5所述的方法,其特征在于,若所述被控设备处于非低功耗状态,则所述心跳包由所述主控单元发送;所述方法还包括:6. The method according to claim 5, wherein if the controlled device is in a non-low power consumption state, the heartbeat packet is sent by the main control unit; the method further comprises:若在心跳周期内接收到所述主控单元发送的心跳包,则确定所述被控设备处于所述主控单元工作的心跳状态,并且以MQTT的方式保持与所述被控设备的通信链路。If the heartbeat packet sent by the main control unit is received within the heartbeat cycle, it is determined that the controlled device is in the heartbeat state of the main control unit, and the communication link with the controlled device is maintained in the way of MQTT road.7.一种信息处理方法,其特征在于,应用于用户设备;所述方法包括:7. An information processing method, characterized in that it is applied to user equipment; the method comprises:向服务端发送查询请求,以使所述服务端查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;Send a query request to the server, so that the server can query the state of the controlled device, and the controlled device includes a WiFi unit and a main control unit;若接收到所述服务端发送的用于表示所述被控设备处于低功耗状态的消息时,调用用于表示发送唤醒包的指令,并将所述用于表示发送唤醒包的指令发送至所述服务端,以使所述服务端将所述唤醒包发送至所述WiFi单元,用以确定是否唤醒所述被控设备的主控单元;If a message sent by the server to indicate that the controlled device is in a low power consumption state is received, the instruction for sending a wake-up packet is invoked, and the instruction for sending a wake-up packet is sent to the server, so that the server sends the wake-up packet to the WiFi unit, so as to determine whether to wake up the main control unit of the controlled device;若接收到所述服务端发送的用于表示处于非低功耗状态的目标消息时,则向所述主控单元发送目标指令,用以指示所述主控单元执行相应的目标功能,所述目标指令是基于所述目标消息生成的,所述目标消息是由所述主控单元发送至所述服务端的。If a target message sent by the server to indicate that it is in a non-low power consumption state is received, a target instruction is sent to the main control unit to instruct the main control unit to execute the corresponding target function, and the The target instruction is generated based on the target message, and the target message is sent to the server by the main control unit.8.一种信息处理方法,其特征在于,应用于主控单元;所述方法包括:8. An information processing method, characterized in that it is applied to a main control unit; the method comprises:将被控设备的状态上报至服务端,以使服务端根据用户端的查询请求,查询被控设备的状态,所述被控设备包括WiFi单元和主控单元;reporting the state of the controlled device to the server, so that the server can query the state of the controlled device according to the query request of the client, where the controlled device includes a WiFi unit and a main control unit;若接收到所述WiFi单元发送的唤醒指令,则执行上电操作并将用于表示处于非低功耗状态的目标消息发送至服务端,以使所述服务端将所述目标消息至用户设备;其中,所述唤醒指令是由所述用户设备向所述WiFi单元发送唤醒包,以使所述WiFi单元根据所述唤醒包确定的;所述唤醒包是由服务端查询到所述被控设备处于低功耗状态,且确定所述WiFi单元工作在心跳状态时,将用于表示所述被控设备处于低功耗状态的消息发送至用户设备,以使用户设备确定发送的;If a wake-up instruction sent by the WiFi unit is received, a power-on operation is performed and a target message indicating that the WiFi unit is in a non-low power consumption state is sent to the server, so that the server sends the target message to the user equipment ; Wherein, the wake-up instruction is sent by the user equipment to the WiFi unit, so that the WiFi unit is determined according to the wake-up packet; the wake-up packet is queried by the server to the controlled The device is in a low power consumption state, and when it is determined that the WiFi unit is working in a heartbeat state, a message indicating that the controlled device is in a low power consumption state is sent to the user equipment, so that the user equipment determines that it is sent;若接收到所述用户设备发送的目标指令,则执行相应的目标功能,所述目标指令是由所述用户设备基于所述目标消息生成的。If a target instruction sent by the user equipment is received, a corresponding target function is executed, and the target instruction is generated by the user equipment based on the target message.9.一种电子设备,其特征在于,包括:处理器,以及与所述处理器通信连接的存储器;9. An electronic device, comprising: a processor, and a memory communicatively connected to the processor;所述存储器存储计算机执行指令;the memory stores computer-executable instructions;所述处理器执行所述存储器存储的计算机执行指令,以实现如权利要求1-8中任一项所述的信息处理方法。The processor executes the computer-executable instructions stored in the memory to implement the information processing method of any one of claims 1-8.10.一种被控设备,其特征在于,包括WiFi单元和主控单元;10. A controlled device, comprising a WiFi unit and a main control unit;其中,所述主控单元用于执行如权利要求8所述的信息处理方法。Wherein, the main control unit is configured to execute the information processing method according to claim 8 .11.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,当处理器执行所述计算机执行指令时,实现如权利要求1至8任一项所述的信息处理方法。11. A computer-readable storage medium, characterized in that, a computer program is stored on the computer-readable storage medium, and when a processor executes the computer-executed instruction, the implementation of any one of claims 1 to 8 is realized. information processing method.12.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时,实现权利要求1-8任一项所述的信息处理方法。12. A computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, the information processing method according to any one of claims 1-8 is implemented.
CN202210558025.8A2022-05-192022-05-19 Information processing method, apparatus, storage medium and program productPendingCN114980191A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN202210558025.8ACN114980191A (en)2022-05-192022-05-19 Information processing method, apparatus, storage medium and program product
PCT/CN2023/094368WO2023221948A1 (en)2022-05-192023-05-15Information processing method, and device, storage medium and program product

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210558025.8ACN114980191A (en)2022-05-192022-05-19 Information processing method, apparatus, storage medium and program product

Publications (1)

Publication NumberPublication Date
CN114980191Atrue CN114980191A (en)2022-08-30

Family

ID=82984542

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210558025.8APendingCN114980191A (en)2022-05-192022-05-19 Information processing method, apparatus, storage medium and program product

Country Status (2)

CountryLink
CN (1)CN114980191A (en)
WO (1)WO2023221948A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2023221948A1 (en)*2022-05-192023-11-23阿里云计算有限公司Information processing method, and device, storage medium and program product
CN117389789A (en)*2023-12-082024-01-12四川恒湾科技有限公司Power-down information storage and reporting method and system for O-RU equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118072425B (en)*2024-04-172024-06-21苏州琨山通用锁具有限公司Redis-based intelligent lockset high-reliability communication method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140265359A1 (en)*2013-03-152014-09-18August Home, Inc.Intelligent Door Lock System
CN106714281A (en)*2015-07-212017-05-24阿里巴巴集团控股有限公司Equipment wake-up method, system and equipment
CN107580198A (en)*2017-08-232018-01-12深圳市高斯贝尔家居智能电子有限公司A kind of low power consumption remote wakes up web camera and video monitoring system
CN107995231A (en)*2016-10-262018-05-04北京视联动力国际信息技术有限公司A kind of method and apparatus of remote control equipment
US20180322405A1 (en)*2013-03-142018-11-08Google LlcSmart-home environment networking systems and methods
CN109451354A (en)*2018-11-122019-03-08青岛海信电器股份有限公司A kind of method and terminal waking up terminal
CN111355753A (en)*2018-12-212020-06-30杭州登虹科技有限公司Low-power-consumption wireless visual doorbell awakening scheme
CN111356214A (en)*2018-12-212020-06-30杭州登虹科技有限公司Low-power-consumption wireless visual doorbell sleep time difference awakening optimization scheme
CN111556555A (en)*2020-04-292020-08-18杭州涂鸦信息技术有限公司Low-power-consumption keep-alive method and system for network camera and gateway
CN113850938A (en)*2021-09-282021-12-28深圳Tcl新技术有限公司Intelligent door lock control method and device, storage medium and electronic equipment
CN114257872A (en)*2021-12-162022-03-29海信视像科技股份有限公司 Display device, wake-up method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105872391A (en)*2016-06-152016-08-17华为技术有限公司 Network camera control method, device and system
CN114067464B (en)*2021-11-092024-08-20深圳Tcl新技术有限公司Intelligent door lock, awakening method thereof, network equipment and electronic equipment
CN114980191A (en)*2022-05-192022-08-30阿里云计算有限公司 Information processing method, apparatus, storage medium and program product

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20180322405A1 (en)*2013-03-142018-11-08Google LlcSmart-home environment networking systems and methods
US20140265359A1 (en)*2013-03-152014-09-18August Home, Inc.Intelligent Door Lock System
CN106714281A (en)*2015-07-212017-05-24阿里巴巴集团控股有限公司Equipment wake-up method, system and equipment
CN107995231A (en)*2016-10-262018-05-04北京视联动力国际信息技术有限公司A kind of method and apparatus of remote control equipment
CN107580198A (en)*2017-08-232018-01-12深圳市高斯贝尔家居智能电子有限公司A kind of low power consumption remote wakes up web camera and video monitoring system
CN109451354A (en)*2018-11-122019-03-08青岛海信电器股份有限公司A kind of method and terminal waking up terminal
CN111355753A (en)*2018-12-212020-06-30杭州登虹科技有限公司Low-power-consumption wireless visual doorbell awakening scheme
CN111356214A (en)*2018-12-212020-06-30杭州登虹科技有限公司Low-power-consumption wireless visual doorbell sleep time difference awakening optimization scheme
CN111556555A (en)*2020-04-292020-08-18杭州涂鸦信息技术有限公司Low-power-consumption keep-alive method and system for network camera and gateway
CN113850938A (en)*2021-09-282021-12-28深圳Tcl新技术有限公司Intelligent door lock control method and device, storage medium and electronic equipment
CN114257872A (en)*2021-12-162022-03-29海信视像科技股份有限公司 Display device, wake-up method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2023221948A1 (en)*2022-05-192023-11-23阿里云计算有限公司Information processing method, and device, storage medium and program product
CN117389789A (en)*2023-12-082024-01-12四川恒湾科技有限公司Power-down information storage and reporting method and system for O-RU equipment
CN117389789B (en)*2023-12-082024-03-08四川恒湾科技有限公司Power-down information storage and reporting method and system for O-RU equipment

Also Published As

Publication numberPublication date
WO2023221948A1 (en)2023-11-23

Similar Documents

PublicationPublication DateTitle
CN114980191A (en) Information processing method, apparatus, storage medium and program product
US10757653B2 (en)Electronic devices for receiving pushed data
US11243595B2 (en)Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker
US20110153728A1 (en)Synchronization of sporadic web poll traffic
CN105916100B (en) Method, device and communication system for proxy heartbeat packet
CN110474980A (en)Data control method and device, electronic equipment and storage medium
US10901679B2 (en)Mirroring of screens
CN107770881A (en)Transmit the method and device of data
CN108541013A (en)Information processing method, device, mobile terminal and computer readable storage medium
US20190114183A1 (en)Terminal Configuration Method and Terminal Based on Provision Protocol for Transmission
CN114205762A (en)Short message flow control method, equipment and storage medium
CN114286431B (en)Method and device for starting low-power mode, storage medium and electronic device
CN106507505A (en) Method and device for disconnecting low-power bluetooth connection
US12061662B2 (en)Methods, apparatuses and systems for displaying alarm file
CN109756972A (en) A method for waking up an application program, a network side device and a terminal
CN107402626A (en) Application cycle synchronization management method, device, storage medium and electronic equipment
CN105959998A (en)WIFI personal hotspot management method and hotspot equipment
CN112583907A (en)Connection method and device, smart home equipment and computer readable storage medium
CN113923249B (en)High-performance network long connection establishment method and device
US8706155B1 (en)Transmission protocol modification to maximize mobile device battery life
US11889419B2 (en)Method and device for processing instant application messages
CN111736931A (en) The interception method and terminal of the display interface of the application
CN112584215B (en)Video transmission method and device, intelligent television and storage medium
WO2024221885A1 (en)Remote control method, pc, chip system, and storage medium
CN118555586A (en) Connection mode switching method, system, device, electronic device and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp