Control method, device and system
By utilizing the operating system notification channel of the electronic device, the first device is controlled to switch from the standby state to the active state based on the notification message from the second device, solving the problem of disconnection of the network connection in the standby state, realizing rapid wake-up and network recovery, and improving user experience.
Patent Information
- Application Number
- CN202510127618.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-05-06
AI Technical Summary
When the electronic device enters standby state, its network connection is disconnected, affecting the smoothness of the user's collaborative work across devices. How to effectively wake up the electronic device in standby state has become an urgent problem.
The notification message from the second electronic device is obtained through the notification channel corresponding to the operating system of the first electronic device, and the first electronic device is controlled to switch from the standby state to the active state based on the message, and the network connection is restored.
It realizes rapid wake-up of electronic devices without affecting battery life, restores its network connection capabilities, and improves user experience and smoothness in collaborative work.
Smart Images

Figure CN119946785A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a control method, device and system. Background Art
[0002] When an electronic device enters standby mode, its network connection will be disconnected, making it impossible for other devices trying to access its resources to establish a connection, thus affecting the smoothness of cross-device collaboration for users. Given this negative impact on user experience, how to effectively wake up electronic devices in standby mode has become an urgent problem to be solved. Summary of the invention
[0003] This application provides the following technical solutions:
[0004] On one hand, the present application provides a control method, comprising:
[0005] Obtaining a first notification message from a second electronic device through a notification channel corresponding to an operating system of the first electronic device; the notification channel remains active when the first electronic device is in a first state;
[0006] It is determined that the first electronic device is currently in the first state, and based on the first notification message, the first electronic device is controlled to switch from the first state to a second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0007] The first notification message is generated when it is determined that the target application of the first electronic device is in an offline state.
[0008] The obtaining, through the notification channel corresponding to the operating system of the first electronic device, the first notification message from the second electronic device includes:
[0009] A first notification message from a second electronic device is obtained from a push notification server corresponding to the operating system of the first electronic device through a notification channel corresponding to the operating system of the first electronic device; the push notification server is used to receive the first notification message and an identifier of the notification channel from an application server corresponding to a target application in the first electronic device, and based on the identifier of the notification channel, select the notification channel to send the first notification message.
[0010] Before obtaining the first notification message from the second electronic device through the notification channel corresponding to the operating system of the first electronic device, the method further includes:
[0011] Requesting a notification channel from a push notification server corresponding to the operating system through a target application of the first electronic device, so that the push notification server creates a notification channel corresponding to the operating system and obtains an identifier of the notification channel;
[0012] Through the target application, the identifier of the notification channel and the device identifier of the first electronic device are sent to the application server corresponding to the target application, so that the application server associates and stores the identifier of the notification channel and the device identifier of the first electronic device, so that the first notification message from the second electronic device can be subsequently sent to the first electronic device based on the identifier of the notification channel and the device identifier of the first electronic device.
[0013] Based on the first notification message, controlling the first electronic device to switch from the first state to a second state includes:
[0014] Based on the first notification message, generating an input event;
[0015] Based on the input event, the first electronic device is controlled to switch from the first state to a second state.
[0016] The control method further comprises:
[0017] In the second state, obtaining a switching instruction of a target application in the second electronic device through a target application in the first electronic device;
[0018] Based on the switching instruction, the first electronic device is controlled to switch from the second state to the first state or the third state; in the second state, a first image interface is displayed on the display unit of the first electronic device, and in the third state, a second image interface is displayed on the display unit of the first electronic device, and the first image interface and the second image interface are different.
[0019] Another aspect of the present application provides a control method, comprising:
[0020] In response to a wake-up request of a second electronic device, obtaining a first notification message corresponding to the first electronic device and a device identification of the first electronic device from the second electronic device, wherein the wake-up request is generated when the second electronic device determines that a target application of the first electronic device is in an offline state;
[0021] Obtaining an identifier of a notification channel corresponding to a device identifier of the first electronic device;
[0022] The identifier of the notification channel and the first notification message are sent to a push notification server corresponding to the operating system, so that the push notification server selects a notification channel to send the first notification message to the first electronic device based on the identifier of the notification channel, so that the first electronic device obtains the first notification message through the notification channel, and based on the first notification message, controls the first electronic device to switch from the first state to the second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0023] The control method further comprises:
[0024] obtaining access credentials corresponding to the target application;
[0025] The step of sending the identifier of the notification channel and the first notification message to a push notification server corresponding to the operating system, so that the push notification server selects a notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device, comprises:
[0026] The identifier of the notification channel, the first notification message and the access credential are sent to a push notification server corresponding to the operating system, so that the push notification server verifies the first notification message based on the access credential; if the verification passes, based on the identifier of the notification channel, a notification channel is selected to send the first notification message to the first electronic device.
[0027] A third aspect of the present application provides a control device, comprising:
[0028] A first obtaining module, configured to obtain a first notification message from a second electronic device through a notification channel corresponding to an operating system of the first electronic device; the notification channel remains active when the first electronic device is in a first state;
[0029] The first control module is used to control the first electronic device to switch from the first state to the second state based on the first notification message, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0030] A fourth aspect of the present application provides a control system, comprising:
[0031] First electronic device;
[0032] The second electronic device is configured to send a wake-up request to an application server corresponding to the target application when determining that the target application of the first electronic device is in an offline state;
[0033] The application server is used to obtain a first notification message corresponding to the first electronic device and an identifier of the first electronic device from the wake-up request, obtain an identifier of a notification channel corresponding to the identifier of the first electronic device, and send the identifier of the notification channel and the first notification message to a push notification server corresponding to the operating system;
[0034] The push notification server is configured to select a notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device;
[0035] The first electronic device is used to obtain the first notification message through the notification channel, and when it is determined that the first electronic device is currently in a first state, based on the first notification message, control the first electronic device to switch from the first state to a second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be provided based on these drawings without creative work.
[0037] Figure 1 It is a flow chart of a control method provided in Example 1 of the present application;
[0038] Figure 2 It is a flow chart of a control method provided in Example 2 of the present application;
[0039] Figure 3 A schematic diagram of a second electronic device waking up a first electronic device provided in the present application;
[0040] Figure 4 A schematic diagram of the interaction between a first electronic device, an application server and a push notification server provided in the present application;
[0041] Figure 5 is a flow chart of a control method provided in Example 5 of the present application;
[0042] Figure 6 A schematic diagram of an implementation scenario of a control method provided in this application;
[0043] Figure 7 is a flow chart of a control method provided in Example 7 of the present application;
[0044] Figure 8 It is a structural schematic diagram of an electronic device provided by this application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments provided by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0047] Reference Figure 1 , is a flow chart of a control method provided in Example 1 of the present application, such as Figure 1 As shown, the method may include but is not limited to the following steps:
[0048] Step S101: obtaining a first notification message from a second electronic device through a notification channel corresponding to an operating system of a first electronic device; the notification channel remains active when the first electronic device is in a first state.
[0049] In this embodiment, when the first electronic device (such as a smart phone, a tablet computer, a laptop computer, etc.) is under specific conditions, such as when the user presses the power button to turn off the screen but retains the standby function, closes the physical cover of the first electronic device to trigger the sleep mode, the first electronic device automatically enters the sleep mode after being idle for a period of time, or selects "Sleep" through the power option in the Windows "Start" menu, the first electronic device enters the first state.
[0050] When the first electronic device enters the first state, in order to save power and extend the service life of the first electronic device, the operating system of the first electronic device can disconnect most non-essential network connections, such as Wi-Fi, Bluetooth, or mobile data connections that may be used by third-party applications, to reduce power consumption.
[0051] In the first state, the operating system of the first electronic device can maintain a network connection with a push notification service (e.g., Windows Notification Service (WNS)), such as a notification channel corresponding to the operating system, and the notification channel remains active when the first electronic device is in the first state, allowing the first electronic device to receive important notifications in the first state.
[0052] When the second electronic device needs to send a first notification message to the first electronic device, the second electronic device can communicate with the push notification service corresponding to the operating system, send the first notification message to the push notification service corresponding to the operating system, and the push notification service sends the first notification message to the first electronic device through the notification channel corresponding to the operating system.
[0053] Step S102: determine that the first electronic device is currently in a first state, and based on the first notification message, control the first electronic device to switch from the first state to a second state, wherein the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0054] The operating system of the first electronic device can determine that the first electronic device is currently in the first state by monitoring information such as the power state, network connection state, and user interaction state of the device.
[0055] In the second state, network connections such as Wi-Fi, Bluetooth or mobile data can be restored, and the first electronic device can exchange data with other electronic devices (such as the second electronic device) or application servers via network connections such as Wi-Fi, Bluetooth or mobile data.
[0056] In this embodiment, the notification channel corresponding to the operating system always remains active when the first electronic device is in the first state. This feature can ensure that the first electronic device can instantly receive the first notification message from the second electronic device. When the first notification message arrives through the notification channel corresponding to the operating system, it serves as an effective wake-up signal, enabling the operating system to quickly control the first electronic device to switch from the first state to the second state with more comprehensive functions. This efficient remote wake-up mechanism can enable the first electronic device to quickly restore the ability to exchange data with other electronic devices.
[0057] As another optional embodiment of the present application, refer to Figure 2 , is a flow chart of a control method provided in Example 2 of the present application, such as Figure 2 As shown, the method may include but is not limited to the following steps:
[0058] Step S201: obtaining a first notification message from a second electronic device through a notification channel corresponding to the operating system of the first electronic device; the notification channel remains active when the first electronic device is in a first state; the first notification message is generated when it is determined that a target application of the first electronic device is in an offline state.
[0059] In this embodiment, when the first electronic device and the second electronic device are both in the second state, the target applications of the first electronic device and the second electronic device can communicate with the application server corresponding to the target application through a network connection such as Wi-Fi, Bluetooth or mobile data to exchange data, such as file sharing.
[0060] If the first electronic device enters the first state, the network connection such as Wi-Fi, Bluetooth or mobile data between the first electronic device and the application server is disconnected, and if the application server does not receive the heartbeat signal of the target application of the first electronic device within a certain period of time, the application server can determine that the target application of the first electronic device is in an offline state.
[0061] Accordingly, the target application of the second electronic device can obtain the status information of the target application of the first electronic device from the application server by communicating with the application server. If the status information indicates that the target application of the first electronic device is offline, a first notification message can be generated.
[0062] The detailed process of the second electronic device sending the first notification message and the first electronic device obtaining the first notification message from the second electronic device through the notification channel corresponding to the operating system of the first electronic device can be referred to the relevant introduction of step S101 in embodiment 1, which will not be repeated here.
[0063] Step S202: determine that the first electronic device is currently in the first state, and based on the first notification message, control the first electronic device to switch from the first state to a second state, wherein the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0064] The detailed process of step S202 can refer to the relevant introduction of step S102 in embodiment 1, which will not be repeated here.
[0065] In this embodiment, when the second electronic device determines that the target application of the first electronic device is in an offline state, a first notification message can be generated and sent. When the first electronic device is in the first state, the first electronic device can instantly receive the first notification message from the second electronic device through the notification channel corresponding to the operating system that always remains active. When the first notification message arrives through the notification channel corresponding to the operating system, it serves as an effective wake-up signal, which enables the operating system to quickly control the first electronic device to switch from the first state to the second state with more comprehensive functions. This efficient remote wake-up mechanism can enable the first electronic device to quickly restore the relevant functions of its target application and ensure the user's experience of using the target application.
[0066] As another optional embodiment of the present application, a control method is provided in Embodiment 3 of the present application. This embodiment is mainly an implementation of the above step S101. Step S101 may include but is not limited to the following steps:
[0067] Step S1011: obtain a first notification message from a second electronic device from a push notification server corresponding to the operating system of the first electronic device through a notification channel corresponding to the operating system; the push notification server is used to receive the first notification message and the identifier of the notification channel from an application server corresponding to the target application in the first electronic device, and based on the identifier of the notification channel, select the notification channel to send the first notification message.
[0068] In this embodiment, when the second electronic device determines that the target application of the first electronic device is in an offline state, a first notification message may be generated and sent to an application server (which may be represented as App service) corresponding to the target application, and the first notification message may include a device identifier of the first electronic device. The device identifier of the first electronic device may be used to uniquely identify the first electronic device.
[0069] The application server may store the association relationship between the device identification of each electronic device and the identification of its notification channel, and the identification of the notification channel may be used to uniquely identify the notification channel. Accordingly, the application server may search for the identification of the notification channel corresponding to the device identification of the first electronic device in the association relationship between the device identification of each electronic device and the identification of its notification channel.
[0070] After finding the identifier of the notification channel corresponding to the device identifier of the first electronic device, Figure 3 As shown, the application server can send the first notification message and the identifier of the notification channel corresponding to the device identifier of the first electronic device to the push notification server corresponding to the operating system (eg, a server including WNS).
[0071] The push notification server can select a notification channel corresponding to the identifier of the notification channel corresponding to the device identifier of the first electronic device from at least one notification channel it has created, and send the first notification message to the operating system of the first electronic device (e.g., the WNP (Windows Notification Platform) corresponding to the operating system for managing and processing notification functions on the first electronic device) through the selected notification channel.
[0072] The operating system of the first electronic device may control the first electronic device to switch from the first state to the second state based on the first notification message.
[0073] In this embodiment, by communicating with the application server, the target application of the second electronic device can obtain the status information of the first electronic device in real time, thereby generating a first notification message when necessary and sending the first notification message to the push notification server.
[0074] In the first state, the first electronic device can maintain a network connection with the push notification server. Therefore, after receiving the first notification message of the target application from the second electronic device, the push notification server can accurately distribute the first notification message to the corresponding first electronic device according to the device identification of the first electronic device and the identification of the notification channel, so that the operating system can quickly and accurately control the first electronic device to switch from the first state to the second state with more comprehensive functions. This efficient remote wake-up mechanism can enable the first electronic device to quickly restore the relevant functions of its target application and ensure the user's experience of using the target application.
[0075] As another optional embodiment of the present application, a control method provided in Embodiment 4 of the present application may include but is not limited to the following steps:
[0076] Step S301: Request a notification channel from a push notification server corresponding to the operating system through a target application of the first electronic device, so that the push notification server creates a notification channel corresponding to the operating system and obtains an identifier of the notification channel.
[0077] In this embodiment, for example, Figure 4 As shown, the target application of the first electronic device can send a creation request of a notification channel to the push notification server corresponding to the operating system through WNP, and the creation request may include: an object identifier (Object ID). The object identifier can be used to distinguish different electronic devices in the push notification server. The object identifier can be a string, a number, or other forms of identifiers. For example, the object identifier may include: 9c345cfe-20e5-4098-a83a-aabdb666e2d3.
[0078] The push notification server may create a notification channel corresponding to the operating system of the first electronic device in response to the creation request, obtain an identifier of the notification channel, and send the identifier of the notification channel to the WNP.
[0079] The identifier of the notification channel may include but is not limited to: a uniform resource identifier (URI) of the notification channel.
[0080] Step S302: Send the identifier of the notification channel and the device identifier of the first electronic device to the application server corresponding to the target application through the target application, so that the application server associates and stores the identifier of the notification channel and the device identifier of the first electronic device, so that the first notification message from the second electronic device can be sent to the first electronic device based on the identifier of the notification channel and the device identifier of the first electronic device.
[0081] After the application server associates and stores the identifier of the notification channel with the device identifier of the first electronic device, for example, Figure 3 As shown, the second electronic device may send a first notification message to the application server, and the first notification message may include: a device identification of the first electronic device.
[0082] The application server may search for the identifier of the corresponding notification channel among the identifiers of the notification channels and the device identifier of the first electronic device that are stored in association therewith, and send the identifier of the notification channel and the first notification message to the WNS.
[0083] The WNS may select a notification channel according to the identifier of the notification channel received, and send the first notification message to the first electronic device through the notification channel.
[0084] Alternatively, when the application server receives the first notification message of the second electronic device, the application server may request access credentials by providing the application identifier, directory (tenant) identifier, and secret corresponding to the target application to a service for organizing and managing user identities and access rights (e.g., AAD (Azure Active Directory)). The application identifier, directory (tenant) identifier, and secret corresponding to the target application may be configured to the target application in advance by the service for organizing and managing user identities and access rights.
[0085] After verifying this information, the service used to organize and manage user identities and access rights can issue access credentials (such as access tokens) to the application server.
[0086] For example, an app server can send an HTTP POST request to AAD using the Azure client ID (i.e., application identity), tenant Id (i.e., tenant identity), and a secret.
[0087] HTTP POST requests can include:
[0088] POST / {tenantId} / oauth2 / v2.0 / token
[0089] Http / 1.1Host:login.microsoftonline.com
[0090] Content-Type:application / x-www-form-urlencoded
[0091] Content-Length:160
[0092] grant_type=client_credentials&client_id=<Azure client ID>&client_secret=<secret>
[0093] &scope=https: / / wns.windows.com / .default /
[0094] AAD can respond to the HTTP POST request and issue an access token to the application server.
[0095] The application server can send the first notification message, the identifier of the notification channel, and the access credentials to the push notification server. For example, the application server can send an https request to WNS, and the https request can include:
[0096] POST / ?token=AwYAAABlfkv…2bMA0Q
[0097] HTTP / 1.1Host:wns2-sg2p.notify.windows.com
[0098] Content-Type:application / octet-stream
[0099] X-WNS-Type:wns / raw
[0100] Authorization:Bearer [your access token]
[0101] Content-Length:60
[0102] {cmd:"Hello Wakeup now"}
[0103] Among them, AwYAAABlfkv…2bMA0Q can represent an access token (ie, an implementation of an access credential), wns2-sg2p.notify.windows.com can represent a URI (ie, an implementation of an identifier of a notification channel), and "Hello Wakeup now" can represent a first notification message.
[0104] The push notification server can verify the validity of the access credential. If the access credential is valid and the permission is allowed, the push notification server can select a notification channel based on the identifier of the notification channel and send the first notification message to the first electronic device based on the notification channel.
[0105] Step S303: obtain a first notification message from a second electronic device from a push notification server corresponding to the operating system of the first electronic device through the notification channel corresponding to the operating system; the push notification server is used to receive the first notification message and the identifier of the notification channel from the application server corresponding to the target application in the first electronic device, and based on the identifier of the notification channel, select the notification channel to send the first notification message.
[0106] The detailed process of step S303 can be found in the related introduction of the above step S1011, which will not be repeated here.
[0107] Step S304: determine that the first electronic device is currently in the first state, and based on the first notification message, control the first electronic device to switch from the first state to a second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0108] The detailed process of step S304 can refer to the relevant introduction of the above step S102, which will not be repeated here.
[0109] In this embodiment, the target application of the first electronic device can actively initiate a creation request to the push notification server corresponding to the operating system, hoping to create an exclusive notification channel. After receiving the creation request, the push notification server can create a customized notification channel. Then, the target application will send the identifier of the newly created notification channel and the device identifier of the first electronic device to the application server. After receiving this information, the application server will perform associated storage. The completion of this preparatory work lays a solid foundation for subsequent remote wake-up operations. When the first electronic device is in the first state, if the target application of the second electronic device needs to wake up the first electronic device, it can send a first notification message containing the device identifier of the first electronic device to the application server. The application server can quickly locate the identifier of the corresponding notification channel according to the device identifier of the first electronic device, and send it together with the first notification message to the push notification server.
[0110] After receiving this information, the push notification server will use its efficient notification mechanism to quickly and accurately transmit the first notification message to the first electronic device through the previously created notification channel. After receiving the first notification message, the first electronic device can control the first electronic device to switch from the first state to the second state based on the first notification message. This efficient remote wake-up mechanism can shorten the time for the first electronic device to wake up from standby, ensuring that the user can get a smooth and seamless experience when using the target application.
[0111] In addition, the application server provides the application ID, directory (tenant) ID and confidential request access credentials of the target application. After the application server obtains the access credentials, the access credentials can be used as the key to interact with the push notification server. The push notification server verifies the validity of the access credentials and only allows the first notification information sent by the application server holding the valid access credentials to be sent to the first electronic device, which can reduce the risk of unauthorized access and ensure the accuracy and reliability of the first notification message delivery.
[0112] As another optional embodiment of the present application, refer to Figure 5 , is a flow chart of a control method provided in Example 5 of the present application. This embodiment is mainly an implementation of the above step S102. Step S102 may include but is not limited to the following steps:
[0113] Step S1021: determine that the first electronic device is currently in the first state, and generate an input event based on the first notification message.
[0114] In this embodiment, the operating system of the first electronic device may register a background task, and when the operating system determines that the first electronic device is currently in the first state, the operating system may send a first notification message to the background task.
[0115] The background task may generate an input event based on the first notification message. The input event may be regarded by the operating system as a signal from an external input device, and is used to trigger the operating system to switch states.
[0116] For example, input events may include, but are not limited to, keyboard input events or mouse input events. Keyboard input events may be used to simulate the behavior of a user inputting through specific physical keys (e.g., the Enter key, the Space key). Mouse input events may be used to simulate the behavior of a user inputting by clicking the left or right mouse button.
[0117] Step S1022: Based on the input event, control the first electronic device to switch from the first state to a second state.
[0118] In this embodiment, the operating system can determine whether the input event meets the set wake-up conditions. If it meets the wake-up conditions, it can control the first electronic device to switch from the first state to the second state, such as restoring power management settings, loading necessary system components and drivers, and preparing the user interface.
[0119] In this embodiment, by simulating input events through background tasks, the wake-up function can be implemented without touching the underlying code of the operating system, thereby avoiding instability and security issues that may be introduced by modifying the system code.
[0120] In this embodiment, the control method is described in conjunction with a background task registered with the operating system of the first electronic device. Figure 6 As shown, the target application of the first electronic device can request the operating system of the first electronic device to register a background task for waking up the first electronic device in the first state.
[0121] The target application of the first electronic device can request WNS to create a notification channel through WNP, obtain the identifier of the notification channel from WNS, and send the identifier of the notification channel and the device identifier of the first electronic device to the application server corresponding to the target application.
[0122] The application server corresponding to the target application can associate and store the identifier of the notification channel and the device identifier of the first electronic device, and save the application identifier, directory (tenant) identifier and secrets of the target application configured in the AAD.
[0123] When the application server receives the first notification message of the second electronic device, the application server may request access credentials by providing the AAD with an application identifier, a directory (tenant) identifier, and a secret corresponding to the target application.
[0124] After verifying this information, ADD can issue an access token to the application server.
[0125] The application server may send the first notification message, the identifier of the notification channel, and the access credential to the push notification server. The push notification server may verify the validity of the access credential. If the access credential is valid and the authority permits, the push notification server may select a notification channel based on the identifier of the notification channel, and send the first notification message to the WNP of the first electronic device based on the notification channel.
[0126] The WNP may send the first notification message to the background task, and the background task may generate an input event based on the first notification message.
[0127] The operating system of the first electronic device may control the first electronic device to switch from the first state to the second state based on the input event.
[0128] As another optional embodiment of the present application, refer to Figure 7 , is a flow chart of a control method provided in Example 7 of the present application, such as Figure 7 As shown, the method may include but is not limited to the following steps:
[0129] Step S401: obtaining a first notification message from a second electronic device through a notification channel corresponding to an operating system of a first electronic device; the notification channel remains active when the first electronic device is in a first state.
[0130] Step S402: determine that the first electronic device is currently in the first state, and based on the first notification message, control the first electronic device to switch from the first state to a second state, wherein the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0131] The detailed process of steps S401-S402 can refer to the relevant introduction of steps S101-S102 in Example 1, which will not be repeated here.
[0132] Step S403: in the second state, obtaining a switching instruction of the target application in the second electronic device through the target application in the first electronic device.
[0133] In the second state, a network connection may be established between the target application of the first electronic device and the application server, such as a network connection such as Wi-Fi, Bluetooth or mobile data. At this time, after the target application in the second electronic device sends the switching instruction to the application server, the first electronic device may obtain the switching instruction of the target application in the second electronic device from the application server.
[0134] The target application in the second electronic device can send a switching instruction as needed. For example, the target application can include a super file. After waking up the first electronic device, if the super file of the second electronic device remotely downloads a file from the first electronic device, the super file in the second electronic device can send a switching instruction to allow the first electronic device to re-enter the first state or the third state, thereby saving battery power.
[0135] For another example, after returning home, the user finds through the super file of the home computer (an implementation of the second electronic device) that the office laptop (an implementation of the first electronic device) is still online. For energy saving and safety considerations, the reverse operation can be performed to allow the office laptop to actively enter the first state.
[0136] Step S404: Based on the switching instruction, control the first electronic device to switch from the second state to the first state or the third state; in the second state, a first image interface is displayed on the display unit of the first electronic device, and in the third state, a second image interface is displayed on the display unit of the first electronic device, and the first image interface and the second image interface are different.
[0137] In the second state, the first electronic device can execute all pre-installed applications, process data, conduct network communications, etc. The CPU, memory, hard disk and other hardware resources of the first electronic device are all working normally, and the display unit (such as the screen) of the first electronic device will also light up to display the first image interface, for example, the desktop of the currently running application or operating system.
[0138] The third state may be an intermediate state between the first state and the second state. In the third state, the hardware resources of the first electronic device may still remain activated to a certain extent in order to quickly respond to user input (such as an unlock command). However, compared with the second state, the power consumption in the third state is much lower because most non-essential background applications and services are suspended or have reduced activity levels.
[0139] In the third state, the display unit of the first electronic device can display a second image interface, which can be used to protect the security of the first electronic device while providing sufficient information for the user to understand the current state of the first electronic device and conveniently unlock the first electronic device to enter the second state or the first state.
[0140] The second graphical interface is more concise than the first graphical interface. For example, the second graphical interface may include time, date, notification icon, and unlock prompt.
[0141] In this embodiment, the second electronic device can flexibly adjust the working state of the first electronic device through the switching instruction, which helps to avoid unnecessary resource consumption and achieve energy saving effect. For example, the target application may include: super file, when the super file of the second electronic device completes the task of downloading the file from the first electronic device, it automatically sends a switching instruction to let the first electronic device enter the standby state (an implementation of the first state) or the lock screen state (an implementation of the third state), which can not only ensure the smooth completion of the file access task, but also save the power consumption of the first electronic device.
[0142] As another optional embodiment of the present application, a control method is provided in Embodiment 8 of the present application, and the method may include but is not limited to the following steps:
[0143] Step S501: obtaining a first notification message from a second electronic device through a notification channel corresponding to an operating system of a first electronic device; the notification channel remains active when the first electronic device is in a first state.
[0144] Step S502: determine that the first electronic device is currently in the first state, and based on the first notification message, control the first electronic device to switch from the first state to a second state, wherein the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0145] The detailed process of steps S501-S502 can refer to the relevant introduction of steps S101-S102 in Example 1, which will not be repeated here.
[0146] Step S503: Obtain the state of the target application in the first electronic device in the second state.
[0147] In this embodiment, the state of the target application program can be queried by calling an application program interface of the operating system of the first electronic device.
[0148] Step S504: If the state of the target application is closed, start the target application.
[0149] If the target application is designed to display an icon in the tray area after it is started, the user can directly access the functions or settings of the target application by clicking the corresponding icon in the tray area after the target application is started.
[0150] In this embodiment, if the state of the target application is closed, the target application is started so that after waking up the first electronic device, the target application can be used immediately without manually opening it. This can not only save the user's time, but also improve the usability of the target application, allowing the user to access the required functions faster, optimize the user experience, and have a positive impact on the activity of the target application.
[0151] As another optional embodiment of the present application, a control method provided in Embodiment 9 of the present application can be applied to an application server. The method may include but is not limited to the following steps:
[0152] Step S601, in response to a wake-up request from a second electronic device, obtaining a first notification message corresponding to a first electronic device and a device identification of the first electronic device from the second electronic device, wherein the wake-up request is generated when the second electronic device determines that a target application of the first electronic device is in an offline state.
[0153] Step S602: Obtain an identifier of a notification channel corresponding to the device identifier of the first electronic device.
[0154] Step S603: Send the identifier of the notification channel and the first notification message to the push notification server corresponding to the operating system, so that the push notification server selects the notification channel to send the first notification message to the first electronic device based on the identifier of the notification channel, so that the first electronic device obtains the first notification message through the notification channel, and controls the first electronic device to switch from the first state to the second state based on the first notification message, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0155] The detailed process of steps S601-S603 can be found in the relevant introduction in the above-mentioned embodiment, which will not be repeated here.
[0156] In this embodiment, in response to the wake-up request of the second electronic device, the application server can quickly locate the identifier of the corresponding notification channel according to the device identifier of the first electronic device, and send it together with the first notification message to the push notification server.
[0157] After receiving this information, the push notification server will use its efficient notification mechanism to quickly and accurately transmit the first notification message to the first electronic device through the previously created notification channel. After receiving the first notification message, the first electronic device can control the first electronic device to switch from the first state to the second state based on the first notification message. This efficient remote wake-up mechanism can shorten the time for the first electronic device to wake up from standby, ensuring that the user can get a smooth and seamless experience when using the target application.
[0158] As another optional embodiment of the present application, a control method is provided in Embodiment 10 of the present application, and the method may include but is not limited to the following steps:
[0159] Step S701, in response to a wake-up request from a second electronic device, obtaining a first notification message corresponding to a first electronic device and a device identification of the first electronic device from the second electronic device, wherein the wake-up request is generated when the second electronic device determines that a target application of the first electronic device is in an offline state.
[0160] Step S702: Obtain an identifier of a notification channel corresponding to the device identifier of the first electronic device.
[0161] Step S703: Obtain access credentials corresponding to the target application.
[0162] In this embodiment, the detailed process of obtaining the access credential corresponding to the target application can refer to the relevant introduction about the access credential in Embodiment 4, which will not be repeated here.
[0163] Step S704: Send the identifier of the notification channel, the first notification message and the access credential to the push notification server corresponding to the operating system, so that the push notification server verifies the first notification message based on the access credential; if the verification passes, select the notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device, so that the first electronic device obtains the first notification message through the notification channel; based on the first notification message, control the first electronic device to switch from the first state to the second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0164] The detailed process of the push notification server verifying the first notification message based on the access credential can be found in the relevant introduction about the access credential in Example 4, which will not be repeated here.
[0165] In this embodiment, the application server provides the application identifier, directory (tenant) identifier and confidential request access credentials of the target application. After the application server obtains the access credentials, the access credentials can be used as the key to interact with the push notification server. The push notification server verifies the validity of the access credentials and only allows the first notification information sent by the application server holding the valid access credentials to be sent to the first electronic device, which can reduce the risk of unauthorized access and ensure the accuracy and reliability of the first notification message delivery.
[0166] Next, a control device provided in the present application is introduced. The control device introduced below and the control method introduced above can refer to each other.
[0167] The control device includes: a first obtaining module and a first control module.
[0168] The first obtaining module is used to obtain a first notification message from a second electronic device through a notification channel corresponding to an operating system of the first electronic device; the notification channel remains active when the first electronic device is in a first state.
[0169] The first control module is used to control the first electronic device to switch from the first state to the second state based on the first notification message, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0170] In this embodiment, the first notification message may be generated when it is determined that the target application of the first electronic device is in an offline state.
[0171] The first acquisition module can be used to:
[0172] A first notification message from a second electronic device is obtained from a push notification server corresponding to the operating system of the first electronic device through a notification channel corresponding to the operating system of the first electronic device; the push notification server is used to receive the first notification message and an identifier of the notification channel from an application server corresponding to a target application in the first electronic device, and based on the identifier of the notification channel, select the notification channel to send the first notification message.
[0173] The control device may further include:
[0174] The request module is used to request a notification channel from the push notification server corresponding to the operating system through the target application of the first electronic device, so that the push notification server creates a notification channel corresponding to the operating system and obtains an identifier of the notification channel.
[0175] The first sending module is used to send the identifier of the notification channel and the device identifier of the first electronic device to the application server corresponding to the target application through the target application, so that the application server associates and stores the identifier of the notification channel and the device identifier of the first electronic device, so that the first notification message from the second electronic device can be sent to the first electronic device based on the identifier of the notification channel and the device identifier of the first electronic device.
[0176] The first control module can be specifically used for:
[0177] Based on the first notification message, generating an input event;
[0178] Based on the input event, the first electronic device is controlled to switch from the first state to a second state.
[0179] The control device may also include:
[0180] The second obtaining module is used to obtain a switching instruction of a target application in the second electronic device through a target application in the first electronic device in the second state.
[0181] A second control module is used to control the first electronic device to switch from the second state to the first state or the third state based on the switching instruction; in the second state, a first image interface is displayed on the display unit of the first electronic device, and in the third state, a second image interface is displayed on the display unit of the first electronic device, and the first image interface and the second image interface are different.
[0182] In another embodiment of the present application, a control device is provided, comprising:
[0183] The third acquisition module is used to obtain the first notification message corresponding to the first electronic device and the device identification of the first electronic device from the second electronic device in response to the wake-up request of the second electronic device, wherein the wake-up request is generated when the second electronic device determines that the target application of the first electronic device is in an offline state.
[0184] The fourth obtaining module is used to obtain the identifier of the notification channel corresponding to the device identifier of the first electronic device.
[0185] A second sending module is used to send the identifier of the notification channel and the first notification message to a push notification server corresponding to the operating system, so that the push notification server selects a notification channel to send the first notification message to the first electronic device based on the identifier of the notification channel, so that the first electronic device obtains the first notification message through the notification channel, and controls the first electronic device to switch from the first state to the second state based on the first notification message, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
[0186] The control device may also include:
[0187] The fifth obtaining module is used to obtain the access credential corresponding to the target application.
[0188] The second sending module sends the identifier of the notification channel and the first notification message to a push notification server corresponding to the operating system, so that the push notification server selects a notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device, which may include:
[0189] The identifier of the notification channel, the first notification message and the access credential are sent to a push notification server corresponding to the operating system, so that the push notification server verifies the first notification message based on the access credential. If the verification passes, based on the identifier of the notification channel, the notification channel is selected to send the first notification message to the first electronic device.
[0190] In another embodiment of the present application, a control system is provided.
[0191] Reference Figure 8 , the control system includes:
[0192] A first electronic device 100 .
[0193] The second electronic device 200 is used to send a wake-up request to the application server 300 corresponding to the target application when it is determined that the target application of the first electronic device 100 is in an offline state.
[0194] The application server 300 is used to obtain the first notification message corresponding to the first electronic device 100 and the device identification of the first electronic device 100 from the wake-up request, and obtain the identification of the notification channel corresponding to the device identification of the first electronic device 100, and send the identification of the notification channel and the first notification message to the push notification server 400 corresponding to the operating system.
[0195] The push notification server 400 is used to select a notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device 100.
[0196] The first electronic device 100 is used to obtain the first notification message through the notification channel, and when it is determined that the first electronic device 100 is currently in a first state, based on the first notification message, control the first electronic device 100 to switch from the first state to a second state, and the power consumption of the first electronic device 100 in the first state is lower than the power consumption of the first electronic device 100 in the second state.
[0197] It should be noted that each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0198] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0199] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0200] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0201] The control method, device and system provided by the present application are introduced in detail above. The principles and implementation methods of the present application are explained in this article using specific examples. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A control method, comprising: Obtaining a first notification message from the second electronic device through a notification channel corresponding to the operating system of the first electronic device; The notification channel remains active when the first electronic device is in a first state; It is determined that the first electronic device is currently in the first state, and based on the first notification message, the first electronic device is controlled to switch from the first state to a second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state. 2 . The control method according to claim 1 , wherein the first notification message is generated when it is determined that the target application of the first electronic device is in an offline state.
3. The control method according to claim 1, wherein obtaining the first notification message from the second electronic device through the notification channel corresponding to the operating system of the first electronic device comprises: Obtaining, through a notification channel corresponding to the operating system of the first electronic device, a first notification message from the second electronic device from a push notification server corresponding to the operating system; The push notification server is used to receive a first notification message and an identifier of a notification channel from an application server corresponding to a target application in the first electronic device, and based on the identifier of the notification channel, select the notification channel to send the first notification message.
4. The control method according to claim 3, before obtaining the first notification message from the second electronic device through the notification channel corresponding to the operating system of the first electronic device, further comprising: Requesting a notification channel from a push notification server corresponding to the operating system through a target application of the first electronic device, so that the push notification server creates a notification channel corresponding to the operating system and obtains an identifier of the notification channel; Through the target application, the identifier of the notification channel and the device identifier of the first electronic device are sent to the application server corresponding to the target application, so that the application server associates and stores the identifier of the notification channel and the device identifier of the first electronic device, so that the first notification message from the second electronic device can be subsequently sent to the first electronic device based on the identifier of the notification channel and the device identifier of the first electronic device.
5. The control method according to claim 1, controlling the first electronic device to switch from the first state to the second state based on the first notification message, comprising: Based on the first notification message, generating an input event; Based on the input event, the first electronic device is controlled to switch from the first state to a second state.
6. The control method according to claim 1, further comprising: In the second state, obtaining a switching instruction of a target application in the second electronic device through a target application in the first electronic device; Based on the switching instruction, the first electronic device is controlled to switch from the second state to the first state or the third state; in the second state, a first image interface is displayed on the display unit of the first electronic device, and in the third state, a second image interface is displayed on the display unit of the first electronic device, and the first image interface and the second image interface are different.
7. A control method, comprising: In response to a wake-up request of a second electronic device, obtaining a first notification message corresponding to the first electronic device and a device identification of the first electronic device from the second electronic device, wherein the wake-up request is generated when the second electronic device determines that a target application of the first electronic device is in an offline state; Obtaining an identifier of a notification channel corresponding to a device identifier of the first electronic device; The identifier of the notification channel and the first notification message are sent to a push notification server corresponding to the operating system, so that the push notification server selects a notification channel to send the first notification message to the first electronic device based on the identifier of the notification channel, so that the first electronic device obtains the first notification message through the notification channel, and based on the first notification message, controls the first electronic device to switch from the first state to the second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
8. The control method according to claim 7, further comprising: obtaining access credentials corresponding to the target application; The step of sending the identifier of the notification channel and the first notification message to a push notification server corresponding to the operating system, so that the push notification server selects a notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device, comprises: The identifier of the notification channel, the first notification message and the access credential are sent to a push notification server corresponding to the operating system, so that the push notification server verifies the first notification message based on the access credential. If the verification passes, based on the identifier of the notification channel, the notification channel is selected to send the first notification message to the first electronic device.
9. A control device comprising: A first obtaining module, configured to obtain a first notification message from a second electronic device through a notification channel corresponding to an operating system of the first electronic device; The notification channel remains active when the first electronic device is in a first state; The first control module is used to control the first electronic device to switch from the first state to the second state based on the first notification message, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.
10. A control system comprising: First electronic device; The second electronic device is configured to send a wake-up request to an application server corresponding to the target application when determining that the target application of the first electronic device is in an offline state; The application server is used to obtain a first notification message corresponding to the first electronic device and a device identifier of the first electronic device from the wake-up request, obtain an identifier of a notification channel corresponding to the device identifier of the first electronic device, and send the identifier of the notification channel and the first notification message to a push notification server corresponding to the operating system; The push notification server is configured to select a notification channel based on the identifier of the notification channel to send the first notification message to the first electronic device; The first electronic device is used to obtain the first notification message through the notification channel, and when it is determined that the first electronic device is currently in a first state, based on the first notification message, control the first electronic device to switch from the first state to a second state, and the power consumption of the first electronic device in the first state is lower than the power consumption of the first electronic device in the second state.