CN117667240B - Electronic device wake-up method, electronic device, and computer-readable storage medium - Google Patents
Electronic device wake-up method, electronic device, and computer-readable storage medium Download PDFInfo
- Publication number
- CN117667240B CN117667240B CN202410142406.7A CN202410142406A CN117667240B CN 117667240 B CN117667240 B CN 117667240B CN 202410142406 A CN202410142406 A CN 202410142406A CN 117667240 B CN117667240 B CN 117667240B
- Authority
- CN
- China
- Prior art keywords
- mode
- sensor
- electronic device
- microcontroller
- frequency
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/325—Power saving in peripheral device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/3296—Power saving characterised by the action undertaken by lowering the supply or operating voltage
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Power Sources (AREA)
Abstract
Description
技术领域Technical Field
本申请实施例涉及电子设备技术领域,尤其涉及一种电子设备的唤醒方法、电子设备和计算机可读存储介质。The embodiments of the present application relate to the technical field of electronic devices, and in particular, to a method for waking up an electronic device, an electronic device, and a computer-readable storage medium.
背景技术Background technique
随着电子设备的发展,目前很多电子设备(例如手机、平板电脑等)的按键(例如电源按键、音量按键等)已经从实体按键(物理按键)发展到固态按键。其中,固态按键是没有机械结构和弹性元件,需要通过使用传感技术实现的按键。因此,相比实体按键来说,固态按键需要实现额外的模拟信号采集功能。这样,对于电子设备来说,就会额外增加相应的采集功耗,从而导致电子设备功耗增加、产品续航降低。With the development of electronic devices, the buttons (such as power buttons, volume buttons, etc.) of many electronic devices (such as mobile phones, tablets, etc.) have evolved from physical buttons (physical buttons) to solid-state buttons. Among them, solid-state buttons are buttons without mechanical structures and elastic elements, and need to be implemented by using sensing technology. Therefore, compared with physical buttons, solid-state buttons need to implement additional analog signal acquisition functions. In this way, for electronic devices, the corresponding acquisition power consumption will be increased, which will increase the power consumption of electronic devices and reduce product life.
发明内容Summary of the invention
本申请实施例提供一种电子设备的唤醒方法、电子设备和计算机可读存储介质,用于解决带有固态按键的电子设备功耗增加、产品续航降低的问题。Embodiments of the present application provide a method for waking up an electronic device, an electronic device, and a computer-readable storage medium, which are used to solve the problem of increased power consumption and reduced product life of electronic devices with solid-state buttons.
为达到上述目的,本申请的实施例采用如下技术方案:To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种电子设备的唤醒方法,应用于包括固态按键的电子设备。其中,固态按键包括微控制器和电源按键,电源按键包括第一传感器。该方法包括:在航运模式下,微控制器控制第一传感器以第一频率采集信号。进而,当检测到用户对电源按键的第一触摸操作之后,响应于这个第一触摸操作,第一传感器以第一频率采集这个第一触摸操作对应的第一触摸信号,再由微控制器根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式。其中,第一频率小于关机模式对应的第二频率。In a first aspect, a method for waking up an electronic device is provided, which is applied to an electronic device including a solid-state button. The solid-state button includes a microcontroller and a power button, and the power button includes a first sensor. The method includes: in a shipping mode, the microcontroller controls the first sensor to collect signals at a first frequency. Then, after detecting a first touch operation of the user on the power button, in response to the first touch operation, the first sensor collects a first touch signal corresponding to the first touch operation at a first frequency, and the microcontroller switches the working mode of the electronic device from the shipping mode to the running mode according to the first touch signal corresponding to the first touch operation. The first frequency is less than the second frequency corresponding to the shutdown mode.
在第一方面,由于固态按键的传感器的采集频率越低,固态按键的传感器所需要的采集功耗越低,相应的固态按键进行模拟信号采集所需要的功耗就越低。因此,根据不同的低功耗模式,可以为传感器设置不同对应的采集频率以起到降低功耗的效果。由此,当电子设备在航运模式这一低功耗模式下时,固态按键对应的传感器能够适应性降到对应的第一频率,以第一频率采集信号,使得航运模式下,固态按键所需要消耗的功耗减少,从而减少电子设备在航运模式下的功耗,提升产品续航。同时,航运模式下的第一频率小于关机模式下的第二频率,能够进一步优化航运模式下的功耗,提升航运模式下的产品续航。In the first aspect, since the lower the acquisition frequency of the sensor of the solid-state button, the lower the acquisition power consumption required by the sensor of the solid-state button, the lower the power consumption required for the corresponding solid-state button to collect analog signals. Therefore, according to different low-power modes, different corresponding acquisition frequencies can be set for the sensor to reduce power consumption. Thus, when the electronic device is in the low-power mode of shipping mode, the sensor corresponding to the solid-state button can adaptively drop to the corresponding first frequency and collect signals at the first frequency, so that in the shipping mode, the power consumption required by the solid-state button is reduced, thereby reducing the power consumption of the electronic device in the shipping mode and improving the battery life of the product. At the same time, the first frequency in the shipping mode is less than the second frequency in the shutdown mode, which can further optimize the power consumption in the shipping mode and improve the battery life of the product in the shipping mode.
在第一方面的另一种可能的实现方式中,在航运模式下,微控制器先控制第一传感器以小于第一频率的第三频率采集信号。在检测到用户对电源按键的第二触摸操作之后,先响应于这个第二触摸操作,第一传感器以第三频率采集这个第二触摸操作对应的触摸信号,微控制器根据这个第二触摸操作对应的触摸信号控制第一传感器以第一频率采集信号。然后,若检测到用户对电源按键的第一触摸操作,响应于这个第一触摸操作,第一传感器以第一频率采集这个第一触摸操作对应的第一触摸信号,再由微控制器根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式。In another possible implementation of the first aspect, in the shipping mode, the microcontroller first controls the first sensor to collect signals at a third frequency that is less than the first frequency. After detecting the second touch operation of the user on the power button, first responding to the second touch operation, the first sensor collects a touch signal corresponding to the second touch operation at the third frequency, and the microcontroller controls the first sensor to collect signals at the first frequency according to the touch signal corresponding to the second touch operation. Then, if the user's first touch operation on the power button is detected, responding to the first touch operation, the first sensor collects a first touch signal corresponding to the first touch operation at the first frequency, and the microcontroller switches the working mode of the electronic device from the shipping mode to the running mode according to the first touch signal corresponding to the first touch operation.
在该实现方式中,航运模式下先将传感器的采集频率降低到比第一频率还要低的第三频率,能够进一步节省航运唤醒等待过程中固态按键所需要的功耗,从而进一步减少电子设备在航运模式下的功耗,提升航运模式下的产品续航。同时,由于用于唤醒电子设备的触摸信号需要确保在一定采集频率下才能顺利采集,因此,在检测到用户对电源按键的第二触摸操作之后,微控制器先立即将采集频率从第三频率提升为第一频率,以确保之后能够顺利采集第一触摸操作对应的第一触摸信号来实现电子设备的唤醒。即,通过这种采集频率变频的方式,可以在确保航运模式下唤醒响应的同时能够节省更多的功耗,进一步提升产品续航。In this implementation, the sensor acquisition frequency is first reduced to a third frequency lower than the first frequency in the shipping mode, which can further save the power consumption required by the solid-state buttons during the shipping wake-up waiting process, thereby further reducing the power consumption of the electronic device in the shipping mode and improving the product life in the shipping mode. At the same time, since the touch signal used to wake up the electronic device needs to ensure that it can be successfully collected at a certain acquisition frequency, after detecting the user's second touch operation on the power button, the microcontroller immediately increases the acquisition frequency from the third frequency to the first frequency to ensure that the first touch signal corresponding to the first touch operation can be successfully collected to realize the wake-up of the electronic device. That is, through this acquisition frequency conversion method, more power consumption can be saved while ensuring the wake-up response in the shipping mode, further improving the product life.
在第一方面的另一种可能的实现方式中,在关机模式下,微控制器控制第一传感器以第二频率采集信号。进而,当检测到用户对电源按键的第三触摸操作之后,响应于这个第三触摸操作,第一传感器以第二频率采集这个第三触摸操作对应的第二触摸信号,再由微控制器根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从航运模式切换为运行模式。其中,第二频率小于待机模式对应的采集频率和运行模式对应的采集频率。In another possible implementation of the first aspect, in shutdown mode, the microcontroller controls the first sensor to collect signals at a second frequency. Further, after detecting a third touch operation of the user on the power button, in response to the third touch operation, the first sensor collects a second touch signal corresponding to the third touch operation at a second frequency, and the microcontroller switches the working mode of the electronic device from the shipping mode to the running mode according to the second touch signal corresponding to the third touch operation. The second frequency is less than the collection frequency corresponding to the standby mode and the collection frequency corresponding to the running mode.
在该实现方式中,与航运模式同理,当电子设备在关机模式这一低功耗模式下时,固态按键对应的传感器能够适应性降到对应的第二频率,以第二频率采集信号,使得关机模式下,固态按键所需要消耗的功耗减少,从而减少电子设备在关机模式下的功耗,提升产品续航。In this implementation, similar to the shipping mode, when the electronic device is in the low-power mode of shutdown mode, the sensor corresponding to the solid-state button can adaptively drop to the corresponding second frequency and collect signals at the second frequency, so that in shutdown mode, the power consumption required by the solid-state button is reduced, thereby reducing the power consumption of the electronic device in shutdown mode and improving product life.
在第一方面的另一种可能的实现方式中,在关机模式下,微控制器先控制第一传感器以小于第二频率的第四频率采集信号。在检测到用户对电源按键的第四触摸操作之后,先响应于这个第四触摸操作,第一传感器以第四频率采集这个第四触摸操作对应的触摸信号,微控制器根据这个第四触摸操作对应的触摸信号控制第一传感器以第二频率采集信号。然后,若检测到用户对电源按键的第三触摸操作,响应于这个第三触摸操作,第一传感器以第二频率采集这个第三触摸操作对应的第二触摸信号,再由微控制器根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从航运模式切换为运行模式。In another possible implementation of the first aspect, in shutdown mode, the microcontroller first controls the first sensor to collect signals at a fourth frequency that is less than the second frequency. After detecting a fourth touch operation of the user on the power button, first responding to the fourth touch operation, the first sensor collects a touch signal corresponding to the fourth touch operation at a fourth frequency, and the microcontroller controls the first sensor to collect signals at a second frequency according to the touch signal corresponding to the fourth touch operation. Then, if a third touch operation of the user on the power button is detected, responding to the third touch operation, the first sensor collects a second touch signal corresponding to the third touch operation at a second frequency, and the microcontroller switches the working mode of the electronic device from the shipping mode to the running mode according to the second touch signal corresponding to the third touch operation.
在该实现方式中,关机模式下先将传感器的采集频率降低到比第二频率还要低的第四频率,能够进一步节省关机唤醒等待过程中固态按键所需要的功耗,从而进一步减少电子设备在关机模式下的功耗,提升关机模式下的产品续航。同时,由于用于唤醒电子设备的触摸信号需要确保在一定采集频率下才能顺利采集,因此,在检测到用户对电源按键的第四触摸操作之后,微控制器先立即将采集频率从第四频率提升为第二频率,以确保之后能够顺利采集第三触摸操作对应的第二触摸信号来实现电子设备的唤醒。即,通过这种采集频率变频的方式,可以在确保关机模式下唤醒响应的同时能够节省更多的功耗,进一步提升产品续航。In this implementation, the acquisition frequency of the sensor is first reduced to a fourth frequency lower than the second frequency in shutdown mode, which can further save the power consumption required by the solid-state buttons during the shutdown wake-up waiting process, thereby further reducing the power consumption of the electronic device in shutdown mode and improving the product life in shutdown mode. At the same time, since the touch signal used to wake up the electronic device needs to ensure that it can be successfully collected at a certain acquisition frequency, after detecting the user's fourth touch operation on the power button, the microcontroller immediately increases the acquisition frequency from the fourth frequency to the second frequency to ensure that the second touch signal corresponding to the third touch operation can be successfully collected to realize the wake-up of the electronic device. That is, through this acquisition frequency conversion method, more power consumption can be saved while ensuring the wake-up response in shutdown mode, further improving the product life.
在第一方面的另一种可能的实现方式中,待机模式的采集频率小于运行模式的采集频率。通过进一步区分运行模式和待机模式的采集频率,能够减少待机模式下固态按键所需要的功耗,进一步减少待机模式下电子设备的功耗,提升待机模式下产品的续航。In another possible implementation of the first aspect, the acquisition frequency of the standby mode is less than the acquisition frequency of the operating mode. By further distinguishing the acquisition frequencies of the operating mode and the standby mode, the power consumption required by the solid-state buttons in the standby mode can be reduced, the power consumption of the electronic device in the standby mode can be further reduced, and the battery life of the product in the standby mode can be improved.
在第一方面的另一种可能的实现方式中,在电子设备的工作模式从航运模式切换为运行模式之后,微控制器添加非航运模式标志位,从而确保航运模式识别的实现,根据非航运模式标志位微控制器可以确定电子设备当前不处于航运模式下。In another possible implementation of the first aspect, after the working mode of the electronic device is switched from the shipping mode to the operating mode, the microcontroller adds a non-shipping mode flag to ensure the implementation of shipping mode identification. According to the non-shipping mode flag, the microcontroller can determine that the electronic device is not currently in the shipping mode.
在第一方面的另一种可能的实现方式中,电子设备的唤醒方法还包括电子设备工作模式的识别,包括航运模式和关机模式的识别。具体而言,微控制器若确定电子设备不处于运行模式或待机模式下,且不存在非航运标识,微控制器则可以确定电子设备在航运模式下。而微控制器若确定电子设备不处于运行模式或待机模式下,且存在非航运标识,微控制器则可以确定电子设备在关机模式下。其中,非航运标识包括非航运模式标志位或航运模式信号。In another possible implementation of the first aspect, the wake-up method of the electronic device further includes identifying the working mode of the electronic device, including identifying the shipping mode and the shutdown mode. Specifically, if the microcontroller determines that the electronic device is not in the running mode or the standby mode, and there is no non-shipping mark, the microcontroller can determine that the electronic device is in the shipping mode. If the microcontroller determines that the electronic device is not in the running mode or the standby mode, and there is a non-shipping mark, the microcontroller can determine that the electronic device is in the shutdown mode. The non-shipping mark includes a non-shipping mode flag or a shipping mode signal.
在第一方面的另一种可能的实现方式中,固态按键还包括非电源按键,非电源按键包括第二传感器;电子设备的唤醒方法还可以包括:在航运模式或关机模式下,微控制器控制第二传感器断电。在该实现方式中,由于唤醒响应通常是触摸电源按键实现,所以对于非电源按键(如音量按键),在航运模式和关机模式等低功耗模式下大概率是无需任何响应的,因此可以将非电源按键对应的第二传感器断电,以节省低功耗模式下第二传感器的功耗,进一步降低电子设备功耗,提升产品续航。In another possible implementation of the first aspect, the solid-state button further includes a non-power button, and the non-power button includes a second sensor; the wake-up method of the electronic device may further include: in the shipping mode or the shutdown mode, the microcontroller controls the second sensor to power off. In this implementation, since the wake-up response is usually achieved by touching the power button, for the non-power button (such as the volume button), it is highly likely that no response is required in low-power modes such as the shipping mode and the shutdown mode, so the second sensor corresponding to the non-power button can be powered off to save the power consumption of the second sensor in the low-power mode, further reduce the power consumption of the electronic device, and improve the product life.
在第一方面的另一种可能的实现方式中,为了防止用户误触唤醒,因此将电子设备从航运模式唤醒切换为运行模式的触摸信号需要满足一定的时长和/或预设要求(例如压力传感器需要有一定的按压力度)。基于此,微控制器根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式,可以包括:若第一触摸信号包括连续n个满足第一预设要求的触摸信号值,响应于第一触摸信号将电子设备的工作模式从航运模式切换为运行模式;其中,n是航运模式下电源按键所需的第一触摸时长。In another possible implementation of the first aspect, in order to prevent the user from waking up by mistake, the touch signal for waking up the electronic device from the shipping mode to the operating mode needs to meet a certain duration and/or preset requirements (for example, the pressure sensor needs to have a certain pressing force). Based on this, the microcontroller switches the operating mode of the electronic device from the shipping mode to the operating mode according to the first touch signal corresponding to the first touch operation, which may include: if the first touch signal includes n consecutive touch signal values that meet the first preset requirement, switching the operating mode of the electronic device from the shipping mode to the operating mode in response to the first touch signal; wherein n is the first touch duration required for the power button in the shipping mode.
在第一方面的另一种可能的实现方式中,同理,为了防止用户误触唤醒,电子设备从关机模式唤醒切换为运行模式的触摸信号也需要满足一定的时长和/或预设要求(例如压力传感器需要有一定的按压力度)。因此,微控制器根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从关机模式切换为运行模式,可以包括:若第二触摸信号中包括连续m个满足第二预设要求的触摸信号值,响应于第二触摸信号将电子设备的工作模式从关机模式切换为运行模式;其中,m是关机模式下电源按键所需的第二触摸时长。In another possible implementation of the first aspect, similarly, in order to prevent the user from waking up by mistake, the touch signal of the electronic device waking up and switching from the shutdown mode to the operating mode also needs to meet a certain duration and/or preset requirements (for example, the pressure sensor needs to have a certain pressing force). Therefore, the microcontroller switches the working mode of the electronic device from the shutdown mode to the operating mode according to the second touch signal corresponding to the third touch operation, which may include: if the second touch signal includes m consecutive touch signal values that meet the second preset requirement, the working mode of the electronic device is switched from the shutdown mode to the operating mode in response to the second touch signal; wherein m is the second touch duration required for the power button in the shutdown mode.
第二方面,本申请提供一种电子设备,包括:固态按键;固态按键包括微控制器、存储器以及电源按键;电源按键、存储器分别与微控制器耦合;电源按键包括第一传感器;存储器中存储一个或多个计算机程序代码,计算机程序代码包括计算机指令;当微控制器执行计算机指令时,使得电子设备执行以下步骤:In a second aspect, the present application provides an electronic device, comprising: a solid-state button; the solid-state button comprises a microcontroller, a memory, and a power button; the power button and the memory are respectively coupled to the microcontroller; the power button comprises a first sensor; the memory stores one or more computer program codes, the computer program codes comprising computer instructions; when the microcontroller executes the computer instructions, the electronic device performs the following steps:
在航运模式下,控制第一传感器以第一频率采集信号; 响应于用户对电源按键的第一触摸操作,根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式;其中,第一触摸信号由第一传感器以第一频率采集得到,第一频率小于关机模式对应的第二频率。In the shipping mode, the first sensor is controlled to collect signals at a first frequency; in response to a first touch operation of the user on the power button, the working mode of the electronic device is switched from the shipping mode to the running mode according to a first touch signal corresponding to the first touch operation; wherein the first touch signal is collected by the first sensor at a first frequency, and the first frequency is less than a second frequency corresponding to the shutdown mode.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:在航运模式下,控制第一传感器以第三频率采集信号;其中,第三频率小于第一频率;响应于用户对电源按键的第二触摸操作,控制第一传感器以第一频率采集信号;其中,第二触摸操作对应的触摸信号是第一传感器以第三频率采集的。In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by the microcontroller, the electronic device further performs the following steps: in the shipping mode, controlling the first sensor to collect signals at a third frequency; wherein the third frequency is less than the first frequency; in response to a second touch operation of the user on the power button, controlling the first sensor to collect signals at the first frequency; wherein the touch signal corresponding to the second touch operation is collected by the first sensor at the third frequency.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:在关机模式下,控制第一传感器以第二频率采集信号;响应于用户对所述电源按键的第三触摸操作,根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从关机模式切换为运行模式;其中,第二触摸信号由第一传感器以第二频率采集得到,第二频率小于待机模式和运行模式对应的采集频率。In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by the microcontroller, the electronic device further performs the following steps: in the shutdown mode, controlling the first sensor to collect signals at a second frequency; in response to the user's third touch operation on the power button, switching the working mode of the electronic device from the shutdown mode to the running mode according to the second touch signal corresponding to the third touch operation; wherein the second touch signal is collected by the first sensor at a second frequency, and the second frequency is less than the collection frequency corresponding to the standby mode and the running mode.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:在关机模式下,控制第一传感器以第四频率采集信号;其中,第四频率小于第二频率;响应于用户对电源按键的第四触摸操作,控制第一传感器以第二频率采集信号;其中,第四触摸操作对应的触摸信号是第一传感器以第四频率采集的。In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by the microcontroller, the electronic device further performs the following steps: in the shutdown mode, controlling the first sensor to collect signals at a fourth frequency; wherein the fourth frequency is less than the second frequency; in response to the user's fourth touch operation on the power button, controlling the first sensor to collect signals at the second frequency; wherein the touch signal corresponding to the fourth touch operation is collected by the first sensor at the fourth frequency.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:在电子设备的工作模式从航运模式切换为运行模式之后,添加非航运模式标志位。In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by the microcontroller, the electronic device further performs the following steps: after the working mode of the electronic device is switched from the shipping mode to the operating mode, adding a non-shipping mode flag.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:若确定电子设备不处于运行模式或待机模式下,且不存在非航运标识,确定电子设备在航运模式下;若确定电子设备不处于运行模式或待机模式下,且存在非航运标识,确定电子设备在关机模式下。其中,非航运标识包括非航运模式标志位或航运模式信号。In a possible implementation of the second aspect, when the computer instructions are executed by the microcontroller, the electronic device further performs the following steps: if it is determined that the electronic device is not in the running mode or the standby mode and there is no non-shipping mark, determine that the electronic device is in the shipping mode; if it is determined that the electronic device is not in the running mode or the standby mode and there is a non-shipping mark, determine that the electronic device is in the shutdown mode. The non-shipping mark includes a non-shipping mode flag or a shipping mode signal.
在第二方面的一种可能的实现方式中,固态按键还包括非电源按键,非电源按键包括第二传感器;当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:在航运模式或关机模式下,微控制器控制第二传感器断电。In a possible implementation of the second aspect, the solid-state button also includes a non-power button, and the non-power button includes a second sensor; when the above-mentioned computer instructions are executed by the microcontroller, the electronic device also performs the following steps: in shipping mode or shutdown mode, the microcontroller controls the second sensor to cut off power.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:若第一触摸信号包括连续n个满足第一预设要求的触摸信号值,响应于第一触摸信号将电子设备的工作模式从航运模式切换为运行模式;其中,n是航运模式下电源按键所需的第一触摸时长。In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by a microcontroller, the electronic device further performs the following steps: if the first touch signal includes n consecutive touch signal values that meet the first preset requirement, switching the working mode of the electronic device from the shipping mode to the operating mode in response to the first touch signal; wherein n is the first touch duration required for the power button in the shipping mode.
在第二方面的一种可能的实现方式中,当上述计算机指令被微控制器执行时,使得电子设备还执行以下步骤:若第二触摸信号中包括连续m个满足第二预设要求的触摸信号值,响应于第二触摸信号将电子设备的工作模式从关机模式切换为运行模式;其中,m是关机模式下电源按键所需的第二触摸时长。In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by a microcontroller, the electronic device further performs the following steps: if the second touch signal includes m consecutive touch signal values that meet the second preset requirement, in response to the second touch signal, the working mode of the electronic device is switched from the shutdown mode to the running mode; wherein m is the second touch duration required for the power button in the shutdown mode.
在第二方面的一种可能的实现方式中,电子设备还包括:一个或多个处理器,处理器与微控制器耦合;微控制器通过与处理器交互确定电子设备是否处于运行模式或待机模式;以及,在电子设备的工作模式从航运模式切换为运行模式之后,处理器向存储器中添加非航运模式标志位。In a possible implementation of the second aspect, the electronic device further includes: one or more processors, the processors being coupled to a microcontroller; the microcontroller determining whether the electronic device is in an operating mode or a standby mode by interacting with the processor; and after the operating mode of the electronic device is switched from a shipping mode to an operating mode, the processor adding a non-shipping mode flag to a memory.
在第二方面的一种可能的实现方式中,电子设备还包括:存储器包括非易失性存储器,非航运模式标志位添加到非易失性存储器中。In a possible implementation manner of the second aspect, the electronic device further includes: the memory includes a non-volatile memory, and the non-shipping mode flag is added to the non-volatile memory.
在第二方面的一种可能的实现方式中,电子设备还包括:固态按键还包括电源模块;所述电源模块用于独立为微控制器、电源按键包括的第一传感器、以及非电源按键包括的第二传感器供电。In a possible implementation of the second aspect, the electronic device further includes: the solid-state button further includes a power module; the power module is used to independently power the microcontroller, the first sensor included in the power button, and the second sensor included in the non-power button.
在第二方面的一种可能的实现方式中,电子设备还包括:固态按键还包括供电选择电路和信号调理电路;其中,供电选择电路用于进行供电选择;供电选择电路的输入与电源模块连接,输出与传感器连接;信号调理电路用于对传感器采集的触摸信号进行调理;信号调理电路的输入与传感器连接,输出与微控制器连接;其中,传感器包括电源按键对应的第一传感器和/或非电源按键对应的第二传感器。In a possible implementation of the second aspect, the electronic device also includes: the solid-state button also includes a power supply selection circuit and a signal conditioning circuit; wherein the power supply selection circuit is used to select power supply; the input of the power supply selection circuit is connected to the power module, and the output is connected to the sensor; the signal conditioning circuit is used to condition the touch signal collected by the sensor; the input of the signal conditioning circuit is connected to the sensor, and the output is connected to the microcontroller; wherein the sensor includes a first sensor corresponding to the power button and/or a second sensor corresponding to the non-power button.
第三方面,本申请一种计算机可读存储介质,其上存储有计算机程序,当计算机程序被电子设备中的处理器执行时,使得电子设备执行如第一方面及其任一种可能的实现方式的电子设备的唤醒方法。In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor in an electronic device, the electronic device executes a method for waking up an electronic device as described in the first aspect and any possible implementation thereof.
第四方面,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第一方面及其任一种可能的实现方式的电子设备的唤醒方法。该计算机可以是上述电子设备。In a fourth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method for waking up an electronic device according to the first aspect and any possible implementation thereof. The computer may be the electronic device described above.
可以理解地,上述第二方面其任一种可能的实现方式的电子设备,第三方面的计算机可读存储介质,第四方面的计算机程序产品所能达到的有益效果,可参考如第一方面及其任一种可能的实现方式中的有益效果,此处不再赘述。It can be understood that the beneficial effects that can be achieved by the electronic device of any possible implementation of the second aspect, the computer-readable storage medium of the third aspect, and the computer program product of the fourth aspect can be referred to as the beneficial effects in the first aspect and any possible implementation thereof, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种固态按键的结构示意框图;FIG1 is a schematic block diagram of the structure of a solid-state key provided in an embodiment of the present application;
图2为本申请实施例提供的一种电子设备的结构示意图;FIG2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
图3为本申请实施例提供的一种固态按键的工作模式切换的流程示意图;FIG3 is a schematic diagram of a process flow of switching working modes of a solid-state key provided in an embodiment of the present application;
图4为本申请实施例提供的一种电子设备工作模式识别的流程示意图;FIG4 is a schematic diagram of a process for identifying an operating mode of an electronic device provided in an embodiment of the present application;
图5为本申请实施例提供的一种非航运模式(off ship mode)标志位的设置流程示意图;FIG5 is a schematic diagram of a flow chart of setting an off ship mode flag provided in an embodiment of the present application;
图6为本申请实施例提供的一种航运模式信号的设置流程示意图;FIG6 is a schematic diagram of a setting flow of a shipping mode signal provided in an embodiment of the present application;
图7为本申请实施例提供的一种确定电子设备工作模式的流程示意图;FIG7 is a schematic diagram of a flow chart of determining an operating mode of an electronic device provided in an embodiment of the present application;
图8为本申请实施例提供的一种电子设备的唤醒方法的流程示意图一;FIG8 is a flowchart of a method for waking up an electronic device provided in an embodiment of the present application;
图9为本申请实施例提供的一种电子设备的唤醒方法的流程示意图二;FIG9 is a second flow chart of a method for waking up an electronic device provided in an embodiment of the present application;
图10为本申请实施例提供的一种电子设备的唤醒方法的流程示意图三;FIG10 is a third flow chart of a method for waking up an electronic device provided in an embodiment of the present application;
图11为本申请实施例提供的一种电子设备的唤醒方法的流程示意图四;FIG11 is a fourth flow chart of a method for waking up an electronic device provided in an embodiment of the present application;
图12为本申请实施例提供的一种芯片系统结构示意图。FIG12 is a schematic diagram of a chip system structure provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例的技术方案进行清楚、完整地描述。其中,在本申请实施例的描述中,以下实施例所使用的术语只是为了描述特定实施例的目的,而并非旨在对本申请的限制。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,如果采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。以及,在本申请实施例的描述中,除非另有说明,“多个”的含义表示两个或两个以上。The technical scheme of the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. Among them, in the description of the embodiment of the present application, the terms used in the following embodiments are only for the purpose of describing a specific embodiment, and are not intended to limit the present application. In addition, in order to facilitate the clear description of the technical scheme of the embodiment of the present application, in the embodiment of the present application, if the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. It can be understood by those skilled in the art that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit necessarily different. And, in the description of the embodiment of the present application, unless otherwise specified, the meaning of "multiple" means two or more.
随着电子设备的发展,目前很多电子设备(例如手机、平板电脑等)的按键(例如电源按键、音量按键等)已经从实体按键(物理按键)发展到固态按键(触摸式按键)。其中,实体按键是带有机械结构和弹性元件的按键,主要通过中断的方式实现电子设备的控制。例如,以电源按键为例,实体按键可以通过中断的方式将电子设备从航运模式(ship mode)、关机模式、待机模式等转换为运行模式。但是,固态按键是没有机械结构和弹性元件,需要通过使用传感技术实现的按键。可以简单理解为,固态按键是通过传感器来实现相应功能的按键。With the development of electronic devices, the buttons (such as power buttons, volume buttons, etc.) of many electronic devices (such as mobile phones, tablets, etc.) have evolved from physical buttons (physical buttons) to solid-state buttons (touch buttons). Among them, physical buttons are buttons with mechanical structures and elastic elements, which mainly realize the control of electronic devices through interruptions. For example, taking the power button as an example, the physical button can convert the electronic device from ship mode, shutdown mode, standby mode, etc. to operating mode through interruptions. However, solid-state buttons are buttons without mechanical structures and elastic elements, and need to be realized by using sensing technology. It can be simply understood that solid-state buttons are buttons that use sensors to realize corresponding functions.
固态按键与实体按键相比,具有更好的防水性能以及简洁的外观,是按键形态的发展趋势。然而,由于固态按键是需要配合传感器实现相应功能的按键,所以相比实体按键来说,固态按键需要传感器实现额外的模拟信号采集。这样,对于电子设备来说,就会额外增加相应的采集功耗,从而导致电子设备功耗增加、产品续航降低。Compared with physical buttons, solid-state buttons have better waterproof performance and simple appearance, and are the development trend of button form. However, since solid-state buttons need to cooperate with sensors to realize corresponding functions, compared with physical buttons, solid-state buttons require sensors to realize additional analog signal acquisition. In this way, for electronic devices, the corresponding acquisition power consumption will be increased, resulting in increased power consumption of electronic devices and reduced product life.
电子设备功耗增加和续航降低的问题,对于那些工作模式在航运模式、关机模式等低功耗模式的电子设备来说会更加明显。因为,电子设备的工作模式为航运模式和关机模式,一般表征电子设备当前需要节省功耗。此时,电子设备通常都会大部分功能都会进入休眠状态,同时电源管理模块也不再对相应的耗电元器件进行供电,以此来减少电子设备的功耗。The problem of increased power consumption and reduced battery life of electronic devices is more obvious for those electronic devices that work in low-power modes such as shipping mode and shutdown mode. Because the working modes of electronic devices are shipping mode and shutdown mode, it generally indicates that the electronic devices currently need to save power. At this time, most functions of electronic devices will usually enter a dormant state, and the power management module will no longer supply power to the corresponding power-consuming components, thereby reducing the power consumption of electronic devices.
但是,对于固态按键来说,为了保证固态按键(例如电源按键)能够正常唤醒低功耗模式下的电子设备,以触发电子设备的工作模式从低功耗模式切换为运行模式。所以,电子设备即使在航运模式和关机模式等低功耗模式下,电子设备的模拟信号采集功能也会持续运行,也就是说在低功耗模式下也会持续保证给固态按键供电。由此,固态按键在低功耗模式下所需要的功耗就会非常明显,从而导致电子设备在低功耗模式下的功耗增加,产品续航降低。However, for solid-state buttons, in order to ensure that the solid-state buttons (such as the power button) can normally wake up the electronic device in low-power mode, so as to trigger the electronic device's working mode to switch from low-power mode to running mode. Therefore, even in low-power modes such as shipping mode and shutdown mode, the electronic device's analog signal acquisition function will continue to run, that is, in low-power mode, the solid-state buttons will continue to be powered. As a result, the power consumption required by the solid-state buttons in low-power mode will be very obvious, resulting in increased power consumption of the electronic device in low-power mode and reduced product life.
同时,现有电子设备上模拟信号采集功能主要是由智能传感集线器(sensor hub)实现。但是,sensor hub在航运模式和关机模式等低功耗模式下一般处于断电状态。所以,电子设备的工作模式一旦在关机模式或航运模式等低功耗模式下,传统就不能再通过sensor hub唤醒电子设备,将电子设备的工作模式切换为运行模式。因此,传统的固态按键大多还需要增加额外的器件专用于唤醒处于航运模式和关机模式下的电子设备,从而还增加了产品成本。At the same time, the analog signal acquisition function on existing electronic devices is mainly realized by smart sensor hubs. However, the sensor hub is generally in a power-off state in low-power modes such as shipping mode and shutdown mode. Therefore, once the working mode of an electronic device is in a low-power mode such as shutdown mode or shipping mode, it is no longer possible to wake up the electronic device through the sensor hub and switch the working mode of the electronic device to the running mode. Therefore, most traditional solid-state buttons also need to add additional devices dedicated to waking up electronic devices in shipping mode and shutdown mode, which also increases product costs.
需要说明的是,上述航运模式是指电子设备出厂后在运输途中设置的低功耗模式。其主要目的是为了节省电子设备的电量,从而确保电子设备经长途运输达到用户手中之后还能够有电量供用户开机初次使用。航运模式一般只有一次,出厂前由厂商将电子设备调成航运模式。后续,电子设备一经唤醒从航运模式切换进入运行模式,电子设备就不会再进入航运模式。可以理解的,用户购机后,电子设备首次响应用户对电子设备的开机操作开机启动,这一过程可以看作是电子设备被唤醒从航运模式切换进入运行模式。It should be noted that the above-mentioned shipping mode refers to a low-power mode that is set during transportation of electronic devices after they leave the factory. Its main purpose is to save power in electronic devices, thereby ensuring that the electronic devices can still have power for the user to turn on and use for the first time after being transported over long distances. The shipping mode is generally only used once, and the manufacturer sets the electronic device to shipping mode before leaving the factory. Subsequently, once the electronic device is awakened and switched from shipping mode to operating mode, the electronic device will no longer enter shipping mode. It is understandable that after the user purchases the device, the electronic device responds to the user's power-on operation to turn on the electronic device for the first time. This process can be regarded as the electronic device being awakened and switched from shipping mode to operating mode.
基于此,本申请实施例提供了一种电子设备的唤醒方法,该方法应用于包括固态按键的电子设备。通过该方法可以降低低功耗模式下固态按键的功耗,从而减少电子设备功耗,以提升产品续航。在本申请实施例中,固态按键包括微控制器和电源按键。该电源按键包括第一传感器,用于采集电源按键上的触摸信号。Based on this, an embodiment of the present application provides a method for waking up an electronic device, which is applied to an electronic device including a solid-state button. This method can reduce the power consumption of the solid-state button in low-power mode, thereby reducing the power consumption of the electronic device to improve the battery life of the product. In an embodiment of the present application, the solid-state button includes a microcontroller and a power button. The power button includes a first sensor for collecting a touch signal on the power button.
具体而言,固态按键的传感器的采集频率越低,固态按键的传感器所需要的采集功耗越低,相应的固态按键进行模拟信号采集所需要的功耗就越低。Specifically, the lower the acquisition frequency of the sensor of the solid-state button, the lower the acquisition power consumption required by the sensor of the solid-state button, and the correspondingly lower the power consumption required by the solid-state button for analog signal acquisition.
因此,本申请实施例所提供的电子设备的唤醒方法,基于不同类型低功耗模式下电子设备的功耗需求和特性,针对各个不同类型的低功耗模式,分别为固态按键的传感器配置不同的采集频率。其中,本申请实施例中的低功耗模式包括航运模式和关机模式。Therefore, the wake-up method of the electronic device provided in the embodiment of the present application is based on the power consumption requirements and characteristics of the electronic device in different types of low power consumption modes, and configures different acquisition frequencies for the sensor of the solid-state button for each different type of low power consumption mode. Among them, the low power consumption modes in the embodiment of the present application include shipping mode and shutdown mode.
进而,只要电子设备进入到对应的低功耗模式,电子设备中的微控制器则将固态按键的传感器的采集频率适应性降低到对应的采集频率。后续,电子设备在该低功耗模式下,若检测到用户对固态按键的触摸操作,则可以响应于这个触摸操作由传感器采集对应的触摸信号(模拟信号)发送给微控制器,再由微控制器根据触摸信号将电子设备的工作模式从低功耗模式切换为运行模式,以实现电子设备从低功耗模式的唤醒。Furthermore, as long as the electronic device enters the corresponding low-power mode, the microcontroller in the electronic device will adaptably reduce the acquisition frequency of the sensor of the solid-state button to the corresponding acquisition frequency. Subsequently, when the electronic device is in this low-power mode, if the user detects a touch operation on the solid-state button, the sensor can collect the corresponding touch signal (analog signal) in response to the touch operation and send it to the microcontroller, and the microcontroller will then switch the working mode of the electronic device from the low-power mode to the running mode according to the touch signal, so as to wake up the electronic device from the low-power mode.
例如,电子设备的工作模式切换为航运模式之后,可以将电源按键的第一传感器的采集频率降低到航运模式所对应的第一频率。若在航运模式下检测到用户对电源按键的触摸操作,则可以响应于这个触摸操作,由对应的第一传感器以降低后的第一频率采集对应的触摸信号(模拟信号)送给微控制器。然后由微控制器响应于所采集的触摸信号将电子设备的工作模式从航运模式切换为运行模式,实现电子设备从航运模式的唤醒。For example, after the working mode of the electronic device is switched to the shipping mode, the acquisition frequency of the first sensor of the power button can be reduced to the first frequency corresponding to the shipping mode. If a user touch operation on the power button is detected in the shipping mode, the corresponding first sensor can respond to the touch operation and collect the corresponding touch signal (analog signal) at the reduced first frequency and send it to the microcontroller. Then, the microcontroller responds to the collected touch signal to switch the working mode of the electronic device from the shipping mode to the running mode, so as to wake up the electronic device from the shipping mode.
又例如,电子设备的工作模式切换为关机模式之后,可以将电源按键的第一传感器的采集频率降低到关机模式对应的第二频率。若在关机模式下检测到用户对电源按键的触摸操作,则可以响应于这个触摸操作,由对应的第一传感器以降低后的第二频率采集对应的触摸信号(模拟信号)送给微控制器。然后由微控制器响应于所采集的触摸信号将电子设备的工作模式从关机模式切换为运行模式,实现电子设备从关机模式的唤醒。For another example, after the working mode of the electronic device is switched to the shutdown mode, the acquisition frequency of the first sensor of the power button can be reduced to the second frequency corresponding to the shutdown mode. If the user's touch operation on the power button is detected in the shutdown mode, the corresponding first sensor can respond to the touch operation and collect the corresponding touch signal (analog signal) at the reduced second frequency and send it to the microcontroller. Then, the microcontroller switches the working mode of the electronic device from the shutdown mode to the running mode in response to the collected touch signal, so as to wake up the electronic device from the shutdown mode.
在一些实施例中,当固态按键的传感器(如电源按键的第一传感器)为压力传感器时,固态按键的传感器(如电源按键的第一传感器)所采集的触摸信号可以是连续的压力信号。In some embodiments, when the sensor of the solid-state button (such as the first sensor of the power button) is a pressure sensor, the touch signal collected by the sensor of the solid-state button (such as the first sensor of the power button) may be a continuous pressure signal.
由此,电子设备的工作模式切换为低功耗模式之后,由于固态按键的传感器的采集频率适应性降低,使得模拟信号采集功能的功耗减少。相应的,固态按键在低功耗模式下所需要消耗的功耗就会减少,从而减少了低功耗模式下电子设备的功耗,提升了产品续航。Therefore, after the working mode of the electronic device is switched to the low power mode, the power consumption of the analog signal acquisition function is reduced due to the reduced adaptability of the acquisition frequency of the sensor of the solid-state button. Accordingly, the power consumption required by the solid-state button in the low power mode will be reduced, thereby reducing the power consumption of the electronic device in the low power mode and improving the product life.
在一些实施例中,电子设备进入航运模式的目的是为了确保电子设备有足够电量保证用户可以首次开机使用,但是实际电子设备所需要历经的运输路途不定、运输时长不定。所以,为了尽可能的确保电子设备经历长途长时运输之后还有电量。本申请实施例中航运模式对应的采集频率可以进一步小于关机模式对应的采集频率。即,第一频率小于第二频率。In some embodiments, the purpose of an electronic device entering shipping mode is to ensure that the electronic device has enough power to ensure that the user can turn it on and use it for the first time, but the actual transportation route and transportation time of the electronic device are uncertain. Therefore, in order to ensure as much as possible that the electronic device still has power after a long-distance and long-term transportation. In the embodiment of the present application, the collection frequency corresponding to the shipping mode can be further less than the collection frequency corresponding to the shutdown mode. That is, the first frequency is less than the second frequency.
因此,通过进一步区分航运模式和关机模式,能够进一步优化航运模式下的功耗,在航运模式下能够节省更多的功耗,提升产品运输续航。同时,航运模式下的电子设备是还未开机使用的状态,所以航运模式下需要消耗功耗的功能模块应当会是最少的。并且,电子设备在运输途中通常是包装好的,一般情况下不会被用户接触使用。由此,即使将航运模式下的固态按键的采集频率降到最低,也不会影响电子设备的使用。因此,可以在不影响电子设备使用的情况下,达到进一步提升产品运输续航的效果。Therefore, by further distinguishing between shipping mode and shutdown mode, the power consumption in shipping mode can be further optimized, more power consumption can be saved in shipping mode, and the product transportation endurance can be improved. At the same time, the electronic device in shipping mode is not yet turned on and used, so the functional modules that need to consume power in shipping mode should be the least. In addition, electronic devices are usually packaged during transportation and are generally not touched and used by users. Therefore, even if the acquisition frequency of solid-state buttons in shipping mode is reduced to a minimum, it will not affect the use of electronic devices. Therefore, the effect of further improving the product transportation endurance can be achieved without affecting the use of electronic devices.
图1示出了一种固态按键10的结构示意框图。以下,结合图1对固态按键10进行说明。Fig. 1 shows a schematic block diagram of the structure of a solid-state key 10. The solid-state key 10 is described below in conjunction with Fig. 1 .
参考图1,本申请实施例中的固态按键10包括电源模块、微控制器和传感器模块。1 , the solid-state button 10 in the embodiment of the present application includes a power module, a microcontroller and a sensor module.
其中,传感器模块包括电源按键的第一传感器和非电源按键(如音量按键)的第二传感器。电源按键根据电子设备不同的工作模式可以具备不同的功能。例如,在航运模式和关机模式等低功耗模式下,电源按键可以用于实现电子设备的唤醒。又例如,在运行模式和待机模式下,电源按键可以用于实现电子设备的锁屏、关机等功能。而非电源按键,如音量按键则可以用于实现音量的控制,比如提高电子设备的音量和降低电子设备的音量。Among them, the sensor module includes a first sensor for a power button and a second sensor for a non-power button (such as a volume button). The power button can have different functions according to different working modes of the electronic device. For example, in low-power modes such as shipping mode and shutdown mode, the power button can be used to wake up the electronic device. For another example, in running mode and standby mode, the power button can be used to implement functions such as locking the screen and shutting down the electronic device. Non-power buttons, such as volume buttons, can be used to control the volume, such as increasing the volume of the electronic device and decreasing the volume of the electronic device.
第一传感器是用于采集电源按键上用户触摸操作对应触摸信号的传感器,第二传感器则是用于采集非电源按键上用户触摸操作对应触摸信号的传感器。其中,第一传感器和第二传感器可以分别包括一个或者多个传感器,或者可以分别包括一组或者多组传感器。The first sensor is a sensor for collecting touch signals corresponding to user touch operations on the power button, and the second sensor is a sensor for collecting touch signals corresponding to user touch operations on non-power buttons. The first sensor and the second sensor may include one or more sensors, or may include one or more groups of sensors, respectively.
例如,第一传感器可以单独由一个传感器组成,第一传感器也可以由多个传感器共同组成。又例如,第二传感器可以单独由一个传感器组成,第二传感器也可以由多个传感器共同组成。在一些实施例中,第一传感器与第二传感器的类型可以相同。For example, the first sensor may consist of one sensor alone, or may consist of multiple sensors together. For another example, the second sensor may consist of one sensor alone, or may consist of multiple sensors together. In some embodiments, the first sensor and the second sensor may be of the same type.
在一些实施例中,在电子设备所有按键都需要保持响应的情况下,例如电子设备在运行模式下,第一传感器和第二传感器都需要供电保持响应。而在一些非电源按键无需保持响应的情况下,例如电子设备在航运模式和关机模式等低功耗模式下,微控制器可以控制非电源按键对应的第二传感器断电,从而节省第二传感器的功耗。In some embodiments, when all buttons of the electronic device need to remain responsive, such as when the electronic device is in operating mode, the first sensor and the second sensor need to be powered on to remain responsive. In the case where some non-power buttons do not need to remain responsive, such as when the electronic device is in low-power modes such as shipping mode and shutdown mode, the microcontroller can control the second sensor corresponding to the non-power button to be powered off, thereby saving power consumption of the second sensor.
另外,可以理解的,固态按键10还可以包括触摸面板,相对应的,触摸面板可以包括电源按键对应的触摸面板,以及还可以包括非电源按键的触摸面板。该触摸面板可以设置在电子设备外壳表面,本申请实施例图1未示出该触摸面板。用户可以通过触摸电子设备外壳表面的触摸面板实现相应的触摸操作。In addition, it can be understood that the solid-state button 10 can also include a touch panel. Correspondingly, the touch panel can include a touch panel corresponding to the power button, and can also include a touch panel for a non-power button. The touch panel can be set on the surface of the electronic device housing, and the touch panel is not shown in FIG. 1 of the embodiment of the present application. The user can implement the corresponding touch operation by touching the touch panel on the surface of the electronic device housing.
需要说明的是,图1中的电池、电源管理模块(power management unit,PMU)、电源管理芯片(power management IC,PMIC)以及系统级芯片(system on chip technology,SOC)均为电子设备的常规配置。其中,电源管理模块PMU与电源管理芯片PMIC通过系统电源管理总线(system power management interface,SPMI)通讯。It should be noted that the battery, power management unit (PMU), power management IC (PMIC) and system on chip (SOC) in Figure 1 are all common configurations of electronic devices. Among them, the power management module PMU communicates with the power management chip PMIC through the system power management bus (SPMI).
固态按键10的电源模块从电池直接供电,独立于电子设备中的电源管理模块PMU。也就是说,固态按键10的电源模块从电池直接供电,并经由电源模块给传感器模块和微控制器供电。由此,在电子设备处于航运模式和关机模式等低功耗模式时,固态按键10也能够通过独立的电源模块对固态按键10的微控制器和传感器模块进行供电,从而保证低功耗模式下固态按键10能够响应用户的触摸操作,以实现电子设备的唤醒。The power module of the solid-state button 10 is powered directly from the battery and is independent of the power management module PMU in the electronic device. In other words, the power module of the solid-state button 10 is powered directly from the battery and supplies power to the sensor module and the microcontroller via the power module. Therefore, when the electronic device is in a low-power mode such as a shipping mode and a shutdown mode, the solid-state button 10 can also power the microcontroller and the sensor module of the solid-state button 10 through an independent power module, thereby ensuring that the solid-state button 10 can respond to the user's touch operation in the low-power mode to wake up the electronic device.
如图1所示,电源0是指电池直接供电给电源模块,电源2和电源3是经由电源模块分别给固态按键10的传感器模块和微控制器供电。可以理解的,固态按键10能够通过电源模块独立进行供电,使得固态按键10在低功耗模式下也能保持运行,是电子设备从航运模式和关机模式下可以被唤醒的前提条件。As shown in FIG1 , power source 0 refers to the battery directly supplying power to the power module, and power sources 2 and 3 respectively supply power to the sensor module and the microcontroller of the solid-state key 10 via the power module. It can be understood that the solid-state key 10 can be independently powered by the power module, so that the solid-state key 10 can also keep running in the low power consumption mode, which is a prerequisite for the electronic device to be awakened from the shipping mode and the shutdown mode.
同时,由于不同模块所需供电电压可能不同,所以图1以电源0、电源2和电源3区分固态按键10中不同模块的供电电源。当然,固态按键10中不同模块所需供电电压也可以完全相同,例如可以是电源0=电源2=电源3。可以理解的,电源的具体设定根据电子设备的实际电路设计决定,本申请实施例对此不作任何限定。At the same time, since different modules may require different power supply voltages, FIG1 uses power supply 0, power supply 2, and power supply 3 to distinguish the power supply of different modules in the solid-state key 10. Of course, the power supply voltages required by different modules in the solid-state key 10 may also be completely the same, for example, power supply 0 = power supply 2 = power supply 3. It can be understood that the specific setting of the power supply is determined according to the actual circuit design of the electronic device, and the embodiment of the present application does not impose any limitation on this.
另外,图1中电源1用于表征电池提供给电源管理模块PMU的供电电源。在一些实施例中,电源1可以等于电源0、电源2以及电源3,即电源0=电源1=电源2=电源3。In addition, power supply 1 in Fig. 1 is used to represent the power supply provided by the battery to the power management module PMU. In some embodiments, power supply 1 can be equal to power supply 0, power supply 2 and power supply 3, that is, power supply 0=power supply 1=power supply 2=power supply 3.
在一些实施例中,固态按键10的传感器模块除了包括传感器(包括第一传感器和第二传感器)以外,还可以包括与传感器连接的供电选择电路、信号调理电路等电路。In some embodiments, the sensor module of the solid-state button 10 may include, in addition to the sensor (including the first sensor and the second sensor), a power supply selection circuit, a signal conditioning circuit and other circuits connected to the sensor.
其中,供电选择电路用于进行供电选择。信号调理电路是用于对传感器(包括第一传感器和第二传感器)采集的触摸信号(模拟信号)进行调理的电路,从而使得传感器所采集的触摸信号(模拟信号)能够适合后续电路处理。The power supply selection circuit is used for power supply selection. The signal conditioning circuit is a circuit for conditioning the touch signal (analog signal) collected by the sensor (including the first sensor and the second sensor), so that the touch signal (analog signal) collected by the sensor can be suitable for subsequent circuit processing.
具体的,供电选择电路的输入可以与电源模块连接,供电选择电路的输出可以分别与第一传感器以及第二传感器连接。信号调理电路的输入可以分别与第一传感器、第二传感器连接,信号调理电路的输出可以与微控制器连接。Specifically, the input of the power supply selection circuit can be connected to the power supply module, and the output of the power supply selection circuit can be connected to the first sensor and the second sensor respectively. The input of the signal conditioning circuit can be connected to the first sensor and the second sensor respectively, and the output of the signal conditioning circuit can be connected to the microcontroller.
在一些实施例中,传感器模块中的传感器(包括第一传感器和第二传感器)可以是压力传感器。在传感器是压力传感器的情况下,用户在触摸按压固态按键的时候,固态按键可以通过采集用户的压力信号(模拟信号)来实现电子设备的唤醒。In some embodiments, the sensor (including the first sensor and the second sensor) in the sensor module may be a pressure sensor. When the sensor is a pressure sensor, when the user touches and presses the solid-state button, the solid-state button can wake up the electronic device by collecting the user's pressure signal (analog signal).
例如,在用户触摸按压电源按键(可以是触摸按压电源按键的触摸面板)时,电源按键对应的第一传感器采集用户的压力信号并通过信号调理电路对这个压力信号(模拟信号)进行调理之后,可以将调理后的这个压力信号(模拟信号)传输到微控制器。再由微控制器根据这个压力信号(模拟信号)决定是否将电子设备的工作模式从低功耗模式切换为运行模式,以唤醒电子设备。For example, when a user touches and presses a power button (it may be a touch panel that touches and presses the power button), the first sensor corresponding to the power button collects the user's pressure signal and conditions the pressure signal (analog signal) through a signal conditioning circuit, and then transmits the conditioned pressure signal (analog signal) to a microcontroller. The microcontroller then decides whether to switch the working mode of the electronic device from a low power mode to a running mode based on the pressure signal (analog signal) to wake up the electronic device.
另外,压力传感器可以是电阻压力传感器,也可以是电容压力传感器,具体可以根据实际需求设定,本申请实施例对此不作任何限定。In addition, the pressure sensor can be a resistive pressure sensor or a capacitive pressure sensor, and can be set specifically according to actual needs. The embodiments of the present application do not impose any limitations on this.
需要说明的是,固态按键的传感器除了可以是压力传感器,还可以是其他类型的传感器,例如还可以是光电传感器。可以理解的,传感器的类型具体取决于实际电子设备的产品配置。若固态按键的传感器是光电传感器,那么固态按键的传感器可以采集连续的光信号。It should be noted that the sensor of the solid-state button can be not only a pressure sensor, but also other types of sensors, such as a photoelectric sensor. It is understandable that the type of sensor depends on the product configuration of the actual electronic device. If the sensor of the solid-state button is a photoelectric sensor, then the sensor of the solid-state button can collect continuous light signals.
在一些实施例中,信号调理电路可以包括滤波器、放大器等,具体可以根据实际需求配置,本申请实施例对此不作任何限定。例如,若由压力传感器采集压力信号,信号调理电路则对压力信号进行滤波、放大等调理。又例如,若由光电传感器采集光信号,信号调理电路则对光信号进行滤波、放大等调理。In some embodiments, the signal conditioning circuit may include a filter, an amplifier, etc., which may be configured according to actual needs, and the embodiments of the present application do not impose any limitation on this. For example, if a pressure sensor collects a pressure signal, the signal conditioning circuit filters, amplifies, and conditions the pressure signal. For another example, if a photoelectric sensor collects an optical signal, the signal conditioning circuit filters, amplifies, and conditions the optical signal.
固态按键10的微控制器可以是微控制单元(microcontroller unit,MCU)、单片机、数字信号处理器(digital signal processor,DSP)等类型的芯片,微控制器可以根据实际需求配置,本申请实施例对微控制器的具体类型不作任何限定。The microcontroller of the solid-state button 10 can be a microcontroller unit (MCU), a single-chip microcomputer, a digital signal processor (DSP) and other types of chips. The microcontroller can be configured according to actual needs. The embodiment of the present application does not impose any limitation on the specific type of the microcontroller.
在本申请实施例中,固态按键10的微控制器主要负责传感器模块的供电控制、工作模式识别、工作模式切换等功能。In the embodiment of the present application, the microcontroller of the solid-state button 10 is mainly responsible for the power supply control, working mode identification, working mode switching and other functions of the sensor module.
如图1所示,微控制器可以通过电平控制信号,向电源管理模块PMU发出控制信号,以控制电子设备工作模式的切换。例如,微控制器根据传感器模块采集的触摸信号确定电子设备可以从航运模式或关机模式等低功耗模式被唤醒,将电子设备的工作模式切换为运行模式时,微控制器则可以向电源管理模块PMU发出电平控制信号,使得电源管理模块PMU开始给系统级芯片SOC以及电子设备中的其他功能模块进行供电,此时电子设备进入运行模式。As shown in FIG1 , the microcontroller can send a control signal to the power management module PMU through a level control signal to control the switching of the working mode of the electronic device. For example, the microcontroller determines that the electronic device can be awakened from a low-power mode such as a shipping mode or a shutdown mode based on the touch signal collected by the sensor module, and when the working mode of the electronic device is switched to the running mode, the microcontroller can send a level control signal to the power management module PMU, so that the power management module PMU starts to supply power to the system-level chip SOC and other functional modules in the electronic device, and the electronic device enters the running mode.
在一些实施例中,系统级芯片SOC随着电子设备工作模式的改变,可以相应进入对应的工作状态。例如,工作状态包括与运行模式对应的运行状态、与待机模式对应的待机状态等。In some embodiments, the system-on-chip (SOC) may enter a corresponding working state as the working mode of the electronic device changes. For example, the working state includes a running state corresponding to the running mode, a standby state corresponding to the standby mode, and the like.
系统级芯片SOC每一种工作状态下可以有特定的功能和使用场景。通过合理切换系统级芯片SOC的工作状态,可以实现系统级芯片SOC的低功耗。系统级芯片SOC各种工作状态的切换可以由为其供电的电源管理模块PMU实现。Each working state of the system-level chip SOC can have specific functions and usage scenarios. By reasonably switching the working state of the system-level chip SOC, low power consumption of the system-level chip SOC can be achieved. The switching of various working states of the system-level chip SOC can be realized by the power management module PMU that powers it.
例如,在运行状态下,电子设备各项功能都是响应可执行的,因此为了使得系统级芯片SOC可以实现多种不同任务和功能,电源管理模块PMU控制系统级芯片SOC进入运行状态。在运行状态下,电源管理模块PMU保持为系统级芯片SOC中各个功能模块供电,从而保证各功能模块处于响应状态。For example, in the running state, all functions of the electronic device are responsive and executable, so in order to enable the system-on-chip SOC to achieve a variety of different tasks and functions, the power management module PMU controls the system-on-chip SOC to enter the running state. In the running state, the power management module PMU maintains power supply to each functional module in the system-on-chip SOC, thereby ensuring that each functional module is in a responsive state.
又例如,电子设备在待机模式下,电源管理模块PMU控制系统级芯片SOC进入对应的待机状态,电源管理模块PMU可以只保证部分SOC中部分功能模块的供电,例如供电保证可以迅速响应外部事件的触发。For another example, when the electronic device is in standby mode, the power management module PMU controls the system-on-chip SOC to enter the corresponding standby state. The power management module PMU can only guarantee the power supply of some functional modules in some SOCs, for example, the power supply guarantee can quickly respond to the triggering of external events.
因此,在本申请实施例中,微控制器还可以通过I2C/SPI等通讯总线与系统级芯片SOC通讯来确定电子设备是否处于运行模式和待机模式。即,微控制器通过I2C/SPI等通讯总线与系统级芯片SOC通讯,获取系统级芯片SOC的工作状态。根据系统级芯片SOC的工作状态判断电子设备的工作状态。例如,若系统级芯片SOC的工作状态是运行状态,那么微控制器可以确定电子设备在运行模式。若系统级芯片SOC的工作状态是待机状态,那么微控制器可以确定电子设备在待机模式。Therefore, in an embodiment of the present application, the microcontroller can also communicate with the system-on-chip SOC through a communication bus such as I2C/SPI to determine whether the electronic device is in an operating mode and a standby mode. That is, the microcontroller communicates with the system-on-chip SOC through a communication bus such as I2C/SPI to obtain the working state of the system-on-chip SOC. The working state of the electronic device is judged according to the working state of the system-on-chip SOC. For example, if the working state of the system-on-chip SOC is an operating state, then the microcontroller can determine that the electronic device is in an operating mode. If the working state of the system-on-chip SOC is a standby state, then the microcontroller can determine that the electronic device is in standby mode.
另外,微控制器还可以通过I2C/SPI等通讯总线与系统级芯片SOC直接通讯,从而将传感器所采集的数据以及一些行为识别结果发送到系统级芯片SOC,在此基础上可以实现更多的特性功能。In addition, the microcontroller can also communicate directly with the system-on-chip SOC through communication buses such as I2C/SPI, thereby sending the data collected by the sensor and some behavior recognition results to the system-on-chip SOC, on this basis, more feature functions can be realized.
由此可见,本申请实施例所提供的固态按键,即使在低功耗模式下也能够通过独立的电源模式持续对微控制器进行供电,从而在不增加额外器件的情况下,也能在低功耗模式下也实现电子设备的唤醒,降低产品成本。It can be seen that the solid-state button provided in the embodiment of the present application can continuously power the microcontroller through an independent power supply mode even in low power consumption mode, thereby realizing the wake-up of the electronic device in low power consumption mode without adding additional components, thereby reducing product costs.
上述电子设备可以是包括如图1所示固态按键10的手机、可折叠电子设备、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、蜂窝电话、个人数字助理(personal digitalassistant,PDA)、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence, AI)设备、可穿戴式设备、车载设备、智能家居设备、或智慧城市设备中的至少一种。本申请实施例对该电子设备的具体类型不作特殊限制。The electronic device may be at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, or a smart city device, including the solid-state button 10 shown in FIG1 . The embodiment of the present application does not impose any special restrictions on the specific type of the electronic device.
图2示出了一种电子设备100的结构示意图。FIG. 2 shows a schematic structural diagram of an electronic device 100 .
电子设备100可以包括处理器110(如图1的系统级芯片SOC),外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接头130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,固态按键190(如图1的固态按键10),马达191,指示器192,摄像模组193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。The electronic device 100 may include a processor 110 (such as a system-on-chip SOC in FIG. 1 ), an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 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 solid-state button 190 (such as the solid-state button 10 in FIG. 1 ), a motor 191, an indicator 192, a camera module 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。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.
固态按键190(如图1的固态按键10)可以包括微控制器、电源模块和传感器(包括第一传感器和第二传感器)。固态按键190的电源模块与电池142连接,从电池142直接供电,独立为固态按键190的微控制器和传感器供电。The solid-state button 190 (such as the solid-state button 10 of FIG. 1 ) may include a microcontroller, a power module, and a sensor (including a first sensor and a second sensor). The power module of the solid-state button 190 is connected to the battery 142 , and is directly powered by the battery 142 , and independently powers the microcontroller and the sensor of the solid-state button 190 .
固态按键190的传感器(包括第一传感器和第二传感器)用于采集用户对固态按键进行触摸操作产生的触摸信号。在一些实施例中,固态按键190的传感器(包括第一传感器和第二传感器)可以是压力传感器。压力传感器用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器,电极之间的电容改变。微控制器根据电容的变化确定压力的强度。当有触摸操作作用于固态按键190,微控制器根据压力传感器检测该触摸操作的按压强度。The sensor (including the first sensor and the second sensor) of the solid-state button 190 is used to collect the touch signal generated by the user's touch operation on the solid-state button. In some embodiments, the sensor (including the first sensor and the second sensor) of the solid-state button 190 can be a pressure sensor. The pressure sensor is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, there are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The microcontroller determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the solid-state button 190, the microcontroller detects the pressing intensity of the touch operation based on the pressure sensor.
例如,触摸操作产生的第一触摸信号有连续n个按压强度大于第一压力阈值的信号值,从航运模式切换进入运行模式。又例如,触摸操作产生的第二触摸信号有连续m个按压强度大于第一压力阈值的信号值,从关机模式切换进入运行模式。For example, if the first touch signal generated by the touch operation has a signal value of n consecutive pressing strengths greater than the first pressure threshold, the mode is switched from the shipping mode to the running mode. For another example, if the second touch signal generated by the touch operation has a signal value of m consecutive pressing strengths greater than the first pressure threshold, the mode is switched from the shutdown mode to the running mode.
固态按键190的微控制器主要负责传感器的供电控制,工作模式识别、工作模式切换等功能。例如,在低功耗模式下,固态按键190的微控制器可以控制非电源按键对应的第二传感器断电以节省功耗。对于电源按键对应的第一传感器,低功耗模式下,固态按键190的微控制器可以相应控制第一传感器降低采集频率,从而控制第一传感器以降低后的采集频率采集信号。即,航运模式下控制第一传感器以第一频率采集信号,关机模式下控制第一传感器以第二频率采集信号。或者,在运行模式下,电源按键对应的第一传感器和非电源按键对应的第二传感器都保持响应。电源按键可以实现锁屏、关机等功能。非电源按键,如音量按键可以实现电子设备音量的增减功能。The microcontroller of the solid-state button 190 is mainly responsible for the power supply control of the sensor, working mode identification, working mode switching and other functions. For example, in low power mode, the microcontroller of the solid-state button 190 can control the second sensor corresponding to the non-power button to power off to save power. For the first sensor corresponding to the power button, in low power mode, the microcontroller of the solid-state button 190 can control the first sensor to reduce the acquisition frequency accordingly, thereby controlling the first sensor to collect signals at the reduced acquisition frequency. That is, in shipping mode, the first sensor is controlled to collect signals at a first frequency, and in shutdown mode, the first sensor is controlled to collect signals at a second frequency. Alternatively, in operating mode, the first sensor corresponding to the power button and the second sensor corresponding to the non-power button both remain responsive. The power button can realize functions such as locking the screen and shutting down. Non-power buttons, such as volume buttons, can realize the function of increasing and decreasing the volume of electronic devices.
又例如,根据电源按键对应第一传感器采集的触摸信号,固态按键190的微控制器可以控制电子设备的工作模式从低功耗模式切换为运行模式,从而实现电子设备的唤醒。而电子设备工作模式的识别,固态按键190的微控制器可以通过与处理器110通讯,根据处理器110的工作状态确定。For another example, according to the touch signal collected by the first sensor corresponding to the power button, the microcontroller of the solid-state button 190 can control the working mode of the electronic device to switch from the low power mode to the running mode, thereby waking up the electronic device. The microcontroller of the solid-state button 190 can communicate with the processor 110 to determine the working mode of the electronic device according to the working state of the processor 110.
可以理解的,固态按键190的微控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。具体到本申请实施例,可以由固态按键190的微控制器实现本申请实施例所提供的电子设备的唤醒方法。It is understandable that the microcontroller of the solid-state button 190 can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions. Specifically in the embodiment of the present application, the microcontroller of the solid-state button 190 can implement the wake-up method of the electronic device provided in the embodiment of the present application.
固态按键190的微控制器中还可以设置存储器,用于存储指令和数据。在一些实施例中,微控制器中的存储器可以是非易失性存储器。该非易失性存储器中可以存储非航运模式标志位,从而确保非航运模式标志位不易丢失。A memory may also be provided in the microcontroller of the solid-state button 190 for storing instructions and data. In some embodiments, the memory in the microcontroller may be a non-volatile memory. The non-volatile memory may store a non-shipping mode flag, thereby ensuring that the non-shipping mode flag is not easily lost.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。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 video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. The processor may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。处理器110可以通过以上至少一种接口连接触摸传感器、音频模块、无线通信模块、显示屏、摄像模组等模块。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc. The processor 110 may be connected to a touch sensor, an audio module, a wireless communication module, a display screen, a camera module, and the like through at least one of the above interfaces.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。或将音乐,视频等文件从电子设备传输至外部存储卡中。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. For example, files such as music and videos are stored in the external memory card. Or files such as music and videos are transferred from the electronic device to the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能方法或数据处理。The internal memory 121 can be used to store computer executable program codes, which include instructions. 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 created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. 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 (UFS), etc. The processor 110 executes various functional methods or data processing of the electronic device 100 by running instructions stored in the internal memory 121, and/or instructions stored in a memory provided in the processor.
USB接头130是一种符合USB标准规范的接口,可以用于连接电子设备100和外围设备,具体可以是Mini USB接头,Micro USB接头,USB Type C接头等。The USB connector 130 is an interface that complies with USB standard specifications and can be used to connect the electronic device 100 and peripheral devices. Specifically, it can be a Mini USB connector, a Micro USB connector, a USB Type C connector, etc.
充电管理模块140用于接收充电器的充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。电源管理模块141(如图1所示电源管理模块PMU)用于连接电池142,充电管理模块140与处理器110。The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. The power management module 141 (the power management module PMU shown in FIG. 1 ) is used to connect the battery 142 , the charging management module 140 and the processor 110 .
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。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.
电子设备100可以通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。显示屏194用于显示图像,视频等。The electronic device 100 can realize the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 194 is used to display images, videos, etc.
电子设备100可以通过摄像模组193,ISP,视频编解码器,GPU,显示屏194以及应用处理器AP、神经网络处理器NPU等实现摄像功能。The electronic device 100 can realize the camera function through the camera module 193, ISP, video codec, GPU, display screen 194, application processor AP, neural network processor NPU, etc.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card.
需要说明的是,以下实施例中的电子设备的唤醒方法均可以在具备上述硬件结构的电子设备100中实现。It should be noted that the wake-up methods of electronic devices in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.
在一些实施例中,为了降低固态按键所需功耗(即降低模拟信号采集功能所需功耗)的同时,能够保证固态按键的响应速度。本申请实施例对应于电子设备的四种不同工作模式,将固态按键的工作模式也划分四种。即,固态按键的这四种工作模式分别是航运模式、关机模式、待机模式和运行模式。在本申请实施例中,这四种工作模式的区别在于传感器的采集频率不同、保持供电和信号采集的传感器数量不同。In some embodiments, in order to reduce the power consumption required for the solid-state button (i.e., reduce the power consumption required for the analog signal acquisition function), the response speed of the solid-state button can be guaranteed. The embodiment of the present application corresponds to four different working modes of the electronic device, and the working modes of the solid-state button are also divided into four types. That is, the four working modes of the solid-state button are shipping mode, shutdown mode, standby mode and operation mode. In the embodiment of the present application, the difference between these four working modes is that the acquisition frequency of the sensor is different and the number of sensors that maintain power supply and signal acquisition is different.
并且,根据所需响应速度、实际工作需求、功耗节省需求,以及如上所述航运模式可以与关机模式进一步区分以在航运模式下节省更多的功耗,这四种工作模式对应的采集频率呈递增状态。即,航运模式的采集频率小于关机模式的采集频率,关机模式的采集频率小于待机模式的采集频率,而待机模式的采集频率小于运行模式的采集频率。Furthermore, according to the required response speed, actual working requirements, power saving requirements, and the fact that the shipping mode can be further distinguished from the shutdown mode as described above to save more power in the shipping mode, the acquisition frequencies corresponding to the four working modes are in an increasing state. That is, the acquisition frequency of the shipping mode is less than the acquisition frequency of the shutdown mode, the acquisition frequency of the shutdown mode is less than the acquisition frequency of the standby mode, and the acquisition frequency of the standby mode is less than the acquisition frequency of the running mode.
本申请实施例固态按键的这四种工作模块所对应的采集频率、传感器数量、平均电流等可以参考如下表1所示。The acquisition frequency, number of sensors, average current, etc. corresponding to the four working modules of the solid-state button in the embodiment of the present application can be referred to as shown in the following Table 1.
表1Table 1
其中,表1所示的采集传感器是指固态按键中的传感器。电子设备处于不同的工作模式下,固态按键中工作的采集传感器的数量不同。采集传感器数量即为对应模式下供电保持运行和信号采集的传感器的数量。例如,在运行模式下,此时电子设备所有的功能模块都是供电运行状态,因此固态按键所有的传感器都要处于供电运行中。例如,电源按键对应的第一传感器需要供电处于运行状态,以随时响应于用户的触摸操作实现锁屏、关机等功能。而非电源按键(如音量按键)对应的第二传感器也需要供电处于运行状态,以随时响应于用户的触摸操作实现相应的按键功能(如实现电子设备音量增减功能)。因此,如表1所示,此时采集传感器数量是最大数量。而最大数量的具体数量值取决于电子设备中固态按键实际所包括的传感器的数量,本申请实施例对此不作任何限定。Among them, the acquisition sensors shown in Table 1 refer to the sensors in the solid-state buttons. When the electronic device is in different working modes, the number of acquisition sensors working in the solid-state buttons is different. The number of acquisition sensors is the number of sensors that are powered to maintain operation and signal acquisition in the corresponding mode. For example, in the operating mode, all functional modules of the electronic device are powered on and running, so all sensors of the solid-state buttons must be powered on and running. For example, the first sensor corresponding to the power button needs to be powered on and in the running state to respond to the user's touch operation at any time to realize functions such as lock screen and shutdown. The second sensor corresponding to the non-power button (such as the volume button) also needs to be powered on and in the running state to respond to the user's touch operation at any time to realize the corresponding button function (such as realizing the volume increase and decrease function of the electronic device). Therefore, as shown in Table 1, the number of acquisition sensors at this time is the maximum number. The specific value of the maximum number depends on the number of sensors actually included in the solid-state button in the electronic device, and the embodiment of the present application does not impose any limitation on this.
又例如,关机模式和航运模式下,为了减少功耗,电子设备大部分功能模块都处于断电状态,可以只对唤醒所需功能模块进行供电。因此,固态按键的传感器可以只保留1个处于运行状态,即保留用于唤醒电子设备的电源按键对应的第一传感器。此时,只有第一传感器保持供电,如表1所示,采集传感器数量为1。For another example, in shutdown mode and shipping mode, in order to reduce power consumption, most functional modules of the electronic device are in a power-off state, and only the functional modules required for awakening can be powered. Therefore, only one sensor of the solid-state button can be kept in an operating state, that is, the first sensor corresponding to the power button for awakening the electronic device is kept. At this time, only the first sensor remains powered, as shown in Table 1, and the number of acquisition sensors is 1.
需要说明的是,表1中的采集频率、采集传感器数量等为本申请实施例的一种示例,其可以根据实际需求进行修改配置,表1并不对其构成任何限定。例如,关机模式下采集传感器的数量还可以配置为2。又例如,本申请实施例固态按键的这四种工作模块所对应的采集频率、传感器数量、平均电流等还可以参考如下表2所示。It should be noted that the acquisition frequency, number of acquisition sensors, etc. in Table 1 are examples of the embodiments of the present application, which can be modified and configured according to actual needs, and Table 1 does not constitute any limitation thereto. For example, the number of acquisition sensors in shutdown mode can also be configured to 2. For another example, the acquisition frequency, number of sensors, average current, etc. corresponding to the four working modules of the solid-state button in the embodiment of the present application can also be referred to as shown in Table 2 below.
表2Table 2
可以理解的,只需要所配置的参数可以保证响应速度,并且保证四种工作模式按照上述描述使得采集频率呈递增即可。It can be understood that it is only necessary that the configured parameters can ensure the response speed and ensure that the four working modes increase the acquisition frequency in a progressive manner according to the above description.
具体而言,固态按键的微控制器可以通过判断电子设备的工作模式来决定固态按键所切换的工作模式,进而微控制器再控制固态按键的传感器的采集频率,以降低固态按键的传感器的采集频率来减少固态按键所需的采集功耗,从而减少电子设备的功耗,提升产品续航。Specifically, the microcontroller of the solid-state button can determine the working mode to be switched by the solid-state button by judging the working mode of the electronic device, and then the microcontroller controls the acquisition frequency of the sensor of the solid-state button to reduce the acquisition frequency of the sensor of the solid-state button to reduce the acquisition power consumption required by the solid-state button, thereby reducing the power consumption of the electronic device and improving the battery life of the product.
例如,如果电子设备的工作模式切换为航运模式,固态按键的工作模式相应切换为航运模式,从而微控制器控制传感器的采集频率降低到航运模式所对应的采集频率。又例如,如果电子设备的工作模式切换为关机模式,固态按键的工作模式相应切换为关机模式,从而微控制器可以控制传感器的采集频率降低到关机模式所对应的采集频率。For example, if the working mode of the electronic device is switched to the shipping mode, the working mode of the solid-state button is correspondingly switched to the shipping mode, so that the microcontroller controls the sensor's acquisition frequency to be reduced to the acquisition frequency corresponding to the shipping mode. For another example, if the working mode of the electronic device is switched to the shutdown mode, the working mode of the solid-state button is correspondingly switched to the shutdown mode, so that the microcontroller can control the sensor's acquisition frequency to be reduced to the acquisition frequency corresponding to the shutdown mode.
如图3所示,示出了一种固态按键的工作模式切换的流程图。以下,结合图3对固态按键的工作模式切换流程进行说明。As shown in Fig. 3, a flow chart of switching the working mode of a solid-state key is shown. In the following, the process of switching the working mode of a solid-state key is described in conjunction with Fig. 3.
参考图3,固态按键的微控制器首先判断电子设备的工作模式。然后,由于电子设备同一时间只能以一种工作模式运行,所以固态按键的微控制器可以根据所判断的电子设备的工作模式,相应控制固态按键进入对应的工作模式。Referring to Figure 3, the microcontroller of the solid-state key first determines the working mode of the electronic device. Then, since the electronic device can only operate in one working mode at the same time, the microcontroller of the solid-state key can control the solid-state key to enter the corresponding working mode according to the determined working mode of the electronic device.
具体的,固态按键的微控制器若判断电子设备的工作模式在运行模式,相应的,固态按键进入运行模式。即,固态按键的微控制器保持给所有传感器供电,并控制传感器将采集频率设为运行模式对应的采集频率(第六频率),例如表1中的80~100Hz(第六频率)。Specifically, if the microcontroller of the solid-state button determines that the working mode of the electronic device is in the running mode, the solid-state button enters the running mode accordingly. That is, the microcontroller of the solid-state button keeps powering all sensors and controls the sensors to set the acquisition frequency to the acquisition frequency (sixth frequency) corresponding to the running mode, such as 80-100 Hz (sixth frequency) in Table 1.
也就是说,运行模式下,微控制器可以控制传感器以第六频率采集信号。在一些实施例中,运行模式下,微控制器可以控制电源按键对应的第一传感器以第六频率采集信号。同时,微控制器可以控制非电源按键对应的第二传感器以第六频率采集信号。That is, in the operating mode, the microcontroller can control the sensor to collect signals at the sixth frequency. In some embodiments, in the operating mode, the microcontroller can control the first sensor corresponding to the power button to collect signals at the sixth frequency. At the same time, the microcontroller can control the second sensor corresponding to the non-power button to collect signals at the sixth frequency.
同理,固态按键的微控制器若判断电子设备的工作模式在待机模式,相应的,固态按键进入待机模式。固态按键的微控制器保持给所有传感器供电,并控制传感器将采集频率设为待机模式对应的采集频率(第五频率),例如表1中的30~50Hz(第五频率),此时固态按键进入待机模式。Similarly, if the microcontroller of the solid-state button determines that the working mode of the electronic device is in the standby mode, the solid-state button enters the standby mode accordingly. The microcontroller of the solid-state button keeps powering all sensors and controls the sensors to set the acquisition frequency to the acquisition frequency (fifth frequency) corresponding to the standby mode, such as 30 to 50 Hz (fifth frequency) in Table 1, and the solid-state button enters the standby mode.
也就是说,待机模式下,微控制器可以控制传感器以第五频率采集信号。在一些实施例中,待机模式下,微控制器可以控制电源按键对应的第一传感器以第五频率采集信号。同时,微控制器可以控制非电源按键对应的第二传感器以第五频率采集信号。That is, in standby mode, the microcontroller can control the sensor to collect signals at the fifth frequency. In some embodiments, in standby mode, the microcontroller can control the first sensor corresponding to the power button to collect signals at the fifth frequency. At the same time, the microcontroller can control the second sensor corresponding to the non-power button to collect signals at the fifth frequency.
固态按键的微控制器若判断电子设备的工作模式在关机模式,相应的,固态按键进入关机模式。固态按键的微控制器控制传感器将采集频率设为关机模式对应的采集频率(第二频率),例如表1中的1~2Hz(第二频率),此时固态按键进入关机模式。If the microcontroller of the solid-state button determines that the working mode of the electronic device is in the shutdown mode, the solid-state button enters the shutdown mode accordingly. The microcontroller of the solid-state button controls the sensor to set the acquisition frequency to the acquisition frequency (second frequency) corresponding to the shutdown mode, such as 1 to 2 Hz (second frequency) in Table 1, and the solid-state button enters the shutdown mode.
也就是说,关机模式下,微控制器可以控制传感器以第二频率采集信号。例如,在一些实施例中,关机模式下,微控制器可以控制电源按键对应的第一传感器以第二频率采集信号。同时,微控制器可以控制非电源按键对应的第二传感器以第二频率采集信号。That is, in shutdown mode, the microcontroller can control the sensor to collect signals at the second frequency. For example, in some embodiments, in shutdown mode, the microcontroller can control the first sensor corresponding to the power button to collect signals at the second frequency. At the same time, the microcontroller can control the second sensor corresponding to the non-power button to collect signals at the second frequency.
又例如,在另一些实施例中,由于关机模式下可能只需要电源按键能保持响应即可,因此在关机模式下,为了保证固态按键响应的同时进一步节省固态按键的功耗,固态按键的微控制器还可以对传感器进行供电控制。因此,关机模式下,微控制器控制电源按键对应的第一传感器以第二频率采集信号的同时,微控制器控制非电源按键对应的第二传感器断电。For another example, in some other embodiments, since only the power button may need to remain responsive in shutdown mode, in order to ensure the solid-state button response while further saving the power consumption of the solid-state button, the microcontroller of the solid-state button can also control the power supply of the sensor. Therefore, in shutdown mode, while the microcontroller controls the first sensor corresponding to the power button to collect signals at the second frequency, the microcontroller controls the second sensor corresponding to the non-power button to be powered off.
固态按键的微控制器若判断电子设备的工作模式在航运模式,相应的,固态按键进入航运模式。固态按键的微控制器控制传感器将采集频率设为航运模式对应的采集频率(第一频率),例如表1中的0.5~1Hz(第一频率),此时固态按键进入航运模式。If the microcontroller of the solid-state button determines that the working mode of the electronic device is in the shipping mode, the solid-state button enters the shipping mode accordingly. The microcontroller of the solid-state button controls the sensor to set the acquisition frequency to the acquisition frequency (first frequency) corresponding to the shipping mode, such as 0.5-1 Hz (first frequency) in Table 1, and the solid-state button enters the shipping mode.
也就是说,航运模式下,微控制器可以控制传感器以第一频率采集信号。例如,在一些实施例中,航运模式下,微控制器可以控制电源按键对应的第一传感器以第二频率采集信号。同时,微控制器可以控制非电源按键对应的第二传感器以第二频率采集信号。如表1所示,关机模式下,采集传感器数量为1。That is, in the shipping mode, the microcontroller can control the sensor to collect signals at a first frequency. For example, in some embodiments, in the shipping mode, the microcontroller can control the first sensor corresponding to the power button to collect signals at a second frequency. At the same time, the microcontroller can control the second sensor corresponding to the non-power button to collect signals at a second frequency. As shown in Table 1, in the shutdown mode, the number of collecting sensors is 1.
又例如,在另一些实施例中,由于航运模式下可能只需要电源按键能保持响应即可,因此在航运模式下,为了保证固态按键响应的同时进一步节省固态按键的功耗,固态按键的微控制器同样还可以对传感器进行供电控制。因此,航运模式下,微控制器控制电源按键对应的第一传感器以第一频率采集信号的同时,微控制器控制非电源按键对应的第二传感器断电。如表1所示,航运模式下,采集传感器数量为1。For another example, in some other embodiments, since the power button may only need to remain responsive in the shipping mode, in order to ensure the solid-state button response while further saving the power consumption of the solid-state button in the shipping mode, the microcontroller of the solid-state button can also control the power supply of the sensor. Therefore, in the shipping mode, the microcontroller controls the first sensor corresponding to the power button to collect signals at the first frequency, while the microcontroller controls the second sensor corresponding to the non-power button to be powered off. As shown in Table 1, in the shipping mode, the number of collecting sensors is 1.
其中,为了确保固态按键响应速度的同时,尽可能降低不同工作模式下固态按键的功耗,各工作模式对应采集频率的关系为:第六频率>第五频率>第二频率>第一频率。In order to ensure the response speed of the solid-state key while reducing the power consumption of the solid-state key in different working modes as much as possible, the relationship between the acquisition frequencies corresponding to each working mode is: sixth frequency>fifth frequency>second frequency>first frequency.
也就是说,如图3所示,在航运模式和关机模式下,固态按键的微控制器还可以控制电源按键对应第一传感器保持供电,控制非电源按键对应第二传感器断电(即停止供电),从而节省非电源按键对应第二传感器的功耗,进一步减少电子设备功耗,提升产品续航。That is to say, as shown in FIG3 , in the shipping mode and the shutdown mode, the microcontroller of the solid-state button can also control the first sensor corresponding to the power button to keep powered, and control the second sensor corresponding to the non-power button to power off (i.e. stop powering), thereby saving the power consumption of the second sensor corresponding to the non-power button, further reducing the power consumption of the electronic device, and improving the battery life of the product.
如图4所示,示出了一种电子设备工作模式识别的流程图。以下,结合图4对电子设备工作模式的识别流程进行说明。As shown in Fig. 4, a flow chart of identifying the working mode of an electronic device is shown. In the following, the identification process of the working mode of an electronic device is described in conjunction with Fig. 4.
参考图4,首先,固态按键的微控制器可以按照一定周期,通过I2C/SPI等通讯总线与SOC交互来判断电子设备是否处于待机模式或运行模式。如上所述,由于SOC的工作状态会由电源管理模块PMU控制,随着电子设备的工作模式切换。因此,微控制器按照一定周期通过I2C/SPI等通讯总线与SOC通讯,以获取SOC的工作状态。进而,微控制器根据SOC的工作状态来确定电子设备的工作模式。Referring to Figure 4, first, the microcontroller of the solid-state button can interact with the SOC through a communication bus such as I2C/SPI at a certain period to determine whether the electronic device is in standby mode or running mode. As mentioned above, since the working state of the SOC is controlled by the power management module PMU, the working mode of the electronic device is switched. Therefore, the microcontroller communicates with the SOC through a communication bus such as I2C/SPI at a certain period to obtain the working state of the SOC. Furthermore, the microcontroller determines the working mode of the electronic device according to the working state of the SOC.
如果固态按键的微控制器通过与SOC的交互确定电子设备处于待机模式或运行模式,固态按键的微控制器则可以确定电子设备当前的工作模式是运行模式或待机模式。进而,固态按键可以切换进入待机模式或运行模式。即,保持所有传感器供电,微控制器控制传感器将采集频率设为对应的第五频率或第六频率,使得传感器在待机模式或运行模式下,以第五频率或第六频率采集信号。If the microcontroller of the solid-state button determines that the electronic device is in standby mode or running mode through interaction with the SOC, the microcontroller of the solid-state button can determine that the current working mode of the electronic device is running mode or standby mode. Then, the solid-state button can switch into standby mode or running mode. That is, all sensors are powered on, and the microcontroller controls the sensor to set the acquisition frequency to the corresponding fifth frequency or sixth frequency, so that the sensor collects signals at the fifth frequency or sixth frequency in standby mode or running mode.
而如果微控制器通过与SOC交互确定电子设备不处于待机模式或运行模式,微控制器则进一步判断电子设备当前的工作模式是关机模式还是航运模式。具体而言,微控制器可以通过判断电子设备中是否有非航运模式(off ship mode)标志位来确定电子设备当前的工作模式是关机模式还是航运模式。If the microcontroller determines that the electronic device is not in the standby mode or the operating mode by interacting with the SOC, the microcontroller further determines whether the current working mode of the electronic device is the off mode or the shipping mode. Specifically, the microcontroller can determine whether the current working mode of the electronic device is the off mode or the shipping mode by determining whether there is an off ship mode flag bit in the electronic device.
若微控制器判断确定电子设备中有非航运模式(off ship mode)标志位,表征非航运模式(off ship mode)标志位处于置位状态,则确定电子设备处于关机模式。这样,固态按键可以切换进入关机模式。固态按键在关机模式下,只需要保证电源按键对应的第一传感器保持供电,同时将第一传感器的采集频率降为第二频率。If the microcontroller determines that there is an off ship mode flag in the electronic device, indicating that the off ship mode flag is in a set state, then it is determined that the electronic device is in shutdown mode. In this way, the solid-state button can be switched into shutdown mode. In shutdown mode, the solid-state button only needs to ensure that the first sensor corresponding to the power button remains powered, and at the same time, the acquisition frequency of the first sensor is reduced to the second frequency.
若微控制器判断确定电子设备中没有非航运模式(off ship mode)标志位,表征非航运模式(off ship mode)标志位处于未置位状态,则确定电子设备处于航运模式(offship mode)。这样,固态按键可以切换进入航运模式。固态按键在航运模式下,同样只保证电源按键对应的第一传感器保持供电,但是需要将第一传感器的采集频率降为第一频率。在一些实施例中,第一频率小于第二频率。If the microcontroller determines that there is no off ship mode flag in the electronic device, indicating that the off ship mode flag is in an unset state, then it is determined that the electronic device is in off ship mode. In this way, the solid-state button can be switched into the off ship mode. In the off ship mode, the solid-state button also only ensures that the first sensor corresponding to the power button remains powered, but the acquisition frequency of the first sensor needs to be reduced to the first frequency. In some embodiments, the first frequency is less than the second frequency.
总结来说,非航运模式(off ship mode)标志位可以理解为是用于判断电子设备是否处于航运模式的标识。电子设备在第一次开机之前,即电子设备还未从航运模式开机切换为运行模式之前,电子设备中是不存在非航运模式(off ship mode)标志位的,也就是说非航运模式(off ship mode)标志位此时是没有置位的。在这个阶段,微控制器可以判断确定电子设备是在航运模式下。In summary, the off ship mode flag can be understood as an indicator for determining whether the electronic device is in shipping mode. Before the electronic device is powered on for the first time, that is, before the electronic device is switched from shipping mode to operating mode, the off ship mode flag does not exist in the electronic device, that is, the off ship mode flag is not set at this time. At this stage, the microcontroller can determine whether the electronic device is in shipping mode.
而电子设备在航运模式下,响应于用户对电源按键的触摸操作(如第一触摸操作)实现了第一次开机,微控制器或者系统级芯片SOC(即处理器110)则可以对这个非航运模式(off ship mode)标志位进行置位。在本申请实施例中,置位可以理解为,在电子设备中添加这个非航运模式(off ship mode)标志位。由此,电子设备中存储有非航运模式(offship mode)标志位,此时微控制器可以判断确定电子设备是在非航运模式下。其中,非航运模式包括运行模式、待机模式和关机模式,具体的微控制器可以进一步判断确定。When the electronic device is in the shipping mode, in response to the user's touch operation (such as the first touch operation) on the power button to realize the first power-on, the microcontroller or the system-on-chip SOC (i.e., the processor 110) can set the off-ship mode flag. In the embodiment of the present application, the setting can be understood as adding the off-ship mode flag in the electronic device. As a result, the off-ship mode flag is stored in the electronic device, and the microcontroller can determine whether the electronic device is in the off-ship mode. Among them, the off-ship mode includes the running mode, the standby mode and the shutdown mode, and the specific microcontroller can further determine.
因此,在电子设备不处于待机模式或运行模式时,若存在这个非航运模式(offship mode)标志位,表示电子设备处于关机模式。在电子设备不处于待机模式或运行模式时,若不存在这个非航运模式(off ship mode)标志位,则表示电子设备处于航运模式。Therefore, when the electronic device is not in standby mode or operating mode, if the off-ship mode flag is present, it indicates that the electronic device is in shutdown mode. When the electronic device is not in standby mode or operating mode, if the off-ship mode flag is absent, it indicates that the electronic device is in shipping mode.
可以简单理解为,只要电子设备中存在这个非航运模式(off ship mode)标志位,则表征电子设备就不处于航运模式。It can be simply understood that as long as the off ship mode flag exists in an electronic device, it indicates that the electronic device is not in shipping mode.
在一些实施例中,为了便于微控制器可以简单快速判断非航运模式(off shipmode)标志位是否置位。本申请实施例中的非航运模式(off ship mode)标志位可以写入微控制器中。In some embodiments, in order to facilitate the microcontroller to simply and quickly determine whether the off ship mode flag is set, the off ship mode flag in the embodiment of the present application can be written into the microcontroller.
同时,在另一些实施例中,因为航运模式只有一次,所以非航运模式(off shipmode)标志位一经添加(置位),就要确保其稳定性而不易丢失。因此,非航运模式(off shipmode)标志位可以写入微控制器的非易失性存储器中。在一些实施例中,微控制器或者系统级芯片SOC(即处理器110)可以在微控制器的非易失性存储器中写入非航运模式(off shipmode)标志位,用以表征电子设备不处于航运模式中。Meanwhile, in other embodiments, since the shipping mode is only once, once the off ship mode flag is added (set), its stability must be ensured and it is not easily lost. Therefore, the off ship mode flag can be written into the non-volatile memory of the microcontroller. In some embodiments, the microcontroller or the system-on-chip SOC (i.e., the processor 110) can write the off ship mode flag into the non-volatile memory of the microcontroller to indicate that the electronic device is not in the shipping mode.
例如,在航运模式下,固态按键的微控制器若检测到用户对电源按键的触摸操作(如第一触摸操作),并已经响应于这个触摸操作(如第一触摸操作)唤醒电子设备,将电子设备的工作模式从航运模式切换为运行模式。那么,微控制器则可以相应添加非航运模式(off ship mode)标志位,用于表征电子设备不再处于航运模式。For example, in the shipping mode, if the microcontroller of the solid-state button detects a user's touch operation (such as the first touch operation) on the power button and has awakened the electronic device in response to the touch operation (such as the first touch operation) and switched the working mode of the electronic device from the shipping mode to the running mode, then the microcontroller can add an off-ship mode flag bit accordingly to indicate that the electronic device is no longer in the shipping mode.
也就是说,微控制器根据第一触摸信号(航运模式下,响应于用户对电源按键的第一触摸操作相应采集的触摸信号)将电子设备的工作模式从航运模式切换进入运行模式之后,添加这个非航运模式(off ship mode)标志位。That is, after the microcontroller switches the working mode of the electronic device from the shipping mode to the running mode according to the first touch signal (the touch signal collected in response to the user's first touch operation on the power button in the shipping mode), the microcontroller adds the off ship mode flag.
在一些实施例中,固态按键的微控制器可以在微控制器的非易失性存储中写入这个非航运模式(off ship mode)标志位。In some embodiments, the microcontroller of the solid state key may write this off ship mode flag into the non-volatile memory of the microcontroller.
又例如,在另一种情况下,由于固态按键的微控制器响应于用户的触摸操作确定需要将电子设备的工作模式从航运模式切换到运行模式时,会向电子设备的电源管理模块PMU同步发送电平控制信号,用于指示电源管理模块PMU来控制电子设备从航运模式切换到运行模式。所以,电子设备的系统级芯片SOC同样会被电源管理模块PMU控制唤醒,使得SOC的工作状态切换进入运行状态。因此,在系统级芯片SOC唤醒进入运行状态之后,也可以由SOC在微控制器的非易失性存储中写入这个非航运模式(off ship mode)标志位。For another example, in another case, when the microcontroller of the solid-state button determines that the working mode of the electronic device needs to be switched from the shipping mode to the running mode in response to the user's touch operation, it will synchronously send a level control signal to the power management module PMU of the electronic device to instruct the power management module PMU to control the electronic device to switch from the shipping mode to the running mode. Therefore, the system-on-chip SOC of the electronic device will also be awakened by the power management module PMU, so that the working state of the SOC is switched to the running state. Therefore, after the system-on-chip SOC wakes up and enters the running state, the SOC can also write this off-ship mode flag in the non-volatile storage of the microcontroller.
如图5所示,示出了一种SOC设置非航运模式(off ship mode)标志位的设置流程。以下,结合图5对SOC设置非航运模式(off ship mode)标志位的流程进行说明。As shown in Fig. 5, a setting process of the SOC setting the off ship mode flag is shown. In the following, the process of the SOC setting the off ship mode flag is described in conjunction with Fig. 5.
参考图5,电子设备从航运模式切换为运行模式之后,即SOC的工作状态从航运状态切换进入运行状态之后,SOC可以通过I2C/SPI等通讯总线先读取微控制器的非易失性存储器中是否存储有这个非航运模式(off ship mode)标志位。Referring to FIG5 , after the electronic device switches from the shipping mode to the running mode, that is, after the working state of the SOC switches from the shipping state to the running state, the SOC can first read whether the off ship mode flag is stored in the non-volatile memory of the microcontroller through a communication bus such as I2C/SPI.
若SOC读取确定微控制器的非易失性存储器中有非航运模式(off ship mode)标志位,那么表征非航运模式(off ship mode)标志位当前是置位的状态,即已经添加过非航运模式(off ship mode)标志位,则结束流程。If the SOC reads and determines that there is an off ship mode flag in the non-volatile memory of the microcontroller, then it indicates that the off ship mode flag is currently set, that is, the off ship mode flag has been added, and the process ends.
而若SOC通过读取确定微控制器的非易失性存储器中没有航运模式(off shipmode)标志位,那么表征非航运模式(off ship mode)标志位是未置位的状态,即还未添加非航运模式(off ship mode)标志位。因此,SOC可以通过I2C/SPI等通讯总线向微控制器的非易失性存储器中写入这个非航运模式(off ship mode)标志位。If the SOC determines through reading that there is no off ship mode flag in the non-volatile memory of the microcontroller, then the off ship mode flag is not set, that is, the off ship mode flag has not been added. Therefore, the SOC can write this off ship mode flag to the non-volatile memory of the microcontroller through a communication bus such as I2C/SPI.
在一些实施例中,航运模式除了可以通过非航运模式(off ship mode)标志位判断以外,还可以通过电平信号来判断。在本申请实施例中,可以从电源管理模块PMU中选择1路输入输出信号(IO信号)作为电子设备的航运模式信号连接到固态按键的微控制器。电源管理模块PMU通过这1路IO信号,用来向固态按键的微控制器传递电子设备是否处于航运模式这一信息。以下,本申请实施例将这1路IO信号称为航运模式信号。In some embodiments, the shipping mode can be determined by a level signal in addition to being determined by an off ship mode flag. In an embodiment of the present application, one input/output signal (IO signal) can be selected from the power management module PMU as the shipping mode signal of the electronic device and connected to the microcontroller of the solid-state button. The power management module PMU uses this IO signal to transmit information to the microcontroller of the solid-state button whether the electronic device is in shipping mode. Hereinafter, this embodiment of the present application refers to this IO signal as a shipping mode signal.
示例性的,可以通过高电平信号表示非航运模式,低电平信号表示航运模式。在一些实施例中,在数字电路中,高电平信号可以用1表示,低电平信号可以用0表示。Exemplarily, a high level signal may be used to represent a non-shipping mode, and a low level signal may be used to represent a shipping mode. In some embodiments, in a digital circuit, a high level signal may be represented by 1, and a low level signal may be represented by 0.
例如,电子设备在开始运输之前,由厂商人员通过操控与电子设备连接的上位机向电子设备发送控制指令,以控制电子设备进入航运模式。电子设备进入航运模式时,电源管理模块PMU控制电子设备的大部分功能模块断电。同时,电源管理模块PMU将与固态按键的微控制器连接的那1路IO信号(航运模式信号)设置为低电平信号。由此,因为连接的IO信号(航运模式信号)是低电平信号(如信号为0),所以电源管理模块PMU可以通过这1路连接的IO信号(航运模式信号)向固态按键的微控制器传递电子设备当前处于航运模式这一信息。进而,在微控制器进入电子设备工作模式识别流程时,可以通过这1路与电源管理模块PMU连接的IO信号确定电子设备是否在航运模式。For example, before the electronic device starts to be transported, the manufacturer's personnel send control instructions to the electronic device by controlling the upper computer connected to the electronic device to control the electronic device to enter the shipping mode. When the electronic device enters the shipping mode, the power management module PMU controls most of the functional modules of the electronic device to power off. At the same time, the power management module PMU sets the IO signal (shipping mode signal) connected to the microcontroller of the solid-state button to a low-level signal. Therefore, because the connected IO signal (shipping mode signal) is a low-level signal (such as the signal is 0), the power management module PMU can transmit the information that the electronic device is currently in shipping mode to the microcontroller of the solid-state button through this IO signal (shipping mode signal) connected. Furthermore, when the microcontroller enters the electronic device working mode identification process, it can be determined whether the electronic device is in shipping mode through this IO signal connected to the power management module PMU.
若这1路IO信号(航运模式信号)是低电平信号(如信号为0),微控制器确定电子设备当前的工作模式是航运模式。而若这1路IO信号(航运模式信号)是高电平信号(如信号为1),微控制器确定电子设备当前的工作模式是非航运模式。同样的,本申请实施例中的非航运模式包括运行模式、待机模式和关机模式。电子设备具体处于哪一种非航运模式,微控制器可以进一步进行判断。If this IO signal (shipping mode signal) is a low level signal (such as the signal is 0), the microcontroller determines that the current working mode of the electronic device is the shipping mode. If this IO signal (shipping mode signal) is a high level signal (such as the signal is 1), the microcontroller determines that the current working mode of the electronic device is the non-shipping mode. Similarly, the non-shipping mode in the embodiment of the present application includes the operating mode, the standby mode and the shutdown mode. The microcontroller can further determine which non-shipping mode the electronic device is in.
如图6所示,示出了一种航运模式信号的设置流程。即,电源管理模块PMU在接收到上位机下发的用于控制电子设备进入航运模式的控制指令之后,电源管理模块PMU先判断这1路航运模式信号(IO信号)是否为低电平信号。若这1路航运模式信号(IO信号)是低电平信号(如信号为0),电源管理模块PMU则不控制这1路航运模式信号(IO信号)改变,使得这1路航运模式信号(IO信号)继续维持在低电平信号(如信号为0)。As shown in FIG6 , a setting process of a shipping mode signal is shown. That is, after the power management module PMU receives the control instruction issued by the host computer for controlling the electronic device to enter the shipping mode, the power management module PMU first determines whether the 1-way shipping mode signal (IO signal) is a low-level signal. If the 1-way shipping mode signal (IO signal) is a low-level signal (such as the signal is 0), the power management module PMU does not control the 1-way shipping mode signal (IO signal) to change, so that the 1-way shipping mode signal (IO signal) continues to maintain a low-level signal (such as the signal is 0).
而若这1路航运模式信号(IO信号)是高电平信号,电源管理模块PMU则将这1路航运模式信号(IO信号)从高电平信号设置为低电平信号,用以向固态按键的微控制器表示电子设备当前工作模式是航运模式。这样,固态按键的微控制器可以通过连接的这1路航运模式信号(IO信号)来判断电子设备当前处于航运模式。If the shipping mode signal (IO signal) is a high level signal, the power management module PMU sets the shipping mode signal (IO signal) from a high level signal to a low level signal to indicate to the microcontroller of the solid-state button that the current working mode of the electronic device is the shipping mode. In this way, the microcontroller of the solid-state button can determine that the electronic device is currently in the shipping mode through the connected shipping mode signal (IO signal).
在另一些实施例中,在固态按键的微控制器根据用户的触摸操作对应的触摸信号(第一触摸操作对应的第一触摸信号)确定将电子设备的工作模式从航运模式切换为运行模式时,微控制器会向电源管理模块PMU发送如图1所示的电平控制信号,控制电源管理模块PMU控制电子设备切换进入运行模式,即控制电源管理模块PMU对电子设备的各功能模块恢复供电。此时,电源管理模块PMU可以再次将这1路航运模式信号(IO信号)从所设置的低电平信号更改设置为高电平信号,用以表征电子设备此时是非航运模式。In other embodiments, when the microcontroller of the solid-state key determines that the working mode of the electronic device is switched from the shipping mode to the running mode according to the touch signal corresponding to the user's touch operation (the first touch signal corresponding to the first touch operation), the microcontroller sends a level control signal as shown in FIG1 to the power management module PMU to control the electronic device to switch into the running mode, that is, to control the power management module PMU to restore power to each functional module of the electronic device. At this time, the power management module PMU can change the 1-way shipping mode signal (IO signal) from the set low level signal to a high level signal to indicate that the electronic device is in non-shipping mode at this time.
如图7所示,示出了一种基于航运模式信号(I0信号)确定电子设备工作模式的流程。As shown in FIG. 7 , a process of determining the working mode of an electronic device based on a shipping mode signal (I0 signal) is shown.
参考图7,若I0信号(航运模式信号)为高电平信号,固态按键的微控制器可以确定电子设备处于非航运模式,这样,固态按键的微控制器可以确定固态按键需要切换进入非航运模式。进一步的,对于非航运模式的判断,微控制器同样可以通过与SOC通讯来判断电子设备当前处于待机模式或运行模式。如果通过与SOC通讯确定电子设备在待机模式或运行模式,则确定此时电子设备处于待机模式或运行模式,那么微控制器可以确定固态按键切换进入待机模式或运行模式。而如果通过与SOC通讯确定电子设备不在待机模式或运行模式,则确定此时电子设备处于关机模式,那么固态按键切换进入关机模式。Referring to FIG7 , if the I0 signal (shipping mode signal) is a high-level signal, the microcontroller of the solid-state button can determine that the electronic device is in a non-shipping mode, so that the microcontroller of the solid-state button can determine that the solid-state button needs to be switched into a non-shipping mode. Further, for the judgment of the non-shipping mode, the microcontroller can also determine whether the electronic device is currently in a standby mode or an operating mode by communicating with the SOC. If it is determined through communication with the SOC that the electronic device is in standby mode or operating mode, it is determined that the electronic device is in standby mode or operating mode at this time, and the microcontroller can determine that the solid-state button is switched into standby mode or operating mode. If it is determined through communication with the SOC that the electronic device is not in standby mode or operating mode, it is determined that the electronic device is in shutdown mode at this time, and the solid-state button is switched into shutdown mode.
反之,若I0信号(航运模式信号)为低电平信号,固态按键的微控制器可以确定电子设备处于航运模式。同理,通过与SOC通讯确定电子设备不处于待机模式或运行模式的情况下,可以确定电子设备此时处于航运模式,进而可以确定固态按键切换进入航运模式。On the contrary, if the I0 signal (shipping mode signal) is a low level signal, the microcontroller of the solid-state button can determine that the electronic device is in the shipping mode. Similarly, when the electronic device is determined to be not in the standby mode or the running mode by communicating with the SOC, it can be determined that the electronic device is in the shipping mode at this time, and then it can be determined that the solid-state button is switched into the shipping mode.
总的来说,本申请实施例中的电子设备可以根据非航运标识来判断电子设备是否处于航运模式。其中,非航运标识包括上述非航运模式(off ship mode)标志位或航运模式信号(电源管理模块PMU的I0信号)。In general, the electronic device in the embodiment of the present application can determine whether the electronic device is in the shipping mode according to the off-shipping mark, wherein the off-shipping mark includes the off-shipping mode flag or the shipping mode signal (I0 signal of the power management module PMU).
图8示出了一种电子设备的唤醒方法的流程示意图,包括步骤S801-S805。以下,结合图8对本申请实施例所提供的电子设备的唤醒方法进行说明。Fig. 8 shows a schematic flow chart of a method for waking up an electronic device, including steps S801-S805. The method for waking up an electronic device provided in an embodiment of the present application is described below in conjunction with Fig. 8.
S801,固态按键的微控制器判断电子设备的工作模式是航运模式还是关机模式。S801, a microcontroller of a solid-state button determines whether the working mode of the electronic device is a shipping mode or a shutdown mode.
若电子设备不处于运行模式或待机模式下,且不存在非航运标识,确定电子设备在航运模式下,执行S802。若电子设备不处于运行模式或待机模式下,且存在非航运标识,确定电子设备是关机模式,执行S804。其中,航运标识包括非航运模式标志位和航运模式信号。If the electronic device is not in the running mode or the standby mode, and there is no non-shipping mark, it is determined that the electronic device is in the shipping mode, and S802 is executed. If the electronic device is not in the running mode or the standby mode, and there is a non-shipping mark, it is determined that the electronic device is in the shutdown mode, and S804 is executed. The shipping mark includes a non-shipping mode flag bit and a shipping mode signal.
S802,固态按键的微控制器控制第一传感器以第一频率采集信号。S802, the microcontroller of the solid-state button controls the first sensor to collect signals at a first frequency.
即,航运模式下,微控制器控制第一传感器将采集频率降低到第一频率,使得第一传感器在航运模式下以第一频率采集触摸信号。That is, in the shipping mode, the microcontroller controls the first sensor to reduce the acquisition frequency to the first frequency, so that the first sensor acquires the touch signal at the first frequency in the shipping mode.
其中,第一传感器是电源按键(开机键)对应的传感器。在本申请实施例中,第一频率小于关机模式对应的第二频率。The first sensor is a sensor corresponding to a power button (power on button). In the embodiment of the present application, the first frequency is less than the second frequency corresponding to the shutdown mode.
在一些实施例中,固态按键还包括非电源按键(如音量按键),非电源按键包括对应用于采集用户触摸信号的第二传感器。一般情况下,电子设备在低功耗模式下非电源按键是无需使用而无需保持响应的,因此电子设备在航运模式下,固态按键的微控制器可以控制第二传感器断电,从而以节省非电源按键在航运模式下的功耗,以提升产品航运续航。In some embodiments, the solid-state button also includes a non-power button (such as a volume button), and the non-power button includes a second sensor corresponding to the acquisition of a user touch signal. Generally, the non-power button of the electronic device does not need to be used and does not need to remain responsive in a low-power mode. Therefore, when the electronic device is in a shipping mode, the microcontroller of the solid-state button can control the second sensor to power off, thereby saving the power consumption of the non-power button in the shipping mode and improving the product's shipping life.
S803,响应于用户对电源按键的第一触摸操作,固态按键的微控制器根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式;其中,第一触摸操作对应的第一触摸信号由第一传感器以第一频率采集到。S803, in response to a first touch operation of the user on the power button, the microcontroller of the solid-state button switches the working mode of the electronic device from the shipping mode to the running mode according to a first touch signal corresponding to the first touch operation; wherein the first touch signal corresponding to the first touch operation is collected by the first sensor at a first frequency.
具体而言,在航运模式下,若检测到用户对电源按键进行按压触摸操作,电源按键对应的第一传感器即以降低后的第一频率采集本次按压触摸操作相对应产生的触摸信号。在本申请实施例中,航运模式下用户对电源按键的按压触摸操作称为第一触摸操作,而所采集的这个第一触摸操作对应的触摸信号称为第一触摸信号。Specifically, in the shipping mode, if it is detected that the user presses the power button to perform a touch operation, the first sensor corresponding to the power button collects the touch signal corresponding to the press touch operation at the reduced first frequency. In the embodiment of the present application, the press touch operation of the power button by the user in the shipping mode is called the first touch operation, and the collected touch signal corresponding to the first touch operation is called the first touch signal.
然后,固态按键的微控制器根据第一传感器所采集的第一触摸信号判断本次的按压触摸是否为有效唤醒行为。如果是有效唤醒行为,则微控制器需要响应该第一触摸信号唤醒电子设备,将电子设备的工作模式从航运模式切换为运行模式。而若不是有效唤醒行为,例如可能是用户的误触,则微控制器无需响应该第一触摸信号来唤醒电子设备,电子设备的工作模式继续维持在航运模式。在一些实施例中,微控制器可以通过如图1所示的电平控制信号向电源管理模块PMU发送控制信号,以控制电子设备从航运模式切换为运行模式。Then, the microcontroller of the solid-state button determines whether the current pressing touch is a valid wake-up behavior based on the first touch signal collected by the first sensor. If it is a valid wake-up behavior, the microcontroller needs to respond to the first touch signal to wake up the electronic device and switch the working mode of the electronic device from the shipping mode to the running mode. If it is not a valid wake-up behavior, for example, it may be a false touch by the user, the microcontroller does not need to respond to the first touch signal to wake up the electronic device, and the working mode of the electronic device continues to be maintained in the shipping mode. In some embodiments, the microcontroller can send a control signal to the power management module PMU through a level control signal as shown in Figure 1 to control the electronic device to switch from the shipping mode to the running mode.
S804,固态按键的微控制器控制第一传感器以第二频率采集信号。S804, the microcontroller of the solid-state button controls the first sensor to collect signals at a second frequency.
即,关机模式下,微控制器控制第一传感器将采集频率降低到第二频率,使得第一传感器在关机模式下以第二频率采集触摸信号。That is, in the shutdown mode, the microcontroller controls the first sensor to reduce the acquisition frequency to the second frequency, so that the first sensor acquires the touch signal at the second frequency in the shutdown mode.
其中,第二频率是关机模式下对应的采集频率,第二频率大于航运模式下的第一频率。在一些实施例中,电子设备在关机模式下,非电源按键同样是无需保持响应的,因此固态按键的微控制器同样可以控制第二传感器断电,从而以节省非电源按键在关机模式下的功耗,以提升产品关机续航。The second frequency is the corresponding acquisition frequency in the shutdown mode, and the second frequency is greater than the first frequency in the shipping mode. In some embodiments, when the electronic device is in the shutdown mode, the non-power button also does not need to remain responsive, so the microcontroller of the solid-state button can also control the second sensor to power off, thereby saving power consumption of the non-power button in the shutdown mode, so as to improve the shutdown battery life of the product.
S805,响应于用户对电源按键的第三触摸操作,固态按键的微控制器根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从关机模式切换为运行模式;其中,第三触摸操作对应的第二触摸信号由第一传感器以第二频率采集到。S805, in response to the user's third touch operation on the power button, the microcontroller of the solid-state button switches the working mode of the electronic device from the shutdown mode to the running mode according to the second touch signal corresponding to the third touch operation; wherein the second touch signal corresponding to the third touch operation is collected by the first sensor at the second frequency.
同理,在关机模式下,若检测到用户对电源按键进行按压触摸操作,电源按键对应的第一传感器即以降低后的第二频率采集本次按压触摸操作相对应产生的触摸信号。在本申请实施例中,关机模式下用户对电源按键的按压触摸操作称为第三触摸操作,而所采集的这个第三触摸操作对应的触摸信号称为第二触摸信号。Similarly, in shutdown mode, if it is detected that the user presses the power button to perform a touch operation, the first sensor corresponding to the power button collects the touch signal corresponding to the press touch operation at the reduced second frequency. In the embodiment of the present application, the press touch operation of the power button by the user in shutdown mode is called the third touch operation, and the collected touch signal corresponding to the third touch operation is called the second touch signal.
然后,固态按键的微控制器根据第一传感器所采集的第二触摸信号判断本次的按压触摸是否为有效唤醒行为。如果是有效唤醒行为,则需要响应该第二触摸信号唤醒电子设备,将电子设备的工作模式从关机模式切换为运行模式。而若不是有效唤醒行为,例如可能是用户的误触,则无需响应该第二触摸信号来唤醒电子设备,电子设备的工作模式继续维持在关机模式。同理,在一些实施例中,微控制器可以通过如图1所示的电平控制信号向电源管理模块PMU发送控制信号,以控制电子设备从关机模式切换为运行模式。Then, the microcontroller of the solid-state button determines whether the current pressing touch is a valid wake-up behavior based on the second touch signal collected by the first sensor. If it is a valid wake-up behavior, it is necessary to respond to the second touch signal to wake up the electronic device and switch the working mode of the electronic device from shutdown mode to running mode. If it is not a valid wake-up behavior, for example, it may be a false touch by the user, there is no need to respond to the second touch signal to wake up the electronic device, and the working mode of the electronic device continues to be maintained in shutdown mode. Similarly, in some embodiments, the microcontroller can send a control signal to the power management module PMU through a level control signal as shown in Figure 1 to control the electronic device to switch from shutdown mode to running mode.
在一些实施例中,为了保证功耗降低的同时可以确保电源按键能够响应用户的唤醒操作,第一频率和第二频率可以配置为第一传感器采集触摸信号所需要的最低频率。In some embodiments, in order to reduce power consumption while ensuring that the power button can respond to the user's wake-up operation, the first frequency and the second frequency can be configured as the minimum frequency required for the first sensor to collect touch signals.
例如,航运模式下的第一频率可以设置为1Hz,关机模式下的第二频率可以设置为2Hz。可以理解的,该最低频率可以根据经验或通过对第一传感器进行实际的采集测试确定,本申请实施例对此不作任何限定。For example, the first frequency in the shipping mode can be set to 1 Hz, and the second frequency in the shutdown mode can be set to 2 Hz. It can be understood that the minimum frequency can be determined based on experience or by performing actual acquisition tests on the first sensor, and the present application embodiment does not impose any limitation on this.
由此可见,在本申请实施例中,在电子设备进入航运模式和关机模式等低功耗模式时,一般情况下电源按键需要保持响应用于唤醒电子设备。因此,在该些低功耗模式下,固态按键的微控制器自适应控制电源按键的第一传感器降低采集频率,从而降低模拟信号采集所需要的功耗,以此减少低功耗模式下电子设备的功耗,以提升产品续航。It can be seen that in the embodiments of the present application, when the electronic device enters a low power consumption mode such as a shipping mode and a shutdown mode, the power button generally needs to remain responsive to wake up the electronic device. Therefore, in these low power consumption modes, the microcontroller of the solid-state button adaptively controls the first sensor of the power button to reduce the acquisition frequency, thereby reducing the power consumption required for analog signal acquisition, thereby reducing the power consumption of the electronic device in the low power consumption mode to improve the battery life of the product.
同时,本申请实施例针对航运模式和关机模式分别配置对应的第一频率和第二频率,且第一频率小于第二频率。由此,可以进一步在航运模式下节省更多的功耗,提升产品运输续航。At the same time, the embodiment of the present application configures the corresponding first frequency and second frequency for the shipping mode and the shutdown mode respectively, and the first frequency is less than the second frequency. Thus, more power consumption can be further saved in the shipping mode, and the product transportation endurance can be improved.
图9示出了另一种电子设备的唤醒方法的流程示意图,包括步骤S901-S907。以下,结合图9对本申请实施例所提供的另一种电子设备的唤醒方法进行说明。Fig. 9 shows a schematic flow chart of another method for waking up an electronic device, including steps S901 to S907. In the following, another method for waking up an electronic device provided in an embodiment of the present application is described in conjunction with Fig. 9.
S901,固态按键的微控制器判断电子设备的工作模式是航运模式还是关机模式。S901, a microcontroller of a solid-state button determines whether the working mode of the electronic device is a shipping mode or a shutdown mode.
与S901原理相同,若电子设备不处于运行模式或待机模式下,且不存在非航运标识,确定电子设备在航运模式下。在航运模式下,本申请实施例接着执行S902。若电子设备不处于运行模式或待机模式下,且存在非航运标识,确定电子设备是关机模式。在关机模式下,本申请实施例接着执行S905。其中,航运标识包括非航运模式标志位和航运模式信号。The principle is the same as S901. If the electronic device is not in the running mode or the standby mode, and there is no non-shipping mark, it is determined that the electronic device is in the shipping mode. In the shipping mode, the embodiment of the present application then executes S902. If the electronic device is not in the running mode or the standby mode, and there is a non-shipping mark, it is determined that the electronic device is in the shutdown mode. In the shutdown mode, the embodiment of the present application then executes S905. Among them, the shipping mark includes a non-shipping mode flag and a shipping mode signal.
S902,固态按键的微控制器控制第一传感器以第三频率采集信号;其中,第三频率小于第一频率。S902, the microcontroller of the solid-state button controls the first sensor to collect signals at a third frequency; wherein the third frequency is lower than the first frequency.
S903,响应于用户对电源按键的第二触摸操作,固态按键的微控制器控制第一传感器以第一频率采集信号。其中,第二触摸操作对应的触摸信号由第一传感器以第三频率采集得到。S903, in response to the user's second touch operation on the power button, the microcontroller of the solid-state button controls the first sensor to collect signals at the first frequency, wherein the touch signal corresponding to the second touch operation is collected by the first sensor at the third frequency.
S904,响应于用户对电源按键的第一触摸操作,固态按键的微控制器根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式。其中,第一触摸操作对应的第一触摸信号由第一传感器以第一频率采集到。S904, in response to a first touch operation of the user on the power button, the microcontroller of the solid-state button switches the working mode of the electronic device from the shipping mode to the running mode according to a first touch signal corresponding to the first touch operation, wherein the first touch signal corresponding to the first touch operation is collected by the first sensor at a first frequency.
其中,第二触摸操作是航运模式下用于指示微控制器提升传感器采集频率的触摸操作。第一触摸操作是指示微控制器将电子设备的工作模式从航运模式切换为运行模式的触摸操作。The second touch operation is a touch operation in the shipping mode for instructing the microcontroller to increase the sensor acquisition frequency. The first touch operation is a touch operation instructing the microcontroller to switch the working mode of the electronic device from the shipping mode to the running mode.
在本申请实施例中,第二触摸操作是第一触摸操作之前的触摸操作。也就是说,第二触摸操作对应的触摸信号是在第一触摸操作对应的第一触摸信号之前的触摸信号。In the embodiment of the present application, the second touch operation is a touch operation before the first touch operation. That is, the touch signal corresponding to the second touch operation is a touch signal before the first touch signal corresponding to the first touch operation.
在一些实施例中,第二触摸操作对应的触摸信号可以是单独的一个触摸信号,第一触摸操作对应的第一触摸信号可以是连续包括多个触摸信号的触摸信号。在另一些实施例中,第二触摸操作与第一触摸操作可以是连续的触摸操作,相应的第二触摸操作对应的触摸信号与第一触摸信号可以是连续的触摸信号。In some embodiments, the touch signal corresponding to the second touch operation may be a single touch signal, and the first touch signal corresponding to the first touch operation may be a touch signal continuously including multiple touch signals. In other embodiments, the second touch operation and the first touch operation may be continuous touch operations, and the touch signal corresponding to the second touch operation and the first touch signal may be continuous touch signals.
示例性的,以下利用第一时间点、第二时间点以及第三时间点为例对第一触摸操作和第二触摸操作进行说明。其中,第二时间点在第一时间点之后,第三时间点在第二时间点之后。Exemplarily, the first touch operation and the second touch operation are described below using a first time point, a second time point, and a third time point as examples, wherein the second time point is after the first time point, and the third time point is after the second time point.
若在第一时间点检测到用户的触摸操作,该触摸操作视为第二触摸操作。微控制器响应于这个第二触摸操作对应的触摸信号,在第二时间点将第一传感器的采集频率从第三频率提升到第一频率。之后,若在第二时间点仍检测到用户的触摸操作,则继续采集第二时间点到第三时间之间的触摸操作,将这个触摸操作视为第一触摸操作。If a user's touch operation is detected at the first time point, the touch operation is regarded as the second touch operation. In response to the touch signal corresponding to the second touch operation, the microcontroller increases the acquisition frequency of the first sensor from the third frequency to the first frequency at the second time point. Thereafter, if the user's touch operation is still detected at the second time point, the touch operation between the second time point and the third time point is continued to be acquired, and the touch operation is regarded as the first touch operation.
具体而言,在本申请实施例中,固态按键的微控制器若确定电子设备在航运模式下,固态按键的微控制器先将第一传感器的采集频率降低到比第一频率更小的第三频率。即,航运模式下,固态按键的微控制器先控制第一传感器以第三频率采集信号。第三频率小于第一频率。可以理解的,本申请实施例中同样可以控制非电源按键的第二传感器断电,以节省低功耗模式下非电源按键的功耗,减低电子设备的功耗,提升产品续航。Specifically, in the embodiment of the present application, if the microcontroller of the solid-state button determines that the electronic device is in the shipping mode, the microcontroller of the solid-state button first reduces the acquisition frequency of the first sensor to a third frequency that is smaller than the first frequency. That is, in the shipping mode, the microcontroller of the solid-state button first controls the first sensor to collect signals at the third frequency. The third frequency is smaller than the first frequency. It can be understood that in the embodiment of the present application, the second sensor of the non-power button can also be controlled to be powered off to save the power consumption of the non-power button in the low-power mode, reduce the power consumption of the electronic device, and improve the battery life of the product.
然后,当检测到用户对电源按键的第二触摸操作之后,响应于这个第二触摸操作,以第三频率采集得到这个第二触摸操作对应的触摸信号。微控制器响应于这个第二触摸操作对应的触摸信号,再将第一传感器的采集频率从第三频率提升至第一频率,使得第一传感器以第一频率采集第一触摸操作对应的第一触摸信号。即,响应于用户对电源按键的第二触摸操作,固态按键的微控制器控制第一传感器以第一频率采集信号。其中,这个第二触摸操作对应的触摸信号是第一传感器以第三频率采集得到的。之后,响应于用户对电源按键的第一触摸操作,第一传感器以第一频率采集这个第一触摸操作对应的第一触摸信号发送给微控制器。最后,固态按键的微控制器根据第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换为运行模式。Then, after detecting the second touch operation of the user on the power button, in response to the second touch operation, the touch signal corresponding to the second touch operation is collected at the third frequency. In response to the touch signal corresponding to the second touch operation, the microcontroller increases the collection frequency of the first sensor from the third frequency to the first frequency, so that the first sensor collects the first touch signal corresponding to the first touch operation at the first frequency. That is, in response to the second touch operation of the user on the power button, the microcontroller of the solid-state button controls the first sensor to collect signals at the first frequency. Among them, the touch signal corresponding to the second touch operation is collected by the first sensor at the third frequency. Afterwards, in response to the first touch operation of the user on the power button, the first sensor collects the first touch signal corresponding to the first touch operation at the first frequency and sends it to the microcontroller. Finally, the microcontroller of the solid-state button switches the working mode of the electronic device from the shipping mode to the running mode according to the first touch signal corresponding to the first touch operation.
本申请实施例在第一传感器的采集频率降低到比第一频率小的第三频率之后,因为第一频率已经是航运模式下能够保证唤醒响应的最低频率,所以第一传感器若一直维持在第三频率,可能无法顺利完成第一触摸信号的采集。In the embodiment of the present application, after the acquisition frequency of the first sensor is reduced to a third frequency which is lower than the first frequency, because the first frequency is already the lowest frequency that can ensure the wake-up response in the shipping mode, the first sensor may not be able to successfully complete the acquisition of the first touch signal if it is always maintained at the third frequency.
因此,在该情况下,若检测到用户对电源按键进行按压触摸操作,固态按键的微控制器首先将第一传感器的采集频率从第三频率提升至第一频率,以确保第一传感器能够在第一频率下顺利完成第一触摸信号的采集。Therefore, in this case, if it is detected that the user presses and touches the power button, the microcontroller of the solid-state button first increases the acquisition frequency of the first sensor from the third frequency to the first frequency to ensure that the first sensor can successfully complete the acquisition of the first touch signal at the first frequency.
然后,固态按键的微控制器再根据第一传感器以第一频率所采集的第一触摸信号判断本次的按压触摸(即第一触摸操作)是否为有效唤醒行为。如果是有效唤醒行为,则需要响应该第一触摸信号唤醒电子设备,将电子设备的工作模式从航运模式切换为运行模式。而若不是有效唤醒行为,例如可能是用户的误触,则无需响应该第一触摸信号来唤醒电子设备,电子设备的工作模式继续维持在航运模式。Then, the microcontroller of the solid-state button determines whether the current pressing touch (i.e., the first touch operation) is a valid wake-up behavior based on the first touch signal collected by the first sensor at the first frequency. If it is a valid wake-up behavior, it is necessary to respond to the first touch signal to wake up the electronic device and switch the working mode of the electronic device from the shipping mode to the running mode. If it is not a valid wake-up behavior, for example, it may be a false touch by the user, it is not necessary to respond to the first touch signal to wake up the electronic device, and the working mode of the electronic device continues to be maintained in the shipping mode.
在一些实施例中,微控制器将第一传感器的采集频率从第三频率提升到第一频率之后,若未检测到用户的第一触摸操作,则可以再将第一传感器的采集频率从第一频率降低为第三频率。等待下一个第二触摸操作到来时,再重新将第一传感器的采集频率从第三频率提升到第一频率。例如,微控制器在第二时间点将第一传感器的采集频率从第三频率提升到第一频率之后未检测到用户的第一触摸操作,则在第二时间点可以再将第一传感器的采集频率第一频率降低为第三频率。由此,可以避免用户误触而将采集频率提升。In some embodiments, after the microcontroller increases the acquisition frequency of the first sensor from the third frequency to the first frequency, if the user's first touch operation is not detected, the acquisition frequency of the first sensor can be reduced from the first frequency to the third frequency. When waiting for the next second touch operation to arrive, the acquisition frequency of the first sensor is increased from the third frequency to the first frequency again. For example, if the microcontroller increases the acquisition frequency of the first sensor from the third frequency to the first frequency at the second time point and does not detect the user's first touch operation, the acquisition frequency of the first sensor can be reduced from the first frequency to the third frequency at the second time point. In this way, it is possible to avoid the user's accidental touch and increase the acquisition frequency.
S905,固态按键的微控制器控制第一传感器以第四频率采集信号;其中,第四频率小于第二频率。S905, the microcontroller of the solid-state button controls the first sensor to collect signals at a fourth frequency; wherein the fourth frequency is lower than the second frequency.
S906,响应于用户对电源按键的第四触摸操作,固态按键的微控制器控制第一传感器以第二频率采集信号。其中,第四触摸操作对应的触摸信号由第一传感器以第四频率采集得到。S906, in response to the user's fourth touch operation on the power button, the microcontroller of the solid-state button controls the first sensor to collect signals at the second frequency, wherein the touch signal corresponding to the fourth touch operation is collected by the first sensor at the fourth frequency.
S907,响应于用户对电源按键的第三触摸操作,固态按键的微控制器根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从关机模式切换为运行模式。其中,第三触摸操作对应的第二触摸信号由第一传感器以第二频率采集到。S907, in response to the user's third touch operation on the power button, the microcontroller of the solid-state button switches the working mode of the electronic device from the shutdown mode to the running mode according to the second touch signal corresponding to the third touch operation. The second touch signal corresponding to the third touch operation is collected by the first sensor at the second frequency.
其中,与第二触摸操作作用相同的,第四触摸操作是关机模式下用于指示微控制器提升传感器采集频率的触摸操作。与第一触摸操作作用相同的,第三触摸操作是指示微控制器将电子设备的工作模式从关机模式切换为运行模式的触摸操作。The fourth touch operation has the same function as the second touch operation, and is a touch operation for instructing the microcontroller to increase the sensor acquisition frequency in shutdown mode. The third touch operation has the same function as the first touch operation, and is a touch operation for instructing the microcontroller to switch the working mode of the electronic device from shutdown mode to running mode.
同样的,在本申请实施例中,第四触摸操作是第三触摸操作之前的触摸操作。也就是说,第四触摸操作对应的触摸信号是在第三触摸操作对应的第二触摸信号之前的触摸信号。Similarly, in the embodiment of the present application, the fourth touch operation is a touch operation before the third touch operation. In other words, the touch signal corresponding to the fourth touch operation is a touch signal before the second touch signal corresponding to the third touch operation.
在一些实施例中,第四触摸操作对应的触摸信号可以是单独的一个触摸信号,第三触摸操作对应的第二触摸信号可以是连续包括多个触摸信号的触摸信号。在另一些实施例中,第四触摸操作与第三触摸操作可以是连续的触摸操作,相应的第四触摸操作对应的触摸信号与第二触摸信号可以是连续的触摸信号。In some embodiments, the touch signal corresponding to the fourth touch operation may be a single touch signal, and the second touch signal corresponding to the third touch operation may be a touch signal continuously including multiple touch signals. In other embodiments, the fourth touch operation and the third touch operation may be continuous touch operations, and the touch signal corresponding to the fourth touch operation and the second touch signal may be continuous touch signals.
具体而言,在本申请实施例中,固态按键的微控制器若确定电子设备在关机模式下,固态按键的微控制器先将第一传感器的采集频率降低到比第二频率更小的第四频率。即,关机模式下,固态按键的微控制器先控制第一传感器以第四频率采集信号。第四频率小于第二频率。可以理解的,本申请实施例中同样可以控制非电源按键的第二传感器断电,以节省低功耗模式下非电源按键的功耗,减低电子设备的功耗,提升产品续航。Specifically, in an embodiment of the present application, if the microcontroller of the solid-state button determines that the electronic device is in shutdown mode, the microcontroller of the solid-state button first reduces the acquisition frequency of the first sensor to a fourth frequency that is smaller than the second frequency. That is, in shutdown mode, the microcontroller of the solid-state button first controls the first sensor to collect signals at the fourth frequency. The fourth frequency is less than the second frequency. It can be understood that in an embodiment of the present application, the second sensor of the non-power button can also be controlled to be powered off to save the power consumption of the non-power button in low-power mode, reduce the power consumption of the electronic device, and improve the battery life of the product.
之后,当检测到用户对电源按键的第四触摸操作之后,响应于这个第四触摸操作,以第四频率采集得到这个第四触摸操作对应的触摸信号。微控制器响应于这个第四触摸操作对应的触摸信号,再将第一传感器的采集频率从第四频率提升至第二频率,使得第一传感器以第二频率采集第三触摸操作对应的第二触摸信号。即,响应于用户对电源按键的第四触摸操作,固态按键的微控制器控制第一传感器以第四频率采集信号。其中,这个第四触摸操作对应的触摸信号是第一传感器以第四频率采集得到的。之后,响应于用户对电源按键的第三触摸操作,响应于用户对电源按键的第三触摸操作,第一传感器以第二频率采集这个第三触摸操作对应的第二触摸信号发送给微控制器。最后,固态按键的微控制器根据第三触摸操作对应的第二触摸信号将电子设备的工作模式从关机模式切换为运行模式。Afterwards, when the user's fourth touch operation on the power button is detected, in response to the fourth touch operation, the touch signal corresponding to the fourth touch operation is acquired at the fourth frequency. In response to the touch signal corresponding to the fourth touch operation, the microcontroller increases the acquisition frequency of the first sensor from the fourth frequency to the second frequency, so that the first sensor acquires the second touch signal corresponding to the third touch operation at the second frequency. That is, in response to the user's fourth touch operation on the power button, the microcontroller of the solid-state button controls the first sensor to acquire the signal at the fourth frequency. Among them, the touch signal corresponding to the fourth touch operation is acquired by the first sensor at the fourth frequency. Afterwards, in response to the user's third touch operation on the power button, in response to the user's third touch operation on the power button, the first sensor acquires the second touch signal corresponding to the third touch operation at the second frequency and sends it to the microcontroller. Finally, the microcontroller of the solid-state button switches the working mode of the electronic device from the shutdown mode to the running mode according to the second touch signal corresponding to the third touch operation.
同样因为第二频率已经是关机模式下能够保证唤醒响应的最低频率,因此为了保证第一传感器能够在关机模式下顺利完成第二触摸信号的采集。若检测到用户对电源按键进行按压触摸操作,固态按键的微控制器首先将第一传感器的采集频率从第四频率提升至第二频率,以确保第一传感器能够在第二频率下顺利完成第二触摸信号的采集。Also, because the second frequency is the lowest frequency that can ensure the wake-up response in shutdown mode, in order to ensure that the first sensor can successfully complete the acquisition of the second touch signal in shutdown mode. If it is detected that the user presses the power button, the microcontroller of the solid-state button first increases the acquisition frequency of the first sensor from the fourth frequency to the second frequency, so as to ensure that the first sensor can successfully complete the acquisition of the second touch signal at the second frequency.
最后,固态按键的微控制器再根据第一传感器以第二频率所采集的第二触摸信号判断本次的按压触摸(即第三触摸操作)是否为有效唤醒行为。如果是有效唤醒行为,则需要响应该第二触摸信号唤醒电子设备,将电子设备的工作模式从关机模式切换为运行模式。而若不是有效唤醒行为,例如可能是用户的误触,则无需响应该第二触摸信号来唤醒电子设备,电子设备的工作模式继续维持在关机模式。Finally, the microcontroller of the solid-state button determines whether the current pressing touch (i.e., the third touch operation) is a valid wake-up behavior based on the second touch signal collected by the first sensor at the second frequency. If it is a valid wake-up behavior, it is necessary to respond to the second touch signal to wake up the electronic device and switch the working mode of the electronic device from the shutdown mode to the running mode. If it is not a valid wake-up behavior, for example, it may be a false touch by the user, there is no need to respond to the second touch signal to wake up the electronic device, and the working mode of the electronic device continues to be maintained in the shutdown mode.
综上所述,在本申请实施例中,航运模式下先将第一传感器的采集频率降低到比第一频率更低的第三频率。同时关机模式下也先将第一传感器的采集频率降低到比第二频率更低的第四频率。之后,在响应于用户的第一唤醒操作(如第二触摸操作和第四触摸操作),立即将采集频率提升到第一频率或第二频率。以第一频率或第二频率对第二唤醒操作(如第一触摸操作和第三触摸操作)对应的触摸信号(如第一触摸信号和第二触摸信号)进行采集。In summary, in the embodiment of the present application, the acquisition frequency of the first sensor is first reduced to a third frequency lower than the first frequency in the shipping mode. At the same time, the acquisition frequency of the first sensor is also first reduced to a fourth frequency lower than the second frequency in the shutdown mode. Afterwards, in response to the user's first wake-up operation (such as the second touch operation and the fourth touch operation), the acquisition frequency is immediately increased to the first frequency or the second frequency. The touch signals (such as the first touch signal and the second touch signal) corresponding to the second wake-up operation (such as the first touch operation and the third touch operation) are collected at the first frequency or the second frequency.
通过这种采集频率变频的方式,由于第三频率和第四频率相比第一频率和第二频率更加低,所以能够进一步降低固态按键在唤醒等待过程中的功耗。而检测到用户的唤醒行为时,立马提升采集频率又能够确保触摸信号的顺利采集。因此,相比固定的采集频率来说,变频的采集频率可以在确保唤醒响应的同时能够节省更多的功耗,进一步提升了产品续航。By using this acquisition frequency conversion method, since the third and fourth frequencies are lower than the first and second frequencies, the power consumption of the solid-state buttons during the wake-up waiting process can be further reduced. When the user's wake-up behavior is detected, the acquisition frequency is immediately increased to ensure the smooth acquisition of the touch signal. Therefore, compared with a fixed acquisition frequency, the variable acquisition frequency can save more power consumption while ensuring the wake-up response, further improving the product's battery life.
需要说明的是,上述第一频率、第二频率、第三频率和第四频率的设置可以根据实际需求设定,本申请实施例对此不作任何限定。It should be noted that the settings of the first frequency, the second frequency, the third frequency and the fourth frequency can be set according to actual needs, and the embodiments of the present application do not impose any limitation on this.
如图10所示,图10以第一频率=1Hz,第二频率=2Hz,第三频率=0.25Hz,第四频率=1Hz为例示出了电子设备的唤醒方法的流程示意图。As shown in FIG. 10 , FIG. 10 shows a schematic flow chart of a method for waking up an electronic device by taking the first frequency=1 Hz, the second frequency=2 Hz, the third frequency=0.25 Hz, and the fourth frequency=1 Hz as an example.
示例性的,航运模式下,第一传感器的采集频率首先为0.25Hz,相对应的采集平均电流为5uA。在检测到用户的第二触摸操作时,将采集频率提升到1Hz对第一触摸操作对应的第一触摸信号进行采集。与固定的1Hz采集频率相比较,1Hz采集频率对应的采集平均电流大于20uA。因此,按照航运模式180天进行计算,本申请实施例中电子设备至少可以节省:(20uA-5uA)*180天*24小时=64800uAh=64.8mAh的电量,从而将航运模式下固态按键所需要的功耗降低75%以上。Exemplarily, in the shipping mode, the acquisition frequency of the first sensor is first 0.25Hz, and the corresponding average acquisition current is 5uA. When the user's second touch operation is detected, the acquisition frequency is increased to 1Hz to collect the first touch signal corresponding to the first touch operation. Compared with the fixed 1Hz acquisition frequency, the average acquisition current corresponding to the 1Hz acquisition frequency is greater than 20uA. Therefore, according to the calculation of 180 days in the shipping mode, the electronic device in the embodiment of the present application can save at least: (20uA-5uA)*180 days*24 hours=64800uAh=64.8mAh of electricity, thereby reducing the power consumption required for solid-state buttons in the shipping mode by more than 75%.
由此可见,相比于固定采集频率来说,本申请实施例中这种变频采集频率的方式,在保证的性能和响应速度的同时,可以进一步实现功耗的节省。It can be seen that compared with a fixed acquisition frequency, the variable frequency acquisition frequency method in the embodiment of the present application can further save power consumption while ensuring performance and response speed.
在一些实施例中,电子设备在航运模式或关机模式等低功耗模式下,可能存在用户误触电源按键的情况,从而容易导致固态按键的微控制器误认为用户需要唤醒电子设备。In some embodiments, when the electronic device is in a low power consumption mode such as shipping mode or shutdown mode, a user may accidentally touch the power button, which may easily cause the microcontroller of the solid-state button to mistakenly believe that the user needs to wake up the electronic device.
因此,为了防止用户误触引起的电子设备唤醒。用户若需要唤醒电子设备,对电源按键的触摸操作需要有一定的触摸时长。Therefore, in order to prevent the electronic device from being awakened by an accidental touch by the user, if the user needs to wake up the electronic device, the touch operation on the power button needs to have a certain touch duration.
例如,从航运模式唤醒电子设备的触摸时长可以是第一触摸时长。示例性的,第一触摸时长可以是10秒。而从关机模式唤醒电子设备的触摸时长可以是第二触摸时长。示例性的,第二触摸时长可以是20秒。For example, the touch duration for waking up the electronic device from the shipping mode may be the first touch duration. Exemplarily, the first touch duration may be 10 seconds. And the touch duration for waking up the electronic device from the shutdown mode may be the second touch duration. Exemplarily, the second touch duration may be 20 seconds.
需要说明的是,第一触摸时长和第二触摸式长可以根据实际产品需求配置,本申请实施例对第一触摸时长和第二触摸式长不作任何限定。It should be noted that the first touch duration and the second touch duration can be configured according to actual product requirements, and the embodiment of the present application does not impose any limitation on the first touch duration and the second touch duration.
因此,当固态按键的微控制器接收到第一传感器采集到第一触摸操作对应的第一触摸信号之后,需要进一步判断该第一触摸信号是否满足了第一触摸时长。若满足,则确定本次用户的第一触摸操作是有效唤醒行为,那么响应于这个第一触摸操作对应的第一触摸信号将电子设备的工作模式从航运模式切换运行模式。若不满足,则确定本次用户的第一触摸操作不是有效唤醒行为,则不切换电子设备的工作模式,电子设备继续运行在航运模式下。Therefore, after the microcontroller of the solid-state key receives the first touch signal corresponding to the first touch operation collected by the first sensor, it is necessary to further determine whether the first touch signal meets the first touch duration. If it meets, it is determined that the first touch operation of the user this time is an effective wake-up behavior, and then the working mode of the electronic device is switched from the shipping mode to the running mode in response to the first touch signal corresponding to the first touch operation. If it does not meet, it is determined that the first touch operation of the user this time is not an effective wake-up behavior, and the working mode of the electronic device is not switched, and the electronic device continues to operate in the shipping mode.
示例性的,若第一触摸信号中包括连续n个触摸信号值,n=10,则表示第一触摸信号是满足第一触摸时长的。Exemplarily, if the first touch signal includes n consecutive touch signal values, where n=10, it means that the first touch signal satisfies the first touch duration.
另外,第一触摸信号除了要满足第一触摸时长,这连续n个触摸信号值还需要满足第一预设要求。第一预设要求根据第一传感器的类型来定,比如第一传感器是压力传感器,那么第一预设要求可以是第一压力阈值。即,为了防止误触,只有用户对电源按键的按压力度超过一定的压力阈值才能确定这个触摸信号值是用于指示将电子设备从航运模式唤醒的信号。In addition, in addition to satisfying the first touch duration, the first touch signal and the n consecutive touch signal values also need to satisfy the first preset requirement. The first preset requirement is determined according to the type of the first sensor. For example, if the first sensor is a pressure sensor, the first preset requirement may be a first pressure threshold. That is, in order to prevent accidental touches, only when the user's pressure on the power button exceeds a certain pressure threshold can it be determined that the touch signal value is a signal for indicating that the electronic device is to be awakened from the shipping mode.
也就是说,在本申请实施例中,第一触摸信号中需要包括连续n个满足第一预设要求(如第一压力阈值)的触摸信号值,才表示用户的触摸操作是有效唤醒行为,进而固态按键的微控制器才响应于这个第一触摸信号将电子设备的工作模式从航运模式切换运行模式。电子设备工作模式的切换,固态按键的微控制器可以通过电平控制信号向电子设备的电源管理模块PMU发送电平控制信号实现。That is to say, in the embodiment of the present application, the first touch signal needs to include n consecutive touch signal values that meet the first preset requirement (such as the first pressure threshold) to indicate that the user's touch operation is an effective wake-up behavior, and then the microcontroller of the solid-state button switches the working mode of the electronic device from the shipping mode to the operating mode in response to the first touch signal. The switching of the working mode of the electronic device can be achieved by the microcontroller of the solid-state button sending a level control signal to the power management module PMU of the electronic device through the level control signal.
同理,当固态按键的微控制器接收到第一传感器采集到第三触摸操作对应的第二触摸信号之后,同样需要进一步判断该第二触摸信号是否满足了第二触摸时长。若满足,则确定本次用户的第三触摸操作是有效唤醒行为,那么响应于这个第三触摸操作对应的第二触摸信号将电子设备的工作模式从关机模式切换运行模式。若不满足,则确定本次用户的第三触摸操作不是有效唤醒行为,则不切换电子设备的工作模式,电子设备继续运行在关机模式下。Similarly, when the microcontroller of the solid-state button receives the second touch signal corresponding to the third touch operation collected by the first sensor, it is also necessary to further determine whether the second touch signal meets the second touch duration. If satisfied, it is determined that the third touch operation of the user this time is an effective wake-up behavior, and then the working mode of the electronic device is switched from the shutdown mode to the running mode in response to the second touch signal corresponding to the third touch operation. If not satisfied, it is determined that the third touch operation of the user this time is not an effective wake-up behavior, and the working mode of the electronic device is not switched, and the electronic device continues to operate in the shutdown mode.
示例性的,若第二触摸信号中包括连续m个触摸信号值,m=20,则表示第二触摸信号是满足第二触摸时长的。Exemplarily, if the second touch signal includes m consecutive touch signal values, where m=20, it means that the second touch signal satisfies the second touch duration.
同时,第二触摸信号除了要满足第二触摸时长,这连续m个触摸信号值还需要满足第二预设要求。第二预设要求同样根据第一传感器的类型来定,比如第一传感器是压力传感器,那么第二预设要求可以是第二压力阈值。At the same time, in addition to satisfying the second touch duration, the second touch signal and the m consecutive touch signal values also need to satisfy a second preset requirement. The second preset requirement is also determined according to the type of the first sensor. For example, if the first sensor is a pressure sensor, the second preset requirement may be a second pressure threshold.
即,同样为了防止误触,只有用户对电源按键的按压力度超过一定的压力阈值才能确定这个第二触摸信号值是用于指示将电子设备从关机模式唤醒的信号。That is, in order to prevent accidental touches, only when the user's pressure on the power button exceeds a certain pressure threshold can it be determined that the second touch signal value is a signal for instructing to wake up the electronic device from the shutdown mode.
也就是说,在本申请实施例中,第二触摸信号中需要包括连续m个满足第二预设要求(如第二压力阈值)的触摸信号值,才表示用户的第三触摸操作是有效唤醒行为,进而固态按键的微控制器才响应于这个第二触摸信号将电子设备的工作模式从关机模式切换运行模式。电子设备工作模式的切换,固态按键的微控制器可以通过电平控制信号向电子设备的电源管理模块PMU发送电平控制信号实现。That is to say, in the embodiment of the present application, the second touch signal needs to include m consecutive touch signal values that meet the second preset requirement (such as the second pressure threshold) to indicate that the user's third touch operation is an effective wake-up behavior, and then the microcontroller of the solid-state button switches the working mode of the electronic device from the shutdown mode to the operating mode in response to the second touch signal. The switching of the working mode of the electronic device can be achieved by the microcontroller of the solid-state button sending a level control signal to the power management module PMU of the electronic device through the level control signal.
如图11所示,示出了上述根据第一触摸信号和第二触摸信号将电子设备的工作模式切换为运行模式的具体流程。As shown in FIG. 11 , the specific process of switching the working mode of the electronic device to the operating mode according to the first touch signal and the second touch signal is shown.
即,在航运模式下,微控制器根据第一频率(如1Hz)采集到第一触摸操作对应的第一触摸信号之后,若第一触摸信号包括连续n个满足第一预设要求的触摸信号值,则微控制器再将电子设备的工作模式从航运模式切换为运行模式。否则,微控制器将本次的第一触摸操作视为用户误触或者唤醒行为无效,微控制器不切换电子设备的工作模式。That is, in the shipping mode, after the microcontroller collects the first touch signal corresponding to the first touch operation according to the first frequency (such as 1Hz), if the first touch signal includes n consecutive touch signal values that meet the first preset requirement, the microcontroller switches the working mode of the electronic device from the shipping mode to the running mode. Otherwise, the microcontroller regards the first touch operation as a false touch by the user or the awakening behavior is invalid, and the microcontroller does not switch the working mode of the electronic device.
在关机模式下,微控制器根据第二频率(如2Hz)采集到第三触摸操作对应的第二触摸信号之后,若第二触摸信号包括连续m个满足第二预设要求的触摸信号值,则微控制器再将电子设备的工作模式从关机模式切换为运行模式。否则,微控制器将本次的第三触摸操作视为用户误触或者唤醒行为无效,微控制器不切换电子设备的工作模式。In shutdown mode, after the microcontroller collects the second touch signal corresponding to the third touch operation according to the second frequency (such as 2Hz), if the second touch signal includes m consecutive touch signal values that meet the second preset requirement, the microcontroller switches the working mode of the electronic device from shutdown mode to running mode. Otherwise, the microcontroller regards the third touch operation as a false touch by the user or the wake-up behavior is invalid, and the microcontroller does not switch the working mode of the electronic device.
需要说明的是,上述第一预设要求(如第一压力阈值)和第二预设要求(如第二压力阈值)可以根据实际需求设定,本申请实施例对此不作任何限定。在一些实施例中,第一预设要求(如第一压力阈值)可以等于第二预设要求(如第二压力阈值)。It should be noted that the above-mentioned first preset requirement (such as the first pressure threshold) and the second preset requirement (such as the second pressure threshold) can be set according to actual needs, and the embodiments of the present application do not impose any restrictions on this. In some embodiments, the first preset requirement (such as the first pressure threshold) can be equal to the second preset requirement (such as the second pressure threshold).
本申请另一实施例提供一种电子设备,包括:固态按键,该固态按键包括微控制器、存储器以及电源按键;其中,电源按键包括第一传感器,用于采集触摸信号,包括上述实施例所述的第一触摸信号和第二触摸信号。Another embodiment of the present application provides an electronic device, including: a solid-state button, which includes a microcontroller, a memory, and a power button; wherein the power button includes a first sensor for collecting touch signals, including the first touch signal and the second touch signal described in the above embodiment.
电源按键、存储器分别与微控制器耦合;存储器中存储有一个或多个计算机程序代码,计算机程序代码包括计算机指令;当微控制器执行计算机指令时,使得电子设备实现上述任一实施例记载的电子设备的唤醒方法。The power button and the memory are coupled to the microcontroller respectively; one or more computer program codes are stored in the memory, and the computer program codes include computer instructions; when the microcontroller executes the computer instructions, the electronic device implements the wake-up method of the electronic device recorded in any of the above embodiments.
在一些实施例中,电子设备还包括一个或多个处理器(如系统级芯片SOC)。该处理器与固态按键的微控制器耦合。在一些实施例中,固态按键的微控制器通过与处理器通讯确定电子设备是否处于运行模式或待机模式。在一些实施例中,固态按键的微控制器和处理器可以通过I2C/SPI等通讯总线通讯。In some embodiments, the electronic device further includes one or more processors (such as a system-on-chip SOC). The processor is coupled to a microcontroller of the solid-state button. In some embodiments, the microcontroller of the solid-state button determines whether the electronic device is in a running mode or a standby mode by communicating with the processor. In some embodiments, the microcontroller of the solid-state button and the processor can communicate via a communication bus such as I2C/SPI.
以及,在另一些实施例中,在电子设备的工作模式从航运模式切换为运行模式之后,处理器还可以向存储器中添加非航运模式标志位,用于表征电子设备不处于航运模式。And, in some other embodiments, after the working mode of the electronic device is switched from the shipping mode to the operating mode, the processor may further add a non-shipping mode flag to the memory to indicate that the electronic device is not in the shipping mode.
在一些实施例中,存储器包括非易失性存储器,非航运模式标志位可以添加到非易失性存储器中,确保不易丢失。In some embodiments, the memory includes a non-volatile memory, and a non-shipping mode flag bit can be added to the non-volatile memory to ensure that it is not easily lost.
在一些实施例中,固态按键还包括非电源按键和电源模块。其中,电源模块用于独立为固态按键的微控制器、电源按键包括的第一传感器、以及非电源按键包括的第二传感器供电。在一些实施例中,在航运模式或关机模式下,非电源按键的第二传感器可以断电。In some embodiments, the solid-state button further includes a non-power button and a power module. The power module is used to independently power a microcontroller of the solid-state button, a first sensor included in the power button, and a second sensor included in the non-power button. In some embodiments, in the shipping mode or the shutdown mode, the second sensor of the non-power button can be powered off.
在一些实施例中,固态按键还包括供电选择电路和信号调理电路;其中,供电选择电路用于进行供电选择。供电选择电路的输入与电源模块连接,输出与传感器连接。In some embodiments, the solid-state key further includes a power supply selection circuit and a signal conditioning circuit, wherein the power supply selection circuit is used to select power supply, the input of the power supply selection circuit is connected to the power module, and the output is connected to the sensor.
信号调理电路用于对传感器采集的触摸信号进行调理。信号调理电路的输入与传感器连接,输出与微控制器连接。在本申请实施例中,传感器包括电源按键对应的第一传感器和/或非电源按键对应的第二传感器。The signal conditioning circuit is used to condition the touch signal collected by the sensor. The input of the signal conditioning circuit is connected to the sensor, and the output is connected to the microcontroller. In the embodiment of the present application, the sensor includes a first sensor corresponding to the power button and/or a second sensor corresponding to the non-power button.
例如,航运模式和关机模式下,信号调理电路可以对第一传感器采集的第一触摸信号和第二触摸信号进行调理。又例如,运行模式和待机模式下,信号调理电路可以分别对第一传感器和第二传感器采集的触摸信号进行调理。For example, in the shipping mode and the shutdown mode, the signal conditioning circuit can condition the first touch signal and the second touch signal collected by the first sensor. For another example, in the running mode and the standby mode, the signal conditioning circuit can condition the touch signals collected by the first sensor and the second sensor respectively.
本申请另一实施例提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,当计算机程序被电子设备中固态按键的微控制器执行时,使得电子设备实现上述任一实施例记载的电子设备的唤醒方法。Another embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a microcontroller of a solid-state button in an electronic device, the electronic device implements the electronic device wake-up method recorded in any of the above embodiments.
本申请实施例还提供一种计算机程序产品,当计算机程序产品在计算机(即上述电子设备,如手机)中的固态案件的微控制器上运行时,使得计算机执行上述方法实施例中的各个功能或者步骤。该计算机可以是上述电子设备。The present application also provides a computer program product, which, when executed on a microcontroller of a solid-state case in a computer (i.e., the electronic device described above, such as a mobile phone), enables the computer to perform various functions or steps in the method embodiment described above. The computer may be the electronic device described above.
本申请实施例还提供一种芯片系统,如图12所示,该芯片系统1200包括至少一个处理器1201和至少一个接口电路1202。处理器1201和接口电路1202可通过线路互联。例如,接口电路1202可用于从其它装置(例如计算机的存储器)接收信号。又例如,接口电路1202可用于向其它装置(例如处理器1201)发送信号。The embodiment of the present application also provides a chip system, as shown in FIG12, the chip system 1200 includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 can be interconnected through a line. For example, the interface circuit 1202 can be used to receive signals from other devices (such as a computer memory). For another example, the interface circuit 1202 can be used to send signals to other devices (such as the processor 1201).
示例性的,接口电路1202可读取存储器中存储的指令,并将该指令发送给处理器1201。当指令被处理器1201执行时,可使得计算机执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。Exemplarily, the interface circuit 1202 can read the instruction stored in the memory and send the instruction to the processor 1201. When the instruction is executed by the processor 1201, the computer can execute the various steps in the above embodiment. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used 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.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410142406.7A CN117667240B (en) | 2024-02-01 | 2024-02-01 | Electronic device wake-up method, electronic device, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410142406.7A CN117667240B (en) | 2024-02-01 | 2024-02-01 | Electronic device wake-up method, electronic device, and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117667240A CN117667240A (en) | 2024-03-08 |
CN117667240B true CN117667240B (en) | 2024-07-05 |
Family
ID=90084791
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410142406.7A Active CN117667240B (en) | 2024-02-01 | 2024-02-01 | Electronic device wake-up method, electronic device, and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117667240B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109782988A (en) * | 2019-01-22 | 2019-05-21 | Oppo广东移动通信有限公司 | Terminal device, working mode switching method and storage medium |
CN116737290A (en) * | 2022-09-30 | 2023-09-12 | 荣耀终端有限公司 | Finger joint knocking event identification method and electronic equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2660769B1 (en) * | 1990-04-06 | 1994-09-23 | Neiman Sa | MICROPROCESSOR POWER SUPPLY WAKE-UP CIRCUIT, PARTICULARLY FOR AN IDENTIFICATION CARD OF AN AUTOMOTIVE REMOTE CONTROL ASSEMBLY. |
CN102929425B (en) * | 2012-09-24 | 2016-02-24 | 惠州Tcl移动通信有限公司 | A kind of touch key control method and device |
CA3163092A1 (en) * | 2019-11-26 | 2021-06-03 | Juul Labs, Inc. | Vaporizer device with responsive inhalation detection |
-
2024
- 2024-02-01 CN CN202410142406.7A patent/CN117667240B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109782988A (en) * | 2019-01-22 | 2019-05-21 | Oppo广东移动通信有限公司 | Terminal device, working mode switching method and storage medium |
CN116737290A (en) * | 2022-09-30 | 2023-09-12 | 荣耀终端有限公司 | Finger joint knocking event identification method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN117667240A (en) | 2024-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101714021B (en) | Computer of hybrid system | |
AU2013309693B2 (en) | An apparatus and method for waking up a processor | |
CN103002148B (en) | Music switching method based on mobile terminal in dormacy and mobile terminal | |
CN102778943B (en) | Condition control method, device and portable terminal device | |
TWI225982B (en) | Power shutdown method of wireless peripheral device | |
EP2857929B1 (en) | Information processing apparatus, information processing system, and power control method | |
CN103746819B (en) | A kind of terminal power-economizing method and terminal, system | |
CN116709477B (en) | Sleep awakening method, electronic device, bluetooth peripheral and storage medium | |
CN109831700A (en) | A kind of standby mode switching method, device, electronic equipment and storage medium | |
CN114816026A (en) | Low-power-consumption standby method, electronic equipment and computer-readable storage medium | |
CN113660149B (en) | Equipment control method and device, storage medium and electronic equipment | |
CN113031749A (en) | Electronic device | |
CN103065654B (en) | Mobile device chip and mobile device control method thereof | |
CN101923456B (en) | Computer system and method for accessing audio data in non-starting state | |
CN117667240B (en) | Electronic device wake-up method, electronic device, and computer-readable storage medium | |
CN107291213B (en) | Mode selection method, apparatus, terminal, and computer-readable storage medium | |
CN107277906B (en) | Mode selection method, device, terminal and computer readable storage medium | |
CN111596729B (en) | A micro high-performance computer host system and use method | |
CN106227322B (en) | Method and terminal for adjusting screen working mode | |
CN117724599A (en) | Dormancy method, electronic equipment and computer readable storage medium | |
CN116667268A (en) | Method for preventing triggering over-current protection and electronic equipment | |
WO2015007028A1 (en) | Control method and control device for sensors | |
CN212694372U (en) | Electronic device | |
CN111159068B (en) | Information processing method and electronic device | |
JP2001282425A (en) | Control device for remote control connection |
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 | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |