The embodiment of the invention provides a positioning method and a terminal, which relates to the field of computer technology. The method comprises: when the positioning cycle arrives, the identification of the terminal current service area and the identification of the historical service area are obtained, and the historical service area is the service area where the terminal was located at the previous positioning. When identifying the inconsistency between the current service area and the historical service area, according to the relationship between the neighboring area of the current service area and the neighboring area of the historical service area, determine whether to start the positioning function. When the positioning cycle arrives, the positioning function is decided whether to start or not according to the relationship between the terminal current service cell and the historical service cell and the relationship between the current service cell and the historical service cell, instead of starting the positioning function when the positioning cycle arrives, thus reducing the positioning. The power consumption is reduced and the endurance time is extended.
【技术实现步骤摘要】
一种定位方法和终端
本专利技术实施例涉及计算机
,尤其涉及一种定位方法和终端。
技术介绍
现有移动设备平台设计中,很多都有记录用户移动轨迹功能,尤其是带有运动记录功能或者定位监护功能的智能电子产品。如果需要记录用户的移动轨迹则需要发起全球定位系统(GlobalPositioningSystem,简称GPS定位),获取用户的位置信息。现有技术中是以固定频率发起GPS定位获取用户位置信息,然而当用户在一个地方停留时间过长,若仍以固定频率发起GPS定位将导致设备耗电较多,影响设备的续航时间。
技术实现思路
本专利技术实施例提供一种定位方法和终端,用于解决现有技术中以固定频率发起GPS定位导致设备耗电较多的问题。一方面,本专利技术实施例提供了一种定位方法,包括:在定位周期到达时,获取终端当前服务小区的标识以及历史服务小区的标识,所述历史服务小区为所述终端前一次定位时所在的服务小区;在确定所述当前服务小区的标识与所述历史服务小区的标识不一致时,根据所述当前服务小区的邻小区与所述历史服务小区的邻小区的关系,确定是否启动定位功能。可选地,所述根据所述当前服务小区的邻小区与所述历史服务小区的邻小区的关系,确定是否启动定位功能,包括:在确定所述当前服务小区的邻小区与所述历史服务小区的邻小区均不相同时,启动定位功能;在确定所述当前服务小区的邻小区与所述历史服务小区的邻小区存在至少一个相同的邻小区时,根据所述终端上的计步器记录的数据,确定是否启动定位功能。可选地,所述根据所述终端上的计步器记录的数据,确定是否启动定位功能,包括:判断所述终端上的计步器的当前步数与前一次定位时所 ...
【技术保护点】
1.一种定位方法,其特征在于,包括:在定位周期到达时,获取终端当前服务小区的标识以及历史服务小区的标识,所述历史服务小区为所述终端前一次定位时所在的服务小区;在确定所述当前服务小区的标识与所述历史服务小区的标识不一致时,根据所述当前服务小区的邻小区与所述历史服务小区的邻小区的关系,确定是否启动定位功能。
【技术特征摘要】
1.一种定位方法,其特征在于,包括:在定位周期到达时,获取终端当前服务小区的标识以及历史服务小区的标识,所述历史服务小区为所述终端前一次定位时所在的服务小区;在确定所述当前服务小区的标识与所述历史服务小区的标识不一致时,根据所述当前服务小区的邻小区与所述历史服务小区的邻小区的关系,确定是否启动定位功能。2.如权利要求1所述的方法,其特征在于,所述根据所述当前服务小区的邻小区与所述历史服务小区的邻小区的关系,确定是否启动定位功能,包括:在确定所述当前服务小区的邻小区与所述历史服务小区的邻小区均不相同时,启动定位功能;在确定所述当前服务小区的邻小区与所述历史服务小区的邻小区存在至少一个相同的邻小区时,根据所述终端上的计步器记录的数据,确定是否启动定位功能。3.如权利要求2所述的方法,其特征在于,所述根据所述终端上的计步器记录的数据,确定是否启动定位功能,包括:判断所述终端上的计步器的当前步数与前一次定位时所述终端上的计步器记录的历史步数的差值是否小于第一阈值;若是,则不启动定位功能;否则,启动定位功能。4.如权利要求1所述的方法,其特征在于,还包括:在确定所述当前服务小区的标识与所述历史服务小区的标识一致,且所述终端上的计步器的当前步数与前一次定位时所述终端上的计步器的历史步数的差值小于第二阈值时,不启动定位功能。5.一种终端,其特征在于,包括:获取模块,用于在定位周期到达时,获取终端当前服务小区的标识以及历史服务小区的标识,所述历史服务小区...
【专利技术属性】
技术研发人员:徐佳,
申请(专利权)人:上海创功通讯技术有限公司,
类型:发明
国别省市:上海,31
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。