CN116027876A - Absolute static state information acquisition method and electronic equipment - Google Patents

Absolute static state information acquisition method and electronic equipment Download PDF

Info

Publication number
CN116027876A
CN116027876A CN202210754965.4A CN202210754965A CN116027876A CN 116027876 A CN116027876 A CN 116027876A CN 202210754965 A CN202210754965 A CN 202210754965A CN 116027876 A CN116027876 A CN 116027876A
Authority
CN
China
Prior art keywords
absolute
motionservice
notification
static state
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210754965.4A
Other languages
Chinese (zh)
Other versions
CN116027876B (en
Inventor
董浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210754965.4A priority Critical patent/CN116027876B/en
Publication of CN116027876A publication Critical patent/CN116027876A/en
Application granted granted Critical
Publication of CN116027876B publication Critical patent/CN116027876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides an absolute static state information acquisition method and electronic equipment. The method comprises the following steps: when the electronic equipment is off-screen, the power consumption management and control application sends a first notification to a service process MotionService through a first system application, wherein the first notification is used for enabling absolute static state monitoring; the MotionService controls the Sensorhub module to start absolute static state detection according to the first notice; the MotionService receives an absolute static state detection result sent by the sensor hub module; the MotionService returns an absolute static state detection result to the power consumption management and control application through the first system application; the power consumption management and control application, the first system application and the MotionService run in the processor, the sensor hub module runs on a first chip of the electronic device, and the processor is not on the first chip. In this way, a new path is provided for the power consumption management and control application to the sensor hub module, so that the power consumption management and control application can acquire the absolute static state detection result output by the absolute static state algorithm in the sensor hub module.

Description

Absolute static state information acquisition method and electronic equipment
Technical Field
The present disclosure relates to the field of terminal devices, and in particular, to a method for acquiring absolute static state information and an electronic device.
Background
When the electronic device enters an absolute stationary state, it means that the electronic device is not moving. If the electronic device is off screen and in an absolute rest state, it is generally indicated that the user is not currently using the electronic device. At this time, some APP (application program) of the electronic device, such as a power saving eidolon, may start a corresponding function according to whether the electronic device is in an absolute static state in a screen-off state, so as to control power consumption of the electronic device.
The operation of these APPs requires absolute rest state information (i.e., whether the electronic device is in an absolute rest state) support. Therefore, to implement the functions of these APPs, absolute rest state information needs to be obtained first.
Disclosure of Invention
In order to solve the technical problems, the application provides an absolute static state information acquisition method and electronic equipment, and provides a new path which is applied to a sensor hub module by power consumption management and control, so that the power consumption management and control application can acquire an absolute static state detection result output by an absolute static state algorithm in the sensor hub module.
In a first aspect, the present application provides a method for acquiring absolute rest state information. The method is applied to the electronic equipment. The method comprises the following steps: when the electronic equipment is off-screen, the power consumption management and control application sends a first notification to a service process MotionService through a first system application, wherein the first notification is used for enabling absolute static state monitoring; the MotionService controls the Sensorhub module to start absolute static state detection according to the first notice; the MotionService receives an absolute static state detection result sent by the sensor hub module; the MotionService returns an absolute static state detection result to the power consumption management and control application through the first system application; the power consumption management and control application, the first system application and the MotionService run in the processor, the sensor hub module runs on a first chip of the electronic device, and the processor is not on the first chip. In this way, a new path is provided for the power consumption management and control application to the sensor hub module, so that the power consumption management and control application can acquire the absolute static state detection result output by the absolute static state algorithm in the sensor hub module.
According to a first aspect, further comprising: when the electronic equipment is on screen, the power consumption management and control application sends a third notification to the MotionService through the first system application, and the third notification is used for disabling the absolute static state monitoring; and controlling the Sensorhub module to stop absolute static state detection according to the third notification by the MotionService. Thus, in the case of a bright screen, the power consumption management application stops absolute rest state detection of the sensor hub module using the new path to the sensor hub module.
According to a first aspect, a low power consumption memory space occupied by an algorithm library for absolute stationary state detection in the sensor hub module is smaller than a first value. Therefore, the new path applied to the sensor hub module by power consumption management and control can be utilized to acquire absolute static state information on the chip with smaller low-power consumption memory space, and the requirement on the chip is reduced.
According to a first aspect, when the electronic device is off-screen, the power consumption management and control application sends a first notification to the service process MotionService through the first system application, and before the first notification is used for enabling the absolute static state monitoring, the method further includes: establishing a first connection between a first system application and a MotionService; a second connection between the power consumption management application and the first system application is established. Therefore, a channel is established between the power consumption management and control application and the MotionService, and the channel can be used for communicating with the sensor hub module when the screen is closed each time, so that an absolute static state detection result output by an absolute static state algorithm in the sensor hub module is obtained.
According to a first aspect, establishing a first connection between a first system application and a MotionService includes: the method comprises the steps that a first system application comprises a newly added Motion path sub-class, and the first system application creates a first object of the Motion path sub-class, wherein the Motion path sub-class is used for establishing a communication path between the first system application and a Motion service; the MotionService obtains the first object through a first function in the first operation class. Thus, by adding the Motion path subclass to the Motion service, a connection between the Motion service and the first system application can be established.
According to a first aspect, when an electronic device is off-screen, a power consumption management and control application sends a first notification to a service process MotionService through a first system application, the first notification being used to enable absolute static state monitoring, including: when the electronic equipment is off-screen, the power consumption management and control application sends a first notification to the first system application through the second connection, wherein the first notification is used for enabling absolute static state monitoring; the first system application forwards the first notification to the service process MotionService over the first connection. In this way, the power consumption management and control application can issue a notification to the MotionService through the first system application.
According to a first aspect, motionService controls a Sensorhub module to initiate absolute static state detection according to a first notification, including: the MotionService sends a second notification to the Sensorhub module according to the first notification, wherein the second notification is used for indicating to start absolute static state detection; the sensor hub module initiates absolute rest state detection based on the second notification. Therefore, the power consumption management and control application can send a notification to the sensor hub module through the MotionService so as to control the starting operation of the absolute static state algorithm of the sensor hub module.
According to a first aspect, the MotionService returns an absolute static state detection result to the power consumption management and control application through the first system application, including: the MotionService returns an absolute static state detection result to the first system application through a first callback function; the first system analyzes the absolute static state detection result and converts the absolute static state detection result into absolute static state information; the first system application returns the absolute static state information to the power consumption management and control application through the second callback function. In this way, the callback function can transmit the absolute static state detection result output by the absolute static state algorithm in the sensor hub module to the power consumption management and control application.
According to a first aspect, the MotionService controls the Sensorhub module to stop absolute stationary state detection according to a third notification, including: the MotionService sends a fourth notification to the Sensorhub module according to the third notification, wherein the fourth notification is used for indicating to stop absolute static state detection; the sensor hub module stops absolute rest state detection according to the fourth notification. Therefore, the power consumption management and control application can send a notification to the sensor hub module through the MotionService so as to control the stop operation of the absolute static state algorithm of the sensor hub module.
According to a first aspect, a first system application serves MSDPService for an integrated sensor information handling platform. MSDPService is an existing system application in electronic devices.
In a second aspect, the present application provides an electronic device, the electronic device including a first chip, the electronic device including: a memory and a processor, the memory coupled to the processor; the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the absolute rest state information acquisition method of any one of the first aspects.
In a third aspect, the present application provides a computer readable storage medium comprising a computer program which, when run on an electronic device, causes the electronic device to perform the absolute rest state information acquisition method according to any one of the preceding first aspects.
Drawings
Fig. 1 is a schematic structural diagram of an exemplary electronic device 100;
fig. 2 is a software architecture block diagram of an electronic device 100 of an embodiment of the present application, which is exemplarily shown;
FIG. 3 is a schematic diagram illustrating an operation environment of each module involved in the method for acquiring absolute static state information according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating an exemplary absolute rest state information acquisition method in an embodiment of the present application;
fig. 5 is a diagram illustrating an example of the process of step S410 in fig. 4.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the present application are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first target object and the second target object, etc., are used to distinguish between different target objects, and are not used to describe a particular order of target objects.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, the plurality of processing units refers to two or more processing units; the plurality of systems means two or more systems.
Standby time is an important indicator of electronic devices. In order to extend standby time of electronic devices, various APPs have been developed that can control power consumption of electronic devices, and such APPs are collectively referred to herein as power consumption control APPs. For example, the power saving genius is a power consumption management and control APP.
Taking the power saving eidolon as an example, the power consumption management and control APP determines whether to freeze certain processes and services on the electronic equipment according to whether the electronic equipment is in an absolute static state under the condition of screen-off of the electronic equipment so as to carry out power consumption management and control.
To realize the function of power consumption control APP, absolute static state information needs to be acquired first, that is, whether the electronic device is in an absolute static state.
The absolute rest detection algorithm is executed by a sensor hub module running on the chip MCU (Microcontroller Unit).
The related art performs absolute stationary state detection by an absolute stationary state algorithm included in a large algorithm library, and provides a path for acquiring absolute stationary state information from the large algorithm library in a sensor hub module. The large algorithm library comprises an absolute static state algorithm and is also packed with algorithms with a plurality of other functions, so that the large algorithm library needs to occupy a large low-power consumption memory space. However, some chips have smaller low-power memory space, and cannot meet the requirement of a large algorithm library on the low-power memory space, so that the large algorithm library cannot be operated. Thus, chips with low power consumption and smaller memory space cannot acquire absolute static state information by using a related-technology channel.
The embodiment of the application provides an absolute static state information acquisition method, which can acquire absolute static state information on a chip with a small low-power consumption memory space and reduce the requirement on the chip.
The absolute static state information acquisition method in the embodiment of the application can be applied to electronic equipment such as mobile phones and tablets. The structure of the electronic device may be as shown in fig. 1.
Fig. 1 is a schematic diagram of an exemplary illustrated electronic device 100. It should be understood that the electronic device 100 shown in fig. 1 is only one example of an electronic device, and that the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 1 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
Referring to fig. 1, an electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (universal serial bus, USB) interface 130, charge management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headset interface 170D, sensor module 180, keys 190, motor 191, indicator 192, camera 193, display 194, and subscriber identity module (subscriber identification module, SIM) card interface 195, etc.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
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 software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In this embodiment, taking an Android (Android) system with a hierarchical architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 2 is a software structural block diagram of the electronic device 100 of the embodiment of the present application, which is exemplarily shown.
The layered architecture of the electronic device 100 divides the software into several layers, each with a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system may include an application layer, an application framework layer, a system layer, a kernel layer, and the like.
The application layer may include a series of application packages.
As shown in fig. 2, the application packages of the application layer of the electronic device 100 may include applications such as a camera, WLAN, bluetooth, short message, gallery, call, power saving wizard, MSDPService (Multimodal Sensor Data Platform Service, integrated sensor information processing platform service), and the like. MSDPService is a system application.
As shown in FIG. 2, the application framework layer may include application modules such as resource managers, gesture services (i.e., motionService), and the like.
Among other things, the resource manager provides various resources to the application, such as localization strings, icons, pictures, layout files, video files, and so forth.
Among them, the gesture service MotionService is used to detect various gesture types (MotionType), such as lifting a hand, turning over, picking up an electronic device to the ear, rotating a screen, picking up the electronic device from the ear, and so on. In this embodiment of the present application, motionService includes a newly added gesture type, where the gesture type is an absolute rest state gesture type, and the detected result of the absolute rest state may be received through a variable of the absolute rest state gesture type.
As shown in fig. 2, the system library may include a plurality of functional modules, such as: an Zhuoyun line, etc.
In the embodiment of the present application, a class is newly added to MSDPService, and this newly added class is referred to herein as a Motion path subclass. The Motion path subclass is used to establish a communication path between MSDPService and MotionService to transfer information between MSDPService and MotionService.
The kernel layer is a layer between hardware and software. The kernel layer may contain modules such as display drivers, sensor drivers, etc.
It will be appreciated that the layers and components contained in the layers in the software structure shown in fig. 2 do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer layers than shown, and more or fewer components may be included in each layer, as the present application is not limited.
The present application will be described in detail with reference to examples.
Fig. 3 is a schematic diagram illustrating an operation environment of each module involved in the absolute static state information acquisition method in the embodiment of the present application. As shown in fig. 3, in the embodiment of the present application, the software modules involved in the absolute static state information obtaining method may include a power saving eidolon application and a MSDPService, motionService, sensorhub module. The power saving eidolon application, the MSDPService and the MotionService run on a CPU (Central processing Unit) of the electronic equipment, and the sensor hub module runs on an MCU of the electronic equipment. Wherein the CPU and MCU may be located on different chips. The power saving eidolon is a system application, and the MotionService is a service process.
In the embodiment of the application, the low-power-consumption memory space of the chip where the MCU is located is smaller, and an algorithm library which needs a larger low-power-consumption memory space cannot be supported. Therefore, in this embodiment, the sensor hub module is provided with an absolute static state algorithm library that requires a small low-power memory space. The absolute rest state algorithm library is different from the large algorithm library, and the absolute rest state algorithm library can be only used for detecting the absolute rest state and does not comprise codes with other functions, so that the absolute rest state algorithm library in the embodiment needs smaller low-power consumption memory space, and is called as a small algorithm library in the present embodiment.
Referring to fig. 3, in this embodiment, MSDPService includes a Motion path subclass. By instantiating the Motion path subclass, an object A of the Motion path subclass can be created, and a connection is established between the object A and the Motion service, namely, a communication path is established between the MSDPservice and the Motion service. MSDPService can send information to MotionService through object A, and utilize object A to receive information returned by MotionService. The Motion path subclass of this embodiment is not included in MSDPService in the related art.
In this embodiment, a gesture type of an absolute rest state is newly added in the MotionService, and a type identifier of the gesture type of the absolute rest state is set. The object a includes a type identifier of an absolute stationary gesture type. When the object a sends a notification to the MotionService, the notification includes a type identifier of the absolute static gesture type.
The process by which the MotionService receives notification of object a that enables absolute stationary state monitoring may be: the object A calls a registered absolute static state monitoring function, and when the object A calls, the type identification of the gesture type of the absolute static state is used as one of parameters to be transmitted to the MotionService. In this way, the MotionService can inform the sensor hub module to start absolute static state detection by analyzing the type identifier of the gesture type of the absolute static state.
The process by which the MotionService receives notification of object a to enable absolute static state monitoring may be: the object A calls a deregister absolute static state monitoring function, and when the object A calls, the type identification of the absolute static state gesture type is used as one of parameters to be transmitted to the MotionService. In this way, the MotionService can inform the sensor hub module to stop absolute static state detection by analyzing the type identifier of the gesture type of the absolute static state.
The absolute static state detection is executed by an absolute static state algorithm library arranged in the sensor hub module, and the running result of the absolute static state algorithm library is the absolute static state detection result. And the sensor hub module reports an absolute static state detection result output by the absolute static state algorithm to the MotionService. And returning the absolute static state detection result to the MSDPService by the MotionService through the first callback function. MSDPService processes the absolute resting state detection result into absolute resting state information, and then returns the absolute resting state information result to the power-saving eidolon application through a second callback function.
The absolute stationary gesture type of the embodiment is not included in the MotionService in the related art.
Fig. 4 is a flowchart illustrating an exemplary absolute rest state information acquisition method in the embodiment of the present application. Referring to fig. 4, in an embodiment of the present application, an absolute rest state information obtaining method is applied to an electronic device, and the method may include the following steps:
s401, MSDPService instantiates a Motion path subclass, and creates an object A of the Motion path subclass.
The absolute static state information acquisition method in the embodiment of the application can be applied to electronic equipment adopting a chip with low power consumption and small memory space. The chip with the smaller low-power memory space is referred to herein as the first type of chip. The low power memory space of the first type of chip is less than the first value.
Accordingly, before this step, the electronic device may determine whether the chip on which the current MCU is located belongs to the first type of chip. And if the electronic equipment determines that the chip where the current MCU is located belongs to the first type of chip, executing the step. If the electronic equipment determines that the chip where the current MCU is located does not belong to the first type chip, the step is not executed, and at the moment, the electronic equipment does not acquire the absolute static state information by adopting the absolute static state information acquisition method in the embodiment of the application.
In one example, the chip name of the chip belonging to the first type may be stored in the first type chip white list, and the electronic device may determine whether the chip in which the current MCU is located belongs to the first type chip by:
reading the chip name of the chip where the current MCU is located;
judging whether the read chip names are in a preset first type chip white list or not, wherein all chips in the first type chip white list belong to the first type chip;
if yes, determining that the chip of the current MCU belongs to the first type chip, otherwise, determining that the chip of the current MCU does not belong to the first type chip.
S402, an object A in the MSDPService establishes connection with the MotionService.
The MotionService service provides an operation class in the Framework. The MotionService service may obtain the object of the Motion Access subclass through the getInstance function in the operation class. Thus, a connection between the object A of the Motion path subclass and the Motion service can be established.
It should be noted that, steps S401 and S402 are executed once after the electronic device is turned on, and then, before the electronic device is turned off, the connection between the object a and the MotionService is always present until the electronic device is turned off, and the connection between the object a and the MotionService is not disconnected.
S403, the power saving eidolon application establishes connection with MSDPService.
After the power saving eidolon application is started, the power saving eidolon application establishes a connection with MSDPService. When the power saving puck application is exited, the connection between the power saving puck application and the MSDPService is broken. After the next power saving puck application is started, the power saving puck application reestablishes connection with MSDPService.
The power saving eidolon application can establish connection with MSDPService by calling a connectiService interface in the SDK provided by the MSDPService system application.
S404, when the electronic equipment is off-screen, the power saving eidolon application sends a first notification enabling absolute static state monitoring to the MSDPService application.
The android system provides the capability of dynamically monitoring screen on-screen and off-screen broadcasting, and the power-saving smart application can determine whether the electronic equipment is on-screen or off-screen by monitoring the screen on-screen broadcasting.
The step can be realized by the power saving eidolon application transferring instruction parameters for starting monitoring to the MSDPService interface by calling the MSDPService interface.
S405, MSDPService receives the first notification and forwards the first notification to the MotionService through the object A.
In the aforementioned step S402, the object a has already established a connection with the MotionService, and in this step, the object a directly sends the first notification to the MotionService through the connection between the object a and the MotionService.
S406, the MotionService receives the first notification, and sends a second notification indicating to start absolute static state detection to the Sensorhub module according to the first notification.
The MotionService sending a second notification indicating to start absolute static state detection to the sensor hub module according to the first notification may be implemented as follows:
the object A calls a registered absolute static state monitoring function, and when the object A calls, the type identification of the gesture type of the absolute static state is transferred to the MotionService. The MotionService analyzes that the type identifier transmitted by the object A is the type identifier of the gesture type in the absolute static state, and sends an instruction for indicating to start the detection of the absolute static state to the sensor hub module so that the sensor hub module starts to operate the algorithm library in the absolute static state according to the instruction.
It should be noted that, every time the screen is turned off, the object a calls the registered absolute static state monitoring function; each time the screen is lit, object a invokes a deregister absolute rest state listening function. The type identifier of the absolute rest state gesture type is one of the parameters of the two functions of registering the absolute rest state listening function and deregistering the absolute rest state listening function.
S407, the sensor hub module receives the second notification, starts an absolute static state algorithm according to the second notification, detects the absolute static state, and obtains an absolute static state detection result output by the absolute static state algorithm.
The absolute stationary state detection result may be, for example, "the current absolute stationary state", or may be "the current non-absolute stationary state".
The processing procedure of the absolute static state algorithm can be as follows: and inputting trained machine learning models into data (acceleration values in the x, y and z directions) of the acceleration sensor, and outputting absolute rest state detection results by the machine learning models.
In this embodiment, the absolute rest detection algorithm configured in the sensor hub module is a small absolute rest detection algorithm library occupying a small low-power consumption memory space, so that the requirement on the low-power consumption memory space of the chip can be greatly reduced.
Unlike the foregoing large algorithm library, which generally packages a lot of functional algorithms, the small absolute stationary detection algorithm library may only include an absolute stationary state algorithm, so that the small algorithm library needs to occupy a small low-power consumption memory space, for example, the small algorithm library of an absolute stationary detection algorithm used in this embodiment needs to occupy only 4K of low-power consumption memory space.
S408, the sensor hub module sends the absolute static state detection result to the MotionService.
The method can be realized by the following steps:
and the absolute static state algorithm library returns the absolute static state detection result to the MotionService through a callback function.
S409, the MotionService sends the absolute static state detection result to the object A in the MSDPService.
The object A can create a thread B, and the thread B is used for receiving an absolute static state detection result sent by the MotionService.
For example, the MotionService may send the absolute static state detection result to the object a in the MSDPService through the first callback function.
S410, an absolute static state detection result of the object A in the MSDPService is sent to the power saving eidolon application.
For example, object a in MSDPService may send absolute static state information to the power saving puck application via a second callback function.
The electronic device may perform steps S404 to S410 once each time the electronic device is off-screen.
S411, when the electronic device is on screen, the power saving puck application sends a third notification to the MSDPService application to enable absolute rest state monitoring.
S412, MSDPService receives the third notification and forwards the third notification to the MotionService through object A.
S413, the MotionService receives the third notification, and sends a fourth notification indicating stopping of the absolute static state detection to the Sensorhub module according to the third notification.
The method can be realized by the following steps:
the object A calls a deregister absolute static state monitoring function, and when the object A calls, the type identification of the absolute static state gesture type is used as one of parameters to be transmitted to the MotionService. The MotionService analyzes that the type identifier transmitted by the object A is the type identifier of the gesture type in the absolute static state, and sends an instruction for indicating to stop the detection of the absolute static state to the sensor hub module so that the sensor hub module stops running the absolute static state algorithm library according to the instruction.
And S414, the sensor hub module receives a fourth notification, and stops running the absolute rest state algorithm according to the fourth notification, namely stopping absolute rest state detection.
The electronic apparatus may perform steps S411 to S414 once every time the electronic apparatus is lit.
S415, when the power saving application is exited, the connection between the power saving application and the MSDPService is disconnected.
If the user opens the power saving puck application again, step S403 is performed.
It should be noted that, although the example shown in fig. 4 is described by taking the power saving puck application as an example, it is to be understood that the absolute rest state information obtaining method of the embodiments of the present application may also be applicable to other power consumption management and control APPs, that is, the power saving puck application in the example shown in fig. 4 may be replaced by other power consumption management and control APPs.
Fig. 5 is a diagram illustrating an example of the process of step S410 in fig. 4. Referring to fig. 5, in this embodiment, the process of sending the absolute static state detection result to the power saving puck application by the object a in MSDPService may include:
s501, the object A analyzes the absolute rest state detection result and converts the absolute rest state detection result into absolute rest state information.
Wherein, the absolute rest state detection result may be: currently in an absolute resting state, or currently in a non-absolute resting state.
The absolute stationary state information may be information indicating entry into the absolute stationary state or information exiting from the absolute stationary state.
S502, the object A constructs an MSDPService callback notification object.
And S503, the object A returns the absolute static state information to the power-saving eidolon application through the constructed MSDPService callback notification object.
According to the absolute static state information acquisition method provided by the embodiment of the application, the MSDPService is communicated with the MotionService by utilizing the newly added class in the MSDPService, the absolute static state detection result of the sensor hub module is monitored by utilizing the newly added gesture type in the MotionService, and a path for acquiring the absolute static state detection result from the sensor hub module through the MSDPService and the MotionService by using the power consumption management and control APP is realized.
The absolute static state information acquisition method provided by the embodiment of the application has the following beneficial effects:
on the one hand, a path from the application layer power consumption management APP to the sensor hub module is provided, which does not depend on a large algorithm library, so that a small absolute static detection algorithm library occupying a small low-power consumption memory space can be configured in the sensor hub module, absolute static state information can be obtained on a chip with the small low-power consumption memory space, and the requirement on the chip is reduced.
On the other hand, compared with an absolute rest detection scheme based on a virtual Sensor channel, the embodiment of the application does not need to register a plurality of groups of sensors, so that the problem of frequent awakening of a main process caused by the ping-pong effect of the virtual Sensor channel is avoided, the power consumption is reduced, and the standby time is further prolonged.
In addition, because the code supporting the MotionService is already deployed in the related-art sensor hub module, the code supporting the MotionService existing in the sensor hub module can be multiplexed due to the fact that the MotionService is adopted to communicate with the sensor hub module, so that a large number of codes are not required to be added in the sensor hub module, and the storage space occupied by the sensor hub module is saved.
The embodiment of the application also provides electronic equipment, which comprises a memory and a processor, wherein the memory is coupled with the processor, the memory stores program instructions, and when the program instructions are executed by the processor, the electronic equipment can obtain the absolute static state information executed by the electronic equipment.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The steps of an algorithm for each example described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
The present embodiment also provides a computer storage medium having stored therein computer instructions which, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the absolute rest state information acquisition method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the absolute rest state information acquisition method in the above-described embodiments.
In addition, the embodiment of the application also provides a device, which can be a chip, a component or a module, and the device can comprise a processor and a memory which are connected; the memory is used for storing computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the absolute static state information acquisition method in each method embodiment.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding methods provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Any of the various embodiments of the application, as well as any of the same embodiments, may be freely combined. Any combination of the above is within the scope of the present application.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.
The steps of a method or algorithm described in connection with the disclosure of the embodiments disclosed herein may be embodied in hardware, or may be embodied in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in random access Memory (Random Access Memory, RAM), flash Memory, read Only Memory (ROM), erasable programmable Read Only Memory (Erasable Programmable ROM), electrically Erasable Programmable Read Only Memory (EEPROM), registers, hard disk, a removable disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (12)

1. An absolute rest state information acquisition method, which is applied to an electronic device, comprises the following steps:
when the electronic equipment is off-screen, the power consumption management and control application sends a first notification to a service process MotionService through a first system application, wherein the first notification is used for enabling absolute static state monitoring;
controlling the sensor module to start absolute static state detection according to the first notification by the MotionService;
the MotionService receives an absolute static state detection result sent by the sensor hub module;
the MotionService returns the absolute static state detection result to the power consumption management and control application through the first system application;
the power consumption management and control application, the first system application and the MotionService run in a processor, the sensor hub module runs on a first chip in the electronic device, and the processor is not on the first chip.
2. The method as recited in claim 1, further comprising:
when the electronic equipment is on screen, the power consumption management and control application sends a third notification to the MotionService through the first system application, wherein the third notification is used for disabling absolute static state monitoring;
and controlling the sensor module to stop absolute static state detection according to the third notification by the MotionService.
3. The method of claim 1, wherein a low power memory space occupied by an algorithm library in the sensor hub module for absolute stationary state detection is less than a first value.
4. The method of claim 1, wherein when the electronic device is off-screen, the power consumption management application sends a first notification to a service process MotionService via a first system application, the first notification further comprising, before enabling absolute rest state monitoring:
establishing a first connection between the first system application and the MotionService;
a second connection between the power consumption management and control application and the first system application is established.
5. The method of claim 4, wherein establishing a first connection between the first system application and a MotionService comprises:
the first system application comprises a newly added Motion path sub-class, and the first system application creates a first object of the Motion path sub-class, wherein the Motion path sub-class is used for establishing a communication path between the first system application and the Motion service;
the MotionService obtains the first object through a first function in a first operation class.
6. The method of claim 4, wherein when the electronic device is off-screen, the power consumption management application sends a first notification to a service process MotionService via a first system application, the first notification being for enabling absolute rest state monitoring, comprising:
when the electronic equipment is turned off, the power consumption management and control application sends a first notification to a first system application through the second connection, wherein the first notification is used for enabling absolute static state monitoring;
the first system application forwards the first notification to a service process MotionService through the first connection.
7. The method of claim 1, wherein the MotionService controlling the sensor module to initiate absolute stationary state detection according to the first notification comprises:
the MotionService sends a second notification to the Sensorub module according to the first notification, wherein the second notification is used for indicating to start absolute static state detection;
and the sensor hub module starts absolute static state detection according to the second notification.
8. The method of claim 1, wherein the MotionService returns the absolute stationary state detection result to the power consumption management application through the first system application, comprising:
the MotionService returns the absolute static state detection result to the first system application through a first callback function;
the first system applies the analysis absolute static state detection result to convert the absolute static state detection result into absolute static state information;
and the first system application returns the absolute static state information to the power consumption management and control application through a second callback function.
9. The method of claim 2, wherein the MotionService controlling the sensor module to stop absolute stationary state detection according to the third notification comprises:
the MotionService sends a fourth notification to the Sensorub module according to the third notification, wherein the fourth notification is used for indicating to stop absolute static state detection;
and stopping absolute static state detection by the sensor hub module according to the fourth notification.
10. The method of claim 1, wherein the first system application serves MSDPService for an integrated sensor information handling platform.
11. An electronic device, comprising a first chip, comprising:
a memory and a processor, the memory coupled with the processor;
the memory stores program instructions that, when executed by the processor, cause the electronic device to perform the absolute rest state information acquisition method of any one of claims 1-10.
12. A computer readable storage medium comprising a computer program, characterized in that the computer program, when run on an electronic device, causes the electronic device to perform the absolute rest state information acquisition method according to any one of claims 1-10.
CN202210754965.4A 2022-06-30 2022-06-30 Absolute static state information acquisition method and electronic equipment Active CN116027876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210754965.4A CN116027876B (en) 2022-06-30 2022-06-30 Absolute static state information acquisition method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210754965.4A CN116027876B (en) 2022-06-30 2022-06-30 Absolute static state information acquisition method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116027876A true CN116027876A (en) 2023-04-28
CN116027876B CN116027876B (en) 2023-11-24

Family

ID=86069555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210754965.4A Active CN116027876B (en) 2022-06-30 2022-06-30 Absolute static state information acquisition method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116027876B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150153807A1 (en) * 2013-11-29 2015-06-04 Pegatron Corporaton Method for reducing power consumption and sensor management system for the same
WO2017206862A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Bright screen lock-based processing method and apparatus, storage medium, and electronic device
WO2021109882A1 (en) * 2019-12-02 2021-06-10 Oppo广东移动通信有限公司 Application starting method and apparatus, and storage medium and electronic device
CN113242352A (en) * 2021-03-30 2021-08-10 上海闻泰电子科技有限公司 Method and device for closing music playing program and computer equipment
WO2022126398A1 (en) * 2020-12-15 2022-06-23 华为技术有限公司 Message notification method and apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150153807A1 (en) * 2013-11-29 2015-06-04 Pegatron Corporaton Method for reducing power consumption and sensor management system for the same
WO2017206862A1 (en) * 2016-05-31 2017-12-07 广东欧珀移动通信有限公司 Bright screen lock-based processing method and apparatus, storage medium, and electronic device
WO2021109882A1 (en) * 2019-12-02 2021-06-10 Oppo广东移动通信有限公司 Application starting method and apparatus, and storage medium and electronic device
CN112988256A (en) * 2019-12-02 2021-06-18 Oppo广东移动通信有限公司 Application starting method and device, storage medium and electronic equipment
WO2022126398A1 (en) * 2020-12-15 2022-06-23 华为技术有限公司 Message notification method and apparatus
CN113242352A (en) * 2021-03-30 2021-08-10 上海闻泰电子科技有限公司 Method and device for closing music playing program and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
记得诚: "你用过哪些传感器?sensorhub又是什么", pages 2, Retrieved from the Internet <URL:https://mp.weixin.qq.com/s/UBCYQ-R-k-pelTt3yOVTEA> *

Also Published As

Publication number Publication date
CN116027876B (en) 2023-11-24

Similar Documents

Publication Publication Date Title
US11698815B2 (en) Method for resource allocation and related products
CN110831041B (en) Cell beam failure processing method, mobile communication terminal and network equipment
US20220217810A1 (en) Data receiving method, data sending method, terminal, and network side device
CN115292052B (en) Memory recycling method, electronic device and computer readable storage medium
US20230385112A1 (en) Memory Management Method, Electronic Device, and Computer-Readable Storage Medium
CN113472477B (en) Wireless communication system and method
CN110046497B (en) Function hook realization method, device and storage medium
CN115757193A (en) Memory management method and electronic equipment
CN113905425B (en) Data service switching method and device, electronic equipment and readable storage medium
CN114218560B (en) Resource access method, device, electronic equipment and storage medium
CN113141575B (en) Method, device and equipment for updating tracking area list and storage medium
CN116027876B (en) Absolute static state information acquisition method and electronic equipment
CN111026457B (en) Hardware configuration method and device, storage medium and terminal equipment
CN111432387B (en) Many-to-many switching module, multi-machine wireless communication system and communication method thereof
CN111966425A (en) Process cleaning method and device, storage medium and mobile terminal
CN116339531A (en) Touch control system control method and electronic equipment
CN106817370B (en) Method and device for transmitting network data
EP4173895A1 (en) Function conflict processing method and apparatus, and electronic device, and readable storage medium
CN115884142A (en) Bluetooth connection method and electronic equipment
CN113821128A (en) Terminal device, gesture operation method thereof and medium
CN111432502A (en) Random access method, base station and terminal equipment
CN114006969B (en) Window starting method and electronic equipment
CN115915396B (en) Paging method and electronic equipment
CN115902766B (en) Measurement method and related device
CN116661678B (en) Data dump method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant