WO2024109443A1 - 一种设备连接方法、设备及*** - Google Patents

一种设备连接方法、设备及*** Download PDF

Info

Publication number
WO2024109443A1
WO2024109443A1 PCT/CN2023/127427 CN2023127427W WO2024109443A1 WO 2024109443 A1 WO2024109443 A1 WO 2024109443A1 CN 2023127427 W CN2023127427 W CN 2023127427W WO 2024109443 A1 WO2024109443 A1 WO 2024109443A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
data
response
connection
information
Prior art date
Application number
PCT/CN2023/127427
Other languages
English (en)
French (fr)
Inventor
蔡鹏程
黎亮齐
芦东泽
方峰
裴政
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024109443A1 publication Critical patent/WO2024109443A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Definitions

  • the embodiments of the present application relate to communication technology, and more particularly to a device connection method, device and system.
  • the user can add other devices as the accessory devices of the device, so that the device and the accessory devices can transmit data.
  • the mobile phone can establish a communication connection with the wearable device, and then the wearable device is added as an accessory device of the mobile phone; then, after collecting the user's heart rate, calories, exercise posture, exercise duration, number of steps, and number of active hours, the wearable device can send the exercise information to the mobile phone; the mobile phone can display the exercise information sent by the wearable device for the user to exercise.
  • users want to share the data of a device and its attached devices with other devices. For example, when a user exercises based on the mobile phone application and the exercise information of the wearable device, due to the small screen of the mobile phone and the inconvenience of holding the mobile phone while exercising, the user wants to share the mobile phone application and the exercise information of the wearable device with a large-screen device.
  • the current sharing method often requires the user to manually adjust the connection relationship between the mobile phone, wearable device and large-screen device, which is complicated to operate and has poor real-time performance.
  • the present application provides a device connection method, device and system.
  • the device connection method in a scenario where a first device shares data with a third device, a user can control a second device to establish communication with a third device through the first device without manually operating the second device and the third device.
  • the connection between devices can be achieved conveniently and efficiently, thereby improving the user experience.
  • a first aspect provides a device connection method, the method comprising: a first device displays an interface, the interface includes media data, and a second device is a device that establishes a wireless connection with the first device; the first device sends a first message to a third device in response to a first operation on the media data, and sends a second message to the second device, wherein the first message includes media information and device information of the second device, the first message is used to instruct the third device to display media data and establish a wireless connection with the second device, the media information includes media data or an identifier of media data; the second message includes device information of the third device, and the second message is used to instruct the second device to establish a wireless connection with the third device.
  • the first device can display media data; then, in response to the user operation on the media data, the media data or the identifier of the media data is sent to the third device, and the second device and the third device are controlled to establish a communication connection.
  • the user shares data with the second device through the first device, the user only needs to operate on the first device, and the wireless connection between the second device and the third device can be realized. The user does not need to manually operate the second device and the third device, and the connection between the devices can be realized conveniently and efficiently, thereby improving the user experience.
  • the first device in response to a first operation on media data, the first device first sends a first message to a third device; after sending the first message to the third device, the first device sends a second message to the second device.
  • the first device in response to a first operation on media data, the first device first sends a second message to the second device; after sending the second message to the second device, the first device sends the first message to the third device.
  • the first device in response to a first operation on media data, the first device sends a first message to a third device while sending a second message to a second device.
  • the method further includes:
  • the first device displays the connectable devices of the first device and the accessory devices of the first device in response to the second operation on the media data; the connectable devices include the third device; the accessory devices are devices that have established a connection with the first device, and the accessory devices include the second device; the first device determines that the selected connectable device is the third device in response to the third operation on the connectable devices; the first device determines that the selected accessory device is the second device in response to the fourth operation on the accessory device.
  • the first device may display the discovered connectable devices and the attached devices with which the connection has been established, and then, in response to The user operates to determine the third device from the connectable devices and the second device from the attached devices, so as to determine two devices with which the user wishes to establish a connection.
  • the first message also includes indication information for indicating the start of a directed connectible broadcast for the second device; the method also includes: the first device receives a first response message sent from a third device, the first response message is used to indicate that the third device has started a directed connectible broadcast for the second device; the first device sends a second message to the second device, including: after receiving the first response message, the first device sends the second message to the second device; the second message is used to instruct the second device to initiate a Bluetooth connection to the third device.
  • the first device can carry in the first message the indication information for indicating the start of the directional connectable broadcast for the second device, so that the third device can start the directional connectable broadcast for the second device; the third device can start the directional connectable broadcast and send a first response message to the first device, so that the first device sends a second message to the second device after determining that the second device has started the broadcast; the second message is used to instruct the second device to initiate a Bluetooth connection to the third device.
  • the first device can control the second device and the third device to establish a Bluetooth communication connection, wherein the second device initiates the connection after the third device starts the directional connectable broadcast, which can improve the success rate of establishing the connection and reduce the power consumption during the connection between the second device and the third device.
  • the second message also includes indication information for indicating the start of a directed connectible broadcast for a third device; the method also includes: after sending the second message, the first device receives a second response message sent by the second device, the second response message is used to indicate that the second device has started a directed connectible broadcast for the third device; the first device sends a first message to the third device, including: after receiving the second response message, the first device sends the first message to the third device; the first message is used for the third device to initiate a Bluetooth connection to the second device.
  • the first device can control the second device and the third device to establish a Bluetooth communication connection, wherein the third device initiates a connection after the second device turns on a directional connectable broadcast, thereby improving the success rate of establishing a connection and reducing power consumption during the connection between the second device and the third device.
  • the second message is further used to instruct the second device to send data collected by the second device to a third device, and the third device is used to display the data collected by the second device; and the method further includes:
  • the first device receives data collected from the second device; the first device displays the media data and the data collected by the second device.
  • the first device can display media data and data collected by the second device; then, in response to user operation, the media data or the identifier of the media data is sent to the third device, and the second device and the third device are controlled to establish a wireless connection so that the second device sends the data collected by the second device to the third device, thereby realizing that only the operation is performed on the first device, and the third device can display the media data and the data collected by the second device.
  • This method can conveniently and efficiently send the display content of the first device to the third device, wherein the display content includes the media data of the first device and the data of the auxiliary device (i.e., the second device).
  • the media data includes display data and audio data of the target video; the first message is also used to instruct the third device to send audio data to the second device, the second device is used to play the audio data, and the third device is used to display the display data.
  • a second aspect provides a device connection method, the method comprising:
  • the second device receives a second message sent by the first device, the second message includes device information of the third device, the second message is used to instruct the second device to establish a wireless connection with the third device, the first device is used to send a first message to the third device upon receiving a first operation on media data, the media data is displayed on a display interface of the first device, the first message includes media information and device information of the second device, the first message is used to instruct the third device to display media data and establish a wireless connection with the second device, the media information includes media data or an identifier of media data; the second device responds to the second message to establish a wireless connection with the third device.
  • the second message further includes instruction information for instructing the second device to initiate a Bluetooth connection to the third device, the second message is sent by the first device to the second device after receiving a first response message from the third device, and the first response message is used to indicate that the third device has enabled a directional connectable broadcast for the second device; the second device establishes a wireless connection with the third device in response to the second message, including:
  • the second device In response to the second message, the second device initiates a Bluetooth connection to the third device.
  • the second message further includes instruction information for instructing to start a directional connectable broadcast for the third device; and the second device establishes a wireless connection with the third device in response to the second message, including:
  • the second device responds to the second message and starts a directed connectible broadcast for the third device; the second device sends a second response message to the first device, and the second response message is used to indicate that the second device has started a directed connectible broadcast for the third device; when the third device initiates a Bluetooth connection, the second device establishes a Bluetooth communication connection with the third device.
  • the second message is further used to instruct the second device to send a second device acquisition
  • the method further comprises:
  • the second device collects the user's motion data; after establishing a wireless connection with the third device, the second device sends the data collected by the second device to the third device, and the third device is used to display the data collected by the second device.
  • a third aspect provides a device connection method, the method comprising:
  • the third device receives a first message sent by the first device, where the first message is used to instruct the third device to establish a wireless connection with the second device, the first message includes media information and device information of the second device, the second device is a device that establishes a wireless connection with the first device, and the media information includes media data or an identifier of media data; the third device responds to the first message and displays the media data; the third device establishes a wireless connection with the second device.
  • the first message further includes instruction information for instructing to start a directional connectable broadcast for the second device; and the third device establishes a wireless connection with the second device, including:
  • the third device responds to the first message and starts a directional connectable broadcast for the second device; the third device sends a first response message to the first device, and the first response message is used to indicate that the third device has started a directional connectable broadcast; when the second device initiates a Bluetooth connection, the third device establishes a Bluetooth communication connection with the second device.
  • the first message also includes instruction information for instructing the second device to initiate a Bluetooth connection to the third device.
  • the first message is sent by the first device to the third device after receiving a second response message from the second device.
  • the second response message is used to indicate that the second device has turned on directional connectable broadcasting; the third device establishes a wireless connection with the second device, including: the second device initiates a Bluetooth connection to the third device in response to the first message.
  • the method further includes: a third device receives motion data sent by the second device, where the motion data is data collected by the second device; and the third device displays the motion data.
  • the media data includes display data and audio data corresponding to the target video; the first message is further used to instruct the third device to send the audio data to the second device;
  • the third device displays the media data in response to the first message, including: the third device displays the display data;
  • the method also includes: the third device sends audio data to the second device, and the second device is used to play the audio data.
  • a fourth aspect provides a device, comprising one or more functional modules, which can be used to execute a device connection method as in any of the above aspects or any possible implementation of any of the aspects.
  • a fifth aspect provides a storage medium, comprising instructions, which, when executed on a device, enable the device to execute a device connection method in any of the above aspects or in any possible implementation manner of any of the aspects.
  • a sixth aspect provides a program product, which, when executed on a device, enables the device to execute a device connection method in any of the above aspects or in any possible implementation manner of any of the aspects.
  • a seventh aspect provides a chip, comprising: a processor and an interface, wherein the processor and the interface cooperate with each other so that the chip executes the device connection method in any of the above aspects or any possible implementation of any of the aspects.
  • the eighth aspect also provides a device connection system, comprising a first device, a second device and a third device.
  • the first device is used to implement the method described in the first aspect or any possible implementation of the first aspect;
  • the second device implements the method described in the second aspect or any possible implementation of the second aspect;
  • the third device is used to implement the method described in the third aspect or any possible implementation of the third aspect.
  • the device provided in the fourth aspect, the readable storage medium provided in the fifth aspect, the program product provided in the sixth aspect, and the chip provided in the seventh aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
  • FIG1 is a framework diagram of a device connection system provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of the hardware structure of a device 100 provided in an embodiment of the present application.
  • FIG3 is a software structure block diagram of the device 100 provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the hardware structure of a device 200 provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a movie-watching scene provided by the present application.
  • FIG6 is a schematic diagram of a flow chart of a sports scene provided by the present application.
  • 7A-7D are user interfaces for adding an auxiliary device provided by the present application.
  • 8A-8C are user interfaces implemented on a first device exemplarily provided by the present application.
  • FIG9 is a user interface implemented on a third device exemplarily provided by the present application.
  • FIG10 is a schematic diagram of a flow chart of a device connection method provided in an embodiment of the present application.
  • FIG11 is a flow chart of a method for establishing a communication connection between a wearable device and a large-screen device provided in an embodiment of the present application.
  • first and second are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features.
  • a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
  • GUI graphical user interface
  • the device connection system provided in the embodiment of the present application is first introduced below.
  • Figure 1 is a framework diagram of a device connection system provided in an embodiment of the present application.
  • the device connection system may include a first device 10 , an auxiliary device 20 , and a third device 30 .
  • the accessory device 20 may include one or more devices; the accessory device 20 is a device that establishes a communication connection with the first device 10.
  • the accessory device of the first device is referred to as the accessory device in the following embodiments, and no further description is given.
  • the first device 10 can be a device with input function (Figure 1 exemplarily shows that the first device 10 is a mobile phone); the accessory device 20 can be a wireless headset, a smart watch, a speaker and other devices ( Figure 1 exemplarily shows that the accessory device 20 is a smart watch and a wireless headset); the third device 30 can be a device with display function ( Figure 1 exemplarily shows that the third device 30 is a large-screen device).
  • the first device 10 can establish a communication connection with one or more accessory devices 20. As shown in FIG. 1, the first device 10 establishes a communication connection with an accessory device 20 (eg, a smart watch, a wireless headset).
  • an accessory device 20 eg, a smart watch, a wireless headset.
  • the first device 10 may determine the second device from the accessory device 20 in response to a user operation on the second device; when the first device 10 detects a user operation on the third device 30, in response to the user operation, the device information of the second device is sent to the third device 30; the first device 10 may send the device information of the third device 30 to the second device; further, the third device 30 may initiate a directional Bluetooth broadcast based on the device information of the second device, and the second device may initiate a Bluetooth connection request to the third device 30 based on the device information of the third device 30, thereby establishing a communication connection between the third device 30 and the second device.
  • the device information of the second device may be the name or Media Access Control Address (MAC) of the second device
  • the device information of the third device 30 may be the name or MAC address of the third device 30.
  • the second device may be part or all of the devices in the accessory device 20.
  • auxiliary device 20 and the first device 10 may both be devices of the same user; the auxiliary device 20 and the first device 10 may also be devices used by different users.
  • first device 10, the auxiliary device 20 and the third device 30 can be different devices, or the same devices, or any two of the first device 10, the auxiliary device 20 and the third device 30 can be the same devices.
  • the specific details can be determined according to different application scenarios and are not limited here.
  • the above-mentioned devices may include but are not limited to mobile phones, wearable devices (such as smart watches, etc.), personal computers (PC), tablets, monitors, televisions, desktop computers, laptop computers, handheld computers, notebook computers, super mobile personal computers, netbooks, augmented reality devices, virtual reality devices, artificial intelligence devices, vehicle-mounted devices, smart home devices and other devices.
  • wearable devices such as smart watches, etc.
  • PC personal computers
  • tablets monitors, televisions, desktop computers, laptop computers, handheld computers, notebook computers, super mobile personal computers, netbooks, augmented reality devices, virtual reality devices, artificial intelligence devices, vehicle-mounted devices, smart home devices and other devices.
  • the device connection system architecture in Figure 1 is only an exemplary implementation in the embodiment of the present application.
  • the device connection system architecture in the embodiment of the present application includes but is not limited to the above device connection system architecture.
  • FIG2 shows a schematic diagram of the hardware structure of the device 100.
  • the device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations.
  • the various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a wireless headset interface 170D, Sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194 and subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the device 100.
  • the device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • controller a memory
  • video codec a digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the device 100.
  • the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the device 100.
  • the device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied on the device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • at least some of the functional modules of the mobile communication module 150 can be set in the processor 110.
  • at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
  • the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied on the device 100.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify the signal, and convert it into electromagnetic waves for radiation through the antenna 2.
  • antenna 1 of device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that device 100 can communicate with the network and other devices through wireless communication technology.
  • the device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process data fed back by the camera 193. For example, when taking a photo, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, and the light signal is converted into an electrical signal.
  • the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it onto the photosensitive element.
  • the photosensitive element converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
  • the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
  • Video codecs are used to compress or decompress digital videos.
  • Device 100 may support one or more video codecs. In this way, device 100 may play or record videos in multiple coding formats.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • the NPU can realize applications such as intelligent cognition of the device 100, such as face recognition, etc.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function.
  • the internal memory 121 can be used to store executable program codes, which include instructions.
  • the processor 110 executes various functional applications and data processing of the device 100 by running the instructions stored in the internal memory 121.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the program storage area can store an operating system, applications required for at least one function (such as a fingerprint recognition function, etc.), etc.
  • the data storage area can store data created during the use of the device 100 (such as fingerprint information templates, etc.), etc.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, etc.
  • the device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the wireless headset interface 170D, and the application processor.
  • audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the wireless headset interface 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 can be set in the processor 110, or some functional modules of the audio module 170 are set in the processor 110.
  • the speaker 170A also known as the "speaker” is used to convert audio electrical signals into sound signals.
  • the receiver 170B also known as the "earpiece”, is used to convert audio electrical signals into sound signals.
  • the microphone 170C also known as the "microphone” and “microphone", is used to convert sound signals into electrical signals.
  • the wireless headset interface 170D is used to connect wired wireless headsets.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the gyroscope sensor 180B can be used to determine the motion posture of the device 100.
  • the air pressure sensor 180C is used to measure the air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the device 100 in all directions (generally three axes).
  • Distance sensor 180F used to measure distance.
  • Proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • Ambient light sensor 180L is used to sense ambient light brightness.
  • Fingerprint sensor 180H is used to collect fingerprints.
  • Temperature sensor 180J is used to detect temperature.
  • Touch sensor 180K also known as a "touch panel”. Touch sensor 180K may be provided on display screen 194, and touch sensor 180K and display screen 194 form a touch screen, also known as a "touch screen”. Touch sensor 180K is used to detect touch operations acting on or near it. Buttons 190 include a power button, a volume button, etc. Motor 191 can generate a vibration prompt. Indicator 192 can be an indicator light, which can be used to indicate the charging status, power change, and can also be used to synthesize requests, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. In the embodiment of the present application, the device 100 can execute the device connection method through the processor 110.
  • FIG. 3 is a software structure block diagram of the device 100 provided in an embodiment of the present application.
  • the layered architecture divides the software into several layers, each with clear roles and division of labor.
  • the layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, and sports health.
  • the first device 10 is device 100, and the user can add devices such as mobile phones or smart watches as accessory devices of device 100 through the sports health application of device 100; the user can also send data to other devices through the sports health application, such as sending the identification of media data and the device information of the accessory device to a third device.
  • devices such as mobile phones or smart watches as accessory devices of device 100 through the sports health application of device 100
  • the user can also send data to other devices through the sports health application, such as sending the identification of media data and the device information of the accessory device to a third device.
  • the application framework layer provides application programming interface (API) and programming framework for the applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a display manager, a sensor manager, a cross-device connection manager, an event manager, an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, etc.
  • the display manager is used for system display management and is responsible for managing all display-related affairs, including creation, destruction, direction switching, size and state changes, etc.
  • the display manager is only one default display module on a single device, that is, the main display module.
  • the sensor manager is responsible for the status management of the sensor, and manages the application to monitor sensor events and report the events to the application in real time.
  • the cross-device connection manager is used to establish communication connections with other devices.
  • the event manager is used for the system's event management service. It is responsible for receiving events uploaded from the bottom layer and distributing them to each window, completing tasks such as event reception and distribution.
  • the task manager is used to manage task (Activity) components, including startup management, life cycle management, task direction management, etc.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • the window manager is also responsible for window display management, including window display mode, display size, display coordinate position, display level, etc.
  • Content providers are used to store and retrieve data and make it accessible to applications.
  • the data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying images, etc.
  • the view system can be used to build applications.
  • a display interface can be composed of one or more views.
  • a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
  • the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the system top status bar in the form of an icon or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library (also called the data management layer) can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL) and event data.
  • functional modules such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL) and event data.
  • the surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • a 2D graphics engine is a drawing engine for 2D drawings.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the embodiment of the present application takes the device 200 as an example to introduce the hardware structure and software structure of the third device 30.
  • the device 200 may include: a processor 222, a memory 223, a wireless communication module 224, a power switch 225, a display screen 229, and an audio module 230.
  • the device 200 may also include a wired LAN communication processing module 226, a high definition multimedia interface (HDMI) communication processing module 227, a USB communication processing module 228, etc.
  • HDMI high definition multimedia interface
  • the above modules may be connected via a bus. Among them:
  • the processor 222 can be used to read and execute readable instructions.
  • the processor 222 can mainly include a controller, an arithmetic unit and a register.
  • the controller is mainly responsible for decoding instructions and sending control signals for operations corresponding to the instructions.
  • the arithmetic unit is mainly responsible for performing fixed-point or floating-point arithmetic operations, shift operations, and logical operations, etc., and can also perform address operations and conversions.
  • the register is mainly responsible for storing register operands and intermediate operation results temporarily stored during the execution of instructions.
  • the hardware architecture of the processor 222 can be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.
  • ASIC application-specific integrated circuit
  • the processor 222 can be used to parse the signal received by the wireless communication module 224, such as the new URL sent by the device 100, and obtain multiple videos and associated videos in the playlist according to the new URL.
  • the wireless communication module 224 may include a WLAN communication processing module.
  • the wireless communication module 224 may also include a Bluetooth (BT) communication processing module, an NFC processing module, a cellular mobile communication processing module (not shown), and the like.
  • BT Bluetooth
  • NFC NFC
  • cellular mobile communication processing module not shown
  • the wireless communication module 224 can be used to establish a communication connection with the device 100.
  • the communication connection established by the wireless communication module 224 and the device 100 can be multiple.
  • the WLAN communication processing module can be used to establish a Wi-Fi direct communication connection with the device 100
  • the Bluetooth (BT) communication processing module can be used to establish a Bluetooth communication connection with the device 100
  • the NFC processing module can be used to establish an NFC connection with the device 100, and so on.
  • the wireless communication module 224 can also be used to establish a communication connection with the device 100, and receive a video stream sent by the device 100 based on the communication connection.
  • the communication connection established between the wireless communication module 224 and the device 100 can be based on the HTTP protocol for data transmission, and the present application does not impose any restrictions on the communication connection type and data transmission protocol between devices.
  • the memory 223 is coupled to the processor 222 and is used to store various software programs and/or multiple sets of instructions.
  • the memory 223 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices.
  • the memory 223 may store an operating system, such as an embedded operating system such as uCOS, VxWorks, RTLinux, etc.
  • the memory 223 may also store a communication program, which may be used to communicate with the device 100, one or more servers, or an additional device.
  • the power switch 225 may be used to control the supply of power to the device 200 .
  • the wired LAN communication processing module 226 may be used to communicate with other devices in the same LAN via the wired LAN, and may also be used to connect to a WAN via the wired LAN and communicate with devices in the WAN.
  • the HDMI communication processing module 227 may be used to communicate with other devices via an HDMI interface (not shown).
  • the USB communication processing module 228 may be used to communicate with other devices via a USB interface (not shown).
  • the display screen 229 can be used to project pages, videos, etc.
  • the display screen 229 can be LCD, OLED, AMOLED, FLED, QLED, etc.
  • the content displayed on the display screen 229 can refer to the relevant description of the subsequent method embodiment.
  • the display screen 229 can continuously play multiple videos based on the video streams of multiple videos such as the play list and associated videos sent by the server received by the wireless communication module 224.
  • Audio module 230 can be used to output audio signals through the audio output interface, so that the device 200 can support audio playback.
  • the audio module 230 can also be used to receive audio data through the audio input interface.
  • the audio module 230 may include but is not limited to: a microphone, a speaker, a receiver, etc.
  • the device 200 may also include a serial interface such as an RS-232 interface.
  • the serial interface may be connected to other devices, such as an audio player such as a speaker, so that the display and the audio player cooperate to play audio and video.
  • the structure shown in FIG4 does not constitute a specific limitation on the device 200.
  • the device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • device 200 may include the hardware included in device 100 shown in Figure 3.
  • the various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the software system of the device 200 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture, etc.
  • the software system of the device 200 may include but is not limited to Linux or other It operates the system. It is Huawei's Hongmeng system.
  • the device 200 is an Android system, which is divided into four layers, namely, from top to bottom, an application layer, an application framework layer, an Android runtime and a system library, and a kernel layer.
  • the application layer may include a screen projection management application for device connection and screen projection display
  • the application framework layer may include a cross-device connection manager, an event manager, a window manager and a display manager, etc.
  • the system library may include a media library and event data, etc.
  • the kernel layer is used for device discovery, device authentication and device connection, etc. The specific contents of each part can be found in the relevant description in Figure 3, which will not be repeated here.
  • the device connection method provided in the embodiment of the present application can be applied to a variety of scenarios, including but not limited to:
  • the first device is a device with input function, such as a device with a touch screen or keyboard that can receive user operations (such as a mobile phone, etc.);
  • the third device is a device with display function (such as a large-screen device or PC);
  • the auxiliary device is a device with playback function (such as wireless headphones or speakers).
  • the first device when a user operation is detected, can establish a communication connection with a third device in response to the user operation; send media resources and device information of the accessory device to the third device, the media resources including image resources and audio resources; the third device can play the image resources; the third device sends the audio resources to the accessory device based on the device information of the accessory device, so that the user can view the image resources through the third device and listen to the audio resources through the accessory device.
  • the movie-watching scene shown in Figure 5 is exemplarily shown, wherein the mobile phone in Figure 5 is the first device 10 in Figure 1, the wireless headset in Figure 5 is the accessory device 20 in Figure 1, and the large-screen device in Figure 5 is the third device 30 in Figure 1.
  • the wireless headset can be paired with a mobile phone, that is, the wireless headset is an accessory device of the mobile phone, and the user can wear the wireless headset to listen to the audio of the documentary played by the mobile phone; further, when the user wants to watch the documentary through a large-screen device and listen to the audio of the documentary through the wireless headset, the mobile phone can send the media resources of the documentary and the device information of the wireless headset to the large-screen device, and the media resources include the image resources and audio resources of the documentary; after obtaining the media resources, the large-screen device can establish a communication connection with the wireless headset based on the device information of the wireless headset and send the audio resources to the wireless headset; further, the large-screen device can play the image resources, and the wireless headset can play the audio resources.
  • the data of the first device can be transmitted to the auxiliary device (such as wireless headphones or speakers, etc.) through the first device, without the user having to manually operate the auxiliary device and the third device, thereby meeting the user's movie-watching needs. For example, if the user wants to watch a movie on a large screen in a home environment but does not want to disturb the viewing needs of family members, the user experience can be improved.
  • the first device is a device with input and display functions, and the first device can display sports videos;
  • the auxiliary device can be a wearable device with information collection function, and the wearable device can collect the user's sports data;
  • the third device can be a large-screen device with display function.
  • the first device can respond to user operations, establish a communication connection with the large-screen device, and then send the motion video to the large-screen device; the first device can also respond to user operations to achieve a communication connection between the large-screen device and the wearable device, so that the wearable device sends the user's motion data to the large-screen device; then, the large-screen device can display the motion video and the user's motion data.
  • the sports scene shown in Figure 6 is exemplarily shown, wherein the mobile phone in Figure 6 is the first device 10 in Figure 1, the smart watch in Figure 6 is the accessory device 20 in Figure 1, and the large-screen device in Figure 6 is the third device 30 in Figure 1.
  • the smart watch when a user uses a mobile phone and a smart watch to exercise at home, the smart watch, as an accessory device of the mobile phone, can send the user's exercise data to the mobile phone, and then the mobile phone can display exercise videos and exercise data for the user to exercise.
  • the mobile phone can establish a communication connection with the smart screen to send the exercise video to the smart screen, and can also control the smart screen and the smart watch to establish a communication connection so that the smart watch sends the exercise data to the smart screen; then, the smart screen can display the exercise video sent by the mobile phone and the exercise data sent by the smart watch.
  • the data of the accessory device can be transmitted to the third device through the first device, which can avoid the delay caused by the data of the accessory device being sent to the third device via the first device, and the real-time nature of the data transmission can be ensured; the user does not need to manually operate the accessory device and the third device, which can improve the user experience.
  • the first device such as a mobile phone
  • the third device such as a large-screen device
  • FIGS. 7A-7D show an implementation method of adding an auxiliary device to a first device.
  • FIG7A shows an exemplary user interface 71 for displaying installed applications on the first device.
  • the user interface 71 displays: an icon 711 of a sports health application, a status bar, and icons of other applications, etc.
  • the status bar may include: one or more signal strength indicators of a mobile communication signal (also referred to as a cellular signal), one or more signal strength indicators of a Wi-Fi signal, a battery status indicator, a time indicator, etc.
  • the first device can detect a user operation acting on the icon 711 of the sports health application, and in response to the user operation, display the user interface 72 shown in FIG7B .
  • the user interface 72 may include an add control 721 and other controls, such as a health control 722A, a sports control 722B, a device control 722C, and a my control 722D, etc., wherein the add control 721 is used to establish a communication connection with other devices; the health control 722A is used to display a health-related user interface, the sports control 722B is used to display a sports-related user interface, the device control 722C is used to display a user interface added by the device (the user interface 72 shown in FIG7B ), and the my control 722D is used to display personal information.
  • the add control 721 is used to establish a communication connection with other devices
  • the health control 722A is used to display a health-related user interface
  • the sports control 722B is used to display a sports-related user interface
  • the first device can also display the user interface 72 in response to other controls (such as device control 722C) or through other methods.
  • the user interface 72 is only an exemplary user interface provided in the embodiment of the present application and does not constitute a limitation on the present application.
  • the first device may detect a user operation acting on the add control 721. In response to the user operation, the first device discovers nearby connectable devices and may display a user interface 73 as shown in FIG7C .
  • the user interface 73 may display the discovered devices and the connection controls corresponding to the devices.
  • FIG7C exemplarily shows that the devices sent by the first device include a weight scale, a wireless headset, and a smart watch, and the user interface 73 includes a connection control 731 corresponding to the weight scale, a connection control 732 corresponding to the wireless headset, and a connection control 733 corresponding to the smart watch.
  • the method for the first device to discover nearby devices is not limited here.
  • the first device can discover nearby Bluetooth devices via Bluetooth.
  • a weight scale, a wireless headset, and a smart watch are within the Bluetooth discovery range of the first device and Bluetooth is turned on, the first device can discover the weight scale, the wireless headset, and the smart watch via Bluetooth, and then display the user interface 73 shown in FIG7C.
  • the user interface 74 includes an accessory device column 741 and an add control 721, wherein the accessory device column 741 is used to display devices with established communication connections, such as the smart watch displayed in the accessory device column 741.
  • the first device can receive data from the accessory device and then display the data of the accessory device. For example, after adding a smartwatch as an accessory device, when the first device receives smartwatch data sent by the smartwatch, as shown in FIG7D , the smartwatch data sent by the smartwatch can be displayed in the accessory device column 741.
  • the user may also establish communication connections with multiple devices through the selection control on the user interface 73, that is, add the multiple devices as auxiliary devices of the first device, which is not limited in the present embodiment.
  • the present embodiment only takes adding one device as an example.
  • Figures 8A-8C and 9 show a method for implementing the connection between a first device, an auxiliary device and a third device, wherein Figures 8A-8C are exemplary user interfaces implemented on the first device, and Figure 9 is an exemplary user interface implemented on the third device.
  • the user interface 8A exemplarily shows a user interface 81 in a health and exercise application, which may be a user interface displayed by the first device when detecting a user operation on the exercise control 722B in the user interface 72.
  • the user interface 81 may include controls for multiple courses, such as a course control 811.
  • the first device when the first device detects a user operation on the course control 811, in response to the user operation, the first device may display a user interface 82 as shown in FIG8B .
  • the user interface 82 may include a play window 821, a share control 822, and a display window 823.
  • the play window 821 is used to play a video, such as a yoga course as shown in FIG8B ;
  • the share control 822 is used to send the video resource corresponding to the current play window 821 to other devices;
  • the display window 823 is used to display data sent by an accessory device.
  • the display window 823 may be the smart watch data as shown in FIG8B , and the smart watch data may include the heart rate and calories obtained by the smart watch in real time.
  • the first device when the first device detects a user operation on the sharing control 822, in response to the user operation, the first device may display a user interface 83 as shown in FIG8C .
  • the user interface 83 may include device information 831 to be shared, accessory device information 832, and a connection control 833.
  • the device information 831 to be shared is used to display the devices discovered by the first device; the accessory device information 832 is used to display the accessory devices of the first device; and the connection control 833 is used to establish a connection with the selected device to be shared and to establish a connection between the selected device to be shared and the selected accessory device.
  • the device information 831 to be shared exemplarily shows that the nearby devices sent by the first device are large-screen device A, large-screen device B and PC, and exemplarily shows the selection control 831A corresponding to large-screen device A, the selection control 831B corresponding to large-screen device B and the selection control 831C corresponding to PC;
  • the accessory device information 832 exemplarily shows that the accessory devices currently connected to the first device are a smart watch and a wireless headset, and exemplarily shows the selection control 832A corresponding to the smart watch and the selection control 832B corresponding to the wireless headset.
  • the user can select the large-screen device A as the third device and the smart watch as the second device.
  • the first device can display The user interface 83 shown in FIG8C is shown.
  • the selection control 831A corresponding to the large-screen device A and the selection control 832A corresponding to the smart watch are displayed as selected, and the selection control not marked with “ ⁇ ” is not selected.
  • the video resource corresponding to the current playback window 821 and the device information of the smart watch are sent to the large-screen device A, so that the large-screen device A plays the video resource corresponding to the current playback window 821, and the large-screen device A establishes a wireless connection with the smart watch based on the device information of the smart watch to obtain the smart watch data.
  • the large-screen device A may display a user interface 90 as shown in FIG9 .
  • the user interface 90 may include a main window 901 and an auxiliary window 902, wherein the main window 901 is used to display the data sent by the first device, such as the yoga course shown in FIG9 ; the auxiliary window 902 is used to display the data sent by the auxiliary device, such as the smartwatch data shown in FIG9 .
  • FIG10 exemplarily shows a device connection method flow provided in an embodiment of the present application.
  • the device connection method may include some or all of the following steps:
  • S101 The first device and the wearable device establish a wireless connection.
  • the wearable device may include one or more devices, including but not limited to smart watches, smart bracelets, and smart glasses; the wireless connection established between the first device and the wearable device may include but is not limited to: Wi-Fi P2P wireless connection, Bluetooth wireless connection, etc.
  • a sports health application is installed on the first device, and the user can establish a wireless connection with the wearable device through the user interface of the application, that is, add the wearable device as an auxiliary device of the first device.
  • a sports health application is installed on the first device, and the user can establish a wireless connection with the wearable device through the user interface of the application, that is, add the wearable device as an auxiliary device of the first device.
  • S102 The wearable device sends the user data to the first device.
  • the user data may include the user's name and the user's exercise data
  • the exercise data may include heart rate, calories, and exercise steps, etc.
  • the wearable device can send the user data to the first device after establishing a connection with the first device.
  • the wearable device is a smart watch, and the user wears the smart watch to exercise; then, after establishing a connection with the first device, the smart watch can send the collected user's exercise data to the first device in real time, and accordingly, after receiving the user data from the smart watch, the first device can display the user's exercise data.
  • a prompt message may be displayed, where the prompt message is used to prompt the user whether to send the user data to the first device; when the wearable device receives a user operation in which the user agrees to send the user data, the wearable device may send the user data to the first device; in subsequent connections, after the wearable device establishes a connection with the first device, the user data may be directly transmitted to the first device in real time.
  • S103 The first device displays the media data and the user data.
  • the first device may display a first interface, which includes media data and user data, wherein the media data may be a video or an image, and the content of the media data is not limited here.
  • the first interface may be a user interface 82 as shown in FIG8B
  • the first device displays the user interface 82, which may include a play window 821 and a display window 823.
  • the play window 821 is used to display media data, such as the yoga course shown in FIG8B ;
  • the display window 823 is used to display data sent by an accessory device, such as a smart watch if the accessory device of the current first device is a smart watch, and the display window 823 may include smart watch data as shown in FIG8B , and the smart watch data may include heart rate and calories obtained in real time by the smart watch.
  • the first device In response to the sharing operation for the media data, the first device displays the device information to be shared and the accessory device information, wherein the accessory device information includes the wearable device, and the device information to be shared includes the large-screen device.
  • the first device may display a second interface, which includes device information to be shared and accessory device information, wherein the accessory device information includes a wearable device, and the device information to be shared includes a large-screen device.
  • the device information to be shared may include one or more devices to be shared, and the accessory device information may include one or more accessory devices; the device to be shared is a device that can establish a communication connection with the first device, and the accessory device is a device that currently establishes a wireless connection with the first device.
  • the second interface may be a user interface 83 as shown in FIG8C
  • the user interface 83 may include device information 831 to be shared and accessory device information 832.
  • the device information 831 to be shared is used to display the devices discovered by the first device; the accessory device information 832 is used to display the accessory devices of the first device.
  • the first interface and the second interface may also be the same interface, and the user interface 82 and the user interface 83 are only exemplary interfaces provided in the embodiments of the present application, and should not constitute a limitation of the present application.
  • the first device may respond to a sharing operation for the media data (eg, a sharing control 822 as shown in FIG. 8B ).
  • the first device may scan the devices available for connection within a preset range nearby through a device discovery function, such as device discovery through a local area network or Bluetooth; further, the first device may display device information to be shared and accessory device information, wherein the device information to be shared includes one or more devices discovered through scanning by the device discovery function, and the accessory device information includes one or more devices currently connected to the first device.
  • a device discovery function such as device discovery through a local area network or Bluetooth
  • the first device may display device information to be shared and accessory device information, wherein the device information to be shared includes one or more devices discovered through scanning by the device discovery function, and the accessory device information includes one or more devices currently connected to the first device.
  • the devices discovered by the first device are large-screen device A, large-screen device B and PC, and the accessory devices of the first device are smart watches and wireless headphones.
  • the first device can display a user interface 83 as shown in Figure 8C, where the user interface 83 includes device information 831 to be shared and accessory device information 832, wherein the device information 831 to be shared is used to display the devices discovered by the first device; the accessory device information 832 is used to display the accessory devices of the first device.
  • the first device can determine a device with a display function from the discovered devices as a device to be shared; that is, the devices in the device information to be shared are all devices with a display function. If the device scanned by the first device through the device discovery function does not have a display function, the first device does not display the device.
  • S105 In response to a user operation of selecting a wearable device, the first device determines that the second device is the wearable device.
  • the wearable device may be one or more. It should be noted that the wearable device is taken as an example here, and in other embodiments, the device selected by the user may also be other auxiliary devices, such as a speaker.
  • the user can select one or more wearable devices from the accessory device information displayed by the first device, and accordingly, the first device determines that the shared accessory device is the wearable device in response to the user operation of selecting the wearable device.
  • the accessory device information displayed by the first device is shown in FIG8C, and the accessory device information includes a smart watch and a wireless headset.
  • the first device determines the smart watch as the second device.
  • the first device may determine that the third device is the large-screen device in response to a user operation on the large-screen device.
  • the first device may display device information to be shared, where the device information to be shared includes a large-screen device; when the first device detects a user operation on the large-screen device, the first device determines that the third device is the large-screen device.
  • the first device In response to the user operation of sharing to the large-screen device, the first device sends a first message to the large-screen device, where the first message includes an identifier of the media data and device information of the wearable device.
  • the device information of the wearable device may include the name or MAC address of the wearable device; the identifier of the media data is used to obtain the media data.
  • the identifier of the media data may be a Uniform Resource Identifier (URI). If the media data is a video, the identifier of the media data may be the URI of the video.
  • URI Uniform Resource Identifier
  • the first device sends the media data identifier and the device information of the wearable device to the large-screen device in response to the user operation of sharing to the large-screen device. For example, referring to FIG8C , when the first device detects the user operation on the connection control 833, the media data and the device information of the smart watch are sent to the large-screen device A.
  • the first device may also send the identifier of the media data and the device information of the wearable device to the large-screen device respectively. For example, when the first device determines that the third device is a large-screen device, it may first send the media data to the large-screen device; and then, when the first device determines that the second device is a wearable device, it may send the device information of the wearable device to the large-screen device.
  • the first device can send media data and device information of the wearable device to the large-screen device, wherein the media data can be locally stored in the first device or obtained by the first device from other devices, which is not limited here.
  • the large-screen device plays the media data based on the identifier of the media data.
  • the large-screen device after receiving the identifier of the media data from the first device, can obtain the media data based on the identifier of the media data, and then play the media data. For example, if the identifier of the media data is a URI of a video, after receiving the URI of the video, the large-screen device can obtain the video from the server based on the URI, and then play the video.
  • the identifier of the media data is a URI of a video
  • the large-screen device after receiving the URI of the video, can obtain the video from the server based on the URI, and then play the video.
  • the large-screen device after receiving the media data from the first device, can play the media data. For example, if the media data is a video, the large-screen device can play the video after receiving the video.
  • the large-screen device After receiving the device information of the wearable device, the large-screen device sends a connectable directional broadcast.
  • the device information of the wearable device is used to verify whether the connecting device is a wearable device when the large-screen device receives a connection request; the device information of the large-screen device can be connected to the directional broadcast.
  • the large-screen device may send a directional connectable broadcast to the wearable device, where the directional connectable broadcast is used to allow only the wearable device to connect.
  • the broadcast type can be divided into four types: Connectable Undirected Event Type, Connectable Directed Event Type, Scannable Undirected Event Type and Non-connectable Undirected Event Type.
  • the large-screen device uses the connectable directional type for broadcasting.
  • the large-screen device sends a response message to the first device, where the response message is used to indicate that the large-screen device has enabled connectable directional broadcasting.
  • the large-screen device may send a connection request to the first device, where the connection request is used to request the wearable device to connect.
  • the first device After receiving the response message, the first device sends a second message to the wearable device, where the second message is used to instruct the wearable device to establish a wireless connection with the large-screen device, and the second message includes device information of the large-screen device.
  • the first device after receiving the connection request, sends the device information of the large-screen device to the auxiliary device, wherein the device information of the large-screen device may include the name or MAC address of the large-screen device.
  • the first device sends the second message to the wearable device via Bluetooth communication, and the second message is specifically a Bluetooth instruction.
  • the wearable device After receiving the second message, the wearable device establishes a Bluetooth communication connection with the large-screen device based on the device information of the large-screen device.
  • the wearable device after the wearable device obtains the device information of the large-screen device from the above-mentioned second message, it initiates a connection to the large-screen device, that is, sends a connection request to the large-screen device, and the connection request includes the device information of the wearable device; when the large-screen device verifies that the device in the connection request is the device information of the wearable device sent by the first device, it establishes a Bluetooth communication connection with the wearable device.
  • the wearable device after the wearable device obtains the device information of the large-screen device from the above-mentioned second message, it first discovers the large-screen device through Bluetooth, that is, determines that the device information in the above-mentioned connectable directional broadcast is the device information of the large-screen device; then, initiates a connection to the large-screen device, that is, sends a connection request to the large-screen device, and the connection request includes the device information of the wearable device; when the large-screen device verifies that the device in the connection request is the device information of the wearable device sent by the first device, it establishes a Bluetooth communication connection with the wearable device.
  • the wearable device sends user data to the large-screen device based on the above Bluetooth communication connection.
  • the user data sent to the first device may be sent to the large-screen device.
  • the user data sent by the wearable device to the large-screen device may be the same as the user data sent to the first device in step S102, and will not be repeated here.
  • the wearable device can stop sending user data to the first device; or it can continue to send user data to the first device, which is not limited here.
  • the large-screen device after receiving the user data from the wearable device, can simultaneously display the media data sent by the first device and the user data sent by the wearable device on the display screen.
  • the large-screen device can display the user interface 90 as shown in Figure 9, which may include a main window 901 and a subsidiary window 902, wherein the main window 901 is used to display the yoga course; the subsidiary window 902 is used to display the smart watch data.
  • the third device may also play the data through a microphone.
  • the processing of the received data by the third device is not limited here.
  • the first device first sends a first message to the large-screen device; when receiving a response message sent by the large-screen device, the first device sends a second message to the wearable device. It should be noted that the first device does not need to wait for a response message from the wearable device or the large-screen device. The first device can send the second message to the wearable device while sending the first message to the large-screen device.
  • the first device may also send the second message to the wearable device first, and then send the first message to the large-screen device.
  • the first message in Figure 10 is different from the first message in Figure 11, and the second message in Figure 10 is different from the second message in Figure 11.
  • the first messages in Figures 10 and 11 are both used to instruct the large-screen device to establish a communication connection with the wearable device, but the specific content carried by the first messages in Figures 10 and 11 may be different.
  • the first message in Figure 10 is specifically used to instruct the large-screen device to send a connectable directional broadcast to the wearable device; the first message in Figure 11 is specifically used to initiate a Bluetooth connection to the wearable device.
  • steps S104 to S107 exemplarily provide an implementation of the first device determining the media data, the third device and the second device based on the user operation, which should not limit the embodiments of the present application.
  • the third device and the second device may be the default.
  • the third device and the second device are the third device (such as a large-screen device) and the second device (such as a wearable device) with which the first device last shared data;
  • the user interface 82 shown in FIG8B may also include the third device and the second device with which the first device last shared data;
  • the sharing control 822 is used to indicate that the video resource corresponding to the current playback window 821 is shared with the third device and the second device with which the first device last shared data.
  • the first device may display the user interface 82, and then, upon detecting a user operation on the sharing control 822, execute S107: the first device sends the media data and the device information of the wearable device to the large-screen device in response to the user operation on the sharing control 822, that is, the user operation on the sharing control 822 is the above-mentioned user operation on the sharing control 822.
  • the wireless connection established between the wearable device and the large-screen device includes but is not limited to a Bluetooth connection, and may also be other connection methods, such as a local area network, etc., which are not limited here.
  • the following examples provide other implementations of establishing a wireless connection between a wearable device and a large-screen device.
  • the wearable device is a device capable of switching between the roles of a master and a slave.
  • the wearable device is a slave; in steps S109 to S112, the wearable device is a master.
  • the master is a device that actively initiates a connection
  • the slave is a device that broadcasts to be discovered by other devices and then connected.
  • the wearable device does not have the ability to switch between the master and slave roles, and the wearable device can establish a Bluetooth communication connection between the wearable device and the large-screen device through the method shown in FIG. 11 below.
  • Figure 11 is a flow chart of a method for establishing a wireless connection between a wearable device and a large-screen device provided in an embodiment of the present application. It should be noted that steps S109 to S112 in the above text can be replaced by steps S202 to S205 in the above text.
  • the first device sends a second message to the wearable device, where the second message includes device information of the large-screen device.
  • the wearable device After receiving the device information of the large-screen device, the wearable device can connect the broadcast to the directional broadcast.
  • step S202 can refer to the relevant content of step S109, which will not be repeated here.
  • the wearable device sends a response message to the first device, where the response message is used to indicate that the wearable device has enabled connectable directional broadcasting.
  • step S203 can refer to the relevant content of step S110, which will not be repeated here.
  • the first device After receiving the response message, the first device sends a first message to the large-screen device, where the first message is used to instruct the wearable device to establish a wireless connection with the large-screen device.
  • S205 The large-screen device establishes a Bluetooth communication connection with the wearable device in response to the first message.
  • the large-screen device after receiving the first message, initiates a Bluetooth connection to the wearable device to establish a Bluetooth communication connection with the wearable device.
  • the device information of the wearable device can be sent from the first device to the large-screen device in step S107, or the first message can carry the device information of the wearable device and be sent to the large-screen device in step S204, which is not limited here.
  • the wearable device and the large-screen device can establish a wireless connection through a local area network.
  • the first device may send a first message to the large-screen device, and the first message includes a multicast address of a local area network.
  • the large-screen device may broadcast a multicast message based on the multicast address of the local area network, and the multicast message includes the device information of the large-screen device; the large-screen device sends a response message to the first device, and the response message is used to indicate that the large-screen device has turned on multicast.
  • the first device sends a second message to the wearable device, and the second message is used to indicate that the wearable device establishes a wireless connection with the large-screen device, and the second message includes the device information of the large-screen device.
  • the large-screen device may start to monitor the multicast message; when the device information in the multicast message is monitored as the device information of the large-screen device, a wireless connection is established with the large-screen device.
  • the device information of the large-screen device may be the MAC address of the large-screen device.
  • An embodiment of the present application also provides a device, which includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store program codes, and the program codes include instructions.
  • the device executes the method described in the above embodiment.
  • the embodiment of the present application also provides a program product including instructions, which, when executed on a device, enables the device to execute the method described in the above embodiment.
  • An embodiment of the present application also provides a readable storage medium, including instructions, which, when executed on a device, enable the device to execute the method described in the above embodiment.
  • the program product includes one or more instructions.
  • the program instructions can be stored in a readable storage medium, or transferred from one readable storage medium to another readable storage medium.
  • the readable storage medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state drive Solid State Disk), etc.
  • the processes can be completed by a program to instruct the relevant hardware, and the program can be stored in a readable storage medium.
  • the program When the program is executed, it can include the processes of the above-mentioned method embodiments.
  • the aforementioned readable storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种设备连接方法、设备及***,该方法包括:第一设备显示界面,界面包括媒体数据,第二设备为与第一设备建立无线连接的设备;第一设备响应于对于媒体数据的第一操作,向第三设备发送第一消息并向第二设备发送第二消息,第一消息包括媒体信息和第二设备的设备信息,第一消息用于指示第三设备显示媒体数据以及与第二设备建立无线连接,媒体信息包括媒体数据或媒体数据的标识;第二消息包括第三设备的设备信息,第二消息用于指示第二设备与第三设备建立无线连接。实施本申请实施例,在第一设备向第三设备分享数据的场景下,用户通过第一设备控制第二设备与第三设备建立通信,可以便捷高效实现设备之间的连接。

Description

一种设备连接方法、设备及***
本申请要求在2022年11月23日提交中国国家知识产权局、申请号为202211475139.2的中国专利申请的优先权,发明名称为“一种设备连接方法、设备及***”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术,尤其涉及一种设备连接方法、设备及***。
背景技术
用户在使用设备时,可以将其他设备添加为该设备的附属设备,从而设备与附属设备可以进行数据传输。例如,用户在使用手机的运动应用程序进行锻炼时,可以将手机与穿戴设备建立通信连接,那么,穿戴设备即被添加为手机的附属设备;进而,穿戴设备在采集用户的心率、卡路里、运动姿势、运动时长、步数和活动小时数等运动信息后,可以将该运动信息发送至手机;手机可以显示穿戴设备发送的运动信息,以供用户进行锻炼。
用户在一些场景中希望将设备的数据以及该设备的附属设备的数据分享至其他设备。例如,用户在基于手机的应用程序和穿戴设备的运动信息进行锻炼时,由于手机屏幕小且锻炼时拿着手机不便等原因,用户希望将手机的应用程序和穿戴设备的运动信息分享至大屏设备上。但是,目前的分享方法往往需要用户手动调整手机、穿戴设备和大屏设备的连接关系,操作复杂且实时性差。
因此,如何便捷高效的实现多设备之间的连接,是目前亟需解决的问题。
发明内容
本申请提供了一种设备连接方法、设备及***,在该设备连接方法中,在第一设备向第三设备分享数据的场景下,用户可以通过第一设备控制第二设备与第三设备建立通信,不需手动对第二设备和第三设备进行操作,可以便捷高效实现设备之间的连接,提高用户体验。
第一方面提供了一种设备连接方法,该方法包括:第一设备显示界面,界面包括媒体数据,第二设备为与第一设备建立无线连接的设备;第一设备响应于对于媒体数据的第一操作,向第三设备发送第一消息,并向第二设备发送第二消息,其中,第一消息包括媒体信息和第二设备的设备信息,第一消息用于指示第三设备显示媒体数据以及与第二设备建立无线连接,媒体信息包括媒体数据或媒体数据的标识;第二消息包括第三设备的设备信息,第二消息用于指示第二设备与第三设备建立无线连接。
实施本申请实施例,第一设备可以显示媒体数据;进而,响应于用户针对该媒体数据的用户操作,将媒体数据或媒体数据的标识发送至第三设备,以及控制第二设备和第三设备建立通信连接。该方法中,用户在通过第一设备向第二设备分享数据时,用户仅需要在第一设备上进行操作,可以实现第二设备和第三设备的无线连接,不需用户手动对第二设备和第三设备进行操作,可以便捷高效实现设备之间的连接,提高用户体验。
在一种可能的实现方式中,第一设备响应于对于媒体数据的第一操作,先向第三设备发送第一消息;在向第三设备发送第一消息后,再向第二设备发送第二消息。
在一种可能的实现方式中,第一设备响应于对于媒体数据的第一操作,先向第二设备发送第二消息;在向第二设备发送第二消息后,再向第三设备发送第一消息。
在一种可能的实现方式中,第一设备响应于对于媒体数据的第一操作,在向第二设备发送第二消息的同时,向第三设备发送第一消息。
结合第一方面,在一种可能的实现方式中,该方法还包括:
第一设备响应于对于媒体数据的第二操作,显示第一设备的可连接设备和第一设备的附属设备;可连接设备包括第三设备;附属设备为与第一设备已建立连接的设备,附属设备包括第二设备;第一设备响应于对于可连接设备的第三操作,确定选中的可连接设备为第三设备;第一设备响应于对于附属设备的第四操作,确定选中的附属设备为第二设备。
实施本申请实施例,第一设备可以显示发现的可连接设备以及已建立连接的附属设备,进而,响应于 用户操作,从可连接设备中确定第三设备,从附属设备中确定第二设备,以确定用户希望建立连接的两个设备。
结合第一方面,在一种可能的实现方式中,第一消息还包括用于指示开启针对第二设备的定向可连接广播的指示信息;该方法还包括:第一设备接收来自第三设备发送的第一响应消息,第一响应消息用于指示第三设备已开启针对第二设备的定向可连接广播;第一设备向第二设备发送第二消息,包括:第一设备在接收到第一响应消息后,向第二设备发送第二消息;第二消息用于指示第二设备向第三设备发起蓝牙连接。
实施本申请实施例,第一设备可以通过在第一消息中携带用于指示开启针对第二设备的定向可连接广播的指示信息,以使第三设备开启针对第二设备的定向可连接广播;第三设备可以在开启该定向可连接广播,向第一设备发送第一响应消息,以使第一设备在确定第二设备已开启该广播后向第二设备发送第二消息;第二消息用于指示第二设备向第三设备发起蓝牙连接。该方法中,第一设备可以控制第二设备和第三设备建立蓝牙通信连接,其中,第二设备在第三设备开启定向可连接广播后,再发起连接,可以提高建立连接的成功率,降低第二设备和第三设备连接过程中的功耗。
结合第一方面,在一种可能的实现方式中,第二消息还包括用于指示开启针对第三设备的定向可连接广播的指示信息;该方法还包括:第一设备在发送第二消息后,接收来自第二设备发送的第二响应消息,第二响应消息用于指示第二设备已开启针对第三设备的定向可连接广播;第一设备向第三设备发送第一消息,包括:第一设备在接收到第二响应消息后,向第三设备发送第一消息;第一消息用于第三设备向第二设备发起蓝牙连接。
实施本申请实施例,第一设备可以控制第二设备和第三设备建立蓝牙通信连接,其中,第三设备在第二设备开启定向可连接广播后,再发起连接,可以提高建立连接的成功率,降低第二设备和第三设备连接过程中的功耗。
结合第一方面,在一种可能的实现方式中,第二消息还用于指示第二设备向第三设备发送第二设备采集的数据,第三设备用于显示第二设备采集的数据;该方法还包括:
第一设备接收来自第二设备采集的数据;第一设备显示媒体数据和第二设备采集的数据。
实施本申请实施例,第一设备可以显示媒体数据和第二设备采集的数据;进而,响应于用户操作,将该媒体数据或该媒体数据的标识发送至第三设备,以及控制第二设备和第三设备建立无线连接以使第二设备将其采集的数据发送至第三设备,从而实现仅在第一设备上操作,即可实现第三设备显示该媒体数据和第二设备采集的数据。该方法可以便捷高效的将第一设备的显示内容发送至第三设备,其中,该显示内容包括第一设备的媒体数据和附属设备(即第二设备)的数据。
结合第一方面,在一种可能的实现方式中,媒体数据包括目标视频的显示数据和音频数据;第一消息还用于指示第三设备向第二设备发送音频数据,第二设备用于播放音频数据,第三设备用于显示该显示数据。
第二方面提供了一种设备连接方法,该方法包括:
第二设备接收第一设备发送的第二消息,第二消息包括第三设备的设备信息,第二消息用于指示第二设备与第三设备建立无线连接,第一设备用于在接收到对于媒体数据的第一操作时向第三设备发送第一消息,媒体数据显示在第一设备的显示界面上,第一消息包括媒体信息和第二设备的设备信息,第一消息用于指示第三设备显示媒体数据以及与第二设备建立无线连接,媒体信息包括媒体数据或媒体数据的标识;第二设备响应于第二消息,与第三设备建立无线连接。
结合第二方面,在一种可能的实现方式中,第二消息还包括用于指示第二设备向第三设备发起蓝牙连接的指示信息,第二消息为第一设备在接收到来自第三设备的第一响应消息后向第二设备发送的,第一响应消息用于指示第三设备已开启针对第二设备的定向可连接广播;第二设备响应于第二消息,与第三设备建立无线连接,包括:
第二设备响应于第二消息,向第三设备发起蓝牙连接。
结合第二方面,在一种可能的实现方式中,第二消息还包括用于指示开启针对第三设备的定向可连接广播的指示信息;第二设备响应于第二消息,与第三设备建立无线连接,包括:
第二设备响应于第二消息,开启针对第三设备的定向可连接广播;第二设备向第一设备发送第二响应消息,第二响应消息用于指示第二设备已开启针对第三设备的定向可连接广播;第二设备在第三设备发起蓝牙连接时,与第三设备建立蓝牙通信连接。
结合第二方面,在一种可能的实现方式中,第二消息还用于指示第二设备向第三设备发送第二设备采 集的数据,该方法还包括:
第二设备采集用户的运动数据;第二设备在与第三设备建立无线连接后,向第三设备发送第二设备采集的数据,第三设备用于显示第二设备采集的数据。
第三方面提供了一种设备连接方法,该方法包括:
第三设备接收第一设备发送的第一消息,第一消息用于指示第三设备与第二设备建立无线连接,第一消息包括媒体信息和第二设备的设备信息,第二设备是与第一设备建立无线连接的设备,媒体信息包括媒体数据或媒体数据的标识;第三设备响应于第一消息,显示媒体数据;第三设备与第二设备建立无线连接。
结合第三方面,在一种可能的实现方式中,第一消息还包括指示开启针对第二设备的定向可连接广播的指示信息;第三设备与第二设备建立无线连接,包括:
第三设备响应于第一消息,开启针对第二设备的定向可连接广播;第三设备向第一设备发送第一响应消息,第一响应消息用于指示第三设备已开启定向可连接广播;第三设备在第二设备发起蓝牙连接时,与第二设备建立蓝牙通信连接。
结合第三方面,在一种可能的实现方式中,第一消息还包括用于指示第二设备向第三设备发起蓝牙连接的指示信息,第一消息为第一设备在接收到来自第二设备的第二响应消息后向第三设备发送的,第二响应消息用于指示第二设备已开启定向可连接广播;第三设备与第二设备建立无线连接,包括:第二设备响应于第一消息,向第三设备发起蓝牙连接。
结合第三方面,在一种可能的实现方式中,该方法还包括:第三设备接收第二设备发送的运动数据,运动数据为第二设备采集的数据;第三设备显示运动数据。
结合第三方面,在一种可能的实现方式中,媒体数据包括目标视频对应的显示数据和音频数据;第一消息还用于指示第三设备向第二设备发送音频数据;
第三设备响应于第一消息,显示媒体数据,包括:第三设备显示该显示数据;
该方法还包括:第三设备向第二设备发送音频数据,第二设备用于播放音频数据。
第四方面提供了一种设备,包括一个或多个功能模块,该一个或多个功能模块可用于执行如上述任一方面中或任一方面中任一可能的实现方式中的设备连接方法。
第五方面提供了一种存储介质,包括指令,当指令在设备上运行时,使得设备执行上述任一方面中或任一方面中任一可能的实现方式中的设备连接方法。
第六方面提供了一种程序产品,当程序产品在设备上运行时,使得设备执行上述任一方面中或任一方面中任一可能的实现方式中的设备连接方法。
第七方面提供了一种芯片,包括:处理器和接口,所述处理器和接口相互配合,使得所述芯片执行上述任一方面中或任一方面中任一可能的实现方式中的设备连接方法。
第八方面还提供一种设备连接***,包括第一设备、第二设备和第三设备。其中,所述第一设备用于实现第一方面或者第一方面的任意一种可能的实施方式所描述的方法;所述第二设备实现第二方面或者第二方面的任意一种可能的实施方式所描述的方法;所述第三设备用于实现第三方面或者第三方面的任意一种可能的实施方式所描述的方法。
可以理解地,上述第四方面提供的设备、第五方面提供的可读存储介质、第六方面提供的程序产品、第七方面提供的芯片均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1是本申请实施例提供的一种设备连接***的框架图;
图2是本申请实施例提供的一种设备100的硬件结构示意图;
图3是本申请实施例提供的设备100的软件结构框图;
图4是本申请实施例提供的设备200的硬件结构示意图;
图5是本申请提供的一种观影场景的示意图;
图6是本申请提供的一种运动场景的流程示意图;
图7A-图7D是本申请示例性提供的添加附属设备的用户界面;
图8A-图8C是本申请示例性提供的第一设备上实现的用户界面;
图9是本申请示例性提供的第三设备上实现的用户界面;
图10是本申请实施例提供的一种设备连接方法的流程示意图;
图11是本申请实施例提供的一种穿戴设备与大屏设备建立通信连接的方法流程图。
具体实施方式
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作***与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定语言编写的源代码,界面源代码在设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与操作相关的用户界面。它可以是在设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。
为了更加清楚、详细地介绍本申请实施例提供的设备连接方法,下面先介绍本申请实施例提供的设备连接***。
请参见图1,图1是本申请实施例提供的一种设备连接***的框架图。
如图1所示,设备连接***可以包括第一设备10、附属设备20和第三设备30。
其中,附属设备20可以包括一个或多个设备;附属设备20为与第一设备10建立通信连接的设备。为方便描述,以下实施例中均将第一设备的附属设备简称为附属设备,不再赘述。
其中,第一设备10可以为具备输入功能的设备(图1示例性示出了第一设备10为手机);附属设备20可以为无线耳机,智能手表以及音箱等设备(图1示例性示出了附属设备20为智能手表和无线耳机);第三设备30可以为具备显示功能的设备(图1示例性示出了第三设备30为大屏设备)。
在一些实施例中,第一设备10可以与一个或多个附属设备20建立通信连接,如图1中所示,第一设备10与附属设备20(例如,智能手表,无线耳机)建立通信连接。
进而,第一设备10可以响应于针对第二设备的用户操作,从附属设备20中确定第二设备;第一设备10在检测到针对第三设备30的用户操作时,响应于该用户操作,将第二设备的设备信息发送至第三设备30;第一设备10可以将第三设备30的设备信息发送至第二设备;进而,第三设备30可以基于第二设备的设备信息发起定向蓝牙广播,第二设备可以基于第三设备30的设备信息向第三设备30发起蓝牙连接请求,从而建立第三设备30和第二设备之间的通信连接。其中,第二设备的设备信息可以为第二设备的名称或媒体存取控制位址(Media Access Control Address,MAC),第三设备30的设备信息可以为第三设备30的名称或MAC地址。其中,第二设备可以是附属设备20中的部分或全部设备。
应理解,附属设备20和第一设备10可以均为同一个用户的设备;附属设备20和第一设备10也可以为不同用户使用的设备。
需要说明的是,第一设备10、附属设备20和第三设备30可以为不同的设备,也可以相同的设备,又或者第一设备10、附属设备20和第三设备30中任两种设备为相同的设备,具体可以根据不同的应用场景确定,此处不作限定。
上述设备可以包括但不限于手机、穿戴设备(如智能手表等)、个人计算机(Personal Computer,PC)、平板、显示器、电视机、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机、上网本,增强现实设备、虚拟现实设备、人工智能设备、车载设备、智能家居设备等设备。
可以理解的是,图1中的设备连接***架构只是本申请实施例中的一种示例性的实施方式,本申请实施例中的设备连接***架构包括但不仅限于以上设备连接***架构。
以下示例性以设备100为例对图1中的设备进行介绍。图2示出了设备100的硬件结构示意图。
下面以设备100为例对实施例进行具体说明。应该理解的是,设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,无线耳机接口170D, 传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对设备100的具体限定。在本申请另一些实施例中,设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了***的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对设备100的结构限定。在本申请另一些实施例中,设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。
设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得设备100可以通过无线通信技术与网络以及其他设备通信。
设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。
设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。设备100可以支持一种或多种视频编解码器。这样,设备100可以播放或录制多种编码格式的视频。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现设备100的智能认知等应用,例如:人脸识别等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。
内部存储器121可以用于存储可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***,至少一个功能所需的应用(比如指纹识别功能等)等。存储数据区可存储设备100使用过程中所创建的数据(比如指纹信息模板等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件等。
设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,无线耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。无线耳机接口170D用于连接有线无线耳机。压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。陀螺仪传感器180B可以用于确定设备100的运动姿态。气压传感器180C用于测量气压。磁传感器180D包括霍尔传感器。加速度传感器180E可检测设备100在各个方向上(一般为三轴)加速度的大小。距离传感器180F,用于测量距离。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。环境光传感器180L用于感知环境光亮度。指纹传感器180H用于采集指纹。温度传感器180J用于检测温度。触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。按键190包括开机键,音量键等。马达 191可以产生振动提示。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于合成请求,未接来电,通知等。SIM卡接口195用于连接SIM卡。本申请实施例中,设备100可以通过处理器110执行所述设备连接方法。
图3是本申请实施例提供的设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android***分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和***库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息和运动健康等应用程序。
在一些实施例中,第一设备10为设备100,用户可以通过设备100的运动健康应用将手机或智能手表等设备添加为设备100的附属设备;用户也可以通过运动健康应用向其他设备发送数据,例如向第三设备发送媒体数据的标识以及附属设备的设备信息。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括显示(display)管理器,传感器(sensor)管理器,跨设备连接管理器,事件管理器,任务(activity)管理器,窗口管理器,内容提供器,视图***,资源管理器,通知管理器等。
显示管理器用于***的显示管理,负责所有显示相关事务的管理,包括创建、销毁、方向切换、大小和状态变化等。一般来说,单设备上只会有一个默认显示模块,即主显示模块。
传感器管理器负责传感器的状态管理,并管理应用向其监听传感器事件,将事件实时上报给应用。
跨设备连接管理器用于与其他设备建立通信连接。
事件管理器用于***的事件管理服务,负责接收底层上传的事件并分发给各窗口,完成事件的接收和分发等工作。
任务管理器用于任务(Activity)组件的管理,包括启动管理、生命周期管理、任务方向管理等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。窗口管理器还用于负责窗口显示管理,包括窗口显示方式、显示大小、显示坐标位置、显示层级等相关的管理。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图***包括可视控件,例如显示文字的控件,显示图片的控件等。视图***可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在***顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓***的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
***库(也可称为数据管理层)可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)和事件数据等。
表面管理器用于对显示子***进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
接下来本申请实施例以设备200为例介绍第三设备30的硬件结构和软件结构。
如图4所示,设备200可包括:处理器222、存储器223、无线通信模块224、电源开关225、显示屏229、音频模块230。在一些实施例中,设备200还可以包括有线LAN通信处理模块226、高清晰度多媒体接口(high definition multimedia interface,HDMI)通信处理模块227、USB通信处理模块228等。上述各个模块可通过总线连接。其中:
处理器222可用于读取和执行可读指令。具体实现中,处理器222可主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责执行定点或浮点算数运算操作、移位操作以及逻辑操作等,也可以执行地址运算和转换。寄存器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器222的硬件架构可以是专用集成电路(ASIC)架构、MIPS架构、ARM架构或者NP架构等等。
在本申请实施例中,处理器222可以用于解析无线通信模块224接收到的信号,如设备100发送的新URL,根据该新的URL获取播放列表中的多个视频和关联视频。
无线通信模块224可以包括WLAN通信处理模块。可选的,无线通信模块224还可包括蓝牙(BT)通信处理模块、NFC处理模块、蜂窝移动通信处理模块(未示出)等等。
在本申请实施例中,无线通信模块224可用于和设备100建立通信连接。无线通信模块224和设备100建立的通信连接可以为多种。例如,WLAN通信处理模块可用于和设备100建立Wi-Fi直连通信连接,蓝牙(BT)通信处理模块可用于和设备100建立蓝牙通信连接,NFC处理模块可用于和设备100建立NFC连接等等。
在本申请实施例中,无线通信模块224还可以用于和设备100建立通信连接,并基于该通信连接接收设备100发送的视频流。无线通信模块224和设备100建立的通信连接可以基于HTTP协议进行数据传输,本申请对设备间的通信连接类型、数据传输协议不作任何限制。
存储器223与处理器222耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器223可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器223可以存储操作***,例如uCOS、VxWorks、RTLinux等嵌入式操作***。存储器223还可以存储通信程序,该通信程序可用于与设备100,一个或多个服务器,或附加设备进行通信。
电源开关225可用于控制电源向设备200的供电。
有线LAN通信处理模块226可用于通过有线LAN和同一个LAN中的其他设备进行通信,还可用于通过有线LAN连接到WAN,可与WAN中的设备通信。
HDMI通信处理模块227可用于通过HDMI接口(未示出)与其他设备进行通信。
USB通信处理模块228可用于通过USB接口(未示出)与其他设备进行通信。
显示屏229可用于投屏页面,视频等。显示屏229可以采用LCD、OLED、AMOLED、FLED、QLED等显示屏。显示屏229所显示的内容可参考后续方法实施例的相关描述。
在本申请实施例中,显示屏229可以根据无线通信模块224接收到服务器发送的播放列表和关联视频等多个视频的视频流,来实现连续播放多个视频。
音频模块230。音频模块230可用于通过音频输出接口输出音频信号,这样可使得设备200支持音频播放。音频模块230还可用于通过音频输入接口接收音频数据。音频模块230可包括但不限于:麦克风、扬声器、受话器等等。
在一些实施例中,设备200还可以包括RS-232接口等串行接口。该串行接口可连接至其他设备,如音箱等音频外放设备,使得显示器和音频外放设备协作播放音视频。
可以理解的是图4示意的结构并不构成对设备200的具体限定。在本申请另一些实施例中,设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
在一些实施例中,设备200可以包括上述图3中所示的设备100包括的硬件。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
设备200的软件***可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构等等。示例性地,设备200的软件***可以包括但不限于Linux或者其 它操作***。为华为的鸿蒙***。
在一些实施例中,设备200为Android***,分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时和***库,以及内核层。其中,应用程序层可以包括投屏管理的应用用于设备连接和投屏显示,应用程序框架层可以包括跨设备连接管理器,事件管理器,窗口管理器和显示管理器等,***库可以包括媒体库和事件数据等,内核层用于设备发现,设备认证和设备连接等,其中各部分内容具体可以参见图3中的相关描述,此处不再赘述。
基于前文描述的设备连接***、设备100的软硬件结构,下面详细介绍本申请实施例提供的设备连接方法。
本申请实施例提供的设备连接方法可以应用于多种场景,包括但不限于:
(1)观影场景
第一设备为具备输入功能的设备,如具备触碰屏或者键盘等可接收用户操作的设备(如手机等);第三设备为具备显示功能的设备(如大屏设备或PC);附属设备为具备播放功能的设备(如无线耳机或音箱)。
在一些实施例中,第一设备可以在检测到用户操作时,响应于该用户操作,和第三设备建立通信连接;将媒体资源和附属设备的设备信息发送至第三设备,媒体资源包括图像资源和音频资源;第三设备可以播放图像资源;第三设备基于附属设备的设备信息将音频资源发送至附属设备,以使用户可以通过第三设备观看图像资源且通过附属设备收听音频资源。
结合图1所示的***,示例性的示出了图5所示的观影场景,其中,图5中的手机为图1中的第一设备10,图5中的无线耳机为图1中的附属设备20,图5中的大屏设备为图1中的第三设备30。
如图5所示,无线耳机可以与手机配对,即无线耳机为手机的附属设备,用户可以佩戴无线耳机收听手机播放记录片时的音频;进而,在用户想要通过大屏设备观看纪录片且通过无线耳机收听该纪录片的音频时,手机可以将纪录片的媒体资源和无线耳机的设备信息发送至到大屏设备,该媒体资源包括该纪录片的图像资源和音频资源;大屏设备在获取到该媒体资源后,可以基于无线耳机的设备信息与无线耳机建立通信连接,将该音频资源发送至无线耳机;进而,大屏设备可以播放该图像资源,无线耳机可以播放该音频资源。
在观影场景中使用本申请实施例提供的设备连接方法,可以通过第一设备实现将第一设备的数据(如音频资源)传输至附属设备(如无线耳机或音箱等),不需要用户手动对附属设备和第三设备进行操作,可以满足用户的观影需求,例如在家庭环境中想要通过大屏观看电影但不想打扰家人的观影需求,可以提高用户体验感。
(2)运动场景
第一设备为具备输入功能和显示功能的设备,第一设备可以显示运动视频;附属设备可以为具备采集信息功能的穿戴设备,穿戴设备可以采集用户的运动数据;第三设备可以为具备显示功能的大屏设备。
在一些实施例中,第一设备可以响应于用户操作,与大屏设备建立通信连接后将运动视频发送至到大屏设备;第一设备还可以响应于用户操作,实现大屏设备和穿戴设备的通信连接,以使穿戴设备将用户的运动数据发送至大屏设备;那么,大屏设备可以显示运动视频和用户的运动数据。
结合图1所示的***,示例性的示出了图6所示的运动场景,其中,图6中的手机为图1中的第一设备10,图6中的智能手表为图1中的附属设备20,图6中的大屏设备为图1中的第三设备30。
如图6所示,用户在家里使用手机和智能手表进行锻炼时,智能手表作为手机的附属设备,智能手表可以将用户的运动数据发送至手机,进而,手机可以显示运动视频和运动数据以供用户进行锻炼。在用户想将运动视频和运动数据发送至大屏设备(如智慧屏)时,手机可以与智慧屏建立通信连接从而将运动视频发送至智慧屏,还可以控制智慧屏和智能手表建立通信连接以使智能手表将运动数据发送至智慧屏;进而,智慧屏可以显示手机发送的运动视频和智能手表发送的运动数据。
在运动场景中使用本申请实施例提供的设备连接方法,可以通过第一设备实现将附属设备的数据传输至第三设备,可以避免附属设备的数据经第一设备发送至第三设备造成的时延,可以保证数据传输的实时性;不需要用户手动对附属设备和第三设备进行操作,可以提高用户体验感。
可理解的,以上场景仅为示例,本申请实施例提供的设备连接方法还可以应用到其他场景中,这里不做限制。
下面以图6所示的运动场景为例,介绍本申请实施例提供的第一设备(如手机)和第三设备(如大屏设备)上的一些用户界面。
图7A-图7D示出了一种第一设备添加附属设备的实现方式。
图7A示出了第一设备上的用于展示已安装应用程序的示例性用户界面71。该用户界面71显示有:运动健康应用的图标711、状态栏以及其他应用程序的图标等。其中,状态栏可包括:移动通信信号(又可称为蜂窝信号)的一个或多个信号强度指示符、Wi-Fi信号的一个或多个信号强度指示符,电池状态指示符、时间指示符等。
如图7A所示,第一设备可以检测到作用于运动健康应用的图标711的用户操作,并响应于该用户操作,显示图7B所示的用户界面72。用户界面72可包括添加控件721以及其他控件,如健康控件722A、运动控件722B,设备控件722C以及我的控件722D等,其中,添加控件721用于与其他设备建立通信连接;健康控件722A用于显示健康相关的用户界面,运动控件722B用于显示运动相关的用户界面,设备控件722C用于显示设备添加的用户界面(如图7B所示的用户界面72),我的控件722D用于显示个人信息。
需要说明的是,第一设备也可以响应于其他控件(如设备控件722C)或通过其他方式显示用户界面72,用户界面72仅为本申请实施例示例性提供的一个用户界面,不构成对本申请的限定。
在一些实施例中,如图7B所示,第一设备可以检测到作用于添加控件721上的用户操作,响应该用户操作,第一设备发现附近可连接的设备,可以显示如图7C所示的用户界面73。该用户界面73可以显示发现的设备以及设备对应的连接控件。图7C示例性示出了第一设备发送的设备包括体重秤、无线耳机和智能手表,则用户界面73包括体重秤对应的连接控件731、无线耳机对应的连接控件732以及智能手表对应的连接控件733。
此处对第一设备发现附近设备的方法不做限定。例如,第一设备可以通过蓝牙发现附近的蓝牙设备,在体重秤、无线耳机和智能手表位于第一设备的蓝牙发现范围内且均开启蓝牙时,则第一设备可以通过蓝牙发现体重秤、无线耳机和智能手表,进而,显示如图7C所示的用户界面73。
如图7C所示,第一设备在检测针对连接控件733的用户操作时,响应该用户操作,与智能手表建立通信连接,进而,显示如图7D所示的用户界面74。用户界面74包括附属设备栏741和添加控件721,其中,附属设备栏741用于显示已建立通信连接的设备,如附属设备栏741显示的智能手表。
在一些实施例中,第一设备在添加附属设备后,可以接收来自附属设备的数据,进而,显示附属设备的数据。例如,第一设备在添加智能手表为附属设备后,在接收到智能手表发送的智能手表数据时,如图7D所示,可以在附属设备栏741显示智能手表发送的智能手表数据。
在另一些实施例中,用户也可以通过用户界面73上的选择控件与多个设备建立通信连接,即将该多个设备添加为第一设备的附属设备,本申请实施例对此不作限定。为方便描述,本申请实施例仅以添加一个设备进行示例说明。
图8A-图8C以及图9示出了一种第一设备、附属设备以及第三设备连接的实现方式。其中,图8A-图8C为示例性示出的第一设备上实现的用户界面,图9为示例性示出的第三设备上实现的用户界面。
图8A示例性示出了健康运动应用中的一个用户界面81,用户界面81可以是第一设备在检测到针对如用户界面72中的运动控件722B的用户操作时显示的用户界面。用户界面81可以包括多个课程的控件,如课程控件811。
如图8A所示,第一设备可以在检测到针对课程控件811的用户操作时,响应于该用户操作,显示如图8B所示的用户界面82。该用户界面82可以包括播放窗口821、分享控件822以及显示窗口823。其中,播放窗口821用于播放视频,如图8B所示的瑜伽课程;分享控件822用于向其他设备发送当前播放窗口821对应的视频资源;显示窗口823用于显示附属设备发送的数据,例如当前第一设备的附属设备为智能手表,则显示窗口823可以如图8B所示的智能手表数据,智能手表数据可以包括智能手表实时获取的心率以及卡路里等。
如图8B所示,第一设备可以在检测到针对分享控件822的用户操作时,响应于该用户操作,显示如图8C所示的用户界面83。该用户界面83可以包括待分享设备信息831、附属设备信息832以及连接控件833。其中,待分享设备信息831用于显示第一设备发现的设备;附属设备信息832用于显示第一设备的附属设备;连接控件833用于与选定的待分享设备建立连接以及建立选定的待分享设备和选定的附属设备之间的连接。
如图8C所示,待分享设备信息831示例性示出了第一设备发送的附近设备为大屏设备A、大屏设备B和PC,以及示例性示出了大屏设备A对应的选择控件831A,大屏设备B对应的选择控件831B和PC对应的选择控件831C;附属设备信息832示例性示出了第一设备当前已连接的附属设备为智能手表和无线耳机,以及示例性示出了智能手表对应的选择控件832A和无线耳机对应的选择控件832B。
在一些实施例中,用户可以选定大屏设备A为第三设备,选定智能手表为第二设备,第一设备可以显 示如图8C所示的用户界面83,如图8C所示,大屏设备A对应的选择控件831A和智能手表对应的选择控件832A显示为选定状态,未标有“√”的选择控件为未选择状态。如图8C所示,第一设备可以在检测到用户针对连接控件833的用户操作时,响应于该用户操作,将当前播放窗口821对应的视频资源以及智能手表的设备信息发送至大屏设备A,以使大屏设备A播放当前播放窗口821对应的视频资源,以及大屏设备A基于智能手表的设备信息与智能手表建立无线连接以获取智能手表数据。
在一些实施例中,大屏设备A接收到第一设备发送的视频资源和智能手表发送的智能手表数据后,可以显示如图9所示的用户界面90。该用户界面90可以包括主窗口901和附属窗口902,其中,主窗口901用于显示第一设备发送的数据,如图9所示的瑜伽课程;附属窗口902用于显示附属设备发送的数据,如图9所示的智能手表数据。
以下基于图6的场景,以选中的附属设备为智能手表,第三设备为大屏设备为例,详细的介绍本申请实施例提供的设备连接方法。
图10示例性示出了本申请实施例提供的一种设备连接方法流程。该设备连接方法可以包括以下部分或全部步骤:
S101:第一设备和穿戴设备建立无线连接。
其中,穿戴设备可以包括一个或多个设备,穿戴设备包括但不限于智能手表、智能手环以及智能眼镜等;第一设备和穿戴设备之间建立的无线连接可包括但不限于:Wi-Fi P2P无线连接、蓝牙无线连接等等。
在一些实施例中,第一设备上安装有运动健康应用,用户可以通过该应用的用户界面与穿戴设备建立无线连接,也即是,将穿戴设备添加为第一设备的附属设备。示例性,可参见图7A至图7D的相关描述,此处不再赘述。
S102:穿戴设备将用户数据发送至第一设备。
其中,用户数据可以包括用户的名称以及用户的运动数据,运动数据可以包括心率、卡路里和运动步数等。
在一种实现中,穿戴设备可以在与第一设备建立连接后,将用户数据发送至第一设备。例如,上述穿戴设备为智能手表,用户佩戴智能手表进行运动;那么,智能手表在与第一设备建立连接后,可以实时将采集的用户的运动数据发送至第一设备,相应的,第一设备在接收到来自智能手表的用户数据后,可以显示该用户的运动数据。
在一些实施例中,穿戴设备在第一次与第一设备建立连接时,可以显示提示消息,该提示消息用于提示用户是否向第一设备发送用户设备;穿戴设备在接收到用户同意发送用户数据的用户操作时,可以将用户数据发送至第一设备;在后续连接中,穿戴设备与第一设备建立连接后可以直接实时向第一设备传输用户数据。
S103:第一设备显示媒体数据和用户数据。
在一些实施例中,第一设备可以显示第一界面,该第一界面包括媒体数据和用户数据。其中,媒体数据可以为视频或图像,此处对媒体数据的内容不做限定。
示例性的,第一界面可以为如图8B所示的用户界面82,第一设备显示用户界面82,该用户界面82可以包括播放窗口821以及显示窗口823。其中,播放窗口821用于显示媒体数据,如媒体数据为图8B所示的瑜伽课程;显示窗口823用于显示附属设备发送的数据,例如当前第一设备的附属设备为智能手表,则显示窗口823可以如图8B所示的智能手表数据,智能手表数据可以包括智能手表实时获取的心率以及卡路里等。
S104:第一设备响应于针对媒体数据的分享操作,显示待分享设备信息和附属设备信息,其中,附属设备信息包括穿戴设备,待分享设备信息包括大屏设备。
在一些实施例中,第一设备可以显示第二界面,该第二界面包括待分享设备信息和附属设备信息,其中,附属设备信息包括穿戴设备,待分享设备信息包括大屏设备。
其中,待分享设备信息可以包括一个或多个待分享设备,附属设备信息可以包括一个或多个附属设备;待分享设备为可与第一设备建立通信连接的设备,附属设备为当前与第一设备建立无线连接的设备。
示例性的,第二界面可以为如图8C所示的用户界面83,该用户界面83可以包括待分享设备信息831、附属设备信息832。其中,待分享设备信息831用于显示第一设备发现的设备;附属设备信息832用于显示第一设备的附属设备。需要说明的是,在其他实现中,第一界面和第二界面也可以为同一个界面,用户界面82和用户界面83仅为本申请实施例示例性提供的界面,不应造成本申请的限定。
在一些实施例中,第一设备可以响应于针对媒体数据的分享操作(如图8B所示的针对分享控件822 的用户操作),通过设备发现功能扫描附近预设范围内可供连接的设备,例如通过局域网或蓝牙进行设备发现;进而,第一设备可以显示待分享设备信息和附属设备信息,其中,待分享设备信息包括一个或多个通过设备发现功能扫描发现的设备,附属设备信息包括一个或多个第一设备当前已连接的设备。
例如,第一设备发现到的设备为大屏设备A、大屏设备B以及PC,第一设备的附属设备为智能手表和无线耳机,则第一设备可以显示如图8C所示的用户界面83,该用户界面83包括待分享设备信息831、附属设备信息832,其中,待分享设备信息831用于显示第一设备发现的设备;附属设备信息832用于显示第一设备的附属设备。
在一种实现中,第一设备可以从发现的设备中,将具备显示功能的设备确定为待分享设备;也就是,待分享设备信息中的设备均为具备显示功能的设备。若第一设备通过设备发现功能扫描到的设备不具备显示功能,则第一设备不显示该设备。
S105:第一设备响应于选中穿戴设备的用户操作,确定第二设备为该穿戴设备。
其中,穿戴设备可以为一个或多个。需要说明的是,此处以穿戴设备为例,在其他实施例中,用户选中的设备也可以为其他附属设备,如音箱等。
在一些实施例中,用户可以从第一设备显示的附属设备信息中选择一个或多个穿戴设备,相应的,第一设备响应于用户选中穿戴设备的用户操作,确定分享的附属设备为该穿戴设备。例如,第一设备显示的附属设备信息如图8C所示,该附属设备信息包括智能手表和无线耳机,第一设备响应于用户针对智能手表的选择操作,将智能手表确定为第二设备。
S106:第一设备可以响应于针对大屏设备的用户操作,确定第三设备为该大屏设备。
在一些实施例中,第一设备可以显示待分享设备信息,该待分享设备信息包括大屏设备;第一设备在检测到用户针对大屏设备的用户操作时,确定第三设备为该大屏设备。
S107:第一设备响应于分享至大屏设备的用户操作,向大屏设备发送第一消息,第一消息包括媒体数据的标识和穿戴设备的设备信息。
其中,穿戴设备的设备信息可以包括该穿戴设备的名称或MAC地址;媒体数据的标识用于获取该媒体数据,例如媒体数据的标识可以为统一资源标识符(Uniform Resource Identifier,URI),如媒体数据为视频,则该媒体数据的标识可以为该视频的URI。
在一种实现中,第一设备响应于分享至大屏设备的用户操作,将媒体数据的标识和穿戴设备的设备信息一同发送至大屏设备。例如,参见图8C,第一设备在检测到针对连接控件833的用户操作时,将媒体数据和智能手表的设备信息发送至大屏设备A。
在另一种实现中,第一设备也可以分别将媒体数据的标识和穿戴设备的设备信息发送至大屏设备。例如,第一设备可以在确定第三设备为大屏设备时,先将媒体数据发送至大屏设备;进而,在确定第二设备为穿戴设备时,再将穿戴设备的设备信息发送至大屏设备。
在另一些实施例中,第一设备可以将媒体数据和穿戴设备的设备信息发送至大屏设备,其中,媒体数据可以是第一设备本地存储的,也可以是第一设备从其他设备获取的,此处不作限定。
S108:大屏设备基于媒体数据的标识,播放该媒体数据。
在一些实施例中,大屏设备在接收到来自第一设备的媒体数据的标识后,可以基于该媒体数据的标识,获取该媒体数据;进而,播放该媒体数据。例如媒体数据的标识为视频的URI,大屏设备在接收到视频的URI后,可以基于该URI,从服务器获取该视频;进而,播放该视频。
在另一些实施例中,大屏设备在接收到来自第一设备的媒体数据后,可以播放该媒体数据。例如媒体数据为视频,大屏设备在接收到视频后,可以播放该视频。
S109:大屏设备在接收到穿戴设备的设备信息后,发送可连接定向广播。
其中,穿戴设备的设备信息用于在大屏设备接收到连接请求时验证连接设备是否为穿戴设备;可连接定向广播包括大屏设备的设备信息。
在一些实施例中,大屏设备在接收到穿戴设备的设备信息后,可以发送针对穿戴设备的定向可连接广播,该定向可连接广播用于仅允许该穿戴设备进行连接。
需要说明的是,广播类型可分为四种:Connectable Undirected Event Type(可连接非定向型)、Connectable Directed Event Type(可连接定向型)、Scannable Undirected Event Type(可扫描非定向型)和Non-connectable Undirected Event Type(不可连接非定向型)。本申请实施例中,大屏设备进行广播采用的是可连接定向型。
S110:大屏设备向第一设备发送响应消息,该响应消息用于指示大屏设备已开启可连接定向广播。
在一些实施例中,大屏设备在广播可连接信号后,可以向第一设备发送连接请求,该连接请求用于请求穿戴设备进行连接。
S111:第一设备在接收到该响应消息后,向穿戴设备发送第二消息,该第二消息用于指示穿戴设备与大屏设备建立无线连接,该第二消息包括大屏设备的设备信息。
在一些实施例中,第一设备在接收到上述连接请求后,向附属设备发送大屏设备的设备信息。其中,大屏设备的设备信息可以包括大屏设备的名称或MAC地址。
在一种实现中,第一设备通过蓝牙通信向穿戴设备发送第二消息,则该第二消息具体为蓝牙指令。
S112:穿戴设备在接收到上述第二消息后,基于大屏设备的设备信息与大屏设备建立蓝牙通信连接。
在一些实施例中,穿戴设备从上述第二消息中获取大屏设备的设备信息后,向大屏设备发起连接,即向大屏设备发送连接请求,该连接请求包括穿戴设备的设备信息;大屏设备在验证该连接请求中的设备为第一设备发送的穿戴设备的设备信息时,与该穿戴设备建立蓝牙通信连接。
在另一些实施例中,穿戴设备从上述第二消息中获取大屏设备的设备信息后,先通过蓝牙发现大屏设备,即确定上述可连接定向广播中的设备信息为大屏设备的设备信息;进而,向大屏设备发起连接,即向大屏设备发送连接请求,该连接请求包括穿戴设备的设备信息;大屏设备在验证该连接请求中的设备为第一设备发送的穿戴设备的设备信息时,与该穿戴设备建立蓝牙通信连接。
S113:穿戴设备基于上述蓝牙通信连接,向大屏设备发送用户数据。
在一些实施例中,穿戴设备在与大屏设备建立通信后,可以将发送至第一设备的用户数据发送至大屏设备。其中,穿戴设备向大屏设备发送的用户数据可以与步骤S102中发送至第一设备的用户数据相同,此处不再赘述。
需要说明的是,穿戴设备在向大屏设备发送用户数据后,可以停止向第一设备发送用户数据;也可以继续向第一设备发送用户数据,此处不作限定。
S114:大屏设备在接收到来自穿戴设备的用户数据后,显示该用户数据。
在一些实施例中,大屏设备在接收到来自穿戴设备的用户数据后,可以在显示屏上同时显示第一设备发送的媒体数据和穿戴设备发送的用户数据。
例如,大屏设备在接收到来自第一设备发送的瑜伽课程和来自智能手表的用户数据后,可以显示如图9所示的用户界面90,该用户界面90可以包括主窗口901和附属窗口902,其中,主窗口901用于显示瑜伽课程;附属窗口902用于显示智能手表数据。
在另一些实施例中,第三设备在接收到附属设备的数据后,也可以通过麦克风播放该数据,此处对第三设备对接收到数据的处理不作限定。
如图10所示,在图10所示的方法实施例中,第一设备先向大屏设备发送第一消息;在接收到大屏设备发送的响应消息时,再向穿戴设备发送第二消息。需要说明的是,第一设备也可以不需要等待来自穿戴设备或大屏设备的响应消息,第一设备可以在向大屏设备发送第一消息的同时,向穿戴设备发送第二消息。
在其他实施例中,第一设备也可以先向穿戴设备发送第二消息,再向大屏设备发送第一消息,具体可参加下文图11所示的实施例。需要说明的是,图10中的第一消息与图11中的第一消息不同,图10中的第二消息与图11中的第二消息不同。示例性的,以第一消息为例,图10和图11中的第一消息均用于指示大屏设备与穿戴设备建立通信连接,但是图10和图11中的第一消息携带的具体内容可以不同,图10中的第一消息具体用于指示大屏设备发送针对穿戴设备的可连接定向广播;图11中的第一消息具体用于向穿戴设备发起蓝牙连接,具体可参见图10和图11中的相关描述,此处不再赘述。
需要说明的是,上述步骤S104至步骤S107示例性提供了第一设备基于用户操作确定媒体数据、第三设备以及第二设备的一种实现,不应造成对本申请实施例的限定。
在另一些实施例中,第三设备和第二设备可以是默认的。
例如,第三设备和第二设备为第一设备上一次分享数据的第三设备(如大屏设备)和第二设备(如穿戴设备);在图8B所示的用户界面82中还可以包括第一设备上一次分享数据的第三设备和第二设备;分享控件822用于指示将当前播放窗口821对应的视频资源分享至第一设备上一次分享数据的第三设备和第二设备。那么,第一设备可以显示用户界面82,进而,在检测到用户针对分享控件822的用户操作时,执行S107:第一设备响应于分享至大屏设备的用户操作,将媒体数据和穿戴设备的设备信息发送至大屏设备,也即是说,针对分享控件822的用户操作即为上述分享至大屏设备的用户操作。
本申请实施例中,穿戴设备与大屏设备建立无线连接包括但不限于蓝牙连接,还可以是其他连接方式,如局域网等,此处不做限定。
以下示例性提供穿戴设备与大屏设备建立无线连接的其他实现方式。
需要说明的是,在图10所示的实施例中,穿戴设备为具备切换主机(master)和从机(slave)角色的设备,在穿戴设备和第一设备的无线连接中,穿戴设备为slave;步骤S109至S112中,穿戴设备为master。其中,master为主动发起连接的设备,slave为广播以被其他设备发现后连接的设备。
在另一些实施例中,穿戴设备不具备切换主机(master)和从机(slave)角色的能力,则穿戴设备可以通过以下图11的方法实现穿戴设备与大屏设备建立蓝牙通信连接。
请参见图11,图11是本申请实施例提供的一种穿戴设备与大屏设备建立无线连接的方法流程图。需要说明的是,上文中步骤S109至S112,可以替换为上文中步骤S202至S205。
S201:第一设备向穿戴设备发送第二消息,该第二消息包括大屏设备的设备信息。
S202:穿戴设备在接收到大屏设备的设备信息后,广播可连接定向广播。
步骤S202的具体实现可以参见步骤S109的相关内容,此处不再赘述。
S203:穿戴设备向第一设备发送响应消息,该响应消息用于指示穿戴设备已开启可连接定向广播。
步骤S203的具体实现可以参见步骤S110的相关内容,此处不再赘述。
S204:第一设备在接收到该响应消息后,向大屏设备发送第一消息,该第一消息用于指示穿戴设备与大屏设备建立无线连接。
S205:大屏设备响应于第一消息,与穿戴设备建立蓝牙通信连接。
在一些实施例中,大屏设备在接收到上述第一消息后,向穿戴设备发起蓝牙连接以实现与穿戴设备建立蓝牙通信连接。其中,穿戴设备的设备信息可以在步骤S107由第一设备发送至大屏设备的;也可以是在步骤S204中第一消息携带该穿戴设备的设备信息从而发送至大屏设备的,此处不作限定。
在又一些实施例中,穿戴设备与大屏设备可以通过局域网建立无线连接。
在一种实现中,第一设备可以向大屏设备发送第一消息,第一消息包括局域网的组播地址。进而,大屏设备可以基于局域网的组播地址,广播组播消息,该组播消息包括大屏设备的设备信息;大屏设备向第一设备发送响应消息,该响应消息用于指示大屏设备已开启组播。第一设备在接收到该响应消息后,向穿戴设备发送第二消息,该第二消息用于指示穿戴设备与大屏设备建立无线连接,该第二消息包括大屏设备的设备信息。大屏设备在接收到上述第二消息后,可以开始监听组播消息;在监听到组播消息中的设备信息为大屏设备的设备信息时,与该大屏设备建立无线连接。其中,大屏设备的设备信息可以为大屏设备的MAC地址。
本申请实施例还提供了一种设备,设备包括一个或多个处理器和一个或多个存储器;其中,一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储程序代码,程序代码包括指令,当一个或多个处理器执行指令时,使得设备执行上述实施例描述的方法。
本申请实施例还提供了一种包含指令的程序产品,当程序产品在设备上运行时,使得设备执行上述实施例描述的方法。
本申请实施例还提供了一种可读存储介质,包括指令,当指令在设备上运行时,使得设备执行上述实施例描述的方法。
可以理解的是,本申请的各实施方式可以任意进行组合,以实现不同的技术效果。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以程序产品的形式实现。所述程序产品包括一个或多个指令。在设备上加载和执行所述程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述程序指令可以存储在可读存储介质中,或者从一个可读存储介质向另一个可读存储介质传输。可读存储介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由程序来指令相关的硬件完成,该程序可存储于可读存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的可读存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。
总之,以上所述仅为本申请技术方案的实施例而已,并非用于限定本申请的保护范围。凡根据本申请的揭露,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (18)

  1. 一种设备连接方法,其特征在于,所述方法包括:
    第一设备显示界面,所述界面包括媒体数据,第二设备为与所述第一设备建立无线连接的设备;
    所述第一设备响应于对于所述媒体数据的第一操作,向第三设备发送第一消息,并向所述第二设备发送第二消息,其中,
    所述第一消息包括媒体信息和所述第二设备的设备信息,所述第一消息用于指示所述第三设备显示所述媒体数据以及与所述第二设备建立无线连接,所述媒体信息包括所述媒体数据或所述媒体数据的标识;
    所述第二消息包括所述第三设备的设备信息,所述第二消息用于指示所述第二设备与所述第三设备建立无线连接。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一设备响应于对于所述媒体数据的第二操作,显示所述第一设备的可连接设备和所述第一设备的附属设备,所述可连接设备包括所述第三设备,所述附属设备为与所述第一设备已建立连接的设备,所述附属设备包括所述第二设备;
    所述第一设备响应于对于所述可连接设备的第三操作,确定选中的可连接设备为所述第三设备;
    所述第一设备响应于对于所述附属设备的第四操作,确定选中的附属设备为所述第二设备。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一消息还包括用于指示开启针对所述第二设备的定向可连接广播的指示信息,所述方法还包括:
    所述第一设备接收来自所述第三设备发送的第一响应消息,所述第一响应消息用于指示所述第三设备已开启针对所述第二设备的定向可连接广播;
    所述向所述第二设备发送第二消息,包括:所述第一设备在接收到所述第一响应消息后,向所述第二设备发送所述第二消息。
  4. 根据权利要求1或2所述的方法,其特征在于,所述第二消息还包括用于指示开启针对所述第三设备的定向可连接广播的指示信息,所述方法还包括:
    所述第一设备在发送所述第二消息后,接收来自所述第二设备发送的第二响应消息,所述第二响应消息用于指示所述第二设备已开启针对所述第三设备的定向可连接广播;
    所述向所述第三设备发送第一消息,包括:所述第一设备在接收到所述第二响应消息后,向所述第三设备发送所述第一消息。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第二消息还用于指示所述第二设备向所述第三设备发送所述第二设备采集的数据,所述第三设备用于显示所述第二设备采集的数据,所述方法还包括:
    所述第一设备接收来自所述第二设备采集的数据;
    所述第一设备显示所述媒体数据和所述第二设备采集的数据。
  6. 根据权利要求1-4任一项所述的方法,其特征在于,所述媒体数据包括目标视频的显示数据和音频数据;所述第一消息还用于指示所述第三设备向所述第二设备发送所述音频数据,所述第二设备用于播放所述音频数据,所述第三设备用于显示所述显示数据。
  7. 一种设备连接方法,其特征在于,所述方法包括:
    第二设备接收第一设备发送的第二消息,所述第二消息包括第三设备的设备信息,所述第二消息用于指示所述第二设备与所述第三设备建立无线连接,所述第一设备用于在接收到对于媒体数据的第一操作时向所述第三设备发送第一消息,所述媒体数据显示在所述第一设备的显示界面上,所述第一消息包括媒体信息和所述第二设备的设备信息,所述第一消息用于指示所述第三设备显示所述媒体数据以及与所述第二设备建立无线连接,所述媒体信息包括所述媒体数据或所述媒体数据的标识;
    所述第二设备响应于所述第二消息,与所述第三设备建立无线连接。
  8. 根据权利要求7所述的方法,其特征在于,所述第二消息还包括用于指示所述第二设备向所述第三设备发起蓝牙连接的指示信息,所述第二消息为所述第一设备在接收到来自所述第三设备的第一响应消息后向所述第二设备发送的,所述第一响应消息用于指示所述第三设备已开启针对所述第二设备的定向可连接广播;
    所述第二设备响应于所述第二消息,与所述第三设备建立无线连接,包括:
    所述第二设备响应于所述第二消息,向所述第三设备发起蓝牙连接。
  9. 根据权利要求7所述的方法,其特征在于,所述第二消息还包括用于指示开启针对所述第三设备的定向可连接广播的指示信息;
    所述第二设备响应于所述第二消息,与所述第三设备建立无线连接,包括:
    所述第二设备响应于所述第二消息,开启针对所述第三设备的定向可连接广播;
    所述第二设备向所述第一设备发送第二响应消息,所述第二响应消息用于指示所述第二设备已开启针对所述第三设备的定向可连接广播;
    所述第二设备在所述第三设备发起蓝牙连接时,与所述第三设备建立蓝牙通信连接。
  10. 根据权利要求7-9任一项所述的方法,其特征在于,所述第二消息还用于指示所述第二设备向所述第三设备发送所述第二设备采集的数据,所述方法还包括:
    所述第二设备采集用户的运动数据;
    所述第二设备在与所述第三设备建立无线连接后,向所述第三设备发送所述第二设备采集的数据,所述第三设备用于显示所述第二设备采集的数据。
  11. 一种设备连接方法,其特征在于,所述方法包括:
    第三设备接收第一设备发送的第一消息,所述第一消息用于指示所述第三设备与第二设备建立无线连接,所述第一消息包括媒体信息和所述第二设备的设备信息,所述第二设备是与所述第一设备建立无线连接的设备,所述媒体信息包括所述媒体数据或所述媒体数据的标识;
    所述第三设备响应于所述第一消息,显示所述媒体数据;
    所述第三设备与所述第二设备建立无线连接。
  12. 根据权利要求11所述的方法,其特征在于,所述第一消息还包括指示开启针对所述第二设备的定向可连接广播的指示信息,
    所述第三设备与所述第二设备建立无线连接,包括:
    所述第三设备响应于所述第一消息,开启针对所述第二设备的定向可连接广播;
    所述第三设备向所述第一设备发送第一响应消息,所述第一响应消息用于指示所述第三设备已开启所述定向可连接广播;
    所述第三设备在所述第二设备发起蓝牙连接时,与所述第二设备建立蓝牙通信连接。
  13. 根据权利要求11所述的方法,其特征在于,所述第一消息还包括用于指示所述第二设备向所述第三设备发起蓝牙连接的指示信息,所述第一消息为所述第一设备在接收到来自所述第二设备的第二响应消息后向所述第三设备发送的,所述第二响应消息用于指示所述第二设备已开启所述定向可连接广播;
    所述第三设备与所述第二设备建立无线连接,包括:
    所述第二设备响应于所述第一消息,向所述第三设备发起蓝牙连接。
  14. 根据权利要求11-13任一项所述的方法,其特征在于,所述方法还包括:
    所述第三设备接收所述第二设备发送的运动数据,所述运动数据为所述第二设备采集的数据;
    所述第三设备显示所述运动数据。
  15. 根据权利要求11-13任一项所述的方法,其特征在于,所述媒体数据包括目标视频对应的显示数据和音频数据;所述第一消息还用于指示所述第三设备向所述第二设备发送所述音频数据;
    所述第三设备响应于所述第一消息,显示所述媒体数据,包括:
    所述第三设备显示所述显示数据;
    所述方法还包括:所述第三设备向所述第二设备发送所述音频数据,所述第二设备用于播放所述音频数据。
  16. 一种设备,其特征在于,所述设备包括一个或多个处理器和一个或多个存储器;其中,所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储程序代码,所述程序代码包括指令,当所述一个或多个处理器执行所述指令时,使得所述设备执行如权利要求1-15中任一项所述的方法。
  17. 一种可读存储介质,包括指令,其特征在于,当所述指令在设备上运行时,使得所述设备执行如权利要求1-15中任一项所述的方法。
  18. 一种设备连接***,其特征在于,所述***包括第一设备、第二设备和第三设备,所述第一设备用于执行如权利要求1-6中任一项所述的方法,所述第二设备用于执行如权利要求7-10中任一项所述的方法,所述第三设备用于执行如权利要求11-15中任一项所述的方法。
PCT/CN2023/127427 2022-11-23 2023-10-28 一种设备连接方法、设备及*** WO2024109443A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211475139.2 2022-11-23
CN202211475139.2A CN118075916A (zh) 2022-11-23 2022-11-23 一种设备连接方法、设备及***

Publications (1)

Publication Number Publication Date
WO2024109443A1 true WO2024109443A1 (zh) 2024-05-30

Family

ID=91097830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/127427 WO2024109443A1 (zh) 2022-11-23 2023-10-28 一种设备连接方法、设备及***

Country Status (2)

Country Link
CN (1) CN118075916A (zh)
WO (1) WO2024109443A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10805782B1 (en) * 2019-06-12 2020-10-13 Amazon Technologies, Inc. Hybrid Bluetooth low energy mesh networks having proxy devices
CN114189946A (zh) * 2020-09-15 2022-03-15 华为技术有限公司 数据分享的方法、电子设备和***
CN114466339A (zh) * 2021-06-18 2022-05-10 荣耀终端有限公司 蓝牙配对的方法及电子设备
CN115278616A (zh) * 2021-04-30 2022-11-01 华为技术有限公司 一种文件分享方法和电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10805782B1 (en) * 2019-06-12 2020-10-13 Amazon Technologies, Inc. Hybrid Bluetooth low energy mesh networks having proxy devices
CN114189946A (zh) * 2020-09-15 2022-03-15 华为技术有限公司 数据分享的方法、电子设备和***
CN115278616A (zh) * 2021-04-30 2022-11-01 华为技术有限公司 一种文件分享方法和电子设备
CN114466339A (zh) * 2021-06-18 2022-05-10 荣耀终端有限公司 蓝牙配对的方法及电子设备

Also Published As

Publication number Publication date
CN118075916A (zh) 2024-05-24

Similar Documents

Publication Publication Date Title
WO2021013158A1 (zh) 显示方法及相关装置
WO2021164554A1 (zh) 通知处理***、方法以及电子设备
WO2021139768A1 (zh) 跨设备任务处理的交互方法、电子设备及存储介质
EP3907597A1 (en) Method for displaying ui assembly and electronic device
US11683850B2 (en) Bluetooth reconnection method and related apparatus
WO2022257977A1 (zh) 电子设备的投屏方法和电子设备
EP4084486B1 (en) Cross-device content projection method, and electronic device
JP7369281B2 (ja) デバイス能力スケジューリング方法および電子デバイス
EP4174633A1 (en) Display interaction system, display method, and device
WO2021249318A1 (zh) 一种投屏方法和终端
WO2021135734A1 (zh) 应用中传输文件的方法、电子设备及***
WO2022083465A1 (zh) 电子设备的投屏方法及其介质和电子设备
CN112130788A (zh) 一种内容分享方法及其装置
WO2020134892A1 (zh) 一种媒体文件裁剪的方法、电子设备和服务器
WO2023005900A1 (zh) 一种投屏方法、电子设备及***
WO2022127661A1 (zh) 应用共享方法、电子设备和存储介质
WO2022121445A1 (zh) 添加widget的方法、装置及计算机可读存储介质
WO2024109443A1 (zh) 一种设备连接方法、设备及***
WO2022206763A1 (zh) 一种显示方法、电子设备和***
WO2022068882A1 (zh) 镜像投屏方法、装置及***
WO2022111529A1 (zh) 一种应用程序的调试方法及电子设备
WO2022152174A1 (zh) 一种投屏的方法和电子设备
US12045446B2 (en) Display interaction system, and display method and device
WO2024088225A1 (zh) 一种蓝牙测距方法、电子设备及***
WO2022228214A1 (zh) 设备发现方法、***及其电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23893534

Country of ref document: EP

Kind code of ref document: A1