Equipment awakening method and device, electronic equipment and computer readable storage medium
By switching to a low-power mode in standby mode and parsing valid data packets, the problem of high power consumption of network card drivers in the standby state of third-party devices is solved, thereby reducing power consumption and improving user experience without affecting information reception.
Patent Information
- Application Number
- CN202410629187.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-11-21
AI Technical Summary
When a third-party device is in standby mode, the network card driver continues to work, resulting in unnecessary power consumption and affecting the user experience.
In standby mode, the device switches to low power mode, retaining only the data receiving function. It receives and parses valid data packets, and wakes up the device after determining whether the parsing result matches the preset result.
Reduce power consumption in standby mode, improve user experience, and ensure that information reception is not affected.
Smart Images

Figure CN120994256A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronics, in particular to a device wake-up method and device, an electronic device and a computer readable storage medium. BACKGROUND
[0002] With the development of society, in life, entertainment and work, users often encounter the demand of pushing handheld services and content to a third-party device, but when the third-party device is in standby state, the handheld device needs to discover and wake up the third-party device, and then push the service. At present, in the process of waking up the third-party device, if the third-party device is in standby state, the network card driver of the third-party device will be in working state, used to receive and analyze the information sent by the handheld device, and then return to working state from standby state, thereby having the ability to receive and process the pushed service.
[0003] However, since the network card driver of the third-party device will continue to work in standby state, unnecessary power consumption of the third-party device is caused, and the user has a poor use experience. SUMMARY
[0004] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, one object of the present application is to provide a device wake-up method which can reduce the power consumption of a device to be woken up in standby state without affecting the reception of information sent by a user, and improve the user's use experience.
[0005] To this end, a second object of the present application is to provide a device wake-up device.
[0006] To this end, a third object of the present application is to provide an electronic device.
[0007] To this end, a fourth object of the present application is to provide a computer readable storage medium.
[0008] To achieve the above object, an embodiment of the first aspect of the present application discloses a device wake-up method, comprising: determining that a device to be woken up is in standby state, and controlling the device to be woken up to switch to a low-power mode, wherein in the low-power mode, the device to be woken up only retains a data receiving function; determining that the device to be woken up receives a valid data packet, and controlling a main chip of the device to be woken up to be powered on to analyze the valid data packet and obtain an analysis result; judging whether the analysis result matches a preset result; if yes, waking up the device to be woken up, and after the device to be woken up is woken up, activating more functions than in the low-power mode.
[0009] According to the device wake-up method provided in the embodiments of the present application, when it is determined that the device to be woken up is in a standby state, the device to be woken up can be controlled to switch to a low-power-consumption mode, valid data packets are received and analyzed in the low-power-consumption mode, and the state of the device to be woken up is controlled according to the matching of the analysis result and a preset result, so that the power consumption of the device to be woken up in the standby state is reduced and the user experience is improved without affecting the reception of information sent by a user.
[0010] In addition, the device wake-up method provided in the embodiments of the present application can have the following additional technical features.
[0011] In some examples, the controlling the device to be woken up to switch to the low-power-consumption mode comprises controlling the device to be woken up to activate only a hardware simulation module to retain the data receiving function.
[0012] In some examples, before the determining that the device to be woken up receives the valid data packet, the method comprises receiving a data packet sent by a data sender, wherein the data sender is connected to the same network as the device to be woken up; and determining whether the data packet is a valid data packet.
[0013] In some examples, the determining whether the data packet is a valid data packet comprises determining whether a message included in the data packet is a preset type of message; if yes, determining that the data packet is a valid data packet, and if not, determining that the data packet is not a valid data packet.
[0014] In some examples, the preset type of message comprises a multicast message.
[0015] In some examples, the controlling the main chip of the device to be woken up to be powered on comprises raising the GPIO pin level of the main chip to power on the main chip.
[0016] In some examples, the analyzing the valid data packet to obtain an analysis result comprises analyzing a message included in the valid data packet to obtain a target message; determining whether the target message is a preset standard message; if yes, analyzing the target message to obtain a target field, and if not, controlling the device to be woken up to remain in the standby state and switch to the low-power-consumption mode.
[0017] In some examples, the preset standard message comprises an mDNS message.
[0018] In some examples, the target field is a query field in an mDNS message.
[0019] In some examples, the message included in the valid data packet is parsed, including: the MAC address, the IP address and the port of the message included in the valid data packet are parsed respectively to obtain the target message.
[0020] In some examples, the determination of whether the parsing result matches the preset result includes: determining whether the target field matches a preset field in the preset result; if yes, the device to be woken up is woken up, otherwise, the device to be woken up is not woken up.
[0021] In some examples, the waking up of the device to be woken up includes: controlling the device to be woken up to enter a semi-wakeup state, wherein in the semi-wakeup state, the device to be woken up activates more partial functions than in the low-power mode.
[0022] In some examples, after controlling the device to be woken up to be in the semi-wakeup state, further including: if a control command sent by the data sending end is received within a preset time, the device to be woken up is controlled to enter a full-wakeup state in response to the control command, otherwise, the device to be woken up is controlled to enter a standby state and switch to the low-power mode, wherein in the full-wakeup state, the device to be woken up activates all functions and executes the control command.
[0023] To achieve the above object, the embodiment of the second aspect of the present application discloses a device waking up apparatus, comprising: a first control module, configured to control a device to be woken up to switch to a low-power mode when it is determined that the device to be woken up is in a standby state, wherein in the low-power mode, the device to be woken up only retains a data receiving function; a second control module, configured to control a main chip of the device to be woken up to be powered on to parse a valid data packet when it is determined that the device to be woken up receives the valid data packet, to obtain a parsing result; a judging module, configured to judge whether the parsing result matches a preset result; and a waking up module, configured to wake up the device to be woken up when the parsing result matches the preset result, so that the device to be woken up enters a working mode, wherein in the working mode, all functions of the device to be woken up are activated.
[0024] The device waking up apparatus according to the embodiment of the present application can control the device to be woken up to switch to the low-power mode when it is determined that the device to be woken up is in the standby state, receive and parse the valid data packet in the low-power mode, and control the state of the device to be woken up according to the matching of the parsing result and the preset result, so as to reduce the power consumption of the device to be woken up in the standby state without affecting the reception of the information sent by the user, and improve the user experience.
[0025] To achieve the above object, the embodiment of the third aspect of the present application discloses an electronic device.
[0026] In some examples, the electronic device comprises the device wake-up apparatus as described in the embodiments of the second aspect of the present application.
[0027] In some other examples, the electronic device comprises a processor, a memory, and a device wake-up program stored on the memory and executable on the processor, and the device wake-up program, when executed by the processor, implements the device wake-up method as described in the embodiments of the first aspect of the present application.
[0028] According to the electronic device of the embodiments of the present application, when it is determined that the device to be woken up is in the standby state, the device to be woken up can be controlled to switch to the low-power-consumption mode, the valid data packet is received and analyzed in the low-power-consumption mode, and the state of the device to be woken up is controlled according to the matching of the analysis result and the preset result, so that the power consumption of the device to be woken up in the standby state is reduced and the user's use experience is improved without affecting the reception of the information sent by the user.
[0029] To achieve the above object, the fourth aspect of the present application discloses a computer readable storage medium, and the computer readable storage medium stores a device wake-up program, and the device wake-up program, when executed by a processor, implements the device wake-up method as described in the embodiments of the first aspect of the present application.
[0030] According to the computer readable storage medium of the embodiments of the present application, the device wake-up program stored on the computer readable storage medium, when executed by a processor, can control the device to be woken up to switch to the low-power-consumption mode if it is determined that the device to be woken up is in the standby state, receive and analyze the valid data packet in the low-power-consumption mode, and control the state of the device to be woken up according to the matching of the analysis result and the preset result, so that the power consumption of the device to be woken up in the standby state is reduced and the user's use experience is improved without affecting the reception of the information sent by the user.
[0031] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0032] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, taken in conjunction with the accompanying drawings, in which:
[0033] Figure 1 is a flowchart of a device wake-up method according to an embodiment of the present application;
[0034] Figure 2 is a flowchart of a device wake-up method according to an embodiment of the present application;
[0035] Figure 3is a structural schematic diagram of a device wake-up method according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] Embodiments of the present application are described in detail below with reference to the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary, and embodiments of the present application are described in detail below.
[0037] The following describes Figures 1-3 A device wake-up method, device, electronic device, and computer-readable storage medium according to embodiments of the present application are described.
[0038] Figure 1 is a flowchart of a device wake-up method according to an embodiment of the present application. As shown in Figure 1 The device wake-up method includes the following steps.
[0039] Step S1: When it is determined that the device to be woken up is in a standby state, control the device to be woken up to switch to a low-power mode, wherein in the low-power mode, the device to be woken up only retains a data receiving function.
[0040] Specifically, in the process of waking up the device to be woken up, it can be determined that the device to be woken up is in a standby state, i.e., the device to be woken up is not executing any active task and is in an idle or dormant state, by monitoring the time interval of user interaction (such as a key, touch screen operation, voice instruction, etc.), but not limited to this. At this time, the device to be woken up can be controlled to switch to a low-power mode, so that the device to be woken up only retains a data receiving function, so that the device to be woken up can receive an external wake-up signal at any time and be woken up again. It can be understood that the device to be woken up entering the low-power mode includes but is not limited to turning off most components of the device to be woken up, such as turning off the display screen, etc., to reduce the power consumption of the device to be woken up.
[0041] Step S2: When it is determined that the device to be woken up receives a valid data packet, control the main chip of the device to be woken up to be powered on to analyze the valid data packet to obtain an analysis result.
[0042] Specifically, after the device to be woken up switches to the low-power mode, the network interface (such as a wireless network card, etc.) of the device to be woken up can continuously listen to and receive data packets sent externally and perform validity judgment. When it is determined that the device to be woken up receives a valid data packet, the main chip of the device to be woken up can be powered on by sending a control signal, so that the device to be woken up analyzes the valid data packet, including but not limited to analyzing the type of the valid data packet, extracting key field information, etc., to obtain an analysis result.
[0043] Step S3: Determine whether the analysis result matches a preset result.
[0044] Specifically, after obtaining the analysis result, it can be judged whether the analysis result matches the preset result defined in advance in the to-be-woken device for comparison with the analysis result, including but not limited to judging whether the specific field after analyzing the valid data packet meets the preset condition, so as to perform corresponding operation according to the matching result. Wherein, the preset result can be determined according to the functional requirements, wake-up conditions and other factors of the to-be-woken device.
[0045] Step S4: if yes, the to-be-woken device is woken up, and after the to-be-woken device is woken up, more functions than in the low-power mode are activated.
[0046] Specifically, in the process of judging whether the analysis result matches the preset result, if the analysis result matches the preset result, it means that the valid data packet received by the to-be-woken device meets the wake-up condition of the to-be-woken device after analysis, at this time, the wake-up mechanism can be triggered to wake up the to-be-woken device from the low-power mode, and more functions than in the low-power mode are activated, including but not limited to activating the hardware components in the sleep or off state before, such as processor, display screen and sensor, etc.
[0047] Therefore, the above-mentioned device wake-up method, when determining that the to-be-woken device is in standby state, can control the to-be-woken device to switch to the low-power mode, receive and analyze the valid data packet in the low-power mode, and control the state of the to-be-woken device according to the matching of the analysis result and the preset result, so as to reduce the power consumption of the to-be-woken device in standby state without affecting the reception of information sent by the user, and improve the user's experience.
[0048] In an embodiment of the present application, controlling the to-be-woken device to switch to the low-power mode includes: controlling the to-be-woken device to activate only the hardware simulation module to retain the data receiving function.
[0049] Specifically, in the process of controlling the to-be-woken device to switch to the low-power mode, the to-be-woken device can be controlled to activate only the hardware simulation module, so that the to-be-woken device retains the data receiving function in the low-power state. Wherein, the hardware simulation module includes but is not limited to the network card driver of the to-be-woken device. It can be understood that the hardware simulation module usually has low power consumption when running, which can make the to-be-woken device maximize the reduction of energy consumption while maintaining timely response.
[0050] In an embodiment of the present application, before determining that the to-be-woken device receives the valid data packet, it includes: receiving the data packet sent by the data sending end, wherein the data sending end and the to-be-woken device are connected in the same network; judging whether the data packet is a valid data packet.
[0051] Specifically, before determining that the to-be-woken-up device receives the valid data packet, the to-be-woken-up device is in a listening state, can continuously receive the data packet sent by the data sending end connected in the same network (for example, a local area network, a wide area network or the Internet, etc.) and perform validity judgment. Specifically, in the same network, the data sending end and the to-be-woken-up device can communicate through the network, when the data sending end sends the data arranged into a data packet according to the network protocol, the to-be-woken-up device can receive the data packet through the network interface of the to-be-woken-up device, and perform validity judgment on the received data packet, so as to facilitate the to-be-woken-up device to take corresponding response according to the judgment result.
[0052] In an embodiment of the present application, the method for judging whether the data packet is a valid data packet comprises: judging whether the message included in the data packet is a preset type of message; if yes, judging that the data packet is a valid data packet, otherwise, judging that the data packet is not a valid data packet.
[0053] Specifically, when the to-be-woken-up device receives the data packet, the type of the message included in the data packet can be extracted by analyzing the data packet, and then whether the data packet received by the to-be-woken-up device is a valid data packet can be judged according to the type of the message included in the data packet. Specifically, if the message included in the data packet is a preset type of message, it can be judged that the data packet is a valid data packet, and if the message included in the data packet is not a preset type of message, it can be judged that the data packet is not a valid data packet.
[0054] In specific embodiments, the preset type of message includes but is not limited to being set when the to-be-woken-up device is initialized or configured according to the functional requirements of the to-be-woken-up device, the communication protocol, or a specific application scenario.
[0055] In an embodiment of the present application, the preset type of message includes a multicast message.
[0056] Specifically, the preset type of message includes a multicast message, and the point-to-multipoint data transmission can be realized through the multicast message, that is, the data can be transmitted from one data sending end to multiple specified receiving ends in the same network at the same time. It can be understood that, since the multicast message can be sent to specific receiving ends, the network bandwidth can be saved and unnecessary communication can be reduced, and at the same time, the security of communication is enhanced.
[0057] In an embodiment of the present application, the method for controlling the main chip of the to-be-woken-up device to be powered on comprises: powering on the main chip by pulling up the GPIO pin level of the main chip.
[0058] Specifically, when the main chip of the to-be-woken device is powered on, the main chip can be powered on by pulling up the GPIO (General Purpose Input / Output) pin level of the main chip, that is, when the GPIO pin is in a high level state, the power-on program of the main chip can be triggered. Specifically, when the to-be-woken device receives a valid data packet, the GPIO pin level of the main chip originally in a low level or default state can be pulled up to a high level through internal circuit operation, so that the main chip starts to be powered on, thereby realizing accurate control of the power-on of the main chip.
[0059] In an embodiment of the present application, the valid data packet is parsed to obtain a parsing result, including: parsing a message included in the valid data packet to obtain a target message; determining whether the target message is a preset standard message; if yes, parsing the target message to obtain a target field, otherwise, controlling the to-be-woken device to remain in a standby state and switching to a low-power mode.
[0060] Specifically, in the process of parsing the valid data packet to obtain a parsing result, the to-be-woken device can parse the message included in the valid data packet, extract the core information of the message included in the valid data packet, determine the format of the message according to the core information, and thereby obtain the target message.
[0061] Further, after obtaining the target message, it can be determined whether the target message is a preset standard message defined in advance in the to-be-woken device. If yes, the target message can be parsed to extract a target field from the target message for corresponding operation. If not, it indicates that the to-be-woken device does not need to be woken up, and the to-be-woken device is controlled to remain in a standby state and switch to a low-power mode, so as to effectively save energy.
[0062] In an embodiment of the present application, the preset standard message includes an mDNS message.
[0063] Specifically, the preset standard message includes an mDNS (multicast DNS) message, which is used to realize mutual communication between the to-be-woken device and a data sending end in the same network. When the to-be-woken device identifies that the target message is an mDNS message, the mDNS message can be parsed according to the rules of the mDNS protocol to extract a key field in the mDNS message.
[0064] In an embodiment of the present application, the target field is a query field in the mDNS message.
[0065] Specifically, the target field is a query field in the mDNS packet, which is used to indicate whether the to-be-woken device receiving the mDNS packet can be woken up according to the mDNS packet. For example, when the data sending end communicates with the to-be-woken device, the data sending end can construct the mDNS packet and fill the query field in the mDNS packet. When the to-be-woken device receives the mDNS packet and identifies the query field in the mDNS packet, the to-be-woken device can check whether the to-be-woken device has information matching the query name, and control the state of the to-be-woken device according to the matching result.
[0066] In an embodiment of the present application, the packet included in the valid data packet is parsed, including: the MAC address, IP address and port of the packet included in the valid data packet are parsed respectively to obtain a target packet.
[0067] Specifically, in the process of parsing the packet included in the valid data packet, the MAC (Media Access Control) address, IP (Internet Protocol) address and port of the packet included in the valid data packet can be parsed respectively, that is, through an internally preset parsing algorithm, including but not limited to filtering the MAC address, IP address and port of the packet included in the valid data packet in stmmac_rx of stmmac_main.c, so that the target packet can be determined. It can be understood that in the process of parsing the packet included in the valid data packet, the MAC address is used to represent the physical layer address, the IP address is used to represent the network layer address, and the port is used to represent the access point.
[0068] In an embodiment of the present application, whether the parsing result matches the preset result is judged, including: whether the target field matches a preset field in the preset result is judged; if yes, the to-be-woken device is woken up, otherwise, the to-be-woken device is not woken up.
[0069] Specifically, in the process of judging whether the parsing result matches the preset result, whether the target field matches a preset field in the preset result can be judged. If the target field and the preset field can match, it indicates that the valid data packet received by the to-be-woken device after parsing meets the wake-up condition of the to-be-woken device. At this time, the wake-up mechanism can be triggered to perform the wake-up action to wake up the to-be-woken device from the low-power mode, and activate more functions than in the low-power mode, including but not limited to activating hardware components in a sleep or off state before, such as processors, display screens and sensors, etc. If the target field and the preset field do not match, it indicates that the valid data packet received by the to-be-woken device after parsing does not meet the wake-up condition of the to-be-woken device. At this time, the to-be-woken device is not woken up, so as to effectively save energy consumption.
[0070] In one embodiment of the present application, the method of waking up the to-be-woken device comprises: controlling the to-be-woken device to enter a semi-waking state, wherein in the semi-waking state, the to-be-woken device activates more partial functions than in the low-power mode.
[0071] Specifically, in the process of waking up the to-be-woken device, the to-be-woken device can be controlled to enter a semi-waking state first, i.e., the to-be-woken device activates more partial functions than in the low-power mode but still does not completely start all functions after receiving a valid wake-up signal, for example, when the to-be-woken device in the standby state receives a valid data packet sent by the data sending end, if the target field obtained after parsing the valid data packet matches the preset field, more internal hardware (such as a video processor) of the to-be-woken device can be in a start state, but the display screen of the to-be-woken device can be in an off state, i.e., the display screen of the to-be-woken device is in a closed state, at this time, the to-be-woken device is in a semi-waking state.
[0072] In one embodiment of the present application, after controlling the to-be-woken device to be in the semi-waking state, the method further comprises: if a control command sent by the data sending end is received within a preset time, responding to the control command, controlling the to-be-woken device to enter a fully-waking state, otherwise, controlling the to-be-woken device to enter a standby state and switching to a low-power mode, wherein in the fully-waking state, the to-be-woken device activates all functions and executes the control command.
[0073] Specifically, after the to-be-woken device is in the semi-waking state, the to-be-woken device can continuously listen to the control command from the data sending end, if the control command sent by the data sending end is received within a preset time, the to-be-woken device enters a fully-waking state in response to the control instruction, i.e., all functions of the to-be-woken device are activated, including the display screen, the audio output player and the internal operation software, etc., which can complete the corresponding operation according to the received signal, for example, perform screen projection. If no control command is received within the preset time, it means that the previous wake-up may be a casual event, then the to-be-woken device returns to the standby state and switches to the low-power mode, thereby avoiding the to-be-woken device to remain active when it is not needed, effectively saving energy.
[0074] In a specific embodiment, taking television as an example, when the television enters a standby state and is in a low-power mode, if a user wants to watch the television but cannot find a physical remote controller, the user can send a data packet to the television by using an App on a mobile phone. The drive network card of the television can be activated after detecting the data packet, and the main chip of the television is powered on. When the data packet is detected to be valid, the data packet is parsed. If the result of the parsing meets preset conditions in the television, the television enters a semi-waking state. For example, the internal operation of the television is started, but the screen is still in a black screen state. Further, when the television receives a control instruction sent by the mobile phone, the television can be woken up, for example, the television screen is brightened, and sound and pictures appear, thereby realizing remote control of the television.
[0075] Reference will be made to the drawings below Figure 2 The device waking method of the embodiment of the application is described.
[0076] In step S11, the device to be woken up is in a standby state and is in a low-power mode.
[0077] In step S12, a data sending end sends a data packet.
[0078] In step S13, the device to be woken up receives the data packet.
[0079] In step S14, it is judged whether the message included in the data packet is a preset type of message. If yes, step S16 is executed, otherwise, step S15 is executed.
[0080] In step S15, it is judged that the data packet is invalid, and step S11 is executed.
[0081] In step S16, it is judged that the data packet is valid.
[0082] In step S17, the main chip of the device to be woken up is powered on.
[0083] In step S18, the valid data packet is parsed to obtain a parsing result.
[0084] In step S19, it is judged whether the target message is a preset standard message. If yes, step S20 is executed, otherwise, step S11 is executed.
[0085] In step S20, the target message is parsed to obtain a target field.
[0086] In step S21, it is judged whether the target field matches a preset field in a preset result. If yes, step S22 is executed, otherwise, step S11 is executed.
[0087] In step S22, the device to be woken up is controlled to enter a semi-waking state.
[0088] Step S23, judging whether the control command sent by the data sending end is received within the preset time, if yes, executing step S24, otherwise, executing step S11.
[0089] Step S24, controlling the to-be-woken device to enter a full wake-up state.
[0090] In summary, according to the device wake-up method of the embodiment of the application, when it is determined that the to-be-woken device is in the standby state, the to-be-woken device can be controlled to switch to the low-power-consumption mode, the valid data packet is received and analyzed in the low-power-consumption mode, and the state of the to-be-woken device is controlled according to the matching condition of the analysis result and the preset result, so that the power consumption of the to-be-woken device in the standby state is reduced and the user's use experience is improved without affecting the reception of the information sent by the user.
[0091] Further embodiments of the application also provide a device wake-up apparatus 100, as shown in the figure. Figure 3 The device wake-up apparatus 100 comprises a first control module 110, a second control module 120, a judging module 130 and a wake-up module 140.
[0092] The first control module 110 is configured to control the to-be-woken device to switch to the low-power-consumption mode when it is determined that the to-be-woken device is in the standby state, wherein in the low-power-consumption mode, the to-be-woken device only retains the data receiving function.
[0093] The second control module 120 is configured to control the main chip of the to-be-woken device to be powered on to analyze the valid data packet and obtain an analysis result when it is determined that the to-be-woken device receives the valid data packet.
[0094] The judging module 130 is configured to judge whether the analysis result matches a preset result.
[0095] The wake-up module 140 is configured to wake up the to-be-woken device to make the to-be-woken device enter the working mode when the analysis result matches the preset result, wherein in the working mode, all functions of the to-be-woken device are activated.
[0096] In an embodiment of the application, before it is determined that the to-be-woken device receives the valid data packet, the judging module 130 is further configured to receive a data packet sent by a data sending end, wherein the data sending end and the to-be-woken device are connected in the same network; and judge whether the data packet is a valid data packet.
[0097] In an embodiment of the application, when judging whether the data packet is a valid data packet, the judging module 130 is specifically configured to judge whether a message included in the data packet is a preset type of message; if yes, judge that the data packet is a valid data packet, otherwise, judge that the data packet is not a valid data packet.
[0098] In an embodiment of the present application, the preset type of packet includes a multicast packet.
[0099] In an embodiment of the present application, when the main chip of the device to be woken up is powered on, the second control module 120 is specifically configured to power on the main chip by pulling up the GPIO pin level of the main chip.
[0100] In an embodiment of the present application, when the valid data packet is parsed to obtain the parsing result, the second control module 120 is specifically configured to parse the packet included in the valid data packet to obtain a target packet; determine whether the target packet is a preset standard packet; if yes, parse the target packet to obtain a target field, otherwise, control the device to be woken up to remain in a standby state and switch to a low-power mode.
[0101] In an embodiment of the present application, the preset standard packet includes an mDNS packet.
[0102] In an embodiment of the present application, the target field is a query field in the mDNS packet.
[0103] In an embodiment of the present application, when the packet included in the valid data packet is parsed, the second control module 120 is specifically configured to parse the MAC address, IP address and port of the packet included in the valid data packet to obtain a target packet.
[0104] In an embodiment of the present application, when it is determined whether the parsing result matches the preset result, the determination module 130 is specifically configured to determine whether the target field matches a preset field in the preset result; if yes, wake up the device to be woken up, otherwise, do not wake up the device to be woken up.
[0105] In an embodiment of the present application, when the device to be woken up is woken up, the wake-up module 140 is specifically configured to control the device to be woken up to enter a semi-wakeup state, wherein in the semi-wakeup state, the device to be woken up activates more partial functions than in the low-power mode.
[0106] In an embodiment of the present application, after the device to be woken up is controlled to be in the semi-wakeup state, the wake-up module 140 is further configured to, if a control command sent by the data sending end is received within a preset time, control the device to be woken up to enter a full-wakeup state in response to the control command, otherwise, control the device to be woken up to enter a standby state and switch to a low-power mode, wherein in the full-wakeup state, the device to be woken up activates all functions and executes the control command.
[0107] The device wake-up apparatus according to the embodiment of the present application can control the device to be woken to switch to a low-power-consumption mode when it is determined that the device to be woken is in a standby state, receive and analyze a valid data packet in the low-power-consumption mode, and control the state of the device to be woken according to the matching of the analysis result and a preset result, so that the power consumption of the device to be woken in the standby state is reduced and the user experience is improved without affecting the reception of information sent by the user.
[0108] To achieve the above object, the third aspect of the present application discloses an electronic device.
[0109] In some examples, the electronic device comprises the device wake-up apparatus according to the second aspect of the present application.
[0110] In other examples, the electronic device comprises a processor, a memory, and a device wake-up program stored in the memory and executable on the processor, and the device wake-up program, when executed by the processor, implements the device wake-up method according to the first aspect of the present application.
[0111] It should be noted that the specific implementation of the electronic device wake-up apparatus when performing device wake-up is similar to the specific implementation of the device wake-up method according to the first aspect of the present application, and therefore the detailed exemplary description of the process of the device wake-up apparatus performing device wake-up can be referred to the foregoing description of the device wake-up method, and to reduce redundancy, the detailed exemplary description is not repeated here.
[0112] The electronic device according to the embodiment of the present application can control the device to be woken to switch to a low-power-consumption mode when it is determined that the device to be woken is in a standby state, receive and analyze a valid data packet in the low-power-consumption mode, and control the state of the device to be woken according to the matching of the analysis result and a preset result, so that the power consumption of the device to be woken in the standby state is reduced and the user experience is improved without affecting the reception of information sent by the user.
[0113] A further embodiment of the present application also discloses a computer-readable storage medium having a device wake-up program stored thereon, and the device wake-up program, when executed by a processor, implements the device wake-up method according to the first aspect of the present application.
[0114] The computer-readable storage medium according to the embodiment of the present application, when the device wake-up program stored thereon is executed, can control the device to be woken to switch to a low-power-consumption mode when it is determined that the device to be woken is in a standby state, receive and analyze a valid data packet in the low-power-consumption mode, and control the state of the device to be woken according to the matching of the analysis result and a preset result, so that the power consumption of the device to be woken in the standby state is reduced and the user experience is improved without affecting the reception of information sent by the user.
[0115] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the exemplary description of the above terms does not necessarily mean the same embodiment or example.
[0116] Although the embodiments of the present application have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, alternatives, and variations can be made thereto without departing from the principles and spirit of the present application, the scope of which is defined by the claims and their equivalents.
Claims
1. A device wake-up method, the method comprising: The method comprises the steps of: determining that the to-be-awakened device is in a standby state, and controlling the to-be-awakened device to switch to a low-power mode, wherein in the low-power mode, the to-be-awakened device only retains a data receiving function; determining that the to-be-awakened device receives a valid data packet, and controlling a main chip of the to-be-awakened device to be powered on to analyze the valid data packet to obtain an analysis result; determining whether the analysis result matches a preset result; if yes, awakening the to-be-awakened device, and after the to-be-awakened device is awakened, activating more functions than in the low-power mode.
2. The device wake-up method of claim 1, wherein, controlling the to-be-awakened device to switch to a low-power mode, comprising: controlling the to-be-awakened device to only activate a hardware simulation module to retain the data receiving function.
3. The device wake-up method of claim 1, wherein, Before determining that the to-be-awakened device receives a valid data packet, comprising: receiving a data packet sent by a data sending end, wherein the data sending end and the to-be-awakened device are connected in the same network; determining whether the data packet is a valid data packet.
4. The device wake-up method of claim 1, wherein, The determination of whether the data packet is a valid data packet comprises: determining whether a message included in the data packet is a preset type of message; if yes, determining that the data packet is a valid data packet, otherwise, determining that the data packet is not a valid data packet.
5. The device wake-up method of claim 4, wherein, The preset type of message comprises a multicast message.
6. The device wake-up method of claim 1, wherein, Controlling the main chip of the to-be-awakened device to be powered on comprises: pulling up the GPIO pin level of the main chip to power on the main chip.
7. The device wake-up method of claim 1, wherein, Analyzing the valid data packet to obtain an analysis result comprises: analyzing a message included in the valid data packet to obtain a target message; determining whether the target message is a preset standard message; if yes, analyzing the target message to obtain a target field, otherwise, controlling the to-be-awakened device to remain in the standby state and switch to the low-power mode.
8. The device wake-up method of claim 7, wherein, The preset standard message comprises an mDNS message.
9. The device wake-up method of claim 8, wherein, The target field is a query field in the mDNS message.
10. The device wake-up method of claim 7, wherein, Analyzing the message included in the valid data packet comprises: analyzing the MAC address, IP address, and port of the message included in the valid data packet to obtain the target message.
11. The device wake-up method of claim 7, wherein, Determining whether the analysis result matches the preset result comprises: determining whether the target field matches a preset field in the preset result; if yes, awakening the to-be-awakened device, otherwise, not awakening the to-be-awakened device.
12. The device wake-up method of claim 11, wherein, The awakening of the to-be-awakened device comprises: controlling the to-be-awakened device to enter a semi-awakened state, wherein in the semi-awakened state, the to-be-awakened device activates more partial functions than in the low-power mode.
13. The device wake-up method of claim 12, wherein, After controlling the to-be-awakened device to be in the semi-awakened state, further comprising: if a control command sent by the data sending end is received within a preset time, responding to the control command, controlling the to-be-awakened device to enter a fully-awakened state, otherwise, controlling the to-be-awakened device to enter the standby state and switch to the low-power mode, wherein in the fully-awakened state, the to-be-awakened device activates all functions and executes the control command.
14. An apparatus for waking up a device, the apparatus comprising: The method comprises the steps of: The first control module is configured to control the to-be-woken device to switch to a low-power mode when it is determined that the to-be-woken device is in a standby state, wherein in the low-power mode, the to-be-woken device only retains a data receiving function; The second control module is configured to control a main chip of the to-be-woken device to be powered on to analyze the valid data packet and obtain an analysis result when it is determined that the to-be-woken device receives the valid data packet; The judging module is configured to judge whether the analysis result matches a preset result. The waking module is configured to wake up the to-be-woken device to make the to-be-woken device enter a working mode when the analysis result matches the preset result, wherein in the working mode, all functions of the to-be-woken device are activated.
15. An electronic device, the device waking apparatus of claim 14; or A processor, a memory, and a device waking program stored on the memory and executable on the processor, the device waking program, when executed by the processor, implements the device waking method of any one of claims 1-13.
16. A computer readable storage medium, the computer readable storage medium storing a device waking program, the device waking program, when executed by a processor, implements the device waking method of any one of claims 1-13.