An application state awareness method, related device and related system
By storing application state information before the device goes to sleep and having it transmitted by an auxiliary processor, the power consumption problem caused by the device frequently waking up the main processor to query the state is solved, achieving low-power and high-efficiency application state synchronization.
Patent Information
- Application Number
- CN202110385231.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-09
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2041-04-09
AI Technical Summary
In multi-device scenarios, frequent wake-ups of hibernation devices to query application status lead to excessive power consumption and affect the efficiency of synchronizing application running status between devices.
Before the device goes to sleep, the application state information is stored and sent to other devices through an auxiliary processor, avoiding the main processor from waking up to query the current running status. The auxiliary processor is used to transmit and store the state information.
It reduces device power consumption, improves the efficiency of application state synchronization between devices, and saves network resources.
Smart Images

Figure CN115202895B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer technical field, and in particular to an application state sensing method and device and related equipment. BACKGROUND
[0002] On a hyper terminal, a plurality of devices are installed with the same application program, and when the application program is executed on the plurality of devices, the running state of the application program needs to be sensed in real time between the devices. For example, the running state of the application program is broadcasted between the devices or the running state of the application program is inquired between the devices.
[0003] However, the device where the application program is located is not online in real time, and there is a hibernation situation. After the device hibernates, if the running state of the application program needs to be synchronized, the main processor of the device needs to be frequently woken up for application program running state inquiry and communication. For example, if device 2 is in a hibernation state, when device 1 inquires the running state of a certain application program in device 2, device 2 needs to wake up the main processor to inquire the current running state of the application program and then send the current running state to device 1. For another example, if device 2 in a hibernation state needs to broadcast the running state of a certain application program at regular intervals, the main processor of device 2 needs to be woken up from the hibernation state at regular intervals to inquire the running state of the application program and then broadcast the running state.
[0004] In this way, in order to synchronize the running state of the application program between the devices, the main processor of the device that has hibernated needs to be frequently woken up to inquire the current running state of the application program and call a communication interface to send the current running state, which brings great power consumption overhead. SUMMARY
[0005] The present application provides an application program state sensing method, related equipment and related system, which are used to reduce the power consumption of a device when synchronizing the running state of an application program between devices.
[0006] In a first aspect, an application program state sensing method is provided, and the method comprises the following steps: before a first device hibernates, the first device inquires the running state of a first application program on the first device; the first device stores application program state information, wherein the application program state information comprises a corresponding relationship between the identifier of the first application program and the running state of the first application program; when the first device hibernates, the first device sends the application program state information to a second device, so that the second device determines the running state of the first application program.
[0007] The method provided by the first aspect is implemented, and the first device stores the application state information before sleeping. When the first device needs to query the running state of the first application, the first device does not need to query the current running state of the first application through the main processor, but only needs to query the stored application state information to obtain the running state of the first application, thereby reducing the power consumption overhead of the first device. After the first device sleeps, the stored application state information is sent to the second device. When the second device needs to query the running state of the first application on the first device, the second device only needs to directly query the application state information sent by the first device, and does not need to send a running state query request of the first application to the first device, thereby greatly reducing the power consumption overhead of the first device and the second device.
[0008] With reference to the first aspect, in some embodiments, the first device includes a main processor and an auxiliary processor. Before the first device sleeps, the first device queries the running state of the first application on the first device, specifically including: before the main processor sleeps, the auxiliary processor queries the running state of the first application on the first device. The first device stores the application state information, specifically including: the main processor stores the application state information. When the first device sleeps, the first device sends the application state information to the second device, so that the second device determines the running state of the first application, specifically including: before the main processor sleeps, the auxiliary processor sends the application state information to the second device, so that the second device determines the running state of the first application.
[0009] In the embodiments of the present application, when the main processor is in a sleep state, the auxiliary processor sends the application state information to the second device, without the need to wake up the main processor to send the application state information. The power consumption of the auxiliary processor is much smaller than that of the main processor, and therefore the power consumption overhead of the second device is reduced.
[0010] With reference to the first aspect, in some embodiments, the method further includes: at a first preset time before sleeping, the first device updates the stored application state information.
[0011] In the embodiments of the present application, at a first preset time before sleeping, the first device updates the stored application state information. This ensures that when the first device enters a sleep state, the application state information stored in the first device is the running state corresponding to the first application on the first device, thereby avoiding the case that when the first device broadcasts the application state information, the application state information stored in the first device is not the latest state, thereby misleading other devices.
[0012] With reference to the first aspect, in some embodiments, the running state of the application includes at least a sleep state and an active state.
[0013] In some embodiments of the first aspect, the application state information comprises: first application code, the first application code comprising first sub-code and second sub-code; the first sub-code is used to indicate the running state of the first application; and the second sub-code is used to indicate the first application.
[0014] In some embodiments of the first aspect, the application state information comprises: an application state table, the application state table comprising a corresponding relationship between the identity of the first application and the running state of the first application.
[0015] In some embodiments of the first aspect, the application state table further comprises a first state bit, the first state bit comprising a first sub-state bit, the first sub-state bit corresponding to the first application.
[0016] In some embodiments of the first aspect, the method further comprises: before the first device is in sleep, the first device sending the application state information to the second device.
[0017] In some embodiments of the first aspect, the first device sends the application state information to the second device when the first device is in sleep, specifically comprising: when the first device is in sleep, the first device broadcasting the application state information to the second device at a preset interval.
[0018] In some embodiments of the first aspect, the method further comprises: in response to a request of the second device querying the running state of the first application, the first device querying the stored application state information to obtain the state of the first application; and the first device sending the running state of the first application to the second device.
[0019] In the second aspect, the embodiments of the present application provide an application state awareness method, which comprises: the second device receiving the application state information sent by the first device, the application state information comprising a corresponding relationship between the identity of the first application on the first device and the running state of the first application; the second device storing the application state information; and when the second device is in sleep, the second device querying the stored application state information to determine the running state of the first application.
[0020] By implementing the method provided in the second aspect, the second device can receive and save the application state information sent by the first device before sleep, and when the second device needs to query the state information of the first application on the first device when the second device is in sleep, the second device only needs to query the application state information sent by the first device stored on the second device, without initiating a query of the running state of the first application to the first device, which greatly reduces the power consumption of the second device.
[0021] In combination with the second aspect, in some embodiments, the second device includes a main processor and an auxiliary processor; the second device receives the application state information sent by the first device, specifically, the main processor receives the application state information sent by the first device. The second device stores the application state information, specifically, the main processor stores the application state information. The second device queries the stored application state information to determine the running state of the first application, specifically, the auxiliary processor queries the stored application state information to determine the running state of the first application.
[0022] In combination with the second aspect, in some embodiments, the method further includes: when the second device is in sleep, the second device receives the application state information of the first device broadcast by the first device; and the second device updates the application state information of the first device stored in the second device according to the application state information of the first device.
[0023] In combination with the second aspect, in some embodiments, the method further includes: when the second device is in sleep, the second device sends a first application running state query request to the first device.
[0024] In the third aspect, the embodiments of the present application provide a device, characterized in that the device includes one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, the computer program codes include computer instructions, and the one or more processors invoke the computer instructions to make the device execute:
[0025] Before the device is in sleep, querying the running state of a first application installed on the device; storing application state information, the application state information including a corresponding relationship between an identifier of the first application and a running state of the first application; and when the device is in sleep, sending the application state information to a second device to make the second device determine the running state of the first application.
[0026] The device provided in the third aspect can store the application state information before sleep, so that when the device needs to query the running state of the first application, the current running state of the first application does not need to be queried through the main processor, but only needs to be queried from the stored application state information, thereby reducing the power consumption of the device. After the device is in sleep, the stored application state information is sent to the second device, so that when the second device needs to query the running state of the first application on the device, the second device only needs to directly query the application state information sent by the device, and does not need to send a first application running state query request to the device, thereby greatly reducing the power consumption of the device and the second device.
[0027] In some embodiments of the third aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: querying a running state of the first application installed on the first device before the main processor is in the sleep state; storing application state information, the application state information comprising a correspondence between an identifier of the first application and the running state of the first application; and the auxiliary processor is specifically configured to invoke the computer instructions to cause the device to perform: sending the application state information to the second device to enable the second device to determine the running state of the first application when the main processor is in the sleep state.
[0028] In some embodiments of the third aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: updating the stored application state information at a first preset time before the device is in the sleep state.
[0029] In some embodiments of the third aspect, the running state of the application comprises at least a sleep state and an active state.
[0030] In some embodiments of the third aspect, the application state information comprises: first application code, the first application code comprising a first sub-code and a second sub-code; the first sub-code is used to indicate the running state of the first application; and the second sub-code is used to indicate the first application.
[0031] In some embodiments of the third aspect, the application state information comprises: an application state table, the application state table comprising a correspondence between an identifier of the first application and the running state of the first application.
[0032] In some embodiments of the third aspect, the application state table further comprises a first state bit, the first state bit comprising a third sub-code, the third sub-code corresponding to the first application.
[0033] In some embodiments of the third aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: sending the application state information to the second device before the device is in the sleep state.
[0034] In some embodiments of the third aspect, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: broadcasting the application state information to the second device at a preset time interval.
[0035] With reference to the third aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: in response to a request of the second device to query the first application state, querying the stored application state information to obtain the running state of the first application; and sending the running state of the first application to the second device.
[0036] With reference to the fourth aspect, the embodiments of the present application provide a device, which comprises: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is configured to store computer program codes, the computer program codes comprising computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the device to perform: receiving application state information sent by a first device, the application state information comprising a correspondence between an identifier of a first application on the first device and a running state of the first application; storing the application state information; and querying the stored application state information to determine the running state of the first application when the device is in sleep.
[0037] With reference to the fourth aspect, in some embodiments, the one or more processors comprise a main processor and an auxiliary processor, the main processor is specifically configured to invoke the computer instructions to cause the device to perform: before the main processor is in sleep, receiving application state information sent by a first device, the application state information comprising a correspondence between an identifier of a first application installed in the first device and a running state of the first application; and storing the application state information. The auxiliary processor is specifically configured to invoke the computer instructions to cause the device to perform: querying the stored application state information to determine the running state of the first application when the main processor is in sleep.
[0038] With reference to the fourth aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: when the device is in sleep, receiving application state information of the first device broadcasted by the first device; and updating the application state information of the first device stored in the device according to the application state information of the first device.
[0039] With reference to the fourth aspect, in some embodiments, the one or more processors are specifically configured to invoke the computer instructions to cause the device to perform: when the device is in sleep, sending a request to query the running state of the first application to the first device.
[0040] In a fifth aspect, the present application provides a communication system, comprising a first device and a second device, wherein: the first device is configured to: query a running state of a first application on the first device before the first device is in sleep; store application state information, wherein the application state information comprises a corresponding relationship between an identifier of the first application and the running state of the first application; and send the application state information to the second device when the first device is in sleep, so that the second device determines the running state of the first application; and the second device is configured to: receive the application state information sent by the first device; store the application state information; and query the stored application state information to determine the running state of the first application when the second device is in sleep.
[0041] With reference to the fifth aspect, in some embodiments, the first device is configured to: broadcast the application state information to the second device when the first device is in sleep; the second device is configured to: receive the application state information broadcast by the first device when the second device is in sleep; and update the stored application state information.
[0042] With reference to the fifth aspect, in some embodiments, the first device is further configured to: query the stored application state information to obtain a running state of a second application in response to a request of the second device for querying the running state of the second application when the first device is in sleep; and send the running state of the second application to the second device. The second device is further configured to: send a target application state query request to the first device when the second device is in sleep.
[0043] In a sixth aspect, the embodiments of the present application provide a chip applied to a device, the chip comprising one or more processors configured to invoke computer instructions to cause the device to perform the method described in the first aspect and any possible implementation manner of the first aspect, or perform the method described in the second aspect and any possible implementation manner of the second aspect.
[0044] In a seventh aspect, the embodiments of the present application provide a computer program product comprising instructions, which, when executed on a device, cause the device to perform the method described in the first aspect and any possible implementation manner of the first aspect, or perform the method described in the second aspect and any possible implementation manner of the second aspect.
[0045] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, including instructions, when the instructions are executed on a device, causing the device to perform the method described in the first aspect and any possible implementation manner of the first aspect, or perform the method described in the second aspect and any possible implementation manner of the second aspect.
[0046] It can be understood that the device provided in the third aspect, the device provided in the fourth aspect, the chip provided in the sixth aspect, the computer program product provided in the seventh aspect and the computer storage medium provided in the eighth aspect are all used to execute the method provided in the embodiments of the present application. Therefore, the beneficial effects that can be achieved are referable to the beneficial effects in the corresponding method, which will not be repeated here.
[0047] On the basis of the implementation manners of the aspects described above, further combinations can be made to provide more implementation manners. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly explain the technical solutions in the embodiments of the present application or the background art, the drawings needed to be used in the embodiments of the present application or the background art will be described below.
[0049] Figure 1 is a schematic diagram of an application scenario related to an embodiment of the present application;
[0050] Figure 2 is a schematic diagram of another application scenario related to an embodiment of the present application;
[0051] Figure 3a is a schematic diagram of querying the running state of an application program on another device related to an embodiment of the present application;
[0052] Figure 3b is a schematic diagram of querying the running state of an application program on another device related to an embodiment of the present application;
[0053] Figure 3c is a schematic diagram of querying the running state of an application program on another device related to an embodiment of the present application;
[0054] Figure 4 is a schematic diagram of another application scenario related to an embodiment of the present application;
[0055] Figure 5 is a schematic diagram of a communication system architecture provided by an embodiment of the present application;
[0056] Figure 6 is a schematic diagram of the hardware structure of a device provided by an embodiment of the present application;
[0057] Figure 7 is a flowchart of synchronizing application running state information provided by an embodiment of the present application;
[0058] Figures 8a-8b is a kind of application program code schematic diagram provided by the embodiment of the present application;
[0059] Figure 9 is a kind of application program code schematic diagram provided by the embodiment of the present application; Figure 6 The device described in the embodiment and Figure 6 The cooperation interaction schematic diagram of each component in the device described in the embodiment. DETAILED DESCRIPTION
[0060] The terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0061] The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0062] It should be understood that when used in the specification and the appended claims, the terms "comprise" and "include" indicate the presence of described features, integers, steps, operations, elements, and / or components, but do not exclude one or more other features, integers, steps, operations, elements, components, and / or sets thereof.
[0063] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and do not intend to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0064] It should be further understood that the term "and / or" used in the specification and the appended claims of the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0065] First, the application scenario related to the application is introduced. Figures 1-2 The application scenario related to the application is introduced.
[0066] Figure 1 An application scenario related to the embodiment of the present application is exemplarily shown. As shown in Figure 1As shown, devices 1 through 7 can have wireless communication connections, such as Wi-Fi connections, enabling data communication between them. Any two devices among 1 through 7 can also connect via Bluetooth to achieve data communication between them. For example, device 7 can connect to device 3 via Bluetooth, as can device 7 and device 5, and device 3 and device 5 can also connect via Bluetooth. Figure 1 The Bluetooth connection scenario shown is for illustrative purposes only. In other implementations, any two devices among Device 1 to Device 7 can be connected via Bluetooth. This application embodiment will not list them all here. Figure 1 The device shown is merely illustrative; other devices may be used in other implementations, and this application does not limit them in any way.
[0067] In this embodiment, at least any two of devices 1-7 may have one or more identical applications installed. For example, the same music application may be installed on both the smartphone and the smart speaker. When a user listens to music on their smartphone, they need the smart speaker to play music. In this case, the music application on the smartphone needs to be aware of the running status of the music application on the smart speaker. If the music application on the smart speaker is active, the smartphone can send music data from its music application to the music application on the smart speaker, and the smart speaker can then play the music from the smartphone.
[0068] For example, such as Figure 2 As shown, a user wears a wearable device while running. The wearable device and smartphone can have a wireless communication connection. Both the smartphone and the wearable device have a fitness app installed. The fitness app on the wearable device records the user's steps. After recording steps, the wearable device enters a sleep state, for example, when the user removes the wearable device or when it is charging. When the smartphone needs to obtain exercise data from the wearable device, it first needs to check the running status of the fitness app on the wearable device. If the fitness app on the wearable device is active, the smartphone can directly initiate a query for exercise data from the wearable device. If the fitness app on the wearable device is in a sleep state, the smartphone can wait until the wearable device becomes active before querying the exercise data.
[0069] like Figure 3aAs shown in the prior art, when the wearable device is in a sleep state, the smart phone sends a query instruction to the wearable device, the query instruction including querying the running state of the sports health application. After receiving the query instruction, the wearable device needs to first wake up the main processor, then the main processor queries the current running state of the sports health application, and finally the communication module is called to send the running state of the sports health application on the wearable device to the smart phone. In this way, the wearable device needs to wake up the main processor to query the current running state of the application, which brings great power consumption overhead.
[0070] In the embodiments of the present application, as shown in Figure 3b As shown in the prior art, when the wearable device is in a sleep state, the smart phone sends a query instruction to the wearable device, the query instruction including querying the running state of the sports health application. After receiving the query instruction, the wearable device needs to first wake up the main processor, then the main processor queries the current running state of the sports health application, and finally the communication module is called to send the running state of the sports health application on the wearable device to the smart phone. In this way, the wearable device needs to wake up the main processor to query the current running state of the application, which brings great power consumption overhead.
[0071] In addition, in some other embodiments of the present application, as shown in Figure 3c As shown in the prior art, when the wearable device is in a sleep state, the smart phone sends a query instruction to the wearable device, the query instruction including querying the running state of the sports health application. After receiving the query instruction, the wearable device needs to first wake up the main processor, then the main processor queries the current running state of the sports health application, and finally the communication module is called to send the running state of the sports health application on the wearable device to the smart phone. In this way, the wearable device needs to wake up the main processor to query the current running state of the application, which brings great power consumption overhead.
[0072] In some other scenarios related to the present application, one or more same applications are installed on multiple devices. Figure 4 An exemplary schematic diagram of another application scenario related to the embodiments of the present application is shown. As shown in Figure 4In the shown travel scenario, a super terminal is formed by a smartphone, a wearable device and a vehicle-mounted device. A navigation application is installed on the super terminal (i.e., the smartphone, the wearable device and the vehicle-mounted device). The navigation application can collect navigation data. The smartphone, the wearable device and the vehicle-mounted device can be connected wirelessly, for example, via Wi-Fi, to realize the transmission of the navigation data among the smartphone, the wearable device and the vehicle-mounted device. When the user is walking, the user can use the smartphone for navigation. When the user gets into a vehicle, the user can switch from the smartphone navigation to the vehicle-mounted device navigation. When the user gets off the vehicle, the user can switch from the vehicle-mounted device navigation to the wearable device navigation. During the switching from the smartphone navigation to the vehicle-mounted device navigation and then to the wearable device navigation, the navigation data needs to be transmitted in real time. Therefore, the smartphone, the vehicle-mounted device and the wearable device need to sense the running state of the navigation application in real time. If the running state of the navigation application on the vehicle-mounted device is active during the switching from the smartphone navigation to the vehicle-mounted device navigation, the smartphone directly transmits the navigation data to the vehicle-mounted device. If the running state of the navigation application on the vehicle-mounted device is dormant, the smartphone needs to wake up the main processor of the vehicle-mounted device first, and then the main processor wakes up the navigation application. After the navigation application is in the active state, the navigation data is transmitted.
[0073] Next, a communication system provided by an embodiment of the present application is introduced.
[0074] Figure 5 An exemplary communication system provided by an embodiment of the present application is shown in Figure 5 The system includes a plurality of devices, such as a first device, a second device and a third device. The plurality of devices can be connected by wire or wirelessly to realize the data communication among the plurality of devices. The devices can correspond to the devices 1-7 described above. One or more same applications can be installed between any two devices in the plurality of devices. The first device can be, but is not limited to, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable device (for example, a smart watch, smart glasses, a head-mounted device), a virtual reality device, a smart home device (for example, a smart speaker, a smart television, a smart rice cooker, a smart refrigerator, a smart sweeping robot, etc.), a car device (a vehicle-mounted device, a driving recorder), and other devices.
[0075] It can be understood that, in the embodiments of the present application, the plurality of devices running the same application program in the communication system and working cooperatively can be considered as a super terminal. The same application program on the plurality of devices can be different versions of the application program, for example, a mobile phone version, a car machine version, a watch version, and a tablet version. In actual application, it can also be other versions, which are not limited in the present application.
[0076] The communication system provided by the embodiments of the present application is described below by taking two devices, a first device and a second device, as an example.
[0077] In the embodiments of the present application, the first device and the second device run one or more same application programs. The same application program running on the first device and the second device can be different versions of the application program, for example, a mobile phone version, a car machine version, and a watch version. The application program can be application program 1, application program 2, and application program 3. When the second device needs to obtain the running state of the application program in the first device, the following two cases can be divided:
[0078] The first case: the first device broadcasts the application program running state information.
[0079] Specifically, the first device broadcasts the application program state information of the first device to the second device. Correspondingly, the second device can receive the application program state information broadcast by the first device to obtain the running state of the application program on the first device and store the application state information. In actual implementation, it can be broadcasted at a fixed time, for example, the first device broadcasts to the second device once every minute. It can also be broadcasted by the first device to the second device when a preset condition is met.
[0080] The second case: the second device queries the application program state information.
[0081] Specifically, querying the application program state information can be divided into two cases. The first case: the second device initiates an application program running state query to the first device. For example, the second device wants to query the running state of application program 1 on the first device, and the first device receives the query request and returns the running state of application program 1 to the second device. The second case: the second device has received the application program state information sent by the first device and stored the application program state information before querying the application program running state. At this time, the second device does not need to initiate an application program state query to the first device, but only needs to query the application program state information stored in the second device. In actual implementation, the second device querying the running state of the application program to the first device can be a fixed time query, for example, querying the first device once every minute. It can also be that the second device initiates a query to the first device when a preset condition is met.
[0082] Next, the hardware structure of the device in the communication system related by the embodiments of the present application is exemplarily introduced.
[0083] Figure 6 The structure of the device 100 is exemplarily shown. The device 100 can include a processor 101, a memory 102 (one or more computer readable storage media), a communication module 103, and an input / output system 105, which can communicate on one or more communication buses 104.
[0084] The processor 101 can be integrated and include one or more central processors, a clock module, and a power management module. The clock module is mainly used to generate the clock required for data transmission and timing control for the processor 101. The power management module is mainly used to provide stable and high-precision voltage for the processor 101, the communication module 103, and the input / output system 105.
[0085] The processor 101 can include a main processor 1011 and an auxiliary processor 1012.
[0086] The main processor 1011 can include, but is not limited to, a central processing unit (CPU) or a graphics processing unit (GPU), and can also be a single-core processor or a multi-core processor. The main processor can be a combination of a CPU and a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The main processor can also be implemented by a logic device with built-in processing logic, such as an FPGA or a digital signal processor (DSP).
[0087] The main processor 1011 can invoke the program code stored in the memory 102 to perform the following operations:
[0088] When in an active state, the running state of the application program on the device is queried, the application program state information is generated according to the running state of the application program, and the application program state information is stored in the auxiliary memory.
[0089] When switching from the active state to the dormant state, the application state information in the auxiliary memory is updated.
[0090] The auxiliary processor 1012 can be a sensor hub, which can include but is not limited to a low-power application processor (AP), a coprocessor, a low-power micro-programmed control unit (MCU), and the like low-power processing module or processing circuit. Mainly low-power connection and processing data from various sensor devices.
[0091] The auxiliary processor 1012 can invoke the program code stored in the memory 102 to perform the following operations:
[0092] When the main processor is in the dormant state, the application state information stored in the auxiliary memory is accessed to obtain the application state information. The auxiliary processor 1012 can also process communication-related data. For example, the auxiliary processor 1012 is coupled with the communication module 103, and instructs the communication module 103 to broadcast the application state information to other devices. For another example, the auxiliary processor 1012 can instruct the communication module 103 to send an application state information query request to other devices. The auxiliary processor 1012 is coupled with the memory 102 to update the application state information in the memory 102.
[0093] The main processor 1011 and the auxiliary processor 1012 can be independent devices, or can be integrated in one or more processors.
[0094] The communication module 103 is used to receive and send wireless signals, and mainly integrates the receiver and transmitter of the first device 100. In specific implementations, the communication module 103 communicates with the communication network and other communication devices through radio frequency signals. In specific implementations, the communication module 103 can include but is not limited to a mobile communication module (such as a 4G module, a 5G module), a wireless fidelity (Wi-Fi) module, a Bluetooth module, and the like. In specific implementations, the Wi-Fi module and the Bluetooth module can be used to establish a Wi-Fi, Bluetooth, or the like communication connection with other communication devices, such as the second device 200, to realize near-distance data communication (which can be, for example, as shown in FIG. 1). Figure 1 In some embodiments, the communication module 103 can be implemented on a separate chip. The communication module 103 receives data or sends data according to the instructions of the main processor 1011 or the auxiliary processor 1012.
[0095] The memory 102 is coupled to the processor 101 and stores various software programs and / or sets of instructions. In particular implementations, the memory 102 can include a high-speed random access memory and can also include a non-volatile memory such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 102 can store an operating system (hereinafter referred to as the system), such as an embedded operating system, e.g., ANDROID, IOS, WINDOWS, or LINUX. The memory 102 can also store a network communication program that can be used to communicate with one or more terminal devices, e.g., the second device. The memory 102 can also store a user interface program that can display the content of an application program in a lifelike manner through a graphical operation interface and receive a control operation of the application program by a user through input controls such as menus, dialog boxes, and buttons. In embodiments of the present application, the memory 102 can store application program state information.
[0096] The communication bus 104 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.
[0097] The input / output system 105 is mainly used to realize the interaction function between the device 100 and the user / external environment and mainly includes input / output devices of the device 100. In particular implementations, the input / output system 105 can include a touch screen controller, a camera controller, an audio controller, etc. The various controllers can be coupled to the respective peripheral devices (touch screen, camera, audio circuit). It should be noted that the input / output system 105 can also include other I / O devices.
[0098] It can be understood that, Figure 6 The device 100 shown in the figure can be the device described in the foregoing. The structure shown in the embodiments of the present application does not constitute a specific limitation on the device 100. In other embodiments of the present application, the device 100 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware. It can be understood that the structure shown in the embodiments does not constitute a specific limitation on the communication system.
[0099] The following will be described in combination with Figure 6The communication system is shown, and the application state sensing method provided by the embodiments of the present application is specifically introduced. Please refer to Figure 7 , Figure 7 is a flow diagram of the application state sensing method provided by the embodiments of the present application, as Figure 7 shown, the application state sensing method comprises steps S101-S114.
[0100] In the application state sensing method provided by the embodiments of the present application, first, when the first device is in an active state, the first device can query the running state of the application on the first device, and save the application state information in the storage. After storing the application state information, the first device can obtain the running state of the application by querying the application state information in the storage. Then, before the first device enters a sleep state, the first device re-queries the running state of the application on the first device, updates the stored application state information, so that the application state information stored in the storage is the running state of the application on the first device when the first device is in the sleep state. Finally, after the first device enters the sleep state, the first device can broadcast the application state information of the first device to the second device, and the first device can also query the running state of the application on the second device to the second device.
[0101] In the embodiments of the present application, the application state sensing method can be divided into two stages. The first stage is steps S101-S107, the application state information storage stage; the second stage is steps S108-S114, the application state sensing stage.
[0102] Among them: steps S101-S106: introduce the process of storing application state information. Step S107: introduce the process of updating application state information, steps S108-S109: introduce the process of broadcasting application state information. Steps S110-S114: introduce the process of querying application state information. Described below.
[0103] (I) Steps S101-S106, store the application state information.
[0104] S101: The first device queries the running state of the first application on the first device.
[0105] The running state of the application program includes at least a dormant state and an active state. The application program in the dormant state no longer processes operations such as data transmission. For example, when the smart phone needs to obtain data in the sports health application program on the wearable device, the smart phone cannot obtain the data in the sports health application program on the wearable device when the sports health application program is in the dormant state. The first device can include one or more application programs, and the application program queried by the first device can be all application programs on the first device or preset application programs on the first device, which is not limited in the present application.
[0106] S102: The first device generates application program state information.
[0107] Specifically, after the first device queries the running state of the first application program, the first device can generate the application program state information according to a preset rule. The application program state information includes the correspondence between the identifier of the first application program and the running state of the first application program. The application program state information can be in the form of an application program code or an application program state table, and the rule for generating the application program state information is different. In specific implementation, the application program state information can also have other forms, which are not limited in the present application.
[0108] Optionally, the first device encodes the first application program and the running state of the first application program according to a preset rule to generate an application program code to indicate the correspondence between the first application program and the running state of the first application program. The application program code can include a first sub-code and a second sub-code. The first sub-code corresponds to the running state of the first application program and is used to indicate the running state of the first application program. The second sub-code corresponds to the first application program and is used to indicate the first application program.
[0109] For example, the application program code can be encoded by 4-bit binary numbers, which include 2 sub-codes. As shown in Table 1, the first sub-code can be composed of 1-bit binary number, which is used to indicate the running state of the application program. For example, 0 represents the dormant state, and 1 represents the active state. The second sub-code can be composed of 3-bit binary number, which is used to indicate the identifier of the application program. The combination of 3-bit binary number can represent 8 application programs. In specific implementation, according to the number of application programs, the second sub-code can also have more or fewer bits to indicate more or fewer application programs. For example, 001 represents application program 1, 010 represents application program 2, and 011 represents application program 3. The encoding of the application program and the corresponding state of the application program can be as shown in Table 1. Figure 8a
[0110] Application Status Code Application 1 Active 1001 Application 2 Active 1010 Application 3 Dormant 0011
[0111] Table 1
[0112] It should be noted that Table 1 is only one implementation provided by the embodiments of the present application, and should not be construed as a limitation.
[0113] Optionally, in the embodiments of the present application, the application code can further include third sub-code, the third sub-code is used to indicate the identity of the device. As shown in the third sub-code can be coded by 3 binary digits, 3 binary digits combination can represent 8 devices. For example, 001 can represent device 1. Application code 1001001 can represent the running state of application 1 on device 1 is active state. Figure 8b
[0114] The application code provided in the embodiments of the present application can be represented by other forms, such as octal, decimal, hexadecimal, etc. According to the actual application, the number of bits of the code can also be more or less, for example, 16-bit representation, 8-bit representation, etc. The state of the application can also be 1 to indicate sleep, 0 to indicate active, etc. The application code provided in the embodiments of the present application is only an example, and should not be construed as a limitation of the present application.
[0115] Optionally, the first device generates an application state table according to the application and the running state of the application. The application state table includes the correspondence between the identity of the first application and the running state of the first application.
[0116] Exemplarily, the application state table can include the identity of the application (such as the name of the application), the running state of the application (such as active state or sleep state). For example, the application state table can be as shown in Table 2.
[0117] Application Version Status Application 1 V1.1 Active Application 2 V1.2 Active Application 3 V1.2 Dormant
[0118] Table 2
[0119] It should be noted that Table 2 is only one implementation provided by the embodiments of the present application, and should not be construed as a limitation.
[0120] Optionally, the application state table can further include an application state bit. The application state bit is coded according to a preset rule to indicate the application. The application state bit includes a plurality of sub-state bits, and the plurality of sub-state bits correspond to a plurality of applications one by one. The first state bit is one of the plurality of sub-state bits, and the first state bit includes a first sub-state bit, and the first sub-state bit corresponds to the first application.
[0121] Exemplarily, the application state bit can be represented by a 16-bit binary number, which represents 16 sub-state bits, and the 16 sub-state bits can correspond to 16 application programs one by one. For example, the 16-bit binary number 0000 0000 0000 0001 can represent application program 1, and the 16-bit binary number 0000 0000 0000 0010 can represent application program 2. The application state bit provided by the embodiments of the present application is only an example, and should not constitute any limitation on the embodiments of the present application. The application state bit of the embodiments of the present application can also be represented by other encoding methods, which are not limited by the present application. For example, the application state table can be as shown in Table 3.
[0122]
[0123] Table 3
[0124] It should be noted that Table 3 is only one implementation provided by the embodiments of the present application, and should not constitute a limitation. In specific implementation, the information of the application program can be added according to actual conditions, which is not limited by the present application.
[0125] Optionally, the application state can also include the application program code. For example, the application state table can be as shown in Table 4.
[0126] Application Version Status Code Application 1 V1.1 Active 1001 Application 2 V1.2 Active 1010 Application 3 V1.2 Dormant 0011
[0127] Table 4
[0128] It should be noted that Table 4 is only one implementation provided by the embodiments of the present application, and should not constitute a limitation. In specific implementation, the application state table can include more or less information of the application program, which is not limited by the present application.
[0129] S103: The first device stores the application state information.
[0130] Specifically, before the first device is in sleep, the first device stores the generated application state information in the memory. The stored application state information can have various forms of representation, for example, the application state table as shown in Table 3 can be stored, and the first device only needs to query the state corresponding to application program 1 in the application state table to query the running state of application program 1. There is no need to query the running state of application program 1 on the first device, which can reduce the power consumption of the first device.
[0131] S104: The first device sends the application state information to the second device.
[0132] Specifically, before the first device is in sleep, the first device sends the stored application state information to the second device.
[0133] S105: The second device receives the application status information sent by the first device.
[0134] S106: The second device stores the application status information sent by the first device.
[0135] In this embodiment, application status information from a first device is sent to a second device, which then stores the application status information sent by the first device. When the second device needs to obtain the running status of an application on the first device, it only needs to query the application status information sent by the first device stored in the auxiliary storage, without initiating an application running status query to the first device and waiting for the first device to send back the application running status. This improves query efficiency and reduces the power consumption of both the first and second devices.
[0136] (ii) Step S107: Update application status information.
[0137] S107: The first device updates the stored application status information.
[0138] Specifically, at a predetermined time before the first device goes into sleep mode, the first device re-queries the running status of the first application on the first device and then updates the application status information stored in the first device according to the running status of the first application. For example, if the application code stored in the first device is 0001, 0001 indicates that the state of application 1 is sleep mode. When the first device switches from active to sleep mode, if the first device finds that the running status of application 1 is active, the first device can update the application code stored in the first device to 1001, indicating that the running status of application 1 is active. This ensures that when the first device enters sleep mode, the application status information stored in the first device is the running status of the corresponding application on the first device, avoiding the situation where the running status of the application stored in the first device is not up-to-date when the first device broadcasts the application status information, which could mislead other devices.
[0139] (III) Steps S108-S109: Broadcast application status information.
[0140] S108: The first device broadcasts application status information to the second device.
[0141] Specifically, when the first device is in sleep state, the first device broadcasts the application state information to the second device every preset time length. The application state information can be an application code, the first device accesses the stored application state information to obtain the application code, the first device can broadcast the application code to the second device to indicate the first application on the first device and the running state corresponding to the first application. The application state information can also be an application state table as shown in Table 3, the first device accesses the stored application state information to obtain the application state bit. The first device broadcasts the application state bit to the second device to indicate the second device to query the application state table stored on the second device to obtain the running state corresponding to the application on the first device. In this way, by broadcasting the application code or the application state bit, the complete application and the running state corresponding to the application do not need to be broadcasted, and the information transmission amount is reduced and the transmission efficiency is improved by using the coding manner.
[0142] S109: The second device receives the application state information broadcasted by the first device and updates the application state information on the second device.
[0143] Specifically, when the second device is in sleep state, the second device receives the application state information of the first device broadcasted by the first device, and the second device updates the application state information of the first device stored in the second device according to the application state information of the first device.
[0144] (IV) Steps S110-S114, querying the application state information.
[0145] S110: The second device determines whether the application state information sent by the first device is stored. If yes, S111 is performed; if no, S112-S114 are performed.
[0146] Specifically, the second device can access the stored application state information to query whether the application state information sent by the first device is stored. That is, whether the second device receives and saves the application state information sent by the first device before the second device is in sleep state. If the application state information sent by the first device is stored in the stored application state information, S111 is performed; if the application state information sent by the first device is not stored in the stored application state information, S112-S114 are performed.
[0147] S111: Querying the application state information to obtain the running state of the first application.
[0148] Specifically, before querying the running state of the first application, the second device receives and stores the application state information sent by the first device. When the second device wants to query the running state of the first application on the first device, first, the stored application state information can be accessed to obtain the application state information of the first device. Then, the application state information is parsed according to the preset rule, and the running state of the first application can be obtained. For example, the obtained application state information is application code 1001 1010 0011, and according to the preset encoding rule, it can be known that the application code respectively represents that the running state of the application 1 is active, the running state of the application 2 is active, and the running state of the application 3 is dormant. If the application 1 is the first application, the state of the first application can be obtained as active. In this way, when the second device needs to query the running state of the first application on the first device, it only needs to query the application state information stored on the second device, and does not need to send a running state query request to the first device to wake up the first device to query the current running state of the first application on the first device, and then send to the second device by calling the communication interface. In this way, the power consumption of the device is greatly reduced.
[0149] S112: The second device sends a first application state query request to the first device.
[0150] S113: The first device queries the application state information to obtain the state of the first application.
[0151] Specifically, in response to the second device querying the running state of the first application, the first device queries the stored application state information, and then parses the application state information according to the preset rule to obtain the running state of the first application. For details of the operation of parsing the application state information, refer to the related operation of the first device in S108, which will not be repeated here.
[0152] S114: The first device sends the running state of the first application to the second device.
[0153] Optionally, the first device can also send the application state code to the second device, and the second device parses the application state code to obtain the running state of the first application.
[0154] Optionally, the above embodiment is described by taking the second stage as an example that the first device and the second device are in a dormant state. In a specific implementation, in the second stage, the first device and / or the second device can be in a non-dormant state.
[0155] It should be noted that the relevant operations of the first device mentioned above can be performed by the second device or the third device. Correspondingly, the relevant operations of the second device can also be performed by the first device or the third device. This application does not impose any limitations on this.
[0156] It should be noted that, for the sake of simplicity, the above method embodiments are described as a series of actions. However, those skilled in the art should know that the present invention is not limited to the described order of actions. Furthermore, those skilled in the art should also know that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily required by the present invention.
[0157] Next, combine Figure 6 The equipment shown is described. Figure 7 The devices in the embodiments and the cooperative relationships of the various components in the devices in this application embodiment.
[0158] Figure 9 The illustrative diagram illustrates the cooperative relationship between various components in the first device 100 and various components in the second device 200 in this embodiment of the application. For example... Figure 9 As shown, the first device 100 includes a main processor 110, an auxiliary processor 120, a memory 130, and a communication module 140; correspondingly, the second device 200 includes a main processor 210, an auxiliary processor 220, a memory 230, and a communication module 240. Figure 7 In this embodiment, taking the case where the main processors of both the first device 100 and the second device 200 are in a sleep state during application state awareness as an example, the following is a detailed description:
[0159] (a) Steps 1-7: Store application status information.
[0160] 1-4. The main processor 110 queries the running status of the first application and generates application status information. After generating the application status information, the main processor 110 stores the application status information in the memory 130 and sends an instruction to the communication module 140, instructing the communication module 140 to send the application status information to the second device 200. Specifically, the process of generating the application status information can be referred to the foregoing. Figure 7 The relevant operations of step S102 in the embodiment will not be described again here.
[0161] 5. In response to the instructions sent by the main processor, the communication module 140 sends application status information to the second device 200.
[0162] 6. The communication module 240 will receive the application status information sent by the communication module 140 and send it to the main processor 210.
[0163] 7. The main processor 210 stores the application state information in the storage 230.
[0164] (II) Steps 8-10, updating the application state information.
[0165] 8. The main processor 110 updates the application state information. Specifically, the related operations of the main processor 110 updating the application state information can refer to the related operations in step S107 in the foregoing Figure 7 embodiments, which will not be described here again.
[0166] 9-10. The main processor 110 and the main processor 210 enter the sleep state.
[0167] (III) Steps 11-16, broadcasting the application state information.
[0168] 11-13. The auxiliary processor 120 accesses the application state information in the storage 130, and sends a broadcast instruction to the communication module 140 to instruct the communication module 140 to broadcast the application state information to the second device 200.
[0169] 14. The communication module 140 broadcasts the application state information to the second device 200 in response to the broadcast instruction of the auxiliary processor 110.
[0170] 15. The communication module 240 receives the application state information and sends it to the auxiliary processor 210.
[0171] 16. The auxiliary processor 220 updates the application state information in the storage 230. Specifically, the related operations of the auxiliary processor 210 updating the application state information in the storage 230 can refer to the related operations in the foregoing Figure 7 embodiments, which will not be described here again.
[0172] (IV) Steps 17-26, querying the application state information.
[0173] 17-18. The auxiliary processor 220 accesses the application state information in the storage 230 to obtain the running state of the first application. Specifically, the related operations can refer to the related operations in step S111 in the foregoing Figure 7 embodiments, which will not be described here again.
[0174] 19. The auxiliary processor 220 sends a query instruction to the communication module 240 to instruct the communication module 240 to send a query request for the running state of the first application to the first device 100.
[0175] 20. The communication module 240 sends a query request for the running state of the first application to the first device 100 in response to the query instruction of the auxiliary processor 220.
[0176] 21, the communication module 140 receives the query first application running state request, and sends the query first application running state request to the auxiliary processor 120.
[0177] 22-24, the auxiliary processor 120 accesses the memory 130, obtains the running state of the first application, and sends a state instruction to the communication module 140, instructing the communication module 140 to send the running state of the first application to the second device 200. Specifically, the related operations can refer to the related operations in steps S112 in the foregoing Figure 7 Embodiments, which will not be described here.
[0178] 25, the communication module 140 sends the running state of the first application to the second device 200 in response to the instruction from the auxiliary processor 120.
[0179] 26, the communication module 240 receives the running state of the first application and sends it to the auxiliary processor 220.
[0180] Optionally, in steps 22-24, the auxiliary processor 120 of the first device 100 can send an instruction to the communication module 140 after querying the running state of the application, instructing the communication module 140 to send the application state information to the second device 200. In step 26, the communication module 240 of the second device 200 receives the application state information, and the auxiliary processor 220 of the second device 200 parses the application state information to obtain the running state of the first application.
[0181] It is worth noting that the main processor 110 and the main processor 210 in the foregoing embodiments are in the sleep state, which is merely for illustration. In the application embodiments, the main processor 110 and / or the main processor 210 can also be in the non-sleep state during the application running state sensing process. When the main processor 110 is in the non-sleep state, the related operations of the auxiliary processor 120 in steps 11-13 and 22-24 in the foregoing embodiments can be performed by the main processor 110. When the main processor 210 is in the non-sleep state, the related operations of the auxiliary processor 220 in steps 16-19 in the foregoing embodiments can be performed by the main processor 210.
[0182] Optionally, in steps 11-26, the main processor 110 and the main processor 210 can be in the non-sleep state. For example, when the main processor 110 is in a high load state, the auxiliary processor 120 instructs the communication module 140 to broadcast the application state information or query the application state information, which can relieve the high load state of the main processor 110 and improve the system performance.
[0183] In the embodiment of the present application, before the first device is in the sleep state, the application program state information is stored. When the running state of the application program needs to be queried in the sleep state of the first device, the stored application program information can be directly queried, and the main processor of the first device does not need to be woken up to query the current running state of the application program, thereby reducing the power consumption of the first device. In the sleep state, the auxiliary processor of the first device can send the application program state information to the second device. Before the second device is in the sleep state, the application program state information sent by the first device is received and stored. When the running state of the application program on the first device needs to be queried in the sleep state of the second device, the second device can directly query the stored application program state information sent by the first device through the auxiliary processor, and the main processor of the second device does not need to be woken up to send an application program running state query request to the first device, thereby reducing the power consumption of the first device and the second device and saving network resources.
[0184] The application embodiments will be described in detail below in combination with an application scenario as shown in Figure 2
[0185] When the wearable device is in the active state, the motion health application program on the wearable device can record the motion steps of the user collected by the motion sensor, such as an accelerometer, a gyroscope, a magnetometer, and the like.
[0186] According to steps 1-3, the main processor of the wearable device queries the running state of the motion health application program, for example, the motion health application program is in the sleep state. After the running state of the motion health application program is queried, the main processor of the wearable device generates an application program code and stores the application program code in the storage. For example, the identifier of the application health program is application program 1, the generated application program code is 0001, indicating that the running state of the application program 1 is the sleep state, and 0001 is stored in the storage. According to steps 4-5, the wearable device sends the motion health application program code 0001 to the smart phone after the application program code is generated. According to steps 6-7, the smart phone stores 0001 in the storage after receiving the application program code 0001.
[0187] According to steps 8-10, before the wearable device enters the sleep state, the wearable device rechecks the running state of the sports health application and updates the application code 0001 in the storage. After the wearable device enters the sleep state, if the smartphone wants to query the user's sports steps recorded on the sports health application of the wearable device, the smartphone first needs to query the running state of the sports health application of the wearable device. If the running state of the sports health application of the wearable device is the active state, the smartphone can directly initiate a sports step query to the sports health application of the wearable device. If the running state of the sports health application of the wearable device is the sleep state, the smartphone can choose not to query first, and wait until the wearable device is woken up to query the sports steps. The smartphone can obtain the running state of the sports health application of the wearable device in two ways. The first way is that the wearable device broadcasts the sports health application code. The second way is that the smartphone queries the running state of the sports health application.
[0188] According to steps 11-16, the auxiliary processor of the wearable device can access the sports health application code stored in the storage, and can broadcast the sports health application code 0001 to the smartphone according to the timing. The smartphone can obtain the running state of the sports health application as the sleep state after receiving the broadcasted sports health application code 0001.
[0189] According to steps 17-26, the smartphone querying the running state of the sports health application can be divided into two cases.
[0190] The first case: if the sports health application code 0001 has been sent to the smartphone before the wearable device enters the sleep state, according to steps 17-18, the auxiliary processor of the smartphone can check the code 0001 stored in the storage of the smartphone to obtain the running state of the sports health application.
[0191] The second case: if the sports health application code 0001 has not been sent to the smartphone before the wearable device enters the sleep state, or the smartphone does not receive the sent code 0001, according to steps 19-26, the auxiliary processor of the smartphone can initiate a sports health application running state query to the wearable device. After receiving the query request of the smartphone, the wearable device queries the sports health application code in the storage to obtain the running state of the sports health application, and then sends it to the smartphone.
[0192] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0193] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0194] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0195] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 Figure 1 The steps of the function specified in one or more boxes.
[0196] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. An application state awareness method applied to a first device, comprising: The method comprises: Before the main processor of the first device is in sleep, the running state of the first application on the first device is inquired; The main processor of the first device stores application state information, and the application state information comprises the correspondence between the identifier of the first application and the running state of the first application; When the main processor of the first device is in sleep, the auxiliary processor of the first device sends the application state information to the second device, so that the second device determines the running state of the first application.
2. The method of claim 1, wherein, The method further comprises: At a first preset time before sleep, the first device updates the stored application state information.
3. The method according to claim 1 or 2, characterized in that, The running state of the application comprises at least sleep state and active state.
4. The method according to any one of claims 1 to 3, characterized in that, The application state information comprises: first application code, the first application code comprising first sub-code and second sub-code; the first sub-code is used for indicating the running state of the first application; and the second sub-code is used for indicating the first application.
5. The method according to any one of claims 1 to 3, characterized in that, The application state information comprises: an application state table, and the application state table comprises the correspondence between the identifier of the first application and the running state of the first application.
6. The method of claim 5, wherein, The application state table further comprises a first state bit, and the first state bit comprises a first sub-state bit corresponding to the first application.
7. The method according to any one of claims 1 to 6, characterized in that, The method further comprises: Before the main processor of the first device is in sleep, the main processor of the first device sends the application state information to the second device.
8. The method according to any one of claims 1-6, characterized in that, When the first device is in sleep, the auxiliary processor of the first device sends the application state information to the second device, and specifically comprises: When the main processor of the first device is in sleep, the auxiliary processor of the first device broadcasts the application state information to the second device every preset time length.
9. The method according to any one of claims 1-6, characterized in that, When the main processor of the first device is in sleep, the auxiliary processor of the first device sends the application state information to the second device, and specifically comprises: In response to the request of the second device inquiring the running state of the first application, the auxiliary processor of the first device inquires the stored application state information to obtain the state of the first application; The auxiliary processor of the first device sends the running state of the first application to the second device.
10. An application state awareness method applied to a second device, comprising: The method comprises: The main processor of the second device receives the application state information sent by the first device, and the application state information comprises the correspondence between the identifier of the first application on the first device and the running state of the first application; The main processor of the second device stores the application state information; When the main processor of the second device is in sleep, the auxiliary processor of the second device inquires the stored application state information to determine the running state of the first application in the first device.
11. The method of claim 10, wherein, The method further comprises: The auxiliary processor of the second device receives the application state information of the first device broadcast by the first device when the main processor of the second device is in sleep state; The auxiliary processor of the second device updates the application state information of the first device stored in the second device according to the application state information of the first device.
12. The method of claim 10, wherein, The method further comprises: The auxiliary processor of the second device sends the running state query request of the first application to the first device when the main processor of the second device is in sleep state.
13. An apparatus, comprising: The device comprises one or more processors and a memory, the one or more processors comprising a main processor and an auxiliary processor; the memory is coupled with the one or more processors, and the memory is used to store computer program codes, the computer program codes comprising computer instructions, the one or more processors invoking the computer instructions to enable the device to perform: Query the running state of the first application installed on the device before the main processor of the device is in sleep state; The main processor of the device stores application state information, and the application state information comprises the correspondence between the identifier of the first application and the running state of the first application; The auxiliary processor of the device sends the application state information to a second device to enable the second device to determine the running state of the first application when the device is in sleep state.
14. The apparatus of claim 13, wherein, The one or more processors are further configured to invoke the computer instructions to enable the device to perform: Update the stored application state information at a first preset time point before the device is in sleep state.
15. The apparatus of claim 13 or 14, characterized in that, The running state of the application comprises at least sleep state and active state.
16. The apparatus of any one of claims 13-15, wherein, The application state information comprises: first application code, the first application code comprising first sub-code and second sub-code; the first sub-code is used to indicate the running state of the first application; and the second sub-code is used to indicate the first application.
17. The apparatus of any one of claims 13-15, wherein, The application state information comprises: an application state table, the application state table comprising the correspondence between the identifier of the first application and the running state of the first application.
18. The apparatus of any one of claims 13-15, wherein, The application state table further comprises a first state bit, the first state bit comprising third sub-code, the third sub-code corresponding to the first application.
19. The apparatus of any of claims 13-18, wherein, The auxiliary processor is further configured to invoke the computer instructions to enable the device to perform: Send the application state information to the second device before the device is in sleep state.
20. The apparatus of any of claims 13-18, wherein, The auxiliary processor is specifically configured to invoke the computer instructions to enable the device to perform: Broadcast the application state information to a second device every preset time length when the main processor of the device is in sleep state.
21. The apparatus of any one of claims 13-18, wherein, The auxiliary processor is further configured to invoke the computer instructions to enable the device to perform: In response to the request of the second device to query the state of the first application, query the stored application state information to obtain the running state of the first application; The auxiliary processor of the second device receives the application state information of the first device broadcast by the first device when the main processor of the second device is in sleep state; The auxiliary processor of the second device updates the application state information of the first device stored in the second device according to the application state information of the first device. The method further comprises: The auxiliary processor of the second device sends the running state query request of the first application to the first device when the main processor of the second device is in sleep state. The device comprises one or more processors and a memory, the one or more processors comprising a main processor and an auxiliary processor; the memory is coupled with the one or more processors, and the memory is used to store computer program codes, the computer program codes comprising computer instructions, the one or more processors invoking the computer instructions to enable the device to perform: Query the running state of the first application installed on the device before the main processor of the device is in sleep state; The main processor of the device stores application state information, and the application state information comprises the correspondence between the identifier of the first application and the running state of the first application; The auxiliary processor of the device sends the application state information to a second device to enable the second device to determine the running state of the first application when the device is in sleep state. The one or more processors are further configured to invoke the computer instructions to enable the device to perform: Update the stored application state information at a first preset time point before the device is in sleep state. The running state of the application comprises at least sleep state and active state. The application state information comprises: first application code, the first application code comprising first sub-code and second sub-code; the first sub-code is used to indicate the running state of the first application; and the second sub-code is used to indicate the first application. The application state information comprises: an application state table, the application state table comprising the correspondence between the identifier of the first application and the running state of the first application. The application state table further comprises a first state bit, the first state bit comprising third sub-code, the third sub-code corresponding to the first application. The auxiliary processor is further configured to invoke the computer instructions to enable the device to perform: Send the application state information to the second device before the device is in sleep state. The auxiliary processor is specifically configured to invoke the computer instructions to enable the device to perform: Broadcast the application state information to a second device every preset time length when the main processor of the device is in sleep state. The auxiliary processor is further configured to invoke the computer instructions to enable the device to perform: In response to the request of the second device to query the state of the first application, query the stored application state information to obtain the running state of the first application; sending, to the second device, the running state of the first application.
22. An apparatus, comprising: The device comprises one or more processors and a memory, the one or more processors comprising a main processor and an auxiliary processor; The memory is coupled to the one or more processors, and is configured to store computer program codes comprising computer instructions, which are invoked by the one or more processors to cause the device to perform: The main processor of the device receives application state information sent by the first device, the application state information comprising a correspondence between an identifier of a first application on the first device and a running state of the first application; The main processor of the device stores the application state information; When the device is in sleep, the auxiliary processor of the device queries the stored application state information to determine the running state of the first application on the first device.
23. The apparatus of claim 22, wherein, The auxiliary processor is further configured to invoke the computer instructions to cause the device to perform: When the device is in sleep, receive the application state information of the first device broadcast by the first device; According to the application state information of the first device, update the application state information of the first device stored in the device.
24. The apparatus of claim 22, wherein, The auxiliary processor is further configured to invoke the computer instructions to cause the device to perform: When the device is in sleep, send a running state query request of the first application to the first device.
25. A communication system, characterized by The first device and the second device are included, wherein: The first device is configured to: query a running state of a first application on the first device before a main processor of the first device is in sleep; store, by the main processor, application state information comprising a correspondence between an identifier of the first application and the running state of the first application; and send, by an auxiliary processor of the first device, the application state information to the second device to cause the second device to determine the running state of the first application when the main processor of the first device is in sleep; The second device is configured to: receive, by a main processor of the second device, the application state information sent by the first device; store, by the main processor of the second device, the application state information; and query, by an auxiliary processor of the second device, the stored application state information to determine the running state of the first application on the first device when the main processor of the second device is in sleep.
26. A chip system applied to a device, the chip system comprising one or more processors configured to invoke computer instructions to cause the device to perform the method of any one of claims 1-9, or perform the method of any one of claims 10-12.
27. A computer program product comprising instructions, wherein: The computer program product, when running on a device, causes the device to perform the method of any one of claims 1-9, or perform the method of any one of claims 10-12.
28. A computer-readable storage medium comprising instructions, wherein: which when run on a device, cause the device to perform the method of any one of claims 1-9, or, perform the method of any one of claims 10-12.
Citation Information
Patent Citations
Communication of processor state information
US20160066273A1