Data interaction method, device and computer readable storage medium
By using a heartbeat detection mechanism between wearable devices and headphones, the problem of headphones being easily lost is solved. By outputting prompts and playing retrieval voice messages, users can find their headphones in time and prevent them from being lost.
Patent Information
- Application Number
- CN202211413656.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-11-11
AI Technical Summary
Headphones are easy to lose and difficult to find, and there is a lack of effective solutions to prevent them from being lost.
Through the communication connection between the wearable device and the earphone device, and using the heartbeat detection mechanism, the earphone device periodically sends heartbeat packets when not being worn. If no new heartbeat packets are received for more than the period, the wearable device outputs a prompt message, records the location and status information, and plays the retrieval voice through the speaker.
It enables timely notification to users when the earphones lose connection, helping users to confirm the location of the earphones and avoid losing them.
Smart Images

Figure CN115696126B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the earphone technical field, and particularly to a data interaction method, device and computer readable storage medium. BACKGROUND
[0002] With the continuous development and maturity of earphone technology and the continuous improvement of people's living standards, the use frequency of earphones in people's life is getting higher and higher, and the use scenarios are getting richer and richer. The structure of the earphone is generally small and delicate, and it is possible to be lost by accident in the use process, and it is not easy to find back. Therefore, at present, a solution to prevent earphones from being lost is urgently needed. SUMMARY
[0003] The main purpose of the present application is to provide a data interaction method, device and computer readable storage medium, and to provide a solution to prevent earphones from being lost.
[0004] To achieve the above purpose, the present application provides a data interaction method, which is applied to a wearable device, and the data interaction method comprises the following steps:
[0005] Receiving a heartbeat packet sent by an earphone device, wherein the earphone device periodically sends a heartbeat packet to the wearable device according to a heartbeat detection period when a communication connection is established with the wearable device and in a non-wearing state;
[0006] If no new heartbeat packet sent by the earphone device is received after receiving the heartbeat packet sent by the earphone device and detecting that more than the heartbeat detection period has passed, a prompt information is output.
[0007] Optionally, the step of outputting the prompt information if no new heartbeat packet sent by the earphone device is received after receiving the heartbeat packet sent by the earphone device and detecting that more than the heartbeat detection period has passed comprises:
[0008] If no new heartbeat packet sent by the earphone device is received after receiving the heartbeat packet sent by the earphone device and detecting that more than the heartbeat detection period has passed, the current state information is recorded, wherein the current state information comprises one or more of the current time, the current location, an image taken at the current location and a recording taken at the current location;
[0009] In the case of a communication connection with a user terminal, the current state information is output to the user terminal as prompt information.
[0010] Optionally, the data interaction method further comprises:
[0011] The user state is obtained by analyzing the sensor data collected by the sensor in the wearable device.
[0012] sending the preset heartbeat detection period corresponding to the user state to the earphone device, so that the earphone device sends a heartbeat packet according to the heartbeat detection period, or sending the user state to the earphone device, so that the earphone device sends a heartbeat packet according to the preset heartbeat detection period corresponding to the user state.
[0013] Optionally, after the step of outputting the prompt information, the method further comprises:
[0014] sending broadcast information, so that the earphone device establishes a connection with the wearable device after receiving the broadcast information;
[0015] sending a lost voice to the earphone device that establishes the connection with the wearable device based on the broadcast information, so that the earphone device plays the lost voice through a loudspeaker in an earphone box when the earphone device is in the in-box state.
[0016] Optionally, after the step of receiving the heartbeat packet sent by the earphone device, the method further comprises:
[0017] in a case of being in communication connection with a user terminal, reporting an earphone state to the user terminal according to the received heartbeat packet, wherein the earphone state is an in-box state of the earphone or an out-of-box state of the earphone, and the earphone device carries the earphone state in the heartbeat packet.
[0018] To achieve the above object, the application further provides a data interaction method applied to an earphone device, and the data interaction method comprises the following steps:
[0019] detecting whether the earphone device is in an unworn state and whether the earphone device is in communication connection with a wearable device;
[0020] in a case that the earphone device is in the unworn state and is in communication connection with the wearable device, periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period, so that the wearable device receives the heartbeat packet, and in a case that the wearable device detects that no new heartbeat packet sent by the earphone device is received beyond the heartbeat detection period after receiving the heartbeat packet sent by the earphone device, outputting a prompt information.
[0021] Optionally, before the step of periodically sending the heartbeat packet to the wearable device according to the heartbeat detection period, the method further comprises:
[0022] periodically send a heartbeat packet to the wearable device according to a heartbeat detection period received from the wearable device, wherein the wearable device obtains a user state by analyzing sensor data collected by a sensor, and sends a preset heartbeat detection period corresponding to the user state to the earphone device; or,
[0023] periodically send a heartbeat packet to the wearable device according to a preset heartbeat detection period corresponding to the user state, wherein the user state is sent by the wearable device to the earphone device.
[0024] Optionally, the data interaction method further comprises:
[0025] In the case of receiving broadcast information sent by a target device, a connection is established with the target device, wherein the target device is a wearable device or a user terminal;
[0026] The target device sends a search voice, and when the earphone device is in a case state, the search voice is played through a loudspeaker in an earphone case.
[0027] To achieve the above object, the present application further provides a data interaction device, which comprises a memory, a processor, and a data interaction program stored in the memory and executable on the processor, and the data interaction program implements the steps of the above data interaction method when executed by the processor.
[0028] In addition, to achieve the above object, the present application further provides a computer readable storage medium, which stores a data interaction program, and the data interaction program implements the steps of the above data interaction method when executed by the processor.
[0029] In the embodiment of the present application, the wearable device receives a heartbeat packet sent by the earphone device, and the earphone device periodically sends a heartbeat packet to the wearable device according to a heartbeat detection period when a communication connection is established with the wearable device and the earphone device is in a non-wearing state. If the wearable device detects that no new heartbeat packet is received from the earphone device after receiving the heartbeat packet sent by the earphone device for more than the heartbeat detection period, a prompt information is output. The embodiment of the present application realizes monitoring the state of the earphone device through the wearable device of the user, and in the case of earphone disconnection, the user is prompted in time through the output of prompt information, so that the user can confirm the position of the earphone device in time, and the earphone device is prevented from being lost. BRIEF DESCRIPTION OF DRAWINGS
[0030] Figure 1 The flowchart of the first embodiment of the data interaction method of the present application;
[0031] Figure 2 The earphone heartbeat packet interaction diagram related to the embodiment of the present application;
[0032] Figure 3 A schematic diagram of earphone state interaction involved in an embodiment of the present application;
[0033] Figure 4 A flowchart of a fourth embodiment of the data interaction method of the present application.
[0034] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0035] It should be understood that the specific embodiments described herein are merely intended to explain the present application and are not intended to limit the present application.
[0036] Reference Figure 1 , Figure 1 A flowchart of a first embodiment of the data interaction method of the present application.
[0037] Embodiments of the data interaction method are provided in the embodiments of the present application. It should be noted that although a logical sequence is shown in the flowchart, in some cases, the steps shown or described herein can be performed in a sequence different from that shown herein. In the present embodiment, the data interaction method is applied to a wearable device, which can be a smart watch, smart glasses, etc., and is not limited in the present embodiment. The data interaction method comprises the following steps:
[0038] In step S10, a heartbeat packet sent by an earphone device is received. In the case that the earphone device establishes a communication connection with the wearable device and is in a non-wearing state, the earphone device periodically sends a heartbeat packet to the wearable device according to a heartbeat detection period.
[0039] The earphone device can be a dual-link earphone device, i.e., can simultaneously establish a communication connection with two devices, for example, simultaneously establishes a communication connection with the wearable device and a user terminal. A wearing detection module can be provided in the earphone device, which is used to detect whether it is in a wearing state or a non-wearing state. In the case that the earphone device establishes a communication connection with the wearable device and is in a non-wearing state, the earphone device can periodically send a heartbeat packet to the wearable device according to a heartbeat detection period. The heartbeat detection period is a time length (for example, 10 minutes, 60 minutes), and a heartbeat packet is sent every time length. The heartbeat detection period can be a parameter pre-set in the earphone device, or can be determined by negotiation between the earphone device and the wearable device, and is not limited in the present embodiment. The specific data included in the heartbeat packet is not limited in the present embodiment.
[0040] When the wearable device can receive the heartbeat packet of the earphone device, it indicates that the earphone device is not lost and is within the controllable range of the user.
[0041] As shown in the figure, the earphone device can be a TWS earphone, and the wearable device can be a smart watch. The figure shows a process in which the earphone device sends a heartbeat packet to the wearable device. Figure 2
[0042] Step S20: If a new heartbeat packet sent by the earphone device is not received within the heartbeat detection period after receiving the heartbeat packet sent by the earphone device, a prompt information is outputted.
[0043] In the specific embodiment, the wearable device can start timing after receiving a heartbeat packet. During the timing process, if a new heartbeat packet sent by the earphone device is received, the timing is restarted. If the timing duration is greater than the heartbeat detection period, it is indicated that a new heartbeat packet sent by the earphone device is not received within the heartbeat detection period. The wearable device can output the prompt information in many ways, which are not limited in the embodiment. For example, the wearable device can play a prompt sound through a loudspeaker. For another example, the wearable device can vibrate through a vibration device. For another example, the wearable device can display prompt content on a screen. If the wearable device detects that a new heartbeat packet is not received within the heartbeat detection period after receiving a heartbeat packet, it is indicated that the earphone device is out of connection, and can not be within the controllable range of the user. At this time, the user can be prompted by outputting the prompt information, so that the user can confirm the position of the earphone device in time, and the earphone device is prevented from being lost.
[0044] Further, in a feasible embodiment, the earphone device can send indication information of entering the wearing state to the wearable device after entering the wearing state from the non-wearing state in the case of being communicatively connected with the wearable device, and then stop sending the heartbeat packet to the wearable device until sending the heartbeat packet to the wearable device again after entering the non-wearing state. The wearable device does not perform the operation of outputting the prompt information even if a new heartbeat packet is not received within the heartbeat detection period after receiving the heartbeat packet when receiving the indication information of entering the wearing state sent by the earphone device. For example, the wearable device can start timing after receiving a heartbeat packet. During the timing process, if the indication information of entering the wearing state sent by the earphone device is received, the timing is stopped.
[0045] In the embodiment, the wearable device receives the heartbeat packet sent by the earphone device. When the earphone device establishes a communication connection with the wearable device and is in a non-wearing state, the earphone device periodically sends a heartbeat packet to the wearable device according to a heartbeat detection period. If the wearable device receives the heartbeat packet sent by the earphone device and detects that no new heartbeat packet sent by the earphone device is received within the heartbeat detection period, a prompt information is output. The embodiment realizes monitoring the state of the earphone device through the wearable device of the user. In the case of disconnection of the earphone, the user is prompted in time through the output of the prompt information, so that the user can confirm the position of the earphone device in time, and the earphone device is prevented from being lost.
[0046] Further, in an implementation, the step S20 comprises:
[0047] In step S201, if it is detected that no new heartbeat packet sent by the earphone device is received within the heartbeat detection period after receiving the heartbeat packet sent by the earphone device, current state information is recorded, wherein the current state information comprises one or more of the current time, the current position, an image taken at the current position, and a recording taken at the current position.
[0048] The current position can be located by a positioning module in the wearable device, the image taken at the current position can be taken by a camera in the wearable device, and the recording taken at the current position can be taken by a microphone in the wearable device. By recording the current time, the current position, the image taken at the current position, and the recording taken at the current position, the user can understand the time, position, and surrounding environment of the earphone device in disconnection, so as to help the user find the earphone device in time.
[0049] In step S202, the current state information is output to the user terminal as prompt information in the case of communication connection with the user terminal.
[0050] The user terminal can be a smart phone, a personal computer, etc., which is not limited in the embodiment. In the specific embodiment, the user terminal can directly output the current state information after receiving the current state information, or output the current state information in response to a viewing instruction of the user, or first pop up a window to prompt, and then output the current state information in response to a viewing instruction of the user, so as to make it more convenient for the user to find the earphone.
[0051] Further, in a possible implementation, the wearable device can record the current state information in a case where it is detected that no new heartbeat packet is received beyond a heartbeat detection period after receiving the heartbeat packet, output the current state information as prompt information to the user terminal in a case where the wearable device is in communication connection with the user terminal, and play a prompt sound through a loudspeaker of the wearable device, or vibrate through a vibration device in the wearable device, or display prompt content on a screen of the wearable device in a case where the wearable device is not in communication connection with the user terminal.
[0052] Further, in a possible implementation, the step S10 is followed by further comprising:
[0053] In a case where the wearable device is in communication connection with the user terminal, the earphone state is reported to the user terminal according to the received heartbeat packet in step S30, wherein the earphone state is an earphone-in-box state or an earphone-not-in-box state, and the earphone device carries the earphone state in the heartbeat packet.
[0054] In a case where the earphone device is in communication connection with the wearable device and is in a non-wearing state, it can be detected whether it is in an earphone-in-box state or an earphone-not-in-box state, and the detection manner is not limited in the embodiment. The earphone device can carry the current state of the earphone in the heartbeat packet. The wearable device can report the earphone state to the user terminal as soon as the heartbeat packet is received, or the wearable device can periodically report the earphone state to the user terminal, but the reporting period is independent of the heartbeat detection period of the earphone device sending the heartbeat packet.
[0055] As shown in FIG. 1, Figure 3 The earphone device can be a TWS earphone, the wearable device can be a smart watch, and the user terminal can be a mobile phone. The process of the earphone device sending the heartbeat packet to the wearable device and the wearable device reporting the earphone state to the user terminal is shown in the figure.
[0056] In a specific embodiment, the user terminal can output the earphone state after receiving the earphone state reported by the wearable device, or the earphone state can be first saved, and the historical saved earphone state record or the latest earphone state is output in response to a user's viewing instruction, so that the user can know the state of the earphone in real time, thereby avoiding the loss of the earphone.
[0057] Further, based on the first embodiment, a second embodiment of the data interaction method is provided, and in the embodiment, the data interaction method further comprises:
[0058] In step S40, the user state is obtained by analyzing the sensor data collected by the sensor in the wearable device.
[0059] The sensor in the wearable device can be a heart rate sensor, an acceleration sensor, etc., and is not limited in the embodiment. According to the data collected by the sensor, the wearable device can analyze the user state, which can include exercise, riding, sleep, sitting, walking, etc., and the types of user state are not limited in the embodiment, and the specific analysis manner of the wearable device to analyze the sensor data to obtain the user state is also not limited.
[0060] In step S50, a preset heartbeat detection period corresponding to the user state is sent to the earphone device, so that the earphone device sends a heartbeat packet according to the heartbeat detection period, or the user state is sent to the earphone device, so that the earphone device sends a heartbeat packet according to a preset heartbeat detection period corresponding to the user state.
[0061] The wearable device or the earphone device can be preconfigured with different heartbeat detection periods corresponding to different user states. The possibility of earphone loss is different in different user states. For example, when exercising, the user shakes greatly, and the earphone is likely to fall off the body and be lost. When sleeping, the earphone is not used, and the probability of earphone loss is also low. A shorter heartbeat detection period is set for the user state with a high possibility of earphone loss, which can improve the real-time performance of earphone state monitoring in the case of high possibility of earphone loss, so that the user can discover the loss of the earphone more timely and find it back in time. A longer heartbeat detection period is set for the user state with a low possibility of earphone loss, which can reduce the power consumption of the earphone device. In a feasible implementation, the heartbeat detection period corresponding to exercise and riding can be less than the heartbeat detection period corresponding to walking, the heartbeat detection period corresponding to walking can be less than the heartbeat detection period corresponding to sitting, and the heartbeat detection period corresponding to sitting can be less than the heartbeat detection period corresponding to sleep. For example, the heartbeat detection period corresponding to exercise and riding can be set to 5 minutes, the heartbeat detection period corresponding to sleep can be set to 2 hours, the heartbeat detection period corresponding to sitting can be set to 1 hour, and the heartbeat detection period corresponding to walking can be set to 10 minutes.
[0062] Further, based on the first and / or second embodiments described above, a third embodiment of the data interaction method of the present application is proposed. In this embodiment, after step S20, the method further includes:
[0063] In step S60, broadcast information is sent, so that the earphone device receives the broadcast information and establishes a connection with the wearable device.
[0064] The purpose of the wearable device sending the broadcast information is to expect to establish a communication connection with the earphone device receiving the broadcast information, and the specific content of the broadcast information is not limited in the embodiment. In a feasible implementation, the broadcast information can carry the device information of the lost earphone device, so that the earphone device compares the device information carried in the broadcast information with the saved device information after receiving the broadcast information, and establishes a connection with the wearable device only when they are consistent, thereby avoiding the misconnection of other earphone devices with the wearable device. In a specific embodiment, the broadcast information can be sent in the form of Bluetooth broadcast, but is not limited to this. In a feasible implementation, the wearable device can send the broadcast information at a certain period, for example, once every 15 seconds. In a specific embodiment, the wearable device can start sending the broadcast information after outputting the prompt information, or can start sending the broadcast information in response to the earphone tracking instruction triggered by the user.
[0065] In step S70, the find-back voice is sent to the earphone device that establishes a connection with the wearable device based on the broadcast information, so that the earphone device plays the find-back voice through the loudspeaker in the earphone box when the earphone device is in the in-box state.
[0066] It should be noted that in a specific embodiment, the connection between the earphone device and the wearable device can not be limited to the case where the earphone device establishes a connection with the wearable device after receiving the broadcast information. In other application scenarios, the wearable device can not send the find-back voice to the earphone device when the earphone device establishes a connection with the wearable device, for example, when the earphone device establishes a connection with the wearable device for the first time. The find-back voice can be a user voice recorded in real time by the microphone of the wearable device, or can be a voice preset in the wearable device. After receiving the find-back voice, the earphone device can play the find-back voice through the loudspeaker in the earphone box if the earphone device is in the in-box state, so as to help the user quickly find the position of the earphone according to the sound.
[0067] Further, in a feasible implementation, after the earphone device establishes a connection with the wearable device based on the broadcast information, the earphone device can record the ambient sound around the earphone device through the microphone in the earphone device, and send the ambient sound to the wearable device. The wearable device plays the ambient sound through the loudspeaker, so that the user can quickly find the position of the earphone device according to the sound around the earphone device, and timely find back the earphone device.
[0068] Further, in a possible implementation, the wearable device or the user terminal can enter the earphone tracking mode after receiving the user triggered earphone tracking mode starting instruction. In the earphone tracking mode, the wearable device or the user terminal can periodically send broadcast information to the outside, and the earphone device can establish a communication connection with the wearable device or the user terminal after receiving the broadcast information, and then perform the interaction of the lost voice or the environmental sound with the wearable device or the user terminal.
[0069] Further, based on the first, second and / or third embodiments, the fourth embodiment of the data interaction method of the present application is proposed, which is described with reference to Figure 4 , Figure 4 The fourth embodiment of the data interaction method of the present application is a flowchart. In this embodiment, the data interaction method is applied to an earphone device, and the data interaction method comprises the following steps:
[0070] Step A10, detecting whether the earphone device is in an unworn state and whether the earphone device is in communication connection with a wearable device;
[0071] Step A20, periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period in the case that the earphone device is in the unworn state and in communication connection with the wearable device, so as to enable the wearable device to receive the heartbeat packet, and outputting a prompt information in the case that the wearable device detects that no new heartbeat packet is received from the earphone device for more than the heartbeat detection period after receiving the heartbeat packet sent by the earphone device.
[0072] In this embodiment, the specific implementation of steps A10 and A20 can refer to the specific implementation of steps S10 and S20 described above, which will not be repeated here.
[0073] Further, in a possible implementation, the step A20 further comprises:
[0074] Step A30, periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period received from the wearable device, wherein the wearable device obtains a user state by analyzing sensor data collected by a sensor, and sends a preset heartbeat detection period corresponding to the user state to the earphone device; or,
[0075] Step A40, periodically sending a heartbeat packet to the wearable device according to a preset heartbeat detection period corresponding to the user state, wherein the user state is sent to the earphone device by the wearable device.
[0076] The specific implementation of steps A30 and A40 can refer to the specific implementation of steps S40 and S50 described above, which will not be repeated here.
[0077] Further, in an implementation, the data interaction method further comprises:
[0078] Step A50, in the case of receiving the broadcast information sent by the target device, establishing a connection with the target device, wherein the target device is a wearable device or a user terminal;
[0079] Step A60, receiving the retrieval voice sent by the target device, and playing the retrieval voice through the loudspeaker in the earphone box when the earphone device is in the box state.
[0080] The specific implementation of steps A50 and A60 can refer to the specific implementation of steps S60 and S70 described above, and will not be repeated here.
[0081] In addition, the embodiment of the present application also provides a data interaction device, which can be a wearable device. In the embodiment, the wearable device can include a structural shell, a master control module, a memory, etc. The master control module can include a microprocessor, an audio decoding unit, a power supply and a power management unit, sensors and other active or passive devices required by the system, etc. (which can be replaced, reduced or increased according to actual functions), to realize the functions of receiving and playing wireless audio. The memory of the wearable device can store a data interaction program, and the microprocessor can be used to call the data interaction program stored in the memory and perform the following operations:
[0082] Receiving the heartbeat packet sent by the earphone device, wherein the earphone device periodically sends a heartbeat packet to the wearable device according to a heartbeat detection period when the earphone device is in a non-wearing state and a communication connection is established with the wearable device;
[0083] If it is detected that no new heartbeat packet sent by the earphone device is received after receiving the heartbeat packet sent by the earphone device and exceeding the heartbeat detection period, a prompt information is output.
[0084] Further, the operation of outputting the prompt information if it is detected that no new heartbeat packet sent by the earphone device is received after receiving the heartbeat packet sent by the earphone device and exceeding the heartbeat detection period comprises:
[0085] If it is detected that no new heartbeat packet sent by the earphone device is received after receiving the heartbeat packet sent by the earphone device and exceeding the heartbeat detection period, recording current state information, wherein the current state information includes one or more of the current time, the current location, an image taken at the current location, and a recording taken at the current location;
[0086] In the case of a communication connection with a user terminal, the current state information is output to the user terminal as prompt information.
[0087] Further, the microprocessor can also be configured to invoke the data interaction program stored in the memory to perform the following operations:
[0088] obtain the user state by analyzing the sensor data collected by the sensors in the wearable device;
[0089] send the preset heartbeat detection period corresponding to the user state to the earphone device, so that the earphone device sends a heartbeat packet according to the heartbeat detection period, or send the user state to the earphone device, so that the earphone device sends a heartbeat packet according to the preset heartbeat detection period corresponding to the user state.
[0090] Further, after the operation of outputting the prompt information when it is detected that no new heartbeat packet sent by the earphone device is received beyond the heartbeat detection period, the microprocessor can also be configured to invoke the data interaction program stored in the memory to perform the following operations:
[0091] send broadcast information, so that the earphone device receives the broadcast information and establishes a connection with the wearable device;
[0092] send a lost voice to the earphone device that establishes a connection with the wearable device based on the broadcast information, so that the earphone device plays the lost voice through a loudspeaker in an earphone box when the earphone device is in a box state.
[0093] Further, after the operation of receiving the heartbeat packet sent by the earphone device, the microprocessor can also be configured to invoke the data interaction program stored in the memory to perform the following operations:
[0094] report the earphone state to the user terminal according to the received heartbeat packet when the user terminal is in a communication connection state, wherein the earphone state is an earphone in a box state or an earphone not in a box state, and the earphone device carries the earphone state in the heartbeat packet.
[0095] In addition, the embodiment of the present application also proposes a data interaction device, in the embodiment, the data interaction device can be an earphone device, and the earphone device can include a structural shell, a main control module, a loudspeaker, a microphone, a memory and the like. The main control module can include a microprocessor, an audio decoding unit, a power supply and a power management unit, sensors and other active or passive devices required by the system (which can be replaced, reduced or increased according to actual functions), to realize the functions of receiving and playing wireless audio. The memory of the earphone device can store a data interaction program, and the microprocessor can be configured to invoke the data interaction program stored in the memory and perform the following operations:
[0096] detecting whether the earphone device is in an unworn state, and detecting whether the earphone device is communicatively connected with the wearable device;
[0097] when the earphone device is in the unworn state and communicatively connected with the wearable device, periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period, so that the wearable device receives the heartbeat packet, and when the wearable device detects that no new heartbeat packet is received from the earphone device for more than the heartbeat detection period after receiving the heartbeat packet sent by the earphone device, outputting prompt information.
[0098] Further, before the operation of periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period, the microprocessor can also be used to call a data interaction program stored in the memory to perform the following operations:
[0099] periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period received from the wearable device, wherein the wearable device obtains a user state by analyzing sensor data collected by a sensor, and sends a preset heartbeat detection period corresponding to the user state to the earphone device; or,
[0100] periodically sending a heartbeat packet to the wearable device according to a preset heartbeat detection period corresponding to the user state, wherein the user state is sent to the earphone device by the wearable device.
[0101] Further, the microprocessor of the data interaction method can also be used to call a data interaction program stored in the memory to perform the following operations:
[0102] when receiving broadcast information sent by a target device, establishing a connection with the target device, wherein the target device is a wearable device or a user terminal;
[0103] receiving a retrieval voice sent by the target device, and playing the retrieval voice through a loudspeaker in an earphone box when the earphone device is in a box state.
[0104] In addition, an embodiment of the present application also provides a computer readable storage medium, and the storage medium stores a data interaction program, and the data interaction program is executed by a processor to realize the steps of the data interaction method.
[0105] Embodiments of the data interaction device and the computer readable storage medium of the present application can refer to embodiments of the data interaction method of the present application, and will not be described here.
[0106] It should be noted that, in this document, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0107] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0108] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and the necessary general hardware platform, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for making a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.
[0109] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, which is made by using the content of the specification and drawings of the present application, is also included in the patent protection scope of the present application.
Claims
1. A data interaction method, characterized in that, The data interaction method is applied to a wearable device, and the data interaction method comprises the following steps: receiving a heartbeat packet sent by a headset device, wherein the headset device periodically sends a heartbeat packet to the wearable device according to a heartbeat detection period when a communication connection is established with the wearable device and the headset device is in a non-wearing state; if it is detected that no new heartbeat packet sent by the headset device is received beyond the heartbeat detection period after receiving the heartbeat packet sent by the headset device, outputting prompt information; The data interaction method further comprises: obtaining a user state by analyzing sensor data collected by a sensor in the wearable device, wherein the sensor includes a heart rate sensor and an acceleration sensor, and the user state is exercise, riding, sleep, sitting or walking; sending a preset heartbeat detection period corresponding to the user state to the headset device, so that the headset device sends a heartbeat packet according to the heartbeat detection period, or sending the user state to the headset device, so that the headset device sends a heartbeat packet according to a preset heartbeat detection period corresponding to the user state, wherein the preset heartbeat detection period corresponding to exercise and riding is less than the preset heartbeat detection period corresponding to walking, the preset heartbeat detection period corresponding to walking is less than the preset heartbeat detection period corresponding to sitting, and the preset heartbeat detection period corresponding to sitting is less than the preset heartbeat detection period corresponding to sleep.
2. The data interaction method of claim 1, wherein, The step of outputting prompt information if it is detected that no new heartbeat packet sent by the headset device is received beyond the heartbeat detection period after receiving the heartbeat packet sent by the headset device comprises: if it is detected that no new heartbeat packet sent by the headset device is received beyond the heartbeat detection period after receiving the heartbeat packet sent by the headset device, recording current state information, wherein the current state information includes one or more of the current time, the current location, an image taken at the current location, and a recording taken at the current location; in the case of communication connection with a user terminal, outputting the current state information as prompt information to the user terminal.
3. The data interaction method of claim 1, wherein, The step of outputting prompt information if it is detected that no new heartbeat packet sent by the headset device is received beyond the heartbeat detection period after receiving the heartbeat packet sent by the headset device further comprises: sending broadcast information so that the headset device receives the broadcast information and establishes a connection with the wearable device; sending a lost voice to the headset device that establishes a connection with the wearable device based on the broadcast information, so that the headset device plays the lost voice through a loudspeaker in a headset box when the headset device is in a box state.
4. The data interaction method according to any one of claims 1 to 3, wherein, The step of receiving a heartbeat packet sent by a headset device further comprises: in the case of communication connection with a user terminal, reporting a headset state to the user terminal according to the received heartbeat packet, wherein the headset state is that the headset is in a box state or not in a box state, and the headset device carries the headset state in the heartbeat packet.
5. A data interaction method, characterized in that, The data interaction method is applied to a headset device, and the data interaction method comprises the following steps: detecting whether the earphone device is in an unworn state, and detecting whether the earphone device is in communication connection with a wearable device; when the earphone device is in the unworn state and in the communication connection with the wearable device, periodically sending a heartbeat packet to the wearable device according to a heartbeat detection period, so that the wearable device receives the heartbeat packet, and outputs a prompt information when it is detected that no new heartbeat packet is received from the earphone device for more than the heartbeat detection period after receiving the heartbeat packet sent by the earphone device; before the step of periodically sending the heartbeat packet to the wearable device according to the heartbeat detection period, the method further comprises: periodically sending the heartbeat packet to the wearable device according to a heartbeat detection period received from the wearable device, wherein the wearable device obtains a user state by analyzing sensor data collected by a sensor, and sends a preset heartbeat detection period corresponding to the user state to the earphone device; or periodically sending the heartbeat packet to the wearable device according to a preset heartbeat detection period corresponding to the user state, wherein the user state is sent to the earphone device by the wearable device. The sensor comprises a heart rate sensor and an acceleration sensor, and the user state is motion, riding, sleep, sitting or walking. The preset heartbeat detection period corresponding to motion and riding is less than the preset heartbeat detection period corresponding to walking, the preset heartbeat detection period corresponding to walking is less than the preset heartbeat detection period corresponding to sitting, and the preset heartbeat detection period corresponding to sitting is less than the preset heartbeat detection period corresponding to sleep.
6. The data interaction method of claim 5, wherein, The data interaction method further comprises: when receiving broadcast information sent by a target device, establishing a connection with the target device, wherein the target device is a wearable device or a user terminal; receiving a retrieval voice sent by the target device, and playing the retrieval voice through a loudspeaker in an earphone box when the earphone device is in a box state.
7. A data interaction device, characterized by The data interaction device comprises a memory, a processor, and a data interaction program stored in the memory and executable on the processor, and the data interaction program, when executed by the processor, implements the steps of the data interaction method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a data interaction program, and the data interaction program, when executed by the processor, implements the steps of the data interaction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for preventing item loss
CN108242133A
Earphone anti-lost method and device, earphone assembly, electronic equipment and storage medium
CN111369771A