Movatterモバイル変換


[0]ホーム

URL:


CN107241513B - Charging reminding method and device, storage medium and electronic equipment - Google Patents

Charging reminding method and device, storage medium and electronic equipment
Download PDF

Info

Publication number
CN107241513B
CN107241513BCN201710527816.3ACN201710527816ACN107241513BCN 107241513 BCN107241513 BCN 107241513BCN 201710527816 ACN201710527816 ACN 201710527816ACN 107241513 BCN107241513 BCN 107241513B
Authority
CN
China
Prior art keywords
preset
terminal
current
duration
geographic location
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.)
Expired - Fee Related
Application number
CN201710527816.3A
Other languages
Chinese (zh)
Other versions
CN107241513A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710527816.3ApriorityCriticalpatent/CN107241513B/en
Publication of CN107241513ApublicationCriticalpatent/CN107241513A/en
Application grantedgrantedCritical
Publication of CN107241513BpublicationCriticalpatent/CN107241513B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the invention discloses a charging reminding method and device, a storage medium and electronic equipment. The charging reminding method comprises the steps of obtaining the current geographic position of a terminal when the current electric quantity of the terminal is detected to be within a preset electric quantity range; acquiring a distance interval between the current geographical position and a preset geographical position; when the distance interval is smaller than a preset distance threshold, calculating the estimated service life of the terminal according to the current electric quantity and the current time; and when the estimated service life is less than the preset service life, carrying out charging reminding. According to the scheme, charging reminding is carried out by combining the geographical position of the electronic equipment and pre-estimating the service life of the electronic equipment, and the accuracy of charging reminding is improved.

Description

Translated fromChinese
充电提醒方法、装置、存储介质及电子设备Charging reminder method, device, storage medium and electronic device

技术领域technical field

本发明涉及电子技术领域,具体涉及一种充电提醒方法、装置、存储介质及电子设备。The present invention relates to the field of electronic technology, in particular to a charging reminder method, device, storage medium and electronic device.

背景技术Background technique

随着手机、平板电脑等电子设备的普及,电子设备相关技术也迅速发展,以满足人们日益增长的需求。With the popularization of electronic devices such as mobile phones and tablet computers, the related technologies of electronic devices have also developed rapidly to meet the growing demands of people.

然而智能电子设备仍存在电池容量不够大,电量消耗太快的问题。因此,如果不能及时给电子设备充电,会造成使用不便。However, the smart electronic device still has the problem that the battery capacity is not large enough and the power consumption is too fast. Therefore, if the electronic device cannot be charged in time, it will cause inconvenience.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种充电提醒方法、装置、存储介质及电子设备,可以提高充电提醒的准确性。Embodiments of the present invention provide a charging reminder method, device, storage medium and electronic device, which can improve the accuracy of the charging reminder.

本发明实施例提供一种充电提醒方法,包括:An embodiment of the present invention provides a charging reminder method, including:

当检测到当前电量在预设电量范围内时,获取当前地理位置;When it is detected that the current power is within the preset power range, obtain the current geographic location;

获取所述当前地理位置与预设地理位置之间的距离;obtaining the distance between the current geographic location and the preset geographic location;

在所述距离小于预设距离阈值时,根据所述当前电量和当前时间获取预估使用时长;When the distance is less than a preset distance threshold, obtain an estimated usage duration according to the current power and the current time;

在所述预估使用时长小于预设使用时长时,进行充电提醒。When the estimated usage time is less than the preset usage time, a charging reminder is performed.

本发明实施例还提供一种充电提醒装置,包括:The embodiment of the present invention also provides a charging reminder device, including:

第一获取模块,用于当检测到终端的当前电量在预设电量范围内时,获取所述终端的当前地理位置;a first obtaining module, configured to obtain the current geographic location of the terminal when it is detected that the current power of the terminal is within a preset power range;

第二获取模块,用于获取所述当前地理位置与预设地理位置之间的距离间隔;a second obtaining module, configured to obtain a distance interval between the current geographic location and a preset geographic location;

获取模块,用于当所述距离间隔小于预设距离阈值时,根据所述当前电量和当前时间计算所述终端的预估使用时长;an acquisition module, configured to calculate the estimated usage duration of the terminal according to the current power and the current time when the distance interval is less than a preset distance threshold;

提醒模块,用于当所述预估使用时长小于预设使用时长时,进行充电提醒。A reminder module, configured to perform a charging reminder when the estimated usage duration is less than the preset usage duration.

本发明实施例还提供了一种存储介质,存储有多条指令,所述指令适于由处理器加载并执行如上述全部或部分的充电提醒方法。Embodiments of the present invention further provide a storage medium storing a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing all or part of the above charging reminder method.

本发明实施例还提供了一种电子设备,包括存储器、处理器,以及存储在所述存储器中并可在所述处理器中运行的计算机程序,所述处理器执行所述计算机程序时实现如上述全部或部分的充电提醒方法。An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable in the processor, where the processor implements the following when executing the computer program. All or part of the above charging reminder methods.

本发明实施例通过结合电子设备的地理位置及预估电子设备的使用时长来进行充电提醒,提高了充电提醒的准确性。The embodiment of the present invention improves the accuracy of the charging reminder by combining the geographic location of the electronic device and the estimated usage time of the electronic device to perform the charging reminder.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.

图1为本发明实施例的充电提醒方法的场景示意图。FIG. 1 is a schematic diagram of a scene of a charging reminder method according to an embodiment of the present invention.

图2为本发明实施例的充电提醒方法的流程示意图。FIG. 2 is a schematic flowchart of a charging reminder method according to an embodiment of the present invention.

图3为本发明实施例的充电提醒方法的另一流程示意图。FIG. 3 is another schematic flowchart of a charging reminder method according to an embodiment of the present invention.

图4为本发明实施例的充电提醒方法的另一场景示意图。FIG. 4 is a schematic diagram of another scenario of a charging reminder method according to an embodiment of the present invention.

图5为本发明实施例的充电提醒方法的又一场景示意图。FIG. 5 is a schematic diagram of another scenario of the charging reminder method according to the embodiment of the present invention.

图6为本发明实施例的充电提醒装置的结构示意图。FIG. 6 is a schematic structural diagram of a charging reminder device according to an embodiment of the present invention.

图7为本发明实施例的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

图8为本发明实施例的电子设备的另一结构示意图。FIG. 8 is another schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

本发明中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first", "second", "third" and "fourth" in the present invention are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or modules is not limited to the listed steps or modules, but optionally also includes unlisted steps or modules, or optionally also includes Other steps or modules inherent to these processes, methods, products or devices.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

本发明实施例提供的充电提醒方法的执行主体,可以为本发明实施例提供的充电提醒装置,或者集成了所述充电提醒装置的电子设备,所述充电提醒装置可以采用硬件或者软件的方式实现;本发明实施例所描述的电子设备可以是智能手机(如Android手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(MID,MobileInternet Devices)或穿戴式设备等移动设备,上述电子设备仅是举例,而非穷举,包含但不限于上述电子设备。The execution subject of the charging reminder method provided by the embodiment of the present invention may be the charging reminder device provided by the embodiment of the present invention, or an electronic device integrated with the charging reminder device, and the charging reminder device may be implemented by hardware or software. ; The electronic device described in the embodiment of the present invention can be a mobile device such as a smart phone (such as an Android phone, a Windows Phone phone, etc.), a tablet computer, a handheld computer, a notebook computer, a mobile Internet device (MID, Mobile Internet Devices) or a wearable device. , the above electronic devices are only examples, not exhaustive, including but not limited to the above electronic devices.

本发明实施例提供了一种充电提醒方法、装置、存储介质及电子设备。以下将分别进行详细说明。Embodiments of the present invention provide a charging reminder method, device, storage medium, and electronic device. The detailed descriptions will be given below.

请参照图1,图1为本发明实施例提供的充电提醒方法的场景示意图。该场景中包括充电提醒装置,该充电提醒装置具体可以集成在电子设备中。该电子设备可以记录其在一段时间内所处的地理位置,并可以利用相关算法对地理位置进行学习和分析,以得到用户常处的地理位置。同时还可以记录其在一段时间内的耗电情况,并通过学习和分析来预测将来的耗电情况,以便及时提醒用户充电。Please refer to FIG. 1 , which is a schematic diagram of a scene of a charging reminder method provided by an embodiment of the present invention. The scene includes a charging reminder device, and the charging reminder device may specifically be integrated into an electronic device. The electronic device can record its geographic location within a period of time, and can use a relevant algorithm to learn and analyze the geographic location to obtain the user's usual geographic location. At the same time, it can also record its power consumption over a period of time, and predict future power consumption through learning and analysis, so as to remind users to charge in time.

具体的,电子设备预先对历史地理位置信息进行聚类,以得到预设地理位置。电子设备还预先通过历史电量及其对应的历史时间训练预设回归模型。Specifically, the electronic device pre-clusters the historical geographic location information to obtain the preset geographic location. The electronic device also pre-trains a preset regression model through the historical power and its corresponding historical time.

此外,该场景中还包括卫星。在检测到电子设备的当前电量在预设电量范围时,电子设备向卫星发送获取当前地理位置相关数据的请求。电子设备接收到卫星返回的当前地理位置相关数据后,根据该相关数据计算得到电子设备的当前地理位置。接着电子设备计算其当前地理位置和预设地理位置之间的距离间隔,在距离间隔小于预设距离阈值时,再结合电子设备的当前电量、当前时间和预设回归模型来计算预估使用时长。最后电子设备在预估使用时长小于预设使用时长时,进行充电提醒。Also, satellites are included in this scene. When detecting that the current power of the electronic device is within the preset power range, the electronic device sends a request to the satellite to obtain data related to the current geographic location. After the electronic device receives the current geographic location related data returned by the satellite, it calculates and obtains the current geographic location of the electronic device according to the related data. Then the electronic device calculates the distance interval between its current geographic location and the preset geographic location, and when the distance interval is smaller than the preset distance threshold, the estimated usage time is calculated by combining the current battery level, current time and preset regression model of the electronic device . Finally, when the estimated usage time is less than the preset usage time, the electronic device performs a charging reminder.

请参照图2,图2为本发明实施例提供的一种充电提醒方法的流程示意图。下面对本发明实施例的充电提醒方法的各个步骤进行详细说明。Please refer to FIG. 2 , which is a schematic flowchart of a charging reminder method according to an embodiment of the present invention. Each step of the charging reminder method according to the embodiment of the present invention will be described in detail below.

S101,当检测到终端的当前电量在预设电量范围内时,获取终端的当前地理位置。S101, when it is detected that the current power of the terminal is within a preset power range, obtain the current geographical location of the terminal.

由于终端电池的容量有限,因此即使充满电,也往往只能维持终端运行一段时间。故有必要对终端的当前电量进行监控,以及时进行充电提醒。Due to the limited capacity of the terminal battery, even if it is fully charged, the terminal can often only be operated for a period of time. Therefore, it is necessary to monitor the current power of the terminal, and to remind the charging in time.

预先地,可以设置一预设电量范围,比如总电量的30%-50%,再根据当前电量是否处于该预设电量范围来决定是否进行充电提醒。其中,该预设电量范围可以根据统计数据设置,比如统计手机运行时间的角度来说,当手机电量低于30%时,可运行时间较短,当手机电量高于80%时,可运行时间较长。又从用户使用角度来说,大部分用户在手机电量低于20%时会将手机充电,又比如大部分用户不会在手机电量高于80%时将手机充电。则可以将30%-80%,20%-80%设置为预设电量范围。需要说明的是,在此不对预设电量范围进行具体限定。In advance, a preset power range can be set, such as 30%-50% of the total power, and then whether to perform a charging reminder is determined according to whether the current power is within the preset power range. Among them, the preset power range can be set according to statistical data. For example, from the perspective of counting the running time of the mobile phone, when the power of the mobile phone is lower than 30%, the running time is short, and when the power of the mobile phone is higher than 80%, the running time is short. longer. From the perspective of user usage, most users will charge the mobile phone when the power of the mobile phone is lower than 20%, and for example, most users will not charge the mobile phone when the power of the mobile phone is higher than 80%. Then you can set 30%-80%, 20%-80% as the preset power range. It should be noted that the preset power range is not specifically limited here.

当终端的当前电量处于上述预设电量范围时,一般而言都可以维持较长的使用时长。但是,当终端处于耗电高峰期时,会导致电量的快速消耗,使可使用时长变短。因此当终端处于上述预设电量范围时,需要进一步甄别使用时长来决定是否进行充电提醒。When the current power of the terminal is within the above-mentioned preset power range, generally speaking, it can maintain a long usage time. However, when the terminal is in a peak period of power consumption, it will cause rapid consumption of power and shorten the usable time. Therefore, when the terminal is in the above-mentioned preset power range, it is necessary to further screen the usage time to decide whether to perform a charging reminder.

由于终端充电受其所处地理位置的限制,比如在荒郊野外时,往往没有发电设备给终端充电。因此在进行充电提醒之前,需要确保终端处于具备充电条件的地理位置上,故应先获取终端的当前地理位置。具体的,可以通过集成在终端上的GPS(GlobalPositioning System,全球定位系统)来获取当前地理位置。Because the terminal charging is limited by its geographical location, for example, in the wilderness, there is often no power generation equipment to charge the terminal. Therefore, before performing the charging reminder, it is necessary to ensure that the terminal is in a geographical location with charging conditions, so the current geographical location of the terminal should be obtained first. Specifically, the current geographic location can be acquired through a GPS (Global Positioning System, global positioning system) integrated on the terminal.

S102,获取当前地理位置与预设地理位置之间的距离间隔。S102: Obtain a distance interval between the current geographic location and a preset geographic location.

在一些实施例中,一个终端的充电位置是相对固定的。比如用户的公司、学校、家等。因此可以将公司、学校、家等对应的地理位置设置为预设地理位置。在终端当前地理位置靠近该预设地理位置时,视为终端处于具备充电条件的地理位置上。In some embodiments, the charging position of a terminal is relatively fixed. Such as the user's company, school, home, etc. Therefore, the geographic location corresponding to the company, school, home, etc. can be set as the preset geographic location. When the current geographic location of the terminal is close to the preset geographic location, it is considered that the terminal is located in a geographic location with charging conditions.

具体的,可以先计算当前地理位置与预设地理位置之间的距离间隔,再将该距离间隔与预设距离阈值对比来判断终端当前地理位置是否靠近预设地理位置。其中,预设距离阈值为100米、200米、300米等根据实际情况进行设置的距离值。需要说明的是,在本实施例中不对预设距离阈值进行具体限定。Specifically, the distance interval between the current geographic location and the preset geographic location can be calculated first, and then the distance interval is compared with the preset distance threshold to determine whether the current geographic location of the terminal is close to the preset geographic location. Among them, the preset distance threshold is 100 meters, 200 meters, 300 meters, and other distance values set according to the actual situation. It should be noted that the preset distance threshold is not specifically limited in this embodiment.

S103,在距离间隔小于预设距离阈值时,根据当前电量和当前时间计算终端的预估使用时长。S103, when the distance interval is smaller than the preset distance threshold, calculate the estimated usage duration of the terminal according to the current power and the current time.

当距离间隔小于预设距离阈值,说明终端具备充电条件。因此,可以进一步获取预估使用时长来决定是否进行充电提醒。When the distance interval is less than the preset distance threshold, it means that the terminal has the charging conditions. Therefore, the estimated usage time can be further obtained to decide whether to perform a charging reminder.

不同的时间,终端的耗电速度不同。以手机为例,上班时间耗电速度往往低于下班时间耗电速度。又如,周末耗电速度一般快于工作日耗电速度。因此,可以根据当前电量和当前时间来获取预估使用时长。At different times, the terminal consumes power at different speeds. Taking a mobile phone as an example, the power consumption rate during working hours is often lower than that during off-duty hours. For another example, the power consumption rate on weekends is generally faster than that on weekdays. Therefore, the estimated usage time can be obtained according to the current power and the current time.

S104,在预估使用时长小于预设使用时长时,进行充电提醒。S104, when the estimated usage time is less than the preset usage time, perform a charging reminder.

其中,预设使用时长可以是一部电影的播放时间,也可以是一份歌单的播放时间。在此不作具体限定。The preset use duration may be the playback time of a movie or the playback time of a playlist. There is no specific limitation here.

预先地,可以获取运行应用的标识、预设使用时长及二者的关联关系,以建立如下列表。具体的,当终端上运行应用为视频播放应用时,为了确保用户可以完整地观看完当前电影,将预设使用时长设置为一部电影的播放时长120分钟。In advance, the identifier of the running application, the preset usage duration, and the association relationship between the two can be obtained to establish the following list. Specifically, when the application running on the terminal is a video playing application, in order to ensure that the user can watch the current movie completely, the preset usage duration is set to the playing duration of one movie for 120 minutes.

运行应用的标识The identity of the running application预设使用时长Default usage time视频播放应用Video playback application120分钟120 minutes音乐播放应用music playback app60分钟60 minutes搜索应用search application60分钟60 minutes

举例来说,预估使用时长为80分钟,如果当前运行的应用为视频播放应用,则预估使用时长小于预设使用时长,因此进行充电提醒。如果当前运行的应用为音乐播放应用或搜索应用,则预估使用时长不小于预设使用时长,因此不进行充电提醒。For example, the estimated usage time is 80 minutes. If the currently running application is a video playback application, the estimated usage time is less than the preset usage time, so a charging reminder is given. If the currently running application is a music playback application or a search application, the estimated usage time is not less than the preset usage time, so no charging reminder will be given.

本实施例将在上述实施例描述的充电提醒方法的基础上,对本发明的充电提醒方法做进一步介绍,请参考图3,本发明实施例提供的充电提醒方法包括:This embodiment will further introduce the charging reminder method of the present invention on the basis of the charging reminder method described in the above embodiment. Please refer to FIG. 3 . The charging reminder method provided by the embodiment of the present invention includes:

S201,当检测到终端的当前电量在预设电量范围内时,获取终端的当前地理位置。S201, when it is detected that the current power of the terminal is within a preset power range, obtain the current geographic location of the terminal.

由于终端电池的容量有限,因此即使充满电,也往往只能维持终端运行一段时间。故有必要对终端的当前电量进行监控,以及时进行充电提醒。Due to the limited capacity of the terminal battery, even if it is fully charged, the terminal can often only be operated for a period of time. Therefore, it is necessary to monitor the current power of the terminal, and to remind the charging in time.

在一些实施例中,为了减少因触发获取当前电量操作导致的电量消耗,可以设置定时检测功能,比如每间隔1小时,获取终端的当前电量。在一些实施例中,还可以在晚上7点-9点这种耗电高峰期,缩短获取当前电量的时间间隔,比如更改为30分钟,以便及时进行充电提醒。In some embodiments, in order to reduce the power consumption caused by triggering the operation of obtaining the current power, a timing detection function may be set, such as obtaining the current power of the terminal every 1 hour. In some embodiments, the time interval for obtaining the current power can also be shortened, for example, changed to 30 minutes, during peak power consumption periods such as 7:00-9:00 pm, so as to provide a timely charging reminder.

预先地,可以设置一预设电量范围,比如总电量的30%-50%,再根据当前电量是否处于该预设电量范围来决定是否进行充电提醒。其中,该预设电量范围可以根据统计数据设置,比如统计手机运行时间的角度来说,当手机电量低于30%时,可运行时间较短,当手机电量高于80%时,可运行时间较长。又从用户使用角度来说,大部分用户在手机电量低于20%时会将手机充电,又比如大部分用户不会在手机电量高于80%时将手机充电。则可以将30%-80%,20%-80%设置为预设电量范围。需要说明的是,在此不对预设电量范围进行具体限定。In advance, a preset power range can be set, such as 30%-50% of the total power, and then whether to perform a charging reminder is determined according to whether the current power is within the preset power range. Among them, the preset power range can be set according to statistical data. For example, from the perspective of counting the running time of the mobile phone, when the power of the mobile phone is lower than 30%, the running time is short, and when the power of the mobile phone is higher than 80%, the running time is short. longer. From the perspective of user usage, most users will charge the mobile phone when the power of the mobile phone is lower than 20%, and for example, most users will not charge the mobile phone when the power of the mobile phone is higher than 80%. Then you can set 30%-80%, 20%-80% as the preset power range. It should be noted that the preset power range is not specifically limited here.

当终端的当前电量处于上述预设电量范围时,一般而言都可以维持较长的使用时长。但是,当终端处于耗电高峰期时,会导致电量的快速消耗,使可使用时长变短。因此当终端处于上述预设电量范围时,需要进一步甄别使用时长来决定是否进行充电提醒。When the current power of the terminal is within the above-mentioned preset power range, generally speaking, it can maintain a long usage time. However, when the terminal is in a peak period of power consumption, it will cause rapid consumption of power and shorten the usable time. Therefore, when the terminal is in the above-mentioned preset power range, it is necessary to further screen the usage time to decide whether to perform a charging reminder.

由于终端充电受其所处地理位置的限制,比如在荒郊野外时,往往没有发电设备给终端充电。因此在进行充电提醒之前,需要确保终端处于具备充电条件的地理位置上,故应先获取终端的当前地理位置。具体的,可以通过集成在终端上的GPS(GlobalPositioning System,全球定位系统)来获取当前地理位置。Because the terminal charging is limited by its geographical location, for example, in the wilderness, there is often no power generation equipment to charge the terminal. Therefore, before performing the charging reminder, it is necessary to ensure that the terminal is in a geographical location with charging conditions, so the current geographical location of the terminal should be obtained first. Specifically, the current geographic location can be acquired through a GPS (Global Positioning System, global positioning system) integrated on the terminal.

S202,获取当前地理位置与预设地理位置之间的距离间隔。S202: Obtain a distance interval between the current geographic location and a preset geographic location.

在一些实施例中,一个终端的充电位置是相对固定的。比如用户的公司、学校、家等。因此可以将公司、学校、家等对应的地理位置设置为预设地理位置。在终端当前地理位置靠近该预设地理位置时,视为终端处于具备充电条件的地理位置上。In some embodiments, the charging position of a terminal is relatively fixed. Such as the user's company, school, home, etc. Therefore, the geographic location corresponding to the company, school, home, etc. can be set as the preset geographic location. When the current geographic location of the terminal is close to the preset geographic location, it is considered that the terminal is located in a geographic location with charging conditions.

在将当前地理位置和预设地理位置进行比较之前,要设置预设地理位置。具体的设置步骤包括:The preset geographic location is set before comparing the current geographic location with the preset geographic location. The specific setting steps include:

获取历史地理位置信息,其中,历史地理位置信息包括不同时间所处的地理位置。Obtain historical geographic location information, where the historical geographic location information includes geographic locations at different times.

对历史地理位置信息进行聚类,得到预设地理位置。The historical geographic location information is clustered to obtain a preset geographic location.

先大量的采集终端的历史地理位置信息,比如每间隔10分钟采集一次终端的地理位置,得到这些信息构成的向量L=(L1,L2...Lm),其中Lm代表第m个地理位置,Lm=[xm,ym],x为时间,y为地理位置。First, collect a large amount of historical geographic location information of the terminal, for example, collect the geographic location of the terminal every 10 minutes, and obtain a vector L=(L1 , L2 . . . Lm ) composed of these information, where Lm represents the mth A geographic location, Lm =[xm , ym ], x is time, y is geographic location.

在对这些历史地理位置信息进行聚类之前,先利用归一化公式对这些历史地理位置信息进行归一化处理。归一化处理完毕后,从所述历史地理信息中随机选取K个初始聚类的质心点,其中所述历史地理信息包括L=(L1,L2...Lm),其中Lm代表第m个地理位置。然后根据欧几里得距离公式计算所述历史地理信息中每个地理位置与每个质心点的距离。接着在所述距离不处于预设距离范围时,把所述每个地理位置分配给与所述每个数据距离最近的所述质心点,组成新的聚类。再重新计算新的聚类的质心点,重新根据欧几里得距离公式计算所述距离。直到所述距离处于预设距离范围时,聚类完毕。举例来说,如果将K设置为2。如图4所示,可以得到预设地理位置A和B,分别代表公司地址和家庭地址。Before clustering the historical geographic location information, first normalize the historical geographic location information by using a normalization formula. After the normalization process is completed, the centroid points of K initial clusters are randomly selected from the historical geographic information, wherein the historical geographic information includes L=(L1 , L2 . . . Lm ), where Lm represents the mth geographic location. Then, the distance between each geographic location and each centroid point in the historical geographic information is calculated according to the Euclidean distance formula. Then, when the distance is not within a preset distance range, each geographic location is assigned to the centroid point closest to each data to form a new cluster. Then recalculate the centroid point of the new cluster, and recalculate the distance according to the Euclidean distance formula. Until the distance is within the preset distance range, the clustering is completed. For example, if K is set to 2. As shown in FIG. 4 , preset geographic locations A and B can be obtained, representing the company address and the home address, respectively.

接着,获取当前地理位置与预设地理位置之间的距离间隔,再将该距离间隔与预设距离阈值对比来判断终端当前地理位置是否靠近预设地理位置。其中,预设距离阈值为100米、200米、300米等根据实际情况进行设置的距离值。需要说明的是,在本实施例中不对预设距离阈值进行具体限定。Next, the distance interval between the current geographic location and the preset geographic location is obtained, and then the distance interval is compared with the preset distance threshold to determine whether the current geographic location of the terminal is close to the preset geographic location. Among them, the preset distance threshold is 100 meters, 200 meters, 300 meters, and other distance values set according to the actual situation. It should be noted that the preset distance threshold is not specifically limited in this embodiment.

S203,当距离间隔小于预设距离阈值时,获取预设回归模型,其中,预设回归模型根据历史电量及其对应的历史时间建立。S203, when the distance interval is smaller than the preset distance threshold, obtain a preset regression model, wherein the preset regression model is established according to the historical power and the corresponding historical time.

当距离间隔小于预设距离阈值,说明终端具备充电条件。因此,可以进一步获取预估使用时长来决定是否进行充电提醒。When the distance interval is less than the preset distance threshold, it means that the terminal has the charging conditions. Therefore, the estimated usage time can be further obtained to decide whether to perform a charging reminder.

不同的时间,终端的耗电速度不同。以手机为例,上班时间耗电速度往往低于下班时间耗电速度。又如,周末耗电速度一般快于工作日耗电速度。因此,可以根据当前电量和当前时间来获取预估使用时长。At different times, the terminal consumes power at different speeds. Taking a mobile phone as an example, the power consumption rate during working hours is often lower than that during off-duty hours. For another example, the power consumption rate on weekends is generally faster than that on weekdays. Therefore, the estimated usage time can be obtained according to the current power and the current time.

在一些实施例中,可以结合预先训练出来的回归模型来获取预估使用时长。其中,回归模型根据历史电量及其对应的历史时间建立,具体建立过程如下:In some embodiments, the estimated usage duration can be obtained in combination with a pre-trained regression model. Among them, the regression model is established according to the historical electricity and its corresponding historical time. The specific establishment process is as follows:

获取历史电量及其对应的历史时间。Get historical power and its corresponding historical time.

根据历史电量及历史时间,训练预设回归模型。According to the historical power and historical time, the preset regression model is trained.

具体的,以天为时间周期,统计终端的耗电情况。假设选取的统计时间即历史时间为T=(t1,t2...tn),其对应的电量即历史电量为Y=(y1,y2...yn)。统计k天之后,得到的历史电量、历史时间信息包括T=(T1,T2...Tk),Y=(Y1,Y2...Yk),通过上述数据,可以训练得到如图5所示的y=at+b的回归模型,其中y为历史电量,其取值范围为0-100,当y=100时表示终端处于电量充满的状态;t为历史时间,其取值范围为0-24小时;a,b为参数。Specifically, taking days as a time period, the power consumption of the terminal is counted. Assuming that the selected statistical time, that is, the historical time, isT= (t1 ,t2 . After k days of statistics, the obtained historical power and historical time information include T=(T1 , T2 ... Tk ), Y=(Y1 , Y2 ... Yk ). Through the above data, we can train The regression model of y=at+b as shown in Figure 5 is obtained, where y is the historical power, and its value range is 0-100. When y=100, it means that the terminal is in a fully charged state; t is the historical time, its The value range is 0-24 hours; a and b are parameters.

在一些实施例中,在距离间隔不小于预设距离阈值时,也可以根据当前电量和当前时间获取预估使用时长。在预估使用时长小于预设使用时长时,关闭正在运行的预设应用,以降低电量的消耗速度。In some embodiments, when the distance interval is not less than the preset distance threshold, the estimated usage duration may also be obtained according to the current battery level and the current time. When the estimated usage time is less than the preset usage time, close the running preset application to reduce the speed of power consumption.

S204,根据预设回归模型、当前电量和当前时间,计算终端的预估使用时长。S204, according to the preset regression model, the current power and the current time, calculate the estimated usage time of the terminal.

具体的,将当前电量、当前时间作为输入,通过步骤S203中得到的预设回归模型来预估使用时长。Specifically, the current power and the current time are used as inputs, and the usage time is estimated through the preset regression model obtained in step S203.

在一些实施例中,在距离间隔小于预设距离阈值时,还可以根据如下方法获取预估使用时长:In some embodiments, when the distance interval is smaller than the preset distance threshold, the estimated usage duration can also be obtained according to the following method:

根据当前电量和当前运行的应用获取预估使用时长。Get the estimated usage time based on the current battery level and currently running apps.

在预估使用时长小于预设使用时长时,进行充电提醒。When the estimated usage time is less than the preset usage time, a charging reminder will be given.

假设当前运行的应用为视频播放应用,其运行时的耗电速度为V,当前电量为C,则可以计算得到预估使用时长T=C/V。接着,将预估使用时长T与预设使用时长进行比较,在小于预设使用时长时,进行充电提醒。Assuming that the currently running application is a video playback application, its running power consumption speed is V, and the current power consumption is C, then the estimated usage time T=C/V can be calculated. Next, the estimated usage time T is compared with the preset usage duration, and when the usage duration is less than the preset usage duration, a charging reminder is performed.

S205,在预估使用时长小于预设使用时长时,进行充电提醒。S205, when the estimated usage time is less than the preset usage time, a charging reminder is performed.

其中,预设使用时长可以是一部电影的播放时间,也可以是一份歌单的播放时间。在此不作具体限定。The preset use duration may be the playback time of a movie or the playback time of a playlist. There is no specific limitation here.

预先地,可以获取运行应用的标识、预设使用时长及二者的关联关系,以建立如下列表。具体的,当终端上运行应用为视频播放应用时,为了确保用户可以完整地观看完当前电影,将预设使用时长设置为一部电影的播放时长120分钟。In advance, the identifier of the running application, the preset usage duration, and the association relationship between the two can be obtained to establish the following list. Specifically, when the application running on the terminal is a video playing application, in order to ensure that the user can watch the current movie completely, the preset usage duration is set to the playing duration of one movie for 120 minutes.

运行应用的标识The identity of the running application预设使用时长Default usage time视频播放应用Video playback application120分钟120 minutes音乐播放应用music playback app60分钟60 minutes搜索应用search application60分钟60 minutes

举例来说,预估使用时长为80分钟,如果当前运行的应用为视频播放应用,则预估使用时长小于预设使用时长,因此进行充电提醒。如果当前运行的应用为音乐播放应用或搜索应用,则预估使用时长不小于预设使用时长,因此不进行充电提醒。For example, the estimated usage time is 80 minutes. If the currently running application is a video playback application, the estimated usage time is less than the preset usage time, so a charging reminder is given. If the currently running application is a music playback application or a search application, the estimated usage time is not less than the preset usage time, so no charging reminder will be given.

为了更好地实施以上方法,在一优选实施例中提供了一种充电提醒装置,该充电提醒装置可以集成在电子设备中,该电子设备具体可以是智能手机、平板电脑等设备。In order to better implement the above method, in a preferred embodiment, a charging reminder device is provided. The charging reminder device can be integrated into an electronic device, and the electronic device can specifically be a smart phone, a tablet computer, or other devices.

请参照图6,充电提醒装置30包括第一获取模块301、第二获取模块302、获取模块303及提醒模块304,具体描述如下:Please refer to FIG. 6 , the charging reminder device 30 includes a first acquisition module 301 , a second acquisition module 302 , an acquisition module 303 and a reminder module 304 , which are specifically described as follows:

第一获取模块301,用于当检测到终端的当前电量在预设电量范围内时,获取终端的当前地理位置。The first obtaining module 301 is configured to obtain the current geographic location of the terminal when it is detected that the current power of the terminal is within a preset power range.

预先地,可以设置一预设电量范围,比如总电量的30%-50%,再根据第一获取模块301检测当前电量是否处于该预设电量范围来决定是否进行充电提醒。其中,该预设电量范围可以根据统计数据设置,比如统计手机运行时间的角度来说,当手机电量低于30%时,可运行时间较短,当手机电量高于80%时,可运行时间较长。又从用户使用角度来说,大部分用户在手机电量低于20%时会将手机充电,又比如大部分用户不会在手机电量高于80%时将手机充电。则可以将30%-80%,20%-80%设置为预设电量范围。需要说明的是,在此不对预设电量范围进行具体限定。In advance, a preset power range can be set, such as 30%-50% of the total power, and then whether to perform a charging reminder is determined according to whether the current power is within the preset power range detected by the first acquisition module 301 . Among them, the preset power range can be set according to statistical data. For example, from the perspective of counting the running time of the mobile phone, when the power of the mobile phone is lower than 30%, the running time is short, and when the power of the mobile phone is higher than 80%, the running time is short. longer. From the perspective of user usage, most users will charge the mobile phone when the power of the mobile phone is lower than 20%, and for example, most users will not charge the mobile phone when the power of the mobile phone is higher than 80%. Then you can set 30%-80%, 20%-80% as the preset power range. It should be noted that the preset power range is not specifically limited here.

当终端的当前电量处于上述预设电量范围时,一般而言都可以维持较长的使用时长。但是,当终端处于耗电高峰期时,会导致电量的快速消耗,使可使用时长变短。因此当第一获取模块301检测到终端处于上述预设电量范围时,需要进一步甄别使用时长来决定是否进行充电提醒。When the current power of the terminal is within the above-mentioned preset power range, generally speaking, it can maintain a long usage time. However, when the terminal is in a peak period of power consumption, it will cause rapid consumption of power and shorten the usable time. Therefore, when the first acquisition module 301 detects that the terminal is in the above-mentioned preset power range, it needs to further screen the usage time to decide whether to perform a charging reminder.

由于终端充电受其所处地理位置的限制,比如在荒郊野外时,往往没有发电设备给终端充电。因此在进行充电提醒之前,需要确保终端处于具备充电条件的地理位置上,故第一获取模块301进一步获取终端的当前地理位置。具体的,可以通过集成在终端上的GPS(Global Positioning System,全球定位系统)来获取当前地理位置。Because the terminal charging is limited by its geographical location, for example, in the wilderness, there is often no power generation equipment to charge the terminal. Therefore, before performing the charging reminder, it is necessary to ensure that the terminal is in a geographical location with charging conditions, so the first acquisition module 301 further acquires the current geographical location of the terminal. Specifically, the current geographic location can be acquired through a GPS (Global Positioning System, global positioning system) integrated on the terminal.

第二获取模块302,用于获取当前地理位置与预设地理位置之间的距离间隔。The second obtaining module 302 is configured to obtain the distance interval between the current geographic location and the preset geographic location.

在一些实施例中,一个终端的充电位置是相对固定的。比如用户的公司、学校、家等。因此可以将公司、学校、家等对应的地理位置设置为预设地理位置。在终端当前地理位置靠近该预设地理位置时,视为终端处于具备充电条件的地理位置上。In some embodiments, the charging position of a terminal is relatively fixed. Such as the user's company, school, home, etc. Therefore, the geographic location corresponding to the company, school, home, etc. can be set as the preset geographic location. When the current geographic location of the terminal is close to the preset geographic location, it is considered that the terminal is located in a geographic location with charging conditions.

具体的,可以先由第二获取模块302获取当前地理位置与预设地理位置之间的距离间隔,再将该距离间隔与预设距离阈值对比来判断终端当前地理位置是否靠近预设地理位置。其中,预设距离阈值为100米、200米、300米等根据实际情况进行设置的距离值。需要说明的是,在本实施例中不对预设距离阈值进行具体限定。Specifically, the second obtaining module 302 may first obtain the distance interval between the current geographic location and the preset geographic location, and then compare the distance interval with the preset distance threshold to determine whether the current geographic location of the terminal is close to the preset geographic location. Among them, the preset distance threshold is 100 meters, 200 meters, 300 meters, and other distance values set according to the actual situation. It should be noted that the preset distance threshold is not specifically limited in this embodiment.

获取模块303,用于在距离间隔小于预设距离阈值时,根据当前电量和当前时间,计算终端的预估使用时长。The obtaining module 303 is configured to calculate the estimated usage time of the terminal according to the current power and the current time when the distance interval is smaller than the preset distance threshold.

当距离间隔小于预设距离阈值,说明终端具备充电条件。因此,可以进一步获取预估使用时长来决定是否进行充电提醒。When the distance interval is less than the preset distance threshold, it means that the terminal has the charging conditions. Therefore, the estimated usage time can be further obtained to decide whether to perform a charging reminder.

不同的时间,终端的耗电速度不同。以手机为例,上班时间耗电速度往往低于下班时间耗电速度。又如,周末耗电速度一般快于工作日耗电速度。因此,可以由获取模块303根据当前电量和当前时间来获取预估使用时长。At different times, the terminal consumes power at different speeds. Taking a mobile phone as an example, the power consumption rate during working hours is often lower than that during off-duty hours. For another example, the power consumption rate on weekends is generally faster than that on weekdays. Therefore, the estimated usage duration can be obtained by the obtaining module 303 according to the current power and the current time.

提醒模块304,用于在预估使用时长小于预设使用时长时,进行充电提醒。The reminding module 304 is used to remind the charging when the estimated usage time is less than the preset usage time.

其中,预设使用时长可以是一部电影的播放时间,也可以是一份歌单的播放时间。在此不作具体限定。The preset use duration may be the playback time of a movie or the playback time of a playlist. There is no specific limitation here.

预先地,可以获取运行应用的标识、预设使用时长及二者的关联关系,以建立如下列表。具体的,当终端上运行应用为视频播放应用时,为了确保用户可以完整地观看完当前电影,将预设使用时长设置为一部电影的播放时长120分钟。In advance, the identifier of the running application, the preset usage duration, and the association relationship between the two can be obtained to establish the following list. Specifically, when the application running on the terminal is a video playing application, in order to ensure that the user can watch the current movie completely, the preset usage duration is set to the playing duration of one movie for 120 minutes.

运行应用的标识The identity of the running application预设使用时长Default usage time视频播放应用Video playback application120分钟120 minutes音乐播放应用music playback app60分钟60 minutes搜索应用search application60分钟60 minutes

举例来说,预估使用时长为80分钟,如果当前运行的应用为视频播放应用,则预估使用时长小于预设使用时长,因此提醒模块304进行充电提醒。如果当前运行的应用为音乐播放应用或搜索应用,则预估使用时长不小于预设使用时长,因此不进行充电提醒。For example, the estimated usage time is 80 minutes. If the currently running application is a video playback application, the estimated usage time is less than the preset usage time, so the reminder module 304 performs a charging reminder. If the currently running application is a music playback application or a search application, the estimated usage time is not less than the preset usage time, so no charging reminder will be given.

在一些实施例中,充电提醒装置30还包括信息获取模块305和聚类模块306,具体描述如下:In some embodiments, the charging reminder device 30 further includes an information acquisition module 305 and a clustering module 306, which are specifically described as follows:

信息获取模块305,用于获取历史地理位置信息,其中,历史地理位置信息包括不同时间所处的地理位置。聚类模块306,用于对历史地理位置信息进行聚类,得到预设地理位置。The information acquisition module 305 is configured to acquire historical geographic location information, wherein the historical geographic location information includes geographic locations at different times. The clustering module 306 is configured to cluster the historical geographic location information to obtain a preset geographic location.

信息获取模块305先大量的采集终端的历史地理位置信息,比如每间隔10分钟采集一次终端的地理位置,得到这些信息构成的向量L=(L1,L2...Lm),其中Lm代表第m个地理位置,L=[x,y],x为时间,y为地理位置。The information acquisition module 305 first collects a large amount of historical geographic location information of the terminal, for example, collects the geographic location of the terminal every 10 minutes, and obtains a vector L=(L1 , L2 . . . Lm ) formed by the information, where Lm represents the mth geographic location, L=[x, y], where x is time, and y is geographic location.

在对这些历史地理位置信息进行聚类之前,先利用归一化公式对这些历史地理位置信息进行归一化处理。归一化处理完毕后,聚类模块306从所述历史地理信息中随机选取K个初始聚类的质心点,其中所述历史地理信息包括L=(L1,L2...Lm),其中Lm代表第m个地理位置。然后根据欧几里得距离公式计算所述历史地理信息中每个地理位置与每个质心点的距离。接着在所述距离不处于预设距离范围时,把所述每个地理位置分配给与所述每个数据距离最近的所述质心点,组成新的聚类。再重新计算新的聚类的质心点,重新根据欧几里得距离公式计算所述距离。直到所述距离处于预设距离范围时,聚类完毕。举例来说,如果将K设置为2。如图4所示,可以得到预设地理位置A和B,分别代表公司地址和家庭地址。Before clustering the historical geographic location information, first normalize the historical geographic location information by using a normalization formula. After the normalization process is completed, the clustering module 306 randomly selects the centroid points of K initial clusters from the historical geographic information, wherein the historical geographic information includes L=(L1 , L2 . . . Lm ) , where Lm represents the mth geographic location. Then, the distance between each geographic location and each centroid point in the historical geographic information is calculated according to the Euclidean distance formula. Then, when the distance is not within a preset distance range, each geographic location is assigned to the centroid point closest to each data to form a new cluster. Then recalculate the centroid point of the new cluster, and recalculate the distance according to the Euclidean distance formula. Until the distance is within the preset distance range, the clustering is completed. For example, if K is set to 2. As shown in FIG. 4 , preset geographic locations A and B can be obtained, representing the company address and the home address, respectively.

在一些实施例中,获取模块303包括第一获取子模块3031和第二获取子模块3032,具体描述如下:In some embodiments, the obtaining module 303 includes a first obtaining sub-module 3031 and a second obtaining sub-module 3032, which are specifically described as follows:

第一获取子模块3031,用于获取预设回归模型,其中,预设回归模型根据历史电量及其对应的历史时间建立。第二获取子模块3032,用于根据预设回归模型、当前电量和当前时间,获取预估使用时长。The first obtaining sub-module 3031 is configured to obtain a preset regression model, wherein the preset regression model is established according to the historical power and its corresponding historical time. The second obtaining sub-module 3032 is configured to obtain the estimated usage duration according to the preset regression model, the current power and the current time.

在一些实施例中,所述获取模块302,还用于在距离间隔小于预设距离阈值时,根据当前电量和当前运行的应用获取预估使用时长。提醒模块304,还用于在预估使用时长小于预设使用时长时,进行充电提醒。In some embodiments, the obtaining module 302 is further configured to obtain the estimated usage duration according to the current battery level and the currently running application when the distance interval is smaller than the preset distance threshold. The reminding module 304 is further configured to remind the charging when the estimated usage time is less than the preset usage time.

在一些实施例中,所述充电提醒装置还包括:In some embodiments, the charging reminder device further includes:

时长获取模块307,用于在所述距离间隔不小于预设距离阈值时,根据所述当前电量和当前时间获取预估使用时长;A duration obtaining module 307, configured to obtain an estimated usage duration according to the current power and current time when the distance interval is not less than a preset distance threshold;

关闭模块308,用于在所述预估使用时长小于预设使用时长时,关闭正在运行的预设应用。The closing module 308 is configured to close the running preset application when the estimated usage duration is less than the preset usage duration.

在一实施例中还提供了一种电子设备。请参考图7,该电子设备1000可以包括该电子设备1000包括存储器1001和处理器1002等部件。其中存储器1001中存储有可以在处理器1002中运行的多条指令。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。In an embodiment, an electronic device is also provided. Referring to FIG. 7 , the electronic device 1000 may include the electronic device 1000 including components such as a memory 1001 and a processor 1002 . The memory 1001 stores a plurality of instructions that can be executed in the processor 1002 . Those skilled in the art can understand that the structure of the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or arrange different components.

存储器1001可用于存储软件程序以及模块,其主要包括存储程序区和存储数据区。处理器1002通过运行存储在存储器1001的软件程序以及模块,从而执行各种功能应用以及数据处理。The memory 1001 can be used to store software programs and modules, and mainly includes a program storage area and a data storage area. The processor 1002 executes various functional applications and data processing by executing software programs and modules stored in the memory 1001 .

处理器1002是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器1001内的软件程序和/或模块,以及调用存储在存储器1001内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。The processor 1002 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing the software programs and/or modules stored in the memory 1001, and calling the data stored in the memory 1001. , perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole.

在一些实施例中,请参考图8,电子设备1000还包括GPS定位单元1003,用于对电子设备的地理位置进行定位。In some embodiments, please refer to FIG. 8 , the electronic device 1000 further includes a GPS positioning unit 1003 for locating the geographic location of the electronic device.

具体在本实施例中,处理器1002先检测当前电量是否在预设电量范围内,如果在预设电量范围,则通过GPS定位单元1003获取当前地理位置。然后处理器1002获取当前地理位置与预设地理位置之间的距离间隔。再在距离间隔小于预设距离阈值时,根据当前电量和当前时间获取预估使用时长。最后在预估使用时长小于预设使用时长时,进行充电提醒。Specifically, in this embodiment, the processor 1002 first detects whether the current power is within the preset power range, and if it is within the preset power range, obtains the current geographic location through the GPS positioning unit 1003 . Then the processor 1002 obtains the distance interval between the current geographic location and the preset geographic location. Then, when the distance interval is less than the preset distance threshold, the estimated usage time is obtained according to the current power and the current time. Finally, when the estimated usage time is less than the preset usage time, a charging reminder is given.

在一些实施例中,处理器1002获取当前地理位置与预设地理位置之间的距离间隔之前还获取历史地理位置信息,其中,历史地理位置信息包括不同时间所处的地理位置。并对历史地理位置信息进行聚类,得到预设地理位置。In some embodiments, the processor 1002 obtains historical geographic location information before obtaining the distance interval between the current geographic location and the preset geographic location, where the historical geographic location information includes geographic locations at different times. Clustering the historical geographic location information to obtain a preset geographic location.

在一些实施例中,处理器1002根据当前电量和当前时间获取预估使用时长时,实现如下步骤:In some embodiments, when the processor 1002 obtains the estimated usage duration according to the current power and the current time, the following steps are implemented:

处理器1002先获取预设回归模型,其中,预设回归模型根据历史电量及其对应的历史时间建立。再根据预设回归模型、当前电量和当前时间,获取预估使用时长。The processor 1002 first obtains a preset regression model, wherein the preset regression model is established according to the historical power and its corresponding historical time. Then, according to the preset regression model, the current power and the current time, the estimated usage time is obtained.

在一些实施例中,处理器1002获取预设回归模型之前还获取历史电量及其对应的历史时间。根据历史电量及历史时间,训练预设回归模型。In some embodiments, the processor 1002 also acquires historical power and its corresponding historical time before acquiring the preset regression model. According to the historical power and historical time, the preset regression model is trained.

在一些实施例中,处理器1002获取当前地理位置与预设地理位置之间的距离间隔之后,还在距离间隔小于预设距离阈值时,根据当前电量和当前运行的应用获取预估使用时长。在预估使用时长小于预设使用时长时,进行充电提醒。In some embodiments, after obtaining the distance interval between the current geographic location and the preset geographic location, the processor 1002 obtains the estimated usage duration according to the current battery level and the currently running application when the distance interval is smaller than the preset distance threshold. When the estimated usage time is less than the preset usage time, a charging reminder will be given.

在一些实施例中,获取当前地理位置与预设地理位置之间的距离间隔步骤之后还包括在距离间隔不小于预设距离阈值时,根据当前电量和当前时间获取预估使用时长。在预估使用时长小于预设使用时长时,关闭正在运行的预设应用。In some embodiments, after the step of obtaining the distance interval between the current geographic location and the preset geographic location, the step further includes obtaining an estimated usage duration according to the current battery level and the current time when the distance interval is not less than a preset distance threshold. When the estimated usage time is less than the preset usage time, close the running preset application.

本发明实施例的充电提醒方法、装置、存储介质及电子设备,先根据电子设备的当前地理位置与预设地理位置的距离间隔,来确定电子设备是否具备充电条件。在具备充电条件的情况下再预估可使用时长,在预估使用时长小于预设使用时长时再进行充电提醒,提高了充电提醒的准确性。The charging reminder method, device, storage medium and electronic device in the embodiments of the present invention first determine whether the electronic device has charging conditions according to the distance between the current geographic location of the electronic device and the preset geographic location. Re-estimate the usable time when the charging conditions are met, and then perform a charging reminder when the estimated usage time is less than the preset usage time, which improves the accuracy of the charging reminder.

需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如充电提醒方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, such as It is stored in the memory of the electronic device and executed by at least one processor in the electronic device, and the execution process may include the process of the embodiment of the charging reminder method. The storage medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.

以上对本发明实施例提供的一种充电提醒方法、装置、存储介质及电子设备进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A charging reminder method, device, storage medium, and electronic device provided by the embodiments of the present invention have been described above in detail. Each functional module may be integrated in a processing chip, or each module may exist physically alone, or two Or two or more modules are integrated in one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. In this paper, specific examples are used to illustrate the principles and implementations of the present invention. The descriptions of the above embodiments are only used to help understand the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the Thoughts, there will be changes in specific embodiments and application scopes. To sum up, the contents of this specification should not be construed as limiting the present invention.

Claims (7)

CN201710527816.3A2017-06-302017-06-30Charging reminding method and device, storage medium and electronic equipmentExpired - Fee RelatedCN107241513B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710527816.3ACN107241513B (en)2017-06-302017-06-30Charging reminding method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710527816.3ACN107241513B (en)2017-06-302017-06-30Charging reminding method and device, storage medium and electronic equipment

Publications (2)

Publication NumberPublication Date
CN107241513A CN107241513A (en)2017-10-10
CN107241513Btrue CN107241513B (en)2019-08-06

Family

ID=59990832

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710527816.3AExpired - Fee RelatedCN107241513B (en)2017-06-302017-06-30Charging reminding method and device, storage medium and electronic equipment

Country Status (1)

CountryLink
CN (1)CN107241513B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110395137B (en)*2018-04-202021-02-23比亚迪股份有限公司 Electric vehicle charging control method, device, equipment and storage medium
CN108616832A (en)*2018-05-152018-10-02中国联合网络通信集团有限公司call forwarding configuration method, device and equipment
CN108804294A (en)*2018-05-252018-11-13中国联合网络通信集团有限公司Method, apparatus, equipment and the computer readable storage medium that electricity is reminded
CN109118027A (en)*2018-09-302019-01-01广东小天才科技有限公司Electric quantity prediction model training method, electric quantity prediction method, intelligent equipment and system
CN109361818A (en)*2018-10-262019-02-19深圳壹账通智能科技有限公司Charging reminding method, device, storage medium and terminal
CN112449052B (en)*2019-09-032022-06-10北京小米移动软件有限公司Method and device for adjusting electric quantity prompt, terminal and storage medium
CN114330769A (en)*2021-12-242022-04-12深圳优地科技有限公司 A kind of robot fault early warning method, device, robot and server

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2012101681A1 (en)*2011-01-282012-08-02三菱電機株式会社Charging guidance device and vehicle-mounted navigation device
WO2015015583A1 (en)*2013-07-312015-02-05日立マクセル株式会社Portable terminal device
CN106407079A (en)*2016-09-272017-02-15北京小米移动软件有限公司Mobile terminal charging prompting method, device and equipment
CN106597302A (en)*2016-11-302017-04-26北京国网普瑞特高压输电技术有限公司Electric quantity metering method for vehicle-mounted power battery of electromobile
CN106815121A (en)*2017-02-042017-06-09广州三星通信技术研究有限公司The charging reminding method and its equipment of a kind of terminal

Also Published As

Publication numberPublication date
CN107241513A (en)2017-10-10

Similar Documents

PublicationPublication DateTitle
CN107241513B (en)Charging reminding method and device, storage medium and electronic equipment
US11966315B2 (en)Smart advice to charge notification
CN109947498B (en) Application preloading method, device, storage medium and mobile terminal
US11955827B2 (en)Rule based smart charging
CN107944277B (en)Application starting control method and device, storage medium and intelligent terminal
US20160174156A1 (en)Method and device for pushing information
CN108076218B (en)Charging reminding method and mobile terminal
CN112153216A (en) Power early warning method and device, terminal device, and storage medium
WO2017206107A1 (en)Charging method and terminal
US8941362B2 (en)Charging apparatus, and charge control method
CN107807730B (en)Application cleaning method and device, storage medium and electronic equipment
CN107943570B (en)Application management method and device, storage medium and electronic equipment
CN107608778B (en)Application program control method and device, storage medium and electronic equipment
CN112053011A (en) Power optimization management method, device, electronic device and storage medium
CN107231616A (en) Mobile terminal and its power control method, device and storage medium
JP2022008797A (en)Method for reducing power consumption of terminal, and terminal
CN112714368B (en)Method and device for prompting abnormal electricity consumption, computer equipment and storage medium
CN107797832B (en)Application cleaning method and device, storage medium and electronic equipment
CN108881630B (en) Reverse charging management method, device and terminal
CN108040320B (en)GNSS positioning control method and device, storage medium and mobile terminal
CN108471476B (en) Mobile terminal reverse charging management method and mobile terminal
CN113050782A (en)Image construction method and device, terminal and storage medium
Ball et al.Battery patterns and forecasting in a large-scale smartphone-based travel survey
CN107729087B (en)Background application cleaning method and device, storage medium and electronic equipment
CN110779525A (en) An indoor trajectory analysis method, device, equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information

Address after:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before:523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02Change of applicant information
GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20190806

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp