Method, system, device and storage medium for inter-device communication

By parsing and forwarding health data packets via mobile terminals, the problem of data sharing between wearable devices and AR devices is solved, enabling users to conveniently view health data across different devices.

CN115665712BActive Publication Date: 2026-06-05GEER TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GEER TECH CO LTD
Filing Date
2022-10-26
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The inability to directly share data between mobile terminals and wearable and AR devices makes it inconvenient for users to view health data.

Method used

By using a mobile terminal as a data relay station, the flag field of the data packet to be processed is parsed to determine whether it needs to be processed, and the health data packet is forwarded to the second slave device connected locally, thus realizing data sharing between wearable devices and AR devices.

Benefits of technology

Users can directly view health data through wearable devices or AR devices, improving the convenience of viewing content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665712B_ABST
    Figure CN115665712B_ABST
Patent Text Reader

Abstract

The application discloses a method, system, device and storage medium for inter-device communication, which is in the field of communication technology, and compared with the prior art, users must use a mobile terminal to view data uploaded by a first slave device or a second slave device, thereby reducing the convenience of the users in viewing content. The first slave device uploads a to-be-processed data packet carrying health data to the mobile terminal. The mobile terminal judges whether the to-be-processed data packet needs to be processed. If the to-be-processed data packet does not need to be processed, the mobile terminal checks the destination address of the to-be-processed data packet and the Bluetooth address of the second slave device connected locally. If the two addresses are consistent, the to-be-processed data packet is forwarded to the second slave device. The second slave device can display the health data to the user, realizes communication between a wearable device and an AR device, and the user can directly view the health data through the AR device or the wearable device, instead of only viewing the health data through the mobile terminal, thereby improving the convenience of the user in viewing content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a method, system, device and storage medium for communication between devices. Background Technology

[0002] With the rise of the metaverse concept, more and more AR (Augmented Reality) products are entering people's daily lives. Generally, mobile terminals connect to wearable devices and AR devices via Bluetooth, with the mobile terminal acting as the master device, establishing Bluetooth connections with both AR and wearable devices. However, wearable devices and AR devices cannot share data; that is, users must use the mobile terminal to view data uploaded by wearable or AR devices, reducing the convenience of content viewing for users. Summary of the Invention

[0003] The main objective of this application is to provide a method, system, device, and storage medium for inter-device communication, aiming to solve the technical problem of reduced convenience for users to view content.

[0004] To achieve the above objectives, this application provides a method for inter-device communication, applied to a mobile terminal, the method comprising the following steps:

[0005] When a data packet to be processed is received, the flag field in the data packet to be processed is parsed to determine whether the data packet to be processed needs to be processed. The data packet to be processed is sent from the first slave device to the local device and carries the user's health data collected by the first slave device.

[0006] If no processing is required, obtain the destination address of the data packet to be processed;

[0007] If the destination address matches the Bluetooth address of the second slave device connected locally, the data packet to be processed is forwarded to the second slave device so that the user can view the health data through the second slave device.

[0008] In one possible implementation of this application, before the step of determining whether the data packet needs to be processed by parsing the flag field in the data packet when it is received, the method further includes:

[0009] The Bluetooth address of the second slave device that has successfully paired for the first time is sent to the first slave device so that the first slave device can save the Bluetooth address of the second slave device.

[0010] In one possible implementation of this application, before the step of determining whether the data packet needs to be processed by parsing the flag field in the data packet when it is received, the method further includes:

[0011] When a heartbeat packet is received, it is determined whether the heartbeat packet needs to be forwarded, wherein the heartbeat packet is the first one sent from the device to the local device;

[0012] If forwarding is required, the heartbeat packet is sent to the second slave device;

[0013] If no first response data packet based on the heartbeat packet is received from the second slave device, then a message is sent to the first slave device indicating that the second slave device has not responded.

[0014] If a first response data packet is received from the second slave device based on the heartbeat packet, the first response data packet is forwarded to the first slave device so that the first slave device can determine that the second slave device is connected to the local device.

[0015] In one possible implementation of this application, after the step of determining whether the data packet to be processed needs to be processed by parsing the flag field in the data packet when it is received, the method further includes:

[0016] If processing is required, the user's health data carried in the data packet to be processed is extracted and saved locally.

[0017] This application also provides a method for inter-device communication, applied to a first slave device, the method comprising the following steps:

[0018] Determine if the mobile device has lost its connection to the local network;

[0019] If the connection is not disconnected, the collected user health data is encapsulated into a data packet to be processed and sent to the mobile terminal for processing. The destination address of the data packet to be processed is the Bluetooth address of the second slave device or the Bluetooth address of the mobile terminal.

[0020] In one possible implementation of this application, after the step of determining whether the mobile terminal has lost connection with the local network, the method further includes:

[0021] If the connection is lost, the Bluetooth address of the second slave device is obtained by querying the local Bluetooth address book. The Bluetooth address of the second slave device is sent to the local machine by the mobile terminal after the first pairing with the second slave device is completed.

[0022] Based on the Bluetooth address of the second slave device, initiate a connection request to the second slave device;

[0023] If the connection is successful, the data packet to be processed is sent to the second slave device so that the second slave device can display the health data to the user.

[0024] In one possible implementation of this application, the step of determining whether the mobile terminal has lost connection with the local network includes:

[0025] Send a heartbeat packet to the mobile terminal, wherein the destination address of the heartbeat packet is the Bluetooth address of the mobile terminal or the Bluetooth address of the second slave device;

[0026] If feedback information indicating that the second slave device has not responded is received within a preset number of consecutive attempts, and no second response data packet is received from the mobile terminal based on the heartbeat packet, then it is determined that the mobile terminal has disconnected from the local device, wherein the feedback information is sent by the mobile terminal to the local device.

[0027] This application also provides a system for inter-device communication, the system comprising: a mobile terminal, a first slave device, and a second slave device;

[0028] The mobile terminal is configured to, upon receiving a data packet to be processed, determine whether the data packet needs to be processed by parsing the flag field in the data packet, wherein the data packet to be processed is sent to the local machine by a first slave device and carries the user's health data collected by the first slave device; it is also configured to, if no processing is required, obtain the destination address of the data packet to be processed; and if the destination address matches the Bluetooth address of a second slave device connected to the local machine, forward the data packet to the second slave device so that the user can view the health data through the second slave device.

[0029] The first slave device is used to determine whether the mobile terminal is disconnected from the local device; it is also used to encapsulate the collected user's health data into a data packet to be processed if the connection is not disconnected, and send the data packet to be processed to the mobile terminal for the mobile terminal to process the data packet, wherein the destination address of the data packet to be processed is the Bluetooth address of the second slave device or the Bluetooth address of the mobile terminal.

[0030] This application also provides an inter-device communication apparatus, the apparatus comprising: a memory, a processor, and an inter-device communication program stored in the memory and executable on the processor, the inter-device communication program being configured to implement the steps of the inter-device communication method as described in any of the preceding claims.

[0031] This application also provides a storage medium storing a program for inter-device communication, which, when executed by a processor, implements the steps of the inter-device communication method as described in any of the preceding claims.

[0032] This application provides a method for communication between devices. Compared to existing technologies where users must use a mobile terminal to view data uploaded by wearable or AR devices, reducing the convenience of viewing content, this application allows a first slave device to upload a data packet containing health data to a mobile terminal. The mobile terminal determines whether the data packet needs to be processed. If not, the mobile terminal verifies the destination address of the data packet and the Bluetooth address of a locally connected second slave device. If they match, the data packet is forwarded to the second slave device, which can then display the health data to the user. This enables communication between the first and second slave devices, allowing users to directly view health data through the second slave device, rather than being limited to a mobile terminal. When the first slave device is a wearable device, the second slave device is an AR device; when the first slave device is an AR device, the second slave device is a wearable device. In other words, this application achieves communication between wearable and AR devices, improving the convenience of viewing content for users. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating a first embodiment of a method for inter-device communication according to this application;

[0034] Figure 2 This is a schematic diagram of a first scenario of the inter-device communication method according to the first embodiment of this application;

[0035] Figure 3 This is a schematic diagram of a second scenario of the inter-device communication method according to the first embodiment of this application;

[0036] Figure 4 This is a schematic diagram of a third scenario of the inter-device communication method according to the first embodiment of this application;

[0037] Figure 5 This is a schematic diagram of the structure of the device for inter-device communication in the hardware operating environment involved in the embodiments of this application.

[0038] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0039] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application. Although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information.

[0040] This application provides a method for inter-device communication, referring to... Figure 1 In this embodiment, applied to a mobile terminal, the method for inter-device communication includes:

[0041] Step S10: When a data packet to be processed is received, the flag field in the data packet to be processed is parsed to determine whether the data packet to be processed needs to be processed. The data packet to be processed is sent from the first slave device to the local device and carries the user's health data collected by the first slave device.

[0042] Step S20: If no processing is required, obtain the destination address of the data packet to be processed;

[0043] Step S30: If the destination address is consistent with the Bluetooth address of the second slave device connected locally, the data packet to be processed is forwarded to the second slave device so that the user can view the health data through the second slave device. When the first slave device is a wearable device, the second slave device is an AR device. When the first slave device is the AR device, the second slave device is the wearable device.

[0044] The research and development background of this embodiment is as follows: Figure 2 As shown, the mobile terminal connects to the wearable device and the AR device via BLE (Bluetooth Low Energy). The mobile terminal acts as the master device (BLE master) and connects to the AR device (first slave device, BLE slave) via BLE, as well as to the wearable device (second slave device, BLE slave) via BLE. However, the wearable device and the AR device cannot communicate via BLE, meaning that the wearable device and the AR device (between the two slave devices) cannot share data.

[0045] Specifically, the mobile terminal, wearable device, and AR device all support only the BLE Bluetooth protocol and do not support the traditional Bluetooth protocol (BT).

[0046] Specifically, a BLE slave device cannot simultaneously act as a BLE master device and connect with other BLE slave devices via BLE communication. In other words, an AR device acting as a BLE slave device cannot simultaneously connect with a wearable device via BLE communication.

[0047] This embodiment aims to use the mobile terminal as a data relay station to share the user's health data collected by the wearable device with the AR device, thereby solving the problem of the inability to share data between the wearable device and the AR device.

[0048] In this embodiment, the device-to-device communication method is applied to a mobile terminal in a device-to-device communication system. The device-to-device communication system also includes a wearable device and an AR device, wherein there is at least one wearable device and at least one AR device.

[0049] As an example, a mobile terminal can be a mobile phone, laptop, tablet, etc., without any specific limitation.

[0050] As an example, wearable devices can be portable devices such as watches, wristbands, rings, armbands, etc., without any specific limitations.

[0051] As an example, AR devices can be AR glasses and AR helmets, etc., without any specific limitations.

[0052] As an example, the wearable device is used to collect a user's health data and also to display content shared by the AR device to the user.

[0053] As an example, the user's health data can be vital signs such as heart rate and blood oxygen, or exercise data such as steps and distance traveled, etc., without any specific limitation.

[0054] As an example, the data packet to be processed includes a flag field, a destination address field (Bluetooth MAC address, Bluetooth address), and a payload field, wherein the payload data is the user's health data collected by the first slave device; refer to Figure 4 The flag field can occupy 0-8 bytes (bits), the Bluetooth MAC address occupies 0-64 bytes, and the payload data can occupy 0-224 bytes.

[0055] The specific steps are as follows:

[0056] Step S10: When a data packet to be processed is received, the flag field in the data packet to be processed is parsed to determine whether the data packet to be processed needs to be processed. The data packet to be processed is sent from the first slave device to the local device and carries the user's health data collected by the first slave device.

[0057] As an example, the first slave device uploads a data packet containing health data to the mobile terminal, and the mobile terminal determines whether the data packet needs to be processed.

[0058] Specifically, the mobile terminal determines whether the data packet to be processed needs to be processed by parsing the flag field of the data packet to be processed.

[0059] As an example, the flag field can be set to 0 or 1, or to flags such as A or B. If the flag field is 0 or A, it is determined that the data to be processed needs to be processed. If the flag field is 1 or B, the data to be processed does not need to be processed.

[0060] As an example, when processing the data to be processed, the processing method can be local storage, parsing, etc., without any specific limitations.

[0061] As an example, when there is no need to process the data to be processed, the data can be treated in ways such as forwarding it locally or discarding it, without any specific restrictions.

[0062] In this embodiment, after the step of determining whether to process the data packet by parsing the flag field in the data packet when it is received, the method further includes:

[0063] Step S40: If processing is required, extract the user's health data carried in the data packet to be processed and save it locally.

[0064] As an example, if the flag field is 0 or A, it is determined that the data to be processed needs to be processed, and the user's health data carried in the data packet to be processed is extracted.

[0065] As an example, the payload field in the data packet to be processed can be extracted to obtain the payload data, that is, to obtain the user's health data, save the user's health data locally, and update the existing local data so that the user can view the health data through the mobile terminal.

[0066] Step S20: If no processing is required, obtain the destination address of the data packet to be processed;

[0067] As an example, if the flag field is 1 or B, it is determined that the data packet to be processed does not need to be processed, and the destination address of the data packet to be processed is obtained.

[0068] Specifically, the destination address of the data packet to be processed can be obtained by parsing the destination address field of the data packet to be processed. The destination address is a Bluetooth address, which can be the Bluetooth address of the second slave device and the Bluetooth address of the first slave device.

[0069] In this embodiment, before the step of determining whether to process the data packet by parsing the flag field in the data packet when it is received, the method further includes:

[0070] Step S60: Send the Bluetooth address of the second slave device that has successfully paired for the first time to the first slave device so that the first slave device can save the Bluetooth address of the second slave device, and send the Bluetooth address of the first slave device that has successfully paired for the first time to the second slave device so that the second slave device can save the Bluetooth address of the first slave device.

[0071] As an example, the mobile terminal sends the Bluetooth address of the second slave device, which has been successfully paired for the first time, to the first slave device. The first slave device saves the Bluetooth address of the second slave device to its local Bluetooth address book. The local Bluetooth address book of the first slave device stores the Bluetooth address of the mobile terminal and the Bluetooth address of the second slave device. The mobile terminal sends the Bluetooth address of the first slave device, which has been successfully paired for the first time, to the second slave device. The second slave device saves the Bluetooth address of the first slave device to its local Bluetooth address book. The local Bluetooth address book of the second slave device stores the Bluetooth address of the mobile terminal and the Bluetooth address of the first slave device.

[0072] As an example, after the first slave device collects the user's health data, it can choose to send it to a mobile terminal or to a second slave device. Therefore, the first slave device queries its local Bluetooth address book and sends the user's health data to the mobile terminal or to the second slave device based on the Bluetooth address in the Bluetooth address book.

[0073] In this embodiment, before the step of determining whether to process the data packet by parsing the flag field in the data packet when it is received, the method further includes:

[0074] Step S70: When a heartbeat packet is received, determine whether the heartbeat packet needs to be forwarded, wherein the heartbeat packet is the first one sent from the device to the local device;

[0075] In this embodiment, before the first slave device sends the data packet to be processed to the mobile terminal, it needs to send a heartbeat packet to the mobile terminal to determine whether the connection with the mobile terminal has been lost. However, the destination address of the heartbeat packet is either the Bluetooth address of the mobile terminal or the Bluetooth address of the second slave device. That is, when the mobile terminal receives the heartbeat packet, it needs to parse the flag field of the heartbeat packet to determine whether it needs to forward the heartbeat packet.

[0076] Step S80: If forwarding is required, the heartbeat packet is sent to the second slave device;

[0077] As an example, if the flag field is 1 or B, it is determined that the heartbeat packet needs to be forwarded, and the mobile terminal forwards the heartbeat packet to the second slave device.

[0078] Step S90: If the first response data packet fed back by the second slave device based on the heartbeat packet is not received, then the first slave device is not informed that the second slave device has not responded;

[0079] As an example, if the mobile terminal does not receive the first response data packet fed back by the second slave device based on the heartbeat packet, it is determined that the second slave device and the mobile terminal are in a disconnected state. The mobile terminal sends the feedback information that the second slave device did not respond to to the first slave device, so that the first slave device knows that the second slave device and the mobile terminal have lost connection, thus avoiding the situation where it is mistakenly judged that the connection between the mobile terminal and the first slave device is lost.

[0080] Step S100: If a first response data packet is received from the second slave device based on the heartbeat packet, the first response data packet is forwarded to the first slave device so that the first slave device can determine that the second slave device is in a connected state with the local device.

[0081] As an example, if the mobile terminal receives a first response data packet from the second slave device based on the heartbeat packet, the mobile terminal forwards the first response data packet to the first slave device so that the first slave device can determine that the second slave device is connected to the local device.

[0082] Step S30: If the destination address matches the Bluetooth address of the second slave device connected locally, the data packet to be processed is forwarded to the second slave device so that the user can view the health data through the second slave device.

[0083] As an example, this embodiment addresses a scenario where the mobile terminal is connected to the second slave device, and simultaneously, the mobile terminal is connected to the first slave device.

[0084] Specifically, when the mobile terminal determines that it does not need to process the data packet to be processed, it needs to forward the data packet to be processed to the second slave device connected locally.

[0085] Specifically, based on the destination address of the acquired data packet to be processed, it is determined whether the destination address is consistent with the Bluetooth address of the second slave device connected locally.

[0086] As an example, if there is a discrepancy, the user is prompted that the second slave device has been disconnected and cannot share data, so that the user can reconnect the second slave device to the mobile terminal in a timely manner.

[0087] As an example, if they match, the user's health data carried in the data packet to be processed is extracted, repackaged, and forwarded to the second slave device so that the second slave device can display the health data to the user.

[0088] In this embodiment, the first slave device uploads a data packet containing health data to the mobile terminal. The mobile terminal determines whether the data packet needs to be processed. If no processing is required, the mobile terminal verifies the destination address of the data packet and the Bluetooth address of the locally connected second slave device. If they match, the data packet is forwarded to the second slave device, and the user can view the health data through the second slave device. If processing is required, the mobile terminal extracts the user's health data carried in the data packet and saves it locally, enabling communication between the wearable device, the mobile terminal, and the AR device. The user can view health data through the wearable device or AR device, as well as through the mobile terminal, rather than being limited to viewing health data through the mobile terminal, thus improving the convenience of viewing content.

[0089] Furthermore, based on the first embodiment of this application, another embodiment of this application is provided. In this embodiment, applied to a first slave device, the steps of inter-device communication include:

[0090] Step S110: Determine whether the mobile terminal has lost its connection with the local network;

[0091] In this embodiment, the inter-device communication method is applied to a first slave device in an inter-device communication system. The inter-device communication system further includes a mobile terminal and a second slave device. When the first slave device is a wearable device, the second slave device is an AR device. When the first slave device is the AR device, the second slave device is the wearable device.

[0092] In this embodiment, before sending the data packet to be processed to the mobile terminal, the first slave device needs to determine whether the mobile terminal is disconnected from the local device. If the connection is not broken, the first slave device can directly send the data packet to be processed to the mobile terminal, realizing communication between the first slave device, the mobile terminal, and the second slave device (refer to Embodiment 1). If the connection is broken, the first slave device needs to connect directly to the second slave device to realize communication.

[0093] In this embodiment, the step of determining whether the mobile terminal has lost connection with the local network includes:

[0094] Step A1: Send a heartbeat packet to the mobile terminal, wherein the destination address of the heartbeat packet is the Bluetooth address of the mobile terminal or the Bluetooth address of the second slave device;

[0095] In this embodiment, the method for determining whether the mobile terminal is disconnected from the local device is as follows: the first slave device sends a heartbeat packet to the mobile terminal. If the first slave device needs to determine whether the local device is connected to the mobile terminal, the destination address of the heartbeat packet sent is the Bluetooth address of the mobile terminal; if the first slave device needs to determine whether the second slave device is connected to the mobile terminal, the destination address of the heartbeat packet sent is the Bluetooth address of the second slave device.

[0096] Step A2: If feedback information indicating that the second slave device has not responded is received within a preset number of consecutive steps, and no second response data packet based on the heartbeat packet is received from the mobile terminal, then it is determined that the mobile terminal has disconnected from the local device, wherein the feedback information is sent by the mobile terminal to the local device.

[0097] As an example, if the first slave device receives feedback information from the mobile terminal indicating that the second slave device has not responded within a preset number of consecutive cycles, it is determined that the second slave device and the mobile terminal are disconnected; if at the same time, the second response data packet based on the heartbeat packet is not received from the mobile terminal within the preset number of consecutive cycles, it is determined that the mobile terminal and the first slave device are disconnected; at this time, the wearable device, the mobile terminal, and the AR device are not connected to each other.

[0098] Otherwise, it is determined that the mobile terminal is not disconnected from the first slave device, that is, the first slave device cannot directly connect to the second slave device via BLE.

[0099] Step S120: If the connection is not disconnected, the collected user health data is encapsulated into a data packet to be processed and the data packet to be processed is sent to the mobile terminal for the mobile terminal to process the data packet to be processed. The destination address of the data packet to be processed is the Bluetooth address of the second slave device or the Bluetooth address of the mobile terminal.

[0100] In this embodiment, if it is determined that the connection has not been disconnected, the first slave device can only share the user's health data to the second slave device through the mobile terminal. Specifically, the first slave device encapsulates the collected user's health data into a data packet to be processed and sends the data packet to be processed to the mobile terminal for the mobile terminal to process the data packet (refer to Embodiment 1).

[0101] In this embodiment, after the step of determining whether the mobile terminal has lost connection with the local network, the method further includes:

[0102] Step S130: If the connection is lost, the Bluetooth address of the second slave device is obtained by querying the local Bluetooth address book. The Bluetooth address of the second slave device is sent to the local machine by the mobile terminal after the first pairing with the second slave device is completed.

[0103] As an example, if the first slave device determines that the mobile terminal has disconnected from the first slave device, it queries its local Bluetooth address book, which stores the Bluetooth address of the second slave device and the Bluetooth address of the mobile terminal.

[0104] Specifically, the Bluetooth address of the second slave device is obtained by querying the local Bluetooth address book.

[0105] Step S140: Initiate a connection request to the second slave device based on the Bluetooth address of the second slave device;

[0106] As an example, when the first slave device encapsulates the user's health data, it modifies the destination address field to the Bluetooth address of the second slave device, and sends the re-encapsulated data packet to the second slave device to initiate a connection request.

[0107] Step S150: If the connection is successful, the data packet to be processed is sent to the second slave device so that the second slave device can display the health data to the user.

[0108] As an example, if the connection is successful, the first slave device can directly encapsulate the collected user's health data into a data packet to be processed and send the data packet to the second slave device so that the second slave device can display the health data to the user.

[0109] In this embodiment, if the mobile terminal is lost or not nearby, the user cannot view health data through the mobile terminal, referring to... Figure 3When the first slave device determines that the mobile terminal has lost connection with the local device, it can initiate a connection request to the second slave device based on the Bluetooth address of the second slave device. If the connection is successful, the data packet to be processed can be sent directly to the second slave device so that the second slave device can display the health data to the user. That is, when the mobile terminal is not nearby, a connection is established between the AR device and the wearable device, and the user can directly view the health data through the AR device or the wearable device, further improving the convenience of the user in viewing the content.

[0110] Reference Figure 5 , Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of this application.

[0111] like Figure 5 As shown, the devices for inter-device communication may include: a processor 1001, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to implement the connection and communication between the processor 1001 and the memory 1005.

[0112] Optionally, the devices used for inter-device communication may also include a user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, a WiFi module, etc. The user interface may include a display screen, an input submodule such as a keyboard, and optionally, standard wired or wireless interfaces. The network interface may include standard wired or wireless interfaces (such as a Wi-Fi interface).

[0113] Those skilled in the art will understand that Figure 5 The device structure for inter-device communication shown does not constitute a limitation on the device for inter-device communication. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0114] like Figure 5 As shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, and inter-device communication programs. The operating system is a program that manages and controls the device hardware and software resources for inter-device communication, and supports the operation of the inter-device communication programs and other software and / or programs. The network communication module is used to realize communication between the various components within the memory 1005, as well as communication with other hardware and software in the inter-device communication system.

[0115] exist Figure 5 In the device for inter-device communication shown, the processor 1001 is used to execute the inter-device communication program stored in the memory 1005 to implement the steps of the inter-device communication method described in any of the above claims.

[0116] The specific implementation of the device for inter-device communication in this application is basically the same as the embodiments of the inter-device communication method described above, and will not be repeated here.

[0117] This application also provides a system for inter-device communication, the system comprising: a mobile terminal, a first slave device, and a second slave device;

[0118] The mobile terminal is configured to, upon receiving a data packet to be processed, determine whether the data packet needs to be processed by parsing the flag field in the data packet, wherein the data packet to be processed is sent to the local machine by a first slave device and carries the user's health data collected by the first slave device; it is also configured to, if no processing is required, obtain the destination address of the data packet to be processed; and if the destination address matches the Bluetooth address of a second slave device connected to the local machine, forward the data packet to the second slave device so that the user can view the health data through the second slave device.

[0119] In one possible implementation, the mobile terminal is further configured to send the Bluetooth address of the second slave device that has been successfully paired for the first time to the first slave device, so that the first slave device can save the Bluetooth address of the second slave device, and send the Bluetooth address of the first slave device that has been successfully paired for the first time to the second slave device, so that the second slave device can save the Bluetooth address of the first slave device.

[0120] In one possible implementation, the mobile terminal is further configured to, upon receiving a heartbeat packet, determine whether the heartbeat packet needs to be forwarded, wherein the heartbeat packet is sent from the first slave device to the local device; further configured to, if forwarding is required, send the heartbeat packet to the second slave device; further configured to, if no first response data packet is received from the second slave device based on the heartbeat packet, report to the first slave device that the second slave device has not responded; and further configured to, if a first response data packet is received from the second slave device based on the heartbeat packet, forward the first response data packet to the first slave device, so that the first slave device can determine that the second slave device is in a connected state with the local device.

[0121] In one possible implementation, the mobile terminal is further configured to extract the user's health data carried in the data packet to be processed and save it locally if processing is required.

[0122] The first slave device is used to determine whether the mobile terminal is disconnected from the local device; it is also used to encapsulate the collected user's health data into a data packet to be processed if the connection is not disconnected, and send the data packet to be processed to the mobile terminal for the mobile terminal to process the data packet, wherein the destination address of the data packet to be processed is the Bluetooth address of the second slave device or the Bluetooth address of the mobile terminal.

[0123] In one possible implementation, the first slave device is further configured to, if the connection is lost, obtain the Bluetooth address of the second slave device by querying the local Bluetooth address book, wherein the Bluetooth address of the second slave device is sent to the local machine by the mobile terminal after the first pairing with the second slave device is completed; further configured to, initiate a connection request to the second slave device based on the Bluetooth address of the second slave device; and further configured to, if the connection is successful, send the data packet to be processed to the second slave device so that the second slave device can display the health data to the user.

[0124] In one possible implementation, the first slave device is further configured to send a heartbeat packet to the mobile terminal, wherein the destination address of the heartbeat packet is the Bluetooth address of the mobile terminal or the Bluetooth address of the second slave device; and is further configured to determine that the mobile terminal is disconnected from the local device if feedback information indicating that the second slave device has not responded is received within a preset number of consecutive times, and no second response data packet based on the heartbeat packet is received from the mobile terminal, wherein the feedback information is sent by the mobile terminal to the local device.

[0125] The specific implementation of the device-to-device communication system in this application is basically the same as the embodiments of the device-to-device communication method described above, and will not be repeated here.

[0126] This application also provides a storage medium storing a program for inter-device communication, which, when executed by a processor, implements the steps of the inter-device communication method as described in any of the preceding claims.

[0127] The specific implementation of the storage medium in this application is basically the same as the embodiments of inter-device communication described above, and will not be repeated here.

[0128] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0129] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0131] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for inter-device communication, characterized in that, Applied to mobile terminals, the inter-device communication method is used to achieve data sharing between two slave devices, and includes the following steps: The Bluetooth address of the second slave device that has successfully paired for the first time is sent to the first slave device so that the first slave device can save the Bluetooth address of the second slave device. When a data packet to be processed is received, the flag field in the data packet to be processed is parsed to determine whether the data packet to be processed needs to be processed. The data packet to be processed is sent from the first slave device to the local device and carries the user's health data collected by the first slave device. If no processing is required, the destination address of the data packet to be processed is obtained, and the destination address is a Bluetooth address; If the destination address matches the Bluetooth address of the second slave device connected locally, the data packet to be processed is forwarded to the second slave device so that the user can view the health data through the second slave device. When the first slave device is a wearable device, the second slave device is an AR device. When the first slave device is the AR device, the second slave device is the wearable device. In this system, communication between the local device and the first slave device, as well as between the local device and the second slave device, uses the BLE Bluetooth protocol.

2. The method for inter-device communication as described in claim 1, characterized in that, Before the step of determining whether to process the data packet by parsing the flag field in the data packet when it is received, the method further includes: When a heartbeat packet is received, it is determined whether the heartbeat packet needs to be forwarded, wherein the heartbeat packet is the first one sent from the device to the local device; If forwarding is required, the heartbeat packet is sent to the second slave device; If no first response data packet based on the heartbeat packet is received from the second slave device, then a message is sent to the first slave device indicating that the second slave device has not responded. If a first response data packet is received from the second slave device based on the heartbeat packet, the first response data packet is forwarded to the first slave device so that the first slave device can determine that the second slave device is connected to the local device.

3. The method for inter-device communication as described in claim 1, characterized in that, After the step of determining whether to process the data packet by parsing the flag field in the data packet when it is received, the method further includes: If processing is required, the user's health data carried in the data packet to be processed is extracted and saved locally.

4. A method for communication between devices, characterized in that, Applied to a first slave device, the Bluetooth address of the mobile terminal and the Bluetooth address of the second slave device are stored in the Bluetooth address book of the first slave device; the method of inter-device communication includes the following steps: Determine if the mobile device has lost its connection to the local network; If the connection is not disconnected, the collected user health data is encapsulated into a data packet to be processed and sent to the mobile terminal for processing. The data packet to be processed includes a flag field, a destination address field, and payload data. The flag field is used to determine whether the mobile terminal needs to process the data packet. The payload data is the user health data collected by the first slave device. The destination address of the data packet to be processed is the Bluetooth address of the second slave device or the Bluetooth address of the mobile terminal. The first slave device, the second slave device, and the local device communicate via the BLE Bluetooth protocol. If the mobile terminal does not need to process the data packet, it obtains the destination address of the data packet to be processed. If the destination address matches the Bluetooth address of the second slave device connected locally, the mobile terminal forwards the data packet to be processed to the second slave device so that the user can view the health data through the second slave device. When the first slave device is a wearable device, the second slave device is an AR device; when the first slave device is the AR device, the second slave device is the wearable device.

5. The method for inter-device communication as described in claim 4, characterized in that, After the step of determining whether the mobile terminal has lost its connection with the local network, the method further includes: If the connection is lost, the Bluetooth address of the second slave device is obtained by querying the local Bluetooth address book. The Bluetooth address of the second slave device is sent to the local machine by the mobile terminal after the first pairing with the second slave device is completed. Based on the Bluetooth address of the second slave device, initiate a connection request to the second slave device; If the connection is successful, the data packet to be processed is sent to the second slave device so that the second slave device can display the health data to the user.

6. The method for inter-device communication as described in claim 4, characterized in that, The step of determining whether the mobile terminal has lost connection with the local network includes: Send a heartbeat packet to the mobile terminal, wherein the destination address of the heartbeat packet is the Bluetooth address of the mobile terminal or the Bluetooth address of the second slave device; If feedback information indicating that the second slave device has not responded is received within a preset number of consecutive attempts, and no second response data packet based on the heartbeat packet is received from the mobile terminal, then it is determined that the mobile terminal has disconnected from the local device, wherein the feedback information is sent by the mobile terminal to the local device.

7. A system for inter-device communication, characterized in that, The system is used to enable data sharing between two slave devices, including: a mobile terminal, a first slave device, and a second slave device; The mobile terminal is configured to send the Bluetooth address of the second slave device that has been successfully paired for the first time to the first slave device, so that the first slave device can save the Bluetooth address of the second slave device; and to send the Bluetooth address of the first slave device that has been successfully paired for the first time to the second slave device, so that the second slave device can save the Bluetooth address of the first slave device; and, when a data packet to be processed is received, to determine whether the data packet to be processed needs to be processed by parsing the flag field in the data packet to be processed, wherein the data packet to be processed is sent from the first slave device to the local device and carries the user's health data collected by the first slave device; and is further configured to, if no processing is required, obtain the destination address of the data packet to be processed, wherein the destination address is a Bluetooth address; and is further configured to, if the destination address is consistent with the Bluetooth address of the second slave device connected to the local device, forward the data packet to be processed to the second slave device so that the user can view the health data through the second slave device, wherein the mobile terminal and the first slave device, and the mobile terminal and the second slave device, all use the BLE Bluetooth protocol to communicate; The first slave device is used to determine whether the mobile terminal is disconnected from the local device; it is also used to encapsulate the collected user's health data into a data packet to be processed if the connection is not disconnected, and send the data packet to be processed to the mobile terminal for the mobile terminal to process the data packet, wherein the destination address of the data packet to be processed is the Bluetooth address of the second slave device or the Bluetooth address of the mobile terminal.

8. A device for inter-device communication, characterized in that, The device includes: a memory, a processor, and an inter-device communication program stored in the memory and executable on the processor, the inter-device communication program being configured to implement the steps of the inter-device communication method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores a program for inter-device communication, which, when executed by a processor, implements the steps of the inter-device communication method as described in any one of claims 1 to 6.