Movatterモバイル変換


[0]ホーム

URL:


CN112014866A - Movement track recording method and related equipment - Google Patents

Movement track recording method and related equipment
Download PDF

Info

Publication number
CN112014866A
CN112014866ACN201910473286.8ACN201910473286ACN112014866ACN 112014866 ACN112014866 ACN 112014866ACN 201910473286 ACN201910473286 ACN 201910473286ACN 112014866 ACN112014866 ACN 112014866A
Authority
CN
China
Prior art keywords
condition
gps data
application processor
electronic device
mcu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910473286.8A
Other languages
Chinese (zh)
Other versions
CN112014866B (en
Inventor
钟振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co LtdfiledCriticalHuawei Technologies Co Ltd
Priority to PCT/CN2020/092322priorityCriticalpatent/WO2020238894A1/en
Priority to EP20812534.4Aprioritypatent/EP3919940A4/en
Priority to US17/435,498prioritypatent/US12164042B2/en
Priority to JP2021559689Aprioritypatent/JP7404389B2/en
Publication of CN112014866ApublicationCriticalpatent/CN112014866A/en
Application grantedgrantedCritical
Publication of CN112014866BpublicationCriticalpatent/CN112014866B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The application discloses a motion trail recording method, which comprises the following steps: the electronic equipment records the motion track in a first mode; recording the motion trail in a second mode under the condition that a first condition is met; and under the condition that a second condition is met, the stored processed GPS data of at least two position points are sent to the application processor, and the motion trail is recorded in the first mode. By implementing the application, the application processor can be dormant when the motion trail is recorded in the second mode, and the power consumption is reduced.

Description

Translated fromChinese
运动轨迹记录方法及相关设备Movement track recording method and related equipment

技术领域technical field

本申请涉及电子设备技术领域,尤其涉及一种运动轨迹记录方法及相关设备。The present application relates to the technical field of electronic devices, and in particular, to a motion track recording method and related equipment.

背景技术Background technique

用户跑步时,通常使用手机上安装的运动类软件如华为运动健康应用程序(application,APP)记录运动轨迹。在运动轨迹的记录过程中,手机的全球定位系统(global positioning system,GPS)芯片需每秒向应用处理器(application processor,AP)发送一个GPS数据,以使应用处理器收到GPS数据后,对数据进行处理并发送至上层APP,在APP中将位置更新到地图上。用户可在地图中查看自己的运动轨迹。采用这种方式,手机功耗大,续航能力差。When users run, they usually use sports software installed on the mobile phone, such as a Huawei sports health application (application, APP), to record the movement track. In the process of recording the motion track, the global positioning system (GPS) chip of the mobile phone needs to send one GPS data to the application processor (AP) every second, so that after the application processor receives the GPS data, The data is processed and sent to the upper-layer APP, and the location is updated on the map in the APP. Users can view their movements on the map. In this way, the power consumption of the mobile phone is large and the battery life is poor.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种运动轨迹记录方法及相关设备,可降低记录运动轨迹的过程中的功耗,提升电子设备的续航能力。Embodiments of the present application provide a motion track recording method and related equipment, which can reduce power consumption in the process of recording a motion track and improve the battery life of an electronic device.

第一方面,本申请实施例提供了一种电子设备,包括触摸传感器、微控制单元MCU、全球定位系统GPS芯片;其中:上述GPS芯片用于获取上述电子设备当前所处位置的GPS数据;上述应用处理器与上述GPS芯片连接,用于接收上述GPS芯片发送的GPS数据,并采用第一定位算法处理上述GPS数据;上述MCU与上述GPS芯片连接,用于在满足第一条件的情况下,接收上述GPS芯片发送的GPS数据,并采用第二定位算法处理上述GPS数据,保存至少两个位置点的处理后的GPS数据;上述MCU还与上述应用处理器连接,用于在满足第二条件的情况下,将上述至少两个位置点的处理后的GPS数据发送至上述应用处理器。In a first aspect, an embodiment of the present application provides an electronic device, including a touch sensor, a micro-control unit MCU, and a global positioning system GPS chip; wherein: the GPS chip is used to obtain GPS data of the current location of the electronic device; the above The application processor is connected with the above-mentioned GPS chip, and is used for receiving the GPS data sent by the above-mentioned GPS chip, and adopts the first positioning algorithm to process the above-mentioned GPS data; the above-mentioned MCU is connected with the above-mentioned GPS chip, and is used for satisfying the first condition. Receive the GPS data sent by the above-mentioned GPS chip, and use the second positioning algorithm to process the above-mentioned GPS data, and save the processed GPS data of at least two position points; the above-mentioned MCU is also connected with the above-mentioned application processor, for satisfying the second condition. In the case of the above-mentioned at least two position points, the processed GPS data is sent to the above-mentioned application processor.

具体地,上述一个GPS数据为一个位置点对应的经度和纬度。Specifically, the above-mentioned one GPS data is the longitude and latitude corresponding to a position point.

本申请实施例提供的电子设备可通过MCU接收GPS芯片上报的多个GPS数据,且MCU可采用第一定位算法对该多个GPS数据处理之后再批量上报给应用处理器,可以使应用处理器在记录运动轨迹的过程中无需一直处于被唤醒的状态,即应用处理器在记录运动轨迹的过程中可以处于休眠状态,可降低记录运动轨迹的过程中的功耗,提升电子设备的续航能力。此外,本申请实施例提供的方案可适用于所有具备MCU的电子设备,适用范围广。The electronic device provided by the embodiment of the present application can receive multiple GPS data reported by the GPS chip through the MCU, and the MCU can use the first positioning algorithm to process the multiple GPS data and then report it to the application processor in batches, so that the application processor can process the multiple GPS data in batches. In the process of recording the motion track, it is not necessary to be in a state of being awakened all the time, that is, the application processor can be in a dormant state during the process of recording the motion track, which can reduce the power consumption during the process of recording the motion track and improve the battery life of the electronic device. In addition, the solutions provided in the embodiments of the present application can be applied to all electronic devices with MCUs, and have a wide range of applications.

在一种可能的实现方式中,上述电子设备还包括显示屏,上述第一条件为上述显示屏熄灭。In a possible implementation manner, the electronic device further includes a display screen, and the first condition is that the display screen is turned off.

具体地,该实现方式中可以由MCU判断是否满足上述第一条件,还可以由应用处理器判断是否满足上述第一条件。Specifically, in this implementation manner, the MCU may determine whether the above-mentioned first condition is satisfied, and the application processor may also determine whether the above-mentioned first condition is satisfied.

本申请中,电子设备可以在熄屏的情况下,通过MCU接收GPS芯片上报的多个GPS数据,且MCU可采用第一定位算法对该多个GPS数据处理之后再批量上报给应用处理器。因为在熄屏的过程中,用户没有实时查看运动轨迹的需求。因此,可在熄屏的过程中使应用处理器休眠,降低电子设备的功耗。In this application, the electronic device can receive multiple GPS data reported by the GPS chip through the MCU when the screen is turned off, and the MCU can process the multiple GPS data by using the first positioning algorithm and then report it to the application processor in batches. Because in the process of turning off the screen, the user does not have the need to view the movement trajectory in real time. Therefore, the application processor can be hibernated in the process of turning off the screen, thereby reducing the power consumption of the electronic device.

在另外一种可能的实现方式中,上述第一条件为上述MCU已向上述应用处理器发送上述至少两个位置点的处理后的GPS数据的时长已达A秒,且上述至少两个位置点的处理后的GPS数据已发送完毕;其中,A为正整数。In another possible implementation manner, the first condition is that the MCU has sent the processed GPS data of the at least two location points to the application processor for a duration of A seconds, and the at least two location points The processed GPS data has been sent; among them, A is a positive integer.

具体地,该实现方式中可以由MCU判断是否满足上述第一条件。设置A秒可以使应用处理器有足够的时间对GPS数据进行第二次处理。其中,第二次处理包括对MCU发送给应用处理器的GPS数据进行去噪和平滑处理。Specifically, in this implementation manner, the MCU may determine whether the above-mentioned first condition is satisfied. A setting of A seconds gives the application processor enough time to process the GPS data a second time. The second processing includes denoising and smoothing the GPS data sent by the MCU to the application processor.

在另外一种可能的实现方式中,上述电子设备还包括显示屏,上述第一条件为上述显示屏熄灭,且上述至少两个位置点的处理后的GPS数据已发送完毕,且上述应用处理器对上述至少两个位置点的处理后的GPS数据处理完毕。In another possible implementation manner, the electronic device further includes a display screen, and the first condition is that the display screen is off, the processed GPS data of the at least two location points has been sent, and the application processor The processed GPS data for the above at least two position points is processed.

具体地,该实现方式中可以由应用处理器判断是否满足上述第一条件。Specifically, in this implementation manner, the application processor may determine whether the above-mentioned first condition is satisfied.

在另外一种可能的实现方式中,上述电子设备还包括显示屏,上述第二条件为以下任意一项:上述至少两个位置点的处理后的GPS数据达到门限,根据上述至少两个位置点的处理后的GPS数据确定上述应用处理器下一次被唤醒的条件达到,上述显示屏点亮。In another possible implementation manner, the above-mentioned electronic device further includes a display screen, and the above-mentioned second condition is any one of the following: the processed GPS data of the above-mentioned at least two position points reaches a threshold, and according to the above-mentioned at least two position points The processed GPS data determines that the condition for the application processor to be woken up next time is reached, and the display screen lights up.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:上述至少两个位置点的处理后的GPS数据占的内存达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two location points includes: the memory occupied by the processed GPS data of the at least two location points reaches the threshold.

具体地,上述内存的门限可以但不限于是10kb、20kb、25kb等。Specifically, the threshold of the above-mentioned memory may be, but not limited to, 10kb, 20kb, 25kb, and the like.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:保存上述至少两个位置点的处理后的GPS数据的时长达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two position points includes: the time period for saving the processed GPS data of the at least two position points reaches the threshold.

具体地,上述时长的门限可以但不限于是1分钟、3分钟、5分钟等。Specifically, the threshold of the above-mentioned duration may be, but not limited to, 1 minute, 3 minutes, 5 minutes, and the like.

在另外一种可能的实现方式中,上述应用处理器下一次被唤醒的条件由用户设置的语音播报的条件决定。In another possible implementation manner, the condition for the application processor to be woken up next time is determined by the condition of the voice broadcast set by the user.

可能地,用户设置的语音播报条件为按照固定运动距离间隔播报,上述应用处理器下一次被唤醒的条件是当前运动距离与下一次语音播报的运动距离的差为第一距离;其中,上述下一次语音播报的运动距离大于上述当前运动距离。Possibly, the voice broadcast condition set by the user is to broadcast according to the fixed motion distance interval, and the condition that the above-mentioned application processor is woken up next time is that the difference between the current motion distance and the motion distance of the next voice broadcast is the first distance; wherein, the above-mentioned lower The movement distance of a voice broadcast is greater than the above-mentioned current movement distance.

具体地,上述第一距离例可以但不限于是0.05公里、0.1公里、0.2公里等。Specifically, the above-mentioned first distance example may be, but not limited to, 0.05 km, 0.1 km, 0.2 km, and the like.

可能地,用户设置的语音播报条件为按照固定时间间隔播报,上述应用处理器下一次被唤醒的条件是当前时刻与下一次语音播报的时刻的差为第一时长;其中,上述下一次语音播报的时刻晚于上述当前时刻。Possibly, the voice broadcast condition set by the user is to broadcast according to a fixed time interval, and the condition that the above-mentioned application processor is awakened next time is that the difference between the current moment and the moment of the next voice broadcast is the first duration; wherein, the above-mentioned next voice broadcast is later than the current time above.

具体地,上述第一时长可以但不限于是5秒、10秒等。Specifically, the above-mentioned first duration may be, but not limited to, 5 seconds, 10 seconds, and the like.

本申请实施例中,在记录运动轨迹的过程中,将语音播报作为唤醒应用处理器的条件,可以确保应用处理器提前被唤醒,及时进行语音播报。在降低电子设备功耗的同时,不影响用户的正常使用,提升用户体验。In the embodiment of the present application, in the process of recording the motion track, the voice broadcast is used as a condition for waking up the application processor, which can ensure that the application processor is woken up in advance and the voice broadcast is performed in time. While reducing the power consumption of the electronic device, the normal use of the user is not affected, and the user experience is improved.

在另外一种可能的实现方式中,上述第一定位算法所占的内存大于上述第二定位算法所占的内存。In another possible implementation manner, the memory occupied by the first positioning algorithm is greater than the memory occupied by the second positioning algorithm.

具体地,第一定位算法可包括以下几个特性:卡尔曼滤波、最小二乘法、卫星位置、解星历、辅助全球卫星定位系统(Assisted Global Positioning System,AGPS)、美国国家海洋电子协会(National Marine Electronics Association,NMEA)协议。Specifically, the first positioning algorithm may include the following characteristics: Kalman filter, least squares method, satellite position, ephemeris solution, Assisted Global Positioning System (AGPS), National Marine Electronics Association (National Marine Electronics) Association, NMEA) protocol.

具体地,第二定位算法可以包括以下几个特性:卡尔曼滤波、最小二乘法、卫星位置。Specifically, the second positioning algorithm may include the following characteristics: Kalman filter, least squares method, and satellite position.

本申请实施例中提供的第二定位算法存储在MCU中,与第一定位算法相比,可节省MCU的存储空间。同时还可以保证第二定位算法对GPS数据处理的精确度,确保呈现给用户的记录轨迹的准确性。The second positioning algorithm provided in the embodiment of the present application is stored in the MCU, and compared with the first positioning algorithm, the storage space of the MCU can be saved. At the same time, it can also ensure the accuracy of GPS data processing by the second positioning algorithm, and ensure the accuracy of the recorded track presented to the user.

第二方面,本申请实施例提供了一种微控制单元MCU,包括处理模块、存储模块以及收发模块;其中:上述存储模块以及上述收发模块与上述处理模块耦合,上述存储模块用于存储计算机程序代码,上述计算机程序代码包括计算机指令,当上述一个或多个处理模块执行上述计算机指令时,上述MCU执行:通过上述收发模块接收GPS芯片发送的GPS数据;通过上述处理模块采用定位算法对上述GPS数据进行处理;将至少两个位置点的处理后的GPS数据保存至上述存储模块;在满足条件的情况下,通过上述收发模块将上述至少两个位置点的处理后的GPS数据发送至应用处理器。In a second aspect, an embodiment of the present application provides a micro-control unit MCU, including a processing module, a storage module, and a transceiver module; wherein: the storage module and the transceiver module are coupled to the processing module, and the storage module is used to store computer programs Code, above-mentioned computer program code comprises computer instruction, when above-mentioned one or more processing module executes above-mentioned computer instruction, above-mentioned MCU executes: receives GPS data sent by GPS chip through above-mentioned transceiver module; adopts positioning algorithm to above-mentioned GPS data by above-mentioned processing module data processing; save the processed GPS data of at least two position points to the above-mentioned storage module; if the conditions are met, send the processed GPS data of the at least two position points to the application processing through the above-mentioned transceiver module device.

具体地,上述一个GPS数据为一个位置点对应的经度和纬度。Specifically, the above-mentioned one GPS data is the longitude and latitude corresponding to a position point.

本申请实施例提供的MCU可接收GPS芯片上报的多个GPS数据,且MCU可采用定位算法对该多个GPS数据处理之后再批量上报给应用处理器,可以使应用处理器在记录运动轨迹的过程中无需一直处于被唤醒的状态,即应用处理器在记录运动轨迹的过程中可以处于休眠状态,可降低记录运动轨迹的过程中的功耗,提升电子设备的续航能力。The MCU provided in this embodiment of the present application can receive multiple GPS data reported by the GPS chip, and the MCU can use a positioning algorithm to process the multiple GPS data and then report it to the application processor in batches, so that the application processor can record the motion trajectory when The process does not need to be in a state of being awakened all the time, that is, the application processor can be in a dormant state during the process of recording the motion track, which can reduce the power consumption during the process of recording the motion track and improve the battery life of the electronic device.

在一种可能的实现方式中,上述条件为以下任意一项:上述至少两个位置点的处理后的GPS数据达到门限,根据上述至少两个位置点的处理后的GPS数据确定上述应用处理器下一次被唤醒的条件达到。In a possible implementation manner, the above condition is any one of the following: the processed GPS data of the at least two location points reaches a threshold, and the application processor is determined according to the processed GPS data of the at least two location points. The condition for the next wakeup is met.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:上述至少两个位置点的处理后的GPS数据占的内存达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two location points includes: the memory occupied by the processed GPS data of the at least two location points reaches the threshold.

具体地,上述内存的门限可以但不限于是10kb、20kb、25kb等。Specifically, the threshold of the above-mentioned memory may be, but not limited to, 10kb, 20kb, 25kb, and the like.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:保存上述至少两个位置点的处理后的GPS数据的时长达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two position points includes: the time period for saving the processed GPS data of the at least two position points reaches the threshold.

具体地,上述时长的门限可以但不限于是1分钟、3分钟、5分钟等。Specifically, the threshold of the above-mentioned duration may be, but not limited to, 1 minute, 3 minutes, 5 minutes, and the like.

在另外一种可能的实现方式中,上述应用处理器下一次被唤醒的条件由用户设置的语音播报的条件决定。In another possible implementation manner, the condition for the application processor to be woken up next time is determined by the condition of the voice broadcast set by the user.

可能地,用户设置的语音播报条件为按照固定运动距离间隔播报,上述应用处理器下一次被唤醒的条件是当前运动距离与下一次语音播报的运动距离的差为第一距离;其中,上述下一次语音播报的运动距离大于上述当前运动距离。Possibly, the voice broadcast condition set by the user is to broadcast according to the fixed motion distance interval, and the condition that the above-mentioned application processor is woken up next time is that the difference between the current motion distance and the motion distance of the next voice broadcast is the first distance; wherein, the above-mentioned lower The movement distance of a voice broadcast is greater than the above-mentioned current movement distance.

具体地,上述第一距离例可以但不限于是0.05公里、0.1公里、0.2公里等。Specifically, the above-mentioned first distance example may be, but not limited to, 0.05 km, 0.1 km, 0.2 km, and the like.

可能地,用户设置的语音播报条件为按照固定时间间隔播报,上述应用处理器下一次被唤醒的条件是当前时刻与下一次语音播报的时刻的差为第一时长;其中,上述下一次语音播报的时刻晚于上述当前时刻。Possibly, the voice broadcast condition set by the user is to broadcast according to a fixed time interval, and the condition that the above-mentioned application processor is awakened next time is that the difference between the current moment and the moment of the next voice broadcast is the first duration; wherein, the above-mentioned next voice broadcast is later than the current time above.

具体地,上述第一时长可以但不限于是5秒、10秒等。Specifically, the above-mentioned first duration may be, but not limited to, 5 seconds, 10 seconds, and the like.

本申请实施例中,在记录运动轨迹的过程中,将语音播报作为唤醒应用处理器的条件,可以确保应用处理器提前被唤醒,及时进行语音播报。在降低电子设备功耗的同时,不影响用户的正常使用,提升用户体验。In the embodiment of the present application, in the process of recording the motion track, the voice broadcast is used as a condition for waking up the application processor, which can ensure that the application processor is woken up in advance and the voice broadcast is performed in time. While reducing the power consumption of the electronic device, the normal use of the user is not affected, and the user experience is improved.

第三方面,本申请实施例提供了一种运动轨迹记录方法,上述方法应用于电子设备,上述电子设备包括应用处理器、微控制单元MCU、全球定位系统GPS芯片,上述方法包括:上述电子设备以第一模式记录运动轨迹;其中,上述第一模式为上述GPS芯片与上述应用处理器连接,将上述GPS芯片获取的GPS数据发送至上述应用处理器,上述应用处理器采用第一定位算法对上述GPS数据进行处理;在满足第一条件的情况下,上述电子设备以第二模式记录运动轨迹;其中,上述二模式为上述GPS芯片与上述MCU连接,将上述GPS芯片获取的GPS数据发送至上述MCU,上述MCU采用第二定位算法处理上述GPS数据,并保存至少两个位置点的处理后的GPS数据;在满足第二条件的情况下,上述MCU将保存的上述至少两个位置点的处理后的GPS数据发送至上述应用处理器,且上述电子设备以第一模式记录运动轨迹。In a third aspect, an embodiment of the present application provides a method for recording a motion trajectory. The above method is applied to an electronic device, and the above electronic device includes an application processor, a micro control unit MCU, and a global positioning system GPS chip, and the above method includes: the above electronic device. Record the motion track in a first mode; wherein, the first mode is that the GPS chip is connected to the application processor, the GPS data obtained by the GPS chip is sent to the application processor, and the application processor adopts the first positioning algorithm to The above-mentioned GPS data is processed; in the case of satisfying the first condition, the above-mentioned electronic device records the motion track in the second mode; wherein, the above-mentioned two modes are that the above-mentioned GPS chip is connected to the above-mentioned MCU, and the GPS data obtained by the above-mentioned GPS chip is sent to the The above-mentioned MCU, the above-mentioned MCU uses the second positioning algorithm to process the above-mentioned GPS data, and saves the processed GPS data of at least two position points; when the second condition is satisfied, the above-mentioned MCU will save the above-mentioned at least two position points. The processed GPS data is sent to the application processor, and the electronic device records the motion track in the first mode.

具体地,上述一个GPS数据为一个位置点对应的经度和纬度。Specifically, the above-mentioned one GPS data is the longitude and latitude corresponding to a position point.

本申请实施例提供的运动轨迹记录方法可通过MCU接收GPS芯片上报的多个GPS数据,且MCU可采用第一定位算法对该多个GPS数据处理之后再批量上报给应用处理器,可以使应用处理器在记录运动轨迹的过程中无需一直处于被唤醒的状态,即应用处理器在记录运动轨迹的过程中可以处于休眠状态,可降低记录运动轨迹的过程中的功耗,提升电子设备的续航能力。此外,本申请实施例提供的方案可适用于所有具备MCU的电子设备,适用范围广。The motion trajectory recording method provided by the embodiment of the present application can receive multiple GPS data reported by the GPS chip through the MCU, and the MCU can use the first positioning algorithm to process the multiple GPS data and then report it to the application processor in batches, which can make the application The processor does not need to be in a wake-up state during the process of recording the motion track, that is, the application processor can be in a dormant state during the process of recording the motion track, which can reduce the power consumption in the process of recording the motion track and improve the battery life of the electronic device. ability. In addition, the solutions provided in the embodiments of the present application can be applied to all electronic devices with MCUs, and have a wide range of applications.

在一种可能的实现方式中,上述电子设备还包括显示屏,上述第一条件为上述显示屏熄灭。In a possible implementation manner, the electronic device further includes a display screen, and the first condition is that the display screen is turned off.

具体地,该实现方式中可以由MCU判断是否满足上述第一条件,还可以由应用处理器判断是否满足上述第一条件。Specifically, in this implementation manner, the MCU may determine whether the above-mentioned first condition is satisfied, and the application processor may also determine whether the above-mentioned first condition is satisfied.

本申请中,电子设备可以在熄屏的情况下,通过MCU接收GPS芯片上报的多个GPS数据,且MCU可采用第一定位算法对该多个GPS数据处理之后再批量上报给应用处理器。因为在熄屏的过程中,用户没有实时查看运动轨迹的需求。因此,可在熄屏的过程中使应用处理器休眠,降低电子设备的功耗。In this application, the electronic device can receive multiple GPS data reported by the GPS chip through the MCU when the screen is turned off, and the MCU can process the multiple GPS data by using the first positioning algorithm and then report it to the application processor in batches. Because in the process of turning off the screen, the user does not have the need to view the movement trajectory in real time. Therefore, the application processor can be hibernated in the process of turning off the screen, thereby reducing the power consumption of the electronic device.

在另外一种可能的实现方式中,上述第一条件为上述MCU已向上述应用处理器发送上述至少两个位置点的处理后的GPS数据的时长已达A秒,且上述至少两个位置点的处理后的GPS数据已发送完毕;其中,A为正整数。In another possible implementation manner, the first condition is that the MCU has sent the processed GPS data of the at least two location points to the application processor for a duration of A seconds, and the at least two location points The processed GPS data has been sent; among them, A is a positive integer.

具体地,该实现方式中可以由MCU判断是否满足上述第一条件。设置A秒可以使应用处理器有足够的时间对GPS数据进行第二次处理。其中,第二次处理包括对MCU发送给应用处理器的GPS数据进行去噪和平滑处理。Specifically, in this implementation manner, the MCU may determine whether the above-mentioned first condition is satisfied. A setting of A seconds gives the application processor enough time to process the GPS data a second time. The second processing includes denoising and smoothing the GPS data sent by the MCU to the application processor.

在另外一种可能的实现方式中,上述电子设备还包括显示屏,上述第一条件为上述显示屏熄灭,且上述至少两个位置点的处理后的GPS数据已发送完毕,且上述应用处理器对上述至少两个位置点的处理后的GPS数据处理完毕。In another possible implementation manner, the electronic device further includes a display screen, and the first condition is that the display screen is off, the processed GPS data of the at least two location points has been sent, and the application processor The processed GPS data for the above at least two position points is processed.

具体地,该实现方式中可以由应用处理器判断是否满足上述第一条件。Specifically, in this implementation manner, the application processor may determine whether the above-mentioned first condition is satisfied.

在另外一种可能的实现方式中,上述电子设备还包括显示屏,上述第二条件为以下任意一项:上述至少两个位置点的处理后的GPS数据达到门限,根据上述至少两个位置点的处理后的GPS数据确定上述应用处理器下一次被唤醒的条件达到,上述显示屏点亮。In another possible implementation manner, the above-mentioned electronic device further includes a display screen, and the above-mentioned second condition is any one of the following: the processed GPS data of the above-mentioned at least two position points reaches a threshold, and according to the above-mentioned at least two position points The processed GPS data determines that the condition for the application processor to be woken up next time is reached, and the display screen lights up.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:上述至少两个位置点的处理后的GPS数据占的内存达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two location points includes: the memory occupied by the processed GPS data of the at least two location points reaches the threshold.

具体地,上述内存的门限可以但不限于是10kb、20kb、25kb等。Specifically, the threshold of the above-mentioned memory may be, but not limited to, 10kb, 20kb, 25kb, and the like.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:保存上述至少两个位置点的处理后的GPS数据的时长达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two position points includes: the time period for saving the processed GPS data of the at least two position points reaches the threshold.

具体地,上述时长的门限可以但不限于是1分钟、3分钟、5分钟等。Specifically, the threshold of the above-mentioned duration may be, but not limited to, 1 minute, 3 minutes, 5 minutes, and the like.

在另外一种可能的实现方式中,上述应用处理器下一次被唤醒的条件由用户设置的语音播报的条件决定。In another possible implementation manner, the condition for the application processor to be woken up next time is determined by the condition of the voice broadcast set by the user.

可能地,用户设置的语音播报条件为按照固定运动距离间隔播报,上述应用处理器下一次被唤醒的条件是当前运动距离与下一次语音播报的运动距离的差为第一距离;其中,上述下一次语音播报的运动距离大于上述当前运动距离。Possibly, the voice broadcast condition set by the user is to broadcast according to the fixed motion distance interval, and the condition that the above-mentioned application processor is woken up next time is that the difference between the current motion distance and the motion distance of the next voice broadcast is the first distance; wherein, the above-mentioned lower The movement distance of a voice broadcast is greater than the above-mentioned current movement distance.

具体地,上述第一距离例可以但不限于是0.05公里、0.1公里、0.2公里等。Specifically, the above-mentioned first distance example may be, but not limited to, 0.05 km, 0.1 km, 0.2 km, and the like.

可能地,用户设置的语音播报条件为按照固定时间间隔播报,上述应用处理器下一次被唤醒的条件是当前时刻与下一次语音播报的时刻的差为第一时长;其中,上述下一次语音播报的时刻晚于上述当前时刻。Possibly, the voice broadcast condition set by the user is to broadcast according to a fixed time interval, and the condition that the above-mentioned application processor is awakened next time is that the difference between the current moment and the moment of the next voice broadcast is the first duration; wherein, the above-mentioned next voice broadcast is later than the current time above.

具体地,上述第一时长可以但不限于是5秒、10秒等。Specifically, the above-mentioned first duration may be, but not limited to, 5 seconds, 10 seconds, and the like.

本申请实施例中,在记录运动轨迹的过程中,将语音播报作为唤醒应用处理器的条件,可以确保应用处理器提前被唤醒,及时进行语音播报。在降低电子设备功耗的同时,不影响用户的正常使用,提升用户体验。In the embodiment of the present application, in the process of recording the motion track, the voice broadcast is used as a condition for waking up the application processor, which can ensure that the application processor is woken up in advance and the voice broadcast is performed in time. While reducing the power consumption of the electronic device, the normal use of the user is not affected, and the user experience is improved.

在另外一种可能的实现方式中,上述第一定位算法所占的内存大于上述第二定位算法所占的内存。In another possible implementation manner, the memory occupied by the first positioning algorithm is greater than the memory occupied by the second positioning algorithm.

具体地,第一定位算法可包括以下几个特性:卡尔曼滤波、最小二乘法、卫星位置、解星历、辅助全球卫星定位系统(Assisted Global Positioning System,AGPS)、美国国家海洋电子协会(National Marine Electronics Association,NMEA)协议。Specifically, the first positioning algorithm may include the following characteristics: Kalman filter, least squares method, satellite position, ephemeris solution, Assisted Global Positioning System (AGPS), National Marine Electronics Association (National Marine Electronics) Association, NMEA) protocol.

具体地,第二定位算法可以包括以下几个特性:卡尔曼滤波、最小二乘法、卫星位置。Specifically, the second positioning algorithm may include the following characteristics: Kalman filter, least squares method, and satellite position.

本申请实施例中提供的第二定位算法存储在MCU中,与第一定位算法相比,可节省MCU的存储空间。同时还可以保证第二定位算法对GPS数据处理的精确度,确保呈现给用户的记录轨迹的准确性。The second positioning algorithm provided in the embodiment of the present application is stored in the MCU, and compared with the first positioning algorithm, the storage space of the MCU can be saved. At the same time, it can also ensure the accuracy of GPS data processing by the second positioning algorithm, and ensure the accuracy of the recorded track presented to the user.

第四方面,本申请实施例提供了另外一种运动轨迹记录方法,上述方法应用于微控制单元MCU,上述MCU与GPS芯片连接,上述MCU还与应用处理器连接,上述方法包括:接收上述GPS芯片发送的GPS数据;采用定位算法对上述GPS数据进行处理;保存至少两个位置点的处理后的GPS数据;在满足条件的情况下,将上述至少两个位置点的处理后的GPS数据发送至应用处理器。In a fourth aspect, an embodiment of the present application provides another method for recording a motion track. The method is applied to a micro-control unit MCU, the MCU is connected to a GPS chip, and the MCU is also connected to an application processor. The method includes: receiving the GPS GPS data sent by the chip; use a positioning algorithm to process the above GPS data; save the processed GPS data of at least two position points; if the conditions are met, send the processed GPS data of the above at least two position points to the application processor.

具体地,上述GPS数据为一个位置点对应的经度和纬度。Specifically, the above-mentioned GPS data is the longitude and latitude corresponding to a location point.

本申请实施例提供的运动轨迹记录方法可接收GPS芯片上报的多个GPS数据,且可采用定位算法对该多个GPS数据处理之后再批量上报给应用处理器,可以使应用处理器在记录运动轨迹的过程中无需一直处于被唤醒的状态,即应用处理器在记录运动轨迹的过程中可以处于休眠状态,可降低记录运动轨迹的过程中的功耗,提升电子设备的续航能力。The motion track recording method provided by the embodiment of the present application can receive multiple GPS data reported by a GPS chip, and can use a positioning algorithm to process the multiple GPS data and then report it to the application processor in batches, so that the application processor can record the motion while recording the motion. There is no need to be in a state of being awakened all the time in the process of the trajectory, that is, the application processor can be in a dormant state during the process of recording the motion trajectory, which can reduce the power consumption during the process of recording the motion trajectory and improve the battery life of the electronic device.

在一种可能的实现方式中,上述条件为以下任意一项:上述至少两个位置点的处理后的GPS数据达到门限,根据上述至少两个位置点的处理后的GPS数据确定上述应用处理器下一次被唤醒的条件达到。In a possible implementation manner, the above condition is any one of the following: the processed GPS data of the at least two location points reaches a threshold, and the application processor is determined according to the processed GPS data of the at least two location points. The condition for the next wakeup is met.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:上述至少两个位置点的处理后的GPS数据占的内存达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two location points includes: the memory occupied by the processed GPS data of the at least two location points reaches the threshold.

具体地,上述内存的门限可以但不限于是10kb、20kb、25kb等。Specifically, the threshold of the above-mentioned memory may be, but not limited to, 10kb, 20kb, 25kb, and the like.

可能地,上述至少两个位置点的处理后的GPS数据达到门限包括:保存上述至少两个位置点的处理后的GPS数据的时长达到门限。Possibly, reaching the threshold for the processed GPS data of the at least two position points includes: the time period for saving the processed GPS data of the at least two position points reaches the threshold.

具体地,上述时长的门限可以但不限于是1分钟、3分钟、5分钟等。Specifically, the threshold of the above-mentioned duration may be, but not limited to, 1 minute, 3 minutes, 5 minutes, and the like.

在另外一种可能的实现方式中,上述应用处理器下一次被唤醒的条件由用户设置的语音播报的条件决定。In another possible implementation manner, the condition for the application processor to be woken up next time is determined by the condition of the voice broadcast set by the user.

可能地,,用户设置的语音播报条件为按照固定运动距离间隔播报,上述应用处理器下一次被唤醒的条件是当前运动距离与下一次语音播报的运动距离的差为第一距离;其中,上述下一次语音播报的运动距离大于上述当前运动距离。Possibly, the voice broadcast condition set by the user is to broadcast according to the fixed motion distance interval, and the condition that the above-mentioned application processor is awakened next time is that the difference between the current motion distance and the motion distance of the next voice broadcast is the first distance; wherein, the above-mentioned The movement distance of the next voice broadcast is greater than the above-mentioned current movement distance.

具体地,上述第一距离例可以但不限于是0.05公里、0.1公里、0.2公里等。Specifically, the above-mentioned first distance example may be, but not limited to, 0.05 km, 0.1 km, 0.2 km, and the like.

可能地,用户设置的语音播报条件为按照固定时间间隔播报,上述应用处理器下一次被唤醒的条件是当前时刻与下一次语音播报的时刻的差为第一时长;其中,上述下一次语音播报的时刻晚于上述当前时刻。Possibly, the voice broadcast condition set by the user is to broadcast according to a fixed time interval, and the condition that the above-mentioned application processor is awakened next time is that the difference between the current moment and the moment of the next voice broadcast is the first duration; wherein, the above-mentioned next voice broadcast is later than the current time above.

具体地,上述第一时长可以但不限于是5秒、10秒等。Specifically, the above-mentioned first duration may be, but not limited to, 5 seconds, 10 seconds, and the like.

本申请实施例中,在记录运动轨迹的过程中,将语音播报作为唤醒应用处理器的条件,可以确保应用处理器提前被唤醒,及时进行语音播报。在降低电子设备功耗的同时,不影响用户的正常使用,提升用户体验。In the embodiment of the present application, in the process of recording the motion track, the voice broadcast is used as a condition for waking up the application processor, which can ensure that the application processor is woken up in advance and the voice broadcast is performed in time. While reducing the power consumption of the electronic device, the normal use of the user is not affected, and the user experience is improved.

第五方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器、存储器以及无线通信模块;上述存储器以及上述无线通信模块与一个或多个处理器耦合,上述存储器用于存储计算机程序代码,上述计算机程序代码包括计算机指令,当上述一个或多个处理器执行上述计算机指令时,电子设备执行如第三方面或第三方面的任意一种实现方式提供的运动轨迹记录方法。In a fifth aspect, an embodiment of the present application provides an electronic device, including: one or more processors, a memory, and a wireless communication module; the above-mentioned memory and the above-mentioned wireless communication module are coupled with one or more processors, and the above-mentioned memory is used for Store computer program codes, and the computer program codes include computer instructions. When the above-mentioned one or more processors execute the above-mentioned computer instructions, the electronic device executes the motion trajectory recording method provided by the third aspect or any implementation manner of the third aspect. .

第六方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第三方面或第三方面的任意一种实现方式提供的运动轨迹记录方法。In a sixth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to execute the third aspect or any one of the implementation manners of the third aspect. Motion track recording method.

第七方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第三方面或第三方面的任意一种实现方式提供的运动轨迹记录方法。In a seventh aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables the computer to execute the motion trajectory recording method provided by the third aspect or any implementation manner of the third aspect.

第八方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如第四方面或第四方面的任意一种实现方式提供的运动轨迹记录方法。In an eighth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions, when the computer instructions are executed on an electronic device, the electronic device is made to execute the fourth aspect or any one of the implementation manners of the fourth aspect. Motion track recording method.

第九方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如第四方面或第四方面的任意一种实现方式提供的运动轨迹记录方法。In a ninth aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, causes the computer to execute the motion trajectory recording method provided by the fourth aspect or any implementation manner of the fourth aspect.

可以理解地,上述提供的第五方面提供的电子设备、第六方面提供的计算机存储介质或者第七方面提供的计算机程序产品均用于执行第三方面所提供的运动轨迹记录方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。Understandably, the electronic device provided in the fifth aspect, the computer storage medium provided in the sixth aspect, or the computer program product provided in the seventh aspect are all used to execute the motion track recording method provided in the third aspect. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.

可以理解地,上述第八方面提供的计算机存储介质或者第九方面提供的计算机程序产品均用于执行第四方面所提供的运动轨迹记录方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。It can be understood that, the computer storage medium provided in the eighth aspect or the computer program product provided in the ninth aspect are both used for executing the motion track recording method provided in the fourth aspect. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding method, which will not be repeated here.

附图说明Description of drawings

图1为本申请实施例提供的应用场景示意图;1 is a schematic diagram of an application scenario provided by an embodiment of the present application;

图2a为本申请实施例提供的电子设备的结构示意图;2a is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图2b为本申请实施例提供的电子设备的软件架构示意图;FIG. 2b is a schematic diagram of a software architecture of an electronic device provided by an embodiment of the present application;

图3-图5为本申请实施例提供的用户界面示意图;3-5 are schematic diagrams of user interfaces provided by the embodiments of the present application;

图6为本申请实施例提供的两种记录模式下各部件之间的连接关系示意图;6 is a schematic diagram of a connection relationship between components under two recording modes provided by an embodiment of the present application;

图7为本申请实施例提供的运动轨迹记录方法流程示意图;7 is a schematic flowchart of a method for recording a motion trajectory provided by an embodiment of the present application;

图8为本申请另一实施例提供的运动轨迹记录方法流程示意图;8 is a schematic flowchart of a motion trajectory recording method provided by another embodiment of the present application;

图9为本申请实施例提供的MCU的结构示意图;FIG. 9 is a schematic structural diagram of an MCU provided by an embodiment of the present application;

图10为本申请另一实施例提供的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to another embodiment of the present application.

具体实施方式Detailed ways

下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings.

本申请实施例提供了一种运动轨迹的记录方法。如图1所示,在用户A进行户外运动的过程中,可随身携带电子设备B,电子设备B上可以安装运动类的软件(如华为运动健康APP)。用户A在运动的过程中开启华为运动健康APP,可以使用电子设备B记录用户A在运动过程中的轨迹。The embodiment of the present application provides a method for recording a motion trajectory. As shown in FIG. 1 , when user A is exercising outdoors, he can carry electronic device B with him, and electronic device B can install sports software (such as the Huawei Sports Health APP). User A starts the Huawei Sports Health APP during exercise, and can use electronic device B to record user A's trajectory during exercise.

具体地,电子设备B的GPS芯片可与微控制单元(microcontroller unit,MCU)连接,且MCU会保存GPS芯片发送的GPS数据,再批量发送给应用处理器,应用处理器可以将用户B的运动轨迹显示在华为运动健康APP的用户界面中供用户B查看。这样,既可以保证GPS定位精度高,又可以降低在记录运动轨迹过程中的功耗,提升电子设备的续航能力。Specifically, the GPS chip of the electronic device B can be connected to a microcontroller unit (MCU), and the MCU will save the GPS data sent by the GPS chip, and then send it to the application processor in batches, and the application processor can record the movement of user B. The trajectory is displayed on the user interface of the Huawei Sports Health app for user B to view. In this way, it can not only ensure high GPS positioning accuracy, but also reduce the power consumption in the process of recording the movement track, and improve the battery life of the electronic device.

不限于华为运动健康APP,在具体实现中还可以是Keep、咕咚运动等APP,本申请实施例对此不做限定。本申请后续实施例均以华为运动健康APP为例进行说明。It is not limited to the HUAWEI Sports Health APP, and may also be APPs such as Keep, Goodong Sports, etc. in a specific implementation, which is not limited in this embodiment of the present application. Subsequent embodiments of this application are described by taking the Huawei Sports Health APP as an example.

上述户外运动可以但不限于是户外跑步、骑行或登山等运动。The above-mentioned outdoor sports may be, but are not limited to, outdoor running, cycling, or mountaineering.

本申请实施例中涉及的电子设备可以是便携式移动终端,例如手机、平板电脑、上网本、个人数字助理(Personal Digital Assistant,PDA)、可穿戴电子设备(如智能手环、智能手表等)、虚拟现实设备等。The electronic devices involved in the embodiments of the present application may be portable mobile terminals, such as mobile phones, tablet computers, netbooks, personal digital assistants (PDAs), wearable electronic devices (such as smart bracelets, smart watches, etc.), virtual Reality equipment, etc.

接下来,介绍本申请以下实施例中提供的示例性电子设备。Next, exemplary electronic devices provided in the following embodiments of the present application are introduced.

图2a示出了电子设备100的结构示意图。FIG. 2 a shows a schematic structural diagram of the electronic device 100 .

电子设备100可以包括处理器110,内部存储器120,通用串行总线(universalserial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,显示屏192,等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,加速度传感器180C,距离传感器180D,接近光传感器180E,指纹传感器180F,触摸传感器180G,环境光传感器180H等。The electronic device 100 may include aprocessor 110, an internal memory 120, a universal serial bus (USB) interface 130, acharging management module 140, apower management module 141, a battery 142, an antenna 1, an antenna 2, amobile communication module 150, A wireless communication module 160, anaudio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, a display screen 192, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an acceleration sensor 180C, a distance sensor 180D, a proximity light sensor 180E, a fingerprint sensor 180F, a touch sensor 180G, an ambient light sensor 180H, and the like.

可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structures illustrated in the embodiments of the present invention do 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 less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。具体地,无线通信模块160可以包括GPS芯片,用于获取当前位置的原始GPS数据(经纬度),从而提供应用在电子设备100上的GNSS的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems applied on the electronic device 100 . (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. Specifically, the wireless communication module 160 may include a GPS chip for acquiring raw GPS data (latitude and longitude) of the current position, so as to provide a GNSS solution applied on the electronic device 100 . The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to theprocessor 110 . The wireless communication module 160 can also receive the signal to be sent from theprocessor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。Theprocessor 110 may include one or more processing units, for example, theprocessor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor ( image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

控制器可以是MCU,根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be an MCU, which generates an operation control signal according to an instruction operation code and a timing signal, and completes the control of fetching and executing instructions.

具体地,MCU可以用于接收GPS芯片发送的原始GPS数据,并采用第一定位算法对原始GPS数据进行处理,保存至少两个位置点的处理后的GPS数据,并将至少两个位置点的处理后的GPS数据发送至应用处理器。Specifically, the MCU can be used to receive the original GPS data sent by the GPS chip, and use the first positioning algorithm to process the original GPS data, save the processed GPS data of at least two location points, and store the processed GPS data of at least two location points. The processed GPS data is sent to the application processor.

在一种使用场景中,应用处理器可以用于接收MCU发送的至少两个位置点的处理后的GPS数据,并将其显示在运动类APP(如华为运动健康APP)中。In one usage scenario, the application processor may be configured to receive the processed GPS data of at least two location points sent by the MCU, and display it in a sports APP (such as the Huawei Sports Health APP).

在另外一种使用场景中,应用处理器可以用于接收GPS芯片发送的原始GPS数据,对原始GPS数据进行处理,并将其显示在运动类APP(如华为运动健康APP)中。In another usage scenario, the application processor can be used to receive the raw GPS data sent by the GPS chip, process the raw GPS data, and display it in a sports APP (such as the Huawei Sports Health APP).

具体地,为了保证电子设备100记录的运动轨迹的精度高,GPS芯片发送原始GPS数据至应用处理器或MCU的频率可以但不限于是每秒一次。Specifically, in order to ensure high accuracy of the motion track recorded by the electronic device 100 , the frequency at which the GPS chip sends raw GPS data to the application processor or MCU may be, but not limited to, once per second.

不限于与GPS芯片连接,在具体实现中,MCU还可以与各种传感器,如陀螺仪传感器180B、加速度传感器180C、接近光传感器180E等连接,用于处理来自各种传感器设备的数据,本申请实施例对此不做限定。It is not limited to be connected to the GPS chip. In the specific implementation, the MCU can also be connected to various sensors, such as the gyroscope sensor 180B, the acceleration sensor 180C, the proximity light sensor 180E, etc., for processing data from various sensor devices. This application The embodiment does not limit this.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in theprocessor 110 for storing instructions and data. In some embodiments, the memory inprocessor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by theprocessor 110 . If theprocessor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of theprocessor 110 is reduced, thereby increasing the efficiency of the system.

在一些实施例中,处理器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)接口等。In some embodiments, theprocessor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) interface /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and/or Universal serial bus (universal serial bus, USB) interface, etc.

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.

可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.

充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。Thecharging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, thecharging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, thecharging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While thecharging management module 140 charges the battery 142 , it can also supply power to the electronic device through thepower management module 141 .

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。Thepower management module 141 is used for connecting the battery 142 , thecharging management module 140 and theprocessor 110 . Thepower management module 141 receives input from the battery 142 and/or thecharging management module 140, and supplies power to theprocessor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. Thepower management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, thepower management module 141 may also be provided in theprocessor 110 . In other embodiments, thepower management module 141 and thecharging management module 140 may also be provided in the same device.

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, themobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。Themobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . Themobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. Themobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. Themobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of themobile communication module 150 may be provided in theprocessor 110 . In some embodiments, at least part of the functional modules of themobile communication module 150 may be provided in the same device as at least part of the modules of theprocessor 110 .

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏192显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 192 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of theprocessor 110, and may be provided in the same device as themobile communication module 150 or other functional modules.

电子设备100通过GPU,显示屏192,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏192和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 192, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 192 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.

显示屏192用于显示图像,视频等。显示屏192包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏192,N为大于1的正整数。The display screen 192 is used to display images, videos, and the like. The display screen 192 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). , AMOLED), flexible light-emitting diodes (flex light-emitting diodes, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 192 , where N is a positive integer greater than one.

内部存储器120可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器120可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器120的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。Internal memory 120 may be used to store computer executable program code, which includes instructions. The internal memory 120 may include a stored program area and a stored data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. Theprocessor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 120 and/or instructions stored in a memory provided in the processor.

电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through anaudio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.

音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。Theaudio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal.Audio module 170 may also be used to encode and decode audio signals. In some embodiments, theaudio module 170 may be provided in theprocessor 110 , or some functional modules of theaudio module 170 may be provided in theprocessor 110 .

扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.

受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.

麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.

耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone port 170D may be the USB port 130 or a 3.5mm open mobile terminal platform (OMTP) standard port, a cellular telecommunications industry association of the USA (CTIA) standard port.

压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏192。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 192 .

陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle at which the electronic device 100 shakes, calculates the distance that the lens module needs to compensate for according to the angle, and allows the lens to counteract the shake of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.

加速度传感器180C可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180C can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.

距离传感器180D,用于测量距离。电子设备100可以通过红外或激光测量距离。The distance sensor 180D is used to measure the distance. The electronic device 100 can measure the distance through infrared or laser.

接近光传感器180E可以包括例如发光二极管(LED)和光检测器,例如光电二极管。电子设备100可以利用接近光传感器180E检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180E也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180E may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The electronic device 100 can use the proximity light sensor 180E to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180E can also be used in holster mode, pocket mode automatically unlocks and locks the screen.

环境光传感器180H用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏192亮度。环境光传感器180H也可用于拍照时自动调节白平衡。环境光传感器180H还可以与接近光传感器180E配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180H is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 192 according to the perceived ambient light brightness. The ambient light sensor 180H can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180H can also cooperate with the proximity light sensor 180E to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.

指纹传感器180F用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180F is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.

触摸传感器180G,也称“触控器件”。触摸传感器180G可以设置于显示屏192,由触摸传感器180G与显示屏192组成触摸屏,也称“触控屏”。触摸传感器180G用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏192提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180G也可以设置于电子设备100的表面,与显示屏192所处的位置不同。The touch sensor 180G is also called "touch device". The touch sensor 180G may be disposed on the display screen 192, and the touch sensor 180G and the display screen 192 form a touch screen, also called a "touch screen". The touch sensor 180G is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided via display screen 192 . In other embodiments, the touch sensor 180G may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 192 is located.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .

马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.

电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 as an example.

图2b是本发明实施例的电子设备100的软件结构框图。FIG. 2b is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present invention.

分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and system libraries, and a kernel layer.

应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.

如图2b所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2b, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.

应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions.

如图2b所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2b, the application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, notification manager, etc.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.

内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.

电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.

通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.

Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.

应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.

系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.

表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.

媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.

内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.

下面结合户外运动场景,示例性说明电子设备100软件以及硬件的工作流程。The software and hardware workflows of the electronic device 100 are exemplarily described below with reference to the outdoor sports scene.

当触摸传感器180G接收到触摸操作,相应的硬件中断被发给内核层。内核层将触摸操作加工成原始输入事件(包括触摸坐标,触摸操作的时间戳等信息)。原始输入事件被存储在内核层。应用程序框架层从内核层获取原始输入事件,识别该输入事件所对应的控件。以该触摸操作是触摸单击操作,该单击操作所对应的控件为华为运动健康APP中开始运动的控件为例,华为运动健康APP通过调用内核层启动GPS芯片驱动,通过GPS芯片获取GPS数据。When the touch sensor 180G receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes touch operations into raw input events (including touch coordinates, timestamps of touch operations, etc.). Raw input events are stored at the kernel layer. The application framework layer obtains the original input event from the kernel layer, and identifies the control corresponding to the input event. For example, the touch operation is a touch click operation, and the control corresponding to the click operation is the control that starts the exercise in the Huawei Sports Health APP. The Huawei Sports Health APP starts the GPS chip driver by calling the kernel layer, and obtains GPS data through the GPS chip. .

接下来介绍本申请实施例涉及的应用场景。Next, the application scenarios involved in the embodiments of the present application are introduced.

图3示例性示出了用于展示运动信息的用户界面。该用户界面可以是用户开启华为运动健康APP后显示的界面。用户可以通过点击电子设备100的主界面上显示的华为运动健康APP的图标来开启华为运动健康APP。FIG. 3 exemplarily shows a user interface for presenting athletic information. The user interface may be an interface displayed after the user opens the Huawei Sports Health APP. The user can open the Huawei Sports Health APP by clicking the icon of the Huawei Sports Health APP displayed on the main interface of the electronic device 100 .

如图3所示,用于展示运动信息的用户界面30可以包括:状态栏301、菜单栏302、当日运动信息显示区303、累计运动信息显示区304、开始运动控件305以及导航栏306。其中:As shown in FIG. 3 , theuser interface 30 for displaying exercise information may include astatus bar 301 , a menu bar 302 , a current day exerciseinformation display area 303 , an accumulated exerciseinformation display area 304 , astart exercise control 305 and anavigation bar 306 . in:

状态栏301可以包括:运营商指示符(例如运营商的名称“中国移动”)、无线高保真(wireless fidelity,Wi-Fi)信号的一个或多个信号强度指示符、移动通信信号(又可称为蜂窝信号)的一个或多个信号强度指示符、时间指示符和电池状态指示符。Thestatus bar 301 may include an operator indicator (eg, the operator's name "China Mobile"), one or more signal strength indicators of a wireless fidelity (Wi-Fi) signal, a mobile communication signal (which may in turn one or more of a signal strength indicator, a time indicator, and a battery status indicator (called a cellular signal).

菜单栏302可以包括四种菜单控件(首页、发现、优选、我的),选择不同菜单时电子设备100显示的内容不同。图3示出的当前选择的菜单种类为首页。即电子设备100显示的内容是首页菜单被选定后显示的内容。The menu bar 302 may include four kinds of menu controls (Home, Discover, Preferences, and My), and the contents displayed by the electronic device 100 are different when different menus are selected. The currently selected menu category shown in FIG. 3 is the home page. That is, the content displayed by the electronic device 100 is the content displayed after the home menu is selected.

当日运动信息显示区303可以用于显示用户当日的运动信息,可以包括目标运动量(步数,10000)、已完成的运动量(3279步)、已消耗的热量(80千卡)、已完成的距离(2.66公里)。当日运动信息显示区303中显示的步数可以通过陀螺仪传感器180B和加速度传感器180E检测电子设备100的运动姿态得到。The exerciseinformation display area 303 of the day can be used to display the exercise information of the user for the day, which can include the target exercise amount (number of steps, 10000), the completed exercise amount (3279 steps), the consumed calories (80 kcal), the completed distance (2.66 km). The number of steps displayed in the movementinformation display area 303 of the day can be obtained by detecting the movement posture of the electronic device 100 by the gyro sensor 180B and the acceleration sensor 180E.

累计运动信息显示区304可以用于显示用户累计运动的信息,可以包括累计运动的距离(88.65公里)、累计运动的次数(13)等。累计运动信息显示区304中显示的累计运动的距离可以通过GPS芯片230获取的GPS数据得到。The accumulated exerciseinformation display area 304 may be used to display the information of the accumulated exercise of the user, which may include the distance of accumulated exercise (88.65 kilometers), the number of accumulated exercise (13), and the like. The cumulative movement distance displayed in the cumulative movementinformation display area 304 can be obtained through GPS data acquired by the GPS chip 230 .

开始运动控件305可以用于选择运动类型。电子设备100可以检测到作用于开始运动控件305的触控操作(如在开始运动控件305上的点击操作),响应于该操作,电子设备100可以显示图4所示的用户界面40。Startmotion control 305 may be used to select a motion type. The electronic device 100 may detect a touch operation (eg, a click operation on the start motion control 305 ) acting on thestart motion control 305 , and in response to the operation, the electronic device 100 may display theuser interface 40 shown in FIG. 4 .

导航栏306可以包括:返回按键306-1、主界面(Home screen)按键306-2、呼出任务历史按键306-3等系统导航键。其中,主界面为电子设备100在任何一个用户界面检测到作用于主界面按键306-2的用户操作后显示的界面。当检测到用户点击返回按键306-1时,电子设备100可显示当前用户界面的上一个用户界面。当检测到用户点击主界面按键306-2时,电子设备100可显示主界面。当检测到用户点击呼出任务历史按键306-3时,电子设备100可显示用户最近打开过的任务。各导航键的命名还可以为其他,比如,306-1可以叫BackButton,306-2可以叫Home button,306-3可以叫Menu Button,本申请对此不做限制。导航栏306中的各导航键不限于虚拟按键,也可以实现为物理按键。Thenavigation bar 306 may include system navigation keys such as a return key 306-1, a home screen key 306-2, and an outgoing task history key 306-3. The main interface is an interface displayed by the electronic device 100 after any user interface detects a user operation acting on the main interface key 306-2. When detecting that the user clicks the back button 306-1, the electronic device 100 may display the previous user interface of the current user interface. When detecting that the user clicks the home interface button 306-2, the electronic device 100 may display the home interface. When detecting that the user clicks the outgoing task history button 306-3, the electronic device 100 may display the tasks that the user has opened recently. The names of the navigation keys may also be other, for example, 306-1 may be called BackButton, 306-2 may be called Home button, and 306-3 may be called Menu Button, which is not limited in this application. The navigation keys in thenavigation bar 306 are not limited to virtual keys, but can also be implemented as physical keys.

图4示例性示出了用于选择运动类型的用户界面40。如图4所示,用户界面40可以包括:状态栏、返回控件401、运动类型选项栏402、地图显示区403、开始控件404、导航栏。其中:FIG. 4 exemplarily shows auser interface 40 for selecting an exercise type. As shown in FIG. 4 , theuser interface 40 may include: a status bar, areturn control 401 , an exercisetype option bar 402 , amap display area 403 , astart control 404 , and a navigation bar. in:

状态栏与用户界面30中的状态栏301一致,此处不赘述。The status bar is consistent with thestatus bar 301 in theuser interface 30, and details are not described here.

返回控件401可以用于返回上一个用户界面。电子设备100可以检测到作用于返回控件401的触控操作(如在返回控件401上的点击操作),响应于该操作,电子设备100可以显示上一个用户界面,即用户界面30。Back control 401 can be used to return to the previous user interface. The electronic device 100 may detect a touch operation on the return control 401 (eg, a click operation on the return control 401 ), and in response to the operation, the electronic device 100 may display the previous user interface, ie, theuser interface 30 .

运动类型选项栏402可以包括四种选项(户外跑、室内跑、步行及骑行),选择不同的选项时电子设备100可以显示不同的内容。图4示出的当前选项为户外跑。即电子设备100显示的内容(即地图显示区403)是首页菜单被选定后显示的内容。The exercisetype option bar 402 may include four options (outdoor running, indoor running, walking and cycling), and the electronic device 100 may display different content when different options are selected. The current option shown in Figure 4 is outdoor running. That is, the content displayed by the electronic device 100 (ie, the map display area 403 ) is the content displayed after the home menu is selected.

地图显示区403用于显示电子设备100当前所处位置附近的地图以及当前位置标识4031。Themap display area 403 is used to display a map near the current location of the electronic device 100 and acurrent location identifier 4031 .

开始控件404用于开始记录用户的运动信息。电子设备100可以检测到作用于开始控件404的触控操作(如在开始控件404上的点击操作),响应于该操作,电子设备100可以开始记录用户的运动信息。Thestart control 404 is used to start recording the user's motion information. The electronic device 100 may detect a touch operation (eg, a click operation on the start control 404 ) acting on thestart control 404 , and in response to the operation, the electronic device 100 may start recording the user's motion information.

导航栏与用户界面40中的导航栏306一致,此处不赘述。The navigation bar is the same as thenavigation bar 306 in theuser interface 40, and will not be repeated here.

图5示例性示出了用户开始运动后电子设备100显示的用户界面50。如图5所示,用户界面50可以包括状态栏、地图显示区501、运动信息显示区502、停止控件503、导航栏。其中:FIG. 5 exemplarily shows theuser interface 50 displayed by the electronic device 100 after the user starts exercising. As shown in FIG. 5, theuser interface 50 may include a status bar, amap display area 501, a sportsinformation display area 502, astop control 503, and a navigation bar. in:

状态栏与用户界面30中的状态栏301一致,此处不赘述。The status bar is consistent with thestatus bar 301 in theuser interface 30, and details are not described here.

地图显示区501用于显示用户的运动轨迹5011和用户的当前位置标识5012。Themap display area 501 is used to display the user'smovement track 5011 and the user'scurrent location identifier 5012 .

运动信息显示区502用于显示用户本次运动的运动数据,包括但不限于运动距离(5.87公里)、运动时间(00:42:47)、配速(07'16”)、消耗的热量(330千卡)等。The exerciseinformation display area 502 is used to display the exercise data of the user's current exercise, including but not limited to exercise distance (5.87 kilometers), exercise time (00:42:47), pace (07'16"), calorie consumption ( 330 kcal) etc.

停止控件503用于停止记录用户的运动信息。电子设备100可以检测到作用于停止控件503的触控操作(如在停止控件503的点击操作),响应于该操作,电子设备100可以停止记录用户的运动信息。Thestop control 503 is used to stop recording the user's motion information. The electronic device 100 may detect a touch operation on the stop control 503 (eg, a click operation on the stop control 503 ), and in response to the operation, the electronic device 100 may stop recording the user's motion information.

导航栏与用户界面40中的导航栏306一致,此处不赘述。The navigation bar is the same as thenavigation bar 306 in theuser interface 40, and will not be repeated here.

基于图3-图5示出的应用场景,接下来介绍本申请提供的运动轨迹记录方法涉及的两种记录模式:低功耗模式和正常模式。Based on the application scenarios shown in FIGS. 3-5 , two recording modes involved in the motion trajectory recording method provided by the present application are introduced next: a low power consumption mode and a normal mode.

接下来分别介绍电子设备100采用上述两种记录模式记录运动轨迹时的各部件之间的协作关系。Next, the cooperation relationship between the various components when the electronic device 100 uses the above two recording modes to record the motion track will be introduced respectively.

低功耗模式:Low power mode:

图6中的实线部分示出了低功耗模式下各部件之间的连接关系。如图6所示,这种记录模式下,GPS芯片可以与MCU连接,MCU可以与应用处理器连接。GPS芯片按照一定的频率向MCU发送GPS数据,发送的频率例如可以是每秒发送一个点,GPS芯片发送的GPS数据为经纬度数据,即一个GPS数据对应一个位置点的经度和纬度。MCU采用精简的定位算法对GPS数据进行第一次处理,并将第一次处理后的GPS数据保存在MCU中。在满足低功耗模式切换为正常模式的条件的情况下,由MCU将保存的GPS数据批量发送至应用处理器。应用处理器接收到MCU发送的GPS数据后,对GPS数据进行第二次处理,将第二次处理后的GPS数据以点的形式显示在运动APP的地图中。其中,第二次处理主要是对第一次处理后的GPS数据进行去噪、平滑等处理。批量发送完毕后,MCU可将保存的GPS数据清除,释放内存,以便在下一次低功耗模式中保存第一次处理后的GPS数据。可知,多个点可连成线,最终显示在运动APP的地图中的线就是用户的运动轨迹。从而,用户可在地图中查看自己的运动轨迹。其中,低功耗模式切换为正常模式的条件将在后续实施例中介绍,此处暂不详述。The solid line part in FIG. 6 shows the connection relationship between various components in the low power consumption mode. As shown in Figure 6, in this recording mode, the GPS chip can be connected with the MCU, and the MCU can be connected with the application processor. The GPS chip sends GPS data to the MCU according to a certain frequency. The sending frequency can be, for example, one point per second. The GPS data sent by the GPS chip is longitude and latitude data, that is, one GPS data corresponds to the longitude and latitude of a location point. The MCU uses a simplified positioning algorithm to process the GPS data for the first time, and saves the GPS data after the first processing in the MCU. Under the condition that the low power consumption mode is switched to the normal mode, the MCU sends the saved GPS data to the application processor in batches. After receiving the GPS data sent by the MCU, the application processor processes the GPS data for the second time, and displays the GPS data after the second processing in the map of the sports APP in the form of points. Among them, the second processing is mainly to denoise and smooth the GPS data after the first processing. After the batch transmission is completed, the MCU can clear the saved GPS data and release the memory, so as to save the GPS data processed for the first time in the next low-power mode. It can be seen that multiple points can be connected to form a line, and the line finally displayed in the map of the sports APP is the user's movement trajectory. Thus, the user can view his own movement track on the map. The conditions for switching the low power consumption mode to the normal mode will be introduced in subsequent embodiments, and will not be described in detail here.

正常模式:Normal mode:

图6中的虚线部分示出了正常模式下各部件之间的连接关系。如图6所示,这种记录模式下,GPS芯片可以与应用处理器连接。GPS芯片按照一定的频率向应用处理器发送GPS数据,发送的频率例如可以是每秒发送一个点,GPS芯片发送的GPS数据为经纬度数据,即一个GPS数据对应一个位置点的经度和纬度。应用处理器采用完整的定位算法对GPS芯片发送的GPS数据进行处理,将处理后的GPS数据以点的形式显示在运动APP的地图中。可知,多个点可连成线,最终显示在运动APP的地图中的线就是用户的运动轨迹。从而,用户可以在地图中查看自己的运动轨迹。The dotted line part in FIG. 6 shows the connection relationship between the components in the normal mode. As shown in Figure 6, in this recording mode, the GPS chip can be connected to the application processor. The GPS chip sends GPS data to the application processor according to a certain frequency. The sending frequency may be, for example, one point per second. The GPS data sent by the GPS chip is latitude and longitude data, that is, a GPS data corresponds to the longitude and latitude of a location point. The application processor uses a complete positioning algorithm to process the GPS data sent by the GPS chip, and displays the processed GPS data in the map of the sports APP in the form of points. It can be seen that multiple points can be connected to form a line, and the line finally displayed in the map of the sports APP is the user's movement trajectory. Thus, the user can view his own movement track on the map.

接下来介绍电子设备100在记录运动轨迹的过程中两种工作模式之间的切换条件。首先介绍正常模式切换为低功耗模式的条件,其次介绍低功耗模式切换为正常模式的条件。Next, the switching conditions between the two working modes in the process of recording the movement track of the electronic device 100 are introduced. First, the conditions for switching from the normal mode to the low-power mode are introduced, and secondly, the conditions for switching from the low-power mode to the normal mode are introduced.

一、正常模式切换为低功耗模式的条件1. Conditions for switching from normal mode to low-power mode

在一些实施例中,可以由MCU触发电子设备100从正常模式切换为低功耗模式。In some embodiments, the electronic device 100 may be triggered by the MCU to switch from the normal mode to the low power consumption mode.

可能地,电子设备100检测到作用于开始控件404的触控操作后,电子设备100在本次记录运动轨迹的过程中首次以正常模式记录用户的运动轨迹。此时,从正常模式切换为低功耗模式的条件为:电子设备100的显示屏192熄灭。Possibly, after the electronic device 100 detects the touch operation acting on thestart control 404, the electronic device 100 records the user's movement trajectory in the normal mode for the first time in the process of recording the movement trajectory this time. At this time, the condition for switching from the normal mode to the low power consumption mode is that the display screen 192 of the electronic device 100 is turned off.

可能地,电子设备100在本次记录运动轨迹的过程中非首次以正常模式记录用户的运动轨迹。此时,从正常模式切换为低功耗模式的条件为:电子设备100的显示屏192熄灭,且在正常模式下工作A秒且低功耗模式下保存的GPS数据已经批量发送完毕。其中,设置A秒可以使应用处理器有足够的时间对GPS数据进行第二次处理。Possibly, it is not the first time that the electronic device 100 records the movement trajectory of the user in the normal mode during the process of recording the movement trajectory this time. At this time, the conditions for switching from the normal mode to the low power consumption mode are: the display screen 192 of the electronic device 100 is turned off, and the electronic device 100 works for A seconds in the normal mode and the GPS data saved in the low power consumption mode has been sent in batches. Among them, setting A seconds allows the application processor to have enough time to process the GPS data a second time.

具体地,MCU可包括计时器,计时器的时长为A秒。MCU开始向应用处理器批量发送数据可以触发该计时器开始计时。该计时器计时结束后,MCU可确定电子设备100在正常模式下工作A秒。Specifically, the MCU may include a timer, and the duration of the timer is A seconds. The MCU starts sending data in batches to the application processor to trigger the timer to start timing. After the timer expires, the MCU may determine that the electronic device 100 operates in the normal mode for A seconds.

上述A秒可以但不限于是10秒、30秒、60秒等。The above-mentioned A seconds may be, but not limited to, 10 seconds, 30 seconds, 60 seconds, and the like.

在另一些实施例中,可以由应用处理器触发电子设备100从正常模式切换为低功耗模式。In other embodiments, the application processor may trigger the electronic device 100 to switch from the normal mode to the low power consumption mode.

可能地,电子设备100检测到作用于开始控件404的触控操作后,电子设备100在本次记录运动轨迹的过程中首次以正常模式记录用户的运动轨迹。此时,从正常模式切换为低功耗模式的条件为:电子设备100的显示屏192熄灭。可能地,从正常模式切换为低功耗模式的条件还可以是电子设备100的显示屏192熄灭时长达预设时长,该预设时长可以但不限于是2秒、3秒、5秒等。Possibly, after the electronic device 100 detects the touch operation acting on thestart control 404, the electronic device 100 records the user's movement trajectory in the normal mode for the first time in the process of recording the movement trajectory this time. At this time, the condition for switching from the normal mode to the low power consumption mode is that the display screen 192 of the electronic device 100 is turned off. Possibly, the condition for switching from the normal mode to the low power consumption mode may also be that the display screen 192 of the electronic device 100 is turned off for a preset duration, which may be, but is not limited to, 2 seconds, 3 seconds, 5 seconds, etc.

可能地,电子设备100在本次记录运动轨迹的过程中非首次以正常模式记录用户的运动轨迹。此时,从正常模式切换为低功耗模式的条件可以是:电子设备100的显示屏192熄灭,且低功耗模式下保存的GPS数据已经批量发送完毕,且应用处理器对GPS数据第二次处理完毕。Possibly, it is not the first time that the electronic device 100 records the movement trajectory of the user in the normal mode during the process of recording the movement trajectory this time. At this time, the conditions for switching from the normal mode to the low power consumption mode may be: the display screen 192 of the electronic device 100 is turned off, the GPS data saved in the low power consumption mode has been sent in batches, and the application processor has a second processing is completed.

二、低功耗模式切换为正常模式的条件2. Conditions for switching from low power mode to normal mode

低功耗模式切换为正常模式的条件可以包括以下任意一项:①保存的GPS数据达到门限B;②根据保存的GPS数据估算应用处理器下一次被唤醒的条件达到;③电子设备100的显示屏192被点亮。The conditions for switching the low power consumption mode to the normal mode may include any one of the following: ① the stored GPS data reaches the threshold B; ② it is estimated according to the stored GPS data that the condition for the application processor to be woken up next time is reached; ③ the display of the electronic device 100 Screen 192 is illuminated.

关于上述条件①,在一些实施例中,上述保存的GPS数据达到门限B可以是指保存GPS数据的时长达到门限B。其中,B可以但不限于是1分钟、3分钟、5分钟等。Regarding the above condition ①, in some embodiments, the above-mentioned stored GPS data reaching the threshold B may mean that the duration of the stored GPS data reaches the threshold B. Wherein, B can be, but not limited to, 1 minute, 3 minutes, 5 minutes, and the like.

在另外一些实施例中,上述保存GPS数据达到门限B可以是指保存GPS数据的内存达到门限B。其中,B可以但不限于是10kb、20kb、25kb等。In some other embodiments, the above-mentioned storing the GPS data reaching the threshold B may mean that the memory for storing the GPS data reaches the threshold B. Wherein, B can be, but not limited to, 10kb, 20kb, 25kb, etc.

关于上述条件②,可以知道,在低功耗模式下,应用处理器处于休眠状态。若用户设置在运动过程中跑步达到整公里时进行语音播报(语音播报的内容例如可以是当前已跑了几公里、耗时多久、最近一公里配速多少等),而处于休眠状态的应用处理器无法获知用户当前的运动数据,无法进行语音播报。因而MCU需要根据GPS芯片发送的GPS数据估算用户当前的运动数据,在用户的运动距离即将到达整公里之前,切换至正常模式,唤醒应用处理器,进行语音播报。Regarding the above condition ②, it can be known that in the low power consumption mode, the application processor is in a sleep state. If the user sets to perform a voice broadcast when the running reaches an entire kilometer during exercise (for example, the content of the voice broadcast can be how many kilometers have been run, how long it has taken, the pace of the last kilometer, etc.), and the application processing in the dormant state The device cannot know the user's current exercise data, and cannot perform voice broadcasts. Therefore, the MCU needs to estimate the user's current motion data according to the GPS data sent by the GPS chip, and switch to the normal mode before the user's motion distance reaches a full kilometer, wake up the application processor, and perform voice broadcast.

具体地,若由应用处理器触发电子设备100从正常模式切换为低功耗模式,应用处理器可以在首次从正常模式切换至低功耗模式时,以及非首次从正常模式切换至低功耗模式时,向MCU发送下一次被唤醒的条件。Specifically, if the application processor triggers the electronic device 100 to switch from the normal mode to the low power consumption mode, the application processor can switch from the normal mode to the low power consumption mode for the first time and switch from the normal mode to the low power consumption mode not for the first time When in mode, send the next wake-up condition to the MCU.

若由MCU触发电子设备100从正常模式切换为低功耗模式,在首次从正常模式切换至低功耗模式的情况下,应用处理器可以在电子设备100的显示屏192熄灭时向MCU发送下一次被唤醒的条件。在非首次从正常模式切换至低功耗模式的情况下,应用处理器可以在电子设备100在低功耗模式下保存的GPS数据已经批量发送完毕时向MCU发送下一次被唤醒的条件。If the MCU triggers the electronic device 100 to switch from the normal mode to the low power consumption mode, in the case of switching from the normal mode to the low power consumption mode for the first time, the application processor can send a message to the MCU when the display screen 192 of the electronic device 100 is turned off A wake-up condition. In the case of not switching from the normal mode to the low power mode for the first time, the application processor may send the next wake-up condition to the MCU when the GPS data saved in the low power mode by the electronic device 100 has been sent in batches.

下一次被唤醒的条件可以由用户设置的语音播报的条件决定。用户设置的语音播报的条件例如可以是按照固定运动距离间隔播报或者按照固定时间间隔播报。其中,固定运动距离例如可以但不限于是整公里或半公里。固定时间间隔例如可以但不限于是5分钟、10分钟等。The condition to be woken up next time can be determined by the condition of the voice broadcast set by the user. The condition of the voice broadcast set by the user may be, for example, broadcast according to a fixed moving distance interval or broadcast according to a fixed time interval. Wherein, the fixed movement distance may be, for example, but not limited to, a full kilometer or a half kilometer. The fixed time interval can be, for example, but not limited to, 5 minutes, 10 minutes, and the like.

在一些实施例中,用户设置的语音播报的条件为按照固定运动距离间隔播报。应用处理器下一次被唤醒的条件为当前运动距离与下一次语音播报的运动距离的差为第一距离;其中,下一次语音播报的运动距离大于当前运动距离。In some embodiments, the condition of the voice broadcast set by the user is to broadcast according to a fixed movement distance interval. The condition for the application processor to be woken up next time is that the difference between the current movement distance and the movement distance of the next voice broadcast is the first distance; wherein, the movement distance of the next voice broadcast is greater than the current movement distance.

假设,用户设置在运动过程中跑步达到整公里进行语音播报。在应用处理器首次从正常模式切换至低功耗模式时,当前运动距离为0.2公里,上述第一距离为0.1公里,应用处理器可以向MCU发送下一次被唤醒的条件是运动距离达到0.7公里。MCU在低功耗模式下根据GPS芯片发送的GPS数据估算运动距离为0.7公里时,切换至正常模式,唤醒应用处理器。从而,应用处理器可在运动距离为1公里之前被唤醒,及时进行语音播报。Suppose, the user sets to run for a full kilometer during exercise for voice broadcast. When the application processor switches from the normal mode to the low-power mode for the first time, the current movement distance is 0.2 kilometers, and the above-mentioned first distance is 0.1 kilometers. The application processor can send the MCU to be woken up next time when the movement distance reaches 0.7 kilometers. . When the MCU estimates the movement distance to be 0.7 km according to the GPS data sent by the GPS chip in the low-power mode, it switches to the normal mode and wakes up the application processor. Therefore, the application processor can be woken up before the moving distance is 1 km, and the voice broadcast can be performed in time.

在应用处理器非首次从正常模式切换至低功耗模式时,假设当前运动距离为3.2公里,上述第一距离为0.1公里,那么应用处理器可以向MCU发送下一次被唤醒的条件是继续运动0.7公里。MCU在低功耗模式下根据GPS芯片发送的GPS数据估算运动距离为0.7公里时,切换至正常模式,唤醒应用处理器。从而,应用处理器可在运动距离为4公里之前被唤醒,及时进行语音播报。其中,当前运动距离为应用处理器向MCU发送下一次被唤醒的条件时的运动距离。When the application processor switches from the normal mode to the low-power mode for the first time, assuming that the current movement distance is 3.2 kilometers, and the above-mentioned first distance is 0.1 kilometers, the application processor can send the MCU to be woken up next time The condition is to continue to exercise 0.7 km. When the MCU estimates the movement distance to be 0.7 km according to the GPS data sent by the GPS chip in the low-power mode, it switches to the normal mode and wakes up the application processor. Therefore, the application processor can be woken up before the moving distance is 4 kilometers, and the voice broadcast can be performed in time. The current movement distance is the movement distance when the application processor sends the next wake-up condition to the MCU.

不限0.1公里,在具体实现中,上述第一距离可以是0.2公里、0.05公里等,本申请实施例对此不做限定。设置提前唤醒的距离是为了避免由于MCU采用第一定位算法估算运动距离不准确,导致唤醒应用处理器后错过实际的语音播报的距离。It is not limited to 0.1 kilometers. In specific implementation, the above-mentioned first distance may be 0.2 kilometers, 0.05 kilometers, etc., which is not limited in this embodiment of the present application. The purpose of setting the early wake-up distance is to prevent the MCU from using the first positioning algorithm to estimate the movement distance inaccurately, resulting in missing the actual voice broadcast distance after waking up the application processor.

本申请中,提前唤醒应用处理器的实际估算运动距离,即上述0.9公里、上述0.7公里,可称为目标唤醒运动距离。In the present application, the actual estimated movement distance for waking up the application processor in advance, that is, the above-mentioned 0.9 km and the above-mentioned 0.7 km, may be referred to as the target wake-up movement distance.

在另外一些实施例中,用户设置的语音播报的条件为按照固定时间间隔播报。应用处理器下一次被唤醒的条件为当前时刻与下一次语音播报的时刻的差为第一时长;其中,下一次语音播报的时刻晚于当前时刻。In some other embodiments, the condition of the voice broadcast set by the user is to broadcast at a fixed time interval. The condition for the application processor to be woken up next time is that the difference between the current time and the time of the next voice broadcast is the first duration; wherein, the time of the next voice broadcast is later than the current time.

假设,用户设置在运动过程中按照固定时间间隔(如5分钟)进行语音播报。开始运动的时刻为9:00:00,应用处理器向MCU发送下一次被唤醒的条件的时刻为9:02:00,下一次语音播报的时刻为9:05:00,第一时长为5秒。It is assumed that the user sets to perform voice announcements at fixed time intervals (eg, 5 minutes) during exercise. The time to start exercising is 9:00:00, the time when the application processor sends the next wake-up condition to the MCU is 9:02:00, the time of the next voice broadcast is 9:05:00, and the first duration is 5 second.

在应用处理器首次从正常模式切换至低功耗模式时,应用处理器可以向MCU发送下一次被唤醒的条件是9:04:55。MCU可在9:04:55触发电子设备从低功耗模式切换至正常模式,以便应用处理器可被提前唤醒,及时在运动时长为5分钟时进行语音播报。When the application processor switches from normal mode to low power mode for the first time, the application processor can send to the MCU that the next wake-up condition is 9:04:55. The MCU can trigger the electronic device to switch from the low-power mode to the normal mode at 9:04:55, so that the application processor can be woken up in advance, and the voice broadcast can be made in time when the exercise duration is 5 minutes.

上述列举的例子中是以具体的时刻(开始运动的时刻、应用处理器向MCU发送下一次被唤醒的条件的时刻、下一次语音播报的时刻)来实现的,在具体实现中,还可以以时长来实现。The examples listed above are implemented at specific times (the time when the motion starts, the time when the application processor sends the next wake-up condition to the MCU, and the time when the next voice broadcasts). time to achieve.

假设,用户设置在运动过程中按照固定时间间隔(如5分钟)进行语音播报。应用处理器向MCU发送下一次被唤醒的条件时,已运动的时长为1分钟,下一次语音播报的时间为3分钟后,第一时长为5秒。在应用处理器首次从正常模式切换至低功耗模式时,应用处理器可以向MCU发送下一次被唤醒的条件是继续运动3分55秒。MCU在低功耗模式下触发计时器,计时器的时长为3分55秒,计时结束后,触发电子设备从低功耗模式切换至正常模式,以便应用处理器可被提前唤醒,及时在运动时长为5分钟时进行语音播报。It is assumed that the user sets to perform voice announcements at fixed time intervals (eg, 5 minutes) during exercise. When the application processor sends the next wake-up condition to the MCU, the duration of motion is 1 minute, the next voice broadcast is 3 minutes later, and the first duration is 5 seconds. When the application processor switches from the normal mode to the low power mode for the first time, the application processor can send to the MCU that the condition for the next wake-up is to continue to exercise for 3 minutes and 55 seconds. The MCU triggers the timer in the low-power mode, and the duration of the timer is 3 minutes and 55 seconds. After the timer is over, the electronic device is triggered to switch from the low-power mode to the normal mode, so that the application processor can be woken up in advance and exercise in time When the duration is 5 minutes, a voice broadcast will be performed.

假设用户设置在运动过程中按照固定时间间隔(如5分钟)进行语音播报。开始运动的时刻为9:00:00,应用处理器向MCU发送下一次被唤醒的条件的时刻为9:18:00,下一次语音播报的时刻为9:20:00,第一时长为5秒。在应用处理器非首次从正常模式切换至低功耗模式时,应用处理器可以向MCU发送下一次被唤醒的条件是9:19:55。MCU可在9:19:55触发电子设备从低功耗模式切换至正常模式,以便应用处理器可被提前唤醒,及时在运动时长为5分钟时进行语音播报。It is assumed that the user sets to perform voice broadcasts at fixed time intervals (eg, 5 minutes) during exercise. The time to start exercising is 9:00:00, the time when the application processor sends the next wake-up condition to the MCU is 9:18:00, the time of the next voice broadcast is 9:20:00, and the first duration is 5 second. When the application processor does not switch from normal mode to low power mode for the first time, the application processor can send the MCU the next wake-up condition is 9:19:55. The MCU can trigger the electronic device to switch from the low-power mode to the normal mode at 9:19:55, so that the application processor can be woken up in advance, and the voice broadcast can be made in time when the exercise duration is 5 minutes.

上述列举的例子中是以具体的时刻(开始运动的时刻、应用处理器向MCU发送下一次被唤醒的条件的时刻、下一次语音播报的时刻)来实现的,在具体实现中,还可以以时长来实现。The examples listed above are implemented at specific times (the time when the motion starts, the time when the application processor sends the next wake-up condition to the MCU, and the time when the next voice broadcasts). time to achieve.

假设,用户设置在运动过程中按照固定时间间隔(如5分钟)进行语音播报。应用处理器向MCU发送下一次被唤醒的条件时,已运动的时长为18分钟,下一次语音播报的时间为2分钟后,第一时长为5秒。在应用处理器非首次从正常模式切换至低功耗模式时,应用处理器可以向MCU发送下一次被唤醒的条件是继续运动1分55秒。MCU在低功耗模式下触发计时器,计时器的时长为1分55秒,计时结束后,触发电子设备从低功耗模式切换至正常模式,以便应用处理器可被提前唤醒,及时在运动时长为20分钟时进行语音播报。It is assumed that the user sets to perform voice announcements at fixed time intervals (eg, 5 minutes) during exercise. When the application processor sends the next wake-up condition to the MCU, the duration of movement is 18 minutes, the next voice broadcast time is 2 minutes later, and the first duration is 5 seconds. When the application processor is not switched from the normal mode to the low power consumption mode for the first time, the application processor can send the MCU to be woken up next time by continuing to exercise for 1 minute and 55 seconds. The MCU triggers the timer in the low-power mode, and the duration of the timer is 1 minute and 55 seconds. After the timer ends, the electronic device is triggered to switch from the low-power mode to the normal mode, so that the application processor can be woken up in advance and exercise in time When the duration is 20 minutes, a voice broadcast will be made.

上述列举的例子中,均由应用处理器根据提前唤醒量(第一距离或第一时长)计算出下一次被唤醒的距离、时刻或时长后发送给MCU。在具体实现中,应用处理器可以向MCU发送实际被唤醒的距离、时刻或时长后发送给MCU,再由MCU根据提前唤醒量(第一距离或第一时长)计算出最终的唤醒距离或时刻,唤醒应用处理器。In the above-mentioned examples, the application processor calculates the next wake-up distance, time or duration according to the advance wake-up amount (the first distance or the first duration) and sends it to the MCU. In specific implementation, the application processor can send the actual wake-up distance, time or duration to the MCU and then send it to the MCU, and then the MCU calculates the final wake-up distance or time according to the advance wake-up amount (first distance or first duration). , wake up the application processor.

由于MCU硬件资源(如内存)有限,MCU中的精简的定位算法包括的特性与应用处理器中包括的完整的定位算法有所区别。接下来结合表1介绍精简的定位算法与完整的定位算法包括的具体特性。Due to the limited hardware resources (eg memory) of the MCU, the features included in the simplified positioning algorithm in the MCU are different from the complete positioning algorithm included in the application processor. Next, in conjunction with Table 1, the specific characteristics included in the simplified positioning algorithm and the complete positioning algorithm are introduced.

表1精简的定位算法与完整的定位算法包括的特性对比Table 1 Comparison of the features included in the simplified localization algorithm and the complete localization algorithm

Figure BDA0002081364050000181
Figure BDA0002081364050000181

从表1可以看出,精简的定位算法包含的特性有:卡尔曼滤波、最小二乘法、卫星位置。其中:As can be seen from Table 1, the features of the simplified positioning algorithm include: Kalman filter, least squares method, and satellite position. in:

卡尔曼滤波为预测算法,可以用于预测下一个点的大致位置,对GPS芯片的数据进行校准。Kalman filtering is a prediction algorithm that can be used to predict the approximate position of the next point and calibrate the data of the GPS chip.

最小二乘法为回归算法,可以根据一系列的数据对GPS芯片的数据进行平滑处理。The least squares method is a regression algorithm, which can smooth the data of the GPS chip according to a series of data.

卫星位置,可以用于记录卫星位置,在电子设备100首次搜索卫星时,缩短搜索卫星的时间。其中,首次搜索例如可以是电子设备100开机时搜索卫星位置。The satellite position can be used to record the satellite position, and when the electronic device 100 searches for the satellite for the first time, the time for searching for the satellite is shortened. The first search may be, for example, searching for satellite positions when the electronic device 100 is powered on.

完整的定位算法包含的特性除了卡尔曼滤波、最小二乘法、卫星位置之外,还可以包含:解星历、辅助全球卫星定位系统(Assisted Global Positioning System,AGPS)、美国国家海洋电子协会(National Marine Electronics Association,NMEA)协议等特性。其中:In addition to Kalman filtering, least squares, and satellite positions, the complete positioning algorithm can also include: ephemeris solution, Assisted Global Positioning System (AGPS), National Marine Electronics Association (National Marine Electronics) Association, NMEA) protocol and other characteristics. in:

解星历,用于在定位成功前全通道(最大144通道)解调卫星的星历,确认卫星位置。Decoding ephemeris is used to demodulate satellite ephemeris on all channels (maximum 144 channels) before positioning is successful to confirm satellite position.

AGPS,可以根据电子设备100接入的基站信息,确定电子设备100所处的位置,根据电子设备100所处的位置筛选卫星,从而减少搜索卫星的时间。AGPS can determine the location of the electronic device 100 according to the base station information accessed by the electronic device 100, and filter satellites according to the location of the electronic device 100, thereby reducing the time for searching for satellites.

NMEA协议为GPS数据串口传输协议,用于导出GPS数据。The NMEA protocol is a serial port transmission protocol for GPS data, which is used to export GPS data.

接下来介绍本申请实施例提供的运动轨迹记录方法。如图7所示,运动轨迹记录方法可以包括以下几个步骤:Next, the motion trajectory recording method provided by the embodiment of the present application is introduced. As shown in Figure 7, the motion track recording method may include the following steps:

S101:检测用于开始记录运动轨迹的第一用户操作。S101: Detect a first user operation for starting to record a motion track.

具体地,上述第一用户操作可以是点击图4实施例中的开始控件404。Specifically, the above-mentioned first user operation may be clicking thestart control 404 in the embodiment of FIG. 4 .

S102:以第一模式记录运动轨迹。S102: Record the motion track in the first mode.

具体地,第一模式即为前述实施例中提到的正常模式:GPS芯片与应用处理器连接,将GPS芯片获取的GPS数据发送至应用处理器,应用处理器采用完整的定位算法对GPS芯片发送的GPS数据进行处理。Specifically, the first mode is the normal mode mentioned in the foregoing embodiment: the GPS chip is connected to the application processor, the GPS data obtained by the GPS chip is sent to the application processor, and the application processor adopts a complete positioning algorithm to detect the GPS chip The sent GPS data is processed.

S103:在满足第一条件的情况下,以第二模式记录运动轨迹。S103: In the case that the first condition is satisfied, record the motion track in the second mode.

具体地,第二模式即为前述实施例中提到的低功耗模式:GPS芯片与MCU连接,将GPS芯片获取的GPS数据发送至MCU。MCU可以采用精简的定位算法处理GPS数据,并保存至少两个位置点的处理后的GPS数据。Specifically, the second mode is the low power consumption mode mentioned in the foregoing embodiment: the GPS chip is connected to the MCU, and the GPS data obtained by the GPS chip is sent to the MCU. The MCU can process GPS data by using a simplified positioning algorithm, and save the processed GPS data of at least two location points.

在一些实施例中,可由应用处理器控制电子设备100以第二模式记录运动轨迹。In some embodiments, the electronic device 100 may be controlled by the application processor to record the motion trajectory in the second mode.

可能地,电子设备100首次以第二模式记录运动轨迹。第一条件为:电子设备100的显示屏192熄灭。Possibly, the electronic device 100 records the motion trajectory in the second mode for the first time. The first condition is that the display screen 192 of the electronic device 100 is turned off.

可能地,电子设备100非首次以第二模式记录运动轨迹。第一条件为:电子设备100的显示屏192熄灭且低功耗模式下保存的GPS数据已经批量发送完毕,且应用处理器对GPS数据第二次处理完毕。Possibly, it is not the first time that the electronic device 100 records the motion trajectory in the second mode. The first condition is: the display screen 192 of the electronic device 100 is turned off, the GPS data stored in the low power consumption mode has been sent in batches, and the application processor has finished processing the GPS data for the second time.

在另一些实施例中,可由MCU控制电子设备100以第二模式记录运动轨迹。In other embodiments, the electronic device 100 can be controlled by the MCU to record the motion track in the second mode.

可能地,电子设备100首次以第二模式记录运动轨迹。第一条件为:电子设备100的显示屏192熄灭。Possibly, the electronic device 100 records the motion trajectory in the second mode for the first time. The first condition is that the display screen 192 of the electronic device 100 is turned off.

可能地,电子设备100非首次以第二模式记录运动轨迹。第一条件为:电子设备100的显示屏192熄灭,且在正常模式下工作A秒,且低功耗模式下保存的数据已经批量发送完毕。设置A秒可以使应用处理器有足够的时间对GPS数据进行第二次处理。Possibly, it is not the first time that the electronic device 100 records the motion trajectory in the second mode. The first condition is: the display screen 192 of the electronic device 100 is turned off, and it operates in the normal mode for A seconds, and the data saved in the low power consumption mode has been sent in batches. A setting of A seconds gives the application processor enough time to process the GPS data a second time.

S104:在满足第二条件的情况下,将至少两个位置点的处理后的GPS数据发送至应用处理器,且以第一模式记录运动轨迹。S104: If the second condition is satisfied, send the processed GPS data of at least two position points to the application processor, and record the motion trajectory in the first mode.

具体地,第二条件可以包括以下任意一项:①保存数据达到门限B;②根据保存数据估算应用处理器下一次被唤醒的条件达到;③显示屏192被点亮。具体可参考前述实施例中关于低功耗模式切换为正常模式的条件的相关描述,此处不赘述。Specifically, the second condition may include any one of the following: ① the saved data reaches the threshold B; ② it is estimated that the condition for the application processor to be woken up next time is reached according to the saved data; ③ the display screen 192 is lit. For details, reference may be made to the relevant description of the conditions for switching from the low power consumption mode to the normal mode in the foregoing embodiments, which will not be repeated here.

本申请实施例中,上述第一模式可以是前述实施例中提到的正常模式,上述第二模式可以是前述实施例中提到的低功耗模式。上述第一条件可以是前述实施例中提到的正常模式切换为低功耗模式的条件,上述第二条件可以是前述实施例中提到的低功耗模式切换为正模式的条件。上述第一定位算法可以是前述实施例中提到的完整的定位算法,上述第二定位算法可以是前述实施例中提到的精简的定位算法。In this embodiment of the present application, the first mode may be the normal mode mentioned in the foregoing embodiments, and the foregoing second mode may be the low power consumption mode mentioned in the foregoing embodiments. The above first condition may be the condition for switching from the normal mode to the low power consumption mode mentioned in the foregoing embodiment, and the above second condition may be the condition for switching from the low power consumption mode to the positive mode mentioned in the foregoing embodiment. The aforementioned first positioning algorithm may be the complete positioning algorithm mentioned in the foregoing embodiments, and the aforementioned second positioning algorithm may be the simplified positioning algorithm mentioned in the foregoing embodiments.

本申请实施例提供的运动轨迹记录方法可以采用两种记录模式记录运动轨迹。在第二模式下,MCU可以接收GPS芯片发送的GPS数据,并对GPS数据进行处理,保存多个处理后的GPS数据。在满足切换条件的情况下,将保存的多个处理后的GPS数据批量发送至应用处理器。使应用处理器在第二模式下休眠,节省功耗,提升电子设备的续航能力。此外,本申请中有低功耗收益的器件为MCU。因此本申请的技术方案可适用于所有具备MCU的电子设备,适用范围广。The motion track recording method provided in the embodiment of the present application can record the motion track by using two recording modes. In the second mode, the MCU can receive GPS data sent by the GPS chip, process the GPS data, and save a plurality of processed GPS data. When the switching conditions are satisfied, the stored plurality of processed GPS data are sent to the application processor in batches. The application processor sleeps in the second mode to save power consumption and improve the battery life of the electronic device. In addition, the devices with low power consumption benefits in this application are MCUs. Therefore, the technical solution of the present application can be applied to all electronic devices with MCU, and has a wide range of applications.

为了便于理解,本申请实施例提供了一种具体的运动轨迹记录方法。如图8所示,运动轨迹记录方法可以包括以下几个步骤:For ease of understanding, the embodiment of the present application provides a specific movement track recording method. As shown in FIG. 8, the motion track recording method may include the following steps:

S201:电子设备检测到作用于开始控件404的点击操作。S201: The electronic device detects a click operation acting on thestart control 404.

具体地,电子设备检测到作用与开始控件404的点击操作后,用户开始户外运动,电子设备开始记录用户的运动轨迹。Specifically, after the electronic device detects the click operation of the action and startcontrol 404, the user starts to exercise outdoors, and the electronic device starts to record the user's movement track.

S202:应用处理器接收GPS芯片发送的GPS数据,采用第一定位算法对GPS数据进行处理。S202: The application processor receives the GPS data sent by the GPS chip, and uses the first positioning algorithm to process the GPS data.

具体地,第一定位算法包含的特性可参考表1列举的完整的定位算法包含的特性,此处不赘述。记录运动轨迹的初始记录模式为第一模式。处理后的GPS数据可以实时地以点的形式显示在运动APP的地图中,用户可以实时查看自己的运动轨迹。Specifically, for the characteristics included in the first positioning algorithm, reference may be made to the characteristics included in the complete positioning algorithm listed in Table 1, and details are not described here. The initial recording mode for recording the motion track is the first mode. The processed GPS data can be displayed on the map of the sports APP in the form of points in real time, and users can view their own movement trajectory in real time.

S203:判断显示屏是否熄灭,若是,执行S204。S203: Determine whether the display screen is off, and if so, execute S204.

具体地,在电子设备首次以第一模式记录运动轨迹的情况下,电子设备可根据显示屏是否熄灭判断是否需要以第二模式记录运动轨迹。Specifically, when the electronic device records the motion trajectory in the first mode for the first time, the electronic device can determine whether the motion trajectory needs to be recorded in the second mode according to whether the display screen is off.

上述判断是否需要以第二模式记录运动轨迹的步骤可由应用处理器来执行。The above step of judging whether it is necessary to record the motion track in the second mode can be performed by the application processor.

S204:MCU接收GPS芯片发送的GPS数据,采用第二定位算法对GPS数据进行处理,并保存至少两个位置点的处理后的GPS数据。S204: The MCU receives the GPS data sent by the GPS chip, uses the second positioning algorithm to process the GPS data, and saves the processed GPS data of at least two location points.

具体地,以第二模式记录运动轨迹时,GPS芯片与MCU连接,并向MCU发送GPS数据。MCU可以采用第二定位算法对GPS数据进行处理。其中,第二定位算法包含的特性可参考表1列举的精简的定位算法包含的特性,此处不赘述。MCU可保存多个处理后的GPS数据。Specifically, when the motion track is recorded in the second mode, the GPS chip is connected to the MCU, and sends GPS data to the MCU. The MCU may use the second positioning algorithm to process the GPS data. For the characteristics included in the second positioning algorithm, reference may be made to the characteristics included in the simplified positioning algorithm listed in Table 1, and details are not described here. The MCU can save multiple processed GPS data.

S205:判保存的处理后的GPS数据是否达到门限B;若是,执行S208。S205: Determine whether the stored processed GPS data reaches the threshold B; if yes, execute S208.

可能地,门限B可以是指保存的GPS数据的内存,B可以但不限于是10kb、20kb、25kb等。Possibly, the threshold B may refer to the memory of the stored GPS data, and B may be, but not limited to, 10kb, 20kb, 25kb, and so on.

可能地,门限B可以是指保存GPS数据的时长,B可以但不限于是1分钟、3分钟、5分钟等。Possibly, the threshold B may refer to the duration of saving GPS data, and B may be, but not limited to, 1 minute, 3 minutes, 5 minutes, and so on.

S206:根据保存的处理后的GPS数据判断应用处理器被唤醒的条件是否达到;若是,执行S208。S206: Determine whether the condition for the application processor to be woken up is reached according to the saved processed GPS data; if so, execute S208.

具体地,应用处理器被唤醒的条件可以是在从正常模式切换至低功耗模式时,由应用处理器向MCU发送的唤醒条件。其中,唤醒条件具体由用户设置的语音播报的条件确定。用户设置的语音播报的条件例如可以是整公里播报、半公里播报、或者按照固定的时间间隔播报。Specifically, the condition for the application processor to be woken up may be the wake-up condition sent by the application processor to the MCU when switching from the normal mode to the low power consumption mode. The wake-up condition is specifically determined by the voice broadcast condition set by the user. The condition of the voice broadcast set by the user may be, for example, the broadcast of the whole kilometer, the broadcast of half a kilometer, or the broadcast at a fixed time interval.

若用户设置的语音播报的条件是整公里播报,则唤醒条件可以是根据当前的运动距离计算出的达到下一次整公里时的目标唤醒距离。If the condition of the voice broadcast set by the user is the broadcast of the whole kilometer, the wake-up condition may be the target wake-up distance when the next full kilometer is reached, calculated according to the current movement distance.

若用户设置的语音播报的条件是按照固定的时间间隔播报,则唤醒条件可以是根据当前的运动时长计算出的达到下一次播报时刻的目标唤醒时间。If the voice broadcast condition set by the user is to broadcast at a fixed time interval, the wake-up condition may be the target wake-up time to reach the next broadcast time calculated according to the current exercise duration.

S207:判断显示屏是否被点亮;若是,执行S208。S207: Determine whether the display screen is lit; if yes, execute S208.

具体地,显示屏被点亮后,可以第一模式记录运动轨迹,从而在显示屏中显示用户的运动轨迹。Specifically, after the display screen is lit, the movement track can be recorded in the first mode, so that the user's movement track is displayed on the display screen.

S208:MCU向应用处理器发送上述至少两个位置点的处理后的GPS数据。S208: The MCU sends the processed GPS data of the at least two location points to the application processor.

此时,电子设备的应用处理器被唤醒,接收MCU发送的至少两个位置点的处理后的GPS数据,根据至少两个位置点的处理后的GPS数据在运动APP的地图中显示用户的运动轨迹。At this time, the application processor of the electronic device is awakened, receives the processed GPS data of at least two location points sent by the MCU, and displays the user's movement in the map of the sports APP according to the processed GPS data of the at least two location points. trajectory.

具体地,MCU向应用处理器发送数据完毕后,可以删除保存的GPS数据释放内存,以便下一次以第二模式记录运动轨迹时再次保存GPS数据。Specifically, after the MCU completes sending data to the application processor, the stored GPS data can be deleted to release the memory, so that the GPS data can be saved again when the motion trajectory is recorded in the second mode next time.

S209:应用处理器接收GPS芯片发送的GPS数据,采用第一定位算法对GPS数据进行处理。S209: The application processor receives the GPS data sent by the GPS chip, and uses the first positioning algorithm to process the GPS data.

具体地,电子设备非首次以第一模式记录运动轨迹。Specifically, it is not the first time that the electronic device records the motion trajectory in the first mode.

S210:判断显示屏是否熄灭,且上述至少两个位置点的处理后的GPS数据是否发送完毕,且应用处理器对GPS数据的第二次处理是否完毕;若是,执行S204。S210: Determine whether the display screen is off, and whether the processed GPS data of the above at least two position points is sent, and whether the second processing of the GPS data by the application processor is completed; if so, go to S204.

具体地,在电子设备非首次以第一模式记录运动轨迹的情况下,电子设备可根据显示屏是否熄灭及第二模式下保存的数据是否发送完毕来判断是否需要以第二模式记录运动轨迹。上述判断是否需要以第二模式记录运动轨迹的步骤可由应用处理器来执行。Specifically, when the electronic device records the motion trajectory in the first mode for the first time, the electronic device can determine whether the motion trajectory needs to be recorded in the second mode according to whether the display screen is turned off and whether the data saved in the second mode has been sent. The above step of judging whether it is necessary to record the motion track in the second mode can be performed by the application processor.

若第二模式下保存的GPS数据发送完毕,可再次以第二模式记录运动轨迹,直至电子设备检测到用于结束记录运动轨迹的用户操作。If the GPS data saved in the second mode is sent, the movement track can be recorded again in the second mode until the electronic device detects a user operation for ending the recording of the movement track.

本申请实施例中,上述第一模式可以是前述实施例中提到的正常模式,上述第二模式可以是前述实施例中提到的低功耗模式。In this embodiment of the present application, the first mode may be the normal mode mentioned in the foregoing embodiments, and the foregoing second mode may be the low power consumption mode mentioned in the foregoing embodiments.

本申请实施例中,上述第一定位算法可以是前述实施例中提到的完整的定位算法,上述第二定位算法可以是前述实施例中提到的精简的定位算法。In this embodiment of the present application, the first positioning algorithm may be the complete positioning algorithm mentioned in the foregoing embodiments, and the foregoing second positioning algorithm may be the simplified positioning algorithm mentioned in the foregoing embodiments.

本申请实施例提供的运动轨迹记录方法可以采用两种记录模式记录运动轨迹。在第二模式下,MCU可以接收GPS芯片发送的GPS数据,并对GPS数据进行处理,保存多个处理后的GPS数据。在满足切换条件的情况下,将保存的多个处理后的GPS数据批量发送至应用处理器。使应用处理器在第二模式下休眠,节省功耗,提升电子设备的续航能力。此外,根据用户设置的语音播报的条件设置从第二模式切换至第一模式的切换条件,可以使电子设备在节省功耗的同时,不被用户感知,不影响用户的正常使用。此外,本申请中有低功耗收益的器件为MCU。因此本申请的技术方案可适用于所有具备MCU的电子设备,适用范围广。The motion track recording method provided in the embodiment of the present application can record the motion track by using two recording modes. In the second mode, the MCU can receive GPS data sent by the GPS chip, process the GPS data, and save a plurality of processed GPS data. When the switching conditions are satisfied, the stored plurality of processed GPS data are sent to the application processor in batches. The application processor sleeps in the second mode to save power consumption and improve the battery life of the electronic device. In addition, setting the switching condition for switching from the second mode to the first mode according to the voice broadcast condition set by the user can save the power consumption of the electronic device without being perceived by the user and not affecting the normal use of the user. In addition, the devices with low power consumption benefits in this application are MCUs. Therefore, the technical solution of the present application can be applied to all electronic devices with MCU, and has a wide range of applications.

在一种具体的实施例中,假设用户当前的运动距离为2.9公里,用户设置的语音播报的条件为整公里播报。若手机的显示屏处于点亮状态,当前的记录模式为正常模式,则手机一直采用正常模式记录运动轨迹,并在运动距离为3公里时进行语音播报。若手机的显示屏处于熄灭状态,当前的记录模式为低功耗模式,则手机可提前唤醒应用处理器,切换至正常模式记录运动轨迹,并在运动距离为3公里时及时地进行语音播报。In a specific embodiment, it is assumed that the current movement distance of the user is 2.9 kilometers, and the condition of the voice broadcast set by the user is the whole kilometer broadcast. If the display screen of the mobile phone is on and the current recording mode is the normal mode, the mobile phone will always use the normal mode to record the movement track, and make a voice broadcast when the movement distance is 3 kilometers. If the screen of the mobile phone is off and the current recording mode is the low power consumption mode, the mobile phone can wake up the application processor in advance, switch to the normal mode to record the movement track, and make a timely voice broadcast when the movement distance is 3 kilometers.

表2示例性示出了各个场景下,现有技术和本申请的耗电量对比情况。可以看出,在各个场景中,实施本申请实施例可以节省约50%的耗电量。Table 2 exemplarily shows the comparison of power consumption between the prior art and the present application under various scenarios. It can be seen that, in various scenarios, implementing the embodiments of the present application can save about 50% of power consumption.

表2不同场景下,现有技术和本申请的耗电量对比表Table 2. Comparison table of power consumption between the prior art and the present application under different scenarios

场景Scenes人群crowd现有技术耗电(毫安)Current Technology Power Consumption (mA)本申请耗电(毫安)Power consumption of this application (mA)跑步1小时1 hour run偶尔锻炼人群Occasional exercise crowd85854040爬山5小时5 hours climbing登山游玩人群Mountaineering crowd420420200200骑行8小时8 hours of riding自行车骑行爱好者Cyclists680680320320跑步20小时20 hours of running超级马拉松参与人员Ultramarathon participants17001700800800

接下来介绍本申请实施例提供的MCU的结构。如图9所示,MCU80至少可以包括:存储模块810、处理模块820、收发模块830。存储模块810及收发模块830与处理模块820耦合。其中:Next, the structure of the MCU provided by the embodiment of the present application is introduced. As shown in FIG. 9 , theMCU 80 may at least include: astorage module 810 , aprocessing module 820 , and atransceiver module 830 . Thestorage module 810 and thetransceiver module 830 are coupled with theprocessing module 820 . in:

存储模块810用于存储计算机程序代码,该计算机程序代码包括计算机指令。存储模块810还可以用于存储定位算法。本申请实施例中,该定位算法可以是前述实施例中提到的精简的定位算法。Thestorage module 810 is used to store computer program code, the computer program code including computer instructions. Thestorage module 810 may also be used to store positioning algorithms. In this embodiment of the present application, the positioning algorithm may be the simplified positioning algorithm mentioned in the foregoing embodiments.

处理模块820用于调用存储器810中的计算机指令,使MCU执行:Theprocessing module 820 is used to call the computer instructions in thememory 810 to make the MCU execute:

通过收发模块830接收GPS芯片发送的GPS数据;Receive GPS data sent by the GPS chip through thetransceiver module 830;

通过处理模块820采用定位算法对GPS数据进行处理;Theprocessing module 820 adopts the positioning algorithm to process the GPS data;

将至少两个位置点的处理后的GPS数据保存至存储模块810中;saving the processed GPS data of at least two position points in thestorage module 810;

在满足第一条件的情况下,通过收发模块830将存储模块810中保存的至少两个位置点的处理后的GPS数据发送至应用处理器。When the first condition is satisfied, the processed GPS data of at least two position points stored in thestorage module 810 is sent to the application processor through thetransceiver module 830 .

在一些实施例中,处理模块810还可以用于判断是否满足第二条件,若是,则通过收发模块830接收GPS芯片发送的GPS数据。In some embodiments, theprocessing module 810 may also be configured to determine whether the second condition is satisfied, and if so, receive the GPS data sent by the GPS chip through thetransceiver module 830 .

本申请实施例中,上述第一条件可以是前述实施例中描述的低功耗模式切换为正常模式的条件。上述第二条件可以是前述实施例中描述的正常模式切换为低功耗模式的条件。此处不赘述。In the embodiment of the present application, the above-mentioned first condition may be the condition for switching from the low power consumption mode to the normal mode described in the foregoing embodiment. The above-mentioned second condition may be the condition for switching from the normal mode to the low power consumption mode described in the foregoing embodiments. I won't go into details here.

接下来介绍本申请实施例提供的一种电子设备。如图10所示,电子设备90至少可以包括:检测模块910、记录模块920、及发送模块930。其中:Next, an electronic device provided by an embodiment of the present application is introduced. As shown in FIG. 10 , theelectronic device 90 may at least include: adetection module 910 , arecording module 920 , and a sending module 930 . in:

检测模块910可以检测用于开始记录运动轨迹的第一用户操作。具体可参考S101的描述,此处不赘述。Thedetection module 910 may detect the first user operation for starting to record the motion track. For details, reference may be made to the description of S101, which is not repeated here.

响应于上述第一用户操作,记录模块920可以用于以第一模式记录运动轨迹。具体可参考S102的描述,此处不赘述。In response to the above-mentioned first user operation, therecording module 920 may be configured to record the motion trajectory in the first mode. For details, reference may be made to the description of S102, which is not repeated here.

记录模块920还可以用于在满足第一条件的情况下,以第二模式记录运动轨迹。具体可参考S103的描述,此处不赘述。Therecording module 920 can also be used to record the movement track in the second mode under the condition that the first condition is satisfied. For details, reference may be made to the description of S103, which is not repeated here.

发送模块930可以用于在满足第二条件的情况下,将保存的至少两个位置点的处理后的GPS数据发送至应用处理器。具体可参考S104的描述,此处不赘述。The sending module 930 may be configured to send the stored processed GPS data of the at least two location points to the application processor under the condition that the second condition is satisfied. For details, reference may be made to the description of S104, which is not repeated here.

记录模块920还可以用于在满足第二条件的情况下,以第一模式记录运动轨迹。具体可参考S104的描述,此处不赘述。Therecording module 920 can also be used to record the movement track in the first mode under the condition that the second condition is satisfied. For details, reference may be made to the description of S104, which is not repeated here.

本申请实施例中,上述第一模式可以是前述实施例中提到的正常模式,上述第二模式可以是前述实施例中提到的低功耗模式。上述第一条件可以是前述实施例中提到的正常模式切换为低功耗模式的条件,上述第二条件可以是前述实施例中提到的低功耗模式切换为正常模式的条件。In this embodiment of the present application, the first mode may be the normal mode mentioned in the foregoing embodiments, and the foregoing second mode may be the low power consumption mode mentioned in the foregoing embodiments. The above first condition may be the condition for switching from the normal mode to the low power consumption mode mentioned in the foregoing embodiment, and the above second condition may be the condition for switching from the low power consumption mode to the normal mode mentioned in the foregoing embodiment.

不限于将GPS芯片获取的GPS数据发送给MCU,还可以将codec芯片采集的声音数据发送给DSP,由DSP保存至少两个声音数据后发送至应用处理器,可用于检测用户睡眠过程中的声音信号,如打呼的声音、说梦话的声音、翻身的声音等。采用这种方式采集声音信号,可避免应用处理器一直接收codec芯片上报的声音数据,使应用处理器可在DSP保存至少两个声音数据的过程中处于休眠状态,降低由应用处理器引起的功耗,提升电子设备的续航能力。It is not limited to sending the GPS data obtained by the GPS chip to the MCU, but also can send the sound data collected by the codec chip to the DSP, and the DSP saves at least two sound data and sends it to the application processor, which can be used to detect the sound of the user during sleep. Signals, such as snoring, sleep talking, turning over, etc. Using this method to collect sound signals can prevent the application processor from constantly receiving the sound data reported by the codec chip, so that the application processor can be in a dormant state when the DSP saves at least two sound data, reducing the function caused by the application processor. power consumption and improve the battery life of electronic devices.

本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机或处理器上运行时,使得计算机或处理器执行上述任一个方法中的一个或多个步骤。上述信号处理装置的各组成模块如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在所述计算机可读取存储介质中。Embodiments of the present application also provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer or processor is run on a computer or a processor, the computer or the processor is made to execute any one of the above methods. or multiple steps. If each component module of the above signal processing device is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in the computer-readable storage medium.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer instructions can be sent from one website site, computer, server, or data center to another website site by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) , computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented. The process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed , which may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Claims (38)

1. An electronic device is characterized by comprising a touch sensor, an application processor, a Micro Control Unit (MCU) and a Global Positioning System (GPS) chip; wherein:
the GPS chip is used for acquiring GPS data of the current position of the electronic equipment;
the application processor is connected with the GPS chip and used for receiving the GPS data sent by the GPS chip and processing the GPS data by adopting a first positioning algorithm;
the MCU is connected with the GPS chip and used for receiving the GPS data sent by the GPS chip under the condition of meeting a first condition, processing the GPS data by adopting a second positioning algorithm and storing the processed GPS data of at least two position points;
the MCU is also connected with the application processor and is used for sending the processed GPS data of the at least two position points to the application processor under the condition that a second condition is met.
2. The electronic device of claim 1, wherein the electronic device further comprises a display screen, and the first condition is the display screen being off.
3. The electronic device of claim 1, wherein the first condition is that the MCU has transmitted the processed GPS data for the at least two location points to the application processor for a duration of a seconds and the processed GPS data for the at least two location points has been transmitted; wherein A is a positive integer.
4. The electronic device of claim 1, wherein the electronic device further comprises a display screen, and the first condition is that the display screen is off, the processed GPS data for the at least two location points has been sent, and the application processor has processed the processed GPS data for the at least two location points.
5. The electronic device of claim 1, wherein the electronic device further comprises a display screen, and the second condition is any one of: and determining that the condition that the application processor is awakened next time reaches according to the processed GPS data of the at least two position points, and lightening the display screen.
6. The electronic device of claim 5, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and the memory occupied by the processed GPS data of the at least two position points reaches a threshold.
7. The electronic device of claim 5, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and storing the processed GPS data of the at least two position points until the time length reaches a threshold.
8. The electronic device according to claim 5, wherein a condition that the application processor is woken up next time is determined by a condition of voice announcement set by a user.
9. The electronic device according to claim 8, wherein the voice broadcast condition set by the user is broadcast at intervals of a fixed moving distance, and the condition that the application processor is awakened next time is that the difference between the current moving distance and the moving distance of the next voice broadcast is a first distance; and the moving distance of the next voice broadcast is greater than the current moving distance.
10. The electronic device according to claim 8, wherein the voice broadcast condition set by the user is broadcast at a fixed time interval, and the condition that the application processor is awakened next time is that the difference between the current time and the time of the next voice broadcast is a first duration; and the time of the next voice broadcast is later than the current time.
11. The electronic device of any of claims 1-10, wherein the memory occupied by the first positioning algorithm is greater than the memory occupied by the second positioning algorithm.
12. The MCU is characterized by comprising a processing module, a storage module and a transceiving module; wherein:
the storage module and the transceiver module are coupled to the processing module, the storage module is configured to store computer program code, the computer program code includes computer instructions, and when the one or more processing modules execute the computer instructions, the MCU performs:
receiving GPS data sent by a GPS chip through the transceiver module;
processing the GPS data by the processing module by adopting a positioning algorithm;
the processed GPS data of at least two position points are stored in the storage module;
and under the condition that the condition is met, the processed GPS data of the at least two position points are sent to an application processor through the transceiving module.
13. The MCU of claim 12, wherein the condition is any one of: and determining that the condition that the application processor is awakened next time is reached according to the processed GPS data of the at least two position points when the processed GPS data of the at least two position points reaches a threshold.
14. The MCU of claim 13, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and the memory occupied by the processed GPS data of the at least two position points reaches a threshold.
15. The MCU of claim 13, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and storing the processed GPS data of the at least two position points until the time length reaches a threshold.
16. The MCU of claim 13, wherein the condition that the application processor is next woken up is determined by a condition of voice announcement set by a user.
17. The MCU of claim 16, wherein the voice broadcast condition set by the user is a broadcast at intervals of a fixed moving distance, and the condition that the application processor is next awakened is that a difference between a current moving distance and a moving distance of a next voice broadcast is a first distance; and the moving distance of the next voice broadcast is greater than the current moving distance.
18. The MCU of claim 16, wherein the voice broadcast condition set by the user is to broadcast at a fixed time interval, and the condition that the application processor is next awakened is that a difference between a current time and a next time of the voice broadcast is a first duration; and the time of the next voice broadcast is later than the current time.
19. A motion trail recording method is applied to electronic equipment, the electronic equipment comprises an application processor, a Micro Control Unit (MCU) and a Global Positioning System (GPS) chip, and the method comprises the following steps:
the electronic equipment records a motion track in a first mode; the first mode is that the GPS chip is connected with the application processor, GPS data acquired by the GPS chip is sent to the application processor, and the application processor processes the GPS data by adopting a first positioning algorithm;
under the condition that a first condition is met, the electronic equipment records a motion track in a second mode; the second mode is that the GPS chip is connected with the MCU, the GPS data acquired by the GPS chip is sent to the MCU, the MCU processes the GPS data by adopting a second positioning algorithm, and the processed GPS data of at least two position points are stored;
and under the condition that a second condition is met, the MCU sends the stored processed GPS data of the at least two position points to the application processor, and the electronic equipment records the motion trail in a first mode.
20. The method of claim 19, wherein the electronic device further comprises a display screen, and wherein the first condition is the display screen being off.
21. The method of claim 19, wherein the first condition is that the MCU has transmitted the processed GPS data for the at least two location points to the application processor for a duration of a seconds and the processed GPS data for the at least two location points has been transmitted; wherein A is a positive integer.
22. The method of claim 19, wherein the electronic device further comprises a display screen, and wherein the first condition is that the display screen is off, the processed GPS data for the at least two location points has been sent, and the application processor has processed the processed GPS data for the at least two location points.
23. The method of claim 19, wherein the electronic device further comprises a display screen, and the second condition is any one of: and determining that the condition that the application processor is awakened next time is met according to the processed GPS data of the at least two position points, and lightening the display screen.
24. The method of claim 23, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and the memory occupied by the processed GPS data of the at least two position points reaches a threshold.
25. The method of claim 23, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and storing the processed GPS data of the at least two position points until the time length reaches a threshold.
26. The method of claim 23, wherein a condition for the application processor to be woken up next time is determined by a condition for voice broadcasting set by a user.
27. The method of claim 26, wherein the voice announcement condition set by the user is announcement at intervals of a fixed moving distance, and the condition that the application processor is next awakened is that a difference between a current moving distance and a moving distance of a next voice announcement is a first distance; and the moving distance of the next voice broadcast is greater than the current moving distance.
28. The method of claim 26, wherein the voice broadcasting condition set by the user is broadcasting at a fixed time interval, and the condition that the application processor is next awakened is that a difference between a current time and a next time of the voice broadcasting is a first duration; and the time of the next voice broadcast is later than the current time.
29. The method of any of claims 19-28, wherein the memory occupied by the first positioning algorithm is greater than the memory occupied by the second positioning algorithm.
30. A motion track recording method is characterized in that the method is applied to a Micro Control Unit (MCU), the MCU is connected with a GPS chip and an application processor, and the method comprises the following steps:
receiving GPS data sent by the GPS chip;
processing the GPS data by adopting a positioning algorithm;
storing the processed GPS data of at least two position points;
and under the condition that the condition is met, transmitting the processed GPS data of the at least two position points to an application processor.
31. The method of claim 30, wherein the condition is any one of: and determining that the condition that the application processor is awakened next time is reached according to the processed GPS data of the at least two position points when the processed GPS data of the at least two position points reaches a threshold.
32. The method of claim 31, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and the memory occupied by the processed GPS data of the at least two position points reaches a threshold.
33. The method of claim 31, wherein the processed GPS data for the at least two location points reaching a threshold comprises: and storing the processed GPS data of the at least two position points until the time length reaches a threshold.
34. The method of claim 31, wherein the condition for the next time the application processor is woken up is determined by a condition for voice announcement set by a user.
35. The method of claim 34, wherein the voice broadcasting condition set by the user is broadcasting at intervals of a fixed moving distance, and the condition that the application processor is awakened next time is that a difference between a current moving distance and a moving distance of the next voice broadcasting is a first distance; and the moving distance of the next voice broadcast is greater than the current moving distance.
36. The method of claim 34, wherein the voice broadcasting condition set by the user is broadcasting at a fixed time interval, and the condition that the application processor is next awakened is that a difference between a current time and a next time of the voice broadcasting is a first duration; and the time of the next voice broadcast is later than the current time.
37. An electronic device, comprising: one or more processors, memory, and a wireless communication module;
the memory and the wireless communication module are coupled to the one or more processors, the memory for storing computer program code comprising computer instructions which, when executed by the one or more processors, cause the electronic device to perform the motion trajectory recording method of any of claims 19-29.
38. A computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform a motion trajectory recording method according to any one of claims 19-29.
CN201910473286.8A2019-05-282019-05-31Motion trail recording method and related equipmentActiveCN112014866B (en)

Priority Applications (4)

Application NumberPriority DateFiling DateTitle
PCT/CN2020/092322WO2020238894A1 (en)2019-05-282020-05-26Motion trajectory recording method and related device
EP20812534.4AEP3919940A4 (en)2019-05-282020-05-26 METHOD FOR RECORDING TRAJECTORY OF MOVEMENT AND ASSOCIATED DEVICE
US17/435,498US12164042B2 (en)2019-05-282020-05-26Exercise track recording method and related device
JP2021559689AJP7404389B2 (en)2019-05-282020-05-26 Movement trajectory recording method and related devices

Applications Claiming Priority (2)

Application NumberPriority DateFiling DateTitle
CN2019104521402019-05-28
CN20191045214052019-05-28

Publications (2)

Publication NumberPublication Date
CN112014866Atrue CN112014866A (en)2020-12-01
CN112014866B CN112014866B (en)2024-03-26

Family

ID=73506898

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910473286.8AActiveCN112014866B (en)2019-05-282019-05-31Motion trail recording method and related equipment

Country Status (5)

CountryLink
US (1)US12164042B2 (en)
EP (1)EP3919940A4 (en)
JP (1)JP7404389B2 (en)
CN (1)CN112014866B (en)
WO (1)WO2020238894A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115221256A (en)*2021-04-202022-10-21花瓣云科技有限公司 A data processing method, system and device
CN116708638A (en)*2022-02-242023-09-05成都鼎桥通信技术有限公司Running mode processing method, running mode processing device, running mode processing equipment, running mode processing medium and running mode processing program product
CN117850568A (en)*2022-09-302024-04-09华为终端有限公司 A processing method and related device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112732024A (en)*2021-01-062021-04-30深圳市前海研祥亚太电子装备技术有限公司Intelligent wearable device and control method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104995581A (en)*2012-11-292015-10-21亚马逊技术有限公司Gesture detection management for an electronic device
US20160025863A1 (en)*2002-04-242016-01-28Ipventure, Inc.Method and apparatus for intelligent acquisition of position information
CN105451328A (en)*2014-08-192016-03-30乐视致新电子科技(天津)有限公司Location positioning method and electronic equipment
CN105764125A (en)*2009-09-162016-07-13三星电子株式会社Portable Terminal And Method Used For Determining Mode Of Indicating User To Move
CN105872976A (en)*2016-05-172016-08-17北京小米移动软件有限公司Positioning method and device

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP4031838B2 (en)*1993-07-282008-01-09富士通株式会社 Data transfer processing management device
US7057551B1 (en)*2004-04-272006-06-06Garmin Ltd.Electronic exercise monitor and method using a location determining component and a pedometer
CN101097252B (en)2006-06-302011-08-17佛山市顺德区顺达电脑厂有限公司Portable electronic device having save electricity function and electricity saving method
JP2010085355A (en)2008-10-022010-04-15Seiko Epson CorpElectronic apparatus and method for controlling the same
JP5750862B2 (en)*2010-01-152015-07-22カシオ計算機株式会社 Positioning device, positioning method and program
JP2012108001A (en)2010-11-172012-06-07Sony CorpInformation processor, position recording method, and program
JP2012145465A (en)2011-01-132012-08-02Seiko Epson CorpPosition calculation method and electronic apparatus
US9128180B2 (en)2012-03-162015-09-08Microsoft Technology Licensing, LlcEfficient power usage in position tracking operations
US9658338B2 (en)*2012-04-132017-05-23Avago Technologies General Ip (Singapore) Pte. Ltd.Apparatus and method to conserve power in a portable GNSS unit
US8976062B2 (en)*2013-04-012015-03-10Fitbit, Inc.Portable biometric monitoring devices having location sensors
US11029414B2 (en)*2013-05-082021-06-08Cm Hk LimitedElectronic devices and methods for providing location information
US10845452B2 (en)2013-05-082020-11-24Cm Hk LimitedHybrid positioning method, electronic apparatus and computer-readable recording medium thereof
JP2015045573A (en)*2013-08-282015-03-12富士通株式会社 Portable information processing apparatus, information processing method, and information processing program
JP6229426B2 (en)*2013-10-162017-11-15セイコーエプソン株式会社 Electronic device and reception control method
CN105827474A (en)2015-01-092016-08-03丹纳赫(上海)工业仪器技术研发有限公司Network monitoring method, data packet filtering method and data packet filtering device
JP6507750B2 (en)2015-03-192019-05-08ブラザー工業株式会社 Image forming device
US9730027B2 (en)*2016-05-192017-08-08Fitbit, Inc.Back-filling of geolocation-based exercise routes
US10560898B1 (en)*2019-05-302020-02-11Snap Inc.Wearable device location systems
KR102677301B1 (en)*2021-06-292024-06-21주식회사 엠씨넥스Distance measuring apparatus for improving power consumption
JP2023121284A (en)*2022-02-212023-08-31セイコーエプソン株式会社Communication system, server device, and communication device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20160025863A1 (en)*2002-04-242016-01-28Ipventure, Inc.Method and apparatus for intelligent acquisition of position information
CN105764125A (en)*2009-09-162016-07-13三星电子株式会社Portable Terminal And Method Used For Determining Mode Of Indicating User To Move
CN104995581A (en)*2012-11-292015-10-21亚马逊技术有限公司Gesture detection management for an electronic device
CN105451328A (en)*2014-08-192016-03-30乐视致新电子科技(天津)有限公司Location positioning method and electronic equipment
CN105872976A (en)*2016-05-172016-08-17北京小米移动软件有限公司Positioning method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115221256A (en)*2021-04-202022-10-21花瓣云科技有限公司 A data processing method, system and device
CN116708638A (en)*2022-02-242023-09-05成都鼎桥通信技术有限公司Running mode processing method, running mode processing device, running mode processing equipment, running mode processing medium and running mode processing program product
CN117850568A (en)*2022-09-302024-04-09华为终端有限公司 A processing method and related device

Also Published As

Publication numberPublication date
EP3919940A4 (en)2022-06-15
CN112014866B (en)2024-03-26
JP2022527581A (en)2022-06-02
US20220137232A1 (en)2022-05-05
WO2020238894A1 (en)2020-12-03
JP7404389B2 (en)2023-12-25
US12164042B2 (en)2024-12-10
EP3919940A1 (en)2021-12-08

Similar Documents

PublicationPublication DateTitle
RU2766255C1 (en)Voice control method and electronic device
CN111724775B (en)Voice interaction method and electronic equipment
CN111416794B (en)Data transmission method and electronic equipment
EP3893129A1 (en)Recommendation method based on user exercise state, and electronic device
CN111819533B (en)Method for triggering electronic equipment to execute function and electronic equipment
WO2021052263A1 (en)Voice assistant display method and device
CN112014866B (en)Motion trail recording method and related equipment
KR20150066083A (en)Multi tasking method of electronic apparatus and electronic apparatus thereof
WO2020259649A1 (en)Bluetooth-based object searching method and electronic device
CN114666694A (en)Bluetooth headset loss prevention method and electronic equipment
CN113225423B (en) A method for recommending a contact and an electronic device
CN109976626A (en)A kind of switching method and electronic equipment of application icon
CN114694646A (en)Voice interaction processing method and related device
CN112150778A (en) Environmental sound processing method and related device
CN114466449B (en)Position feature obtaining method and terminal equipment
CN111902695B (en) A method and terminal for obtaining a user's motion trajectory
CN115460445A (en)Screen projection method of electronic equipment and electronic equipment
CN116070035B (en) Data processing methods and electronic equipment
CN116400974B (en)Method for entering long standby mode, electronic device and readable storage medium
CN113805771B (en) A notification reminder method, terminal device and computer-readable storage medium
CN117348894A (en) A software upgrade method, terminal equipment and system
CN115083400A (en)Voice assistant awakening method and device
CN116382786B (en) Method for entering long standby mode, electronic device and readable storage medium
CN115883714B (en)Message reply method and related equipment
CN118646821A (en) Card display method and electronic device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp