Movatterモバイル変換


[0]ホーム

URL:


CN107453976B - Position information sharing method and device and terminal - Google Patents

Position information sharing method and device and terminal
Download PDF

Info

Publication number
CN107453976B
CN107453976BCN201610378433.XACN201610378433ACN107453976BCN 107453976 BCN107453976 BCN 107453976BCN 201610378433 ACN201610378433 ACN 201610378433ACN 107453976 BCN107453976 BCN 107453976B
Authority
CN
China
Prior art keywords
terminal
sharing
group
terminals
sampling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610378433.XA
Other languages
Chinese (zh)
Other versions
CN107453976A (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.)
Beijing Zhanlin Technology Co ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co LtdfiledCriticalYulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610378433.XApriorityCriticalpatent/CN107453976B/en
Publication of CN107453976ApublicationCriticalpatent/CN107453976A/en
Application grantedgrantedCritical
Publication of CN107453976BpublicationCriticalpatent/CN107453976B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提供了一种位置信息的共享方法、装置及终端,由各个待共享位置的终端在位置共享模式对应的位置共享组下,获取包括自身在内的其他n个待共享位置的终端的显示标记,并在预设抽样周期T内,以n个终端加入的顺序进行时隙抽样,获得进行抽样的终端刷新后的位置信息并在该时隙抽样内上传,针对每个时隙抽样中,在位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及其他终端未刷新的位置信息和显示标记。本发明采用时隙抽样和定时上传方式,使多个待共享位置的终端对应的显示标记,以及该显示标记所携带的对应终端的实时位置信息在位置共享模式下可以定时轮流显现,从而实现多人的位置信息共享。

Figure 201610378433

The present invention provides a method, device and terminal for sharing location information. Each terminal whose location is to be shared acquires the display of other terminals whose location is to be shared, including itself, under the location sharing group corresponding to the location sharing mode. mark, and within the preset sampling period T, perform time slot sampling in the order that n terminals join, obtain the refreshed location information of the sampling terminal and upload it in the time slot sampling. For each time slot sampling, In the location sharing group, the display mark corresponding to the terminal sampling the current time slot and the refreshed location information carried by it, and the unrefreshed location information and display mark of other terminals are displayed. The present invention adopts the time slot sampling and timing uploading mode, so that the display marks corresponding to a plurality of terminals whose positions are to be shared, and the real-time position information of the corresponding terminals carried by the display marks can be displayed in turn periodically in the position sharing mode, thereby realizing multiple Sharing of people's location information.

Figure 201610378433

Description

Translated fromChinese
一种位置信息的共享方法、装置及终端A method, device and terminal for sharing location information

技术领域technical field

本发明涉及通信技术领域,具体而言,涉及一种位置信息的共享方法、装置及终端。The present invention relates to the field of communication technologies, and in particular, to a method, device and terminal for sharing location information.

背景技术Background technique

在当前的即时通信过程中,用户对即时通信的要求不仅仅局限于能够实现与其他用户及时进行文字或语音、视频的及时传输,也希望能够及时获取对方的位置信息。In the current instant messaging process, users' requirements for instant messaging are not only limited to being able to transmit text, voice, and video in time with other users, but also hope to be able to obtain location information of each other in time.

在现有技术中,即时通信的双方用户之间的位置信息共享方式,一般是在对方的要求下上传自己的位置信息。由于现有技术的位置信息的共享只能在点对点的两个终端用户之间进行,且该位置信息共享方式较为被动,能否获取对方当前的位置信息也依赖于对方是否上传自己的位置信息。In the prior art, the location information sharing method between two users of instant messaging is generally to upload their own location information at the request of the other party. Since the location information sharing in the prior art can only be performed between two point-to-point end users, and the location information sharing method is relatively passive, whether the other party can obtain the current location information of the other party also depends on whether the other party uploads its own location information.

当在多人即时通信的过程中,采用现有技术中的点对点的,被动的位置信息共享方式,无法实现多个终端用户之间的位置信息的共享,进而造成多人在获取对方的共享位置信息时终端用户体验差的问题。In the process of instant messaging among multiple people, the point-to-point, passive location information sharing method in the prior art cannot realize the sharing of location information among multiple terminal users, thus causing multiple people to obtain the shared location of each other. The problem of poor end-user experience when it comes to information.

发明内容SUMMARY OF THE INVENTION

本发明基于上述问题,提出了一种位置信息的共享方法、装置及终端,有效的解决采用现有技术造成的多人在共享位置信息的过程中终端用户体验差的问题。Based on the above problem, the present invention proposes a method, device and terminal for sharing location information, which effectively solves the problem of poor terminal user experience in the process of sharing location information by multiple people using the prior art.

有鉴于此,本发明提出了一种位置信息的共享方法、包括:In view of this, the present invention proposes a method for sharing location information, including:

一种位置信息的共享方法,适用于终端,该方法包括:A method for sharing location information, applicable to a terminal, the method includes:

在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记,其中,一终端对应预设一显示标记,所述显示标记携带有对应终端的位置信息,n的取值为大于1的正整数;Under the location sharing group corresponding to the location sharing mode, the display marks of n terminals whose positions are to be shared, including itself, are acquired, wherein a terminal corresponds to a preset display mark, and the display mark carries the position information of the corresponding terminal , the value of n is a positive integer greater than 1;

在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照每秒S帧的速率进行时隙抽样,获得进行抽样的终端刷新后的位置信息,并上传;In the preset sampling period T, the time slot sampling is performed at the rate of S frames per second in the order in which the n terminals join the location sharing group, and the refreshed location information of the sampling terminal is obtained and uploaded;

其中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为单个抽样时隙的时长;Wherein, S=(1000ms)/T, T is the duration of the preset sampling period, in milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the duration of a single sampling time slot;

所述终端在每个时隙抽样过程中,在所述位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及(n-1)个未进行抽样的显示标记和其所携带的未刷新的位置信息。During the sampling process of each time slot, the terminal displays, in the location sharing group, the display mark corresponding to the terminal sampling the current time slot and the refreshed location information carried by it, and (n-1) unprocessed location information. A sampled display marker and the unrefreshed location information it carries.

优选的,还包括:Preferably, it also includes:

在预设抽样周期T内,若n个终端对应的显示标记及各自所携带的位置信息的上传时间总时长小于所述预设抽样周期的时长T,则上传空白时隙替代所述预设抽样周期T内未进行抽样的时隙,T=(n+K)*T0,K为所述空白时隙的个数,取自然数。Within the preset sampling period T, if the total upload time duration of the display marks corresponding to the n terminals and the location information carried by each terminal is less than the duration T of the preset sampling period, a blank time slot will be uploaded instead of the preset sampling period. For the time slots that are not sampled in the period T, T=(n+K)*T0 , where K is the number of the blank time slots, which is a natural number.

优选的,所述在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记之前,还包括:Preferably, under the location sharing group corresponding to the location sharing mode, before acquiring the display marks of the n terminals whose location is to be shared, including itself, the method further includes:

若所述终端为位置共享组的建立方,则所述终端向待共享位置的(n-1)个终端发送位置共享邀请信息;If the terminal is the founder of the location sharing group, the terminal sends location sharing invitation information to (n-1) terminals whose location is to be shared;

建立位置共享组并触发进入位置共享模式,建立对应自身的显示标记,所述显示标记中携带自身的位置信息;establishing a location sharing group and triggering entry into a location sharing mode, establishing a display mark corresponding to itself, and the display mark carrying its own location information;

或者,or,

若所述终端为加入方,则所述终端接收位置共享邀请信息,并在向发送所述位置共享邀请信息的终端反馈确认接受位置共享邀请信息时,触发进入已建立的位置共享组并开启位置共享模式,所述确认接受位置共享邀请信息中包括对应自身预设的显示标记,所述显示标记中携带有自身的位置信息。If the terminal is a joining party, the terminal receives the location sharing invitation information, and triggers to enter the established location sharing group and enable the location when feeding back to the terminal that sent the location sharing invitation information to confirm the acceptance of the location sharing invitation information. In the sharing mode, the confirmation and acceptance of the location sharing invitation information includes a preset display mark corresponding to the self, and the display mark carries the location information of the self.

优选的,所述在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照每秒S帧的速率进行时隙抽样,获得进行抽样的终端刷新后的位置信息,并上传,包括:Preferably, in the preset sampling period T, time-slot sampling is performed at a rate of S frames per second in the order in which the n terminals join the location sharing group, and the refreshed location information of the sampling terminal is obtained, and upload, including:

获取包括自身在内的n个终端加入所述共享位置组的第一顺序;Obtain the first order in which n terminals including itself join the shared location group;

在预设抽样周期T内,以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,当第i个时隙到来时,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息;In the preset sampling period T, perform one time slot sampling at the rate of S frames per second in the first order, when the i-th time slot arrives, sample the i-th terminal, and refresh the i-th terminal The location information of each terminal is obtained, and the refreshed location information is obtained;

在所述第i时隙内,依据上传时间N上传进行抽样的终端刷新后的位置信息,N=T/T0In the i-th time slot, upload the refreshed location information of the sampling terminal according to the upload time N, N=T/T0 ;

直至所述n个终端在所述预设抽样周期T内均进行时隙抽样;until the n terminals all perform time slot sampling within the preset sampling period T;

其中,i的取值范围为1~n,包括端点值;Among them, the value range of i is 1~n, including the endpoint value;

或者,or,

获取包括自身在内的n个终端加入所述共享位置组的第一顺序;Obtain the first order in which n terminals including itself join the shared location group;

在预设抽样周期T内,以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,当第(i-1)个时隙,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息;In the preset sampling period T, sampling of the time slot is carried out at the rate of S frames per second in the first order. When the (i-1)th time slot is used, the ith terminal is sampled, and the The position information of the i-th terminal is obtained, and the refreshed position information is obtained;

在第i个时隙,依据上传时间N将第(i-1)个时隙抽样获取的第i个终端刷新后的位置信息上传,N=T/T0In the ith time slot, upload the refreshed position information of the ith terminal obtained by sampling in the (i-1)th time slot according to the upload time N, N=T/T0 ;

直至所述n个终端在所述预设抽样周期T内均进行时隙抽样;until the n terminals all perform time slot sampling within the preset sampling period T;

其中,i的取值范围为1~n,包括端点值。Wherein, the value of i ranges from 1 to n, including the endpoint value.

优选的,所述在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记之前,还包括:Preferably, under the location sharing group corresponding to the location sharing mode, before acquiring the display marks of the n terminals whose location is to be shared, including itself, the method further includes:

建立M个位置共享组内的一个位置共享组,同时建立或加入位置共享组长群,所述位置共享组长群为包含自身和其余建立M-1个位置共享组的终端的一位置共享组;A location sharing group is established in the M location sharing groups, and a location sharing group leader group is established or joined at the same time, and the location sharing leader group is a location sharing group that includes itself and the rest of the terminals that establish M-1 location sharing groups ;

其中,M的取值为终端个数n开根号后所获得的值的整数部分,所述位置共享组长群内仅有一个终端为建立所述位置共享组长群的一方;Wherein, the value of M is the integer part of the value obtained after the number of terminals n is rooted, and there is only one terminal in the position sharing group leader group that establishes the position sharing group leader group;

在位置共享模式下,分层显示M个所述位置共享组,以及所述位置共享组长群;In the location sharing mode, the M location sharing groups and the location sharing group leader group are displayed in layers;

其中,M个所述位置共享组和所述位置共享组长群中的终端采用各自对应的显示标记显示。Wherein, the M terminals in the location sharing group and the location sharing group leader group are displayed with respective corresponding display marks.

一种位置信息的共享装置,适用于终端,包括:A device for sharing location information, applicable to a terminal, comprising:

获取单元,用于在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记,其中,一终端对应预设一显示标记,所述显示标记携带有对应终端的位置信息,n的取值为大于1的正整数;The obtaining unit is configured to obtain the display marks of the n terminals whose positions are to be shared, including itself, under the position sharing group corresponding to the position sharing mode, wherein a terminal corresponds to a preset display mark, and the display mark carries the Corresponding to the location information of the terminal, the value of n is a positive integer greater than 1;

抽样上传单元,用于在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照每秒S帧的速率进行时隙抽样,获得进行抽样的终端刷新后的位置信息,并上传;A sampling uploading unit, configured to perform time slot sampling at a rate of S frames per second in the order in which the n terminals join the location sharing group within a preset sampling period T, to obtain updated location information of the sampling terminal , and upload;

其中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为单个抽样时隙的时长;Wherein, S=(1000ms)/T, T is the duration of the preset sampling period, in milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the duration of a single sampling time slot;

显示单元,用于在每个时隙抽样过程中,在所述位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及(n-1)个未进行抽样的显示标记和其所携带的未刷新的位置信息。A display unit, configured to display, in the location sharing group, a display mark corresponding to the terminal sampling the current time slot and the refreshed location information carried by it in the location sharing group, and (n-1) Unsampled display markers and the unrefreshed location information they carry.

优选的,所述抽样上传单元,还用于:在预设抽样周期T内,若n个终端对应的显示标记及各自所携带的位置信息的上传时间总时长小于所述预设抽样周期的时长T,则上传空白时隙替代所述预设抽样周期T内未进行抽样的时隙,T=(n+K)*T0,K为所述空白时隙的个数,取自然数。Preferably, the sampling and uploading unit is further configured to: within a preset sampling period T, if the total upload time of the display marks corresponding to the n terminals and the location information carried by each of them is less than the preset sampling period T, then upload a blank time slot to replace the time slot that is not sampled within the preset sampling period T, T=(n+K)*T0 , K is the number of the blank time slot, which is a natural number.

优选的,所述抽样上传单元,包括:Preferably, the sampling uploading unit includes:

获取模块,用于获取包括自身在内的n个终端加入所述共享位置组的第一顺序;an acquisition module, configured to acquire the first order in which n terminals including itself join the shared location group;

第一抽样模块,用于在预设抽样周期T内,循环以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,当第i个时隙到来时,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息,直至所述n个终端在所述预设抽样周期T内均进行时隙抽样;The first sampling module is configured to cyclically perform one time slot sampling in the first sequence at the rate of S frames per second within the preset sampling period T, and when the ith time slot arrives, perform sampling on the ith terminal. sampling, and refresh the location information of the i-th terminal to obtain the refreshed location information, until the n terminals all perform time slot sampling within the preset sampling period T;

其中,i的取值范围为1~n,包括端点值;Among them, the value range of i is 1~n, including the endpoint value;

第一上传模块,用于在所述第i个时隙内,依据上传时间N上传进行抽样的终端刷新后的位置信息,N=T/T0a first uploading module, configured to upload the refreshed location information of the sampling terminal according to the uploading time N in the i-th time slot, N=T/T0 ;

或者,or,

第二抽样模块,用于在预设抽样周期T内,以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,在第(i-1)个时隙,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息,直至所述n个终端在所述预设抽样周期T内均进行时隙抽样;The second sampling module is configured to perform one time slot sampling at the rate of S frames per second in the first order within the preset sampling period T, and in the (i-1)th time slot, the ith terminal is Sampling is performed, and the location information of the i-th terminal is refreshed, and the refreshed location information is obtained, until the n terminals all perform time-slot sampling within the preset sampling period T;

第二上传模块,用于在第i个时隙,依据上传时间N将第(i-1)个时隙抽样获取的第i个终端刷新后的位置信息上传,N=T/T0The second uploading module is used for uploading the refreshed position information of the ith terminal obtained by sampling in the (i-1)th time slot according to the uploading time N in the ith time slot, N=T/T0 ;

其中,i的取值范围为1~n,包括端点值。Wherein, the value of i ranges from 1 to n, including the endpoint value.

优选的,还包括:Preferably, it also includes:

分层模块,用于建立M个位置共享组内的一个位置共享组,同时建立或加入位置共享组长群,所述位置共享组长群为包含自身和其余建立M-1个位置共享组的终端的一位置共享组;The hierarchical module is used to establish a position sharing group in the M position sharing groups, and at the same time establish or join a position sharing group leader group. A location sharing group of the terminal;

其中,M的取值为终端个数n开根号后所获得的值的整数部分,所述位置共享组长群内仅有一个终端为建立所述位置共享组长群的一方;Wherein, the value of M is the integer part of the value obtained after the number of terminals n is rooted, and there is only one terminal in the position sharing group leader group that establishes the position sharing group leader group;

显示模块,用于在位置共享模式下,分层显示M个所述位置共享组,以及所述位置共享组长群;a display module, configured to hierarchically display the M number of the location sharing groups and the location sharing group leader group in the location sharing mode;

其中,M个所述位置共享组和所述位置共享组长群中的终端采用各自对应的显示标记显示。Wherein, the M terminals in the location sharing group and the location sharing group leader group are displayed with respective corresponding display marks.

一种终端,包括上述所述的位置信息的共享装置。A terminal includes the above-mentioned device for sharing location information.

本发明实施例公开的位置信息的共享技术方案,由各个待共享位置的终端在位置共享模式对应的位置共享组下,获取包括自身在内的其他n个待共享位置的终端的显示标记,并在预设抽样周期T内,以n个终端加入的顺序进行时隙抽样,获得进行抽样的终端刷新后的位置信息并在抽样时隙内上传,针对每个时隙抽样中,在位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及其他终端未刷新的位置信息和显示标记。本发明基于上述公开的位置信息的共享技术方案中所采用的时隙抽样和定时上传方式,使多个待共享位置的终端对应的显示标记,以及该显示标记所携带的对应终端的实时位置信息在位置共享模式下可以定时轮流显现,从而实现多人的位置信息共享,同时采用时隙抽样和定时上传的方式进行位置信息的共享还进一步节约了各自终端的资源和流量开销。In the technical solution for sharing location information disclosed in the embodiments of the present invention, each terminal whose location is to be shared acquires the display marks of the other n terminals whose location is to be shared, including itself, under the location sharing group corresponding to the location sharing mode, and In the preset sampling period T, time slot sampling is performed in the order that n terminals join, and the refreshed location information of the sampling terminal is obtained and uploaded in the sampling time slot. For each time slot sampling, in the location sharing group The display mark corresponding to the terminal sampling the current time slot and the refreshed position information carried by it, as well as the unrefreshed position information and display mark of other terminals are displayed. Based on the time slot sampling and timing uploading method adopted in the above disclosed location information sharing technical solution, the present invention enables display marks corresponding to a plurality of terminals whose positions are to be shared, and real-time location information of the corresponding terminals carried by the display marks. In the location sharing mode, it can be displayed in turn at regular intervals, so as to realize the sharing of location information of multiple people. At the same time, the sharing of location information by means of time slot sampling and timed uploading further saves the resources and traffic overhead of each terminal.

附图说明Description of drawings

图1示出了本发明实施例一公开的一种位置信息的共享方法的流程示意图;1 shows a schematic flowchart of a method for sharing location information disclosed in Embodiment 1 of the present invention;

图2示出了本发明实施例一公开的一种位置信息的共享方法中时隙抽样的流程示意图;2 shows a schematic flowchart of time slot sampling in a method for sharing location information disclosed in Embodiment 1 of the present invention;

图3示出了本发明实施例一公开的一种位置信息的共享方法中另一种时隙抽样的流程示意图;3 shows a schematic flowchart of another time slot sampling in a method for sharing location information disclosed in Embodiment 1 of the present invention;

图4示出了本发明实施例一公开的一种位置信息的共享方法中分层建群的流程示意图;FIG. 4 shows a schematic flowchart of hierarchical group formation in a method for sharing location information disclosed in Embodiment 1 of the present invention;

图5示出了本发明实施例一公开的一种位置信息的共享方法中分层建群后的部分分组示意图表;FIG. 5 shows a schematic diagram of a partial grouping after hierarchical grouping in a method for sharing location information disclosed in Embodiment 1 of the present invention;

图6示出了本发明实施例二公开的另一种位置信息的共享装置100的示意框图。FIG. 6 shows a schematic block diagram of another apparatus 100 for sharing location information disclosed in Embodiment 2 of the present invention.

具体实施方式Detailed ways

为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。In order to understand the above objects, features and advantages of the present invention more clearly, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments may be combined with each other in the case of no conflict.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific details disclosed below. Example limitations.

由背景技术可知,在现有技术中终端进行位置信息的共享采用的是点对点的,被动的位置信息共享方式,无法实现多个终端用户之间的位置信息的共享,进而造成多人在获取对方的共享位置信息时终端用户体验差的问题。因此,本发明实施例公开了一种位置信息的共享技术方案,通过时隙抽样和定时上传方式,使多个待共享位置的终端对应的显示标记,以及该显示标记所携带的对应终端的实时位置信息在位置共享模式下可以定时轮流显现,从而实现多人的位置信息共享。具体通过以下实施例进行详细说明。It can be known from the background technology that in the prior art, the terminal uses a point-to-point, passive position information sharing method to share the location information, which cannot realize the sharing of the location information among multiple terminal users, thus causing many people to obtain each other. The problem of poor end-user experience when sharing location information. Therefore, the embodiment of the present invention discloses a technical solution for sharing location information. By means of time-slot sampling and timing uploading, the display marks corresponding to a plurality of terminals whose positions are to be shared, and the real-time real-time information of the corresponding terminals carried by the display marks are displayed. The location information can be displayed in turn periodically in the location sharing mode, so as to realize the sharing of location information of multiple people. Specifically, it will be described in detail through the following examples.

实施例一Example 1

本发明实施例公开的一种位置信息的共享方法可实现多个终端用户之间的位置信息,该多个终端用户通常为位于同一组或同一即时通信小组内的成员,多个终端用户中包含一个建立该组或即时通信小组的建立者,其他则为加入者,在上述多个终端用户基于本发明实施例公开的位置信息的共享方法进行位置信息共享过程中,各个终端用户均可在其终端上查看同一组内的各个成员的位置信息,从而实现同一组或同一即时通信小组内的所有成员的位置信息的共享。A method for sharing location information disclosed in an embodiment of the present invention can realize location information among multiple terminal users. The multiple terminal users are usually members located in the same group or the same instant messaging group, and the multiple terminal users include One is the founder of the group or the instant messaging group, and the others are the joiners. During the process of sharing the location information by the above-mentioned multiple terminal users based on the location information sharing method disclosed in the embodiment of the present invention, each terminal user can The location information of each member in the same group can be viewed on the terminal, thereby realizing the sharing of the location information of all members in the same group or the same instant messaging group.

需要说明的是,所述终端为移动终端,具体可以为车载设备,手持设备等具有定位或可进行定位的移动终端,在本发明实施例中移动终端的类型并不仅限于此。It should be noted that the terminal is a mobile terminal, and may specifically be a vehicle-mounted device, a handheld device, or other mobile terminal capable of positioning or capable of positioning. In the embodiment of the present invention, the type of the mobile terminal is not limited to this.

如图1所示,为本发明实施例一公开的一种位置信息的共享方法的流程示意图,该方法适用于终端,主要包括:As shown in FIG. 1, it is a schematic flowchart of a method for sharing location information disclosed in Embodiment 1 of the present invention. The method is applicable to a terminal and mainly includes:

步骤S101,所述终端在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记;Step S101, the terminal acquires the display marks of n terminals whose positions are to be shared, including itself, under the position sharing group corresponding to the position sharing mode;

在步骤S101中,该位置共享模式对应的位置共享组为预先由终端建立或加入的,针对终端所在同一组或同一即时通信小组内的共n个终端的位置信息共享,一终端对应预设一显示标记,所述显示标记携带有对应终端基于定位技术获取的位置信息,n的取值为大于1的正整数;In step S101, the location sharing group corresponding to the location sharing mode is established or joined by the terminal in advance, and for the location information sharing of a total of n terminals in the same group or the same instant messaging group where the terminal is located, one terminal corresponds to a preset one. a display mark, where the display mark carries the position information obtained by the corresponding terminal based on the positioning technology, and the value of n is a positive integer greater than 1;

该显示标记作为Mark标记,可以用数字,字母或者数字+字母的方式表示,如M1、M2等,或者以文字显示,如终端用户的昵称等,在本发明实施例中对此显示标记并不做具体限定,只要能够有效标示对应的终端即可。The display mark, as a Mark mark, can be represented by numbers, letters or numbers + letters, such as M1, M2, etc., or displayed in text, such as the nickname of the terminal user, etc. In this embodiment of the present invention, the display mark is not Make specific restrictions, as long as the corresponding terminal can be effectively marked.

需要说明的是,终端的位置信息为实时的信息,为终端基于定位技术获取的位置信息,可以是终端自带的GPS定位技术获取自身的位置信息,若终端处于联网模式下,则也可以通过AGPS、或室内定位技术等方式来定位并获取自身的位置信息;It should be noted that the location information of the terminal is real-time information, which is the location information obtained by the terminal based on the positioning technology. It can be the GPS positioning technology that comes with the terminal to obtain its own location information. AGPS, or indoor positioning technology to locate and obtain its own location information;

步骤S102,所述终端在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照每秒S帧的速率进行时隙抽样,获得进行抽样的终端刷新后的位置信息并上传;Step S102, within the preset sampling period T, the terminal performs time slot sampling at the rate of S frames per second in the order in which the n terminals join the location sharing group, and obtains the updated location information of the sampling terminal. and upload;

在步骤S102中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为进行时隙抽样的单个抽样时隙的时长;In step S102, S=(1000ms)/T, T is the duration of the preset sampling period, the unit is milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the single sampling time for time slot sampling the duration of the slot;

结合步骤S101若同一组中包括当前终端共有40个终端,当取所述预设抽样周期T为40ms时,在执行步骤S102的过程中,将采用25帧/秒对执行步骤S101获取到的40个终端按照其加入位置共享组的顺序进行时隙抽样并定时上传,具体为:In conjunction with step S101, if the same group includes a total of 40 current terminals, when the preset sampling period T is taken as 40ms, in the process of executing step S102, 25 frames/second will be used to execute the 40 obtained in step S101. Each terminal performs time slot sampling according to the order in which it joined the location sharing group and uploads it regularly, specifically:

以每秒25帧的速率对一个终端进行时隙抽样,并获取进行抽样的终端刷新后的位置信息;也即是说,每秒中每隔25帧就有一个终端的位置信息可以进行一次刷新,并在一个时隙抽样过程中上传刷新后的位置信息。由此可知,在一个预设抽样周期T内,40个终端可以实现连续不间断的在位置共享组内显示;Sampling a terminal at a rate of 25 frames per second in a time slot, and obtain the refreshed location information of the sampled terminal; that is to say, the location information of a terminal can be refreshed every 25 frames per second , and upload the refreshed location information during a time slot sampling process. It can be seen from this that within a preset sampling period T, 40 terminals can continuously display in the location sharing group;

需要说明的是,在对n个终端按照加入位置共享组的顺序进行时隙抽样的过程中,进行抽样的终端刷新后的位置信息是否有变动与终端是否有位置变化有关,前后刷新所得到该终端的位置信息可能一致也可能不一致;It should be noted that, in the process of sampling the time slots of n terminals in the order of joining the location sharing group, whether the location information of the sampled terminal after refreshing has changed is related to whether the location of the terminal has changed. The location information of the terminal may be consistent or inconsistent;

步骤S103,所述终端在每个时隙抽样过程中,在所述位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及(n-1)个未进行抽样的显示标记和其所携带的未刷新的位置信息。Step S103, during the sampling process of each time slot, the terminal displays the display mark corresponding to the terminal sampling the current time slot in the location sharing group and the refreshed location information carried by it, and (n-1) unsampled display markers and the unrefreshed location information they carry.

在本发明实施例中,优选的,在预设抽样周期T内,若n个终端对应的显示标记及各自所携带的位置信息的上传时间总时长小于所述预设抽样周期的时长T,则上传空白时隙替代所述预设抽样周期T内未进行抽样的时隙,T=(n+K)*T0,K为上传的所述空白时隙的个数,取自然数;In the embodiment of the present invention, preferably, within a preset sampling period T, if the total duration of uploading time of the display marks corresponding to n terminals and the location information carried by each of them is less than the duration T of the preset sampling period, then The uploading blank time slot replaces the time slot that is not sampled in the preset sampling period T, T=(n+K)*T0 , K is the number of the blank time slot uploaded, which is a natural number;

也就是说,若T=40ms,若n的取值小于40,假设取值为30,以最大上传时间上传各个Mark标记及各自所携带的位置信息,则只能占用30个时隙,则此时该预设抽样周期内后10个未被占用的时隙用空白时隙替代,则这30个终端和插入的10个空时隙所需要的总的抽样时长:T=30*T0+K*T0=(40)*T0,由此也可以得出,进行时隙抽样的单个抽样时隙的时长T0为1ms。That is to say, if T=40ms, if the value of n is less than 40, assuming the value is 30, and uploading each Mark and the location information carried by each mark at the maximum upload time, only 30 time slots can be occupied, then this When the last 10 unoccupied time slots in the preset sampling period are replaced by blank time slots, the total sampling duration required by these 30 terminals and the inserted 10 empty time slots: T=30*T0 + K*T0 =(40)*T0 , from which it can also be concluded that the duration T0 of a single sampling time slot for time slot sampling is 1 ms.

在本发明实施例中,优选的,在所述位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及(n-1)个未进行抽样的显示标记和其所携带的未刷新的位置信息,具体包括,在进行某一抽样时隙内,按照获取终端加入位置共享组的顺序,采用文字的方式排列显示进行抽样的终端对应的显示标记和其所携带的所述刷新后的位置信息,以及(n-1)个未进行抽样的终端对应的显示标记和其所携带的未刷新的位置信息;In the embodiment of the present invention, preferably, in the location sharing group, a display mark corresponding to a terminal that performs sampling in the current time slot and the refreshed location information carried by it, and (n-1) unsampling terminals are displayed in the location sharing group. The display marker and the unrefreshed location information carried by it specifically include, in a certain sampling time slot, in the order in which the acquiring terminal joins the location sharing group, arranging and displaying the display markers and the corresponding display markers of the sampling terminal in the form of text. The refreshed location information carried by it, and the display marks corresponding to (n-1) terminals that have not been sampled and the unrefreshed location information carried by them;

另一方面,也可以直接在所述位置共享组内显示的地图上,显示各个终端的位置信息,以及在时隙抽样的过程中,在所述显示的地图上依据对应时隙抽样的终端上传的刷新后的位置信息,更新所述显示地图上该终端对应的显示标记所携带的位置信息。On the other hand, the location information of each terminal may also be displayed directly on the map displayed in the location sharing group, and in the process of time slot sampling, the displayed map may be uploaded according to the terminal sampling corresponding to the time slot. The refreshed location information is updated, and the location information carried by the display marker corresponding to the terminal on the display map is updated.

需要说明的是,显示标记及其所携带的对应终端的位置信息有多种显示组合,其中,显示标记除上述记载之外,其显示的结果也可以采用带数字标记的箭头、园圈,如:①、②、、

Figure BDA0001006165700000091
或采用字符+数字:M1、M2、、、Mn;或A1、A2、A3、、、An表示,其所携带的对应终端的位置信息可与上述显示标记显示的结果进行结合显示。本发明实施例对此并不进行具体限定,不仅可以采用上述显示形式,也可以采用其他显示形式,只要能够区分不同终端及其位置信息即可。It should be noted that there are various display combinations for the display mark and the position information of the corresponding terminal carried by the display mark. In addition to the above-mentioned records, the displayed result of the display mark can also use arrows and circles with digital marks, such as : ①, ②,,
Figure BDA0001006165700000091
Or use characters + numbers: M1, M2, , , Mn; or A1, A2, A3, , , An to indicate that the location information of the corresponding terminal carried by it can be displayed in combination with the result displayed by the above display mark. This embodiment of the present invention does not specifically limit this, and not only the above-mentioned display forms but also other display forms can be used, as long as different terminals and their location information can be distinguished.

本发明实施例公开的位置信息的共享技术方案,由各个待共享位置的终端在位置共享模式对应的位置共享组下,获取包括自身在内的其他n个待共享位置的终端的显示标记,并在预设抽样周期T内,以n个终端加入的顺序进行时隙抽样,获得进行抽样的终端刷新后的位置信息并定时上传,针对每个时隙抽样中,在位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及其他终端未刷新的位置信息和显示标记。In the technical solution for sharing location information disclosed in the embodiments of the present invention, each terminal whose location is to be shared acquires the display marks of the other n terminals whose location is to be shared, including itself, under the location sharing group corresponding to the location sharing mode, and In the preset sampling period T, time slot sampling is performed in the order that n terminals join, and the refreshed location information of the sampling terminal is obtained and uploaded regularly. For each time slot sampling, the current time is displayed in the location sharing group. The display mark corresponding to the terminal sampling the slot and the refreshed position information carried by it, and the position information and display mark that are not refreshed by other terminals.

本发明实施例采用的时隙抽样和定时上传方式,使多个待共享位置的终端对应的显示标记,以及该显示标记所携带的对应终端的实时位置信息在位置共享模式对应的位置共享组内可以定时轮流显现,从而实现多人的位置信息共享,同时采用时隙抽样和定时上传的方式进行位置信息的共享还进一步节约了各自终端的资源和流量开销。The time slot sampling and timing uploading method adopted in the embodiment of the present invention enables the display marks corresponding to multiple terminals whose positions are to be shared, and the real-time location information of the corresponding terminals carried by the display marks in the position sharing group corresponding to the position sharing mode. It can be displayed in turn at regular intervals, thereby realizing the sharing of location information of multiple people. At the same time, the sharing of location information by means of time slot sampling and timed uploading further saves the resources and traffic overhead of each terminal.

在本发明实施例中,针对在进行位置共享之前的多个终端,在述终端在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记之前,还包括:建立进行位置共享组或加入位置共享组,其中,建立进行位置共享组的过程具体为:In the embodiment of the present invention, for a plurality of terminals before location sharing, before the terminal acquires the display marks of n terminals whose locations are to be shared, including itself, in a location sharing group corresponding to the location sharing mode, It also includes: establishing a location sharing group or joining a location sharing group, wherein the process of establishing a location sharing group is specifically:

若所述终端为位置共享组的建立方,则所述终端向待共享位置的n-1个终端发送位置共享邀请信息;If the terminal is the founder of the location sharing group, the terminal sends location sharing invitation information to the n-1 terminals whose locations are to be shared;

建立位置共享组并触发进入位置共享模式,在所述位置共享组内显示对应自身预设的显示标记,以及接受所述位置共享邀请信息的终端所对应的显示标记,所述显示标记中携带有基于定位技术获取的位置信息;Establishing a location sharing group and triggering to enter a location sharing mode, displaying a display mark corresponding to its own preset in the location sharing group, and a display mark corresponding to the terminal accepting the location sharing invitation information, the display mark carrying Location information obtained based on positioning technology;

加入进行位置共享组的过程具体为:The process of joining a location sharing group is as follows:

若所述终端为加入方,则所述终端接收位置共享邀请信息,并在向发送所述位置共享邀请信息的终端反馈确认接受位置共享邀请信息时,触发进入已建立的位置共享组并开启位置共享模式,所述确认接受位置共享邀请信息中包括对应自身预设的显示标记,所述显示标记中携带有基于定位技术获取的位置信息If the terminal is a joining party, the terminal receives the location sharing invitation information, and triggers to enter the established location sharing group and enable the location when feeding back to the terminal that sent the location sharing invitation information to confirm the acceptance of the location sharing invitation information. In the sharing mode, the confirmation and acceptance of the location sharing invitation information includes a preset display mark corresponding to itself, and the display mark carries the location information obtained based on the positioning technology

在本发明实施例中,通过上述终端自己建立新的位置共享群组或加入其他终端建立的位置共享群组,使得待共享位置信息的多个终端可以均处于位置共享模式下,然后各个终端则再分别继续执行上述本发明实施例一公开的如图1示出的位置信息的共享方法,以便于在各自终端上实现查看同一组内的所有成员轮流显示的刷新后的位置信息,从而实现多人共享位置信息的目的。In the embodiment of the present invention, the above-mentioned terminal establishes a new location sharing group by itself or joins a location sharing group established by other terminals, so that multiple terminals to share location information can all be in the location sharing mode, and then each terminal can Continue to execute the location information sharing method as shown in FIG. 1 disclosed in the first embodiment of the present invention, so that the refreshed location information displayed by all members in the same group can be viewed in turn on the respective terminals, thereby realizing multiple the purpose of sharing location information.

另外,在本发明实施例公开执行上述位置信息的共享方法的过程中,优选的,如图1中所示出的步骤S102所述终端在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照每秒S帧的速率进行时隙抽样,获得进行抽样的终端刷新后的位置信息,并上传,其具体执行过程如图2所示,主要包括:In addition, in the process of implementing the above-mentioned sharing method of location information disclosed in the embodiment of the present invention, preferably, in step S102 as shown in FIG. The sequence of the location sharing group is to perform time slot sampling at the rate of S frames per second, to obtain the updated location information of the sampling terminal, and upload it. The specific execution process is shown in Figure 2, which mainly includes:

步骤S201,所述终端获取包括自身在内的n个终端加入所述共享位置组的第一顺序;Step S201, the terminal acquires the first order in which n terminals including itself join the shared location group;

步骤S202,所述终端在预设抽样周期T内,以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,当第i个时隙到来时,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息;Step S202, within the preset sampling period T, the terminal performs a time slot sampling at the rate of S frames per second in the first order, and when the ith time slot arrives, the ith terminal is sampled, and refresh the position information of the i-th terminal to obtain the refreshed position information;

步骤S203,在所述第i时隙内,依据上传时间N上传进行抽样的终端刷新后的位置信息;Step S203, in the i-th time slot, upload the refreshed location information of the sampling terminal according to the upload time N;

其中,N=T/T0,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为进行时隙抽样的单个抽样时隙的时长,i的取值范围为1~n,包括端点值。Among them, N=T/T0 , S=(1000ms)/T, T is the duration of the preset sampling period, the unit is millisecond ms, the value of T is greater than or equal to n*T0 , and T0 is the time slot sampling The duration of a single sampling time slot of i is in the range of 1 to n, including the endpoint value.

需要说明的是,N的取值与构成该预设抽样周期的时长的时隙的个数相同,若n个终端进行抽样的T0的个数n*T0正好与构成预设抽样周期时长的时隙个数相同,则N的取值与n相同;若构成预设抽样周期时长的时隙个数为n+K,K为所需上传的空白时隙的个数,取自然数,则N=(n+K);It should be noted that the value of N is the same as the number of time slots that constitute the duration of the preset sampling period. If the number of T0 that is sampled by n terminals, n*T0 is exactly the same as the duration of the preset sampling period. If the number of timeslots is the same, the value of N is the same as n; if the number of timeslots constituting the preset sampling period length is n+K, and K is the number of blank timeslots to be uploaded, which is a natural number, then N=(n+K);

在执行上述步骤S201至步骤S203的过程中,针对步骤S202,每S帧/秒执行一次时隙抽样,实际上即循环执行步骤S202至步骤S203,直至所述n个终端在所述预设抽样周期T内均进行时隙抽样。In the process of performing the above steps S201 to S203, for step S202, time slot sampling is performed every S frames/second, in fact, steps S202 to S203 are executed cyclically, until the n terminals are in the preset sampling Slot sampling is performed in the period T.

在本发明实施例中,具体针对n个终端的抽样过程通过一下示例进行详细说明:In the embodiment of the present invention, the sampling process for n terminals is described in detail by using the following example:

例如,分别用A1、A2、A3……An表示n个终端所对应的Mark标记在任意终端中的显示,根据获取或终端加入同一位置共享组的顺序,其中,A1表示第1个加入的终端(通常为建立该群组的终端),A2表示第2个加入的终端,依次类推,An代表第n个加入的终端。For example, use A1, A2, A3... An to represent the display of the Mark corresponding to n terminals in any terminal, according to the order in which the terminal is acquired or added to the same location sharing group, where A1 represents the first added terminal. (usually the terminal that established the group), A2 represents the second added terminal, and so on, An represents the nth added terminal.

在预设抽样周期T内,依据S帧/秒进行时隙抽样,当第1个时隙到来时,即对A1进行时隙抽样,刷新A1所携带的对应的终端的位置信息,在当前时隙中,只有A1所携带的对应的终端的位置信息进行了刷新,其他A2至An所携带的对应的终端的位置信息均不变,即在该时隙抽样过程中,获得A1所携带的对应的终端的刷新后的位置信息上传,同时在同一位置共享组中显示该时隙抽样过程中所获取的所有A1至An个成员的位置信息包括刷新后的位置信息,其中,A2至An所携带的对应的终端的位置信息均为刷新;In the preset sampling period T, time slot sampling is performed according to S frames/second. When the first time slot arrives, time slot sampling is performed on A1, and the location information of the corresponding terminal carried by A1 is refreshed. At the current time In the slot, only the position information of the corresponding terminal carried by A1 is refreshed, and the position information of the corresponding terminals carried by other A2 to An remains unchanged, that is, during the sampling process of this time slot, the corresponding terminal carried by A1 is obtained. The refreshed location information of the terminal is uploaded, and the location information of all members A1 to An obtained during the sampling process of the time slot is displayed in the same location sharing group at the same time, including the refreshed location information, where A2 to An carried The location information of the corresponding terminal is refreshed;

当轮到下一个时隙时、采用上述同样的方法对A2进行时隙抽样,同样使得在下一个时隙抽样后,在同一位置共享组中显示该时隙抽样过程中所获取的所有A1至An个成员的位置信息包括刷新后的位置信息;When it is the turn of the next time slot, the same method as above is used to sample the time slot of A2, so that after the next time slot is sampled, all A1 to An obtained during the sampling process of the time slot are displayed in the same position sharing group. The location information of each member includes the refreshed location information;

也就是说,在具体某个时隙抽样周期内、只针对一个终端进行抽样后,即上传并显示该终端刷新后的位置信息,即实时的位置信息,其他不刷新的终端暂维持旧的位置信息不变。That is to say, in a specific time slot sampling period, after sampling only one terminal, upload and display the refreshed location information of the terminal, that is, real-time location information, and other terminals that do not refresh temporarily maintain the old location. Information remains unchanged.

在本发明实施例公开执行上述位置信息的共享方法的过程中,除上述上传的方式,优选的,如图1中所示出的步骤S102所述终端在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照S帧/秒进行时隙抽样,获得进行抽样的终端刷新后的位置信息,并上传,其具体执行过程如图3所述,主要包括:In the process of implementing the above method for sharing location information disclosed in the embodiment of the present invention, in addition to the above uploading method, preferably, the terminal in step S102 as shown in FIG. The order in which the n terminals join the location sharing group is to perform time slot sampling according to S frames/second, obtain the refreshed location information of the sampling terminal, and upload it. The specific execution process is shown in Figure 3, and mainly includes:

步骤S301,所述终端获取包括自身在内的n个终端加入所述共享位置组的第一顺序;Step S301, the terminal obtains the first order in which n terminals including itself join the shared location group;

步骤S302,所述终端在预设抽样周期T内,以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,在第(i-1)个时隙,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息;Step S302, within the preset sampling period T, the terminal performs one time slot sampling at the rate of S frames per second in the first order, and in the (i-1)th time slot, performs sampling on the i-th terminal. sampling, and refresh the location information of the i-th terminal to obtain the refreshed location information;

步骤S303,所述终端在第i个时隙,依据上传时间N将第(i-1)个时隙抽样获取的第i个终端刷新后的位置信息上传至位置共享组,N=T/T0Step S303, in the ith time slot, the terminal uploads the refreshed location information of the ith terminal obtained by sampling in the (i-1)th time slot to the location sharing group according to the upload time N, N=T/T0 ;

也就是说,在第i个时隙到来之前,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息,在所述第i时隙到来后,依据上传时间N上传第i个终端刷新后的位置信息;That is to say, before the arrival of the i-th time slot, the i-th terminal is sampled, and the location information of the i-th terminal is refreshed to obtain the refreshed location information. After the i-th time slot arrives, Upload the refreshed location information of the ith terminal according to the upload time N;

其中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为进行时隙抽样的单个抽样时隙的时长,i的取值范围为1~n,包括端点值。Among them, S=(1000ms)/T, T is the duration of the preset sampling period, in milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the duration of a single sampling time slot for time slot sampling , the value of i ranges from 1 to n, including the endpoints.

在执行上述步骤S301至步骤S303的过程中,针对步骤S302,每S帧/秒执行一次时隙抽样,实际上即循环执行步骤S302至步骤S303,直至所述n个终端在所述预设抽样周期T内均进行时隙抽样。In the process of executing the above steps S301 to S303, for step S302, time slot sampling is performed every S frames/second, in fact, steps S302 to S303 are executed cyclically until the n terminals are in the preset sampling Slot sampling is performed in the period T.

以上本发明实施例公开了两种上传刷新后的位置信息的方式,通常情况下采用第一种方式,终端在分配的时隙抽样时间内,先完成位置信息的刷新,然后再完成数据上传;也就是说位置信息的刷新和上传在同一次时隙抽样中完成;第二种方式,终端在分配的时隙抽样的时隙到来之前的前一个时隙内完成位置信息的刷新,然后在分配的时隙抽样的时隙到来之后,在该分配的时隙内只完成刷新后的位置信息的上传。在实际操作过程中,一般采用第一种方式。The above embodiment of the present invention discloses two methods for uploading the refreshed location information. Usually, the first method is adopted. The terminal first completes the refresh of the location information within the allocated time slot sampling time, and then completes the data upload; That is to say, the refresh and upload of the location information are completed in the same time slot sampling; in the second method, the terminal completes the refresh of the location information in the previous time slot before the time slot of the allocated time slot sampling, and then allocates After the time slot sampled by the time slot arrives, only the updated location information is uploaded in the allocated time slot. In the actual operation process, the first method is generally adopted.

在上述任一本发明实施例中,优选的,所述终端在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记之前,若待共享位置的终端个数过多,尤其是该终端个数n的取值大于T时,采用分层建群显示的方式,实现对各个位置共享组内的人数的限制,使位置信息的共享更迅速。具体的分层建群的过程以建立位置共享组的终端为例,如图4所示,主要包括:In any of the above embodiments of the present invention, preferably, before the terminal acquires the display marks of n terminals of the to-be-shared location including itself in a location-sharing group corresponding to the location-sharing mode, if the location to be shared is If the number of terminals is too large, especially when the value of the number of terminals n is greater than T, a hierarchical group display method is used to limit the number of people in each location sharing group, so that location information can be shared more quickly. The specific hierarchical group building process takes a terminal for establishing a location sharing group as an example, as shown in FIG. 4 , which mainly includes:

步骤S401,所述终端建立M个位置共享组内的一个位置共享组,同时建立或加入位置共享组长群,所述位置共享组长群为包含自身和其余建立M-1个位置共享组的终端的一位置共享组;Step S401, the terminal establishes a position sharing group in the M position sharing groups, and establishes or joins a position sharing group leader group at the same time, and the position sharing group leader group includes itself and the rest of the M-1 position sharing groups established. A location sharing group of the terminal;

在步骤S401中,M的取值为终端个数n开根号后所获得的值的整数部分,所述位置共享组长群内仅有一个终端为建立所述位置共享组长群的一方;In step S401, the value of M is the integer part of the value obtained by taking the root of the number of terminals n, and there is only one terminal in the position sharing group leader group that establishes the position sharing group leader group;

也就是说,建立共享位置组的终端除了加入自己所建立的共享位置组,还需要加入一个共享位置组长群,且其也可以为该共享位置组长群的建立者;That is to say, in addition to joining the shared location group established by the terminal that establishes the shared location group, it also needs to join a shared location group leader group, and it can also be the founder of the shared location group leader group;

步骤S402,所述终端在位置共享模式下,分层显示M个所述位置共享组,以及所述位置共享组长群;Step S402, in the location sharing mode, the terminal displays the M location sharing groups and the location sharing group leader group in layers;

在步骤S402中,在分层显示M个所述共享位置组和所述共享位置组长群之后,在执行上述附图1所示出的位置信息的共享方法的过程中,位于所述共享位置组群和所述共享位置组长群中的终端则均采用各自对应的Mark标记显示。In step S402, after the M shared location groups and the shared location group leader groups are displayed in layers, in the process of executing the method for sharing location information shown in FIG. The terminals in the group and the group leader group at the shared location are displayed with respective corresponding Mark marks.

需要说明的是,本发明实施例所公开的分层建群进行位置信息共享并不仅限于终端个数n大于T的情况下,当终端个数n的个数不大于T时也可以进行分层建群显示。It should be noted that the hierarchical grouping disclosed in the embodiments of the present invention to share location information is not limited to the case where the number of terminals n is greater than T, and the layering can also be performed when the number of terminals n is not greater than T Group display.

在本发明实施例中,具体针对分层建群的各个终端的位置共享的过程通过下述示例进行详细说明:In the embodiment of the present invention, the process of location sharing of each terminal in a hierarchical grouping is described in detail by using the following example:

例如:当前有28个待共享位置的终端,根据上述划分群组的方式M的取值为终端个数n开根号后所获得的值的整数部分,28个待共享位置的终端可以拆分成5个组,每个组不超过6个终端用户;For example: there are currently 28 terminals to be shared. According to the above grouping method, the value of M is the integer part of the value obtained by taking the root of the number of terminals n, and the 28 terminals to be shared can be split. into 5 groups, each with no more than 6 end users;

需要说明是的,不足6个终端用户的组在连续时隙抽样过程中采用相应的空时隙进行补充。It should be noted that, in the group with less than 6 terminal users, corresponding empty time slots are used for supplementation in the continuous time slot sampling process.

第一层为团队的组长层,用A1、A2、A3、A4、A5表示5个待建立位置共享组的组长,即A1、A2、A3、A4、A5位于同一个位置共享组长群,其中有一个为该位置共享组长群的建立者;The first layer is the team leader layer. A1, A2, A3, A4, and A5 are used to represent the team leaders of the five location sharing groups to be established, that is, A1, A2, A3, A4, and A5 are located in the same location sharing leader group. , one of which is the founder of the shared leader group for this location;

第二层为由A1、A2、A3、A4、A5分别建立的位置共享组,假设A1、A2、A3所建立的位置共享组中各有6个终端,A4、A5所建立的位置共享组中各有5个终端。The second layer is the location sharing group established by A1, A2, A3, A4, and A5 respectively. Suppose there are 6 terminals in the location sharing group established by A1, A2, and A3, and the location sharing group established by A4 and A5 Each has 5 terminals.

如图5所示,上述分层后的具体表示为:As shown in Figure 5, the specific representation after the above layering is:

A1为组长的第1位置共享组,成员是(A1、11、12、13、14、15);A1 is the first position sharing group of the group leader, and the members are (A1, 11, 12, 13, 14, 15);

A2为组长的第2位置共享组,成员是(A2、21、22、23、24、25);A2 is the second position sharing group of the group leader, and the members are (A2, 21, 22, 23, 24, 25);

A3为组长的第3位置共享组,成员是(A3、31、32、33、34、35);A3 is the third position sharing group of the group leader, and the members are (A3, 31, 32, 33, 34, 35);

A4为组长的第4位置共享组,成员是(A4、41、42、43、44、K);A4 is the fourth position sharing group of the group leader, and the members are (A4, 41, 42, 43, 44, K);

A5为组长的第5位置共享组,成员是(A5、51、52、53、54、K);A5 is the 5th position sharing group of the group leader, and the members are (A5, 51, 52, 53, 54, K);

5个组长构成的位置共享组长群:成员是(A1、A2、A3、A4、A5);Position sharing group leader group composed of 5 group leaders: members are (A1, A2, A3, A4, A5);

其中,K指代空白时隙;图5中仅示出A1和A5所在两个组的情况;Wherein, K refers to the blank time slot; Only shows the situation of two groups where A1 and A5 are located in Fig. 5;

在本发明实施例中,基于上述分成2个层次的群后,由于单个群内的终端个数减少,每个位置共享组内所有终端刷新的总时间也相应的缩短。In the embodiment of the present invention, after the above-mentioned groups are divided into two levels, since the number of terminals in a single group is reduced, the total refresh time of all terminals in each location sharing group is correspondingly shortened.

假设每个终端更新位置信息并上传刷新所需要的最少时间用时隙T0表示,也就是说,在T0时隙,同时完成位置信息的刷新和上传,在不进行分层建群的情况下,那么上述28个终端共需要28T0的时长才能全部刷新一次位置信息。It is assumed that the minimum time required for each terminal to update the location information and upload the refresh is represented by the time slot T0 , that is to say, in the time slot T0 , the refresh and upload of the location information is completed at the same time, and the hierarchical grouping is not performed. , then the above 28 terminals need a total of 28T0 to refresh the location information once.

结合附图5,在分层建群之后,如上5个组长构成的位置共享组长群刷新一次的时间是5T0,而各个位置共享组刷新的时间是5T0或6T0;为保持一致,在位置共享组长群和A4、A5所建立的位置共享组中各增加一个空白时隙K,6个位置共享组的终端最少只需要6T0的时间长度均可以更新一次位置信息。In conjunction with accompanying drawing 5, after the hierarchical grouping, the time for the location sharing group leader group formed by the above 5 group leaders to refresh once is 5T0 , and the time for each location sharing group to refresh is 5T0 or 6T0 ; in order to keep the same , a blank time slot K is added to the location sharing group leader group and the location sharing groups established by A4 and A5, and the terminals of the six location sharing groups only need at least 6T0 time length to update the location information once.

需要说明的是,若当前终端为位置共享组的建立者时,其需要同时启动位置共享组和位置共享组长群,此时,在该终端的操作界面上可采用平分显示窗口的方式同时显示多个位置共享组(包括位置共享组长群),或采用窗口切换方式轮流进行显示,本发明实施例对此不进行具体限定,可由终端用户根据自身习惯进行自由选择或设置。It should be noted that if the current terminal is the founder of the location sharing group, it needs to start the location sharing group and the location sharing group leader group at the same time. Multiple location sharing groups (including location sharing group leaders) may be displayed in turn in a window switching manner, which is not specifically limited in this embodiment of the present invention, and can be freely selected or set by end users according to their own habits.

在本发明实施例公开的技术方案中,通过上述分层建群的方式原来需要28T0完成所有终端的位置信息的更新和上传,分层建立6个群后,对于普通的终端(未建立自己的位置共享组)而言完成所有终端的位置信息的刷新和上传仅需要6T0,节省了22个空时隙,也就是说这22个空时隙,终端不需要刷新位置信息和上传,相当于处于省电模式,而对于建立自己位置共享组的终端而言,2个群的终端总数量为11个,则最少需要11T0时间长度,即可以完成所有终端的位置信息的刷新,基于上述分层建群的方式能够进一步实现对终端资源和系统开销的节约。In the technical solution disclosed in the embodiment of the present invention, the above-mentioned hierarchical group building method originally required 28T0 to complete the updating and uploading of the location information of all terminals. In terms of location sharing group), it only takes 6T0 to refresh and upload the location information of all terminals, which saves 22 empty time slots, that is to say, in these 22 empty time slots, the terminal does not need to refresh and upload the location information, which is quite Since it is in the power saving mode, and for a terminal that establishes its own location sharing group, the total number of terminals in the two groups is 11, and a minimum time length of11T0 is required, that is, the refresh of the location information of all terminals can be completed. Based on the above The method of building groups in layers can further realize the saving of terminal resources and system overhead.

进一步需要说明的是,作为位置共享组长群的位置共享组,其中各个终端也可以按照上述附图1所示出的位置信息的共享方法进行位置共享。It should be further noted that, as the location sharing group of the location sharing group leader group, each terminal may also perform location sharing according to the location information sharing method shown in FIG. 1 above.

实施例二Embodiment 2

基于上述本发明实施例一公开的一种位置信息的共享方法,本发明该实施例二对应公开了位置信息的共享装置,以及具有该位置信息的共享装置的终端。Based on the method for sharing location information disclosed in the first embodiment of the present invention, the second embodiment of the present invention correspondingly discloses a location information sharing device and a terminal having the location information sharing device.

本发明实施例公开的位置信息的共享装置100的示意框图如图6所示,主要包括:获取单元101,抽样上传单元102和显示单元103;The schematic block diagram of the location information sharing apparatus 100 disclosed in the embodiment of the present invention is shown in FIG. 6 , which mainly includes: an acquiring unit 101 , a sampling uploading unit 102 and a displaying unit 103 ;

其中,获取单元101,用于在位置共享模式对应的位置共享组下,获取包括自身在内的待共享位置的n个终端的显示标记,其中,一终端对应预设一显示标记,所述显示标记携带有对应终端基于定位技术获取的位置信息,n的取值为大于1的正整数;The obtaining unit 101 is configured to obtain the display marks of n terminals whose positions are to be shared, including itself, under the position sharing group corresponding to the position sharing mode, wherein a terminal corresponds to a preset display mark, and the display The mark carries the position information obtained by the corresponding terminal based on the positioning technology, and the value of n is a positive integer greater than 1;

抽样上传单元102,用于在预设抽样周期T内,以所述n个终端加入所述位置共享组的顺序按照每秒S帧的速率进行时隙抽样,获得进行抽样的终端刷新后的位置信息,并上传;The sampling uploading unit 102 is configured to, within a preset sampling period T, perform time slot sampling at a rate of S frames per second in the order in which the n terminals join the location sharing group, and obtain the refreshed location of the sampling terminal information, and upload;

其中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为进行时隙抽样的单个抽样时隙的时长;Among them, S=(1000ms)/T, T is the duration of the preset sampling period, in milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the duration of a single sampling time slot for time slot sampling ;

显示单元103,用于在每个时隙抽样过程中,在所述位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及(n-1)个未进行抽样的显示标记和其所携带的未刷新的位置信息。The display unit 103 is configured to, in the sampling process of each time slot, display, in the location sharing group, the display mark corresponding to the terminal sampling the current time slot and the refreshed location information carried by it, and (n-1) unsampled display markers and the unrefreshed location information they carry.

具体的,该显示单元103,用于在位置共享模式下轮流显示各个显示标记及其所携带的对应终端的位置信息。Specifically, the display unit 103 is configured to display each display mark and the location information of the corresponding terminal carried by it in turn in the location sharing mode.

在本发明实施例中,优选的,所述抽样上传单元102,还用于:在预设抽样周期T内,若n个终端对应的显示标记及各自所携带的位置信息的上传时间总时长小于所述预设抽样周期的时长T,则上传空白时隙替代所述预设抽样周期T内未进行抽样的时隙。In the embodiment of the present invention, preferably, the sampling and uploading unit 102 is further configured to: within a preset sampling period T, if the total upload time of the display marks corresponding to the n terminals and the location information carried by each of them is less than If the duration T of the preset sampling period is T, a blank time slot is uploaded to replace the time slot that is not sampled within the preset sampling period T.

在本发明实施例中,优选的,所述抽样上传单元,包括:In this embodiment of the present invention, preferably, the sampling uploading unit includes:

获取模块,用于获取包括自身在内的n个终端加入所述共享位置组的第一顺序;an acquisition module, configured to acquire the first order in which n terminals including itself join the shared location group;

第一抽样模块,用于在预设抽样周期T内,循环以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,当第i个时隙到来时,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息,直至所述n个终端在所述预设抽样周期T内均进行时隙抽样;The first sampling module is configured to cyclically perform one time slot sampling in the first sequence at the rate of S frames per second within the preset sampling period T, and when the ith time slot arrives, perform sampling on the ith terminal. sampling, and refresh the location information of the i-th terminal to obtain the refreshed location information, until the n terminals all perform time slot sampling within the preset sampling period T;

其中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为进行时隙抽样的单个抽样时隙的时长,i的取值范围为1~n,包括端点值;Among them, S=(1000ms)/T, T is the duration of the preset sampling period, in milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the duration of a single sampling time slot for time slot sampling , the value range of i is 1~n, including the endpoint value;

第一上传模块,用于在所述第i个时隙内,依据上传时间N上传进行抽样的终端刷新后的位置信息,N=T/T0The first uploading module is configured to upload, in the i-th time slot, the updated location information of the sampling terminal according to the uploading time N, where N=T/T0 .

或者,根据上传方式的不同,该抽样上传单元102还包括:Or, according to different uploading methods, the sample uploading unit 102 further includes:

第二抽样模块,用于在预设抽样周期T内,以所述第一顺序按照每秒S帧的速率进行一次时隙抽样,在第(i-1)个时隙,对第i个终端进行抽样,并刷新所述第i个终端的位置信息,获得刷新后的位置信息,直至所述n个终端在所述预设抽样周期T内均进行时隙抽样;The second sampling module is configured to perform one time slot sampling at the rate of S frames per second in the first order within the preset sampling period T, and in the (i-1)th time slot, the ith terminal is Sampling is performed, and the location information of the i-th terminal is refreshed, and the refreshed location information is obtained, until the n terminals all perform time-slot sampling within the preset sampling period T;

第二上传模块,用于在第i个时隙,依据上传时间N将第(i-1)个时隙抽样获取的第i个终端刷新后的位置信息上传至位置共享组,N=T/T0The second uploading module is configured to upload the refreshed location information of the ith terminal obtained by sampling in the (i-1)th time slot to the location sharing group according to the upload time N in the ith time slot, N=T/ T0 ;

其中,S=(1000ms)/T,T为预设抽样周期的时长,单位为毫秒ms,T的取值大于或等于n*T0,T0为进行时隙抽样的单个抽样时隙的时长,i的取值范围为1~n,包括端点值。Among them, S=(1000ms)/T, T is the duration of the preset sampling period, in milliseconds ms, the value of T is greater than or equal to n*T0 , and T0 is the duration of a single sampling time slot for time slot sampling , the value of i ranges from 1 to n, including the endpoints.

在本发明实施例中,优选的,还包括:In this embodiment of the present invention, preferably, it also includes:

建立单元,用于若所述终端为位置共享组的建立方,则所述终端向待共享位置的n-1个终端发送位置共享邀请信息;建立位置共享组并触发进入位置共享模式,建立对应自身的显示标记,所述显示标记中携带有基于定位技术获取的位置信息;The establishment unit is used for, if the terminal is the establishment party of the location sharing group, the terminal sends location sharing invitation information to the n-1 terminals whose location is to be shared; establishes the location sharing group and triggers the entry into the location sharing mode, and establishes the corresponding its own display mark, which carries the position information obtained based on the positioning technology;

或者,or,

加入单元,用于若所述终端为加入方,则所述终端接收位置共享邀请信息,并在向发送所述位置共享邀请信息的终端反馈确认接受位置共享邀请信息时,触发进入已建立的位置共享组并开启位置共享模式,所述确认接受位置共享邀请信息中包括对应自身预设的显示标记,所述显示标记中携带有基于定位技术获取的位置信息。The joining unit is configured to, if the terminal is the joining party, receive the location sharing invitation information, and trigger the entry to the established location when the terminal that sends the location sharing invitation information is fed back to confirm the acceptance of the location sharing invitation information The group is shared and the location sharing mode is turned on, and the confirmation of accepting the location sharing invitation information includes a preset display mark corresponding to the self, and the display mark carries the location information obtained based on the positioning technology.

在本发明实施例中,优选的,还包括:In this embodiment of the present invention, preferably, it also includes:

分层模块,用于所述终端建立M个位置共享组内的一个位置共享组,同时建立或加入位置共享组长群,所述位置共享组长群为包含自身和其余建立M-1个位置共享组的终端的一位置共享组;The hierarchical module is used for the terminal to establish a position sharing group in the M position sharing groups, and at the same time establish or join a position sharing group leader group, and the position sharing group leader group is to establish M-1 positions including itself and the rest a location sharing group of terminals of the sharing group;

其中,M的取值为终端个数n开根号后所获得的值的整数部分,所述位置共享组长群内仅有一个终端为建立所述位置共享组长群的一方;Wherein, the value of M is the integer part of the value obtained after the number of terminals n is rooted, and there is only one terminal in the position sharing group leader group that establishes the position sharing group leader group;

显示模块,用于所述终端在位置共享模式下,分层显示M个所述位置共享组,以及所述位置共享组长群;a display module, used for the terminal to display the M number of the location sharing groups and the location sharing group leader group in layers in the location sharing mode;

其中,M个所述位置共享组和所述位置共享组长群中的终端采用各自对应的显示标记显示。Wherein, the M terminals in the location sharing group and the location sharing group leader group are displayed with respective corresponding display marks.

需要说明的是,本发明实施例二中公开的对应实施例一的位置信息的共享方法的装置,其组成单元以及模块中的各个执行原理可参见上述实施例一中公开的内容。It should be noted that, for the device disclosed in the second embodiment of the present invention, which corresponds to the location information sharing method of the first embodiment, the constituent units and the respective execution principles of the modules may refer to the content disclosed in the first embodiment.

以上结合附图详细说明了本发明的技术方案,本发明提出了一种位置信息的共享技术方案,由各个待共享位置的终端在位置共享模式下,获取包括自身在内的其他n个待共享位置的终端的显示标记,其中,一终端对应预设一显示标记,所述显示标记携带有对应终端基于定位技术获取的位置信息;并在预设抽样周期T内,以n个终端加入的顺序进行时隙抽样,获得进行抽样的终端刷新后的位置信息并在抽样时隙内上传,针对每个时隙抽样中,在位置共享组内显示当前时隙进行抽样的终端对应的显示标记及其携带的刷新后的位置信息,及其他终端未刷新的位置信息和显示标记。本发明基于上述公开的位置信息的共享技术方案中所采用的时隙抽样和定时上传方式,使多个待共享位置的终端对应的显示标记,以及该显示标记所携带的对应终端的实时位置信息在位置共享模式下可以定时轮流显现,从而实现多人的位置信息共享,同时采用时隙抽样和定时上传的方式进行位置信息的共享还进一步节约了各自终端的资源和流量开销。The technical solution of the present invention has been described in detail with reference to the accompanying drawings. The present invention proposes a technical solution for sharing location information, in which each terminal whose location is to be shared acquires other n devices to be shared, including itself, in the location sharing mode. The display mark of the terminal of the location, wherein a terminal corresponds to a preset display mark, and the display mark carries the position information obtained by the corresponding terminal based on the positioning technology; and within the preset sampling period T, in the order that n terminals join Perform time slot sampling, obtain the refreshed location information of the sampling terminal and upload it in the sampling time slot. For each time slot sampling, display the display mark corresponding to the sampling terminal in the current time slot in the location sharing group and its corresponding display mark. The refreshed location information carried, as well as the location information and display marks that have not been refreshed by other terminals. Based on the time slot sampling and timing uploading method adopted in the above disclosed location information sharing technical solution, the present invention enables display marks corresponding to a plurality of terminals whose positions are to be shared, and real-time location information of the corresponding terminals carried by the display marks. In the location sharing mode, it can be displayed in turn at regular intervals, so as to realize the sharing of location information of multiple people. At the same time, the sharing of location information by means of time slot sampling and timed uploading further saves the resources and traffic overhead of each terminal.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims (8)

1. A method for sharing location information is applicable to a terminal, and comprises the following steps:
establishing a position sharing group in M position sharing groups, and establishing or joining a position sharing group leader group, wherein the position sharing group leader group is a position sharing group comprising the position sharing group and other terminals establishing the M-1 position sharing group;
the value of M is an integer part of a value obtained after the number n of terminals is provided with a root number, and only one terminal in the position sharing group leader group is a party for establishing the position sharing group leader group;
in a position sharing mode, M position sharing groups and the position sharing group length group are displayed in a layered mode;
the terminals in the M position sharing groups and the position sharing group leader group are displayed by adopting respective corresponding display marks;
acquiring display marks of n terminals including a position to be shared under a position sharing group corresponding to a position sharing mode, wherein one terminal is correspondingly preset with one display mark, the display mark carries position information of the corresponding terminal, and the value of n is a positive integer greater than 1;
in a preset sampling period T, sampling time slots according to the rate of S frames per second in the sequence of the n terminals added into the position sharing group, obtaining position information refreshed by the terminals performing sampling, and uploading the position information;
wherein, S is (1000ms)/T, T is the duration of the preset sampling period, the unit is ms, and the value of T is greater than or equal to n T0,T0The duration of a single sample slot;
and in the sampling process of each time slot, displaying a display mark corresponding to the terminal which samples the current time slot and the refreshed position information carried by the display mark in the position sharing group, and (n-1) display marks which are not sampled and the non-refreshed position information carried by the display marks.
2. The sharing method according to claim 1, further comprising:
in a preset sampling period T, if the total duration of the uploading time of the display marks corresponding to the n terminals and the position information carried by the display marks and the position information is less than the duration T of the preset sampling period, replacing the time slots which are not sampled in the preset sampling period T by uploading blank time slots, wherein T is (n + K) T0And K is the number of the blank time slots and is a natural number.
3. The sharing method according to claim 1, wherein before acquiring the display marks of the n terminals at the positions to be shared including the terminal itself in the position sharing group corresponding to the position sharing mode, the method further comprises:
if the terminal is the establishing party of the position sharing group, the terminal sends position sharing invitation information to (n-1) terminals of positions to be shared;
establishing a position sharing group, triggering to enter a position sharing mode, and establishing a display mark corresponding to the display mark, wherein the display mark carries position information of the display mark;
or,
if the terminal is a joining party, the terminal receives position sharing invitation information, and triggers to enter an established position sharing group and starts a position sharing mode when feeding back confirmation acceptance position sharing invitation information to the terminal sending the position sharing invitation information, wherein the confirmation acceptance position sharing invitation information comprises a display mark preset corresponding to the terminal, and the display mark carries the position information of the terminal.
4. The sharing method according to claim 1, wherein the sampling time slots at the rate of S frames per second in the order that the n terminals join the location sharing group in a preset sampling period T to obtain and upload the location information refreshed by the sampled terminals comprises:
acquiring a first sequence of adding n terminals including the terminals into the sharing position group;
in a preset sampling period T, sampling time slots once according to the first sequence and the rate of S frames per second, sampling the ith terminal when the ith time slot arrives, refreshing the position information of the ith terminal, and obtaining the refreshed position information;
uploading the refreshed position information of the terminal for sampling according to the uploading time N in the ith time slot, wherein N is T/T0
Until the n terminals all perform time slot sampling in the preset sampling period T;
wherein the value range of i is 1-n, including the end point values;
or,
acquiring a first sequence of adding n terminals including the terminals into the sharing position group;
in a preset sampling period T, sampling time slots once at the rate of S frames per second in the first sequence, sampling the ith terminal when the (i-1) th time slot, refreshing the position information of the ith terminal, and obtaining the refreshed position information;
in the ith time slot, uploading the refreshed position information of the ith terminal acquired by sampling the (i-1) th time slot according to the uploading time N, wherein N is T/T0
Until the n terminals all perform time slot sampling in the preset sampling period T;
wherein the value range of i is 1-n, including the endpoints.
5. A device for sharing position information, which is suitable for a terminal, includes:
the hierarchical module is used for establishing a position sharing group in the M position sharing groups and establishing or joining a position sharing group leader group, wherein the position sharing group leader group is a position sharing group comprising the position sharing group and other terminals establishing the M-1 position sharing group;
the value of M is an integer part of a value obtained after the number n of terminals is provided with a root number, and only one terminal in the position sharing group leader group is a party for establishing the position sharing group leader group;
the display module is used for displaying M position sharing groups and the position sharing group length group in a layering mode;
the terminals in the M position sharing groups and the position sharing group leader group are displayed by adopting respective corresponding display marks;
the device comprises an acquisition unit, a position sharing unit and a display unit, wherein the acquisition unit is used for acquiring display marks of n terminals including a terminal to be shared under a position sharing group corresponding to a position sharing mode, one terminal is correspondingly preset with one display mark, the display mark carries position information of the corresponding terminal, and the value of n is a positive integer greater than 1;
a sampling uploading unit, configured to perform time slot sampling at a rate of S frames per second in an order in which the n terminals join the position sharing group within a preset sampling period T, obtain location information of the sampled terminals after being refreshed, and upload the location information;
wherein, S is (1000ms)/T, T is the duration of the preset sampling period, the unit is ms, and the value of T is greater than or equal to n T0,T0The duration of a single sample slot;
and the display unit is used for displaying a display mark corresponding to the terminal which samples the current time slot and the position information after refreshing carried by the display mark in the position sharing group, and (n-1) display marks which do not sample and the position information without refreshing carried by the display marks in each time slot sampling process.
6. The sharing device according to claim 5, wherein the sample uploading unit is further configured to: in a preset sampling period T, if the total duration of the uploading time of the display marks corresponding to the n terminals and the position information carried by the display marks and the position information is less than the duration T of the preset sampling period, replacing the time slots which are not sampled in the preset sampling period T by uploading blank time slots, wherein T is (n + K) T0And K is the number of the blank time slots and is a natural number.
7. The sharing device according to claim 5, wherein the sample upload unit includes:
the acquisition module is used for acquiring a first sequence of adding n terminals including the acquisition module into the sharing position group;
a first sampling module, configured to cyclically perform time slot sampling at a rate of S frames per second in the first order within a preset sampling period T, and when an ith time slot arrives, sample an ith terminal, and refresh position information of the ith terminal, to obtain refreshed position information, until the n terminals perform time slot sampling within the preset sampling period T;
wherein the value range of i is 1-n, including the end point values;
a first uploading module, configured to upload, in the ith time slot, location information refreshed by a terminal performing sampling according to an uploading time N, where N is T/T0
Or,
a second sampling module, configured to perform time slot sampling once at a rate of S frames per second in the first order within a preset sampling period T, sample an ith terminal at an (i-1) th time slot, refresh position information of the ith terminal, and obtain refreshed position information until the n terminals perform time slot sampling within the preset sampling period T;
a second uploading module, for sampling the (i-1) th time slot according to the uploading time N in the ith time slotUploading the refreshed position information of the ith terminal, wherein N is T/T0
Wherein the value range of i is 1-n, including the endpoints.
8. A terminal comprising the apparatus for sharing location information according to any one of claims 5 to 7.
CN201610378433.XA2016-05-312016-05-31Position information sharing method and device and terminalActiveCN107453976B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610378433.XACN107453976B (en)2016-05-312016-05-31Position information sharing method and device and terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610378433.XACN107453976B (en)2016-05-312016-05-31Position information sharing method and device and terminal

Publications (2)

Publication NumberPublication Date
CN107453976A CN107453976A (en)2017-12-08
CN107453976Btrue CN107453976B (en)2020-11-10

Family

ID=60486047

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610378433.XAActiveCN107453976B (en)2016-05-312016-05-31Position information sharing method and device and terminal

Country Status (1)

CountryLink
CN (1)CN107453976B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108111974A (en)*2017-12-132018-06-01广东欧珀移动通信有限公司Control method and device of positioning module, storage medium and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101861584B (en)*2007-11-052013-06-19聚焦网络公司End to end data transfer
US8539086B2 (en)*2011-03-232013-09-17Color Labs, Inc.User device group formation
CN102831113B (en)*2011-06-142015-10-21腾讯科技(深圳)有限公司Positional information sharing method and system
CA2874000C (en)*2012-06-062019-01-15Facebook, Inc.Activating a location service for a duration determined by travel distance
US9424239B2 (en)*2013-09-062016-08-23Microsoft Technology Licensing, LlcManaging shared state information produced by applications

Also Published As

Publication numberPublication date
CN107453976A (en)2017-12-08

Similar Documents

PublicationPublication DateTitle
CN102575937B (en)Based on the method and apparatus of known calendar event estimated time of departure
US10832223B2 (en)Automatic remote communications session creation
CN102857605B (en)Grouping method and apparatus of contacts
CN110163663B (en) Location-based event gallery
EP2873204B1 (en)Method and system for delivering reminder information
ES2686087T3 (en) Use of mobile device functionality from remote computers
US9495664B2 (en)Delivering electronic meeting content
US20150200978A1 (en)Meeting Conflict Indicator
CN104811423B (en)The sharing method and device of location information
US20150131597A1 (en)Network access method and apparatus
CN105450785B (en)File transmission method and device
CN106209397A (en)Conference system based on high in the clouds and its implementation
CN104052779B (en)A kind of method of information recommendation, system and intelligent terminal
US10182014B2 (en)Data communication in a peer-to-peer network
CN106375860A (en)Video playing method and device, and terminal and server
CN109600852A (en)A kind of resource indicating method, communication device and the network equipment
CN107453976B (en)Position information sharing method and device and terminal
WO2016026425A1 (en)Meeting attendee identity information display method and wireless terminal
JP7077758B2 (en) Mobile information processing equipment, mobile information processing methods, and programs
CN104469078A (en)Interactive projection control method and system
CN106331287A (en) Method and device for synchronizing terminal screen content
CN105144059A (en)Program, information processing terminal, and information processing method
CN103929468A (en)Method and apparatus of using separate reverse channel for user input in mobile device display replication
CN105205619A (en)Time axis-based resource management method and device, and system
JP6354750B2 (en) Community service system and community service method

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
TR01Transfer of patent right

Effective date of registration:20250623

Address after:102300 Beijing Shitougang District ShiLong Economic Development Zone Yong'an Road 20 No. 3 Building A-T0841 Room

Patentee after:Beijing Zhanlin Technology Co.,Ltd.

Country or region after:China

Address before:518057 Guangdong Province Nanshan High-tech Industrial Park North District Kupai Information Port, 2 Buildings, 2 Floors

Patentee before:YULONG COMPUTER TELECOMMUNICATION SCIENTIFIC (SHENZHEN) Co.,Ltd.

Country or region before:China

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp