CN108777840B - BLE-based position monitoring method and terminal - Google Patents

BLE-based position monitoring method and terminal Download PDF

Info

Publication number
CN108777840B
CN108777840B CN201810538993.6A CN201810538993A CN108777840B CN 108777840 B CN108777840 B CN 108777840B CN 201810538993 A CN201810538993 A CN 201810538993A CN 108777840 B CN108777840 B CN 108777840B
Authority
CN
China
Prior art keywords
terminal
signal strength
packet
information packet
nth
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
CN201810538993.6A
Other languages
Chinese (zh)
Other versions
CN108777840A (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.)
Shenzhen Waterward Information Co Ltd
Original Assignee
Shenzhen Water World 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 Shenzhen Water World Co Ltd filed Critical Shenzhen Water World Co Ltd
Priority to CN201810538993.6A priority Critical patent/CN108777840B/en
Publication of CN108777840A publication Critical patent/CN108777840A/en
Application granted granted Critical
Publication of CN108777840B publication Critical patent/CN108777840B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • G08B21/24Reminder alarms, e.g. anti-loss alarms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/04Terminal devices adapted for relaying to or from another terminal or user

Abstract

The invention provides a position monitoring method and a terminal based on BLE, wherein the method comprises the following steps: a first terminal acquires a second information packet and second signal strength in a specified time interval, wherein the second information packet comprises a state code and a signal strength indicating value of each terminal in a group; generating a first information packet according to the second information packet and the second signal strength, wherein the first information packet comprises a state code and a signal strength indicating value of each terminal in the group; and broadcasting the first information packet. Based on the existing BLE technology, the invention provides a method for preventing loss and monitoring the position of multiple terminals, so that multiple terminal devices realize relaying, and the service distance and the application range of the BLE terminal are expanded.

Description

BLE-based position monitoring method and terminal
Technical Field
The invention relates to the technical field of low-power consumption Bluetooth, in particular to a position monitoring method and a terminal based on BLE.
Background
At present, the existing Bluetooth anti-lost device works within the range of Bluetooth signals, judges the distance between the other side and keeps communication through Bluetooth or other signals, and once the effective communication distance or the set distance is exceeded, the master module and the slave module can give an alarm. After the maximum warning distance is exceeded, the anti-lost device cannot reposition the protected person. The farthest effective working distance of the existing warning system does not exceed 50 meters.
Disclosure of Invention
The invention mainly aims to provide a BLE-based position monitoring method and a BLE-based position monitoring terminal, which can enlarge the monitoring range of a Bluetooth terminal.
The invention provides a position monitoring method based on BLE, which comprises the following steps:
a first terminal acquires a second information packet and second signal strength in a specified time interval, wherein the second information packet comprises a state code and a signal strength indicating value of each terminal in a group;
generating a first information packet according to the second information packet and the second signal strength, wherein the first information packet comprises a state code and a signal strength indicating value of each terminal in the group;
and broadcasting the first information packet.
Preferably, the generating the first packet according to the second packet and the second signal strength includes:
s21, initializing a first packet, where the first packet includes a status code and a signal strength indication value of each terminal, the status code of the first terminal is 1, and the signal strength value is a maximum value;
s22, judging whether the state code of the Nth terminal except the first terminal in the second information packet is zero or not;
s23, if not, setting the status code of the Nth terminal as the status code of the Nth terminal in the first information packet after adding one, and simultaneously setting the signal intensity indicated value of the Nth terminal except the second terminal as the signal intensity indicated value of the Nth terminal in the first information packet;
s24, updating the signal strength indicated value of the Nth terminal in the first information packet according to the second signal strength;
and S25, repeating S22 and S23 until the updating of the state codes and the signal strength indication values of all the terminals in the group is completed.
Preferably, after the determining whether the status code of the nth terminal except the first terminal in the second information packet is zero, the method further includes:
if yes, the state code and signal strength indicating value of the Nth terminal in the first information packet are kept unchanged.
Preferably, after step S25, the method further includes:
s31, acquiring a third information packet and a third signal strength, wherein the third information packet comprises a state code and a signal strength indicating value of each terminal in the group;
s32, judging whether the state code of the Nth terminal in the third information packet is zero or not;
s33, if not, judging whether the state code of the Nth terminal in the third information packet is smaller than the state code of the Nth terminal in the current first information packet;
s34, if yes, setting the status code of the nth terminal in the third packet after adding one to the status code of the nth terminal in the first packet, and meanwhile setting the signal strength indicating value of the nth terminal except the third terminal to the signal strength indicating value of the nth terminal in the first packet;
s35, updating the signal strength indicating value of the third terminal in the first information packet according to the third signal strength;
and S36, repeating S32, S33 and S34 until the updating of the state codes and the signal strength indication values of all the terminals in the group is completed.
In another aspect of the present invention, a BLE-based location monitoring method is further provided, including:
the intelligent terminal acquires a first information packet obtained by any one BLE-based position monitoring method;
and analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet.
In another aspect of the present invention, a BLE-based location monitoring terminal is further provided, including:
an obtaining module, configured to obtain a second information packet and a second signal strength in a specified time interval, where the second information packet includes a status code and a signal strength indication value of each terminal in a group;
a generating module, configured to generate a first information packet according to the second information packet and the second signal strength, where the first information packet includes a status code and a signal strength indicating value of each terminal in the group;
and the broadcasting module is used for broadcasting the first information packet.
Preferably, the generating module comprises:
the device comprises an initialization unit, a signal strength indicating unit and a control unit, wherein the initialization unit is used for initializing a first information packet, the first information packet comprises a state code and a signal strength indicating value of each terminal, the state code of the first terminal is 1, and the signal strength value is the maximum value;
a first judging unit, configured to judge whether a status code of an nth terminal, excluding the first terminal, in the second packet is zero;
a first processing unit, configured to add one to the status code of the nth terminal and set the added status code as a status code of the nth terminal in the first packet if the status code of the nth terminal is not the status code of the nth terminal, and set a signal strength indicating value of the nth terminal except the second terminal as a signal strength indicating value of the nth terminal in the first packet;
the second processing unit is used for updating a signal strength indicated value of an Nth terminal in the first information packet according to the second signal strength;
and the third processing unit is used for repeating the first judging unit and the first processing unit until the updating of the state codes and the signal strength indicating values of all the terminals in the group is completed.
Preferably, the generating module further comprises:
and a first invariance unit, configured to, if yes, keep the state code and the signal strength indication value of the nth terminal in the first packet unchanged.
Preferably, the generating module further comprises:
a second obtaining unit, configured to obtain a third information packet and a third signal strength, where the third information packet includes a status code and a signal strength indication value of each terminal in the group;
a second judging unit, configured to judge whether a status code of an nth terminal in the third packet is zero;
a third determining unit, configured to determine whether a status code of an nth terminal in the third packet is smaller than a status code of an nth terminal in the current first packet if the status code of the nth terminal in the third packet is not smaller than the status code of the nth terminal in the current first packet;
a fourth processing unit, configured to add one to the status code of the nth terminal in the third packet to set the status code of the nth terminal in the first packet, and set a signal strength indicating value of the nth terminal except the third terminal as a signal strength indicating value of the nth terminal in the first packet if the status code of the nth terminal in the third packet is positive;
a fifth processing unit, configured to update a signal strength indicating value of a third terminal in the first packet according to the third signal strength;
and the sixth processing unit is used for repeatedly executing the second judging unit, the third judging unit and the fourth processing unit until the updating of the state codes and the signal strength indicating values of all the terminals in the group is completed.
In another aspect of the present invention, an intelligent terminal is further provided, including:
an obtaining signal module, configured to obtain a first information packet obtained by the BLE-based location monitoring terminal according to any one of the above descriptions;
and the analysis module is used for analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet.
The invention provides a position monitoring method and device based on BLE, and the method comprises the following steps: a first terminal acquires a second information packet and second signal strength in a specified time interval, wherein the second information packet comprises a state code and a signal strength indicating value of each terminal in a group; generating a first information packet according to the second information packet and the second signal strength, wherein the first information packet comprises a state code and a signal strength indicating value of each terminal in the group; and broadcasting the first information packet. Based on the existing BLE technology, the invention provides a method for preventing loss and monitoring the position of multiple terminals, so that multiple terminal devices realize relaying, and the service distance and the application range of the BLE terminal are expanded.
Drawings
Figure 1 is a schematic flow chart of a BLE-based location monitoring method according to an embodiment of the present invention;
figure 2 is a schematic flow chart of a BLE-based location monitoring method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a smart phone connected with a plurality of bluetooth terminals;
fig. 4 is a schematic diagram of the location of each terminal displayed on the smartphone;
figure 5 is a schematic structural diagram of a BLE-based location monitoring terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an embodiment of an intelligent terminal according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, an embodiment of the present invention provides a BLE-based location monitoring method, including:
s10, the first terminal obtains a second information packet and a second signal strength in a designated time interval, wherein the second information packet comprises a state code and a signal strength indicating value of each terminal in the group;
s20, generating a first information packet according to the second information packet and the second signal strength, wherein the first information packet comprises the state code and the signal strength indicating value of each terminal in the group;
and S30, broadcasting the first information packet.
The first terminal can be intelligent bracelet, intelligent wrist-watch or other intelligent wearing equipment that has BLE connection function. BLE (Bluetooth Low Energy) refers to Low Energy Bluetooth, and is a Low-cost, short-range, interoperable, robust wireless technology. The second signal packet is transmitted by the second terminal and received by the first terminal. The second signal strength is the strength of the second signal packet received by the first terminal and can be directly measured by the receiving circuit. The first terminal and the second terminal belong to the same group. The first packet is of the same type as the received second packet. The first terminal may receive the information packet sent by the other terminal, and may send out the first information packet itself.
In one embodiment, the packets may be stored as follows.
TABLE 1 data storage content of packets
Head Group identification code 1-2 terminal status 59-60 terminal state
0xF2 0x23
Referring to table 1, the packet supports a maximum of 60 terminals, including a header (Head), a group identification code, and a state of each terminal.
The status information of each terminal includes a status code and a signal strength indication value. The state code is used for indicating the relay count of the terminal, 1 is added once per relay, and the maximum is 3; and when the status code is 0, the terminal equipment does not exist. The devices are classified into different signal strength indication values according to received signal strength. For example, it can be defined that when the signal strength indication value is 3, the signal strength is 0 to-50 db; when the signal intensity indicated value is 2, the signal intensity is-51 to-65 db; when the signal intensity indicated value is 1, the signal intensity is-66 to-80 db; the signal strength is less than-80 db when the signal strength indicator value is 0.
TABLE 2 storage contents of terminal 1-2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
1 0 1 0 1 0 1 0
Referring to table 2, table 2 is a storage content of the terminal 1-2. In table 2, bit7 and bit6 are used to record the signal strength indication value of the 2 nd terminal, and bit5 and bit4 are used to record the status code of the 2 nd terminal; bit3, bit2 are used to record the signal strength indication value of the 1 st terminal, bit1, bit0 are used to record the state code of the 1 st terminal.
Before the intelligent terminal is used, all terminals and the intelligent terminal establish a group, and then basic parameters are initialized through APP on the intelligent terminal. The basic parameters include: group identification code, terminal number, broadcast interval time, scanning interval time. The intelligent terminal can be a smart phone, a tablet computer or other intelligent equipment and needs to have a BLE connection function. The first terminal and the second terminal in the same group can be smart bracelets, smart watches or other smart wearable devices with BlE functions.
In step S10, the first terminal scans the peripheral BLE devices at the set scanning interval time, and detects a second packet and a second signal strength of a second terminal in the same group. The second terminal herein refers to any one of the terminals in the same group within the range that the first terminal can detect, and does not refer to a specific one. When the number of packets is 1, it is described that 1 identical group of terminals exists near the first terminal. The number of packets may be one or more.
In step S20, the first terminal updates the information of the acquired second packet to the first packet that the first terminal is ready to send out. For example, when the first terminal scans the second terminal, and the second terminal scans the first terminal and the fifth terminal, the first terminal receives the second packet, which includes the status information of the first terminal and also includes the status information of the fifth terminal. In the first packet, since the first terminal directly scans the second terminal, the status code of the second terminal is 2, which indicates that the signal of the second terminal is relayed by the first terminal, and the status code of the fifth terminal is 3, which indicates that the signal of the fifth terminal is relayed by the second terminal and the first terminal, respectively. In the first packet, a signal strength indication value of the fifth terminal has been recorded in the packet of the second terminal, and the signal strength indication value of the second terminal is determined by the second signal strength.
In step S30, the first terminal broadcasts the first packet. The first information packet may be received by other terminals, such as the second terminal, and may also be received by the intelligent terminal. If the first information packet is acquired by the intelligent terminal and the intelligent terminal only acquires the first information packet, the intelligent terminal determines the distribution and the distance of each terminal according to the content of the received first information packet. And if the intelligent terminal acquires a plurality of information packets, synthesizing the content of each information packet, and determining the distribution and distance of each terminal. If some terminals can not obtain the state information, a prompt is sent out to realize the anti-lost function.
Optionally, step S20 includes:
s21, initializing a first packet, where the first packet includes a status code and a signal strength indication value of each terminal, the status code of the first terminal is 1, and the signal strength value is a maximum value;
s22, judging whether the state code of the Nth terminal except the first terminal in the second information packet is zero or not;
s23, if not, setting the status code of the Nth terminal as the status code of the Nth terminal in the first information packet after adding one, and simultaneously setting the signal intensity indicated value of the Nth terminal except the second terminal as the signal intensity indicated value of the Nth terminal in the first information packet;
s24, updating the signal strength indicated value of the Nth terminal in the first information packet according to the second signal strength;
and S25, repeating S22 and S23 until the updating of the state codes and the signal strength indication values of all the terminals in the group is completed.
This embodiment is about how to generate the first packet. The first packet is initialized first, the own status code is set to 1, the signal strength indicated value is set to 3, and the status codes and the signal strength indicated values of other terminals are both set to 0. And then updating the initialized first information packet according to the second information packet. The second information packet includes status information of a plurality of terminals, and the status information includes two parameters, namely a status code and a signal strength indication value. For example, a status code may be set to indicate the relay count of the terminal, which is incremented by 1 every time a relay is performed, and is maximum 3; when the status code is 0, it indicates that the terminal does not exist. If the status code of the Nth terminal is not 0, the Nth terminal exists. The second packet is sent by the second terminal, and the terminal with the status code of 1 in the packet only has the second terminal. Similarly, in the first packet, the terminal having the status code 1 is only the first terminal, and the status code of the second terminal is changed to 2. In the updating process of the first information packet, a terminal with a state code not being 0 in the second information packet is found out, the value of the state code is added with 1 to be set as the state code in the first information packet, but the maximum value is not more than 3, and the information intensity indicated value is the same as that of the second information packet. The signal strength indicator value of the second terminal in the first packet will be determined by the second signal strength and not the signal strength indicator value in the second packet.
Optionally, after determining whether the status code of the nth terminal except the first terminal in the second information packet is zero, the method further includes:
if yes, the state code and signal strength indicating value of the Nth terminal in the first information packet are kept unchanged.
In this embodiment, if the status code of the nth terminal is 0, it indicates that the terminal is not scanned, and the status information remains unchanged. At this time, the status code and the signal strength of the terminal are both 0 and remain unchanged. For example, if the 60 th terminal is not scanned all the way, the status information of the 60 th terminal is also 0.
Optionally, after step S25, the method further includes:
s31, acquiring a third information packet and a third signal strength, wherein the third information packet comprises a state code and a signal strength indicating value of each terminal in the group;
s32, judging whether the state code of the Nth terminal in the third information packet is zero or not;
s33, if not, judging whether the state code of the Nth terminal in the third information packet is smaller than the state code of the Nth terminal in the current first information packet;
s34, if yes, setting the status code of the nth terminal in the third packet after adding one to the status code of the nth terminal in the first packet, and meanwhile setting the signal strength indicating value of the nth terminal except the third terminal to the signal strength indicating value of the nth terminal in the first packet;
s35, updating the signal strength indicating value of the third terminal in the first information packet according to the third signal strength;
and S36, repeating S32, S33 and S34 until the updating of the state codes and the signal strength indication values of all the terminals in the group is completed.
In this embodiment, the first terminal receives more than one packet within a specified time interval. The first terminal will update the first packet based on all packets. For example, the first terminal receives the second packet and the third packet, and the second terminal scans the first terminal and the third terminal. The status code of the third terminal is 2 in the packet of the second terminal and 1 in the packet of the third terminal; in the second packet, the status code of the second terminal is 1, and in the third packet, the status code of the second terminal is 2. The first terminal updates the state information of the third terminal according to the third information packet and the third information intensity; the first terminal updates the state information of the second terminal according to the second information packet and the second information intensity.
The invention provides a position monitoring method based on BLE, which comprises the following steps: a first terminal acquires a second information packet and second signal strength in a specified time interval, wherein the second information packet comprises a state code and a signal strength indicating value of each terminal in a group; generating a first information packet according to the second information packet and the second signal strength, wherein the first information packet comprises a state code and a signal strength indicating value of each terminal in the group; and broadcasting the first information packet. Based on the existing BLE technology, the invention provides a method for preventing loss and monitoring the position of multiple terminals, so that multiple terminal devices realize relaying, and the service distance and the application range of the BLE terminal are expanded.
Referring to fig. 2, an embodiment of the present invention further provides a BLE-based location monitoring method, including:
s100, the intelligent terminal acquires a first information packet obtained according to the BLE-based position monitoring method;
s200, analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet.
In this embodiment, the BLE-based location monitoring method may refer to the above embodiments, and is not described herein again.
In step S100, the intelligent terminal obtains a first information packet broadcasted by the first terminal. Here, the first packet is used to refer to a packet sent by a terminal in the group and directly received by the intelligent terminal. The first packet may be one or more.
In step S200, the intelligent terminal determines the state information of each terminal according to the received first information packet, and then analyzes the relative position of each terminal according to the state information of each terminal. The relative position of each terminal can be displayed on the intelligent terminal.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a smart phone connected to a plurality of bluetooth terminals. The information packets broadcast by the terminals 1, 2, 3 and 4 are directly received by the smart phone. While terminal 2 receives the packet from terminal 5 and terminal 6 receives the packet from terminal 5. The information packet of each terminal is as follows:
table 3 information packet for terminal 6
Figure BDA0001678847210000091
Table 4 information packet of terminal 5
Figure BDA0001678847210000092
Table 5 information packet for terminal 2
Figure BDA0001678847210000093
Table 6 information packet of terminal 1
Figure BDA0001678847210000094
Table 7 information packet of terminal 3
Figure BDA0001678847210000095
Table 8 information packet of terminal 4
Figure BDA0001678847210000096
Table 9 information packet displayed by smart phone
Figure BDA0001678847210000101
In an application scene, a teacher takes 6 students out to participate in activities. The smart phone is held by a teacher with a band team, and the terminals 1-6 are respectively held by students' A, B, P, E, F, E, and E. Referring to fig. 4, fig. 4 is a schematic diagram of the positions of the terminals displayed on the smart phone. The smartphone displays the positions of the terminals shown in fig. 4 on the screen according to the detected information packet shown in table 9, so that the teacher can know the positions of the students, and the students can be prevented from missing or the gathering time can be shortened.
The invention provides a position monitoring method based on BLE, which comprises the following steps: the method comprises the steps that an intelligent terminal obtains a first information packet obtained according to the BLE-based position monitoring method; and analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet. Based on the existing BLE technology, the invention provides a method for preventing loss and monitoring the position of multiple terminals, so that multiple terminal devices realize relaying, and the service distance and the application range of the BLE terminal are expanded.
Referring to fig. 5, an embodiment of the present invention further provides a BLE-based location monitoring terminal, including:
an obtaining module 10, configured to obtain a second information packet and a second signal strength in a specified time interval, where the second information packet includes a status code and a signal strength indicating value of each terminal in a group;
a generating module 20, configured to generate a first information packet according to the second information packet and the second signal strength, where the first information packet includes a status code and a signal strength indicating value of each terminal in the group;
a broadcasting module 30, configured to broadcast the first information packet.
The first terminal can be intelligent bracelet, intelligent wrist-watch or other intelligent wearing equipment that has BLE connection function. BLE refers to low power consumption bluetooth, which is a low cost, short range, interoperable, robust wireless technology. The second signal packet is transmitted by the second terminal and received by the first terminal. The second signal strength is the strength of the second signal packet received by the first terminal and can be directly measured by the receiving circuit. The first terminal and the second terminal belong to the same group. The first packet is of the same type as the received second packet. The first terminal may receive the information packet sent by the other terminal, and may send out the first information packet itself.
In one embodiment, the packets may be stored as follows.
TABLE 1 data storage content of packets
Head Group identification code 1-2 terminal status 1-2 terminal status
0xF2 0x23
Referring to table 1, the packet supports a maximum of 60 terminals including a Head, a group identifier, and a state of each terminal.
The status information of each terminal includes a status code and a signal strength indication value. The state code is used for indicating the relay count of the terminal, 1 is added once per relay, and the maximum is 3; and when the status code is 0, the terminal equipment does not exist. The devices are classified into different signal strength indication values according to received signal strength. For example, it can be defined that when the signal strength indication value is 3, the signal strength is 0 to-50 db; when the signal intensity indicated value is 2, the signal intensity is-51 to-65 db; when the signal intensity indicated value is 1, the signal intensity is-66 to-80 db; the signal strength is less than-80 db when the signal strength indicator value is 0.
TABLE 2 storage contents of terminal 1-2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
1 0 1 0 1 0 1 0
Referring to table 2, table 2 is a storage content of the terminal 1-2. In table 2, bit7 and bit6 are used to record the signal strength indication value of the 2 nd terminal, and bit5 and bit4 are used to record the status code of the 2 nd terminal; bit3, bit2 are used to record the signal strength indication value of the 1 st terminal, bit1, bit0 are used to record the state code of the 1 st terminal.
Before the intelligent terminal is used, all terminals and the intelligent terminal establish a group, and then basic parameters are initialized through APP on the intelligent terminal. The basic parameters include: group identification code, terminal number, broadcast interval time, scanning interval time. The intelligent terminal can be a smart phone, a tablet computer or other intelligent equipment and needs to have a BLE connection function.
In the obtaining module 10, the first terminal scans the peripheral BLE devices according to the set scanning interval time, and detects a second packet and a second signal strength of the second terminals in the same group. The second terminal herein refers to any one of the terminals in the same group within the range that the first terminal can detect, and does not refer to a specific one. When the number of packets is 1, it is described that 1 identical group of terminals exists near the first terminal. The number of packets may be one or more.
In the generating module 20, the first terminal updates the information of the acquired second packet into the first packet prepared to be sent by the first terminal. For example, when the first terminal scans the second terminal, and the second terminal scans the first terminal and the fifth terminal, the first terminal receives the second packet, which includes the status information of the first terminal and also includes the status information of the fifth terminal. In the first packet, since the first terminal directly scans the second terminal, the status code of the second terminal is 2, which indicates that the signal of the second terminal is relayed by the first terminal, and the status code of the fifth terminal is 3, which indicates that the signal of the fifth terminal is relayed by the second terminal and the first terminal, respectively. In the first packet, a signal strength indication value of the fifth terminal has been recorded in the packet of the second terminal, and the signal strength indication value of the second terminal is determined by the second signal strength.
In the broadcast module 30, the first terminal broadcasts the first packet. The first packet may be received by other terminals, such as the 2 nd terminal, and may also be received by the intelligent terminal. If the first information packet is acquired by the intelligent terminal and the intelligent terminal only acquires the first information packet, the intelligent terminal determines the distribution and the distance of each terminal according to the content of the received first information packet. And if the intelligent terminal acquires a plurality of information packets, synthesizing the content of each information packet, and determining the distribution and distance of each terminal. If some terminals can not obtain the state information, a prompt is sent out to realize the anti-lost function.
Optionally, the generating module 20 includes:
the device comprises an initialization unit, a signal strength indicating unit and a control unit, wherein the initialization unit is used for initializing a first information packet, the first information packet comprises a state code and a signal strength indicating value of each terminal, the state code of the first terminal is 1, and the signal strength value is the maximum value;
a first judging unit, configured to judge whether a status code of an nth terminal, excluding the first terminal, in the second packet is zero;
a first processing unit, configured to add one to the status code of the nth terminal and set the added status code as a status code of the nth terminal in the first packet if the status code of the nth terminal is not the status code of the nth terminal, and set a signal strength indicating value of the nth terminal except the second terminal as a signal strength indicating value of the nth terminal in the first packet;
the second processing unit is used for updating a signal strength indicated value of an Nth terminal in the first information packet according to the second signal strength;
and the third processing unit is used for repeating the first judging unit and the first processing unit until the updating of the state codes and the signal strength indicating values of all the terminals in the group is completed.
This embodiment is about how to generate the first packet. The first packet is initialized first, the own status code is set to 1, the signal strength indicated value is set to 3, and the status codes and the signal strength indicated values of other terminals are both set to 0. And then updating the initialized first information packet according to the second information packet. The second information packet includes status information of a plurality of terminals, and the status information includes two parameters, namely a status code and a signal strength indication value. For example, a status code may be set to indicate the relay count of the terminal, which is incremented by 1 every time a relay is performed, and is maximum 3; when the status code is 0, it indicates that the terminal does not exist. If the status code of the Nth terminal is not 0, the Nth terminal exists. The second packet is sent by the second terminal, and the terminal with the status code of 1 in the packet only has the second terminal. Similarly, in the first packet, the terminal having the status code 1 is only the first terminal, and the status code of the second terminal is changed to 2. In the updating process of the first information packet, a terminal with a state code not being 0 in the second information packet is found out, the value of the state code is added with 1 to be set as the state code in the first information packet, but the maximum value is not more than 3, and the information intensity indicated value is the same as that of the second information packet. The signal strength indicator value of the second terminal in the first packet will be determined by the second signal strength and not the signal strength indicator value in the second packet.
Optionally, the generating module 20 further includes:
and a first invariance unit, configured to, if yes, keep the state code and the signal strength indication value of the nth terminal in the first packet unchanged.
In this embodiment, if the status code of the nth terminal is 0, it indicates that the terminal is not scanned, and the status information remains unchanged. At this time, the status code and the signal strength of the terminal are both 0 and remain unchanged. If the 60 th terminal is not scanned all the way, the status information of the 60 th terminal is also 0.
Optionally, the processing module 20 further includes:
a second obtaining unit, configured to obtain a third information packet and a third signal strength, where the third information packet includes a status code and a signal strength indication value of each terminal in the group;
a second judging unit, configured to judge whether a status code of an nth terminal in the third packet is zero;
a third determining unit, configured to determine whether a status code of an nth terminal in the third packet is smaller than a status code of an nth terminal in the current first packet if the status code of the nth terminal in the third packet is not smaller than the status code of the nth terminal in the current first packet;
a fourth processing unit, configured to add one to the status code of the nth terminal in the third packet to set the status code of the nth terminal in the first packet, and set a signal strength indicating value of the nth terminal except the third terminal as a signal strength indicating value of the nth terminal in the first packet if the status code of the nth terminal in the third packet is positive;
a fifth processing unit, configured to update a signal strength indicating value of a third terminal in the first packet according to the third signal strength;
and the sixth processing unit is used for repeatedly executing the second judging unit, the third judging unit and the fourth processing unit until the updating of the state codes and the signal strength indicating values of all the terminals in the group is completed.
In this embodiment, the first terminal receives more than one packet within a specified time interval. The first terminal will update the first packet based on all packets. For example, the first terminal receives the second packet and the third packet, and the second terminal scans the first terminal and the third terminal. The status code of the third terminal is 2 in the packet of the second terminal and 1 in the packet of the third terminal; in the second packet, the status code of the second terminal is 1, and in the third packet, the status code of the second terminal is 2. The first terminal updates the state information of the third terminal according to the third information packet and the third information intensity; the first terminal updates the state information of the second terminal according to the second information packet and the second information intensity.
The invention provides a BLE-based position monitoring terminal, which comprises: an obtaining module, configured to obtain a second information packet and a second signal strength in a specified time interval, where the second information packet includes a status code and a signal strength indication value of each terminal in a group; a generating module, configured to generate a first information packet according to the second information packet and the second signal strength, where the first information packet includes a status code and a signal strength indicating value of each terminal in the group; and the broadcasting module is used for broadcasting the first information packet. Based on the existing BLE technology, the invention provides a method for preventing loss and monitoring the position of multiple terminals, so that multiple terminal devices realize relaying, and the service distance and the application range of the BLE terminal are expanded.
Referring to fig. 6, an embodiment of the present invention further provides an intelligent terminal, including:
an obtaining signal module 100, configured to obtain a first information packet obtained by the BLE-based location monitoring terminal;
and an analysis module 200, configured to analyze the relative position of each terminal according to the status code and the signal strength indication value in the first information packet.
In the signal obtaining module 100, the intelligent terminal obtains a first information packet broadcasted by the first terminal. Here, the first packet is used to refer to a packet sent by a terminal in the group and directly received by the intelligent terminal. The first packet may be one or more.
In the parsing module 200, the intelligent terminal determines the state information of each terminal according to the received first information packet, and then parses the relative position of each terminal according to the state information of each terminal. The relative position of each terminal can be displayed on the intelligent terminal.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a smart phone connected to a plurality of bluetooth terminals. The information packets broadcast by the terminals 1, 2, 3 and 4 are directly received by the smart phone. While terminal 2 receives the packet from terminal 5 and terminal 6 receives the packet from terminal 5. The information packet of each terminal is as follows:
table 3 information packet for terminal 6
Figure BDA0001678847210000141
Table 4 information packet of terminal 5
Figure BDA0001678847210000142
Table 5 information packet for terminal 2
Figure BDA0001678847210000143
Figure BDA0001678847210000151
Table 6 information packet of terminal 1
Figure BDA0001678847210000152
Table 7 information packet of terminal 3
Figure BDA0001678847210000153
Table 8 information packet of terminal 4
Figure BDA0001678847210000154
Table 9 information packet displayed by smart phone
Figure BDA0001678847210000155
In an application scene, a teacher takes 6 students out to participate in activities. The smart phone is held by a teacher with a band team, and the terminals 1-6 are respectively held by students' A, B, P, E, F, E, and E. Referring to fig. 4, fig. 4 is a schematic diagram of the positions of the terminals displayed on the smart phone. The smartphone displays the positions of the terminals shown in fig. 4 on the screen according to the detected information packet shown in table 9, so that the teacher can know the positions of the students, and the students can be prevented from missing or the gathering time can be shortened.
The invention provides an intelligent terminal, which comprises: an obtaining packet module, configured to obtain a first packet obtained by the BLE-based location monitoring terminal; and the display module is used for analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet. Based on the existing BLE technology, the invention provides a method for preventing loss and monitoring the position of multiple terminals, so that multiple terminal devices realize relaying, and the service distance and the application range of the BLE terminal are expanded.
The above description is only an example of the present invention, and is not intended to limit the present invention, and it is obvious to those skilled in the art that various modifications and variations can be made in the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (8)

1. A BLE-based location monitoring method, comprising:
a first terminal acquires a second information packet and second signal strength in a specified time interval, wherein the second information packet comprises a state code and a signal strength indicating value of each terminal in a group;
generating a first information packet according to the second information packet and the second signal strength, wherein the first information packet comprises a state code and a signal strength indicating value of each terminal in the group;
broadcasting the first information packet;
generating a first information packet according to the second information packet and the second signal strength comprises:
s21, initializing a first packet, where the first packet includes a status code and a signal strength indication value of each terminal, the status code of the first terminal is 1, and the signal strength value is a maximum value;
s22, judging whether the state code of the Nth terminal except the first terminal in the second information packet is zero or not;
s23, if not, setting the status code of the Nth terminal as the status code of the Nth terminal in the first information packet after adding one, and simultaneously setting the signal intensity indicated value of the Nth terminal except the second terminal as the signal intensity indicated value of the Nth terminal in the first information packet;
s24, updating the signal strength indicated value of the Nth terminal in the first information packet according to the second signal strength;
and S25, repeating S22 and S23 until the updating of the state codes and the signal strength indication values of all the terminals in the group is completed.
2. The BLE-based location monitoring method according to claim 1, wherein after determining whether the status code of an nth terminal other than the first terminal in the second packet is zero, the method further comprises:
if yes, the state code and signal strength indicating value of the Nth terminal in the first information packet are kept unchanged.
3. The BLE-based location monitoring method according to claim 1, further comprising, after step S25:
s31, acquiring a third information packet and a third signal strength, wherein the third information packet comprises a state code and a signal strength indicating value of each terminal in the group;
s32, judging whether the state code of the Nth terminal in the third information packet is zero or not;
s33, if not, judging whether the state code of the Nth terminal in the third information packet is smaller than the state code of the Nth terminal in the current first information packet;
s34, if yes, setting the status code of the nth terminal in the third packet after adding one to the status code of the nth terminal in the first packet, and meanwhile setting the signal strength indicating value of the nth terminal except the third terminal to the signal strength indicating value of the nth terminal in the first packet;
s35, updating the signal strength indicating value of the third terminal in the first information packet according to the third signal strength;
and S36, repeating S32, S33 and S34 until the updating of the state codes and the signal strength indication values of all the terminals in the group is completed.
4. A BLE-based location monitoring method, comprising:
the intelligent terminal acquires a first information packet obtained by the BLE-based position monitoring method according to any one of claims 1-3;
and analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet.
5. A BLE-based location monitoring terminal, comprising:
an obtaining module, configured to obtain a second information packet and a second signal strength in a specified time interval, where the second information packet includes a status code and a signal strength indication value of each terminal in a group;
a generating module, configured to generate a first information packet according to the second information packet and the second signal strength, where the first information packet includes a status code and a signal strength indicating value of each terminal in the group;
a broadcasting module for broadcasting the first information packet;
the generation module comprises:
the device comprises an initialization unit, a signal strength indicating unit and a control unit, wherein the initialization unit is used for initializing a first information packet, the first information packet comprises a state code and a signal strength indicating value of each terminal, the state code of the first terminal is 1, and the signal strength value is the maximum value;
a first judging unit, configured to judge whether a status code of an nth terminal, excluding the first terminal, in the second packet is zero;
a first processing unit, configured to add one to the status code of the nth terminal and set the added status code as a status code of the nth terminal in the first packet if the status code of the nth terminal is not the status code of the nth terminal, and set a signal strength indicating value of the nth terminal except the second terminal as a signal strength indicating value of the nth terminal in the first packet;
the second processing unit is used for updating a signal strength indicated value of an Nth terminal in the first information packet according to the second signal strength;
and the third processing unit is used for repeating the first judging unit and the first processing unit until the updating of the state codes and the signal strength indicating values of all the terminals in the group is completed.
6. The BLE-based location monitoring terminal of claim 5, wherein the generating module further comprises:
and a first invariance unit, configured to, if yes, keep the state code and the signal strength indication value of the nth terminal in the first packet unchanged.
7. The BLE-based location monitoring terminal of claim 5, wherein the generating module further comprises:
a second obtaining unit, configured to obtain a third information packet and a third signal strength, where the third information packet includes a status code and a signal strength indication value of each terminal in the group;
a second judging unit, configured to judge whether a status code of an nth terminal in the third packet is zero;
a third determining unit, configured to determine whether a status code of an nth terminal in the third packet is smaller than a status code of an nth terminal in the current first packet if the status code of the nth terminal in the third packet is not smaller than the status code of the nth terminal in the current first packet;
a fourth processing unit, configured to add one to the status code of the nth terminal in the third packet to set the status code of the nth terminal in the first packet, and set a signal strength indicating value of the nth terminal except the third terminal as a signal strength indicating value of the nth terminal in the first packet if the status code of the nth terminal in the third packet is positive;
a fifth processing unit, configured to update a signal strength indicating value of a third terminal in the first packet according to the third signal strength;
and the sixth processing unit is used for repeatedly executing the second judging unit, the third judging unit and the fourth processing unit until the updating of the state codes and the signal strength indicating values of all the terminals in the group is completed.
8. An intelligent terminal, comprising:
an obtaining signal module configured to obtain a first information packet obtained by a BLE-based location monitoring terminal according to any one of claims 5-7;
and the analysis module is used for analyzing the relative position of each terminal according to the state code and the signal strength indicated value in the first information packet.
CN201810538993.6A 2018-05-30 2018-05-30 BLE-based position monitoring method and terminal Active CN108777840B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810538993.6A CN108777840B (en) 2018-05-30 2018-05-30 BLE-based position monitoring method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810538993.6A CN108777840B (en) 2018-05-30 2018-05-30 BLE-based position monitoring method and terminal

Publications (2)

Publication Number Publication Date
CN108777840A CN108777840A (en) 2018-11-09
CN108777840B true CN108777840B (en) 2020-10-09

Family

ID=64028222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810538993.6A Active CN108777840B (en) 2018-05-30 2018-05-30 BLE-based position monitoring method and terminal

Country Status (1)

Country Link
CN (1) CN108777840B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796855A (en) * 2014-01-21 2015-07-22 中国移动通信集团江苏有限公司 Positioning method, terminal and system
CN105873023A (en) * 2016-05-09 2016-08-17 深圳市天工测控技术有限公司 Indoor positioning system and method based on BLE mesh networking
CN106412819A (en) * 2015-07-31 2017-02-15 腾讯科技(深圳)有限公司 Method and device for positioning device
CN106714131A (en) * 2015-11-18 2017-05-24 宏碁股份有限公司 Method of searching electronic device and electronic device
US9807570B1 (en) * 2016-06-01 2017-10-31 GM Global Technology Operations LLC Systems and methods for detecting proximity and location of a smartphone or other device to a vehicle
CN107959921A (en) * 2017-11-10 2018-04-24 惠州市德赛西威汽车电子股份有限公司 A kind of positioning via network system and method based on BLE technologies
CN108012251A (en) * 2017-12-07 2018-05-08 北京摩拜科技有限公司 A kind of method, system and mobile terminal for positioning target Bluetooth devices

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104796855A (en) * 2014-01-21 2015-07-22 中国移动通信集团江苏有限公司 Positioning method, terminal and system
CN106412819A (en) * 2015-07-31 2017-02-15 腾讯科技(深圳)有限公司 Method and device for positioning device
CN106714131A (en) * 2015-11-18 2017-05-24 宏碁股份有限公司 Method of searching electronic device and electronic device
CN105873023A (en) * 2016-05-09 2016-08-17 深圳市天工测控技术有限公司 Indoor positioning system and method based on BLE mesh networking
US9807570B1 (en) * 2016-06-01 2017-10-31 GM Global Technology Operations LLC Systems and methods for detecting proximity and location of a smartphone or other device to a vehicle
CN107959921A (en) * 2017-11-10 2018-04-24 惠州市德赛西威汽车电子股份有限公司 A kind of positioning via network system and method based on BLE technologies
CN108012251A (en) * 2017-12-07 2018-05-08 北京摩拜科技有限公司 A kind of method, system and mobile terminal for positioning target Bluetooth devices

Also Published As

Publication number Publication date
CN108777840A (en) 2018-11-09

Similar Documents

Publication Publication Date Title
US9668106B2 (en) Indoor positioning system and method for indoor position
CN105577293B (en) A kind of test method of bluetooth equipment, apparatus and system
EP3098976A1 (en) Acquisition method, beam sending method, communication node, system and storage medium
CA2569020A1 (en) Method for transmitting traffic indication message in wireless communication system, base station thereof, method for receiving the same, terminal thereof and message structure thereof
CN112469070B (en) Auxiliary cell access method, device, terminal equipment and storage medium
RU2012104689A (en) TRANSMISSION OF SYSTEM INFORMATION ON A JOINT USE DOWNLINE CHANNEL
WO2010036885A4 (en) Wireless mesh network with pinch point and low battery alerts
CN102404060B (en) Detecting method and detecting equipment for antenna as well as equipment to be detected
CN105472432B (en) Detect the method and system of user's viewing distance
CN105898542A (en) Display screen brightness adjustment and data transmission method, device and system
CN217213135U (en) Fall detection device based on millimeter wave radar
US9838884B2 (en) Radio wave status indicating apparatus, communication apparatus and computer-readable medium
KR101531396B1 (en) A cognitive radio device for energy harvesting and a method for controlling thereof
CN104780607A (en) Bluetooth wearable device locating method, Bluetooth repeater device and Bluetooth monitor device
CN102236777A (en) Hand-held mobile data acquisition terminal
CN108777840B (en) BLE-based position monitoring method and terminal
US20200033850A1 (en) Method, apparatus, and monitoring device for processing signals of unmanned aerial vehicle
CN214202606U (en) Poisonous and harmful gas monitoring system based on NB-IoT (NB-IoT) Internet of things
TW200726281A (en) Geography-based filtering of broadcasts
CN108769895B (en) Method for realizing positioning based on intelligent grouping and electronic equipment
CN201937832U (en) Detecting device for WIFI (wireless fidelity) connection status
CN201752138U (en) Fault point diagnosing and positioning system for indoor wireless network
US20160021517A1 (en) Terminal apparatus communicating among a plurality of terminal apparatuses within a group, communication system, and communication method
JP2017535185A5 (en)
CN105657824A (en) iBeacon positioning system, and method for using mobile terminal as temporary base station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211008

Address after: 518000 201, No.26, yifenghua Innovation Industrial Park, Xinshi community, Dalang street, Longhua District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen waterward Information Co.,Ltd.

Address before: 518000, block B, huayuancheng digital building, 1079 Nanhai Avenue, Shekou, Nanshan District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN WATER WORLD Co.,Ltd.