Wake-up method, electronic device and readable storage medium
By uniformly managing the wake-up cycle of multiple registered services and reasonably waking up the Sensorhub coprocessor, the high power consumption problem caused by multiple services wake-up in smart terminal devices is solved and the device battery life is extended.
Patent Information
- Application Number
- CN202311719778.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2043-12-13
AI Technical Summary
In smart terminal devices, when multiple processors work together, especially the service wake-up method of Sensorhub coprocessors leads to high power consumption, resulting in the power consumption advantage of low-power memory cannot be fully utilized, especially in the multi-service wake-up situation. Under the , the processor frequently enters the high power consumption mode , increasing the overall power consumption .
By calculating the unified wake-up judgment cycle of multiple registered services, the number of processor wake-up times is reduced, the wake-up cycle of each service is reasonably managed, the target service wake-up at the right time is ensured, and the power consumption of the processor is reduced.
It effectively reduces the power consumption of Sensorhub coprocessor, extends the terminal's battery life, improves the user experience, and reduces the number of times the processor is in a high-power state through reasonable wake-up management.
Smart Images

Figure CN118450471B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a wake-up method, an electronic device and a readable storage medium. Background Art
[0002] Performance, power consumption, and stability have always been topics that cannot be avoided in the field of smart terminal technology. Better power consumption means that under the same power conditions, users can use the terminal for a longer battery life. However, the current terminal service wake-up method may cause the terminal to consume relatively high power.
[0003] For example, some current smart terminal products are operated by multiple processors, including application processors (AP) and smart sensor hubs (Sensorhub) coprocessors. The AP processor has a high working current and is mainly used to process interactions with users. Services that need to be used in the screen-off sleep scenario are generally deployed on the Sensorhub coprocessor. The Sensorhub coprocessor has two working modes, one is the normal working mode; the other is the low power mode. In comparison, the low power mode has better power consumption, but a dedicated low power memory is required to achieve the low power mode. The low power memory is expensive. For cost considerations, the low power memory used for the Sensorhub coprocessor on the terminal is very limited. As a result, the low power memory on the terminal is less than the memory required by the functional modules that can be deployed in the low power mode. Therefore, it is more important to play the role of low power memory more reasonably. However, the services of the terminal generally combine the functional modules that can only be deployed in the normal working mode and the functional modules that can be deployed in the low power mode. It is necessary to wake up the services according to a certain wake-up cycle and start the functional modules that can only be deployed in the normal working mode. In this way, as the number of services increases, the number of wake-up times also increases, and the total number of times the Sensorhub coprocessor is in normal power consumption mode increases, so that the power consumption advantage of the low-power memory of the Sensorhub coprocessor cannot be better utilized. Summary of the invention
[0004] The present application provides a wake-up method, an electronic device, and a readable storage medium. The technical solution is as follows:
[0005] In a first aspect, a wake-up method is provided, comprising: obtaining unified timing information of wake-up cycles of multiple registration services; wherein the multiple registration services are services in a running state; when the multiple registration services are awakened, the same processor is triggered to run corresponding processes; the unified timing information is determined by timing from a common initial timing moment of the multiple registration services; according to the unified timing information and the unified wake-up judgment cycle of the multiple registration services, determining to perform a wake-up operation on at least one target registration service; the multiple registration services include at least one target registration service; the unified wake-up judgment cycle is determined according to the wake-up cycle of each registration service; and generating wake-up information of the target registration service.
[0006] When multiple registered services are awakened, the same processor is triggered to run corresponding processes, which may mean that when multiple registered services are awakened, the same processor is triggered to run the processes corresponding to each registered service. That is, when multiple registered services are triggered, the same processor may enter a running state or a running state with higher power consumption.
[0007] When multiple registration services are deployed on the same processor side, the awakening of the registration service will cause the processor to enter a higher working mode. No matter how many registration services are awakened each time, the processor needs to enter the working state from the sleep state, or enter the normal power consumption mode with higher power consumption from the low power consumption mode. The awakening method provided by the embodiment of the present application predetermines a unified awakening judgment cycle for multiple registration services. When the end time of the unified awakening cycle arrives, for each registration service, it is determined whether the registration service needs to be awakened, and the registration service that is determined to need to be awakened is used as the target registration service, that is, it is determined that at least one of the multiple registration services has reached the awakening time. Then the awakening information of the target registration service is generated, and the awakening information is used to finally awaken the process corresponding to the target registration service running on the processor, so that the total number of times the processor is in the awakened state triggered by the registration service is reduced, which can reduce the power consumption of the processor.
[0008] In one implementation, the wake-up method further includes: obtaining a wake-up period corresponding to each of the registered services according to the registration information of each of the registered services; and determining a unified wake-up judgment period according to the wake-up periods of multiple registered services.
[0009] In the embodiment of the present application, the wake-up period determined according to the registration information of the registered service is an independent wake-up period for each registered service, or an approximate period of the independent wake-up period for each registered service. When applying for registration, the terminal service reports the wake-up period of the service under normal circumstances and the functional module corresponding to the wake-up period to achieve registration, so that the service becomes a registered service. If the registered service includes more than two functional modules that need to be awakened, the registered service can report its own independent wake-up period and information of the two functional modules that need to be awakened.
[0010] According to the independent wake-up cycles of each registered service, a unified wake-up judgment cycle is determined, so that the wake-up cycles of each registered service can be taken into account. According to the unified wake-up judgment cycle, it is judged whether the current time node is the time node for the operation of waking up the registered service, which corresponds to the independent wake-up cycle of each registered service, ensuring that each registered service is awakened normally and the service function is realized normally.
[0011] In one embodiment, a unified wake-up judgment period is determined based on the wake-up periods of multiple registered services, including: determining the unified wake-up judgment period based on the greatest common divisor of the rounded values of the wake-up periods of multiple registered services; or, taking the minimum value of the wake-up periods of multiple registered services as the unified wake-up judgment period.
[0012] In an embodiment of the present application, among multiple wake-up cycles of multiple registration services, when more than one wake-up cycle is a decimal, the wake-up cycles of the multiple registration services can be rounded, and the multiple wake-up cycles are multiplied by a rounding parameter to obtain the rounded values of the wake-up cycles of the multiple registration services, and then the rounded values are divided by the rounding parameter to obtain a unified wake-up judgment cycle. For example, when the wake-up cycle includes two decimal places, the wake-up cycle is uniformly multiplied by the rounding parameter 100 to obtain the rounded values of the (corresponding) wake-up cycles of the multiple registration services, and the greatest common divisor of the rounded values is divided by the rounding parameter 100 to obtain a unified wake-up judgment cycle.
[0013] In the embodiment of the present application, when the multiple wake-up periods of the multiple registered services are integers, the rounded values corresponding to the wake-up periods of the multiple registered services are the wake-up periods of the integers.
[0014] The wake-up method provided in the embodiment of the present application adopts a more reasonable method to calculate the unified wake-up judgment cycle, which can ensure that the registered service is woken up according to the original wake-up cycle of the registered service itself while reducing the number of times the processor is in the wake-up state.
[0015] In one embodiment, the wake-up period corresponding to each of the registered services is obtained according to the registration information of each of the registered services, including: obtaining the original wake-up period of the registered service according to the registration information of each of the registered services; generating wake-up period correction negotiation information according to the original wake-up period of the registered service; the wake-up period correction negotiation information is used to request the registered service to adjust the original wake-up period; the adjustment method may be to add a small amount of time on the basis of the original wake-up period, to reduce a small amount of time on the basis of the original wake-up period, or to round the original wake-up period; according to the feedback result of the registered service on the wake-up period correction negotiation information, the original wake-up period is corrected to obtain the wake-up period of the registered service.
[0016] The module specifically used for registration management of the registration service (such as the registration center in other embodiments of the present application) can negotiate with the registration service to correct and adjust the original wake-up cycle of the registration service itself, thereby improving the management convenience of unified wake-up while ensuring that the registration service is awakened normally.
[0017] In one embodiment, the wake-up method further includes: for each registered service, obtaining an initial timing moment of the wake-up cycle of the registered service according to the registration information of the registered service; aligning the initial timing moments of the wake-up cycles of multiple registered services to obtain a common initial timing moment.
[0018] By aligning the initial timing moments of the wake-up cycles of multiple registered services, the wake-up cycles of the registered services can be uniformly managed, the unified wake-up determination cycle can be uniformly timed, and the total number of wake-up times of the processor triggered when all registered services are awakened can be reduced.
[0019] In one embodiment, the wake-up method also includes: sending a unified wake-up judgment cycle and a common initial timing time to the corresponding registration service, and determining to perform a wake-up operation on at least one target registration service based on the unified timing information and the unified wake-up judgment cycle of multiple registration services, including: the business application of the corresponding registration service can determine to wake up the target registration service based on the unified timing information and the unified wake-up judgment cycle of the registration service.
[0020] The registration service party can perform a judgment operation according to the unified wake-up judgment cycle to determine whether to wake up the registration service. If it is determined that its own registration service needs to be woken up, the registration service of the registration service party is the target registration service. The wake-up judgment is performed through the business application corresponding to each registration service, so as to realize unified control of the wake-up of each target registration service.
[0021] In one embodiment, the wake-up method also includes: the target registration service generates a work instruction based on the wake-up information; the target registration service sends the work instruction to the hardware signal module corresponding to the target registration service; the target registration service receives the monitoring information returned by the hardware signal module based on the work instruction.
[0022] The hardware signal module may be a sensor. The wake-up information can be used to trigger the sensor to collect monitoring information, such as ambient light information, acceleration information, gyroscope information, etc. After the monitoring information is received by the process corresponding to the registered service, it can trigger the process corresponding to the registered service to work, so that the operating space on which the registered service depends is in a working state. In the case where the registered service party performs a hardware trigger operation, the registered service can submit less functional module information when registering, reducing the data processing burden of the registration management module for the registered service.
[0023] In one embodiment, the wake-up method also includes: storing a unified wake-up judgment period and a common initial timing moment in a registration center of multiple registration services, and determining to perform a wake-up operation on at least one target registration service based on the unified timing information and the unified wake-up judgment period of the multiple registration services, including: the registration center determines to perform a wake-up operation on the target registration service based on the unified timing information and the unified wake-up judgment period of the registration service; wherein the wake-up information of the target registration service is generated by the registration center.
[0024] In this embodiment, the registration center is a module for registering and managing multiple registration services. After storing the unified wake-up judgment period and the common initial timing moment in the registration center of multiple registration services, the registration center performs a unified judgment operation on whether to wake up the multiple registration services, and determines the target registration services that need to be woken up in each round among the multiple registration services, and the registration center generates wake-up information for waking up the target registration services.
[0025] When the registration center generates wake-up information for waking up the target registration service, the operation of obtaining unified timing information for each registration service can also be uniformly executed by the registration center, which further improves the uniformity of the management of the wake-up operation of the registration service and reduces the operational burden of each registration service party.
[0026] In one embodiment, the wake-up method also includes: generating a work instruction based on the wake-up information; sending the work instruction to the hardware signal module corresponding to the target registered business; receiving monitoring information returned by the hardware signal module based on the wake-up information; and sending the monitoring information to the business application corresponding to the target registered business.
[0027] The registration center generates a work instruction, sends the work instruction to the hardware signal module and obtains the monitoring information of the hardware signal module, thereby reducing the information sending and receiving operations.
[0028] In one implementation, the wake-up method further includes: receiving registration information of a new registration service; and updating a unified wake-up cycle and a common initial timing moment according to the registration information of the new registration service.
[0029] The newly registered service does not belong to the current registered service. The newly registered service may be a service that is ready to be registered but has not yet completed registration. Among the services running on the terminal, some registered services may exist, and a unified wake-up operation is performed on the registered services. The other services running on the terminal may still perform independent wake-up operations according to their own wake-up cycles.
[0030] In one embodiment, multiple registration services are deployed on the coprocessor side of the terminal; each registration service includes: a first functional module deployed on the coprocessor side and in a first power consumption state, and a second functional module deployed on the coprocessor side and in a second power consumption state; the power consumption of the first power consumption state is higher than that of the second power consumption state; the first functional module runs in the space of the double data stream synchronous dynamic random access memory on the coprocessor side; determining to wake up at least one target registration service among the multiple registration services includes: determining to wake up at least one target functional module among the multiple registration services, the target functional module being the first functional module.
[0031] The first power consumption state may be equivalent to the normal working mode of other embodiments of the present application, and the second power consumption state may be equivalent to the low power consumption mode of other embodiments of the present application. Alternatively, the first power consumption state may be a non-sleep state, and the second power consumption state may be a sleep state. Each registered service may include at least one first functional module and at least one second functional module. The coprocessor may specifically be a Sensorhub coprocessor, and multiple registered services are services deployed on the same coprocessor side. The wake-up method provided in an embodiment of the present application can effectively reduce the length of time that the coprocessor is in the second power consumption state and reduce the power consumption of the coprocessor.
[0032] In a second aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions stored in the storage medium are executed on a computer, the computer can execute the method of the first aspect.
[0033] According to a third aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method according to the first aspect.
[0034] The technical effects obtained by the above-mentioned second and third aspects are similar to the technical effects obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a schematic diagram of an application scenario of an embodiment of the present application;
[0036] Figure 2 is another application scenario schematic diagram of an embodiment of the present application;
[0037] Figure 3 A schematic diagram of the software structure of the electronic device involved in the embodiment of the present application;
[0038] Figure 4 A flowchart of a wake-up method provided in an embodiment of the present application;
[0039] Figure 5This is a flowchart of an exemplary wake-up method of the present application;
[0040] Figure 6 A schematic diagram of increased power consumption caused by wake-up in an example of the present application;
[0041] Figure 7 Schematic diagram of the number of wake-up times for business alone;
[0042] Figure 8 This is a schematic diagram of the cause analysis of abnormal power consumption in an example of this application;
[0043] Fig. 9 This is a schematic diagram of the system architecture for setting up a registration center in an example of this application;
[0044] Fig.10 This is a schematic diagram of the interaction between the registration center and other structures in an example of this application;
[0045] Fig.11 A schematic diagram of the interaction between a registration center and a registration service in an example of this application;
[0046] Fig.12 A schematic diagram of the interaction process between the registration center and the registration service in another example of this application;
[0047] Fig.13 This is a schematic diagram of the change in the number of wake-up times in an example of this application;
[0048] Fig.14 This is a schematic diagram of the structure of a wake-up device according to an embodiment of the present application;
[0049] Fig.15 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0051] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0052] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0053] The Sensorhub coprocessor involved in the embodiment of the present application is a solution that combines software and hardware based on a low-power processor and a lightweight operating system. Its main function is to connect and process data from various hardware devices. These hardware devices may include light sensors, sound sensors, acceleration sensors, modems, etc. If the terminal's business needs to call the sensor device and use the data of the sensor device to achieve certain functions, then such business can be deployed on the Sensorhub coprocessor.
[0054] In general, the operating current of the terminal's AP processor may reach about 100mA or more, while the operating current of the terminal's Sensorhub coprocessor in normal working mode is about less than 100mA, such as 15mA-30mA, and the operating current of the Sensorhub coprocessor in low power mode is about 5mA-10mA. For terminal products that include AP processors and Sensorhub coprocessors working together, making full use of and giving full play to the power consumption optimization effect of the low-power memory of the Sensorhub coprocessor can greatly optimize the overall power consumption of the terminal and reduce the terminal's standby power consumption.
[0055] In an embodiment of the present application, when the terminal is deployed with an Android system, the terminal's service may be an Android application package (APK) of the terminal application, which is used to distribute and install mobile applications and middleware. The service may include at least one functional module, also referred to as a function or capability in the embodiment of the present application. The functional modules included in different services may be the same or overlapping. For example, service A includes functional modules a1 and b1, and service B includes functional modules b1 and c1, so that service A and service B include the same functional module b1. In addition, different terminal applications may involve one or more services at the same time. The functional module of the service may be an execution unit that the terminal performs some operations to obtain certain data. For example, the terminal is provided with a light sensor, a gravity sensor, an acceleration sensor, and a sound sensor. The functional module of the service may obtain sensor data through any sensor to obtain the corresponding detection result, and the service can combine different functions to realize other specific combined functions. For example, the service may realize the combined function of sleep recognition through a light sensor and a sound sensor.
[0056] For each service that can be deployed on the Sensorhub coprocessor, it may include multiple functions (or capabilities). Among them, some capabilities can only be deployed in the normal working mode of the Sensorhub coprocessor, and cannot be deployed in the low-power mode of the Sensorhub coprocessor, such as: the cell scanning function, the wireless fidelity (Wireless Fidelity, Wi-Fi) scanning function, and the global positioning system (Global Positioning System, GPS) positioning function do not support low-power mode operation. Services that only rely on these capabilities can only be deployed in the normal working mode of the Sensorhub coprocessor. Some other functions included in the services that can be deployed on the Sensorhub coprocessor can be deployed in the low-power mode of the Sensorhub coprocessor, such as: acceleration function, gyroscope function, proximity light function, audio function, timer function, etc. support low-power mode. Services that only rely on these capabilities can be deployed in the low-power working mode of the Sensorhub coprocessor.
[0057] Typically, a service may include functions that can only be deployed in the normal working mode of the Sensorhub coprocessor, and may also include functions that can be deployed in the low-power mode of the Sensorhub coprocessor. Therefore, in the standby state, some functions of the service are deployed in the normal working mode of the Sensorhub coprocessor, and other functions are deployed in the low-power mode of the Sensorhub coprocessor, while the functions in the high-power mode need to be awakened. As the number of services increases, the number of wake-ups in the high-power mode increases, causing the Sensorhub coprocessor to be frequently in high-power mode, which also limits the power optimization effect of the low-power consumption of the Sensorhub coprocessor.
[0058] At the same time, whether the standby service is deployed in the Sensorhub coprocessor or not, it needs to be awakened at a certain time interval (i.e., the wake-up cycle in the embodiment of the present application), so that the service performs data processing at the time interval in the standby state, producing the effect of standby operation. Waking up the standby service multiple times will also increase the overall power consumption of the terminal and reduce the power consumption effect.
[0059] Therefore, the embodiment of the present application provides a wake-up method, which is applied to a terminal device with a Sensorhub coprocessor, and can also be applied to a terminal device with a standby mode. For portable devices such as mobile phones, laptops, and tablets that are widely used now, standby mode is one of the important ways to save power. In standby mode, the terminal device is turned on, but no substantial work such as processing user operations is performed.
[0060] Figure 1Schematic diagram of applicable scenarios of the wake-up method provided in the embodiment of the present application. When the mobile phone 101 is in the standby state with the phone turned on and the screen off, some continuous services and functions of the mobile phone 101 are still in operation. For example, the activity recognition (AR) service 102, the cell matching fence service 103 and the Wi-Fi matching fence service 104. The activity recognition service 102, the cell matching fence service 103 and the Wi-Fi matching fence service 104 are deployed on the Sensorhub coprocessor, and the activity recognition service 102, the cell matching fence service 103 and the Wi-Fi matching fence service 104 all include functions that can only be deployed in the normal working mode of the Sensorhub coprocessor, and functions that can be deployed in the low power consumption mode of the Sensorhub coprocessor. Among them, the functions that can only be deployed in the normal working mode of the Sensorhub coprocessor are awakened at the set time interval in the standby state, and when the functions that can only be deployed in the normal working mode of the Sensorhub coprocessor are not awakened, the service is in a low power consumption operation state. If a function that can only be deployed in the normal working mode of the Sensorhub coprocessor is awakened, the service changes from a low-power state to a normal working state.
[0061] Figure 1 The mobile phone 101 shown may also be other user terminals, such as tablet computers, smart wearable devices, laptop computers, desktop computers, smart home appliances or car computers. When other user terminals are in standby mode, some applications installed in other user terminals can still run, and the running mode is to wake up at set time intervals, and obtain and process the data of the terminal when waking up to realize the corresponding business functions.
[0062] Figure 2 A schematic diagram of another applicable scenario of the wake-up method provided in the embodiment of the present application. Figure 2 In the communication network shown, a long connection is established between the server 201 and multiple clients 202. Through the long connection, multiple data packets can be sent between the server 201 and the client 202 at one time. At the same time, in the process of maintaining the long connection, the client 202 needs to report a heartbeat signal to the server 201 at a set time interval. If the server 201 does not receive a heartbeat signal reported by a client 202 after the set time, it can be determined that the long connection between the corresponding client 202 and the server 201 is disconnected. Since the server 201 establishes communication with multiple clients 202 through a long connection, the cycle of reporting heartbeat signals by different clients and the starting calculation time of the cycle are all different. When the number of clients 202 increases, it may cause the server 201 to receive the heartbeat signal. The total execution time of the operation execution is increased, and the power consumption also increases accordingly.
[0063] At the same time, the embodiments of the present application are also applicable to other scenarios in which multiple devices report heartbeat signals to a device with management center functions.
[0064] The wake-up method provided in the embodiment of the present application can be applied to Figure 1 The terminal standby state in the scenario shown can also be applied to Figure 1 In the scenario shown, the terminal is in normal working state, and the user uses the mobile phone 101 to make a call. During the call, at least one service that can be run in the standby mode is still woken up at a certain time interval; or, when the user uses the mobile phone 101 for network activities, at least one service that can be run in the standby mode is still woken up at a certain time interval.
[0065] In the embodiment of the present application, the user can use an electronic device as a user terminal to implement the wake-up method. Before introducing the wake-up method process provided in the embodiment of the present application in detail, the software architecture of the electronic device involved in the embodiment of the present application is briefly introduced. Figure 3 is a schematic diagram of a software architecture of an electronic device according to an exemplary embodiment. Figure 3 The electronic device shown runs the Android system.
[0066] Figure 3 is a block diagram of a software system of an electronic device to which the method provided in the embodiment of the present application is applied. Figure 3 , the layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes multiple layers, from top to bottom, the application layer, the application framework layer (Framework, FWK), the Android runtime (Android runtime) and the system layer, the hardware abstraction layer and the kernel layer (Kernel). After the wake-up information is generated, the wake-up information can be used to be sent down to the hardware part layer by layer to start sensors or other hardware to detect real-time signals.
[0067] The application layer may include a series of application packages, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and AR application and other applications (also referred to as applications). Among them, AR application refers to an application that uses AR services. That is, AR application refers to an application that needs to use AR activity recognition services to determine the motion state of the electronic device. For example, some sports and health applications that need to determine the current motion state of the user. For other applications in the application layer, please refer to the introduction and description in the conventional technology, which will not be elaborated in this application. In this application, the application on the electronic device can be a native application (such as an application installed in the electronic device when the operating system is installed before the electronic device leaves the factory), or it can be a third-party application (such as an application downloaded and installed by the user through the application store), which is not limited in the embodiments of this application.
[0068] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0069] The application layer and the application framework layer can run in a virtual machine. The virtual machine executes the programming files (e.g., java files) of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0070] In an embodiment of the present application, after the process corresponding to the business generates wake-up information, the wake-up information can be forwarded downward layer by layer through the forwarding module corresponding to the business application (Application, APP) in the application framework layer.
[0071] The system layer includes the Android Runtime. The Android Runtime includes the core library and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system. Among them, the core library contains two parts: one part is the function that the programming language (for example, the Java language) needs to call, and the other part is the core library of the system.
[0072] The system layer may include multiple functional modules, such as: Surface Manager, Media Libraries, 3D graphics processing library (eg, OpenGL ES), 2D graphics engine (eg, SGL), etc.
[0073] The Hardware Abstraction Layer (HAL) is an interface layer between the operating system kernel and the upper-level software, and its purpose is to abstract the hardware. The hardware abstraction layer is an abstract interface driven by the device kernel, which is used to implement an application programming interface that provides access to the underlying device to a higher-level Java API framework. HAL contains multiple library modules, such as AR-HAL, camera HAL, audio HAL, etc. Each library module implements an interface for a specific type of hardware component. When the system framework layer API requires access to the hardware of a portable device, the Android operating system will load the library module for the hardware component. It can be understood that when the upper layer needs to use AR capabilities, AR-HAL is used to provide the upper layer with an interface to access the underlying device.
[0074] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, virtual card driver, etc.
[0075] The Sensorhub coprocessor in the embodiment of the present application can transmit signals with the Modem and dedicated sensors, and together with the Modem, dedicated sensors and other hardware, constitute the hardware layer of the terminal.
[0076] It should be noted that the application provides Figure 3 The software structure of the electronic device shown is only an example and does not limit the specific module division in different layers of the Android operating system. For details, please refer to the introduction of the software structure of the Android operating system in conventional technology. In addition, the wake-up method provided in this application can also be implemented based on other operating systems, and this application will not give examples one by one.
[0077] Secondly, combined Figure 3 Introduce the software and hardware interaction process of electronic devices.
[0078] like Figure 3 As shown, the AR application can send a request downward to access the Sensorhub coprocessor in the underlying hardware. For example, the AR application can access the Sensorhub coprocessor through AR-HAL. The AR driver runs in the low-power space of the Sensorhub coprocessor. The Sensorhub coprocessor can obtain acceleration information, that is, accelerometer (ACC) data, through the acceleration sensor, and determine the current motion state of the user of the electronic device based on the acceleration information through the AR driver. The Sensorhub coprocessor can report the motion state to the AR application.
[0079] In an embodiment of the present application, the Sensorhub coprocessor may include a low-power space and a normal power space. It is understandable that, as the name implies, the low-power space of the Sensorhub coprocessor refers to a memory space with lower power consumption when the software is running, and the normal power space of the Sensorhub coprocessor refers to a memory space with higher power consumption when the software is running. In other words, when the software runs in the low-power space of the Sensorhub coprocessor, the power consumption is lower, and when the software runs in the non-low-power space of the Sensorhub coprocessor, the power consumption is higher.
[0080] exist Figure 3 Based on the illustrated embodiment, the specific implementation of the wake-up method provided in the embodiment of the present application is introduced below. Figure 4 The provided method can also be applied to electronic devices with other different layer structures. Figure 4 is a flowchart of a wake-up method according to an exemplary embodiment. The method can be performed by the electronic device as follows Figure 3 The multiple modules shown are interactively implemented. The method may include at least a part or all of the contents related to the following steps S41 to S43.
[0081] Step S41: obtaining unified timing information of the wake-up cycles of multiple registered services; wherein the multiple registered services are services in operation; when the multiple registered services are awakened, the same processor is triggered to run corresponding processes; the unified timing information is determined by timing from the common initial timing moment of the multiple registered services.
[0082] In this embodiment, the registered service may refer to a service that applies for registration, which is one of multiple services running on the terminal. Any service running on the terminal can apply for registration and become a registered service. For example, services deployed on the Sensorhub coprocessor can apply for registration for unified management of wake-up cycles. As an example, a special module can be deployed on the terminal to be responsible for the registration of at least one registered service, receive registration information of the registered service, and record the registration information, so as to facilitate unified wake-up judgment and wake-up information generation operations for all registered services.
[0083] Each registered service has its own independent wake-up cycle, and the wake-up cycle of each registered service can be determined by the APK corresponding to the service. For example, the terminal runs registered services X1, X2 and X3, among which the wake-up cycle of registered service X1 is 0.3 seconds, the wake-up cycle of registered service X2 is 0.1 seconds, and the wake-up cycle of registered service X3 is 0.25 seconds.
[0084] Each registered service has its own independent initial timing moment, which is used to time the wake-up cycle of each registered service. The initial timing moment of each registered service can be determined by the APK corresponding to the service. The initial timing moment is the timing moment relative to the same timing zero point.
[0085] Multiple registered services may have different wake-up cycles, or more than two registered services may have the same wake-up cycle. Multiple registered services may have the same initial timing moment, or at least two registered services may have different initial timing moments of their wake-up cycles.
[0086] In the embodiment of the present application, the common initial timing moment is an initial timing moment uniformly set for multiple registration services. The common initial timing moment can be determined according to the initial timing moment of each registration service. The common initial timing moment is set to make the initial timing moments of multiple registration services the same.
[0087] In a specific implementation, step S41 can be executed by the registration service of the terminal, or by a module set in the terminal specifically for registering and managing the registration service. Each registration service can determine the current timing information in real time. Since multiple registration services have a common initial timing moment, the timing information obtained by timing each registration service separately also belongs to the unified timing information of multiple registration services.
[0088] In an embodiment of the present application, when a registration service is awakened, multiple registration services may enable at least one processor of the terminal to enter a higher working state or working mode. For example, after the registration service is awakened, the Sensorhub coprocessor may be placed in a higher power consumption working mode.
[0089] Step S42: Determine to perform a wake-up operation on at least one registered service according to the unified timing information and the unified wake-up judgment period of multiple registered services; the multiple registered services include at least one target registered service; the unified wake-up judgment period is determined according to the wake-up period of each registered service.
[0090] In this embodiment, it is determined to perform a wake-up operation on at least one registered service, that is, it is determined to wake up at least one target registered service among multiple registered services. The unified wake-up judgment cycle is the same wake-up judgment cycle shared by multiple registered services. When the unified wake-up judgment cycle arrives, a unified judgment is made on whether all registered services are awakened. In the case where multiple registered services each have an independent wake-up cycle, in the embodiment of the present application, a unified and same wake-up judgment cycle is determined for all registered services, so that a wake-up judgment operation is performed on all registered services according to the unified and same wake-up judgment cycle.
[0091] Each registration service includes at least one functional module, which is the function or capability in the aforementioned embodiment. The function implemented by each functional module may be supported by the hardware of the terminal (such as a sensor). For example, the timing function module can implement the timing function according to the information of the timer; the acceleration function module can implement the acceleration measurement function according to the information measured by the accelerometer; the gyroscope function module can implement the function of determining the motion state of the terminal in three-dimensional space according to the angular velocity measured by the gyroscope sensor.
[0092] In general, each registration service may include at least two functional modules, and among the functional modules included in each registration service, there is at least one functional module that can only work (or be deployed) in normal power consumption mode, and there is at least one functional module that can work in low power consumption mode. Therefore, in each registration service, some functional modules are in low power consumption mode, and other functional modules cannot run in low power consumption mode. If the registration service is in low power consumption mode, it is necessary to wake up the functional modules that cannot run in low power consumption mode according to the wake-up cycle of the registration service. Furthermore, the wake-up causes the registration service to convert from the low power consumption mode to the high power consumption mode. For a single registration service, the change in power consumption over time may appear Figure 6 In the case shown, the state of the higher power consumption mode occurs periodically according to the wake-up cycle.
[0093] In the embodiments of the present application, different registration services may have the same functional module. For example, the AR activity recognition service uses a timer functional module and an accelerometer functional module to identify the user's walking, standing still, running and other activities. At the same time, the AR activity recognition service also uses a Cell scanning (cycle of about 10s) functional module to assist in identifying user activities such as high-speed rail, subway, and bus rides. For another example, the Cell matching fence service uses a timer functional module and a Cell scanning (cycle of 10s) functional module to determine the entry and exit of the Cell fence.
[0094] In the case where each registration service has at least one functional module, multiple registration services have multiple functional modules. In the embodiment of the present application, judging whether the registration service is awakened may include judging whether the functional module of the registration service is awakened.
[0095] In an embodiment of the present application, step S42 can be executed by a business application, or it can be executed by a module set in the terminal specifically for registering and managing registered services. In the case where step S42 is executed by a business application, the business applications corresponding to all registered services perform a unified wake-up judgment operation, that is, when the unified wake-up judgment cycle arrives, it is determined whether the registered service corresponding to the business application needs to be awakened. In the case where step S42 is executed by a module set in the terminal specifically for registering and managing registered services, a module specially set up for registration management determines whether each registered service needs to be awakened. Each registered service can record a unified wake-up judgment cycle, and confirm whether the business application needs to be awakened from a low power consumption mode and switched to a high power consumption mode according to the unified wake-up judgment cycle.
[0096] As a specific example, different registration services have different wake-up requirements, resulting in different wake-up cycle lengths for each registration service. Therefore, a unified wake-up judgment cycle is set for all registration services to judge whether any functional module included in the registration service needs to be awakened. The unified wake-up judgment cycle is used to determine the judgment timing. When the timing reaches the unified wake-up judgment cycle, a judgment operation is uniformly performed for all registration services. If the wake-up cycle of a registration service itself is longer than the unified wake-up judgment cycle, then when a unified wake-up judgment cycle arrives, it may be determined that there is no need to wake up this registration service. If the wake-up cycle of a registration service itself is not longer than the unified wake-up judgment cycle, then every time a unified wake-up judgment cycle arrives, it may be determined that this registration service needs to be awakened.
[0097] In one implementation, it is possible to determine whether the functional modules included in all registration services need to be awakened. When it is confirmed that there is a target functional module that needs to be awakened among the functional modules of all registration services, the registration service corresponding to the target functional module is the target registration service that needs to be awakened. Waking up the target registration service may include waking up the target functional module. When waking up the target functional module, it will also cause the registration service to enter a high-power working mode from a low-power working mode, resulting in a change in power consumption and increased power consumption.
[0098] Step S43: Generate wake-up information for the target registration service.
[0099] In the embodiment of the present application, the wake-up information of the target registration service can be used to wake up the target functional module, and can also be used to wake up the target registration service to which the target functional module belongs.
[0100] The wake-up information of the target registration service can trigger the corresponding service application in the low power consumption mode, so that the corresponding service application enters the normal working mode. In other words, the wake-up information of the target registration service can trigger the target registration service in a short dormant state, so that the target registration service that can only work in the normal working mode starts to work, and then the corresponding service application in the low power consumption mode also enters the normal working mode. In other words, the wake-up information of the target registration service is used to wake up the target registration service in a short dormant state, so that the target registration service that can only work in the normal working mode starts to work, and then the corresponding service application in the dormant state also enters the normal working mode. In other words, the wake-up information of the target registration service is used to wake up the target registration service in a short dormant state, so that the target registration service that can work in the low power consumption mode starts to work, and then the corresponding service application in the dormant state also enters the low power consumption mode from the dormant state. In other words, the wake-up information of the target registration service is used to trigger the sensor corresponding to the target functional module, and after receiving the monitoring information obtained by the triggered sensor, the process corresponding to the target functional module is awakened.
[0101] In a possible implementation, the wake-up information of the target registration service is used to generate a work instruction corresponding to the target registration service. After the work instruction is sent to the controlled module controlled by the target registration service, the controlled module can work according to the work instruction. For example, the wake-up information of the target registration service can be a work instruction for instructing the hardware to work. After the work instruction is sent to the hardware controlled by the target registration service, the controlled hardware (such as a sensor) can work according to the work instruction.
[0102] In one possible implementation, the wake-up information of the target registration service includes information of the target functional module included in the target registration service. The target functional module is a functional module included in the target registration service. According to the wake-up information of the target registration service, the sensor or other hardware corresponding to the target functional module can be triggered to collect monitoring signals.
[0103] When multiple registration services are deployed on the same processor side, no matter how many registration services are woken up each time, the processor needs to enter the working state from the sleep state, or enter the normal power consumption mode with higher power consumption from the low power consumption mode. Through the wake-up method provided in the embodiment of the present application, the total number of times the processor is in the wake-up state triggered by the registration service is reduced, which can reduce the power consumption of the processor.
[0104] When the embodiment of the present application is applied to the scenario of heartbeat management, the registered service can correspond to the service included in the application of the managed party, and the wake-up information of the target registered service can be used to remind the application of the managed party to report heartbeat information, so that the application of the managed party reports heartbeat information to the heartbeat management center.
[0105] In one implementation, the wake-up method provided in the embodiment of the present application further includes: for each registered service, obtaining the wake-up period of the registered service according to the registration information of the registered service; and calculating the unified wake-up judgment period according to the wake-up period.
[0106] In the embodiment of the present application, the wake-up period determined according to the registration information of the registered service is an independent wake-up period for each registered service, or an approximate period of the independent wake-up period for each registered service. When applying for registration, the terminal service reports the wake-up period of the service under normal circumstances and the functional module corresponding to the wake-up period to achieve registration, so that the service is called a registered service. If the registered service includes more than two functional modules that need to be awakened, the registered service can report its own independent wake-up period and information of the two functional modules that need to be awakened.
[0107] According to the independent wake-up cycles of each registered service, a unified wake-up judgment cycle is determined, so that the wake-up cycles of each registered service can be taken into account. According to the unified wake-up judgment cycle, it is judged whether the current time node is the time node for the operation of waking up the registered service, which corresponds to the independent wake-up cycle of each registered service, ensuring that each registered service is awakened normally and the service function is realized normally.
[0108] In one embodiment, a unified wake-up judgment period is calculated based on the wake-up periods of multiple registration services, including: rounding off the wake-up periods of multiple registration services to obtain rounded values of the wake-up periods of multiple registration services, and reversely converting the greatest common divisor of the rounded values to obtain a unified wake-up judgment period; or, taking the minimum value of the wake-up periods of multiple registration services as the unified wake-up judgment period.
[0109] In the embodiment of the present application, the unified wake-up judgment period is determined according to the greatest common divisor of the wake-up periods of all registered services, so that all time nodes of the unified wake-up judgment period coincide with all time nodes of the wake-up periods of all registered services. For example, there are three registered services X1, X2, and X3, the wake-up period T1 of the registered service X1 is 0.3 seconds, the wake-up period T2 of the registered service X2 is 0.6 seconds, and the wake-up period T3 of the registered service X3 is 0.9 seconds. Then, when the wake-up periods of the three registered services are rounded, they are multiplied by a rounding parameter to obtain the rounded values of the wake-up periods of the three registered services. When the wake-up periods of the three registered services are rounded, you can choose to multiply them by the rounding parameter 10 to obtain the rounded value 3 of the wake-up period of the registered service X1, the rounded value 6 of the wake-up period of the registered service X2, and the rounded value 9 of the wake-up period of the registered service X4. The greatest common divisor is 3, and the value obtained by dividing the greatest common divisor by the rounding parameter 10 is used as the unified wake-up judgment period, and the unified wake-up judgment period is 0.3 seconds. Therefore, 0.3 seconds after the common initial timing moment is the first unified wake-up judgment cycle, and a unified wake-up judgment operation is performed to determine whether to wake up the registered service X1; 0.6 seconds after the common initial timing moment is the second unified wake-up judgment cycle, and a unified wake-up judgment operation is performed to determine whether to wake up the registered services X1 and X2; 0.9 seconds after the common initial timing moment is the third unified wake-up judgment cycle, and a unified wake-up judgment operation is performed to determine whether to wake up the registered services X1, X2, and X3. The end point of the first unified wake-up judgment cycle is exactly the end point of the wake-up cycle of the registered service X1, the end point of the second unified wake-up judgment cycle is exactly the end point of the wake-up cycle of the registered services X1 and X2, and the end point of the third unified wake-up judgment cycle is exactly the end point of the registered services X1, X2, and X3. The end point of the wake-up cycle of all registered services is also the end point of the unified wake-up judgment cycle, so that the frequency of waking up the registered services according to the unified wake-up judgment cycle is consistent with the frequency of waking up the registered services according to the wake-up cycle of the registered services themselves.
[0110] In one implementation, in order to ensure that the registered service is awakened normally, a minimum awakening cycle can be set. If the unified awakening judgment cycle calculated according to the set method (common divisor method or minimum value method) is greater than the minimum awakening cycle, the minimum awakening cycle can be used as the unified awakening judgment cycle. Alternatively, a default cycle is set. After obtaining the awakening cycle of the registered service, the awakening cycle of the registered service is compared with the default cycle. According to the comparison result, the default cycle or the awakening cycle of the registered service is used as the unified awakening judgment cycle.
[0111] If multiple registered services do not have other common factors except 1, then the minimum value of the wake-up cycles of the multiple registered services can be used as the unified wake-up judgment cycle. Whenever the end time of the unified wake-up judgment cycle is reached, it is necessary to wake up the registered services corresponding to the wake-up cycles that coincide with the time node of the arrival of the unified wake-up judgment cycle. At the same time, when each unified wake-up judgment cycle reaches the end time, the wake-up cycles of some registered services may have passed between the start time and the end time of this unified wake-up judgment cycle, and it is necessary to wake up the registered services corresponding to the wake-up cycles that have passed after the start and end of this wake-up judgment cycle.
[0112] For example, there are three registration services X1, X2, and X3. The wake-up period T1 of registration service X1 is 0.2 seconds, the wake-up period T2 of registration service X2 is 0.3 seconds, and the wake-up period T3 of registration service X3 is 0.5 seconds. Therefore, the minimum value of 0.2 seconds among the wake-up periods of the three registration services can be used as the unified wake-up judgment period. 0.2 seconds after the common initial timing moment is the first unified wake-up judgment period, and a unified wake-up judgment operation is performed to determine whether to wake up registration service X1. 0.4 seconds after the common initial timing moment is the second unified wake-up judgment period, and a unified wake-up judgment operation is performed. The wake-up period that has passed is T2, that is, the end time of the wake-up period of registration service X2 has arrived at 0.3 seconds, and registration service X2 needs to be awakened; and 0.4 seconds is exactly the end time of the second wake-up period of registration service X1, and it is determined to wake up registration service X1 and registration service X2; the target registration services that need to be awakened include registration service X1 and registration service X2. 0.6 seconds after the common initial timing moment is the third unified wake-up judgment cycle. The time node of the arrival of the third unified wake-up judgment cycle is exactly twice T2 and three times T1. Registration services X1 and X2 need to be awakened; and the end time of T3 has arrived between the end time of the second unified wake-up judgment cycle and the end time of the third unified wake-up judgment cycle. Registration service X3 also needs to be awakened. Therefore, the target registration services include registration services X1, registration services X2 and registration services X3. The unified wake-up judgment cycle is determined by the minimum value method, so that the frequency of awakening the registration service according to the unified wake-up judgment cycle is basically consistent with the frequency of awakening the registration service according to the wake-up cycle of the registration service itself.
[0113] The wake-up method provided in the embodiment of the present application adopts a more reasonable method to calculate the unified wake-up judgment cycle, which can ensure that the registered service is woken up according to the original wake-up cycle of the registered service itself while reducing the number of times the processor is in the wake-up state.
[0114] In one embodiment, the wake-up cycle of the registered service is obtained according to the registration information of each registered service, including: obtaining the original wake-up cycle of the registered service according to the registration information of each registered service; generating wake-up cycle correction negotiation information according to the original wake-up cycle of the registered service; and correcting the original wake-up cycle according to the feedback result of the registered service on the wake-up cycle correction negotiation information to obtain the wake-up cycle of the registered service.
[0115] In this embodiment, the original wake-up cycle is the wake-up cycle of the registered service determined according to the information recorded in the APK corresponding to the registered service. The original wake-up cycle is the wake-up cycle for independently performing the wake-up operation when the registered services are awakened independently.
[0116] For example, before the service is registered, the wake-up operation is performed independently, and the wake-up is performed every 0.23 seconds, and the original wake-up cycle is 0.23 seconds.
[0117] In some cases, the original wake-up period of the registration service may be a value that is difficult to generate a greatest common divisor greater than 1 with the original wake-up periods of other registration services. In this case, the original wake-up period of the registration service needs to be adjusted to eliminate the decimals in the original wake-up period value that are not conducive to uniformly determining the wake-up judgment period. For example, 0.23 seconds is adjusted to 0.2 seconds or 0.3 seconds, so that the original wake-up period is rounded according to the set digits, and a corrected wake-up period is obtained that is convenient for calculating the unified wake-up judgment period. Because the corrected decimals are a small part of the original wake-up period, the wake-up period obtained after correcting and rounding the original wake-up period will not have a significant impact on the wake-up effect.
[0118] In an embodiment of the present application, a module specifically used for registration management of the registration service (such as a registration center in other embodiments of the present application) can negotiate with the registration service to correct and adjust the original wake-up cycle of the registration service itself, thereby improving the management convenience of unified wake-up while ensuring that the registration service is awakened normally.
[0119] In one implementation, the wake-up method further includes: obtaining an initial timing moment of a wake-up cycle of a registered service according to registration information of each registered service; and aligning initial timing moments of wake-up cycles of multiple registered services to obtain a common initial timing moment.
[0120] In the embodiment of the present application, aligning the initial timing moments of the wake-up cycles of multiple registration services may include taking a certain timing moment of the terminal as the 0 moment of the common initial timing moment.
[0121] By aligning the initial timing moments of the wake-up cycles of multiple registered services, the wake-up cycles of the registered services can be uniformly managed, the unified wake-up determination cycle can be uniformly timed, and the total number of wake-up times of the processor triggered when all registered services are awakened can be reduced.
[0122] In one embodiment, the wake-up method further includes: sending a unified wake-up judgment period and a common initial timing moment to a corresponding registration service, so that a service application of the corresponding registration service can determine to wake up the target registration service according to the unified timing information and the unified wake-up judgment period of the registration service.
[0123] The unified wake-up judgment cycle and the common initial timing time are sent to the corresponding registered service, that is, the unified wake-up judgment cycle and the common initial timing time are sent to the corresponding registered service party, which may be the service application (service APP) corresponding to the registered service, or the registered service itself.
[0124] The registration service party can perform a judgment operation according to the unified wake-up judgment cycle to determine whether to wake up the registration service. If it is determined that its own registration service needs to be woken up, the registration service of the registration service party is the target registration service. The wake-up judgment is performed through the business application corresponding to each registration service, so as to realize unified control of the wake-up of each target registration service.
[0125] If the registration service party determines whether to wake up its own registration service, then in each round of unified wake-up judgment cycle, the registration service party can obtain unified timing information and generate wake-up information of the target registration service.
[0126] In one embodiment, the wake-up method further includes: generating a work instruction according to the wake-up information; sending the work instruction to a hardware signal module corresponding to the target registered service; and receiving monitoring information returned by the hardware signal module according to the work instruction.
[0127] Alternatively, the target registration service sends the wake-up information as a work instruction to a hardware signal module corresponding to the target registration service; and receives monitoring information returned by the hardware signal module according to the wake-up information.
[0128] The hardware signal module may be a sensor. The wake-up information can be used to trigger the sensor to collect monitoring information, such as ambient light information, acceleration information, gyroscope information, etc. After the monitoring information is received by the process corresponding to the registered service, it can trigger the process corresponding to the registered service to work, so that the running space on which the process corresponding to the registered service depends is in a working state. In the case where the registered service party performs a hardware trigger operation, the registered service can submit less functional module information when registering, reducing the data processing burden of the registration management module for the registered service.
[0129] When the judgment operation on whether to wake up the registered service is executed by each registered service party, if the registered service party determines to wake up its own registered service, the registered service party will send the wake-up information to the hardware signal module corresponding to the target registered service, and then the registered service party will receive the monitoring information returned by the hardware signal module based on the wake-up information.
[0130] In one embodiment, the wake-up method also includes: storing a unified wake-up judgment period and a common initial timing moment in a registration center of multiple registration services, so that the registration center can determine to wake up the target registration service based on the unified timing information and the unified wake-up judgment period of the registration service; wherein the wake-up information of the target registration service is generated by the registration center.
[0131] In this embodiment, the registration center is a module for registering and managing multiple registration services. After storing the unified wake-up judgment period and the common initial timing moment in the registration center of multiple registration services, the registration center performs a unified judgment operation on whether to wake up the multiple registration services, and determines the target registration services that need to be woken up in each round among the multiple registration services, and the registration center generates wake-up information for waking up the target registration services.
[0132] When the registration center generates wake-up information for waking up the target registration service, the operation of obtaining unified timing information for each registration service can also be uniformly executed by the registration center, which further improves the uniformity of the management of the wake-up operation of the registration service and reduces the operational burden of each registration service party.
[0133] In one embodiment, the wake-up method also includes: generating a work instruction based on the wake-up information; sending the work instruction to the hardware signal module corresponding to the target registered business; receiving monitoring information returned by the hardware signal module based on the wake-up information; and sending the monitoring information to the business application corresponding to the target registered business.
[0134] In the case of unified wake-up management for each registration service, after generating the wake-up information of the target registration service, the registration center can execute the function to be executed after the target registration service is awakened, that is, send the work instruction corresponding to the wake-up information to the hardware signal module corresponding to the registration service, so that the application corresponding to the target registration service can receive the monitoring information returned by the hardware signal module. As an example, the wake-up information is specifically used to wake up the target functional module in the target registration service. After the registration center determines to wake up the target registration service, it generates a work instruction for triggering the sensor corresponding to the target functional module. After receiving the work instruction, the sensor turns on and collects information, such as acceleration information, ambient light information, cell information, etc., and obtains monitoring information based on the collected analog signal. The monitoring information can be sent directly to the application corresponding to the target registration service, or it can be forwarded to the application corresponding to the target registration service by the module that performs registration management on the registration service.
[0135] In this embodiment, the registration center generates a work instruction, sends the work instruction to the hardware signal module and obtains monitoring information of the hardware signal module, thereby reducing information sending and receiving operations.
[0136] In one implementation, the wake-up method further includes: receiving registration information of a new registration service; and updating a unified wake-up cycle and a common initial timing moment according to the registration information of the new registration service.
[0137] In the embodiment of the present application, the newly registered service may not belong to the currently registered service, and the newly registered service may be a service that is prepared for registration but has not yet completed registration. Among the services running in the terminal, some registered services may exist, and a unified wake-up operation is performed on the registered services, and another part of the services running in the terminal may still perform independent wake-up operations according to their own wake-up cycles.
[0138] A registered service can also perform a deregistration operation. After deregistration, the service performs an independent wake-up operation according to its original wake-up cycle.
[0139] At the same time, the restart of the registration service can also lead to re-registration. When the registration service is closed, the registration relationship is cancelled; after the service is restarted, the registration information can be resent to make the service a registered service.
[0140] In one embodiment, multiple registration services are deployed on the coprocessor side of the terminal; each registration service includes: a first functional module deployed on the coprocessor side and in a first power consumption state, and a second functional module deployed on the coprocessor side and in a second power consumption state; the power consumption of the first power consumption state is higher than that of the second power consumption state; the wake-up cycle of the service application is used to wake up the first functional module of the target service application, so that the target service application is converted from the second power consumption state to the first power consumption state; the first functional module runs in the space of the double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR) on the coprocessor side; the step of determining to wake up at least one target registration service among the multiple registration services includes: determining to wake up at least one target functional module among the multiple registration services, the target functional module being the first functional module.
[0141] The first power consumption state may be equivalent to the normal working mode of other embodiments of the present application, and the second power consumption state may be equivalent to the low power consumption mode of other embodiments of the present application. Alternatively, the first power consumption state may be a non-sleep state, and the second power consumption state may be a sleep state. Each registered service may include at least one first functional module and at least one second functional module. The coprocessor may specifically be a Sensorhub coprocessor, and multiple registered services are services deployed on the same coprocessor side. The wake-up method provided in an embodiment of the present application can effectively reduce the length of time that the coprocessor is in the second power consumption state and reduce the power consumption of the coprocessor.
[0142] In this embodiment, the Sensorhub coprocessor includes a low-power space and a non-low-power space, wherein the non-low-power space may be a double-stream synchronous dynamic random access memory space. In the registration service, the first functional module runs in the double-stream synchronous dynamic random access memory space; the second functional module may run in the double-stream synchronous dynamic random access memory or the low-power space.
[0143] In this embodiment, the target registration service may be directly awakened by the awakening information of the target registration service, or may be awakened by the monitoring information fed back to the hardware signal module. The awakening of the target registration service means that at least one first functional module of the target registration service is awakened, and the space of the double data stream synchronous dynamic random access memory on the coprocessor side is in a normal working mode.
[0144] In the case where the Sensorhub coprocessor includes low-power space and high-power space, taking the terminal using a certain chip platform as an example, according to the capabilities of the chip platform, the Cell scanning function module, Wi-Fi scanning function module, and GPS positioning function module do not support low-power mode operation. Services that only rely on these capabilities belong to the first function module and can only be deployed in the normal working mode of the Sensorhub coprocessor. However, the acceleration function module, gyroscope function module, proximity light function module, audio function module, timer function module, etc. support low-power mode operation and belong to the second function module, which can be deployed in the low-power working mode of the Sensorhub coprocessor.
[0145] Due to the extremely limited low-power memory space of the Sensorhub coprocessor, when the low-power memory is exhausted, the services that support the low-power working mode can be deployed in normal mode.
[0146] Therefore, in at least a part of the services deployed in the Sensorhub coprocessor, some functional modules of each service are deployed in the normal working mode of the Sensorhub coprocessor, and some functional modules are deployed in the low-power working mode of the Sensorhub coprocessor. The low-power mode and the normal working mode work together to support the realization of service functions.
[0147] Among the services deployed by the terminal on the Sensorhub coprocessor side, the service parts related to the timer function module and the accelerometer function module are all deployed in low-power working mode, while the service parts related to the Cell scanning function module and the Wi-Fi scanning function module are all deployed in normal working mode.
[0148] When the first functional module of the service is awakened, the service exits the low-power working mode and enters the normal working mode. At the same time, the DDR space of the Sensorhub coprocessor needs to be awakened to work.
[0149] Since the cycles and timings of DDR wake-up are inconsistent for different services, the chaotic wake-up becomes more obvious as the number of services increases. Figure 7 As shown, the Sensorhub works in low power mode for a shorter time and in normal mode for a longer time. Figure 7 The situation shown causes the terminal service to frequently exit the low power mode and frequently access the DDR status, resulting in abnormal power consumption in the subsystem of the Sensorhub coprocessor, shortening the battery life of the terminal and affecting the user experience.
[0150] As an example, in the audio digital signal processor (ADSP) subsystem to which the Sensorhub coprocessor belongs, there are power consumption issues such as Figure 8 As shown. The wake-up cycles of the services deployed on the Sensorhub coprocessor side are inconsistent. As the number of services that can run in low-power mode increases further, frequent exits from low-power islands and frequent wake-ups of DDR will cause the ADSP subsystem to not sleep or sleep for a short time, resulting in abnormal power consumption of the ADSP subsystem. In addition, since the terminal ADSP subsystem does not have a better power consumption control solution, baseline changes, new device drivers, or new features in the ADSP subsystem can easily cause power consumption problems in the terminal. If the service working in low-power mode is deployed on the AP side, there will also be power consumption problems.
[0151] Therefore, the example of this application adopts a unified heartbeat reporting mechanism for service wake-up, aligns the cycles of multiple independent service wake-up APs or DDRs, reduces some additional wake-ups, reduces the number of exits from low power mode (reduces the frequency of accessing DDR in low power mode), and ultimately achieves the purpose of subsystem power consumption optimization.
[0152] In this application example, the registration service is run by the corresponding service application. Fig. 9 As shown, the registered services include AR activity recognition service, Cell matching fence (flp_cell) service, and Wi-Fi matching fence (flp_wifi) service. Business applications include Fig. 9 Power Saving Wizard, Weather Clock, Express Locker and Smart Card.
[0153] Among them, the power saving wizard uses AR activity recognition service to control the system power consumption of the terminal. The weather clock uses AR activity recognition service to refresh weather data in time when leaving the high-speed rail or getting off the plane. The express cabinet uses the Cell matching fence service to remind users to pick up the express when the terminal arrives at a certain location. The smart card uses the Wi-Fi matching fence service to automatically switch smart cards when the terminal arrives at a certain location to improve the user's card swiping experience. The application programs of business applications run at the application layer.
[0154] Still refer to Fig. 9As shown in the figure, in the application framework layer of the terminal, there are a comprehensive sensing information processing platform (Mobile Sensing Development Platform, MSDP) and a location-based service (Location Based Service, LBS). Among them, MSDP is a system application, which is used to maintain data channels, subscribe / cancel activity recognition events, and distribute activity recognition results to the business party APP. LBS: It is a system application, which is used to maintain data channels, add and delete Cell / Wi-Fi matching fences, and distribute and report Cell / Wi-Fi matching fence events to the business party APP.
[0155] exist Fig. 9 The hardware abstraction layer (HAL), AR process (Activity_recognition) and matching fence fusion daemon (Fusion_daemon) are shown. Among them, Activity_recognition is the HAL layer process of the activity recognition business, which is used to maintain the data path, subscribe / cancel the activity recognition event, and distribute the activity recognition result to the business party APP. Fusion_daemon is the HAL layer process of the matching fence business, which is used to maintain the data path, subscribe / cancel the matching fence event, and distribute the matching fence recognition result to the business party APP.
[0156] Registration business deployed in Fig. 9 The Sensorhub coprocessor side shown. Among them, the AR activity recognition service is used for activity recognition. The virtual sensor process runs on the Sensorhub coprocessor side. According to the monitoring signal, acceleration and Modem cellular data are collected, which are then used to identify static, walking, elevator, high-speed rail, subway and other behavioral activities. The flp_cell service is used for Cell matching fences. The virtual sensor process runs on the Sensorhub coprocessor side. According to the use of the virtual sensor process to collect Modem cellular data, it is used to determine the terminal device entering and leaving a certain physical area. The flp_wifi service is used for Wi-Fi matching fences. The virtual sensor process runs on the Sensorhub coprocessor side. The virtual sensor process is used to collect Wi-Fi scanning results. The Wi-Fi scanning results are used to determine the terminal entering and leaving a certain physical area. A unified heartbeat management service (uwc_service) is also deployed on the Sensorhub coprocessor side. uwc_service is equivalent to the registration center in the aforementioned embodiment, that is, a module for registering and managing registration services. uwc_service is used to manage the wake-up registration service so that the virtual sensor process on the Sensorhub coprocessor side wakes up the cycle and timing of DDR.
[0157] exist Fig. 9In the example shown, the virtual sensor processes on the Sensorhub coprocessor side include: a Sensorhub coprocessor Wireless Wide Area Network (sh_wwan) process, which is used to obtain cellular data from a modem; and a Sensorhub coprocessor Wi-Fi (sh_wifi process), which is used to obtain Wi-Fi scan result data from a WLAN.
[0158] In order to enable the virtual sensor process to obtain monitoring data, Fig. 9 In the example shown, the terminal is equipped with physical sensors, including ACC, for obtaining physical acceleration signals. In addition, the terminal's MODEM can be used to obtain the physical signal of the base station communication service processed by the terminal mobile phone side, which is a sensor for obtaining base station signals in the example of this application. The terminal's WLAN is a wireless local area network module on the terminal mobile phone side, which is a sensor for obtaining wireless local area network signals.
[0159] exist Fig. 9 In the example shown, a unified heartbeat management service (Unified Wakeup Cycle Service, uwc_service) is added to the software driver part of the Sensorhub coprocessor side to perform wake-up alignment for multiple periodic services on the subsystem side and dynamically adjust the unified wake-up cycle (i.e., the unified wake-up judgment cycle in the aforementioned embodiment) to achieve the purpose of reducing the number of times the AP or DDR is woken up, thereby saving system power consumption overhead.
[0160] like Fig.10 The uwc_service interaction logic view in the example of this application is shown. The wake-up method provided in the embodiment of this application can be applied to any virtual sensor service deployed on the Sensorhub coprocessor side with a wake-up DDR action. Fig.10 The examples shown only take the AR activity recognition service, flp_cell service and flp_wifi service as examples. The Sensorhub coprocessor side includes multiple registered services. When each service is started, it registers with uwc_service as a registered service and reports the wake-up cycle and timestamp (i.e., the initial timing moment) of each wake-up DDR to the registration center. Then, uwc_service uniformly manages the wake-up cycle and timestamp (i.e., the initial timing moment) of all services to wake up DDR, and calculates a unified wake-up judgment cycle and a unified timestamp (equivalent to the common initial timing moment). uwc_service will call back the calculated unified wake-up judgment cycle and unified timestamp to each registered service party; each registered service party carries out its own registered service with a unified wake-up judgment cycle and a unified timestamp.
[0161] exist Fig. 9 and Fig.10 In the example shown, in order to set the registration center in the HAL layer and enable effective communication between the registration center and modules or layer structures such as services, registration services and hardware signal modules, multiple application programming interfaces (Application Programming Interface, API) are set for the registration center. The multiple APIs may include: callback function interface, registration information receiving interface, cancellation registration information receiving interface, hardware information sending and receiving interface. The functions of each interface are shown in Table 1 below.
[0162]
[0163]
[0164] Table 1
[0165] exist Fig. 9 , Fig.10 In the example shown, the information interaction diagram between the registration service and the registration center is as follows Fig.11 As shown. Fig.11 In the AR activity recognition service, AR is used to represent the flp_cell service, and flp_wifi is used to represent the flp_wifi service. The registration process of the registration service includes Fig.11 Steps S1101-S1107 are shown.
[0166] Step S1101: the AR reports the registration information including its own wake-up cycle to the registration center.
[0167] Step S1102: flp_cell reports the registration information including its own wake-up cycle to the registration center.
[0168] Step S1103: flp_wifi reports the registration information including its own wake-up cycle to the registration center.
[0169] Step S1104: The registration center determines a unified wake-up cycle according to the wake-up cycle of the registration service.
[0170] In this example, the unified wake-up period of the registration service is dynamically generated and adjusted. When a new registration service appears, the registration center updates the unified wake-up period according to the wake-up period of the new registration service.
[0171] The unified wake-up cycle can be calculated as follows: unified wake-up cycle = min (wake-up cycle of registration service 1, wake-up cycle of registration service 2, wake-up cycle of registration service 3, ...), or, when the wake-up cycles of the three registration services are integers, unified wake-up cycle = gcd (wake-up cycle of registration service 1, wake-up cycle of registration service 2, wake-up cycle of registration service 3, ...). Wherein, gcd represents the calculation of the greatest common divisor. Alternatively, the unified wake-up cycle is the approximate greatest common divisor of the wake-up cycles of all registration services. When there are decimals in the wake-up cycles of the three registration services, the three wake-up cycles of the three registration services are multiplied by a rounding parameter, and the greatest common divisor of the rounding parameter is calculated.
[0172] For example: unified wake-up period = min (5s, 10s, 15s) = 5s.
[0173] For example: unified wake-up period = gcd (12s, 15s, 18s) = 3s.
[0174] When the registered service 1 is exited, dynamic adjustment is performed: unified wake-up period = min (service 2, service 3, ...) When the registered service 1 is restarted, dynamic adjustment is performed again to unified wake-up period = min (service 1, service 2, service 3, ...).
[0175] The embodiment of the present application can also set a minimum wake-up period for the registration service to meet the normal wake-up requirements of the registration service. If the unified wake-up period calculated based on the wake-up period of each registration service is greater than the minimum wake-up period, the unified wake-up period is set to the minimum wake-up period. The minimum wake-up period can be uniformly set by the terminal system, for example, the minimum wake-up period is set to 1s.
[0176] Step S1105: The registration center returns the unified wake-up cycle to the AR.
[0177] Step S1106: the registration center returns the unified wake-up cycle to flp_cell.
[0178] Step S1107: the registration center returns the unified wake-up cycle to flp_wifi.
[0179] After step S1107, AR, flp_cell and flp_wifi respectively determine whether to wake up the service with a unified wake-up cycle. The AR cycle is the first cycle, and the wake-up lasts for the first duration, the wake-up cycle of flp_cell is the second cycle, and the wake-up lasts for the second duration, the wake-up cycle of flp_wifi is the third cycle, and the wake-up lasts for the third duration. When aligning the time point of the initial timing with the wake-up cycle, the minimum value of the first cycle, the second cycle and the third cycle can be used.
[0180] Fig.12 Based on Fig. 9 , Fig.10 The example of the registration center and the interaction relationship between the registration services are shown. The registration services include: AR activity recognition service 1201, flp_cell service 1202 and flp_wifi service 1203.
[0181] Among them, the AR activity recognition service 1201 uses the Cell scanning function module to assist in the recognition of user activities such as high-speed rail, subway, elevator, and car riding, and the Cell scanning function module is a function module that can only be deployed in normal power consumption mode. When the AR activity recognition service 1201 first registers the Cell scanning function module with the registration center 1204, it first subscribes to the unified wake-up cycle and common initial timing of the high-speed rail, subway, elevator, and car activity recognition operations from the registration center 1204. The registration center 1204 registers or cancels the registration of the registration service according to the request of the registration service; calculates the unified wake-up cycle and the common initial timing; and calls back the unified wake-up cycle and the common initial timing. After the registration center 1204 executes step S1205: updating the unified wake-up cycle and the common initial timing time according to the registration information of the AR activity recognition service, step S1206 can be executed: requesting the Cell scanning data (Cell ID data) of the Modem subsystem according to the new unified wake-up cycle and the common initial timing time, triggering the sensors corresponding to the high-speed rail, subway, elevator, and vehicle activity recognition operations, and after the sensors obtain the monitoring results, obtaining the high-speed rail, subway, elevator, and vehicle activity recognition results according to the monitoring results, and executing step S1207: reporting the high-speed rail, subway, elevator, and vehicle activity recognition results to the relevant applications on the AP side.
[0182] The flp_cell service 1202 also uses the Cell scanning function module to determine the entry and exit of the Cell fence. When the flp_cell service 1202 first registers the Cell scanning function module with the registration center 1204, it first subscribes to the unified wake-up cycle and common initial timing of the Cell matching fence operation with the registration center 1204. After the registration center 1204 executes step S1208: after updating the unified wake-up cycle and common initial timing according to the registration information of the flp_cell service, it can execute step S1209: according to the new unified wake-up cycle and common initial timing, request the Cell scanning data (Cell ID data) of the Modem subsystem to trigger the sensor corresponding to the Cell matching fence operation. After the sensor obtains the monitoring result, it obtains the Cell matching fence entry and exit status result according to the monitoring result, and executes step S1210: reporting the Cell matching fence entry and exit status result to the relevant application on the AP side.
[0183] The flp_wifi service 1203 uses a Wi-Fi scanning function module to determine the entry and exit of the Wi-Fi fence. When the flp_wifi service 1203 first registers the Wi-Fi scanning function module with the registration center 1204, it first subscribes to the unified wake-up cycle and common initial timing time of the Wi-Fi matching fence operation with the registration center 1204. After the registration center 1204 executes step S1211: after updating the unified wake-up cycle and common initial timing time according to the registration information of the flp_wifi service, step S1212 can be executed: according to the new unified wake-up cycle and common initial timing time, re-initiate the Wi-Fi scan, and after obtaining the Wi-Fi scan result, obtain the Wi-Fi matching fence entry and exit status result according to the Wi-Fi scan result, and execute step S1213: report the Wi-Fi matching fence entry and exit status result to the relevant application on the AP side.
[0184] AR activity recognition service 1201, flp_cell service 1202 and flp_wifi service 1203 can all cancel registration. AR activity recognition service 1201 can cancel subscription to unified wake-up cycle and common initial timing of high-speed rail, subway, elevator and car activity recognition operations. flp_cell service 1202 can delete subscription to unified wake-up cycle and common initial timing of Cell matching fence operation. flp_wifi service 1203 can delete subscription to unified wake-up cycle and common initial timing of Wi-Fi matching fence operation.
[0185] pass Fig.12In the example shown, a unified wakeup cycle (UWC) and a common initial timing moment are formulated for the registered services that periodically trigger the awakening of processes running in the DDR, and each registered service is awakened according to the UWC and the common initial timing moment.
[0186] After receiving the registration information or the registration cancellation information, the registration center 1204 wakes up the wake-up cycle management function of the registration center 1204, calculates the new unified wake-up cycle and the common initial timing moment according to the rules, and calls back the unified common initial timing moment to the registered business. The core function of the registration center 1204 is to control the wake-up mechanism of multiple business parties that wake up DDR, so that multiple registered business parties use the same wake-up cycle (unified wake-up cycle) and the same wake-up timestamp (common initial timing moment) to request different hardware sensor data, so that the hardware sensor can also wake up the DDR process at the same time and return the required hardware sensor data. In this way, the timing of waking up the DDR can be aligned to achieve the purpose of reducing the wake-up of the DDR, reducing the number of exits from the low power mode, and optimizing the power consumption of the subsystem.
[0187] like Fig.13 As shown in a, when three registered services are awakened independently, the same processor is triggered to work at 9 times, which may require the same processor to enter a higher power consumption state 9 times. Fig.13 As shown in b, by adopting the method provided in the embodiment of the present application, after the initial timing moment is aligned and awakened according to a unified wake-up cycle, the same processor is triggered 4 times in the same time period, requiring the same processor to enter a higher power consumption state 4 times, significantly reducing the number of times the same processor enters a higher power consumption state, thereby optimizing the processor power consumption.
[0188] The wake-up method provided in the embodiment of the present application can be used in tablet products that support functions such as ACC, Modem, Global Navigation Satellite System (GNSS), and WLAN to achieve unified heartbeat management of multiple services that wake up DDR on the Sensorhub side and reduce system power consumption overhead.
[0189] The signaling interaction flow chart of the wake-up method provided in the embodiment of the present application is as follows: Figure 5 The implementation process of the wake-up method includes the following steps S51-S59.
[0190] Step S51: The registration service sends registration information to the registration center.
[0191] Step S52: The registration center obtains the wake-up period of the registration service according to the registration information.
[0192] Step S53: The registration center determines a unified wake-up judgment cycle according to the wake-up cycle of the existing registered services.
[0193] Step S54: The registration center sends the unified wake-up judgment period and the common initial timing time to the corresponding registration service.
[0194] Step S55: the registration center obtains unified timing information of the wake-up periods of multiple registration services, and determines to wake up the registration service according to the unified timing information and the unified wake-up judgment period of the registration service.
[0195] Step S56: The registration center generates wake-up information for the registration service.
[0196] The above steps S55 and S56 may also be executed by the registration service or an application corresponding to the registration service.
[0197] Step S57: The registration center generates a work instruction according to the wake-up information.
[0198] Alternatively, the registration service or the service application corresponding to the registration service sends the wake-up information as a work instruction to the hardware signal module corresponding to the registration service, and then receives the monitoring information returned by the hardware signal module according to the wake-up information.
[0199] Step S58: The registration center sends the work instruction to the sensor corresponding to the target registration service.
[0200] Step S59: The sensor obtains monitoring information according to the work instruction.
[0201] Step S510: The sensor returns the monitoring information to the registration service.
[0202] Fig.14 It is a wake-up device provided by an embodiment of the present application, including: a unified timing information obtaining module 141, a target registration service determining module 142 and a wake-up information generating module 143.
[0203] The unified timing information acquisition module 141 is used to obtain the unified timing information of the wake-up cycle of multiple registered services; wherein the multiple registered services are services in operation; when the multiple registered services are awakened, the same processor is triggered to run the corresponding process; the unified timing information is determined by timing from the common initial timing moment of the multiple registered services.
[0204] The target registration service determination module 142 is used to determine the wake-up operation to be performed on at least one registration service according to the unified timing information and the unified wake-up judgment period of multiple registration services; the multiple registration services include at least one target registration service; the unified wake-up judgment period is determined according to the wake-up period of each registration service.
[0205] The wake-up information generating module 143 is used to generate the wake-up information of the target registration service.
[0206] It should be noted that: when recording information, the wake-up device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0207] At the same time, the awakening device of the embodiment of the present application may also include other functional modules to implement any steps and functions in the awakening method provided by any embodiment of the present application.
[0208] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0209] The awakening device and awakening method embodiments provided in the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought about can be found in the method embodiment part, which will not be repeated here.
[0210] As an example of the present application, the electronic device can access the base station and also has the ability to access the wireless local area network, for example, the electronic device is a mobile phone, a tablet, a smart watch, a portable notebook, etc. Please refer to Fig.15 , Fig.151 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc. Fig.15 The hardware structure shown in can be used to transmit and obtain sensor information when awakened.
[0211] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0212] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0213] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0214] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used, such as cyclically performing a recording operation on target information. If the processor 110 can be used to monitor the second storage location, determine whether the first target information or the second target information exists in the second storage location, and thereby determine whether the recording operation on the first target information or the recording operation on the second target information is successful. The processor 110 may include an AP processor and a Sensorhub coprocessor.
[0215] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0216] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0217] Among them, the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (WiFi network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. for application in the electronic device 100.
[0218] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology, and can also communicate with base stations to match Cell fences.
[0219] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is an integer greater than 1. The display screen 194 may also be one of the components included in the sensor in the embodiment of the present application.
[0220] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as permanently storing the transferred first target information.
[0221] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data (such as audio data, a phone book, etc.) created by the electronic device 100 during use. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (universal flash storage, UFS), etc. The internal memory may also be used to store target information. In the case where the method provided in the embodiment of the present application is applicable to different types of target information, different types of target information may be stored in different storage locations correspondingly, and after transfer, may also be stored in different storage locations to achieve relative persistence of target information.
[0222] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194. The touch sensor 180K can receive a trigger instruction and obtain monitoring information.
[0223] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0224] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0225] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting the SIM card interface 195 or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is an integer greater than 1. The SIM card interface 195 can also be compatible with an external memory card. The electronic device 100 can also implement a mobile communication function through a SIM card, and then through the mobile communication function, it can obtain target information from other communication terminals, or store the target information in a designated location of other communication terminals to implement relative persistent storage.
[0226] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (such as floppy disks, hard disks, and magnetic tapes), optical media (such as digital versatile discs (DVD)), or semiconductor media (such as solid state disks (SSD)).
[0227] The above are optional embodiments provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present application.
Claims
1. A wake-up method, characterized in that: include: Obtaining unified timing information of wake-up cycles of multiple registered services; wherein the multiple registered services are services in a running state; when the multiple registered services are awakened, the same processor is triggered to run corresponding processes; the unified timing information is determined by timing from a common initial timing moment of the multiple registered services; Determine, according to the unified timing information and the unified wake-up judgment period of the multiple registration services, to perform a wake-up operation on at least one target registration service; the multiple registration services include the at least one target registration service; the unified wake-up judgment period is determined according to the wake-up period of each registration service; Generate wake-up information for the target registration service; The multiple registration services are deployed on the coprocessor side of the terminal; each of the registration services includes: a first functional module deployed on the coprocessor side and in a first power consumption state, and a second functional module deployed on the coprocessor side and in a second power consumption state; the power consumption of the first power consumption state is higher than that of the second power consumption state; the first functional module runs in the space of the double data stream synchronous dynamic random access memory on the coprocessor side; the determining to wake up at least one target registration service among the multiple registration services includes: It is determined to wake up at least one target function module among the multiple registered services, where the target function module is a first function module.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a wake-up period corresponding to each of the registered services according to the registration information of each of the registered services; The unified wake-up determination period is determined according to the wake-up period.
3. The method according to claim 2, characterized in that The step of determining the unified wake-up judgment period according to the wake-up period includes: Determine the unified wake-up judgment period according to the greatest common divisor of the rounded values corresponding to the wake-up periods of the multiple registered services; Or, the minimum value of the wake-up periods of the multiple registered services is used as the unified wake-up judgment period.
4. The method according to claim 2, characterized in that: The obtaining, according to the registration information of each of the registered services, a wake-up period corresponding to each of the registered services, comprises: Obtaining, according to the registration information of each registered service, an original wake-up period of the registered service; Generate wake-up cycle modification negotiation information according to the original wake-up cycle of the registered service; the wake-up cycle modification negotiation information is used to request the registered service to adjust the original wake-up cycle; According to the feedback result of the registered service on the wake-up cycle modification negotiation information, the original wake-up cycle is modified to obtain the wake-up cycle of the registered service.
5. The method according to claim 1, characterized in that: The method further comprises: For each of the registered services, obtaining an initial timing moment of a wake-up cycle of the registered service according to the registration information of the registered service; The initial timing moments of the wake-up cycles of the multiple registered services are aligned to obtain the common initial timing moment.
6. The method according to claim 1, characterized in that The method further comprises: Sending the unified wake-up judgment period and the common initial timing time to the corresponding registration service; The step of determining, according to the unified timing information and the unified wake-up judgment period of the plurality of registered services, to perform a wake-up operation on at least one target registered service comprises: The service application of the corresponding registration service determines to perform a wake-up operation on the target registration service according to the unified timing information and the unified wake-up judgment period of the registration service.
7. The method according to claim 6, characterized in that The method further comprises: The target registration service generates a work instruction according to the wake-up information; The target registration service sends the work instruction to a hardware signal module corresponding to the target registration service; The target registration service receives the monitoring information returned by the hardware signal module according to the work instruction.
8. The method according to claim 1, characterized in that The method further comprises: storing the unified wake-up judgment period and the common initial timing time in a registration center of the multiple registered services; The step of determining, according to the unified timing information and the unified wake-up judgment period of the plurality of registered services, to perform a wake-up operation on at least one target registered service comprises: The registration center determines to wake up the target registration service according to the unified timing information and the unified wake-up judgment period of the registration service; wherein the wake-up information of the target registration service is generated by the registration center.
9. The method according to claim 8, characterized in that The method further comprises: generating a work instruction according to the wake-up information; Sending the work instruction to the hardware signal module corresponding to the target registered service; Receiving monitoring information returned by the hardware signal module according to the wake-up information; The monitoring information is sent to the service application corresponding to the target registered service.
10. The method according to claim 1, characterized in that The method further comprises: Receive registration information for new registered services; The unified wake-up judgment period and the common initial timing moment are updated according to the registration information of the new registered service.
11. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory is used to store a program for the electronic device to execute the method according to any one of claims 1 to 10, and to store data involved in implementing the method according to any one of claims 1 to 10; The processor is configured to execute the program stored in the memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Heartbeat adjustment method, apparatus, and terminal
US20170118709A1