WO2018064867A1 - 时长记录方法、蓝牙从设备与时长记录系统 - Google Patents
时长记录方法、蓝牙从设备与时长记录系统 Download PDFInfo
- Publication number
- WO2018064867A1 WO2018064867A1 PCT/CN2016/113606 CN2016113606W WO2018064867A1 WO 2018064867 A1 WO2018064867 A1 WO 2018064867A1 CN 2016113606 W CN2016113606 W CN 2016113606W WO 2018064867 A1 WO2018064867 A1 WO 2018064867A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bluetooth
- slave device
- target
- time
- bluetooth slave
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C1/00—Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people
- G07C1/02—Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people not involving the registering, indicating or recording of other data
Definitions
- the present invention relates to the field of information acquisition and recording, and in particular to a time length recording method, a Bluetooth slave device and a time length recording system.
- the first aspect of the embodiments of the present invention provides a duration recording method, which is performed by a Bluetooth slave device, and the method includes:
- the target Bluetooth device When the target Bluetooth device is searched for in the process of searching for other Bluetooth devices in the vicinity, and the target Bluetooth device is in the leaving state, the current time is acquired as the appearance time t1 of the target Bluetooth device, and the target Bluetooth device is acquired.
- the state is modified to be adjacent;
- the target Bluetooth device When the target Bluetooth device is not searched in the process of searching for other Bluetooth devices in the vicinity, and the target Bluetooth device is in a neighboring state, the current time is acquired as the departure time t2 of the target Bluetooth device, and the The state of the target Bluetooth device is modified to the leaving state;
- the searching for other Bluetooth devices in the neighboring area of the Bluetooth slave device according to the set working mode specifically:
- the packet is such that the Bluetooth slave device is searched by other Bluetooth devices, each broadcast operation lasting for a second predetermined duration.
- the searching for the other Bluetooth devices in the neighboring area of the Bluetooth slave device according to the set working mode specifically:
- the search operation is for searching for other Bluetooth devices in a neighborhood of the Bluetooth slave device, each search operation lasting for a first preset duration;
- the broadcast operation Used to broadcast a data packet to enable the Bluetooth slave device to be searched by other Bluetooth slave devices, each broadcast operation lasting for a second preset duration;
- the search operation is performed again.
- the sending t1 and t2 are sent to the first Bluetooth master device by Bluetooth and forwarded by the first Bluetooth master device to the server, so that the server calculates the Bluetooth slave device and the target according to t1 and t2
- the duration of the Bluetooth device's interaction within a preset time period is recorded as follows:
- t1 and t2 Transmitting t1 and t2 to the first Bluetooth master via Bluetooth and forwarding to the server by the first Bluetooth master, such that the server is based on an earlier between t1 and t3, and an earlier between t2 and t4 Calculating and recording the duration of the Bluetooth slave device and the target Bluetooth device within a preset time period; wherein the target Bluetooth device is another Bluetooth slave that is functionally identical to the Bluetooth slave device a device; t3 is an appearance time of the Bluetooth slave device acquired by the target Bluetooth device, t4 is a departure time of the Bluetooth slave device acquired by the target Bluetooth device, and t3 and t4 are passed by the target Bluetooth device Bluetooth is sent to the second Bluetooth master and forwarded to the server.
- the Bluetooth slave device and the target Bluetooth device are smart bracelets; the first Bluetooth master device and the second Bluetooth master device are mobile communication terminals.
- a first aspect of the embodiments of the present invention provides a Bluetooth slave device, including:
- a Bluetooth working module configured to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device according to the set working mode
- an occurrence time obtaining module configured to: when searching for the target Bluetooth device in the process of searching for other Bluetooth devices in the surrounding area, and acquiring the current time as the appearance time t1 of the target Bluetooth device, when the target Bluetooth device is in the leaving state, And modifying the state of the target Bluetooth device to a neighboring state;
- An exit time acquisition module for not searching for the target blue during searching for other Bluetooth devices around And when the target Bluetooth device is in a neighboring state, acquiring a current time as the leaving time t2 of the target Bluetooth device, and modifying the state of the target Bluetooth device to a leaving state;
- a time data sending module configured to send t1 and t2 to the first Bluetooth master device via Bluetooth and forwarded to the server by the first Bluetooth master device, so that the server calculates the Bluetooth slave device according to t1 and t2
- the duration of the target Bluetooth device's time spent in the preset time period is recorded.
- the Bluetooth working module is specifically configured to: perform a search operation and a broadcast operation alternately; wherein the searching operation is used to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device, and each search operation continues a preset duration; the broadcast operation is for broadcasting a data packet to cause the Bluetooth slave device to be searched by other Bluetooth slave devices, each broadcast operation lasting for a second predetermined duration.
- the Bluetooth working module specifically includes:
- a broadcast operation execution unit configured to perform a broadcast operation after performing a search operation, wherein the search operation is used to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device, and each search operation lasts for the first time Setting a duration; the broadcast operation is for broadcasting a data packet to cause the Bluetooth slave device to be searched by other Bluetooth slave devices, each broadcast operation lasting for a second preset duration;
- a motion state determining unit configured to determine a motion state of the Bluetooth slave device before any one of the broadcasting operations ends
- a broadcast operation secondary execution unit configured to perform the broadcast operation again when it is determined that the Bluetooth slave device is stationary
- a search operation execution unit configured to perform the search operation again when it is determined that the Bluetooth slave device is in motion.
- the time data sending module is specifically configured to: send t1 and t2 to the first Bluetooth master device by using Bluetooth and forward to the server by the first Bluetooth master device, so that the server is configured according to between t1 and t3 An earlier one, and an earlier one between t2 and t4, calculates and records the duration of the Bluetooth slave device and the target Bluetooth device for a preset period of time; wherein the target Bluetooth device is Another Bluetooth slave device in which the Bluetooth slave device is identical in function; t3 is the appearance time of the Bluetooth slave device acquired by the target Bluetooth device, and t4 is the Bluetooth slave device acquired by the target Bluetooth device The departure time, t3 and t4, is transmitted by the target Bluetooth device to the second Bluetooth master via Bluetooth and forwarded to the server.
- the Bluetooth slave device and the target Bluetooth device are smart bracelets; the first Bluetooth master device and the second Bluetooth master device are mobile communication terminals.
- a third aspect of the embodiments of the present invention provides a duration recording system, including the foregoing Bluetooth slave device, a target Bluetooth device of the Bluetooth slave device, a first Bluetooth master device connected to the Bluetooth slave device via Bluetooth, and a server.
- the present invention has the beneficial effects that the present invention provides a duration recording method, a Bluetooth slave device and a duration recording system, and the method is performed by a Bluetooth slave device, including the Bluetooth according to a set working mode. From the device Searching for other Bluetooth devices in the neighborhood; when searching for the target Bluetooth device in the process of searching for other Bluetooth devices around, and the target Bluetooth device is in the leave state, acquiring the current time as the appearance time t1 of the target Bluetooth device, And modifying the state of the target Bluetooth device to a neighboring state; when the target Bluetooth device is not searched in the process of searching for other Bluetooth devices around, and the target Bluetooth device is in a neighboring state, acquiring the current time as Departing time t2 of the target Bluetooth device, and modifying the state of the target Bluetooth device to a leaving state; sending t1 and t2 to the first Bluetooth master device via Bluetooth and forwarding to the server by the first Bluetooth master device, And causing the server to calculate and record the duration of the Bluetooth slave device and the target Bluetooth device within
- the Bluetooth slave device automatically acquires the appearance time and the departure time of the target Bluetooth device, without the user's manual operation, and even the user does not perceive the recording of the information, thereby greatly improving the convenience of the recording duration. And since the appearance time and the departure time of the target Bluetooth device are automatically acquired, the final calculated correlation time is also accurate enough.
- FIG. 1 is a schematic flowchart of a duration recording method according to an embodiment of the present invention.
- FIG. 2 is a structural block diagram of a Bluetooth slave device according to an embodiment of the present invention.
- FIG. 1 is a schematic flowchart diagram of a duration recording method according to an embodiment of the present invention.
- the duration recording method is performed by a Bluetooth slave device, including:
- the preset time period may be 1 day.
- Bluetooth technology is a very mature communication technology, and Bluetooth devices include Bluetooth master devices and Bluetooth slave devices.
- the Bluetooth master device generally searches for the surrounding Bluetooth slave device and sends a link request to the specified Bluetooth slave device; the Bluetooth slave device listens for the link request sent by the surrounding Bluetooth master device.
- the Bluetooth master device is a mobile phone, and the Bluetooth slave device is a smart wristband. After the two are connected, the smart bracelet transmits the collected information to the mobile phone through Bluetooth; or, the Bluetooth master device is a mobile phone, and the Bluetooth slave device is a Bluetooth headset. After the two are connected, the mobile phone sends the audio signal to the Bluetooth headset for playback via Bluetooth. Therefore, in the prior art, the Bluetooth slave device is generally discovered by the Bluetooth master device and then the two interact, while the Bluetooth slave device does not discover other Bluetooth master devices or other Bluetooth slave devices.
- the Bluetooth master device (such as a mobile phone) is generally The search is performed only when the Bluetooth slave device is connected. Therefore, the Bluetooth master device is not suitable for applying to the present invention to obtain the appearance time and the departure time of the target Bluetooth device. Conversely, Bluetooth slaves can do this. Since the Bluetooth slave device is generally a portable device, such as a smart bracelet, a smart ring, a smart earring, etc., the embodiment of the present invention utilizes this feature of the Bluetooth slave device to set the Bluetooth slave device to be set according to the setting.
- the working mode searches for other Bluetooth devices in the neighboring area of the Bluetooth slave device, and acquires the appearance time and the departure time of the target Bluetooth device to be sent to the server by the first Bluetooth master device, so that the server calculates the Bluetooth slave device and the target Bluetooth device.
- the length of time between devices is recorded and recorded.
- An implementation of the step S1 is specifically: performing a search operation and a broadcast operation alternately; wherein the searching operation is used to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device, and each search operation continues for the first time.
- the preset duration; the broadcast operation is for broadcasting a data packet to cause the Bluetooth slave device to be searched by other Bluetooth devices, each broadcast operation lasting for a second preset duration.
- the reason why the search operation and the broadcast operation are performed alternately is to be able to be searched by other Bluetooth devices (including the Bluetooth master device and other Bluetooth slave devices) when the Bluetooth slave device searches for the target Bluetooth device.
- step S1 specifically includes:
- the search operation is for searching for other Bluetooth devices in a neighborhood of the Bluetooth slave device, each search operation lasting for a first preset duration;
- the broadcast operation Used to broadcast a data packet to enable the Bluetooth slave device to be searched by other Bluetooth slave devices, each broadcast operation lasting for a second preset duration;
- the search operation is performed again.
- the Bluetooth slave device Since the power consumption of the search operation is far greater than the power consumption of the broadcast operation, according to another embodiment of the step S1, if the Bluetooth slave device is in a stationary state, for example, the Bluetooth slave device stays in a place, the The Bluetooth slave device is always performing the broadcast operation without performing a search operation, thereby greatly reducing the power consumption of the Bluetooth slave device.
- the Bluetooth slave device performs a search operation again, the time of occurrence or departure time of the target Bluetooth device is obtained.
- the first preset duration is 1 second
- the second preset duration is 1 minute, that is, each search operation lasts for 1 second, and each broadcast operation lasts for 1 minute.
- step S2 the device ID of the target Bluetooth device is pre-configured in the Bluetooth slave device, so that the Bluetooth slave device can identify the target Bluetooth device in the process of searching for other Bluetooth devices in the vicinity.
- the initial state of the target Bluetooth device is configured to leave the state.
- the Bluetooth slave device determines that the target Bluetooth device is in a leaving state, and It is modified to the neighboring state, and the time at this time is exactly the time of occurrence of the target Bluetooth device.
- step S3 when the target Bluetooth device leaves the neighboring area of the Bluetooth slave device, so that the Bluetooth slave device cannot search for the target Bluetooth device, the Bluetooth slave device determines the target Bluetooth device. It is the proximity state and is modified to leave the state, then the time at this time is exactly the departure time of the target Bluetooth device.
- the appearance time and the departure time of the target Bluetooth device can be accurately obtained through step S2 and step S3.
- the step S4 is specifically: sending t1 and t2 to the first Bluetooth master device via Bluetooth and forwarding to the server by the first Bluetooth master device, so that the server is based on an earlier interval between t1 and t3 And the earlier one between t2 and t4 calculates the duration of the Bluetooth slave device and the target Bluetooth device for a preset period of time and records; wherein the target Bluetooth device is the Bluetooth slave Another Bluetooth slave device whose function is identical in structure; t3 is the time of occurrence of the Bluetooth slave device acquired by the target Bluetooth device, and t4 is the departure time of the Bluetooth slave device acquired by the target Bluetooth device And t3 and t4 are transmitted by the target Bluetooth device to the second Bluetooth master device via Bluetooth and forwarded to the server.
- the Bluetooth slave device can acquire the appearance time t1 and the departure time t2 of the target Bluetooth device, the target The Bluetooth device can also acquire the appearance time t3 and the departure time t4 of the Bluetooth slave device.
- the appearance time t1 of the target Bluetooth device should be equal to the appearance time t3 of the Bluetooth slave device
- the departure time t2 of the target Bluetooth device should be equal to the The departure time of the Bluetooth slave device is t4.
- the target Bluetooth device when the target Bluetooth device is close to the Bluetooth slave device, it is possible that the target Bluetooth device can acquire the appearance time t3 of the Bluetooth slave device, and the Bluetooth slave device cannot acquire the appearance time t1 of the target Bluetooth device until after the broadcast operation. .
- the appearance time t3 of the Bluetooth slave device is standard and earlier than the appearance time t1 of the target Bluetooth device.
- the departure time t2 of the target Bluetooth device and the departure time t4 of the Bluetooth slave device are standard and earlier than the appearance time t2 of the target Bluetooth device.
- the target Bluetooth device is configured as another Bluetooth slave device that is functionally identical to the Bluetooth slave device, so that the target Bluetooth device can also The appearance time t3 and the departure time t4 of the Bluetooth slave device are obtained.
- the server can be based on an earlier time between the appearance time t1 of the target Bluetooth device and the appearance time t3 of the Bluetooth slave device, and an earlier time between the departure time t2 of the target Bluetooth device and the departure time t4 of the Bluetooth slave device. To calculate the length of time between the Bluetooth slave device and the target Bluetooth device.
- the Bluetooth slave device is a smart bracelet worn by the user A
- the target Bluetooth device is a smart wristband worn by the user B
- the functions of the two are identical.
- the Bluetooth slave device and the user Bluetooth device respectively acquire the appearance time t1 of the target Bluetooth device and the appearance time t3 of the Bluetooth slave device, and the Bluetooth slave device and the target Bluetooth device leave each other when the user A and the user B leave each other.
- the departure time t2 of the target Bluetooth device and the departure time t4 of the Bluetooth slave device are respectively obtained.
- the Bluetooth slave sends t1 and t2 to the user A's mobile phone via Bluetooth and forwards it to the server.
- the target Bluetooth device sends t3 and t4 to the user B's mobile phone via Bluetooth and forwards it to the server.
- the server is based on the earlier between t1 and t3. And the earlier between t2 and t4 to calculate the length of time between the Bluetooth slave and the target Bluetooth device. If the preset time period is within one day, the length of time that user A and user B can get along one day can be calculated.
- the Bluetooth slave device is a smart bracelet worn by the user C, and the target Bluetooth device is a device fixed in the office.
- the Bluetooth slave device acquires the appearance time t1 of the target Bluetooth device, and when the user C leaves the office, the Bluetooth slave device acquires the departure time t2 of the target Bluetooth device.
- the Bluetooth slave sends t1 and t2 to the user C's mobile phone via Bluetooth and forwards it to the server.
- the server calculates the length of time that the user C stays in the office in one day as the working time according to t1 and t2.
- the above two situations are only two examples of the embodiments of the present invention, and the present invention is also applicable to other situations in which it is necessary to record the length of time between two users or the duration of the user's stay at a certain place. For example, if the office in case 2 can be changed to a gym, the length of time the user stays in the gym is recorded accordingly as the duration of exercise of the user in one day.
- FIG. 2 it is a structural block diagram of a Bluetooth slave device according to an embodiment of the present invention, including:
- the Bluetooth working module 1 is configured to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device according to the set working mode;
- An appearance time acquisition module 2 is configured to search for a target Bluetooth device during searching for other Bluetooth devices around, And when the target Bluetooth device is in the leaving state, acquiring the current time as the appearance time t1 of the target Bluetooth device, and modifying the state of the target Bluetooth device to the neighboring state;
- the departure time acquisition module 3 is configured to acquire the current time as the target Bluetooth device when the target Bluetooth device is not searched in the process of searching for other Bluetooth devices in the vicinity, and the target Bluetooth device is in the proximity state Leaving time t2 and modifying the state of the target Bluetooth device to the leaving state;
- a time data sending module 4 configured to send t1 and t2 to the first Bluetooth master device via Bluetooth and forwarded to the server by the first Bluetooth master device, so that the server calculates the Bluetooth slave device and the device according to t1 and t2
- the duration of the target Bluetooth device in the preset time period is recorded and recorded.
- the Bluetooth working module 1 is specifically configured to: alternately perform a search operation and a broadcast operation; wherein the searching operation is used to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device, each time The search operation continues for a first preset duration; the broadcast operation is for broadcasting a data packet to cause the Bluetooth slave device to be searched by other Bluetooth slave devices, each broadcast operation lasting for a second predetermined duration.
- the Bluetooth working module 1 specifically includes:
- a broadcast operation execution unit configured to perform a broadcast operation after performing a search operation, wherein the search operation is used to search for other Bluetooth devices in a neighboring area of the Bluetooth slave device, and each search operation lasts for the first time Setting a duration; the broadcast operation is for broadcasting a data packet to cause the Bluetooth slave device to be searched by other Bluetooth slave devices, each broadcast operation lasting for a second preset duration;
- a motion state determining unit configured to determine a motion state of the Bluetooth slave device before any one of the broadcasting operations ends
- a broadcast operation secondary execution unit configured to perform the broadcast operation again when it is determined that the Bluetooth slave device is stationary
- a search operation execution unit configured to perform the search operation again when it is determined that the Bluetooth slave device is in motion.
- the time data sending module 4 is specifically configured to: send t1 and t2 to the first Bluetooth master device via Bluetooth and forward to the server by the first Bluetooth master device, so that the server according to t1 and t3 An earlier one, and an earlier one between t2 and t4, calculate and record the duration of the Bluetooth slave device and the target Bluetooth device within a preset time period; wherein the target Bluetooth device is The Bluetooth slave device is another Bluetooth slave device having the same functional structure; t3 is the appearance time of the Bluetooth slave device acquired by the target Bluetooth device, and t4 is the Bluetooth slave device acquired by the target Bluetooth device The departure time of the device, t3 and t4, is transmitted by the target Bluetooth device to the second Bluetooth master via Bluetooth and forwarded to the server.
- the Bluetooth slave device and the target Bluetooth device are smart bracelets; the first Bluetooth master device and the second Bluetooth master device are mobile communication terminals.
- the Bluetooth slave device provided by the embodiment of the present invention is used to execute all the methods of the foregoing duration recording method.
- the method steps, the working principle and the beneficial effects are in one-to-one correspondence, and thus will not be described again.
- the embodiment of the invention further provides a duration recording system, comprising the above-mentioned Bluetooth slave device, the target Bluetooth device of the Bluetooth slave device, the first Bluetooth master device connected to the Bluetooth slave device via Bluetooth, and a server.
- the present invention has the beneficial effects that the present invention provides a duration recording method, a Bluetooth slave device and a duration recording system, and the method is performed by a Bluetooth slave device, including the Bluetooth according to a set working mode.
- Searching for other Bluetooth devices from the vicinity of the device when searching for the target Bluetooth device in the process of searching for other Bluetooth devices around, and the target Bluetooth device is in the leaving state, acquiring the current time as the appearance of the target Bluetooth device Time t1, and modifying the state of the target Bluetooth device to a neighboring state; when the target Bluetooth device is not searched in the process of searching for other Bluetooth devices around, and the target Bluetooth device is in a neighboring state, acquiring the current Time as the departure time t2 of the target Bluetooth device, and modifying the state of the target Bluetooth device to the leaving state; sending t1 and t2 to the first Bluetooth master device via Bluetooth and forwarding by the first Bluetooth master device Go to the server, causing the server to calculate the Bluetooth slave device and the target Bluetooth according to t1 and t2 Device
- the Bluetooth slave device automatically acquires the appearance time and the departure time of the target Bluetooth device, without the user's manual operation, and even the user does not perceive the recording of the information, thereby greatly improving the convenience of the recording duration. And since the appearance time and the departure time of the target Bluetooth device are automatically acquired, the final calculated correlation time is also accurate enough.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
一种时长记录方法、蓝牙从设备与时长记录系统,方法由蓝牙从设备执行,包括:在蓝牙从设备的邻近区域搜索其他蓝牙设备,当搜索到目标蓝牙设备且目标蓝牙设备为离开状态时,获取当前的时间作为目标蓝牙设备的出现时间t1,并将目标蓝牙设备的状态修改为邻近状态;当没有搜索到目标蓝牙设备且目标蓝牙设备为邻近状态时,获取当前的时间作为目标蓝牙设备的离开时间t2,并将目标蓝牙设备的状态修改为离开状态;将t1和t2通过蓝牙发送到服务器,使得服务器根据t1和t2计算蓝牙从设备与目标蓝牙设备在预设时间段内的相处时长并记录起来。可以简单方便地记录用户之间的相处时长或用户在某一场所的停留时长。
Description
本发明涉及信息获取与记录领域,具体涉及一种时长记录方法、蓝牙从设备与时长记录系统。
随着文明程度越来越高,在人们越来越意识到时间的重要性,时间观念越来越重。例如,在交往过程中,情侣想知道他们两个人在过去的某一天相处的时间有多长;在工作过程中,公司需要收集员工某一天在办公点待的时间,作为这个员工的工作时间。这些时间信息都是由特殊的意义的,象征着两个人在一段时间内的相处时长,或象征着某个人在某个场所待的时长。
为了得到这些信息,往往需要用户刻意地或主动地去记录,比如说上下班打卡,用户可能忘记了记录或记录有误或记录不成功,因此为用户带来很多不便。
发明内容
本发明的目的是,提供一种时长记录方法、蓝牙从设备与相处时长获取系统,通过蓝牙从设备简单方便地记录用户之间的相处时长或用户在某一场所的停留时长。
为解决以上技术问题,本发明实施例第一方面提供一种时长记录方法,由蓝牙从设备执行,所述方法包括:
按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;
当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;
当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;
将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。
可选地,所述按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,具体为:
交替地执行搜索操作与广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙设备搜索到,每次广播操作持续第二预设时长。
可选地,所述按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,具体包括:
在执行完一次搜索操作之后,执行一次广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长;
在任一次所述广播操作结束前,判断所述蓝牙从设备的运动状态;
当判定所述蓝牙从设备为静止时,再次执行所述广播操作;
当判定所述蓝牙从设备为运动时,再次执行所述搜索操作。
可选地,所述将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来,具体为:
将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使所述服务器根据t1与t3之间的较早者、以及t2与t4之间的较早者计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来;其中,所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备;t3为所述目标蓝牙设备获取到的所述蓝牙从设备的出现时间,t4为所述目标蓝牙设备获取到的所述蓝牙从设备的离开时间,t3与t4由所述目标蓝牙设备通过蓝牙发送到第二蓝牙主设备并转发到所述服务器。
可选地,所述蓝牙从设备与所述目标蓝牙设备为智能手环;所述第一蓝牙主设备与所述第二蓝牙主设备为移动通讯终端。
本发明实施例第一方面提供一种蓝牙从设备,包括:
蓝牙工作模块,用于按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;
出现时间获取模块,用于当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;
离开时间获取模块,用于当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝
牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;
时间数据发送模块,用于将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。
可选地,所述蓝牙工作模块具体用于:交替地执行搜索操作与广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长。
可选地,所述蓝牙工作模块具体包括:
广播操作执行单元,用于在执行完一次搜索操作之后,执行一次广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长;
运动状态判断单元,用于在任一次所述广播操作结束前,判断所述蓝牙从设备的运动状态;
广播操作二次执行单元,用于当判定所述蓝牙从设备为静止时,再次执行所述广播操作;
搜索操作执行单元,用于当判定所述蓝牙从设备为运动时,再次执行所述搜索操作。
可选地,所述时间数据发送模块具体用于:将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使所述服务器根据t1与t3之间的较早者、以及t2与t4之间的较早者计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来;其中,所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备;t3为所述目标蓝牙设备获取到的所述蓝牙从设备的出现时间,t4为所述目标蓝牙设备获取到的所述蓝牙从设备的离开时间,t3与t4由所述目标蓝牙设备通过蓝牙发送到第二蓝牙主设备并转发到所述服务器。
可选地,所述蓝牙从设备与所述目标蓝牙设备为智能手环;所述第一蓝牙主设备与所述第二蓝牙主设备为移动通讯终端。
本发明实施例第三方面提供一种时长记录系统,包括上述的蓝牙从设备、所述蓝牙从设备的目标蓝牙设备、与所述蓝牙从设备通过蓝牙连接的第一蓝牙主设备、以及服务器。
相比于现有技术,本发明的有益效果在于:本发明提供了一种时长记录方法、蓝牙从设备与时长记录系统,方法由蓝牙从设备执行,包括按照设定的工作模式在所述蓝牙从设备的
邻近区域搜索其他蓝牙设备;当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。在执行本发明实施例的方法时,蓝牙从设备自动获取目标蓝牙设备的出现时间和离开时间,无需用户手动操作,甚至用户不会察觉到记录了这些信息,大大提高了记录时长的便利性,并且由于目标蓝牙设备的出现时间和离开时间是自动获取的,最终计算出来的相处时长也足够精确。
图1是本发明实施例提供的时长记录方法的的流程示意图;
图2是本发明实施例提供的一种蓝牙从设备的结构框图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,其是本发明实施例提供的时长记录方法的的流程示意图。所述时长记录方法由蓝牙从设备执行,包括:
S1,按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;
S2,当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;
S3,当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;
S4,将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处
时长并记录起来。所述预设时间段可以为1天。
蓝牙技术是一种很成熟的通讯技术,蓝牙设备包括蓝牙主设备与蓝牙从设备。蓝牙主设备一般是主动搜索周围的蓝牙从设备,并向指定的蓝牙从设备发送链接请求;蓝牙从设备则是监听周围的蓝牙主设备发送的链接请求。例如,蓝牙主设备为手机,蓝牙从设备为智能手环,两者建立连接后,智能手环将采集到的信息通过蓝牙反馈到手机;或者,蓝牙主设备为手机,蓝牙从设备为蓝牙耳机,两者建立连接后,手机将音频信号通过蓝牙发送到蓝牙耳机进行播放。因此,在现有技术中,蓝牙从设备一般是被蓝牙主设备发现然后两者进行交互,而蓝牙从设备则不会发现其他蓝牙主设备或其他蓝牙从设备。
由于本发明的目的在于方便地记录用户间的相处时长或用户在某一场所的停留时长,需要设备按照某种搜索模式去搜索目标蓝牙设备才可以实现,而蓝牙主设备(如手机)一般是需要与蓝牙从设备连接时才进行搜索,因此蓝牙主设备不适合应用到本发明实施例中去获取目标蓝牙设备的出现时间和离开时间。相反地,蓝牙从设备可以实现这一点。由于蓝牙从设备一般是一些随身携带的设备,例如智能手环、智能戒指、智能耳环等等,因此本发明实施例利用了蓝牙从设备的这一特性,将蓝牙从设备设置为按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,获取目标蓝牙设备的出现时间和离开时间通过第一蓝牙主设备发送到服务器,以使服务器计算所述蓝牙从设备与所述目标蓝牙设备之间的相处时长并记录下来。蓝牙从设备在执行本发明实施例的方法时,自动获取目标蓝牙设备的出现时间和离开时间,无需用户手动操作,甚至用户不会察觉到记录了这些信息,大大提高了记录时长的便利性,并且由于目标蓝牙设备的出现时间和离开时间是自动获取的,最终计算出来的相处时长也足够精确。
所述步骤S1的一种实施方式具体为:交替地执行搜索操作与广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙设备搜索到,每次广播操作持续第二预设时长。之所以交替地执行执行搜索操作与广播操作是为了在所述蓝牙从设备搜索目标蓝牙设备时,也能够被其他蓝牙设备(包括蓝牙主设备和其他蓝牙从设备)搜索到。
所述步骤S1的另一种实施方式具体包括:
在执行完一次搜索操作之后,执行一次广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长;
在任一次所述广播操作结束前,判断所述蓝牙从设备的运动状态;
当判定所述蓝牙从设备为静止时,再次执行所述广播操作;
当判定所述蓝牙从设备为运动时,再次执行所述搜索操作。
由于搜索操作的功耗远远大于广播操作的功耗,按照述步骤S1的另一种实施方式,如果所述蓝牙从设备处于静止状态,例如所述蓝牙从设备一直停留在一个地方,则所述蓝牙从设备一直在执行所述广播操作而不去执行搜索操作,从而大大降低了所述蓝牙从设备的功耗。当所述蓝牙从设备又重新执行搜索操作,以获取所述目标蓝牙设备的出现时间或离开时间。例如,所述第一预设时长为1秒,所述第二预设时长为1分钟,即每次搜索操作持续1秒,而每次广播操作持续1分钟。
需要说明的是,如何判断所述蓝牙从设备的运动状态是很常规的技术,例如通过加速度传感器获取所述蓝牙从设备的加速度数据,再根据加速度数据判断所述蓝牙从设备为静止还是运动。本领域技术人员很清楚这部分的相关内容,因而在本发明中不再赘述。
在步骤S2中,所述目标蓝牙设备的设备ID预先配置在所述蓝牙从设备中,从而所述蓝牙从设备能够在搜索周围的其他蓝牙设备的过程中识别到所述目标蓝牙设备。所述目标蓝牙设备的初始状态被配置为离开状态。当所述目标蓝牙设备进入了所述蓝牙从设备的邻近区域,使得所述蓝牙从设备能够搜索到所述目标蓝牙设备时,所述蓝牙从设备判断所述目标蓝牙设备为离开状态,并且将其修改为邻近状态,则此时的时间恰好就是所述目标蓝牙设备的出现时间。
在步骤S3中,当所述目标蓝牙设备离开了所述蓝牙从设备的邻近区域,使得所述蓝牙从设备不能够搜索到所述目标蓝牙设备时,所述蓝牙从设备判断所述目标蓝牙设备为邻近状态,并且将其修改为离开状态,则此时的时间恰好就是所述目标蓝牙设备的离开时间。
通过步骤S2和步骤S3可以准确地获取到所述目标蓝牙设备的出现时间和离开时间。
更优选地,所述步骤S4具体为:将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使所述服务器根据t1与t3之间的较早者、以及t2与t4之间的较早者计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来;其中,所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备;t3为所述目标蓝牙设备获取到的所述蓝牙从设备的出现时间,t4为所述目标蓝牙设备获取到的所述蓝牙从设备的离开时间,t3与t4由所述目标蓝牙设备通过蓝牙发送到第二蓝牙主设备并转发到所述服务器。
由于所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备,所述蓝牙从设备可以获取到所述目标蓝牙设备的出现时间t1和离开时间t2,所述目标蓝牙设备也可以获取到所述蓝牙从设备的出现时间t3和离开时间t4。在理想情况下,目标蓝牙设备的出现时间t1应该等于所述蓝牙从设备的出现时间t3,目标蓝牙设备的离开时间t2应该等于所述
蓝牙从设备的离开时间t4。但是目标蓝牙设备靠近蓝牙从设备时,有可能目标蓝牙设备能获取到蓝牙从设备的出现时间t3,而蓝牙从设备因为在进行广播操作而不能获取到目标蓝牙设备的出现时间t1直到之后才能获取。这时蓝牙从设备的出现时间t3是标准的并且比所述目标蓝牙设备的出现时间t1要早。同理,对于目标蓝牙设备的离开时间t2与所述蓝牙从设备的离开时间t4也是如此。因此为了准确计算出蓝牙从设备和目标蓝牙设备之间的相处时长,将目标蓝牙设备配置为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备,使得所述目标蓝牙设备也可以获取到所述蓝牙从设备的出现时间t3和离开时间t4。服务器能够根据目标蓝牙设备的出现时间t1与所述蓝牙从设备的出现时间t3之间的较早者,以及目标蓝牙设备的离开时间t2与所述蓝牙从设备的离开时间t4之间的较早者来计算蓝牙从设备和目标蓝牙设备之间的相处时长。
为了清楚地说明本发明实施例的工作过程,以下以两个情形进行说明。
情形一:蓝牙从设备为用户A佩戴的智能手环,目标蓝牙设备为用户B佩戴的智能手环,并且两者的功能完全相同。蓝牙从设备和目标蓝牙设备在用户A和用户B相互靠近时分别获取目标蓝牙设备的出现时间t1和蓝牙从设备的出现时间t3,蓝牙从设备和目标蓝牙设备在用户A和用户B相互离开时分别获取目标蓝牙设备的离开时间t2和蓝牙从设备的离开时间t4。蓝牙从设备通过蓝牙将t1和t2发送到用户A的手机并转发到服务器,目标蓝牙设备通过蓝牙将t3和t4发送到用户B的手机并转发到服务器,服务器根据t1与t3之间的较早者,以及t2与t4之间的较早者来计算蓝牙从设备和目标蓝牙设备之间的相处时长。假如预设时间段为一天内,则可以计算出用户A和用户B在某一天的相处时长。
情形二:蓝牙从设备为用户C佩戴的智能手环,目标蓝牙设备为固定在办公室的一个设备。用户C在进入办公室时,蓝牙从设备获取目标蓝牙设备的出现时间t1,当用户C离开办公室时,蓝牙从设备获取目标蓝牙设备的离开时间t2。蓝牙从设备通过蓝牙将t1和t2发送到用户C的手机并转发到服务器,服务器根据t1和t2计算用户C在一天内在办公室待的时长作为工作时长。
需要说明的是,以上的两个情形只是本发明实施例的两个举例,本发明还适用于其他需要记录两个用户间的相处时长或用户在某一场所的停留时长的情形。例如,情形二中的办公室可以变更为健身房,则相应地记录用户在健身房的停留时长作为用户一天内的锻炼时长。
如图2所示,其是本发明实施例提供的一种蓝牙从设备的结构框图,包括:
蓝牙工作模块1,用于按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;
出现时间获取模块2,用于当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,
且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;
离开时间获取模块3,用于当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;
时间数据发送模块4,用于将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。
在一种实施方式中,所述蓝牙工作模块1具体用于:交替地执行搜索操作与广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长。
在另一种实施方式中,所述蓝牙工作模块1具体包括:
广播操作执行单元,用于在执行完一次搜索操作之后,执行一次广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长;
运动状态判断单元,用于在任一次所述广播操作结束前,判断所述蓝牙从设备的运动状态;
广播操作二次执行单元,用于当判定所述蓝牙从设备为静止时,再次执行所述广播操作;
搜索操作执行单元,用于当判定所述蓝牙从设备为运动时,再次执行所述搜索操作。
更优选地,所述时间数据发送模块4具体用于:将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使所述服务器根据t1与t3之间的较早者、以及t2与t4之间的较早者计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来;其中,所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备;t3为所述目标蓝牙设备获取到的所述蓝牙从设备的出现时间,t4为所述目标蓝牙设备获取到的所述蓝牙从设备的离开时间,t3与t4由所述目标蓝牙设备通过蓝牙发送到第二蓝牙主设备并转发到所述服务器。
优选地,所述蓝牙从设备与所述目标蓝牙设备为智能手环;所述第一蓝牙主设备与所述第二蓝牙主设备为移动通讯终端。
需要说明的是,本发明实施例提供的蓝牙从设备用于执行上述的时长记录方法的所有方
法步骤,其工作原理与有益效果一一对应,因而不再赘述。
本发明实施例还提供了一种时长记录系统,包括上述的蓝牙从设备、所述蓝牙从设备的目标蓝牙设备、与所述蓝牙从设备通过蓝牙连接的第一蓝牙主设备、以及服务器。
相比于现有技术,本发明的有益效果在于:本发明提供了一种时长记录方法、蓝牙从设备与时长记录系统,方法由蓝牙从设备执行,包括按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。在执行本发明实施例的方法时,蓝牙从设备自动获取目标蓝牙设备的出现时间和离开时间,无需用户手动操作,甚至用户不会察觉到记录了这些信息,大大提高了记录时长的便利性,并且由于目标蓝牙设备的出现时间和离开时间是自动获取的,最终计算出来的相处时长也足够精确。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(RandomAccess Memory,RAM)等。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。
Claims (11)
- 一种时长记录方法,其特征在于,由蓝牙从设备执行,所述方法包括:按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。
- 如权利要求1所述的时长记录方法,其特征在于,所述按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,具体为:交替地执行搜索操作与广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙设备搜索到,每次广播操作持续第二预设时长。
- 如权利要求1所述的时长记录方法,其特征在于,所述按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,具体包括:在执行完一次搜索操作之后,执行一次广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长;在任一次所述广播操作结束前,判断所述蓝牙从设备的运动状态;当判定所述蓝牙从设备为静止时,再次执行所述广播操作;当判定所述蓝牙从设备为运动时,再次执行所述搜索操作。
- 如权利要求1~3所述的时长记录方法,其特征在于,所述将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来,具体为:将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使所述服务器根据t1与t3之间的较早者、以及t2与t4之间的较早者计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来;其中,所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备;t3为所述目标蓝牙设备获取到的所述蓝牙从设备的出现时间,t4为所述目标蓝牙设备获取到的所述蓝牙从设备的离开时间,t3与t4由所述目标蓝牙设备通过蓝牙发送到第二蓝牙主设备并转发到所述服务器。
- 如权利要求4所述的时长记录方法,其特征在于,所述蓝牙从设备与所述目标蓝牙设备为智能手环;所述第一蓝牙主设备与所述第二蓝牙主设备为移动通讯终端。
- 一种蓝牙从设备,其特征在于,包括:蓝牙工作模块,用于按照设定的工作模式在所述蓝牙从设备的邻近区域搜索其他蓝牙设备;出现时间获取模块,用于当在搜索周围的其他蓝牙设备的过程中搜索到目标蓝牙设备,且所述目标蓝牙设备为离开状态时,获取当前的时间作为所述目标蓝牙设备的出现时间t1,并将所述目标蓝牙设备的状态修改为邻近状态;离开时间获取模块,用于当在搜索周围的其他蓝牙设备的过程中没有搜索到所述目标蓝牙设备,且所述目标蓝牙设备为邻近状态时,获取当前的时间作为所述目标蓝牙设备的离开时间t2,并将所述目标蓝牙设备的状态修改为离开状态;时间数据发送模块,用于将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使得所述服务器根据t1和t2计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来。
- 如权利要求6所述的蓝牙从设备,其特征在于,所述蓝牙工作模块具体用于:交替地执行搜索操作与广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长。
- 如权利要求6所述的蓝牙从设备,其特征在于,所述蓝牙工作模块具体包括:广播操作执行单元,用于在执行完一次搜索操作之后,执行一次广播操作;其中,所述搜索操作用于在所述蓝牙从设备的邻近区域搜索其他蓝牙设备,每次搜索操作持续第一预设 时长;所述广播操作用于广播数据包以使所述蓝牙从设备被其他蓝牙从设备搜索到,每次广播操作持续第二预设时长;运动状态判断单元,用于在任一次所述广播操作结束前,判断所述蓝牙从设备的运动状态;广播操作二次执行单元,用于当判定所述蓝牙从设备为静止时,再次执行所述广播操作;搜索操作执行单元,用于当判定所述蓝牙从设备为运动时,再次执行所述搜索操作。
- 如权利要求6~8所述的蓝牙从设备,其特征在于,所述时间数据发送模块具体用于:将t1和t2通过蓝牙发送到第一蓝牙主设备并由所述第一蓝牙主设备转发到服务器,使所述服务器根据t1与t3之间的较早者、以及t2与t4之间的较早者计算所述蓝牙从设备与所述目标蓝牙设备在预设时间段内的相处时长并记录起来;其中,所述目标蓝牙设备为与所述蓝牙从设备在功能结构上相同的另一蓝牙从设备;t3为所述目标蓝牙设备获取到的所述蓝牙从设备的出现时间,t4为所述目标蓝牙设备获取到的所述蓝牙从设备的离开时间,t3与t4由所述目标蓝牙设备通过蓝牙发送到第二蓝牙主设备并转发到所述服务器。
- 如权利要求9所述的蓝牙从设备,其特征在于,所述蓝牙从设备与所述目标蓝牙设备为智能手环;所述第一蓝牙主设备与所述第二蓝牙主设备为移动通讯终端。
- 一种时长记录系统,其特征在于,包括如权利要求6~10任一项所述的蓝牙从设备、所述蓝牙从设备的目标蓝牙设备、与所述蓝牙从设备通过蓝牙连接的第一蓝牙主设备、以及服务器。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610884222.3 | 2016-10-09 | ||
| CN201610884222.3A CN106652068B (zh) | 2016-10-09 | 2016-10-09 | 时长记录方法、蓝牙从设备与时长记录系统 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018064867A1 true WO2018064867A1 (zh) | 2018-04-12 |
Family
ID=58853826
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/113606 Ceased WO2018064867A1 (zh) | 2016-10-09 | 2016-12-30 | 时长记录方法、蓝牙从设备与时长记录系统 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106652068B (zh) |
| WO (1) | WO2018064867A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114268897A (zh) * | 2020-09-15 | 2022-04-01 | Oppo广东移动通信有限公司 | 定位服务方法及相关装置 |
| CN115942429A (zh) * | 2022-11-30 | 2023-04-07 | 深圳市鑫宇鹏电子科技有限公司 | 公用家电控制方法、装置、电子设备及存储介质 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102571160A (zh) * | 2012-01-16 | 2012-07-11 | 华为终端有限公司 | 一种蓝牙搜索方法及设备 |
| CN104484046A (zh) * | 2014-12-26 | 2015-04-01 | 小米科技有限责任公司 | 时长监测方法及装置 |
| CN204389907U (zh) * | 2014-12-25 | 2015-06-10 | 深圳市易联智通科技有限公司 | 一种能统计用户相处时间的装置 |
| CN104703148A (zh) * | 2015-03-16 | 2015-06-10 | 安徽华米信息科技有限公司 | 一种反馈信息的方法及装置 |
| CN105050049A (zh) * | 2015-08-17 | 2015-11-11 | 深圳奇沃智联科技有限公司 | 应用电子表手势之讯息交换系统 |
| CN105120499A (zh) * | 2015-08-21 | 2015-12-02 | 深圳Tcl数字技术有限公司 | 蓝牙主从模式自动切换的方法和系统 |
| CN105376708A (zh) * | 2015-10-09 | 2016-03-02 | 广东欧珀移动通信有限公司 | 一种蓝牙设备选择目标设备的连接方法及系统 |
| EP3062525A1 (en) * | 2015-02-27 | 2016-08-31 | Polar Electro Oy | Team sport monitoring system |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101493957B (zh) * | 2008-01-24 | 2010-10-20 | 林小翀 | 接触时间感应装置及利用该装置进行接触时间统计的方法 |
| CN101938853B (zh) * | 2009-06-30 | 2013-04-03 | 英华达(上海)电子有限公司 | 一种具有计时功能的无线网卡 |
| GB2498742A (en) * | 2012-01-25 | 2013-07-31 | Haul It Nationwide Ltd | Personal activity recording terminal and personnel management system |
| CN203759759U (zh) * | 2014-04-03 | 2014-08-06 | 北京理工大学珠海学院 | 一种基于云端的蓝牙考勤装置 |
| CN103886651A (zh) * | 2014-04-11 | 2014-06-25 | 北京极科极客科技有限公司 | 基于路由器的考勤方法和考勤路由器 |
| CN204614046U (zh) * | 2015-04-17 | 2015-09-02 | 安徽理工大学 | 新型楼宇办公考勤系统 |
| CN105561566A (zh) * | 2015-12-23 | 2016-05-11 | 木牙(天津)科技有限公司 | 儿童运动陪伴时间统计系统及方法 |
-
2016
- 2016-10-09 CN CN201610884222.3A patent/CN106652068B/zh active Active
- 2016-12-30 WO PCT/CN2016/113606 patent/WO2018064867A1/zh not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102571160A (zh) * | 2012-01-16 | 2012-07-11 | 华为终端有限公司 | 一种蓝牙搜索方法及设备 |
| CN204389907U (zh) * | 2014-12-25 | 2015-06-10 | 深圳市易联智通科技有限公司 | 一种能统计用户相处时间的装置 |
| CN104484046A (zh) * | 2014-12-26 | 2015-04-01 | 小米科技有限责任公司 | 时长监测方法及装置 |
| EP3062525A1 (en) * | 2015-02-27 | 2016-08-31 | Polar Electro Oy | Team sport monitoring system |
| CN104703148A (zh) * | 2015-03-16 | 2015-06-10 | 安徽华米信息科技有限公司 | 一种反馈信息的方法及装置 |
| CN105050049A (zh) * | 2015-08-17 | 2015-11-11 | 深圳奇沃智联科技有限公司 | 应用电子表手势之讯息交换系统 |
| CN105120499A (zh) * | 2015-08-21 | 2015-12-02 | 深圳Tcl数字技术有限公司 | 蓝牙主从模式自动切换的方法和系统 |
| CN105376708A (zh) * | 2015-10-09 | 2016-03-02 | 广东欧珀移动通信有限公司 | 一种蓝牙设备选择目标设备的连接方法及系统 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114268897A (zh) * | 2020-09-15 | 2022-04-01 | Oppo广东移动通信有限公司 | 定位服务方法及相关装置 |
| CN114268897B (zh) * | 2020-09-15 | 2023-05-26 | Oppo广东移动通信有限公司 | 定位服务方法及相关装置 |
| CN115942429A (zh) * | 2022-11-30 | 2023-04-07 | 深圳市鑫宇鹏电子科技有限公司 | 公用家电控制方法、装置、电子设备及存储介质 |
| CN115942429B (zh) * | 2022-11-30 | 2023-10-03 | 深圳市鑫宇鹏电子科技有限公司 | 公用家电控制方法、装置、电子设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106652068B (zh) | 2019-04-30 |
| CN106652068A (zh) | 2017-05-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20240220095A1 (en) | Method for interaction between electronic devices and electronic device | |
| US9900757B2 (en) | Wearable device-based information transfer method and related device | |
| KR20200044505A (ko) | 링크 공유를 지원하는 전자 장치 및 이를 위한 방법 | |
| CN107342616B (zh) | 一种智能控制充电的方法、装置及其终端 | |
| KR20170100007A (ko) | 청취 로그 및 음악 라이브러리를 생성하기 위한 시스템 및 방법 | |
| CN107146608B (zh) | 一种播放控制方法、装置及智能设备 | |
| WO2017097120A1 (zh) | 一种场景感知及提供服务的方法及装置 | |
| CN105551207B (zh) | 物件的寻找处理方法和装置 | |
| CN105406882A (zh) | 终端设备控制方法及装置 | |
| CN105228084A (zh) | 穿戴式智能设备检测数据处理方法和穿戴式智能设备 | |
| CN107995677B (zh) | 一种移动终端及其降低功耗的方法、计算机可读存储介质 | |
| US20200364204A1 (en) | Method for generating terminal log and terminal | |
| WO2018064867A1 (zh) | 时长记录方法、蓝牙从设备与时长记录系统 | |
| JP5949311B2 (ja) | 推定プログラム、推定装置、及び推定方法 | |
| CN105759622A (zh) | 设备控制方法及装置 | |
| CN104484046B (zh) | 时长监测方法及装置 | |
| CN111741391A (zh) | 真无线耳机及其敲击实现操作控制的方法、装置和系统 | |
| US9445358B2 (en) | Mobile communication terminal, server apparatus, controlling system, controlling method, and program | |
| CN107071701B (zh) | 一种蓝牙从设备发现目标蓝牙从设备的方法及蓝牙从设备 | |
| WO2017026154A1 (ja) | 情報処理装置、情報処理方法及びプログラム | |
| CN105306521A (zh) | 基于日历事件的景点信息推送方法、装置及移动终端 | |
| WO2022155879A1 (zh) | 时间同步方法及相关设备 | |
| CN109936818B (zh) | 一种定位方法、装置和存储介质 | |
| CN116095218B (zh) | 终端设备的控制方法、装置及计算机可读存储介质 | |
| CN105677320B (zh) | 一种设置等待时长的方法和装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16918200 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16918200 Country of ref document: EP Kind code of ref document: A1 |