WO2024088241A1 - 设备间通信的方法、系统、设备及存储介质 - Google Patents
设备间通信的方法、系统、设备及存储介质 Download PDFInfo
- Publication number
- WO2024088241A1 WO2024088241A1 PCT/CN2023/126130 CN2023126130W WO2024088241A1 WO 2024088241 A1 WO2024088241 A1 WO 2024088241A1 CN 2023126130 W CN2023126130 W CN 2023126130W WO 2024088241 A1 WO2024088241 A1 WO 2024088241A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- slave device
- processed
- data packet
- mobile terminal
- inter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/23—Reliability checks, e.g. acknowledgments or fault reporting
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H40/00—ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
- G16H40/60—ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices
- G16H40/67—ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices for remote operation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L51/00—User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
- H04L51/21—Monitoring or handling of messages
- H04L51/214—Monitoring or handling of messages using selective forwarding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
- H04W84/20—Leader-follower arrangements
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present application relates to the field of communication technology, and in particular to a method, system, device and storage medium for communication between devices.
- mobile terminals are connected to wearable devices and AR devices via Bluetooth.
- the mobile terminal establishes Bluetooth connections with AR devices and wearable devices respectively; however, wearable devices and AR devices cannot share data, that is, users must use mobile terminals to view data uploaded by wearable devices or AR devices, which reduces the convenience of users viewing content.
- the main purpose of this application is to provide a method, system, device and storage medium for communication between devices, aiming to solve the technical problem of reducing the convenience of users viewing content.
- the present application provides a method for inter-device communication, which is applied to a mobile terminal, and the method for inter-device communication includes the following steps:
- determining whether the data packet to be processed needs to be processed by parsing a flag field in the data packet to be processed, wherein the data packet to be processed is sent to the local by the first slave device, and the data packet to be processed carries the health data of the user collected by the first slave device;
- 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.
- the method before the step of determining whether it is necessary to process the data packet to be processed by parsing the flag bit field in the data packet to be processed when the data packet to be processed is received, the method further includes:
- the Bluetooth address of the second slave device 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
- the Bluetooth address of the first slave device successfully paired for the first time is sent to the second slave device so that the second slave device can save the Bluetooth address of the first slave device.
- the method before the step of determining whether it is necessary to process the data packet to be processed by parsing the flag bit field in the data packet to be processed when the data packet to be processed is received, the method further includes:
- determining whether the heartbeat packet needs to be forwarded wherein the heartbeat packet is first sent from the device to the local device;
- the heartbeat packet is sent to the second slave device
- 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.
- the method further includes:
- the health data of the user carried in the data packet to be processed is extracted and saved locally.
- the present application also provides a method for inter-device communication, which is applied to a first slave device, and the method for inter-device communication includes the following steps:
- the collected user health data is encapsulated as 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, 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.
- the method further includes:
- the Bluetooth address of the second slave device is obtained by querying the local Bluetooth address book, where the Bluetooth address of the second slave device is sent to the local after the mobile terminal completes the first pairing with the second slave device;
- 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.
- the step of determining whether the mobile terminal is disconnected from the local area includes:
- the destination address of the heartbeat packet is the Bluetooth address of the mobile terminal or the Bluetooth address of the second slave device
- the feedback information of no response from the second slave device is received for a preset number of consecutive times, and the second response data packet based on the heartbeat packet feedback from the mobile terminal is not received, it is determined that the mobile terminal is disconnected from the local area, wherein the feedback information is sent by the mobile terminal to the local area.
- the present application also provides a system for inter-device communication, the system comprising: a mobile terminal, a first slave device, and a second slave device;
- the mobile terminal is used to, when receiving a data packet to be processed, determine whether the data packet to be processed needs to be processed by parsing a flag field in the data packet to be processed, wherein the data packet to be processed is sent to the local by the first slave device, and the data packet to be processed carries the health data of the user collected by the first slave device; if processing is not required, obtain the destination address of the data packet to be processed; if the destination address is consistent with the Bluetooth address of the second slave device connected to the local, 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;
- the first slave device is used to determine whether the mobile terminal is disconnected from the local area; and is also used to encapsulate the collected user 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 to be processed, 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.
- the present application also provides a device for inter-device communication, the device comprising: a memory, a processor, and a program for inter-device communication stored in the memory and executable on the processor, the program for inter-device communication being configured to implement the steps of a method for inter-device communication as described in any one of the above items.
- the present application also provides a storage medium, on which a program for inter-device communication is stored.
- a program for inter-device communication is stored.
- the steps of the method for inter-device communication as described in any one of the above items are implemented.
- the present application provides a method for communication between devices. Compared with the prior art, users must use mobile terminals to view data uploaded by wearable devices or AR devices, which reduces the convenience of users viewing content.
- a first slave device uploads a pending data packet carrying health data to a mobile terminal, and the mobile terminal determines whether the pending data packet needs to be processed. If not, the mobile terminal verifies the destination address of the pending data packet and the Bluetooth address of a second slave device connected locally. If they are consistent, the pending data packet is forwarded to the second slave device, and the second slave device can display the health data to the user, thereby realizing communication between the first slave device and the second slave device. The user can directly view the health data through the second slave device, not only through the mobile terminal.
- the second slave device is an AR device.
- the first slave device is the AR device
- the second slave device is the wearable device. That is, the present application realizes communication between wearable devices and AR devices, and improves the convenience of users viewing content.
- FIG1 is a schematic flow chart of a first embodiment of a method for inter-device communication in the present application
- FIG2 is a schematic diagram of a first scenario of a method for inter-device communication according to a first embodiment of the present application
- FIG3 is a schematic diagram of a second scenario of the method for inter-device communication according to the first embodiment of the present application.
- FIG4 is a schematic diagram of a third scenario of the method for inter-device communication according to the first embodiment of the present application.
- FIG5 is a schematic diagram of the structure of devices for inter-device communication in the hardware operating environment involved in the embodiment of the present application.
- first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
- first information may also be referred to as the second information
- second information may also be referred to as the first information.
- the present application provides a method for inter-device communication.
- the method is applied to a mobile terminal.
- the method for inter-device communication includes:
- Step S10 when receiving a data packet to be processed, determining whether the data packet to be processed needs to be processed by parsing a flag field in the data packet to be processed, wherein the data packet to be processed is sent to the local by the first slave device, and the data packet to be processed carries the health data of the user collected by the first slave device;
- Step S20 If no processing is required, obtaining the destination address of the data packet to be processed;
- Step S30 If the destination address is consistent with the Bluetooth address of a 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, wherein when the first slave device is a wearable device, the second slave device is an AR device, and when the first slave device is the AR device, the second slave device is the wearable device.
- the mobile terminal is connected to the wearable device and the AR device through BLE (Bluetooth Low Energy).
- BLE Bluetooth Low Energy
- the mobile terminal as the master device (BLE master) is connected to the AR device (first slave device, BLE slave) and the wearable device (second slave device, BLE slave) through BLE.
- the wearable device The wearable device and the AR device cannot be connected via BLE communication, that is, the wearable device and the AR device (between the two slave devices) cannot share data.
- the mobile terminal, wearable device, and AR device only support BLE Bluetooth protocol and do not support traditional Bluetooth protocol (Bluetooth, BT).
- a BLE slave device cannot simultaneously function as a BLE master device and be connected to other BLE slave devices via BLE communication. That is, an AR device functioning as a BLE slave device cannot simultaneously function as a BLE slave device and be connected to a wearable device via BLE communication.
- the purpose of this embodiment is to use the mobile terminal as a data transfer station to share the user's health data collected by the wearable device with the AR device, thereby solving the problem that data cannot be shared between the wearable device and the AR device.
- the method for inter-device communication is applied to a mobile terminal in an inter-device communication system, and the inter-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.
- the mobile terminal may be a mobile phone, a notebook, a tablet computer, etc., without specific limitation.
- the wearable device may be a portable device such as a watch, a wristband, a ring, an armband, etc., without specific limitation.
- the AR device may be AR glasses, an AR helmet, etc., without specific limitation.
- the wearable device is used to collect the user's health data and also to display the content shared by the AR device to the user.
- the AR device is used to collect the user's health data and also to display the content shared by the wearable device to the user.
- the user's health data may be vital sign status data such as heart rate and blood oxygen, or may be exercise data such as number of steps and exercise mileage, etc., without specific limitation.
- the data packet to be processed includes a flag field, a destination address field (Bluetooth Mac address, Bluetooth address), and payload (payload data), where the payload data is the user's health data collected by the first slave device; referring to Figure 4, the flag field can occupy 0-8 bytes (Bit), the Bluetooth Mac address occupies 0-64 bytes, and the payload data can occupy 0-224 bytes.
- the flag field can occupy 0-8 bytes (Bit)
- the Bluetooth Mac address occupies 0-64 bytes
- payload data can occupy 0-224 bytes.
- Step S10 When receiving a data packet to be processed, determining 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 The packet is sent to the local by the first slave device, and the data packet to be processed carries the health data of the user collected by the first slave device;
- the first slave device uploads a data packet to be processed that carries health data to the mobile terminal, and the mobile terminal determines whether the data packet to be processed needs to be processed.
- 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.
- the flag field can be set to 0 or 1, or to a flag 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.
- the processing method of the data to be processed may be local storage, analysis, etc., which is not specifically limited.
- the data to be processed may be forwarded locally, discarded, etc., without specific limitation.
- the method further includes:
- Step S40 If processing is required, extract the health data of the user carried in the data packet to be processed and save it locally.
- the flag field is 0 or A, it is determined that the data to be processed needs to be processed, and the health data of the user carried in the data packet to be processed is extracted.
- the payload field in the data packet to be processed may be extracted to obtain the payload data, that is, the health data of the user may be obtained, the health data of the user may be saved locally, and the original local data may be updated so that the user can view the health data through the mobile terminal.
- Step S20 If no processing is required, obtaining the destination address of the data packet to be processed;
- 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.
- the destination address of the data packet to be processed may be obtained by parsing the destination address field of the data packet to be processed, wherein the destination address is a Bluetooth address, and the destination address may be the Bluetooth address of the second slave device and the Bluetooth address of the first slave device.
- the data packet to be processed is parsed. Before the step of judging whether the to-be-processed data packet needs to be processed according to the flag bit field in the data packet, the method further comprises:
- Step S60 Send the Bluetooth address of the second slave device that is 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 is 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.
- the mobile terminal sends the Bluetooth address of the second slave device that is successfully paired for the first time to the first slave device, and the first slave device saves the Bluetooth address of the second slave device to the local Bluetooth address book, and 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 that is successfully paired for the first time to the second slave device, and the second slave device saves the Bluetooth address of the first slave device to the local Bluetooth address book, and 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.
- 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 the 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.
- the method before the step of determining whether to process the data packet to be processed by parsing the flag bit field in the data packet to be processed when the data packet to be processed is received, the method further includes:
- Step S70 when a heartbeat packet is received, determining whether the heartbeat packet needs to be forwarded, wherein the heartbeat packet is sent from the first slave device to the local device;
- the first slave device before the first slave device sends a data packet to be processed to the mobile terminal, it is necessary to send a heartbeat packet to the mobile terminal to determine whether to be disconnected from the mobile terminal.
- the destination address of the heartbeat packet is 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 is necessary to determine whether to forward the heartbeat packet by parsing the flag field of the heartbeat packet.
- Step S80 If forwarding is required, the heartbeat packet is sent to the second slave device;
- the mobile terminal forwards the heartbeat packet to the second slave device.
- Step S90 if the first response data packet fed back by the second slave device based on the heartbeat packet is not received, feeding back to the first slave device that the second slave device has not responded;
- the mobile terminal does not receive the first response data packet from the second slave device based on the heartbeat packet feedback, it is determined that the second slave device and the mobile terminal are in a disconnected state, and the mobile terminal sends the feedback information of the second slave device not responding to the first slave device, so that the first slave device can know that the second slave device and the mobile terminal are disconnected, thereby avoiding the situation where it is mistakenly judged that the mobile terminal and the first slave device are disconnected.
- Step S100 if a first response data packet is received from the second slave device based on the heartbeat packet feedback, the first response data packet is forwarded to the first slave device, so that the first slave device can determine whether the second slave device is connected to the local device.
- the mobile terminal if the mobile terminal receives a first response data packet from the second slave device based on the heartbeat packet feedback, 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.
- Step S30 If the destination address is consistent with the Bluetooth address of a 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.
- this embodiment targets a scenario in which the mobile terminal is connected to the second slave device, and at the same time, the mobile terminal is connected to the first slave device.
- the mobile terminal determines that the to-be-processed data packet does not need to be processed, it needs to forward the to-be-processed data packet to the second slave device connected to the local area.
- the destination address is consistent with the Bluetooth address of the second slave device connected locally.
- the user is prompted that the second slave device has been disconnected and data cannot be shared, so that the user can connect the second slave device to the mobile terminal in time.
- 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.
- the first slave device uploads the data packet to be processed carrying the health data to the mobile terminal, and the mobile terminal determines whether the data packet to be processed needs to be processed. If it does not need to be processed, the mobile terminal checks the destination address of the data packet to be processed and the bluetooth of the second slave device connected locally. If the tooth address is consistent, the data packet to be processed 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 health data of the user carried in the data packet to be processed and saves it locally, thereby realizing communication among the wearable device, the mobile terminal and the AR device. The user can view the health data through the wearable device or the AR device, and can also view the health data through the mobile terminal, instead of only through the mobile terminal, which improves the convenience of users viewing content.
- the step of inter-device communication includes:
- Step S110 Determine whether the mobile terminal is disconnected from the local area
- the method of inter-device communication is applied to a first slave device in a system for inter-device communication
- the system for inter-device communication also includes a mobile terminal and a second slave device, wherein when the first slave device is a wearable device, the second slave device is an AR device, and when the first slave device is the AR device, the second slave device is the wearable device.
- the first slave device before the first slave device sends the data packet to be processed to the mobile terminal, it is necessary to first determine whether the mobile terminal is disconnected from the local area. If the connection is not disconnected, the first slave device can directly send the data packet to be processed to the mobile terminal to achieve communication between the first slave device and the mobile terminal and the second slave device (refer to Embodiment 1). If the connection is disconnected, the first slave device needs to be directly connected to the second slave device to achieve communication.
- the step of determining whether the mobile terminal is disconnected from the local area includes:
- Step A1 sending 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;
- the method for determining whether the mobile terminal is disconnected from the local is: 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.
- Step A2 If the feedback information that the second slave device does not respond is received within a preset number of consecutive times, and the second response data packet based on the heartbeat packet feedback of the mobile terminal is not received, then determine the The mobile terminal is disconnected from the local area, wherein the feedback information is sent by the mobile terminal to the local area.
- the first slave device receives feedback information that the second slave device sent by the mobile terminal to the local area does not respond within a consecutive preset number of times, 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 feedback from the mobile terminal is not received within the consecutive preset number of times, it is determined that the mobile terminal is disconnected from the first slave device; at this time, the wearable device, the mobile terminal and the AR device are not connected to each other.
- the mobile terminal is not disconnected from the first slave device, that is, the first slave device cannot be directly connected to the second slave device through the BLE.
- 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, 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.
- 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 to be processed (refer to Example 1).
- the method further includes:
- Step S130 if the connection is disconnected, obtaining the Bluetooth address of the second slave device by querying the local Bluetooth address book, where the Bluetooth address of the second slave device is sent to the local after the mobile terminal completes the first pairing with the second slave device;
- a local Bluetooth address book is queried, in which the Bluetooth address of the second slave device and the Bluetooth address of the mobile terminal are stored.
- the Bluetooth address of the second slave device is obtained by querying a local Bluetooth address book.
- Step S140 initiating a connection request to the second slave device based on the Bluetooth address of the second slave device
- the first slave device when the first slave device encapsulates the health data of the user, it modifies the destination address field to the Bluetooth address of the second slave device, and the first slave device sends the re-encapsulated data packet to the second slave device.
- the datagram is sent to the second slave device, and a connection request is initiated to the second slave device.
- 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.
- 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 be processed to the second slave device, so that the second slave device can display the health data to the user.
- the first slave device can initiate a connection request to the second slave device based on the Bluetooth address of the second slave device when it determines that the mobile terminal is disconnected from the local area. If the connection is successful, the to-be-processed data packet can be directly sent 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 around, 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 viewing the content.
- FIG. 5 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
- the device 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 connection and communication between the processor 1001 and the memory 1005 .
- the device for inter-device communication may also include a user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, a WiFi module, etc.
- the user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface.
- the network interface may include a standard wired interface and a wireless interface (such as a WI-FI interface).
- the device structure for inter-device communication shown in FIG. 5 does not limit the devices for inter-device communication and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
- the memory 1005 as a storage medium may include an operating system, a network communication module, and a program for inter-device communication.
- the operating system is a program that manages and controls the hardware and software resources of the device for inter-device communication, and supports programs for inter-device communication and other software and/or programs.
- the network communication module is used to realize the communication between the components inside the memory 1005, and the communication between other hardware and software in the system for inter-device communication.
- the processor 1001 is used to execute the program for inter-device communication stored in the memory 1005 to implement the steps of any of the above-mentioned methods for inter-device communication.
- the present application also provides a system for inter-device communication, the system comprising: a mobile terminal, a first slave device, and a second slave device;
- the mobile terminal is used to, when receiving a data packet to be processed, determine whether the data packet to be processed needs to be processed by parsing a flag field in the data packet to be processed, wherein the data packet to be processed is sent to the local by the first slave device, and the data packet to be processed carries the health data of the user collected by the first slave device; if processing is not required, obtain the destination address of the data packet to be processed; if the destination address is consistent with the Bluetooth address of the second slave device connected to the local, 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;
- the mobile terminal is also used to send the Bluetooth address of the second slave device that is 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 is 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.
- the mobile terminal is also used to determine whether it is necessary to forward the heartbeat packet when receiving the heartbeat packet, wherein the heartbeat packet is sent from the first slave device to the local device; and is also used to send the heartbeat packet to the second slave device if forwarding is required; and is also used to feedback to the first slave device that the second slave device has not responded if a first response data packet based on the heartbeat packet feedback from the second slave device is not received; and is also used to forward the first response data packet to the first slave device if a first response data packet based on the heartbeat packet feedback from the second slave device is received, so that the first slave device can determine that the second slave device is connected to the local device.
- the mobile terminal is further used to extract the health data of the user carried in the data packet to be processed, if processing is required, and save it locally.
- the first slave device is used to determine whether the mobile terminal is disconnected from the local area; and is also used to encapsulate the collected user 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 to be processed, 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.
- the first slave device is also used to obtain the Bluetooth address of the second slave device by querying the local Bluetooth address book if the connection is disconnected, and the Bluetooth address of the second slave device is sent to the local by the mobile terminal after completing the first pairing with the second slave device; it is also used to initiate a connection request to the second slave device based on the Bluetooth address of the second slave device; and it is also used to send the to-be-processed data packet to the second slave device if the connection is successful, so that the second slave device can display the health data to the user.
- the first slave device is also used 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 also used to determine that the mobile terminal is disconnected from the local area if feedback information of no response from the second slave device is received for a preset number of consecutive times and a second response data packet based on the heartbeat packet feedback from the mobile terminal is not received, wherein the feedback information is sent by the mobile terminal to the local area.
- the present application also provides a storage medium, on which a program for inter-device communication is stored.
- a program for inter-device communication is stored.
- the steps of the method for inter-device communication as described in any one of the above items are implemented.
- the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
- a storage medium such as ROM/RAM, magnetic disk, optical disk
- a terminal device which can be a mobile phone, computer, server, air conditioner, or network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- General Business, Economics & Management (AREA)
- Epidemiology (AREA)
- Business, Economics & Management (AREA)
- Medical Informatics (AREA)
- Primary Health Care (AREA)
- Public Health (AREA)
- Cardiology (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本申请一些实施例公开了一种设备间通信的方法、系统、设备及存储介质,相较于现有技术用户必须使用移动终端才可查看第一从设备或第二从设备上传的数据,降低了用户查看内容的便捷性,属于通信技术领域,本申请第一从设备将携带有健康数据的待处理数据包上传至移动终端,移动终端判断是否需要处理所述待处理数据包,若不需要处理,则移动终端核对待处理数据包的目的地址,以及与本地连接的第二从设备的蓝牙地址,若一致,则将该待处理数据包转发至第二从设备,第二从设备即可向用户展示所述健康数据,实现可穿戴设备与AR设备间的通信,用户可以通过AR设备或可穿戴设备直接查看健康数据,不是只能通过移动终端查看健康数据,提升了用户查看内容的便捷性。
Description
本申请要求于2022年10月26日提交中国专利局、申请号为202211321248.9发明名称为“设备间通信的方法、系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及一种设备间通信的方法、系统、设备及存储介质。
随着元宇宙概念的兴起,越来越多的AR(Augmented Reality,增强现实技术)产品走进人们的日常生活。一般地,移动终端与可穿戴设备、AR设备之间分别通过蓝牙连接,移动终端作为主设备,分别与AR设备建立蓝牙连接,与可穿戴设备建立蓝牙连接;然而,可穿戴设备与AR设备之间无法共享数据,即,用户必须使用移动终端才可查看可穿戴设备或AR设备上传的数据,降低了用户查看内容的便捷性。
发明内容
本申请的主要目的在于提供一种设备间通信的方法、系统、设备及存储介质,旨在解决降低了用户查看内容的便捷性的技术问题。
为实现上述目的,本申请提供一种设备间通信的方法,应用于移动终端,所述设备间通信的方法包括以下步骤:
当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;
若不需要处理,则获取所述待处理数据包的目的地址;
若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据。
在本申请的一种可能的实施方式中,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之前,所述方法还包括:
将首次配对成功的第二从设备的蓝牙地址发送至第一从设备,以供所述第一从设备保存所述第二从设备的蓝牙地址,并将首次配对成功的第一从设备的蓝牙地址发送至第二从设备,以供所述第二从设备保存所述第一从设备的蓝牙地址。
在本申请的一种可能的实施方式中,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之前,所述方法还包括:
当接收到心跳包时,判断是否需要转发所述心跳包,其中,所述心跳包是第一从设备发送至本地的;
若需要转发,则将所述心跳包发送至所述第二从设备;
若未接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则向所述第一从设备反馈所述第二从设备未响应;
若接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则将所述第一响应数据包转发至所述第一从设备,以供所述第一从设备确定所述第二从设备与本地处于连接状态。
在本申请的一种可能的实施方式中,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之后,所述方法还包括:
若需要处理,则提取所述待处理数据包中携带的所述用户的健康数据,并保存至本地。
本申请还提供一种设备间通信的方法,应用于第一从设备,所述设备间通信的方法包括以下步骤:
确定移动终端与本地是否断开连接;
若未断开连接,则将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包,其中,所述待处理数据包的目的地址为第二从设备的蓝牙地址或所述移动终端的蓝牙地址。
在本申请的一种可能的实施方式中,所述确定移动终端与本地是否断开连接的步骤之后,所述方法还包括:
若断开连接,则通过查询本地的蓝牙地址簿,获取所述第二从设备的蓝牙地址,所述第二从设备的蓝牙地址是所述移动终端在完成与所述第二从设备的首次配对后发送至本地的;
基于所述第二从设备的蓝牙地址,向所述第二从设备发起连接请求;
若连接成功,则将所述待处理数据包发送至所述第二从设备,以供所述第二从设备向用户展示所述健康数据。
在本申请的一种可能的实施方式中,所述确定所述移动终端与本地是否断开连接的步骤,包括:
向所述移动终端发送心跳包,其中,所述心跳包的目的地址为所述移动终端的蓝牙地址或所述第二从设备的蓝牙地址;
若连续预设次数内接收到所述第二从设备未响应的反馈信息,且未接收到所述移动终端基于所述心跳包反馈的第二响应数据包,则确定所述移动终端与本地断开连接,其中,所述反馈信息是所述移动终端发送至本地的。
本申请还提供一种设备间通信的系统,所述系统包括:移动终端、第一从设备以及第二从设备;
所述移动终端用于当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;还用于若不需要处理,则获取所述待处理数据包的目的地址;还用于若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据;
所述第一从设备用于确定移动终端与本地是否断开连接;还用于若未断开连接,则将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包,其中,所述待处理数据包的目的地址为第二从设备的蓝牙地址或所述移动终端的蓝牙地址。
本申请还提供一种设备间通信的设备,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的设备间通信的程序,所述设备间通信的程序配置为实现如上述任一项所述的设备间通信的方法的步骤。
本申请还提供一种存储介质,所述存储介质上存储有设备间通信的程序,所述设备间通信的程序被处理器执行时实现如上述任一项所述的设备间通信的方法的步骤。
本申请提供一种设备间通信的方法,相较于现有技术用户必须使用移动终端才可查看可穿戴设备或AR设备上传的数据,降低了用户查看内容的便捷性,本申请第一从设备将携带有健康数据的待处理数据包上传至移动终端,移动终端判断是否需要处理所述待处理数据包,若不需要处理,则移动终端核对待处理数据包的目的地址,以及与本地连接的第二从设备的蓝牙地址,若一致,则将该待处理数据包转发至第二从设备,第二从设备即可向用户展示所述健康数据,实现第一从设备与第二从设备间的通信,用户可以通过第二从设备直接查看健康数据,不是只能通过移动终端查看健康数据,当所述第一从设备为可穿戴设备时,所述第二从设备为AR设备,当所述第一从设备为所述AR设备时,所述第二从设备为所述可穿戴设备,即,本申请实现了可穿戴设备和AR设备之间的通信,提升了用户查看内容的便捷性。
图1为本申请一种设备间通信的方法的第一实施例的流程示意图;
图2为本申请第一实施例的设备间通信的方法的第一场景示意图;
图3为本申请第一实施例的设备间通信的方法的第二场景示意图;
图4为本申请第一实施例的设备间通信的方法的第三场景示意图;
图5是本申请实施例方案涉及的硬件运行环境的设备间通信的设备的结构示意图。
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。
本申请实施例提供了一种设备间通信的方法,参照图1,在本实施例中,应用于移动终端,所述设备间通信的方法包括:
步骤S10:当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;
步骤S20:若不需要处理,则获取所述待处理数据包的目的地址;
步骤S30:若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据,其中,当所述第一从设备为可穿戴设备时,所述第二从设备为AR设备,当所述第一从设备为所述AR设备时,所述第二从设备为所述可穿戴设备。
本实施例的研发背景:如图2所示,移动终端与可穿戴设备、AR设备之间分别通过BLE(Bluetooth Low Energy,低功耗蓝牙)连接,移动终端作为主设备(BLE master),分别与AR设备(第一从设备,BLE slave)通过BLE连接,与可穿戴设备(第二从设备,BLE slave)通过BLE连接;然而,可穿
戴设备与AR设备之间无法通过BLE通信连接,即,可穿戴设备与AR设备之间(两个从设备之间)无法共享数据。
具体地,所述移动终端、可穿戴设备、AR设备均只支持BLE一种蓝牙协议,不支持传统蓝牙协议(Bluetooth,BT)。
具体地,BLE从设备无法同时作为BLE主设备与其他BLE从设备通过BLE通信连接,即,作为BLE从设备的AR设备无法同时与可穿戴设备通过BLE通信连接。
本实施例旨在:将移动终端作为数据中转站,将可穿戴设备采集的用户的健康数据共享给AR设备,解决可穿戴设备与AR设备之间无法共享数据的问题。
在本实施例中,设备间通信的方法应用于设备间通信的系统中的移动终端,所述设备间通信的系统还包括可穿戴设备和AR设备,其中,所述可穿戴设备至少有一个,所述AR设备至少有一个。
作为一种示例,移动终端可以是手机、笔记本、平板电脑等,具体不做限定。
作为一种示例,可穿戴设备可以是手表、腕带、戒指、臂环等便携式设备,具体不做限定。
作为一种示例,AR设备可以是AR眼镜和AR头盔等,具体不做限定。
作为一种示例,所述可穿戴设备用于采集用户的健康数据,还用于向用户展示所述AR设备共享的内容,所述AR设备用于采集用户的健康数据,还用于向用户展示所述可穿戴设备共享的内容。
作为一种示例,所述用户的健康数据可以是心率、血氧等体征状态数据,还可以是步数、运动里程等运动数据等,具体不做限定。
作为一种示例,待处理数据包包含标志位字段、目的地址字段(蓝牙Mac地址,蓝牙地址)、playload(有效载荷数据),所述有效载荷数据为所述第一从设备采集的用户的健康数据;参照图4,所述标志位字段可以占0-8字节(Bit),蓝牙Mac地址占0-64字节,所述有效载荷数据可以占0-224字节。
具体步骤如下:
步骤S10:当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据
包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;
作为一种示例,第一从设备将携带有健康数据的待处理数据包上传至移动终端,移动终端判断是否需要处理所述待处理数据包。
具体地,移动终端通过解析所述待处理数据包的标志位字段,判断是否需要处理所述待处理数据包。
作为一种示例,标志位字段可以设定为0或1,也可以设定为A或B等标志,若标志位字段为0或A,则确定需要处理该待处理数据,若标志位字段为1或B,则不需要处理该待处理数据。
作为一种示例,需要处理该待处理数据时,对该待处理数据的处理方式可以是在本地进行存储、解析等,具体不做限定。
作为一种示例,不需要处理该待处理数据时,对该待处理数据的对待方式可以是从本地转发、丢弃等,具体不做限定。
在本实施例中,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之后,所述方法还包括:
步骤S40:若需要处理,则提取所述待处理数据包中携带的所述用户的健康数据,并保存至本地。
作为一种示例,若标志位字段为0或A,则确定需要处理该待处理数据,则提取所述待处理数据包中携带的所述用户的健康数据。
作为一种示例,可以是提取所述待处理数据包中的playload字段,获取有效载荷数据,即,获取所述用户的健康数据,将所述用户的健康数据保存至本地,并更新本地原有数据,以供用户通过移动终端查看所述健康数据。
步骤S20:若不需要处理,则获取所述待处理数据包的目的地址;
作为一种示例,若标志位字段为1或B,则确定不需要处理所述待处理数据包,则获取所述待处理数据包的目的地址。
具体地,可以是通过解析所述待处理数据包的目的地址字段,,获取所述待处理数据包的目的地址,所述目的地址为蓝牙地址,所述目的地址可以是第二从设备的蓝牙地址以及第一从设备的蓝牙地址。
在本实施例中,所述当接收到待处理数据包时,通过解析所述待处理数
据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之前,所述方法还包括:
步骤S60:将首次配对成功的第二从设备的蓝牙地址发送至第一从设备,以供所述第一从设备保存所述第二从设备的蓝牙地址,并将首次配对成功的第一从设备的蓝牙地址发送至第二从设备,以供所述第二从设备保存所述第一从设备的蓝牙地址。
作为一种示例,移动终端将首次配对成功的第二从设备的蓝牙地址发送至第一从设备,第一从设备将第二从设备的蓝牙地址保存至本地的蓝牙地址簿,第一从设备本地的蓝牙地址簿存储有移动终端的蓝牙地址和第二从设备的蓝牙地址;移动终端将首次配对成功的第一从设备的蓝牙地址发送至第二从设备,第二从设备将第一从设备的蓝牙地址保存至本地的蓝牙地址簿,第二从设备本地的蓝牙地址簿存储有移动终端的蓝牙地址和第一从设备的蓝牙地址。
作为一种示例,当第一从设备采集到用户的健康数据后,可以选择将其发送至移动终端或者发送至第二从设备,因此,第一从设备通过查询本地的蓝牙地址簿,基于蓝牙地址簿中的蓝牙地址将用户的健康数据发送至移动终端或者发送至第二从设备。
在本实施例中,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之前,所述方法还包括:
步骤S70:当接收到心跳包时,判断是否需要转发所述心跳包,其中,所述心跳包是第一从设备发送至本地的;
在本实施例中,在第一从设备向移动终端发送待处理数据包之前,需要向移动终端发送心跳包,以确定是否与移动终端断连。然而,所述心跳包的目的地址为所述移动终端的蓝牙地址或所述第二从设备的蓝牙地址。即,当移动终端接收到所述心跳包时,需要通过解析所述心跳包的标志位字段,判断是否需要转发所述心跳包。
步骤S80:若需要转发,则将所述心跳包发送至所述第二从设备;
作为一种示例,若所述标志位字段为1或B,则确定需要转发所述心跳包,则移动终端将所述心跳包转发至所述第二从设备。
步骤S90:若未接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则向所述第一从设备反馈所述第二从设备未响应;
作为一种示例,若移动终端未接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则确定所述第二从设备与所述移动终端处于断开连接的状态,移动终端将所述第二从设备未响应的反馈信息发送至第一从设备,以供第一从设备得知所述第二从设备与所述移动终端发生断连,避免出现误判为移动终端与第一从设备之间断连的情况。
步骤S100:若接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则将所述第一响应数据包转发至所述第一从设备,以供所述第一从设备确定所述第二从设备与本地处于连接状态。
作为一种示例,若移动终端接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则移动终端将所述第一响应数据包转发至第一从设备,以供第一从设备确定所述第二从设备与本地处于连接状态。
步骤S30:若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据。
作为一种示例,本实施例针对的场景为移动终端与第二从设备处于连接状态,同时,移动终端与第一从设备处于连接状态。
具体地,当移动终端确定不需要处理所述待处理数据包时,则需要将所述待处理数据包转发至与本地连接的第二从设备。
具体地,基于获取的所述待处理数据包的目的地址,确定所述目的地址和与本地连接的第二从设备的蓝牙地址是否一致。
作为一种示例,若不一致,则向用户提示所述第二从设备已断开连接,无法共享数据,以供用户及时将第二从设备连接至移动终端。
作为一种示例,若一致,则提取所述待处理数据包中携带的用户的健康数据,重新封包后转发至第二从设备,以供所述第二从设备向用户展示所述健康数据。
在本实施例中,第一从设备将携带有健康数据的待处理数据包上传至移动终端,移动终端判断是否需要处理所述待处理数据包,若不需要处理,则移动终端核对待处理数据包的目的地址,以及与本地连接的第二从设备的蓝
牙地址,若一致,则将该待处理数据包转发至第二从设备,所述用户可以通过所述第二从设备查看所述健康数据;若需要处理,则移动终端提取所述待处理数据包中携带的所述用户的健康数据,并保存至本地,实现可穿戴设备、移动终端以及AR设备三者之间的通信,用户既可以通过可穿戴设备或AR设备查看健康数据,还可以通过移动终端查看健康数据,不是只能通过移动终端查看健康数据,提升了用户查看内容的便捷性。
进一步地,基于本申请中第一实施例,提供本申请的另一实施例,在该实施例中,应用于第一从设备,所述设备间通信的步骤,包括:
步骤S110:确定移动终端与本地是否断开连接;
在本实施例中,设备间通信的方法应用于设备间通信的系统中的第一从设备,所述设备间通信的系统还包括移动终端和第二从设备,其中,当所述第一从设备为可穿戴设备时,所述第二从设备为AR设备,当所述第一从设备为所述AR设备时,所述第二从设备为所述可穿戴设备。
在本实施例中,所述第一从设备在向所述移动终端发送待处理数据包之前,需要先确定移动终端与本地是否断开连接,若未断开连接,则第一从设备可以直接向移动终端发送待处理数据包,实现第一从设备与移动终端、第二从设备之间的通信(参照实施例一)。若已断开连接,则第一从设备需要与第二从设备直接连接,以实现通信。
在本实施例中,所述确定所述移动终端与本地是否断开连接的步骤,包括:
步骤A1:向所述移动终端发送心跳包,其中,所述心跳包的目的地址为所述移动终端的蓝牙地址或所述第二从设备的蓝牙地址;
在本实施例中,确定所述移动终端与本地是否断开连接的方式为:第一从设备向移动终端发送心跳包,若第一从设备需要确定本地是否与移动终端为连接状态,则发出的所述心跳包的目的地址为移动终端的蓝牙地址;若第一从设备需要确定第二从设备是否与移动终端为连接状态,则发出的所述心跳包的目的地址为第二从设备的蓝牙地址。
步骤A2:若连续预设次数内接收到所述第二从设备未响应的反馈信息,且未接收到所述移动终端基于所述心跳包反馈的第二响应数据包,则确定所
述移动终端与本地断开连接,其中,所述反馈信息是所述移动终端发送至本地的。
作为一种示例,若第一从设备在连续预设次数内接收到移动终端发送至本地的所述第二从设备未响应的反馈信息,则确定所述第二从设备与所述移动终端之间断开连接;若同时在该连续预设次数内未接收到所述移动终端基于所述心跳包反馈的第二响应数据包,则确定所述移动终端与第一从设备断开连接;此时,可穿戴设备、移动终端以及AR设备三者之间互不相连。
否则,确定所述移动终端与第一从设备未断开连接,即,第一从设备无法直接与第二从设备通过BLE连接。
步骤S120:若未断开连接,则将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包,其中,所述待处理数据包的目的地址为第二从设备的蓝牙地址或所述移动终端的蓝牙地址。
在本实施例中,若确定未断开连接,则第一从设备只能通过移动终端将用户的健康数据共享至第二从设备,具体地,第一从设备将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包(参照实施例一)。
在本实施例中,所述确定移动终端与本地是否断开连接的步骤之后,所述方法还包括:
步骤S130:若断开连接,则通过查询本地的蓝牙地址簿,获取所述第二从设备的蓝牙地址,所述第二从设备的蓝牙地址是所述移动终端在完成与所述第二从设备的首次配对后发送至本地的;
作为一种示例,若第一从设备确定所述移动终端与第一从设备断开连接,则查询本地的蓝牙地址簿,所述本地的蓝牙地址簿中存储有第二从设备的蓝牙地址以及移动终端的蓝牙地址。
具体地,通过查询本地的蓝牙地址簿,获取所述第二从设备的蓝牙地址。
步骤S140:基于所述第二从设备的蓝牙地址,向所述第二从设备发起连接请求;
作为一种示例,第一从设备在封装所述用户的健康数据时,将所述目的地址字段修改为第二从设备的蓝牙地址,第一从设备将重新封装的数据包发
送至第二从设备,向所述第二从设备发起连接请求。
步骤S150:若连接成功,则将所述待处理数据包发送至所述第二从设备,以供所述第二从设备向用户展示所述健康数据。
作为一种示例,若连接成功,则第一从设备可以直接将采集到的用户的健康数据,封装为待处理数据包,并将该待处理数据包发送至所述第二从设备,以供所述第二从设备向用户展示所述健康数据。
在本实施例中,若移动终端丢失或者移动终端不在身边时,用户无法通过移动终端查看健康数据,参照图3,此时第一从设备可以在确定移动终端与本地断开连接时,基于所述第二从设备的蓝牙地址,向所述第二从设备发起连接请求,若连接成功,则可以直接将所述待处理数据包发送至所述第二从设备,以供所述第二从设备向用户展示所述健康数据,即,当移动终端不在身边时,AR设备与可穿戴设备之间建立连接,用户可以在通过AR设备或可穿戴设备直接查看健康数据,进一步提升用户查看内容的便捷性。
参照图5,图5是本申请实施例方案涉及的硬件运行环境的设备结构示意图。
如图5所示,该设备间通信的设备可以包括:处理器1001,存储器1005,通信总线1002。通信总线1002用于实现处理器1001和存储器1005之间的连接通信。
可选地,该设备间通信的设备还可以包括用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、WiFi模块等等。用户接口可以包括显示屏(Display)、输入子模块比如键盘(Keyboard),可选用户接口还可以包括标准的有线接口、无线接口。网络接口可以包括标准的有线接口、无线接口(如WI-FI接口)。
本领域技术人员可以理解,图5中示出的设备间通信的设备结构并不构成对设备间通信的设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图5所示,作为一种存储介质的存储器1005中可以包括操作系统、网络通信模块以及设备间通信的程序。操作系统是管理和控制设备间通信的设备硬件和软件资源的程序,支持设备间通信的程序以及其它软件和/或程序的
运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与设备间通信的系统中其它硬件和软件之间通信。
在图5所示的设备间通信的设备中,处理器1001用于执行存储器1005中存储的设备间通信的程序,实现上述任一项所述的设备间通信的方法的步骤。
本申请设备间通信的设备具体实施方式与上述设备间通信的方法各实施例基本一致,在此不再赘述。
本申请还提供一种设备间通信的系统,所述系统包括:移动终端、第一从设备以及第二从设备;
所述移动终端用于当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;还用于若不需要处理,则获取所述待处理数据包的目的地址;还用于若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据;
在一种可能的实施方式中,所述移动终端还用于将首次配对成功的第二从设备的蓝牙地址发送至第一从设备,以供所述第一从设备保存所述第二从设备的蓝牙地址,并将首次配对成功的第一从设备的蓝牙地址发送至第二从设备,以供所述第二从设备保存所述第一从设备的蓝牙地址。
在一种可能的实施方式中,所述移动终端还用于当接收到心跳包时,判断是否需要转发所述心跳包,其中,所述心跳包是第一从设备发送至本地的;还用于若需要转发,则将所述心跳包发送至所述第二从设备;还用于若未接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则向所述第一从设备反馈所述第二从设备未响应;还用于若接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则将所述第一响应数据包转发至所述第一从设备,以供所述第一从设备确定所述第二从设备与本地处于连接状态。
在一种可能的实施方式中,所述移动终端还用于若需要处理,则提取所述待处理数据包中携带的所述用户的健康数据,并保存至本地。
所述第一从设备用于确定移动终端与本地是否断开连接;还用于若未断开连接,则将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包,其中,所述待处理数据包的目的地址为第二从设备的蓝牙地址或所述移动终端的蓝牙地址。
在一种可能的实施方式中,所述第一从设备还用于若断开连接,则通过查询本地的蓝牙地址簿,获取所述第二从设备的蓝牙地址,所述第二从设备的蓝牙地址是所述移动终端在完成与所述第二从设备的首次配对后发送至本地的;还用于基于所述第二从设备的蓝牙地址,向所述第二从设备发起连接请求;还用于若连接成功,则将所述待处理数据包发送至所述第二从设备,以供所述第二从设备向用户展示所述健康数据。
在一种可能的实施方式中,所述第一从设备还用于向所述移动终端发送心跳包,其中,所述心跳包的目的地址为所述移动终端的蓝牙地址或所述第二从设备的蓝牙地址;还用于若连续预设次数内接收到所述第二从设备未响应的反馈信息,且未接收到所述移动终端基于所述心跳包反馈的第二响应数据包,则确定所述移动终端与本地断开连接,其中,所述反馈信息是所述移动终端发送至本地的。
本申请设备间通信的系统的具体实施方式与上述设备间通信的方法各实施例基本相同,在此不再赘述。
本申请还提供一种存储介质,所述存储介质上存储有设备间通信的程序,所述设备间通信的程序被处理器执行时实现如上述任一项所述的设备间通信的方法的步骤。
本申请存储介质具体实施方式与上述设备间通信的各实施例基本相同,在此不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况
下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (10)
- 一种设备间通信的方法,其特征在于,应用于移动终端,所述设备间通信的方法,包括以下步骤:当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;若不需要处理,则获取所述待处理数据包的目的地址;若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据,其中,当所述第一从设备为可穿戴设备时,所述第二从设备为AR设备,当所述第一从设备为所述AR设备时,所述第二从设备为所述可穿戴设备。
- 如权利要求1所述的设备间通信的方法,其特征在于,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之前,所述方法还包括:将首次配对成功的第二从设备的蓝牙地址发送至第一从设备,以供所述第一从设备保存所述第二从设备的蓝牙地址,并将首次配对成功的第一从设备的蓝牙地址发送至第二从设备,以供所述第二从设备保存所述第一从设备的蓝牙地址。
- 如权利要求1所述的设备间通信的方法,其特征在于,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之前,所述方法还包括:当接收到心跳包时,判断是否需要转发所述心跳包,其中,所述心跳包是第一从设备发送至本地的;若需要转发,则将所述心跳包发送至所述第二从设备;若未接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则向所述第一从设备反馈所述第二从设备未响应;若接收到所述第二从设备基于所述心跳包反馈的第一响应数据包,则将所述第一响应数据包转发至所述第一从设备,以供所述第一从设备确定所述第二从设备与本地处于连接状态。
- 如权利要求2所述的设备间通信的方法,其特征在于,所述当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,的步骤之后,所述方法还包括:若需要处理,则提取所述待处理数据包中携带的所述用户的健康数据,并保存至本地。
- 一种设备间通信的方法,其特征在于,应用于第一从设备,所述设备间通信的方法包括以下步骤:确定移动终端与本地是否断开连接;若未断开连接,则将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包,其中,所述待处理数据包的目的地址为第二从设备的蓝牙地址或所述移动终端的蓝牙地址。
- 如权利要求1所述的设备间通信的方法,其特征在于,所述确定移动终端与本地是否断开连接的步骤之后,所述方法还包括:若断开连接,则通过查询本地的蓝牙地址簿,获取所述第二从设备的蓝牙地址,所述第二从设备的蓝牙地址是所述移动终端在完成与所述第二从设备的首次配对后发送至本地的;基于所述第二从设备的蓝牙地址,向所述第二从设备发起连接请求;若连接成功,则将所述待处理数据包发送至所述第二从设备,以供所述第二从设备向用户展示所述健康数据。
- 如权利要求1所述的设备间通信的方法,其特征在于,所述确定所述移动终端与本地是否断开连接的步骤,包括:向所述移动终端发送心跳包,其中,所述心跳包的目的地址为所述移动 终端的蓝牙地址或所述第二从设备的蓝牙地址;若连续预设次数内接收到所述第二从设备未响应的反馈信息,且未接收到所述移动终端基于所述心跳包反馈的第二响应数据包,则确定所述移动终端与本地断开连接,其中,所述反馈信息是所述移动终端发送至本地的。
- 一种设备间通信的系统,其特征在于,所述系统包括:移动终端、第一从设备以及第二从设备;所述移动终端用于当接收到待处理数据包时,通过解析所述待处理数据包中的标志位字段,判断是否需要处理所述待处理数据包,其中,所述待处理数据包是第一从设备发送至本地的,所述待处理数据包携带有所述第一从设备采集的用户的健康数据;还用于若不需要处理,则获取所述待处理数据包的目的地址;还用于若所述目的地址和与本地连接的第二从设备的蓝牙地址一致,则将所述待处理数据包转发至所述第二从设备,以供所述用户通过所述第二从设备查看所述健康数据;所述第一从设备用于确定移动终端与本地是否断开连接;还用于若未断开连接,则将采集的用户的健康数据封装为待处理数据包,并将所述待处理数据包发送至所述移动终端,以供所述移动终端处理所述待处理数据包,其中,所述待处理数据包的目的地址为第二从设备的蓝牙地址或所述移动终端的蓝牙地址。
- 一种设备间通信的设备,其特征在于,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的设备间通信的程序,所述设备间通信的程序配置为实现如权利要求1至7中任一项所述的设备间通信的方法的步骤。
- 一种存储介质,其特征在于,所述存储介质上存储有设备间通信的程序,所述设备间通信的程序被处理器执行时实现如权利要求1至7任一项所述的设备间通信的方法的步骤。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US19/071,188 US20250240260A1 (en) | 2022-10-26 | 2025-03-05 | Method, system and device for inter-device communication, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211321248.9A CN115665712A (zh) | 2022-10-26 | 2022-10-26 | 设备间通信的方法、系统、设备及存储介质 |
| CN202211321248.9 | 2022-10-26 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/071,188 Continuation US20250240260A1 (en) | 2022-10-26 | 2025-03-05 | Method, system and device for inter-device communication, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024088241A1 true WO2024088241A1 (zh) | 2024-05-02 |
Family
ID=84991304
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/126130 Ceased WO2024088241A1 (zh) | 2022-10-26 | 2023-10-24 | 设备间通信的方法、系统、设备及存储介质 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20250240260A1 (zh) |
| CN (1) | CN115665712A (zh) |
| WO (1) | WO2024088241A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115665712A (zh) * | 2022-10-26 | 2023-01-31 | 歌尔科技有限公司 | 设备间通信的方法、系统、设备及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20160174071A1 (en) * | 2014-12-12 | 2016-06-16 | Intel Corporation | Authentication and authorization in a wearable ensemble |
| CN107395668A (zh) * | 2017-05-31 | 2017-11-24 | 捷开通讯(深圳)有限公司 | 可穿戴智能终端、云端服务器、存储装置及添加好友方法 |
| US9870716B1 (en) * | 2013-01-26 | 2018-01-16 | Ip Holdings, Inc. | Smart glasses and smart watches for real time connectivity and health |
| CN115665712A (zh) * | 2022-10-26 | 2023-01-31 | 歌尔科技有限公司 | 设备间通信的方法、系统、设备及存储介质 |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014030168A (ja) * | 2012-06-27 | 2014-02-13 | Murata Mach Ltd | 中継通信システム、及び中継通信装置 |
| KR20160035535A (ko) * | 2014-09-23 | 2016-03-31 | 엘지전자 주식회사 | 통신 페어링 방법, 통신 매개 장치, 이를 이용한 네트워크 제어 방법 및 네트워크 시스템 |
| KR102656605B1 (ko) * | 2014-11-05 | 2024-04-12 | 삼성전자주식회사 | 복수의 단말기들 간의 화면 공유를 제어하는 방법, 장치 및 기록 매체 |
| CN106371602A (zh) * | 2016-09-14 | 2017-02-01 | 惠州Tcl移动通信有限公司 | 一种基于智能穿戴设备控制虚拟现实设备的方法及系统 |
| CN108434664A (zh) * | 2018-04-08 | 2018-08-24 | 上海应用技术大学 | 一种跑步机智能安全保护装置及保护方法 |
| CN110198534A (zh) * | 2019-04-30 | 2019-09-03 | 努比亚技术有限公司 | 通信透传控制方法、通信设备、系统及存储介质 |
| EP4198772A4 (en) * | 2020-08-31 | 2023-08-16 | Huawei Technologies Co., Ltd. | METHOD AND DEVICE FOR MUSIC RECOMMENDATION |
| CN114710470A (zh) * | 2020-12-16 | 2022-07-05 | 华为技术有限公司 | 一种通信系统、方法及装置 |
| CN114666754B (zh) * | 2020-12-22 | 2025-01-03 | 华为技术有限公司 | 一种管理附属设备的方法及装置、附属设备 |
| CN114697939B (zh) * | 2022-03-29 | 2025-05-30 | 歌尔股份有限公司 | 信息显示方法及计算机可读存储介质 |
-
2022
- 2022-10-26 CN CN202211321248.9A patent/CN115665712A/zh active Pending
-
2023
- 2023-10-24 WO PCT/CN2023/126130 patent/WO2024088241A1/zh not_active Ceased
-
2025
- 2025-03-05 US US19/071,188 patent/US20250240260A1/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9870716B1 (en) * | 2013-01-26 | 2018-01-16 | Ip Holdings, Inc. | Smart glasses and smart watches for real time connectivity and health |
| US20160174071A1 (en) * | 2014-12-12 | 2016-06-16 | Intel Corporation | Authentication and authorization in a wearable ensemble |
| CN107395668A (zh) * | 2017-05-31 | 2017-11-24 | 捷开通讯(深圳)有限公司 | 可穿戴智能终端、云端服务器、存储装置及添加好友方法 |
| CN115665712A (zh) * | 2022-10-26 | 2023-01-31 | 歌尔科技有限公司 | 设备间通信的方法、系统、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20250240260A1 (en) | 2025-07-24 |
| CN115665712A (zh) | 2023-01-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP4311282A1 (en) | Method for establishing connection between multiple devices, and device | |
| EP3000217B1 (en) | Electronic device using logical channels for communication | |
| JP6333837B2 (ja) | ドッキーセントリックワイヤレスドッキング | |
| CN107197346A (zh) | 电视终端及蓝牙设备回连方法和计算机可读存储介质 | |
| US10785713B2 (en) | Device and method for accessing multiple networks in wireless communication system | |
| KR102695743B1 (ko) | 베어러를 관리하는 전자 장치 및 그 동작 방법 | |
| US10609633B2 (en) | Method for triggering registrar protocol interaction, access point, and station | |
| TW201342984A (zh) | 經由點對點鏈結存取的分享網路 | |
| WO2020147030A1 (zh) | 一种小区注册方法及终端设备 | |
| US20170163786A1 (en) | Communication method, electronic device, and storage medium | |
| CN107171910A (zh) | 智能家居设备及其配网方法、路由器、智能家居系统 | |
| US20240357464A1 (en) | Ursp rule monitoring and reporting method and apparatus, terminal, and network element | |
| US20250240260A1 (en) | Method, system and device for inter-device communication, and storage medium | |
| WO2020114382A1 (zh) | 接入网络的控制方法及通信设备 | |
| US20250227446A1 (en) | Communication method, apparatus, device for multiple devices and storage medium | |
| CN115087073A (zh) | 认证Wi-Fi连接的方法、无线终端、接入节点及存储介质 | |
| CN104378339B (zh) | 一种使用代理协议的通信方法和装置 | |
| WO2021018282A1 (zh) | 网络切换方法、网络设备及终端 | |
| CN107018204B (zh) | 一种数据交互方法及设备 | |
| CN109981218A (zh) | 数据传输方法及通信设备 | |
| WO2023051204A1 (zh) | 跨设备连接方法、电子设备及存储介质 | |
| CN109219040B (zh) | eSIM卡操作方法、移动终端及eSIM卡设备 | |
| CN110460519A (zh) | 基于多协议网关的控制方法、装置和计算机可读存储介质 | |
| US20250323832A1 (en) | Policy configuration method and apparatus, terminal, network-side device, and readable storage medium | |
| EP4564986A1 (en) | Pin device registration method and apparatus, and communication device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23881819 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23881819 Country of ref document: EP Kind code of ref document: A1 |