Summary of the invention
The present invention provides a kind of positioning of wireless device and data forwarding method and system, can be realized and are counted in equipment
The equipment for sending data is positioned according to while forwarding.
The present invention provides a kind of positioning of wireless device and data forwarding methods, comprising:
Receive the information of the broadcast data sent comprising originating equipment;
Judge in the information whether include the first forwarding device facility information, if so, the information is sent to
Target device, if it is not, then:
It will include the beginning that facility information, which is added, using the facility information of addition as the facility information of the first forwarding device
The facility information of broadcast data and first forwarding device that hair equipment is sent is sent to target device;
The facility information of the parsing broadcast data sent comprising the originating equipment and first forwarding device,
Obtain the location information of the originating equipment.
Preferably, the facility information is device mac address.
Preferably, the broadcast data and first forwarding device sent described in the parsing comprising the originating equipment
Facility information, the location information for obtaining the originating equipment includes:
Obtain the signal strength for the originating equipment that first forwarding device receives;
MAC Address and the signal strength based on first forwarding device determine the position letter of the originating equipment
Breath.
A kind of positioning of wireless device and data forwarding system, comprising: originating equipment, forwarding device and target device;Wherein:
The originating equipment sends broadcast data;
The forwarding device receives the information comprising broadcast data that the originating equipment is sent;
The forwarding device judge in the information whether include the first forwarding device facility information, if so, by institute
It states information and is sent to target device, if it is not, then:
It will include the beginning that facility information, which is added, using the facility information of addition as the facility information of the first forwarding device
The facility information of broadcast data and first forwarding device that hair equipment is sent is sent to target device;
The target device parsing broadcast data sent comprising the originating equipment and first forwarding are set
Standby facility information obtains the location information of the originating equipment.
Preferably, the facility information is device mac address.
Preferably, the target device is specifically used for:
Obtain the signal strength for the originating equipment that first forwarding device receives;
MAC Address and the signal strength based on first forwarding device determine the position letter of the originating equipment
Breath.
By above scheme it is found that a kind of wireless device positioning provided by the invention and data forwarding method, pass through connect first
The information for the broadcast data that packet receiving is sent containing originating equipment;Then judge in the information whether to include setting for the first forwarding device
Standby information, if so, the information is sent to target device, if it is not, then: addition facility information, by the facility information of addition
As the facility information of the first forwarding device, the broadcast data sent comprising the originating equipment and first forwarding are set
Standby facility information is sent to target device;The finally parsing broadcast data sent comprising the originating equipment and described
The facility information of first forwarding device obtains the location information of the originating equipment;It realizes and carries out data forwarding in equipment
The equipment for sending data is positioned simultaneously.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, for a kind of process of wireless device positioning and data forwarding method embodiment 1 disclosed by the invention
Figure, method includes the following steps:
S101, the information for receiving the broadcast data sent comprising originating equipment;
When needing send while needing to position wireless device to data by wireless device, originate first
Equipment sends the broadcast data for needing to send, the equipment that the originating equipment needs to be positioned, when originating equipment is sent extensively
After multicast data, the forwarding device in environment receives the broadcast data information sent comprising originating equipment, it should be noted that environment
In forwarding device include at least one.
S102, judge in information whether include the first forwarding device facility information, if so, into S103, if it is not, then
Into S104:
After the forwarding device in environment receives the information of the broadcast data sent comprising originating equipment, first to reception
To information judged, judge in the information whether include other forwarding devices facility information.
S103, the information is sent to target device;
After in the information that judgement receives including the facility information of other forwarding devices, directly the information is turned
Hair, during forwarding, directly can be forwarded information by other forwarding devices, until sending information to target
Equipment.
S104, addition facility information will include institute using the facility information of addition as the facility information of the first forwarding device
The facility information of the broadcast data and first forwarding device of stating originating equipment transmission is sent to target device;
After not including the facility information of other forwarding devices in the information that judgement receives, receives and sent out comprising originating equipment
The facility information of itself is added in the message received by the forwarding device of the information of the broadcast data sent, which makees
For the first forwarding device, then first forwarding device forwards the broadcast data sent comprising originating equipment and described first
The facility information of equipment is sent to target device, during forwarding, can by other forwarding devices directly to information into
Row forwarding, until sending information to target device.
The equipment of the broadcast data and first forwarding device that are sent described in S105, parsing comprising the originating equipment
Information obtains the location information of the originating equipment.
When target device receives the broadcast data and described of forwarding device transmission sent comprising the originating equipment
When the facility information of the first forwarding device, the information received is parsed, to get the location information of originating equipment.
In conclusion in the above-described embodiments, the information first by receiving the broadcast data sent comprising originating equipment;
Then judge in the information whether include the first forwarding device facility information, if so, the information is sent to target
Equipment, if it is not, then: addition facility information will include institute using the facility information of addition as the facility information of the first forwarding device
The facility information of the broadcast data and first forwarding device of stating originating equipment transmission is sent to target device;Finally parse
Described includes the facility information of the broadcast data that the originating equipment is sent and first forwarding device, is originated described in acquisition
The location information of equipment;It realizes and the equipment for sending data is positioned while equipment carries out data forwarding.
As shown in Fig. 2, for a kind of process of wireless device positioning and data forwarding method embodiment 2 disclosed by the invention
Figure, method includes the following steps:
S201, the information for receiving the broadcast data sent comprising originating equipment;
When needing send while needing to position wireless device to data by wireless device, originate first
Equipment sends the broadcast data for needing to send, the equipment that the originating equipment needs to be positioned, when originating equipment is sent extensively
After multicast data, the forwarding device in environment receives the broadcast data information sent comprising originating equipment, it should be noted that environment
In forwarding device include at least one.
S202, judge in information whether include the first forwarding device facility information, the facility information is for equipment MAC
Location, if so, into S203, if it is not, then entering S204:
After the forwarding device in environment receives the information of the broadcast data sent comprising originating equipment, first to reception
To information judged, judge in the information whether include other forwarding devices facility information.
S203, the information is sent to target device;
After in the information that judgement receives including the facility information of other forwarding devices, directly the information is turned
Hair, during forwarding, directly can be forwarded information by other forwarding devices, until sending information to target
Equipment.
S204, addition facility information will include institute using the facility information of addition as the facility information of the first forwarding device
The facility information of the broadcast data and first forwarding device of stating originating equipment transmission is sent to target device;
After not including the facility information of other forwarding devices in the information that judgement receives, receives and sent out comprising originating equipment
The facility information of itself is added in the message received by the forwarding device of the information of the broadcast data sent, which makees
For the first forwarding device, then first forwarding device forwards the broadcast data sent comprising originating equipment and described first
The facility information of equipment is sent to target device, during forwarding, can by other forwarding devices directly to information into
Row forwarding, until sending information to target device.
S205, the signal strength for obtaining the originating equipment that first forwarding device receives;
Any one wireless device has signal strength indication when broadcast data, when originating equipment is set to the first forwarding
When preparation send data information, the signal strength that the first forwarding device receives originating equipment is obtained.
S206, the originating equipment is determined based on the MAC Address of first forwarding device and the signal strength
Location information.
Based on the MAC Address of the first forwarding device, the particular geographic location information of the first forwarding device can determine, then
The signal strength indication of the first forwarding device is sent data to further according to originating equipment, it will be able to accurately calculate originating equipment
Location information.
In conclusion in the above-described embodiments, the information first by receiving the broadcast data sent comprising originating equipment;
Then judge in the information whether include the first forwarding device facility information, if so, the information is sent to target
Equipment, if it is not, then: addition facility information will include institute using the facility information of addition as the facility information of the first forwarding device
The facility information of the broadcast data and first forwarding device of stating originating equipment transmission is sent to target device;Finally parse
Described includes the facility information of the broadcast data that the originating equipment is sent and first forwarding device, is originated described in acquisition
The location information of equipment;It realizes and the equipment for sending data is positioned while equipment carries out data forwarding.
As shown in figure 3, being that a kind of wireless device positioning disclosed by the invention and the structure of data forwarding system embodiment 1 are shown
It is intended to, comprising: originating equipment 301, forwarding device 302 and target device 303;Wherein:
Originating equipment 301 sends broadcast data;
Forwarding device 302 receives the information comprising broadcast data that originating equipment 301 is sent;
Forwarding device 302 judge in the information whether include the first forwarding device facility information, if so, will be described
Information is sent to target device 303, if it is not, then:
Facility information is added, using the facility information of addition as the facility information of the first forwarding device, will be set comprising originating
The facility information of standby 301 broadcast datas sent and the first forwarding device is sent to target device 303;
The parsing of target device 303 includes the broadcast data of the transmission of originating equipment 301 and setting for first forwarding device
Standby information, obtains the location information of originating equipment 301.
In the above-described embodiments, data send by wireless device when needing while needing to carry out wireless device
When positioning, originating equipment, which is sent, first needs the broadcast data that sends, the equipment that the originating equipment needs to be positioned, when
After originating equipment sends broadcast data, the forwarding device in environment receives the broadcast data information sent comprising originating equipment, needs
It is noted that the forwarding device in environment includes at least one.
After the forwarding device in environment receives the information of the broadcast data sent comprising originating equipment, first to reception
To information judged, judge in the information whether include other forwarding devices facility information.
After in the information that judgement receives including the facility information of other forwarding devices, directly the information is turned
Hair, during forwarding, directly can be forwarded information by other forwarding devices, until sending information to target
Equipment.
After not including the facility information of other forwarding devices in the information that judgement receives, receives and sent out comprising originating equipment
The facility information of itself is added in the message received by the forwarding device of the information of the broadcast data sent, which makees
For the first forwarding device, then first forwarding device forwards the broadcast data sent comprising originating equipment and described first
The facility information of equipment is sent to target device, during forwarding, can by other forwarding devices directly to information into
Row forwarding, until sending information to target device.
When target device receives the broadcast data and described of forwarding device transmission sent comprising the originating equipment
When the facility information of the first forwarding device, the information received is parsed, to get the location information of originating equipment.
As shown in figure 4, being that a kind of wireless device positioning disclosed by the invention and the structure of data forwarding system embodiment 2 are shown
It is intended to, comprising: originating equipment 401, forwarding device 402 and target device 403;Wherein:
Originating equipment 401 sends broadcast data;
Forwarding device 402 receives the information comprising broadcast data that originating equipment 401 is sent;
Forwarding device 402 judge in the information whether include the first forwarding device facility information, the facility information
For device mac address;If so, the information is sent to target device, if it is not, then:
It will include the beginning that facility information, which is added, using the facility information of addition as the facility information of the first forwarding device
The facility information of broadcast data and first forwarding device that hair equipment is sent is sent to target device 403;
Target device 403 obtains the signal strength for the originating equipment 401 that the first forwarding device receives;Based on the first forwarding
The MAC Address of equipment and the signal strength determine the location information of originating equipment 401.
In the above-described embodiments, data send by wireless device when needing while needing to carry out wireless device
When positioning, originating equipment, which is sent, first needs the broadcast data that sends, the equipment that the originating equipment needs to be positioned, when
After originating equipment sends broadcast data, the forwarding device in environment receives the broadcast data information sent comprising originating equipment, needs
It is noted that the forwarding device in environment includes at least one.
After the forwarding device in environment receives the information of the broadcast data sent comprising originating equipment, first to reception
To information judged, judge in the information whether include other forwarding devices facility information.
After in the information that judgement receives including the facility information of other forwarding devices, directly the information is turned
Hair, during forwarding, directly can be forwarded information by other forwarding devices, until sending information to target
Equipment.
After not including the facility information of other forwarding devices in the information that judgement receives, receives and sent out comprising originating equipment
The facility information of itself is added in the message received by the forwarding device of the information of the broadcast data sent, which makees
For the first forwarding device, then first forwarding device forwards the broadcast data sent comprising originating equipment and described first
The facility information of equipment is sent to target device, during forwarding, can by other forwarding devices directly to information into
Row forwarding, until sending information to target device.
Any one wireless device has signal strength indication when broadcast data, when originating equipment is set to the first forwarding
When preparation send data information, the signal strength that the first forwarding device receives originating equipment is obtained.
Based on the MAC Address of the first forwarding device, the particular geographic location information of the first forwarding device can determine, then
The signal strength indication of the first forwarding device is sent data to further according to originating equipment, it will be able to accurately calculate originating equipment
Location information.
As shown in figure 5, one of embodiment with positioning is sent for radio equipment data, as shown, setting when originating
When standby F will send data to target device A and need to position originating equipment F, forwarding device E, E1 in environment are received
The data that originating equipment F is sent, since forwarding device E and E1 are the forwarding devices of first reception originating equipment F, will
The facility information of forwarding device E is added in data, or the facility information of forwarding device E1 is added in data, by environment
Other forwarding devices, such as forwarding device G, forwarding device D etc., send data to target device A, target device A docking
The data received are parsed, and can be derived that distance and forwarding device E1 distance of the forwarding device E apart from originating equipment F are originated and set
Then the distance of standby F specifically obtains the position letter of originating equipment D further according to the facility information of forwarding device E1 and forwarding device E
Breath.
As shown in Fig. 6, Fig. 7 and Fig. 8, the other embodiments with positioning, principle and Fig. 5 institute are sent for radio equipment data
The principle for the embodiment shown is identical, and details are not described herein.
If function described in the present embodiment method is realized in the form of SFU software functional unit and as independent product pin
It sells or in use, can store in a storage medium readable by a compute device.Based on this understanding, the embodiment of the present invention
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, this is soft
Part product is stored in a storage medium, including some instructions are used so that calculating equipment (it can be personal computer,
Server, mobile computing device or network equipment etc.) execute all or part of step of each embodiment the method for the present invention
Suddenly.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), deposits at random
The various media that can store program code such as access to memory (RAM, Random Access Memory), magnetic or disk.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other
The difference of embodiment, same or similar part may refer to each other between each embodiment.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.