A kind of quick, method of low-power consumption discovery neighbor user
Technical field
The present invention relates to network communication technology field, more particularly, to a kind of quick, method of low-power consumption discovery neighbor user.
Background technology
Social networking application has progressively been transferred to mobile device from the Internet, the curbside application journey of such as Nintendo Co.
Sequence has attracted increasing user to use.But, thus also create a much related service technology difficult problem, particularly when with
Family is want to be used in conjunction with same application in a Local Area Network, and carries out the problem of data cube computation not by base station.Example
As, in cafe, when we want to invite other clients to play some mobile phone games together, can only one by one to client
Inquired it is clear that this method improper.Therefore, efficiently and accurately find other users by the use for application program
There is provided very big help, beneficial to positioning the shared of (gps) equipment between user, shop can also apply this function to send to client
Electronics promotional pamphlet etc..
At present, mobile device mainly provides electricity by battery, if keeping wireless communication module all the time in listening state,
Have soon found that neighbor user although can ensure that, so can consume the electricity of mobile device quickly, in actual use
And it is improper.Therefore we can only intermittence open wireless communication module go detect neighbor user, however, how to ensure that user exists
The unified a certain moment is detected simultaneously, becomes a key issue in intermittent Detection Techniques.Some traditional neighbours visit
Although survey method can guarantee that its power consumption is still very big, and efficiency is low within a certain period of time it can be found that neighbor user, need
A period of time just to can be found that neighbor user.
Content of the invention
For above-mentioned technical problem, it is an object of the invention to provide a kind of quick, side of low-power consumption discovery neighbor user
Method, it was opened under the restriction of communication module in intermittent, short time, improves the speed finding neighbor user, reduces power consumption.
For reaching this purpose, the present invention employs the following technical solutions:
A kind of quick, method of low-power consumption discovery neighbor user, it comprises the steps:
A, be divided into five time subregions of equal length a time cycle, i.e. the first to the 5th time subregion, its
In, each time subregion includes several time slice units;
B, by time slice dividing elements be monitoring unit and free cells;
C, respectively set a position-movable monitoring unit in very first time subregion and the 4th time subregion, the 5th
Set the fixing monitoring unit in a position in time subregion, and remaining time slice unit is all set as free cells.
Especially, in described step a, each time subregion includes several time slice units, specifically refers to:
Described first to the 5th time subregion all includes the time slice unit of equal number, and all time slice units
Length identical.
Especially, described step b specifically includes:
Time slice dividing elements are monitoring unit and free cells, wherein, when mobile terminal is in monitoring unit,
Communication module will be opened, complete reception and the transmission of probe data packet, when mobile terminal is in free cells, by closed communication
Module, stops receiving and sends probe data packet.
Especially, in described step b, mobile terminal sends probe data packet, specifically includes:
Mobile terminal respectively sends a detection data in the initial of monitoring unit place time slice unit with end time
Bag, and at a time slice cell distance before and after the time slice unit of monitoring unit place, each one detection number of transmission
According to bag.
Especially, the position-movable monitoring unit setting in very first time subregion in described step c with the 4th
The change in location rule of the position-movable monitoring unit setting in time subregion is different.
Especially, the change in location of the position-movable monitoring unit setting in very first time subregion in described step c
As follows:
Described monitoring unit starts to move from the time slice unit being located, As time goes on, in week next time
In phase, the position with respect to the original time slice unit is moved rearwards by two time slice units by monitoring unit, wherein, if to
Jumped out after moving two time slice units afterwards very first time subregion, then monitoring unit will be moved into rising of very first time subregion
Beginning time slice unit, circulating repetition according to this.
Especially, the change in location of the position-movable monitoring unit setting in the 4th time subregion in described step c
As follows:
Described monitoring unit starts to move from the time slice unit being located, As time goes on, in week next time
In phase, the position with respect to the original time slice unit is moved forward two time slice units by monitoring unit, wherein, if to
Jumped out after front two time slice units of movement the 4th time subregion, then monitoring unit will be moved into the 4th time subregion
A time slice unit afterwards, circulating repetition according to this.
Especially, the fixing monitoring unit in a position, concrete bag are set in described step c in the 5th time subregion
Include:
Last time slice unit of 5th time subregion is set as monitoring unit, wherein, this monitoring unit
Position is constant all the time, is fixed on last time slice unit described within each time cycle.
One time cycle is divided into the first to the 5th time subregion by the present invention, and in very first time subregion and the 4th
Between respectively set a position-movable monitoring unit in subregion, set the fixing monitoring in a position in the 5th time subregion
Unit, remaining time slice unit is all set as free cells.Monitoring list in very first time subregion and the 4th time subregion
Unit is continually changing in the position in different time cycle, improves the speed finding neighbor user.Only set in five time subregions
There are three monitoring units, remaining time slice unit is all set as free cells, and when mobile terminal is in free cells, communication
Module is closed, and so, greatly reduces power consumption.
Brief description
Fig. 1 is the quick, method flow diagram of low-power consumption discovery neighbor user provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram sending probe data packet provided in an embodiment of the present invention;
Fig. 3 a is monitoring unit and free cells distribution diagram during the cycle very first time provided in an embodiment of the present invention;
Fig. 3 b is monitoring unit and free cells distribution diagram during the second time cycle provided in an embodiment of the present invention;
Fig. 3 c is monitoring unit and free cells distribution diagram during three time cycle provided in an embodiment of the present invention.
Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, with reference to the accompanying drawings and examples to the present invention
It is described further.
Refer to shown in Fig. 1, Fig. 1 is quick, the method stream of low-power consumption discovery neighbor user provided in an embodiment of the present invention
Cheng Tu.
Quick in the present embodiment, low-power consumption finds that the method for neighbor user comprises the steps:
Step s101, be divided into five time subregions of equal length a time cycle, i.e. the first to the 5th time
Subregion, wherein, each time subregion includes several time slice units.
Described first to the 5th time subregion all includes the time slice unit of equal number, and all time slice units
Length identical.Therefore, the total length of a time cycle is equal to the length of all time slice units in five time subregions
Degree sum.
Step s102, by time slice dividing elements be monitoring unit and free cells.
When mobile terminal is in monitoring unit, communication module will be opened, complete reception and the transmission of probe data packet.Its
In, it is as follows that mobile terminal sends detection data packet procedures: mobile terminal the initial of monitoring unit place time slice unit with
End time respectively sends a probe data packet, in addition, in order to ensure monitoring unit jump movement situation it has also been discovered that
Neighbor user, at a time slice cell distance before and after the time slice unit of monitoring unit place, also respectively sends one
Probe data packet.In time outside sending probe data packet, mobile terminal will keep listening state, if now can connect
Receive probe data packet, then prove that two users can find mutually.It should be noted that sending probe data packet required time
Less with respect to time slice element length, only each monitoring unit is increased with the time of two transmission probe data packet and fails to understand
Aobvious increase power consumption degree.When mobile terminal is in free cells, by closed communication module, enter power save mode, mobile terminal
Do not send probe data packet, do not receive the probe data packet of neighbor user simultaneously yet.
Step s103, respectively set a position-movable monitoring list in very first time subregion and the 4th time subregion
Unit, sets the fixing monitoring unit in a position in the 5th time subregion, and remaining time slice unit is all set as sky
Not busy unit.
In the present embodiment in very first time subregion set position-movable monitoring unit with the 4th time subregion
The change in location rule of the position-movable monitoring unit of interior setting is different.Meanwhile, by the 5th time subregion last
Time slice unit is set as monitoring unit, and wherein, the position of this monitoring unit is constant all the time, solid within each time cycle
It is scheduled on last time slice unit described.
The change in location of the position-movable monitoring unit setting in very first time subregion is as follows: monitoring unit is from place
Time slice unit start move, As time goes on, within the next time cycle, monitoring unit will with respect to original when
Between the position of slice unit be moved rearwards by two time slice units, wherein, if being moved rearwards by two time slice unit last transitions
Go out very first time subregion, then monitoring unit will be moved into the initial time slice unit of very first time subregion, circulate weight according to this
Multiple.
The change in location of the position-movable monitoring unit setting in the 4th time subregion is as follows: monitoring unit is from place
Time slice unit start move, As time goes on, within the next time cycle, monitoring unit will with respect to original when
Between slice unit position move forward two time slice units, wherein, if move forward two time slice unit last transitions
Go out the 4th time subregion, then monitoring unit will be moved into last time slice unit of the 4th time subregion, follows according to this
Ring repeats.
Below emphasis to mobile terminal send probe data packet process, and mobile terminal how to arrange monitoring unit with
Free cells are described in detail.
As shown in Fig. 2 in figure label 1 to 5 represents the first to the 5th time slice unit respectively, arrow place straight line marks
Send the position of probe data packet, a represents monitoring unit.Assume that monitoring unit is in the 3rd time slice unit, then four
The transmission position of individual probe data packet is as follows: at the end of very first time slice unit, (i.e. the second time slice unit is initial
Place), (i.e. the section start of the 3rd time slice unit) at the end of the second time slice unit, at the end of the 3rd time slice unit
At the end of (i.e. the section start of the 4th time slice unit), the 4th time slice unit, (i.e. the 5th time slice unit is initial
Place).In the 3rd time slice, the probe data packet that mobile terminal reception neighbor user sends is it is ensured that discovery procedure can
To complete in of short duration time interval.
For convenience of description, as shown in Fig. 3 a, Fig. 3 b and Fig. 3 c, when in the present embodiment, each time subregion is set to three
Between slice unit, therefore one time cycle total length is 15 time slice units, in figure label 1 to 15 and 15
Time slice unit corresponds, and indicates respectively the first to the 15th time slice unit, a represents monitoring unit.
As shown in Figure 3 a, within the cycle very first time, last time slice unit of the 5th time subregion is the tenth
Five time slice units are set as monitoring unit, and position within each time cycle for this monitoring unit immobilizes.When first
Between the very first time slice unit of subregion be set as position-movable monitoring unit, the 12nd timeslice of the 4th time subregion
Segment unit is set as position-movable monitoring unit.
In very first time subregion, monitoring unit is located at the position of very first time slice unit when the cycle very first time,
When to the second time cycle, this monitoring unit has been moved rearwards by the distance of two time slice units, during to the 3rd
Between slice unit position.When to three time cycles, because each time subregion only has three time slice units, such as
Fruit monitoring unit is moved rearwards by two time slice units again, then by the scope of very first time subregion that jumps out, therefore this monitoring list
Unit has returned to very first time slice unit position.It is similar to very first time subregion, in the 4th time subregion, monitoring unit is the
During a period of time be located at the 12nd time slice unit position, when to the second time cycle, this monitoring unit to
Before move the distance of two time slice units, to the tenth time slice cell position.To the 3rd time cycle when
Wait, because each time subregion only has three time slice units, if monitoring unit moves two time slice lists further along
Unit, then by the scope of the 4th time subregion that jumps out, therefore this monitoring unit has returned to the 12nd time slice cell position.
To sum up, if each time subregion only has three time slice units, can weigh when three time cycles
Monitoring unit and the free cells method of salary distribution during the multiple cycle very first time.More wide in range says, if each time subregion has s
Time slice unit, thenDuring the individual time cycle, monitoring unit and free cells during the cycle very first time will be repeated
The method of salary distribution.So circulating repetition.
This invention ensures thatIn individual time slice unit, neighbor user can find mutually other side,
The intermittent, short time open communication module limit lower it is ensured that the time interval of neighbor uni-cast, and time interval is limited
In the few time slice unit of number it is ensured that mobile terminal can quickly, low-power consumption find neighbor user.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for those skilled in the art
For, the present invention can have various change and change.All any modifications made within spirit and principles of the present invention, equivalent
Replace, improve etc., should be included within the scope of the present invention.