Information processing method, device, storage medium, and program product
By modifying the collaborative operation of ordinary WiFi modules and main control units, the problem of ordinary WiFi modules not being able to support the MQTT protocol and programming has been solved, achieving low-cost, high-volume two-way keep-alive and remote wake-up capabilities, which can be widely used in remotely controllable electronic products.
Patent Information
- Application Number
- CN202210558025.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-05-19
AI Technical Summary
In existing technologies, ordinary WiFi modules do not support the MQTT protocol and lack programming capabilities, making it impossible to upgrade functions through over-the-air download technology. This results in limitations in two-way keep-alive and remote wake-up capabilities, preventing their widespread application in remotely controllable electronic products.
Ordinary WiFi modules are modified to only handle packet transmission and reception and wake-up, without processing business logic. The main control unit is responsible for audio and video encoding and decoding, and stores and forwards the data through the server. This enables the ordinary WiFi module and the main control unit to work together, ensuring low-cost, high-volume two-way keep-alive and remote wake-up capabilities.
It achieves low-cost, high-volume two-way keep-alive and remote wake-up capabilities, and can be widely used in remotely controllable electronic products.
Smart Images

Figure CN114980191B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to an information processing method, device, storage medium and program product. BACKGROUND
[0002] With the continuous change of market demand, more and more electronic products (such as doorbells, door locks, etc.) are developing towards visualization and intelligence. It has become a popular demand to be able to remotely control the electronic products through the application program (APP) of the electronic products, such as remotely viewing the doorbell, door lock monitoring screen, saving and viewing the doorway video, etc.
[0003] However, the visual doorbell and the visual door lock are battery devices, and the power-consuming master control unit usually works without power, and needs to support bidirectional keep-alive and APP remote wake-up of the master control to perform corresponding operations. Moreover, the ability of bidirectional keep-alive and APP remote wake-up of the master control to perform corresponding operations needs a WiFi module to realize.
[0004] At present, bidirectional keep-alive and remote wake-up need a WiFi module to support MQTT protocol and have programmable ability. However, ordinary WiFi modules do not support MQTT protocol and do not have programmable ability, and at the same time, cannot realize function upgrade through over-the-air technology (OTA). Therefore, the WiFi module for bidirectional keep-alive and remote wake-up currently uses a high-end WiFi module, but the high-end WiFi module has high cost and low production capacity, and cannot be widely promoted. Therefore, the existing technology has limitations in realizing the ability of bidirectional keep-alive and remote wake-up, and thus cannot be widely and effectively applied to remotely controllable electronic products. SUMMARY
[0005] Embodiments of the present application provide an information processing method, device, storage medium and program product to solve the problem that the existing technology has limitations in realizing the ability of bidirectional keep-alive and remote wake-up, and thus cannot be widely and effectively applied to remotely controllable electronic products.
[0006] In a first aspect, embodiments of the present application provide an information processing method applied to a server, and the method comprises:
[0007] receiving a query request sent by a user device to query the state of a controlled device, wherein the controlled device comprises a WiFi unit and a master control unit;
[0008] if the slave device is in the low-power state and it is determined that the slave device is in the heartbeat state of the WiFi unit, sending a wake-up packet to the WiFi unit of the slave device, so that the WiFi unit determines whether to wake up the master unit of the slave device according to the wake-up packet;
[0009] if the target message indicating the non-low-power state is received, sending the target message to the user device, so that the user device sends a target instruction to the master unit to instruct the master unit to perform a corresponding target function, the target instruction being generated by the user device based on the target message.
[0010] Optionally, the server stores the state of the slave device, and the state of the slave device includes a low-power state or a non-low-power state.
[0011] if the slave device is in the low-power state and it is determined that the slave device is in the heartbeat state of the WiFi unit, sending a wake-up packet to the WiFi unit of the slave device, so that the WiFi unit determines whether to wake up the master unit of the slave device according to the wake-up packet.
[0012] if the slave device is in the low-power state and it is determined that the slave device is in the heartbeat state of the WiFi unit, sending a message indicating that the slave device is in the low-power state to the user device, so that the user device calls an instruction indicating that a wake-up packet is sent;
[0013] if the instruction indicating that a wake-up packet is sent is received from the user device, sending the wake-up packet to the WiFi unit, so that the WiFi unit compares the wake-up packet with a predefined message packet, and determines to wake up the master unit of the slave device when the comparison is consistent.
[0014] Optionally, the sending of the target message to the user device, so that the user device sends a target instruction to the master unit to instruct the master unit to perform a corresponding target function, includes:
[0015] sending the target message to the user device, so that the user device triggers a predefined function to generate a target instruction when the target message is received;
[0016] receiving the target instruction sent by the user device, and sending the target instruction to the master unit, so that the master unit performs an operation corresponding to the predefined function, and displays on the user device.
[0017] Optionally, the method further includes:
[0018] If the slave device is in the non-low power consumption state, a target instruction is sent to the master unit to make the master unit perform an operation corresponding to a predefined function and display on the user device;
[0019] The target instruction is generated by the user device by triggering the predefined function.
[0020] Optionally, the determination that the slave device is in the heartbeat state in which the WiFi unit is working includes:
[0021] If the heartbeat packet sent by the WiFi unit is received within a heartbeat period, it is determined that the slave device is in the heartbeat state in which the WiFi unit is working, and a communication link with the slave device is maintained in an MQTT manner.
[0022] Optionally, if the slave device is in the non-low power consumption state, the heartbeat packet is sent by the master unit. The method further includes:
[0023] If the heartbeat packet sent by the master unit is received within a heartbeat period, it is determined that the slave device is in the heartbeat state in which the master unit is working, and a communication link with the slave device is maintained in an MQTT manner.
[0024] In a second aspect, an information processing method is provided, which is applied to a user device. The method includes:
[0025] A query request is sent to a server to make the server query a state of a slave device, the slave device including a WiFi unit and a master unit.
[0026] If a message sent by the server and indicating that the slave device is in a low power consumption state is received, an instruction indicating that a wake-up packet is sent is called and sent to the server to make the server send the wake-up packet to the WiFi unit to determine whether to wake up the master unit of the slave device.
[0027] If a target message sent by the server and indicating that the slave device is in a non-low power consumption state is received, a target instruction is sent to the master unit to instruct the master unit to perform a corresponding target function. The target instruction is generated based on the target message, and the target message is sent by the master unit to the server.
[0028] In a third aspect, an information processing method is provided, which is applied to a master unit. The method includes:
[0029] Report the state of the controlled device to the server, so that the server queries the state of the controlled device according to the query request of the user terminal, wherein the controlled device comprises a WiFi unit and a master control unit;
[0030] If the wake-up instruction sent by the WiFi unit is received, a power-on operation is performed, and a target message indicating a non-low-power state is sent to the server, so that the server sends the target message to the user device; wherein the wake-up instruction is sent by the user device to the unit to wake up the package, so that the WiFi unit is determined according to the wake-up package; the wake-up package is sent by the server to the user device to indicate that the controlled device is in a low-power state, and the WiFi unit is determined to work in a heartbeat state, so that the user device determines to send;
[0031] If the target instruction sent by the user device is received, the corresponding target function is executed, and the target instruction is generated by the user device based on the target message.
[0032] In a fourth aspect, an electronic device is provided, comprising: a processor, and a memory connected to the processor in communication;
[0033] The memory stores computer execution instructions;
[0034] The processor executes the computer execution instructions stored in the memory to implement the method of any one of the first aspect, the second aspect, and the third aspect.
[0035] In a fifth aspect, a controlled device is provided, comprising a WiFi unit and a master control unit;
[0036] The master control unit is configured to execute the information processing method of the third aspect.
[0037] In a sixth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer execution instructions, when the processor executes the computer execution instructions, the method of any one of the first aspect, the second aspect, and the third aspect is implemented.
[0038] In a seventh aspect, a computer program product is provided, comprising a computer program, when the computer program is executed by the processor, the method of any one of the first aspect, the second aspect, and the third aspect is implemented.
[0039] The information processing method, device, storage medium and program product provided by the embodiments of the present application, in the method, when a user equipment triggers a certain function operation, a server queries the state of the electronic equipment, if in a low power consumption state, the server forwards the message of the low power consumption state to a client, the client calls a wake-up package interface and sends the wake-up package to the WiFi unit of the electronic equipment through the server, then the WiFi unit wakes up the master control unit of the electronic equipment, after the master control unit is powered on, the message in the non-low power consumption state is sent to the server, forwarded to the client by the server, then the client sends an instruction of using a certain function to the server, the server forwards to the master control unit to execute or the client executes through a certain protocol, the bidirectional keep-alive and remote wake-up capability can be realized through the ordinary WiFi module (i.e. the WiFi unit), the master control unit and the server under the premise of low cost and high yield, and the method can be widely and effectively applied to the electronic products that can be remotely controlled. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0041] Figure 1 The scene schematic diagram of the information processing method provided by the embodiments of the present application;
[0042] Figure 2 The flowchart of the information processing method provided by the embodiments of the present application;
[0043] Figure 3 The flowchart of the information processing method provided by another embodiment of the present application;
[0044] Figure 4 The flowchart of the information processing method provided by another embodiment of the present application;
[0045] Figure 5 The structure schematic diagram of the information processing device provided by the embodiments of the present application;
[0046] Figure 6 The structure schematic diagram of the information processing device provided by another embodiment of the present application;
[0047] Figure 7 The structure schematic diagram of the information processing device provided by another embodiment of the present application;
[0048] Figure 8A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work are within the scope of protection of the present application.
[0050] The terms "first", "second", "third", "fourth" and the like (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can also include other order instances in addition to those illustrated or described. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0051] At present, the implementation of bidirectional keep-alive and remote wake-up requires that the WiFi module supports the MQTT protocol and has programmable capability. The use of high-end WiFi modules cannot solve the following problems: 1. high price, increasing the cost of hardware products 2. low chip production capacity, which cannot be made up in a short time, there are relatively few WiFi chips on the market that support this capability, and hardware manufacturers cannot widely promote it 3. the market inventory of WiFi modules such as Hi1131 that do not support the MQTT protocol and do not have programmable capability is large, and cannot be upgraded through Over-the-Air Technology (OTA), that is, ordinary WiFi modules do not support the MQTT protocol and do not have programmable capability, and cannot be upgraded through Over-the-Air Technology (OTA). Therefore, the WiFi module for bidirectional keep-alive and remote wake-up currently uses a high-end WiFi module, but the high-end WiFi module has high cost and low production capacity, and cannot be widely promoted. Therefore, the existing technology has limitations in implementing bidirectional keep-alive and remote wake-up, and thus cannot be widely and effectively applied to remotely controllable electronic products.
[0052] In order to solve the above problems, the application concept is that the ordinary WiFi module is modified, the WiFi unit of the ordinary WiFi module is only used for receiving and transmitting packets and waking up, and does not perform business logic processing, that is, a fixed non-TLS encrypted heartbeat packet is recorded, the WiFi unit is used for periodically sending, maintaining the heartbeat, and a fixed wake-up instruction is set, and the main chip is woken up after receiving the fixed wake-up instruction, without having a programmable ability or only having a limited programming and setting function; the main control unit of the ordinary WiFi module is responsible for completing the audio and video coding and decoding functions of the device, and has a programmable ability, that is, corresponding functions are executed. Then, the server is used for storage and forwarding. Therefore, the ordinary WiFi module, the main control and the server can be used to realize the bidirectional keep-alive and remote wake-up ability under the premise of low cost and high yield, and are widely and effectively applied to the electronic products which can be remotely controlled.
[0053] Figure 1 The scene schematic diagram of the information processing method provided by the embodiment of the application is shown. The application program, APP, of the controllable device is installed in the user equipment (such as a mobile phone, a tablet computer and the like), and the controllable device can be a battery type consumer electronic product such as a video doorbell, a face / video door lock and the like. The user triggers a function (that is, a predefined function, such as a live broadcast function of watching a live broadcast at the door or a review function of reviewing a video at the door in a certain time period) by operating on the APP.
[0054] Since the ordinary WiFi unit (that is, the ordinary WiFi chip) does not have a programmable ability or a business logic processing ability, and is only responsible for receiving and transmitting packets and waking up the main control, when the user clicks a function on the APP, a query request is first sent to the server. Only when the controllable device is in a non-low-power-consumption state (that is, the main control unit is in a power-on state or an online state), the operation of the function is actually triggered, a response instruction is generated and sent to the main control unit. At this time, the operation of the function is executed by the main control unit without passing through the WiFi unit.
[0055] If the controllable device is in a low-power-consumption state, it is first determined whether the controllable device is in a keep-alive state, that is, whether the controllable device maintains a link with the server. If a heartbeat packet sent by the WiFi unit is received within a heartbeat period (when the main control unit is online, the heartbeat packet is sent by the main control), it is indicated that the controllable device is in a heartbeat state of the WiFi unit, that is, the controllable device and the server are in a state of being connected, and the controllable device and the server maintain communication.
[0056] The low-power principle in the embodiment is as follows: the controlled device is composed of multiple chips: a master control chip and a WiFi chip, and the two chips communicate through physical connection, and the common form is USB. The master control chip is usually responsible for completing the audio and video codec functions of the device, and has programmable capability, and the device message uplink and downlink, video and other service functions are run on the master control chip to reduce power consumption. The WiFi chip is responsible for the TCP / IP protocol stack function, including network data receiving, sending, packetizing and unpacking. However, low-end WiFi chips do not have programmable capability, or only have limited programming and setting functions. When the power consumption is low, the master 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), the master control chip is woken up, and after the master control chip is started, the normal state is restored.
[0057] Then the server sends the message that the controllable device is in the low-power state to the user device, and after the user device receives the message, the interface for sending the wake-up packet is called, so that the server sends the wake-up packet to the WiFi unit, and the WiFi unit compares the information of the fixed packet configured by itself (here, only character comparison is performed, and no business logic processing is involved, so the WiFi unit can not have the capability of a high-end WiFi module) to determine whether it is a wake-up packet. If it is determined to be a wake-up packet, the WiFi unit wakes up the master control unit, and the master control unit is powered on. During the power-on process of the master control unit, the user device is always in a loading state, and at the same time, the master control sends the message in the non-low-power state to the server, and the server sends the user device. The user device truly triggers the operation of the function, generates the corresponding instruction, and sends it to the master control unit for execution.
[0058] Among them, the link through which the user device sends the corresponding instruction (i.e., the target instruction) to the master control unit can be two, one is that the user device sends the target instruction to the server, and the server forwards it to the master control unit (because the user device and the server always maintain communication); the other is that the user device sends the target instruction to the master control unit through a certain protocol (such as the Transmission Control Protocol (TCP protocol)).
[0059] In addition, when the master unit is online, the heartbeat packet is sent by the master, and before the master unit is powered off, the master unit will first disconnect the Message Queuing Telemetry Transport (MQTT) link of its own message queue telemetry transmission, and after the link is disconnected, the WiFi unit is set up to establish the MQTT link, and the TLS encryption is removed during establishment, that is, the heartbeat packet does not need to be encrypted; secondly, the master unit puts its fixed heartbeat packet on the WiFi unit, and then sets the heartbeat period, that is, how long to send once; finally, a wake-up packet is set for the WiFi unit, and it is set under what condition to receive the wake-up packet, and finally the power-off is completed, and the master receives the wake-up instruction to realize power-on.
[0060] Among them, MQTT defines a series of control packets, including PINGREQ: heartbeat request, PINGRESP: heartbeat response, PUBLISH: publish message, SUBSCRIBE: subscribe message. MQTT defines a heartbeat packet PINGREQ, the device (here it can refer to a controllable device) sends the data packet (such as a heartbeat packet) to the cloud (that is, the server, such as an Internet of Things platform) at a certain frequency, requests the cloud to confirm whether the link is valid. When the cloud receives PINGREQ, it will reply PINGRESP, notifying the device that PINGREQ has been received. After the device receives PINGRESP, it will confirm whether the current link is valid. Among them, PINGREQ / PINGRESP do not contain any variable parameters. MQTT also provides a mechanism for publishing and subscribing to messages: by defining data formats, devices, clouds, and APPs can complete sleep state synchronization, sleep instruction issuance, and other functions.
[0061] Transport Layer Security (TLS) establishes a reliable encrypted channel between two communication ends. Generally, asymmetric encryption is used first to exchange secret keys. After the secret key exchange is completed, the secret key obtained by exchange is used for symmetric encryption. Among them, the characteristic of symmetric encryption is to use the same plaintext-secret key-encryption method, and the encrypted ciphertext is constant, and the same secret key-encryption method is used for decryption of the ciphertext, and the plaintext obtained is also the same; asymmetric encryption is in the process of establishing a link of TLS, and the actual information communication uses symmetric encryption. However, in the symmetric encryption process of TLS, sequence num is added to the actual data, which is constantly increasing. Therefore, when the same source data is encrypted, the encrypted data is not the same.
[0062] Therefore, the ordinary WiFi module is modified in the application, the WiFi unit of the ordinary WiFi module only transmits and receives packets and wakes up, does not process business logic, that is, records fixed non-TLS encrypted heartbeat packets, the WiFi unit transmits the packets at fixed time, maintains the heartbeat, and sets a fixed wake-up instruction, and after the wake-up instruction is received, the master control chip (that is, the master control unit) is woken up, and the master control chip does not need to have a programmable ability or only has a limited programming and setting function. By modifying the master control unit of the controllable device, the state is reported to the server, and then the server stores and forwards. At the same time, the master control unit is also responsible for completing the audio and video coding and decoding functions of the controllable device and has a programmable ability, that is, executes corresponding functions. Unlike the current high-end WiFi module, the high-end WiFi module must have a programmable ability, support MQTT protocol and encryption, and have a certain storage capacity. By decomposing the functions of the high-end WiFi module, that is, by using the ordinary WiFi module + server (the server is a service deployed in the cloud), the bidirectional keep-alive and remote wake-up capabilities can be realized under the premise of low cost and high yield, and the electronic products that can be remotely controlled can be widely and effectively applied.
[0063] The technical solutions of the application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments.
[0064] Figure 2 The flowchart of the information processing method provided in the embodiment of the application, the method of the embodiment can be executed by a server, and the server can be a cloud (that is, a software platform using application program virtualization technology), such as a server. As shown in the figure, Figure 2 The method of the embodiment can include:
[0065] S201: receiving a query request sent by a user device, to query the state of a controlled device, the controlled device including a WiFi unit and a master control unit.
[0066] The WiFi unit here supports a 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 master control unit in the controlled device is in a power-off state, that is, when the master control unit is powered off or offline, only the WiFi chip is powered on, which indicates that the controlled device is in a low-power state (for example, a visible door lock 300UA is in a low-power state); when the master control unit is powered on or online, it indicates that the controlled device is in a non-low-power state. The master control unit will report the message that the controlled device is in a low-power state to the server before power-off, and the master control unit will report the message that the controlled device is in a non-low-power state to the server after power-on, and the server updates and stores the state of the controlled device.
[0067] In this embodiment, the user equipment is installed with an APP for remotely operating or controlling the controlled device. 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 queries the server whether the device is in the low-power consumption state. Since the server stores the last state of the controlled device, the server can directly search from the storage module.
[0068] S202, if it is queried that the controlled device is in the 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 determines whether to wake up the main control unit of the controlled device according to the wake-up packet.
[0069] In this embodiment, if the server queries that the controlled device is not in the low-power consumption state, the live broadcast watching operation is triggered, and the live broadcast watching instruction is sent to the server. After the server receives the live broadcast watching instruction, the main control unit is sent. If the server queries that the controlled unit is in the low-power consumption state, the message of the low-power consumption state is fed back to the user equipment. The user equipment calls an interface for waking up the main control, and the server sends a wake-up packet to the WiFi unit. In order to ensure that the server can send the 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 working, so as to ensure that the link between the server and the controlled device is in a state of being connected.
[0070] Since the WiFi unit does not have programmable ability or business logic processing ability, when the WiFi unit receives the wake-up packet, it cannot parse the wake-up packet, but can compare characters in the received wake-up packet with fixed packets in the WiFi unit configuration, and then determine whether it is a wake-up instruction to wake up the main control unit.
[0071] S203, if the target message sent by the main control unit for indicating the 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, so as to instruct the main control unit to execute a corresponding target function. The target instruction is generated by the user equipment based on the target message.
[0072] In this embodiment, after the WiFi unit receives the wake-up packet, the operation of waking up the main control is performed. After the main control is powered on and initialized, the non-low-power consumption state is reported. The server sends the state to the user equipment. After the user equipment receives the state, the live broadcast watching operation is triggered again (at this time, the APP is always loading), a target instruction is generated, and the target instruction is sent to the main control unit. The main control unit executes a corresponding target function according to the target instruction, such as encoding and decoding video operation, and then renders the live broadcast video screen on the interface of the user equipment.
[0073] The information processing method provided in the application, when a user equipment triggers a certain function operation, a server queries a state of an electronic equipment, if the electronic equipment is in a low power consumption state, the server forwards a message of the low power consumption state to a client, the client calls a wake-up package interface and sends a wake-up package to a WiFi unit of the electronic equipment through the server, then the WiFi unit wakes up a master control unit of the electronic equipment, after the master control unit is powered on, a message of a non-low power consumption state is sent to the server, forwarded to the client by the server, then the client sends an instruction of using a certain function to the server, the server forwards the instruction to the master control unit to execute or the client executes through a certain protocol to the master control unit, which can be realized through a normal WiFi module (i.e. the WiFi unit), the master control unit and the server, can ensure low cost and high yield, and realizes the ability of bidirectional keep-alive and remote wake-up, and is widely and effectively applied to electronic products that can be remotely controlled.
[0074] Optionally, the server stores the state of the controlled equipment, and the state of the controlled equipment includes a low power consumption state or a non-low power consumption state.
[0075] If it is found that the controlled equipment is in the low power consumption state and it is determined that the controlled equipment is in the heartbeat state in which the WiFi unit works, a wake-up package is sent to the WiFi unit of the controlled equipment, so that the WiFi unit determines whether to wake up the master control unit of the controlled equipment according to the wake-up package, which can be realized through the following steps:
[0076] If it is found that the controlled equipment is in the low power consumption state and it is determined that the controlled equipment is in the heartbeat state in which the WiFi unit works, a message indicating that the controlled equipment is in the low power consumption state is sent to the user equipment, so that the user equipment calls an instruction indicating that the wake-up package is sent.
[0077] If the instruction indicating that the wake-up package is sent is received from the user equipment, the wake-up package is sent to the WiFi unit, so that the WiFi unit compares the wake-up package with a predefined message package, and when the comparison is consistent, it is determined to wake up the master control unit of the controlled equipment.
[0078] In the embodiment, the server stores the state of the controlled equipment, 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 equipment, if it is found that the stored state is that the controlled equipment is in the low power consumption state, and at the same time, the server keeps connected with the controlled equipment, the WiFi unit needs to wake up the master control unit.
[0079] The service end and the controlled device can maintain the connection through heartbeat detection. For example, the service end can normally receive the heartbeat packet sent by the WiFi unit in the heartbeat period, indicating that the controlled device is in the heartbeat state of the WiFi unit, and the service end and the controlled device maintain the connection.
[0080] Specifically, the service end first sends the state to the user device. When the user device learns that the controlled device is in the low-power-consumption state, the user device needs to call the instruction or interface for sending the wake-up packet, and then sends the wake-up packet to the service end. The service end forwards the wake-up packet or the wake-up instruction to the WiFi unit. Then, the WiFi unit compares the received wake-up packet with the configured wake-up packet (i.e., the predefined message packet). When the comparison is consistent, it is determined that the received packet is the wake-up packet, and the master control unit is woken up. If the received packet is not the wake-up packet, no operation is performed.
[0081] The WiFi chip (i.e., the WiFi unit) has a simple character comparison function. If the received data (i.e., the received wake-up packet) is the same as the set wake-up data (i.e., the predefined wake-up packet), the master control chip (i.e., the master control unit) is triggered to wake 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 complete data packet. The WiFi chip provides an API for comparing only the application layer data. Therefore, only the constant MQTT protocol wake-up data needs to be defined and set to the WiFi to achieve the wake-up function.
[0082] Optionally, the sending of the target message to the user device to enable the user device to send a target instruction to the master control unit to instruct the master control unit to perform a corresponding target function includes:
[0083] Step b1, sending the target message to the user device to enable the user device to trigger a predefined function to generate a target instruction when the target message is received.
[0084] Step b2, receiving the target instruction sent by the user device and sending the target instruction to the master control unit to enable the master control unit to perform an operation corresponding to the predefined function and display on the user device.
[0085] In this embodiment, if the master is woken up, it starts to power on and sends a target message indicating a non-low power consumption state to the server, which is forwarded to the user device. When the user device receives the target message indicating a non-low power consumption state, it triggers the function operation again, generates a control instruction (i.e., a target instruction), and then sends the target instruction to the master unit, which executes the corresponding function. For example, if the triggered function is a live broadcast function, the master unit starts to perform the live broadcast operation: the camera is turned on to capture the video picture of the current position and present it on the user device.
[0086] Specifically, if the master is powered on, it reports its state to the server, which notifies the client, and then the user device generates a control instruction and sends it to the master unit for execution. Here, the user device can send the instruction to the master unit through two links: one is to send the instruction to the master unit by the server, and the other is to send the instruction through the TCP protocol without using the server.
[0087] Optionally, the method can also be implemented by the following steps:
[0088] If it is found that the controlled device is in a non-low power consumption state, a target instruction is sent to the master unit to make the master unit perform the operation corresponding to the predefined function and display it on the user device.
[0089] The target instruction is generated by the user device by triggering the predefined function.
[0090] In this embodiment, if the server queries the stored state of the controlled device and finds that it is in a non-low power consumption state, it means that the master unit is online or working. Since the server and the user device are always in communication, the server does not need to report the target message that the controlled device is in a non-low power consumption state to the user device. The user device can trigger the function operation, generate a target instruction, and send it to the master unit, so that the master unit can execute the corresponding function after receiving the target instruction. For example, if the triggered function is a live broadcast function, the master unit starts to perform the live broadcast operation: the camera is turned on to capture the video picture of the current position and present it on the user device.
[0091] Optionally, the determination that the controlled device is in the heartbeat state of the WiFi unit operation can be implemented by the following steps:
[0092] If a heartbeat packet sent by the WiFi unit is received within the heartbeat period, it is determined that the controlled device is in the heartbeat state of the WiFi unit operation, and the communication link with the controlled device is maintained in the MQTT mode.
[0093] In this embodiment, when the master unit is online, the heartbeat packet is sent by the master, and before the master unit is powered off, the master unit will first disconnect the Message Queuing Telemetry Transport (MQTT) link of its own message queue telemetry transmission. After the link is disconnected, the WiFi unit is set to establish the MQTT link, and the TLS encryption is removed during establishment, that is, the heartbeat packet does not need to be encrypted. Secondly, the master unit puts its fixed heartbeat packet on the WiFi unit, and then sets the heartbeat period, that is, how long to send once. Finally, a wake-up packet is set for the WiFi unit, and it is set under what condition to receive the wake-up packet, and finally the power-off is completed. When the master receives the wake-up instruction, the power-on is realized.
[0094] Specifically, if the heartbeat packet is sent by the WiFi unit, it means that the master is in a power-off state, that is, the device is in a low-power state, that is, a WiFi working state, and the service end is informed by sending the heartbeat packet to maintain the communication link with the controlled device in the MQTT mode. That is, if the heartbeat packet is sent by the WiFi unit, the service end will be informed that the controlled device is in the heartbeat state of the WiFi unit working, and the communication link with the controlled device is maintained in the MQTT mode.
[0095] Optionally, if the controlled device is in a non-low-power state, the heartbeat packet is sent by the master unit; the method can also be realized by the following steps:
[0096] If the heartbeat packet sent by the master unit is received within the heartbeat period, it is determined that the controlled device is in the heartbeat state of the master unit working, and the communication link with the controlled device is maintained in the MQTT mode.
[0097] In this embodiment, when the controlled device is in a non-low-power state, the master sends a heartbeat packet to the service end, and waits to receive an operation instruction of a user device.
[0098] In order to support the TCP protocol, the MQTT data needs to be forged, and the master chip must obtain the detailed information of the TCP / IP protocol stack and set it to the WiFi chip. Specifically, in order to support the TCP protocol, the MQTT modifies 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 the WiFi. After the setting is completed, the WiFi can send the MQTT data packet by itself.
[0099] In application scenarios, when commands are sent to devices from the cloud, the cloud needs network acknowledgment (ask) from the device to ensure that the device receives the commands before sending the commands to the device. TCP is simply a request-response mechanism and cannot guarantee the success rate of commands sent from the cloud to the device.
[0100] Keep-alive mode cannot be used with MQTT's ping-pong-ack because TCP cannot reply with an ack after receiving a pong. Keep-alive is achieved by sending fixed message packets (such as heartbeat packets) at a frequency consistent with the heartbeat interval. The IoT service ensures that the device sending the message packets is online (but does not receive server commands in low-power states due to the unpredictable success rate of service-issued instructions). If the heartbeat packet is sent by the master control unit, it notifies the server that the controlled device is in the heartbeat state of the master control unit's operation, and maintains a communication link with the controlled device via MQTT.
[0101] In practical applications, the WiFi chip only handles keep-alive and wake-up. It records fixed, non-TLS encrypted heartbeat packets and sends them periodically. A fixed wake-up command is set, which wakes up the main chip upon receipt. The MQTT ping-pong-ack mode cannot be used for keep-alive because TCP cannot respond with an ack after receiving a pong; keep-alive is achieved by sending fixed message packets at the same frequency as the heartbeat interval, and notifying the server to maintain the communication link with the controlled device via MQTT. The IoT service ensures that the device sending the message packets is online (due to the unreliable success rate of service commands, it does not receive server commands in low-power mode). The device switches between low-power and online states. Device status information is stored in the cloud for users with installed apps to query, distinguishing functions in different states. Device attribute settings in low-power mode are stored in the cloud (supporting app queries) and updated when the device's main control chip comes online.
[0102] Therefore, with edge-cloud integration, the device only needs to send commands, while protocol conversion and programming are handled by the cloud. The basic working unit has changed from a WiFi module to a WiFi module + cloud, resulting in stronger capabilities, lower prices, and wider applicability.
[0103] See Figure 3 As shown, Figure 3 This is a flowchart illustrating an information processing method provided in another embodiment of this application. The method in this embodiment can be executed by a user device, which can be a smart device such as a mobile phone or tablet, and has an app installed on it to control the device. Figure 3 As shown, the method in this embodiment may include:
[0104] S301, send a query request to the server to make the server query the state of the controlled device, the controlled device comprising a WiFi unit and a master control unit.
[0105] In this embodiment, the user equipment is installed with an APP for remotely operating or controlling the controlled device, and the live broadcast function of watching the live broadcast at the door is taken as an example. When the user clicks the live broadcast function on the APP, the APP (or the user equipment) first queries the server whether the device is in the low-power consumption state. Since the server stores the state of the controlled device at the last time, the server can directly find it from the storage module.
[0106] S302, if the message indicating that the controlled device is in the low-power consumption state sent by the server is received, the instruction for indicating sending the wake-up package is called and sent to the server, so that the server sends the wake-up package to the WiFi unit to determine whether to wake up the master control unit of the controlled device.
[0107] In this embodiment, if the server queries that the controlled device is not in the low-power consumption state, the live broadcast watching operation is triggered, and the live broadcast watching instruction is sent to the server, which is sent to the master control unit after receiving the live broadcast watching instruction. If the server queries that the controlled unit is in the low-power consumption state, the low-power consumption state message is fed back to the user equipment. When the user equipment receives the target message indicating that the controlled device is in the low-power consumption state, the interface or instruction for waking up the master control unit is called, so that the server sends the wake-up package to the WiFi unit. In order to ensure that the server can send the wake-up package to the WiFi unit, it is necessary to determine that the controlled device is in the heartbeat state of the WiFi unit working, and ensure that the link between the server and the controlled device is in the state of being open.
[0108] Since the WiFi unit does not have programmable ability or business logic processing ability, when the WiFi unit receives the wake-up package, it cannot parse the wake-up package, but can compare characters according to the received wake-up package and the fixed package in the self configuration, and then determine whether it is a wake-up instruction to wake up the master control unit.
[0109] S303, if the target message indicating the non-low-power consumption state sent by the server is received, a target instruction is sent to the master control unit to instruct the master 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 master control unit.
[0110] 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 the non-low power state. This state will be sent to the user device by the server. After receiving the state, the user device will trigger the live broadcast operation again (at this time, the APP is always loading), generate the target instruction, and send the target instruction to the main control unit. The main control unit will execute the corresponding target function according to the target instruction, such as video encoding and decoding, and then render the live video screen on the user device interface.
[0111] The information processing method provided in this application involves the server querying the status of the electronic device when a user device triggers a certain function operation. If the device is in a low-power state, the server forwards the low-power state message to the client. The client then calls the wake-up packet interface and sends the wake-up packet to the WiFi unit of the electronic device through the server. The WiFi unit then wakes up the main control unit of the electronic device. After the main control unit is powered on, it sends a message indicating that it is in a non-low-power state to the server, which forwards it to the client. The client then sends an instruction to the server to use a certain function. The server forwards the instruction to the main control unit for execution, or the client sends the instruction to the main control unit for execution through a certain protocol. This method can be implemented using a common WiFi module (i.e., WiFi unit), the main control unit, and the server. It achieves bidirectional keep-alive and remote wake-up capabilities while ensuring low cost, and can be widely and effectively applied to remotely controllable electronic products.
[0112] The method provided in this application embodiment enables the user equipment to perform the operations that the user equipment can perform when the server is the execution subject. The implementation principle and technical effect are similar, and will not be repeated here.
[0113] See Figure 4 As shown, Figure 4 This is a flowchart illustrating an information processing method provided in another embodiment of this application. The method in this embodiment can be executed by the main control unit of a controlled device. The controlled device can be a battery-powered consumer electronics product such as a video doorbell, face / video door lock, etc. The controlled device includes a WiFi unit and a main control unit, which are physically connected, for example, via USB. Figure 4 As shown, the method in this embodiment may include:
[0114] S401. The status of the controlled device is reported to the server so that the server can query the status of the controlled device according to the query request from the user. The controlled device includes a WiFi unit and a main control unit.
[0115] In the embodiment, the controlled device adopts a master-slave architecture: a WiFi chip + a master chip (i.e., a master control chip). In a low-power state, the master chip is turned off, and the WiFi and the Internet of Things platform (i.e., a server or a cloud) maintain a heartbeat. Due to different WiFi chip capabilities and different flash and memory sizes, when the master control unit is powered on or powered off, the state of the controlled device can be reported to the cloud and stored in the cloud for cloud query, thereby saving the flash and memory of the WiFi chip.
[0116] S402, if the wake-up instruction sent by the WiFi unit is received, a power-on operation is performed, and a target message indicating a non-low-power state is sent to the server, so that the server sends the target message to the user device; wherein the wake-up instruction is that the user device sends a wake-up packet to the WiFi unit, so that the WiFi unit is determined according to the wake-up packet; the wake-up packet is that when the server queries that the controlled device is in a low-power state and determines that the WiFi unit works in a heartbeat state, a message indicating that the controlled device is in a low-power state is sent to the user device, so that the user device is determined to send.
[0117] In the embodiment, if the server queries that the controlled device is not in a low-power state, a live viewing operation is triggered, and the live viewing instruction is sent to the server. After the server receives the live viewing instruction, the live viewing instruction is sent to the master control unit. If the server queries that the controlled unit is in a low-power state, the server feeds back a message of the low-power state to the user device. The user device calls an interface for waking up the master control, and the server sends a wake-up packet to the WiFi unit. In order to ensure that the server can send the 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 state of being connected.
[0118] Since the WiFi unit does not have programmable capability or service logic processing capability, when the WiFi unit receives the wake-up packet, the WiFi unit cannot parse the wake-up packet, but can perform character comparison between the received wake-up packet and a fixed packet in the WiFi unit, and then determine whether it is a wake-up instruction to wake up the master control unit.
[0119] When the WiFi unit receives the wake-up packet, the WiFi unit performs the operation of waking up the master control. After the master control is powered on and initialized, the non-low-power state is reported. The server sends the state to the user device. After the user device receives the state, the user device triggers the live viewing operation again (at this time, the APP is always loading), generates a target instruction, and sends the target instruction to the master control unit.
[0120] S403, if the 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.
[0121] In this embodiment, the master control unit receives the target instruction sent by the user equipment, and the master control unit executes a corresponding target function according to the target instruction, such as a video encoding and decoding operation, and then renders a live video picture on the interface of the user equipment.
[0122] Specifically, when the master control unit is online, the heartbeat packet is sent by the master control unit, and before the master control unit is powered off, the MQTT link of the message queue telemetry transmission (MQTT) of the master control unit is first disconnected, and after the disconnection, the WiFi unit is set to establish the MQTT link, and the TLS encryption is removed during the establishment, that is, the heartbeat packet does not need to be encrypted; secondly, the master control unit puts the fixed heartbeat packet of the master control unit on the WiFi unit, and then sets the heartbeat period, that is, how long to send once; finally, a wake-up packet is set for the WiFi unit, and it is set under what condition to receive the wake-up packet, and finally the power-off is exited, and the master control unit is powered on after receiving the wake-up instruction.
[0123] The information processing method provided in the application, when the user equipment triggers a certain function operation, the server queries the state of the electronic device, if in the low-power consumption state, the server forwards the low-power consumption state message to the client, 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 master control unit of the electronic device, after the master control unit is powered 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 master control unit for execution or the client executes it through a certain protocol, which can be realized through the ordinary WiFi module (i.e. the WiFi unit), the master control unit and the server, can ensure low cost, realize the ability of bidirectional keep-alive and remote wake-up, and is widely and effectively applied to electronic products that can be remotely controlled.
[0124] The method, the master control unit and the controlled device provided in the embodiments of the application can realize the operations that the master control unit and the controlled device can perform when the server or the user equipment is the execution subject, the implementation principles and technical effects are similar, and details are not repeated here.
[0125] Based on the same idea, the embodiments of the application also provide a device corresponding to the above method, as shown in Figure 5 Figure 5 A structural schematic diagram of an information processing device provided by an embodiment of the present application is shown. The information processing device is applied to a server; the information processing device can include:
[0126] The receiving module 501 is configured to receive a query request sent by a user equipment, and query a state of a controlled device, the controlled device including a WiFi unit and a master control unit;
[0127] The sending module 502 is configured to, 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 works, send a wake-up packet to the WiFi unit of the controlled device, so that the WiFi unit determines whether to wake up the master control unit of the controlled device according to the wake-up packet.
[0128] The processing module 503 is configured to, when a target message indicating a non-low-power consumption state is received from the master control unit, send the target message to the user equipment, so that the user equipment sends a target instruction to the master control unit, to instruct the master control unit to perform a corresponding target function, the target instruction being generated by the user equipment based on the target message.
[0129] In the embodiment, the receiving module 501, the sending module 502 and the processing module 503 are configured to, when a user equipment triggers a certain function operation, the server queries a state of an electronic device, if the electronic device is in a low-power consumption state, the server forwards a message of the low-power consumption state to a client, the client calls a wake-up packet interface and sends a wake-up packet to the WiFi unit of the electronic device through the server, and then the WiFi unit wakes up the master control unit of the electronic device, after the master control unit is powered on, a message of a non-low-power consumption state is sent to the server, and the server forwards the message to the client, then the client sends an instruction of using a certain function to the server, the server forwards the instruction to the master control unit to execute or the client executes the instruction through a certain protocol to the master control unit, and the function is realized through the ordinary WiFi module (i.e. the WiFi unit), the master control unit and the server, which can ensure low cost, realize the ability of bidirectional keep-alive and remote wake-up, and is widely and effectively applied to electronic products that can be remotely controlled.
[0130] Optionally, the server stores a state of the controlled device, the state of the controlled device including a low-power consumption state or a non-low-power consumption state; and the sending module is specifically configured to:
[0131] 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 works, send a message indicating that the controlled device is in a low-power consumption state to the user equipment, so that the user equipment calls an instruction indicating that a wake-up packet is sent;
[0132] Upon receiving the instruction sent by the user equipment for indicating sending the wake-up packet, 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, and when the comparison is consistent, it is determined to wake up the master unit of the controlled device.
[0133] Optionally, the processing module is specifically used for:
[0134] The target message is sent to the user equipment, so that the user equipment triggers a predefined function to generate a target instruction when receiving the target message;
[0135] The target instruction sent by the user equipment is received, and the target instruction is sent to the master unit, so that the master unit performs an operation corresponding to the predefined function and displays on the user equipment.
[0136] Optionally, the processing module is further used for:
[0137] If it is queried that the controlled device is in a non-low-power consumption state, a target instruction is sent to the master unit, so that the master unit performs an operation corresponding to the predefined function and displays on the user equipment;
[0138] The target instruction is generated by the user equipment by triggering the predefined function.
[0139] Optionally, the sending module is further used for:
[0140] If the heartbeat packet sent by the WiFi unit is received within a heartbeat period, it is determined that the controlled device is in a heartbeat state in which the WiFi unit works, and a communication link with the controlled device is maintained in an MQTT manner.
[0141] Optionally, if the controlled device is in a non-low-power consumption state, the heartbeat packet is sent by the master unit, and the processing module is further used for:
[0142] If the heartbeat packet sent by the master unit is received within a heartbeat period, it is determined that the controlled device is in a heartbeat state in which the master unit works, and a communication link with the controlled device is maintained in an MQTT manner.
[0143] The device provided by the embodiment of the application can implement the method of the embodiment as shown in Figures 1-2 The implementation principle and technical effects are similar, and details are not repeated here.
[0144] As shown in Figure 6 , Figure 6The structural schematic diagram of an information processing device provided by another embodiment of the present application is shown. The information processing device is applied to a user equipment; the information processing device can include:
[0145] The sending module 601 is configured to send a query request to a server, so that the server queries a state of a controlled device, and the controlled device includes a WiFi unit and a master control unit.
[0146] The first processing module 602 is configured to, when receiving a message sent by the server and indicating that the controlled device is in a low-power consumption state, invoke an instruction indicating sending of a wake-up packet, and send the instruction indicating sending of the 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 master control unit of the controlled device.
[0147] The second processing module 603 is configured to, when receiving a target message sent by the server and indicating a non-low-power consumption state, send a target instruction to the master control unit, to instruct the master control unit to perform a corresponding target function, the target instruction being generated based on the target message, and the target message being sent by the master control unit to the server.
[0148] In the embodiment, by setting the sending module 601, the first processing module 602 and the second processing module 603, when the user equipment triggers a certain function operation, the server queries the state of the electronic device, if the electronic device is in a low-power consumption state, the server forwards the message of the low-power consumption state to the client, the client invokes a 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 master control unit of the electronic device, after the master control unit is powered on, the message of the non-low-power consumption state is sent to the server, and the server forwards the message to the client, then the client sends an instruction of using a certain function to the server, the server forwards the instruction to the master control unit to execute or the client executes the instruction through a certain protocol to the master control unit, the function is realized through the ordinary WiFi module (i.e. the WiFi unit), the master control unit and the server, the bidirectional keep-alive and remote wake-up capability are realized under the premise of low cost, and the electronic products that can be remotely controlled are widely and effectively applied.
[0149] The device provided by the embodiment of the present application can realize the method of the embodiments shown in Figure 1 and Figure 3 The implementation principles and technical effects are similar, and details are not repeated here.
[0150] As shown in Figure 7 , Figure 7The structural schematic diagram of the information processing device provided in another embodiment of the present application is shown. The information processing device is applied to a master control unit of a controlled device; the information processing device can include:
[0151] The sending module 701 is configured to report the state of the controlled device to the server, so that the server queries the state of the controlled device according to a query request of the user terminal, and the controlled device includes a WiFi unit and a master control unit.
[0152] The first processing module 702 is configured to, when receiving a wake-up instruction sent by the WiFi unit, perform a power-on operation and send a target message indicating a non-low-power-consumption state to the server, so that the server sends the target message to the user device; wherein the wake-up instruction is that the user device sends a wake-up packet to the WiFi unit, so that the WiFi unit is determined according to the wake-up packet; the wake-up packet is that when the server queries that the controlled device is in a low-power-consumption state and determines that the WiFi unit works in a heartbeat state, a message indicating that the controlled device is in a low-power-consumption state is sent to the user device, so that the user device determines to send.
[0153] The second processing module 703 is configured to, when receiving a target instruction sent by the user device, execute a corresponding target function, and the target instruction is generated by the user device based on the target message.
[0154] In the embodiment, by setting the sending module 701, the first processing module 702 and the second processing module 703, when the user device triggers a certain function operation, the server queries the state of the electronic device, if in a low-power-consumption state, the server forwards the low-power-consumption state message to the client, 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 master control unit of the electronic device, after the master control unit is powered 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 master control unit to execute or the client executes it through a certain protocol to the master control unit, which can be realized through the ordinary WiFi module (i.e. the WiFi unit), the master control unit and the server, can ensure low cost, realizes the ability of bidirectional keep-alive and remote wake-up, and is widely and effectively applied to electronic products that can be remotely controlled.
[0155] The device provided in the embodiments of the present application can realize the method of the embodiments shown in Figure 1 and Figure 4 The implementation principles and technical effects are similar, and will not be described here.
[0156] In combination with Figure 1As shown in the figure, this application embodiment provides a controlled device, including a WiFi unit and a main control unit;
[0157] The main control unit is used to execute the method described in the third aspect.
[0158] Specifically, the WiFi unit determines whether to wake up the main control unit of the controlled device based on the wake-up packet. If the main control unit is woken up, the main control unit sends a target message indicating that it is in a non-low power state to the server so that the server sends the target message to the user device.
[0159] If the main control unit receives a target instruction sent by the user equipment, the main control unit executes the corresponding target function. The target instruction is generated by the user equipment based on the target message.
[0160] The controlled device provided in this application embodiment can achieve the above-mentioned... Figures 1-4 The methods in the embodiments shown are similar in principle and technical effect, and will not be described again here.
[0161] Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. Figure 8 As shown, the device 800 provided in this embodiment includes a processor 801 and a memory communicatively connected to the processor. The processor 801 and the memory 802 are connected via a bus 803.
[0162] In the specific implementation process, the processor 801 executes the computer execution instructions stored in the memory 802, causing the processor 801 to execute the method in the above method embodiment.
[0163] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0164] In the above Figure 8 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0165] The memory can include a high-speed RAM memory and can also include a non-volatile storage NVM, such as at least one disk memory.
[0166] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0167] The embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, an information processing method of the above method embodiment is realized.
[0168] The embodiment of the present application further provides a computer program product, comprising a computer program, and when a processor executes the computer program, an information processing method as described above is realized.
[0169] The computer readable storage medium described above, the 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 storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that a general-purpose or special-purpose computer can access.
[0170] An exemplary readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the device.
[0171] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program executes to perform the steps of the above-mentioned method embodiments; and the foregoing storage medium includes various storage media that can store program codes, such as ROM, RAM, magnetic disk or optical disk.
[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. An information processing method characterized by comprising: Applied to a server, the method comprises: Receiving a query request sent by a user equipment, to query a state of a controlled device, the controlled device comprising a WiFi unit and a master control unit; wherein the WiFi unit is only used for transmitting and receiving packets and waking up the master control unit, and does not perform business logic processing; If the controlled device is found to be in a low-power 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, so that the WiFi unit compares the wake-up packet with a predefined message packet to determine whether to wake up the master control unit of the controlled device; the wake-up packet is a non-TLS encrypted heartbeat packet of a fixed format; If a target message indicating a non-low-power state is received from the master control unit, the target message is sent to the user equipment, so that the user equipment sends a target instruction to the master control unit to instruct the master control unit to perform a corresponding target function, the target instruction being generated by the user equipment based on the target message.
2. The method of claim 1, wherein, The server stores the state of the controlled device, and the state of the controlled device comprises a low-power state or a non-low-power state; If the controlled device is found to be in a low-power 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, so that the WiFi unit compares the wake-up packet with a predefined message packet to determine whether to wake up the master control unit of the controlled device; the wake-up packet is a non-TLS encrypted heartbeat packet of a fixed format; If the controlled device is found to be in a low-power 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 state is sent to the user equipment, so that the user equipment calls an instruction for sending a wake-up packet; If the user equipment sends an instruction for sending a wake-up packet, 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, and determines to wake up the master control unit of the controlled device when the comparison is consistent.
3. The method according to claim 1 or 2, characterized in that, The target message is sent to the user equipment, so that the user equipment sends a target instruction to the master control unit to instruct the master control unit to perform a corresponding target function, which comprises: The target message is sent to the user equipment, so that the user equipment triggers a predefined function when receiving the target message to generate a target instruction; The target instruction sent by the user equipment is received, and the target instruction is sent to the master control unit, so that the master control unit performs an operation corresponding to the predefined function, and displays on the user equipment.
4. The method according to claim 1 or 2, characterized in that, The method further comprises: If the controlled device is found to be in a non-low-power state, a target instruction is sent to the master control unit, so that the master control unit performs an operation corresponding to a predefined function, and displays on the user equipment; The target instruction is generated by the user equipment by triggering the predefined function.
5. The method according to claim 1 or 2, characterized in that, The determining that the controlled device is in the heartbeat state of the WiFi unit comprises: If the heartbeat packet sent by the WiFi unit is received within a heartbeat period, it is determined that the controlled device is in the heartbeat state of the WiFi unit, and a communication link with the controlled device is maintained in the MQTT manner.
6. The method of claim 5, wherein, If the controlled device is in a non-low-power-consumption state, the heartbeat packet is sent by the master control unit; the method further comprises: If the heartbeat packet sent by the master control unit is received within a heartbeat period, it is determined that the controlled device is in the heartbeat state of the master control unit, and a communication link with the controlled device is maintained in the MQTT manner.
7. An information processing method characterized by comprising: The method applied to a user device comprises: Sending a query request to a server to make the server query a state of a controlled device, the controlled device comprising a WiFi unit and a master control unit; wherein the WiFi unit is only used for transceiving a packet and waking up the master control unit, and does not perform business logic processing; If a message sent by the server and used for indicating that the controlled device is in a low-power-consumption state is received, an instruction used for indicating that a wake-up packet is sent is called, and the instruction used for indicating that the wake-up packet is sent is sent to the server, to make the server send the wake-up packet to the WiFi unit, to compare the wake-up packet with a predefined message packet to determine whether to wake up the master control unit of the controlled device; the wake-up packet is a fixed-format non-TLS encrypted heartbeat packet; If a target message sent by the server and used for indicating a non-low-power-consumption state is received, a target instruction is sent to the master control unit, to instruct the master control unit to perform a corresponding target function, the target instruction being generated based on the target message, and the target message being sent by the master control unit to the server.
8. An information processing method characterized by comprising: The method applied to a master control unit comprises: Reporting a state of a controlled device to a server, to make the server query the state of the controlled device according to a query request of a user device, the controlled device comprising a WiFi unit and a master control unit; wherein the WiFi unit is only used for transceiving a packet and waking up the master control unit, and does not perform business logic processing; If a wake-up instruction sent by the WiFi unit is received, a power-on operation is performed and a target message used for indicating a non-low-power-consumption state is sent to the server, to make the server send the target message to a user device; wherein the wake-up instruction is determined by the user device sending a wake-up packet to the WiFi unit, to make the WiFi unit compare the wake-up packet with a predefined message packet; the wake-up packet is determined by the server querying that the controlled device is in a low-power-consumption state and determining that the WiFi unit works in a heartbeat state, and sending a message used for indicating that the controlled device is in a low-power-consumption state to the user device, to make the user device determine to send; the wake-up packet is a fixed-format non-TLS encrypted heartbeat packet. If the 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. An electronic device, comprising: Comprise: A processor, and a memory connected in communication with the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to realize the information processing method in any one of claims 1-8.
10. A device to be controlled, characterized in that Comprise a WiFi unit and a master control unit; Wherein, the master control unit is used to execute the information processing method in claim 8.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and when the processor executes the computer program, the information processing method in any one of claims 1 to 8 is realized.
12. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the information processing method in any one of claims 1-8.
Citation Information
Patent Citations
Equipment wake-up method, system and equipment
CN106714281A
Intelligent door lock control method and device, storage medium and electronic equipment
CN113850938A