[go: up one dir, main page]

WO2025039655A1 - Device connection method and apparatus, electronic device, and computer storage medium - Google Patents

Device connection method and apparatus, electronic device, and computer storage medium Download PDF

Info

Publication number
WO2025039655A1
WO2025039655A1 PCT/CN2024/096109 CN2024096109W WO2025039655A1 WO 2025039655 A1 WO2025039655 A1 WO 2025039655A1 CN 2024096109 W CN2024096109 W CN 2024096109W WO 2025039655 A1 WO2025039655 A1 WO 2025039655A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
target
audio
connection
callback function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/096109
Other languages
French (fr)
Chinese (zh)
Inventor
刘震鑫
曾庆忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Publication of WO2025039655A1 publication Critical patent/WO2025039655A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8186Monomedia components thereof involving executable data, e.g. software specially adapted to be executed by a peripheral of the client device, e.g. by a reprogrammable remote control

Definitions

  • the present application relates to the technical field of Bluetooth connection, and in particular to a device connection method, apparatus, electronic device and computer storage medium.
  • a speaker and a TV can establish a Bluetooth connection, and the TV can send audio to the speaker for playback through the Bluetooth connection.
  • a mobile phone and a TV can establish a Bluetooth connection, and the mobile phone can send audio and video to the TV for playback through the Bluetooth connection.
  • the speaker can control the playback, pause, etc. of the audio in the TV according to the audio and video remote control protocol (Audio Video Remote Control Profile, Avrcp) in Bluetooth.
  • the speaker acts as the control device (Controller, CT) in the audio and video remote control protocol
  • the TV acts as the controlled device (Target, TG) in the audio and video remote control protocol.
  • the TV can control the playback, pause, etc. of the audio and video in the mobile phone according to the audio and video remote control protocol (Audio Video Remote Control Profile, Avrcp) in Bluetooth.
  • the TV acts as the control device (Controller, CT) in the audio and video remote control protocol
  • the mobile phone acts as the controlled device (Target, TG) in the audio and video remote control protocol.
  • the TV can only be used as a controlled device in the audio and video remote control protocol, and cannot be used as a controlling device.
  • the TV establishes a Bluetooth connection with a mobile phone, the TV cannot control operations such as playing or pausing the audio and video in the mobile phone.
  • the embodiments of the present application provide a device connection method, apparatus, electronic device and computer storage medium, which can solve the technical problem that a television cannot be used as a control device in an audio and video remote control protocol.
  • the present application provides a device connection method, which is applied to an electronic device, wherein the electronic device supports a controlled service and a control service, and the method includes:
  • a connection of the audio and video remote control protocol is established with the target device.
  • an embodiment of the present application provides a device connection apparatus, which is applied to an electronic device, wherein the electronic device supports a controlled service and a control service, and the apparatus includes:
  • An instruction acquisition module is used to acquire a Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction;
  • a request acquisition module used to acquire a control connection request sent by a target device for an audio and video remote control protocol, and acquire a first target service supported by the target device according to the control connection request;
  • a service screening module used to screen out a service matching the first target service from the controlled service and the control service, and obtain a second target service for the control connection request;
  • connection establishment module is used to establish a connection of the audio and video remote control protocol with the target device according to the callback function after the second target service is registered.
  • an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the device connection method provided in the embodiment of the present application.
  • an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program.
  • the computer program is suitable for loading by a processor to execute any device connection method provided in the embodiment of the present application.
  • an embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any device connection method provided in the embodiment of the present application is implemented.
  • a Bluetooth initialization instruction is obtained, and according to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol; a control connection request sent by the target device according to the audio and video remote control protocol is obtained, and according to the control connection request, a first target service supported by the target device is obtained; a service matching the first target service is selected from the controlled service and the control service, and a second target service for the control connection request is obtained; according to the callback function after the second target service is registered, an audio and video remote control protocol is established with the target device.
  • the control service and the control service are connected to each other to realize the coexistence of the controlled service and the control service in the electronic device, and then decide whether to establish a connection of the audio and video remote control protocol with the target device according to the callback function of the controlled service or to establish a connection of the audio and video remote control protocol with the target device according to the callback function of the control service according to the first target service supported by the target device, so that the electronic device can be used as both a controlled device and a control device in the audio and video remote control protocol, thereby improving the utilization rate of the electronic device.
  • FIG1 is a schematic diagram of a flow chart of a device connection method provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of a first identifier and a second identifier provided in an embodiment of the present application
  • FIG3 is a schematic diagram of a process of Bluetooth initialization provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of another device connection process provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of another device connection process provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the structure of a device connection device provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • the embodiment of the present application provides a device connection method, device, electronic device and computer storage medium.
  • the device connection device can be integrated in an electronic device, and the electronic device can be a server or a terminal.
  • the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
  • cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
  • CDN Network acceleration services
  • the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart watch, etc., but is not limited thereto.
  • the terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
  • the term “plurality” in the embodiments of the present application refers to two or more than two.
  • the terms “first” and “second” in the embodiments of the present application are used to distinguish descriptions and should not be understood as implying relative importance.
  • the description will be made from the perspective of the device connection device.
  • the device connection device will be integrated in the terminal for detailed description, that is, the terminal will be taken as an example of an electronic device and the terminal will be used as the execution subject for detailed description.
  • FIG1 is a flow chart of a device connection method provided by an embodiment of the present application.
  • the device connection method is applied to an electronic device, and the electronic device supports a controlled service and a control service.
  • the device connection method may include:
  • the electronic device supports controlled services, which means that the electronic device stores programs that allow the electronic device to act as a controlled device (Television, TG) in the connection of an audio and video remote control protocol.
  • the electronic device supports control services, which means that the electronic device stores programs that allow the electronic device to act as a controlling device (Controller, CT) in the connection of an audio and video remote control protocol.
  • the terminal after obtaining the Bluetooth initialization instruction, performs Bluetooth initialization according to the Bluetooth initialization instruction.
  • the controlled service and the control service are initialized.
  • the callback function of the controlled service and the callback function of the control service are registered for the audio and video remote control protocol.
  • registering the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol can be understood as registering the callback function of the controlled service and the callback function of the control service to the application layer where the audio and video remote control protocol is located, so that the connection of the audio and video remote control protocol can be established subsequently according to the registered callback function.
  • the process of registering the callback function of the controlled service and the callback function of the control service for the audio and video remote control protocol according to the Bluetooth initialization instruction can be:
  • the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol, and the first identifier corresponding to the callback function of the control service and the second identifier corresponding to the callback function of the controlled service are obtained.
  • the first identifier may be 1
  • the second identifier may be 2
  • the AvrcpCT service refers to the control service
  • the AvrcpTG service refers to the controlled service.
  • the terminal can obtain the Bluetooth initialization instruction in response to the user's operation, or the terminal can also generate the Bluetooth initialization instruction according to the Bluetooth startup instruction, or the terminal can also receive the Bluetooth initialization instruction sent by other terminals.
  • the way in which the terminal obtains the Bluetooth initialization instruction can be selected according to actual conditions, and the embodiments of the present application are not limited here.
  • the terminal can establish a Bluetooth audio transmission model protocol (Advanced Audio Distribution Profile, A2DP) connection with the target device, so that multimedia can be transmitted between the target device and the terminal through the Bluetooth audio transmission model protocol connection.
  • A2DP Advanced Audio Distribution Profile
  • Multimedia is a combination of various media, which may include at least one of text, sound, image and video.
  • the target device can be the source device (Audio Source) and the terminal can be the receiving device (Audio Sink), or the target device can be the receiving device and the terminal can be the source device.
  • the multimedia transmission direction is from the target device to the terminal.
  • the target device acts as a receiving device and the terminal acts as a source device
  • the multimedia transmission direction is from the terminal to the target device.
  • the target device is a speaker and the terminal is a TV
  • the speaker is the receiving device and the TV is the source device
  • the multimedia transmission direction is from the TV to the speaker.
  • the target device is a mobile phone and the terminal is a TV
  • the TV is the receiving device and the mobile phone is the source device
  • the multimedia transmission direction is from the mobile phone to the TV.
  • S102 Obtain a control connection request sent by a target device for an audio and video remote control protocol, and obtain a first target service supported by the target device according to the control connection request.
  • the target device can be used as a controlled device (TG) in the connection of the audio and video remote control protocol.
  • TG controlled device
  • CT control device
  • the method for obtaining the first target service supported by the target device can be selected according to actual conditions, and the embodiment of the present application does not limit this.
  • the electronic device establishes a connection with the first target device using an audio and video remote control protocol; and according to the control connection request, obtains a first target service supported by the target device, including:
  • the priority of each device can be set to determine which device to establish the audio and video remote control protocol connection with according to the priority of each device.
  • the connection of the audio and video remote control protocol with the target device is not disconnected.
  • a controlled service and a control service coexist in a terminal, and during the Bluetooth initialization process, the callback function of the controlled service and the callback function of the control service are registered for the audio and video remote control protocol, so that even if the role played by the terminal in the connection with the audio and video remote control protocol of the target device and the role played by the terminal in the connection with the audio and video remote control protocol of the first target device are different, there is no need to restart the controlled service or the control service.
  • the role of the terminal is the control device
  • the role of the terminal is the controlled device. Even if the terminal first establishes a connection of the audio and video remote control protocol with the first target device, there is no need to restart the control service when establishing a connection of the audio and video remote control protocol with the target device.
  • S103 Filter out services matching the first target service from the controlled services and the control services, and obtain a second target service for the control connection request.
  • the service matching the first target service refers to a service that is complementary to the first target service.
  • the first target service is the first controlled service
  • the target device is the controlled device
  • the second target service is the control service
  • the terminal is the control device.
  • the first target service is the first control service
  • the target device is the control device
  • the second target service is the controlled service
  • the terminal is the controlled device.
  • the process of filtering out a service matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request is:
  • a service matching the third target service is screened out from the controlled service and the control service to obtain a second target service for the control connection request.
  • the third target service is the first controlled service
  • the second target service is the controlling service.
  • the third target service is the first controlling service
  • the second target service is the controlled service.
  • the target screening strategy can be set according to the actual situation, and the present application embodiment does not limit it here.
  • the process of obtaining the target screening strategy can be:
  • the target screening strategy can be determined according to the transmission direction of the multimedia between the target device and the electronic device.
  • the target screening strategy is to screen out the first controlled service
  • the third target service is the first controlled service
  • the second target service is the control service.
  • the target screening strategy is to screen out the first control service
  • the third target service is the first control service
  • the second target service is the controlled service.
  • the target device is a speaker
  • the terminal is a TV
  • the transmission direction is from the TV to the speaker.
  • the speaker serves as a control device
  • the service used by the speaker is the first control service
  • the target screening strategy is to screen out the first control service.
  • the target device is a mobile phone
  • the terminal is a TV
  • the transmission direction is from the mobile phone to the TV.
  • the mobile phone is the controlled device
  • the service used by the mobile phone is the first controlled service
  • the target screening strategy is to screen out the first controlled service.
  • the process of obtaining the target screening strategy can also be:
  • a target screening strategy may be determined based on the historical target services of the target device.
  • the historical target service is the first controlled service
  • the target device established an audio and video remote control protocol connection with the terminal through the first controlled service at time A in the past. Then the target screening strategy is to screen out the first controlled service.
  • the historical target service is the first control service
  • the target device established an audio and video remote control protocol connection with the terminal through the first control service at time A in the past, then the target screening strategy is to screen out the first control service.
  • the target filtering strategy can be determined based on the historical target service corresponding to the time closest to the current time, or, the target filtering strategy can be determined based on the historical target service that appears the most times, or, the target filtering strategy can be determined based on the historical target service corresponding to the time that matches the current time.
  • the target screening strategy is determined according to the first controlling service.
  • the target screening strategy is determined according to the first controlled service.
  • the target screening strategy is determined based on the first controlled service.
  • S104 Establishing an audio and video remote control protocol connection with the target device according to the callback function after the second target service is registered.
  • the first target service is a controlled service, then according to the callback function registered by the controlled service, a connection of the audio and video remote control protocol is established with the target device; if the first target service is a control service, then according to the callback function registered by the control service, a connection of the audio and video remote control protocol is established with the target device.
  • the process of establishing a connection of the audio and video remote control protocol with the target device can be:
  • the second target service is a control service, establishing a connection of an audio and video remote control protocol with the target device according to the callback function corresponding to the first identifier;
  • the second target service is a controlled service
  • a connection of an audio and video remote control protocol is established with the target device according to the callback function corresponding to the second identifier.
  • the terminal When the terminal establishes an audio and video remote control protocol connection with the target device according to the callback function registered by the controlled service, after the terminal establishes the audio and video remote control protocol connection with the target device, it can receive control instructions of the target device to control the multimedia in the terminal through the audio and video remote control protocol connection with the target device, and then control the multimedia according to the control instructions.
  • the terminal When the terminal establishes an audio and video remote control protocol connection with the target device according to the callback function registered with the control service, the terminal can control the multimedia in the target device through the audio and video remote control protocol connection with the target device.
  • the terminal controls the multimedia in the target device by connecting to the audio and video remote control protocol of the target device.
  • the method can be selected according to actual conditions.
  • the multimedia in the target device can be controlled to pause, play, play the previous song or the next song, etc.
  • the embodiment of the present application is not limited here.
  • a controlled service and a control service coexist in a terminal, and the role of the terminal is determined according to the role of the target device.
  • the role of the target device is a controlled device
  • the role of the terminal is a control device
  • the role of the terminal is a controlled device, so that when the terminal is connected to the audio and video remote control protocol of the target device, there will be no role errors, so that when the terminal acts as a control device and controls the multimedia in the target device through the connection with the audio and video remote control protocol of the target device, there will be no errors in the control of the multimedia, thereby improving the user experience and thus improving the utilization rate of the terminal.
  • a Bluetooth initialization instruction is obtained, and according to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol; a control connection request sent by the target device according to the audio and video remote control protocol is obtained, and according to the control connection request, the audio and video remote control protocol supported by the target device is obtained.
  • a first target service filtering out services matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request; establishing an audio and video remote control protocol connection with the target device according to the callback function after the second target service is registered, thereby realizing the coexistence of the controlled service and the control service in the electronic device, and then deciding whether to establish an audio and video remote control protocol connection with the target device according to the callback function of the controlled service or to establish an audio and video remote control protocol connection with the target device according to the callback function of the control service according to the first target service supported by the target device, so that the electronic device can be used as both a controlled device and a control device in the audio and video remote control protocol, thereby improving the utilization rate of the electronic device.
  • the terminal obtains a Bluetooth startup instruction, and performs Bluetooth service initialization according to the Bluetooth startup instruction. During the Bluetooth initialization process, the controlled service initialization and the control service initialization are performed.
  • the terminal registers the callback function of the control service with the audio and video remote control protocol to obtain a first identifier corresponding to the callback function of the control service.
  • the terminal registers the callback function of the controlled service with the audio and video remote control protocol to obtain a second identifier corresponding to the callback function of the controlled service.
  • the terminal After the registration of the callback function is completed, the terminal will connect the audio and video remote control protocol.
  • the terminal obtains a control connection request sent by the target device for the audio and video remote control protocol, and obtains a first target service supported by the target device according to the control connection request.
  • the terminal determines the control service as the second target service, and establishes a connection of an audio and video remote control protocol with the target device according to a callback function corresponding to the first identifier.
  • the terminal determines the controlled service as the second target service, and establishes a connection of the audio and video remote control protocol with the target device according to the callback function corresponding to the second identifier.
  • the startup state of the target application is determined. If the startup state of the target application is startup, the control service is determined as the second target service, and a connection of the audio and video remote control protocol is established with the target device according to the callback function corresponding to the first identifier. If the startup state of the target application is shutdown, the page displayed by the terminal at this time can be any interface or the default interface, and the transmission direction of the multimedia can be determined.
  • the terminal determines the control service as the second target service, and establishes an audio and video remote control protocol connection with the target device according to the callback function corresponding to the first identifier. If the transmission direction is from the terminal to the target device, the terminal determines the controlled service as the second target service, and establishes an audio and video remote control protocol connection with the target device according to the callback function corresponding to the second identifier.
  • the embodiment of the present application also provides a device based on the above device connection method, which is applied to an electronic device, and the electronic device supports controlled services and control services.
  • the meanings of the terms are the same as those in the above device connection method, and the specific implementation details can refer to the description in the method embodiment.
  • the device connection device may include:
  • the instruction acquisition module 601 is used to acquire a Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction.
  • the request acquisition module 602 is used to acquire a control connection request sent by a target device for an audio and video remote control protocol, and acquire a first target service supported by the target device according to the control connection request.
  • the service screening module 603 is used to screen out the service matching the first target service from the controlled service and the control service, and obtain the second target service for the control connection request.
  • the connection establishment module 604 is used to establish a connection of the audio and video remote control protocol with the target device according to the callback function after the second target service is registered.
  • the first target service includes a first controlled service and a first controlling service.
  • the service screening module 603 is specifically used to execute:
  • a service matching the third target service is screened out from the controlled service and the control service to obtain a second target service for the control connection request.
  • the service screening module 603 is specifically configured to execute:
  • the service screening module 603 is specifically configured to execute:
  • the service screening module 603 is specifically configured to execute:
  • the electronic device establishes a connection with the first target device using an audio and video remote control protocol; accordingly, the request acquisition module 602 is specifically configured to execute:
  • the instruction acquisition module 601 is specifically used to execute:
  • the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol, and the first identifier corresponding to the callback function of the control service and the second identifier corresponding to the callback function of the controlled service are obtained.
  • connection establishing module 604 is specifically configured to execute:
  • the second target service is a control service, establishing a connection of an audio and video remote control protocol with the target device according to the callback function corresponding to the first identifier;
  • the second target service is a controlled service
  • a connection of an audio and video remote control protocol is established with the target device according to the callback function corresponding to the second identifier.
  • the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities.
  • the specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.
  • the embodiment of the present application further provides an electronic device, which may be a server or a terminal, etc.
  • an electronic device which may be a server or a terminal, etc.
  • FIG. 7 it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application. Specifically:
  • the electronic device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • an input unit 704 which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the electronic device may further include a display unit, etc., which will not be described in detail herein.
  • the processor 701 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 702 according to the following instructions, and the processor 701 will run the computer programs stored in the memory 702, thereby realizing various functions, such as:
  • a connection of an audio and video remote control protocol is established with the target device.
  • an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any device connection method provided in the embodiment of the present application.
  • the computer program can execute the following steps:
  • a connection of an audio and video remote control protocol is established with the target device.
  • the computer readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or CD, etc.
  • the computer program stored in the computer-readable storage medium can execute the steps in any device connection method provided in the embodiments of the present application, the beneficial effects that can be achieved by any device connection method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
  • a computer program product or a computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium.
  • a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned device connection method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Selective Calling Equipment (AREA)

Abstract

Disclosed in embodiments of the present application are a device connection method and apparatus, an electronic device, and a computer storage medium. In the embodiments of the present application, the method comprises: acquiring a Bluetooth initialization instruction, and according to the Bluetooth initialization instruction, registering a callback function of a controlled service and a callback function of a control service in an audio/video remote control profile; acquiring a control connection request sent by a target device for the audio/video remote control profile, and on the basis of the control connection request, acquiring a first target service supported by the target device; screening the controlled service and the control service for a service matched with the first target service, so as to obtain a second target service for the control connection request; and on the basis of a registered callback function of the second target service, establishing audio/video remote control profile-based connection with the target device. According to the embodiments of the present application, an electronic device in an audio/video remote control profile may be used as a controller, and may also be used as a controlled device.

Description

设备连接方法、装置、电子设备及计算机存储介质Device connection method, device, electronic device and computer storage medium

本申请要求于2023年08月23日提交中国专利局、申请号为202311069946.9、申请名称为“设备连接方法、装置、电子设备及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on August 23, 2023, with application number 202311069946.9 and application name “Device connection method, device, electronic device and computer storage medium”, the entire contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及蓝牙连接技术领域,具体涉及一种设备连接方法、装置、电子设备及计算机存储介质。The present application relates to the technical field of Bluetooth connection, and in particular to a device connection method, apparatus, electronic device and computer storage medium.

背景技术Background Art

随着科学技术的发展,蓝牙技术的应用越来越广泛。比如,音箱和电视可以建立蓝牙连接,电视通过蓝牙连接,将音频发送至音箱进行播放。又比如,手机和电视可以建立蓝牙连接,手机可以通过蓝牙连接,将音视频发送至电视进行播放。With the development of science and technology, the application of Bluetooth technology is becoming more and more extensive. For example, a speaker and a TV can establish a Bluetooth connection, and the TV can send audio to the speaker for playback through the Bluetooth connection. For another example, a mobile phone and a TV can establish a Bluetooth connection, and the mobile phone can send audio and video to the TV for playback through the Bluetooth connection.

在音箱和电视建立蓝牙连接之后,音箱可以根据蓝牙中的音视频远程控制协议(Audio Video Remote Control Profile,Avrcp)控制电视中音频的播放、暂停等,此时,音箱作为音视频远程控制协议中的控制设备(Controller,CT),电视作为音视频远程控制协议中的被控设备(Target,TG),在手机和电视建立蓝牙连接之后,电视可以根据蓝牙中的音视频远程控制协议(Audio Video Remote Control Profile,Avrcp)控制手机中音视频的播放、暂停等,此时,电视作为音视频远程控制协议中的控制设备(Controller,CT),手机作为音视频远程控制协议中的被控设备(Target,TG)。After the speaker and the TV establish a Bluetooth connection, the speaker can control the playback, pause, etc. of the audio in the TV according to the audio and video remote control protocol (Audio Video Remote Control Profile, Avrcp) in Bluetooth. At this time, the speaker acts as the control device (Controller, CT) in the audio and video remote control protocol, and the TV acts as the controlled device (Target, TG) in the audio and video remote control protocol. After the mobile phone and the TV establish a Bluetooth connection, the TV can control the playback, pause, etc. of the audio and video in the mobile phone according to the audio and video remote control protocol (Audio Video Remote Control Profile, Avrcp) in Bluetooth. At this time, the TV acts as the control device (Controller, CT) in the audio and video remote control protocol, and the mobile phone acts as the controlled device (Target, TG) in the audio and video remote control protocol.

目前,电视在音视频远程控制协议中只支持作为被控设备,无法作为控制设备,当电视与手机建立蓝牙连接时,会导致电视无法控制手机中音视频的播放或暂停等操作。Currently, the TV can only be used as a controlled device in the audio and video remote control protocol, and cannot be used as a controlling device. When the TV establishes a Bluetooth connection with a mobile phone, the TV cannot control operations such as playing or pausing the audio and video in the mobile phone.

技术解决方案Technical Solutions

本申请实施例提供一种设备连接方法、装置、电子设备及计算机存储介质,可以解决在音视频远程控制协议中电视无法作为控制设备的技术问题。The embodiments of the present application provide a device connection method, apparatus, electronic device and computer storage medium, which can solve the technical problem that a television cannot be used as a control device in an audio and video remote control protocol.

本申请实施例提供一种设备连接方法,应用于电子设备,上述电子设备支持被控服务和控制服务,上述方法包括:The present application provides a device connection method, which is applied to an electronic device, wherein the electronic device supports a controlled service and a control service, and the method includes:

获取蓝牙初始化指令,根据蓝牙初始化指令,将上述被控服务的回调函数和上述控制服务的回调函数进行音视频远程控制协议注册; Obtain a Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction;

获取目标设备根据音视频远程控制协议发送的控制连接请求,并根据上述控制连接请求,获取上述目标设备支持的第一目标服务;Obtaining a control connection request sent by a target device according to an audio and video remote control protocol, and obtaining a first target service supported by the target device according to the control connection request;

从上述被控服务和上述控制服务中筛选出与上述第一目标服务匹配的服务,得到针对上述控制连接请求的第二目标服务;Filter out a service matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request;

根据上述第二目标服务注册后的回调函数,与上述目标设备建立上述音视频远程控制协议的连接。According to the callback function after the second target service is registered, a connection of the audio and video remote control protocol is established with the target device.

相应地,本申请实施例提供一种设备连接装置,应用于电子设备,上述电子设备支持被控服务和控制服务,上述装置包括:Accordingly, an embodiment of the present application provides a device connection apparatus, which is applied to an electronic device, wherein the electronic device supports a controlled service and a control service, and the apparatus includes:

指令获取模块,用于获取蓝牙初始化指令,根据蓝牙初始化指令,将上述被控服务的回调函数和上述控制服务的回调函数进行音视频远程控制协议注册;An instruction acquisition module is used to acquire a Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction;

请求获取模块,用于获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据上述控制连接请求,获取上述目标设备支持的第一目标服务;A request acquisition module, used to acquire a control connection request sent by a target device for an audio and video remote control protocol, and acquire a first target service supported by the target device according to the control connection request;

服务筛选模块,用于从上述被控服务和上述控制服务中筛选出与上述第一目标服务匹配的服务,得到针对上述控制连接请求的第二目标服务;A service screening module, used to screen out a service matching the first target service from the controlled service and the control service, and obtain a second target service for the control connection request;

连接建立模块,用于根据上述第二目标服务注册后的回调函数,与上述目标设备建立上述音视频远程控制协议的连接。The connection establishment module is used to establish a connection of the audio and video remote control protocol with the target device according to the callback function after the second target service is registered.

此外,本申请实施例还提供一种电子设备,包括处理器和存储器,上述存储器存储有计算机程序,上述处理器用于运行上述存储器内的计算机程序实现本申请实施例提供的设备连接方法。In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the device connection method provided in the embodiment of the present application.

此外,本申请实施例还提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序适于处理器进行加载,以执行本申请实施例所提供的任一种设备连接方法。In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for loading by a processor to execute any device connection method provided in the embodiment of the present application.

此外,本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现本申请实施例所提供的任一种设备连接方法。In addition, an embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, any device connection method provided in the embodiment of the present application is implemented.

在本申请实施例中,获取蓝牙初始化指令,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册;获取目标设备根据音视频远程控制协议发送的控制连接请求,并根据控制连接请求,获取目标设备支持的第一目标服务;从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务;根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议 的连接,实现在电子设备中共存被控服务和控制服务,然后根据目标设备支持的第一目标服务决定是根据被控服务的回调函数与目标设备建立音视频远程控制协议的连接还是根据控制服务的回调函数与目标设备建立音视频远程控制协议的连接,使得电子设备在音视频远程控制协议中既可以作为被控设备,也可以作为控制设备,提高电子设备的使用率。In an embodiment of the present application, a Bluetooth initialization instruction is obtained, and according to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol; a control connection request sent by the target device according to the audio and video remote control protocol is obtained, and according to the control connection request, a first target service supported by the target device is obtained; a service matching the first target service is selected from the controlled service and the control service, and a second target service for the control connection request is obtained; according to the callback function after the second target service is registered, an audio and video remote control protocol is established with the target device. The control service and the control service are connected to each other to realize the coexistence of the controlled service and the control service in the electronic device, and then decide whether to establish a connection of the audio and video remote control protocol with the target device according to the callback function of the controlled service or to establish a connection of the audio and video remote control protocol with the target device according to the callback function of the control service according to the first target service supported by the target device, so that the electronic device can be used as both a controlled device and a control device in the audio and video remote control protocol, thereby improving the utilization rate of the electronic device.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

图1是本申请实施例提供的设备连接方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a device connection method provided in an embodiment of the present application;

图2是本申请实施例提供的第一标识和第二标识的示意图;FIG2 is a schematic diagram of a first identifier and a second identifier provided in an embodiment of the present application;

图3是本申请实施例提供的蓝牙初始化的流程示意图;FIG3 is a schematic diagram of a process of Bluetooth initialization provided in an embodiment of the present application;

图4是本申请实施例提供的另一种设备连接的流程示意图;FIG4 is a schematic diagram of another device connection process provided in an embodiment of the present application;

图5是本申请实施例提供的另一种设备连接的流程示意图;FIG5 is a schematic diagram of another device connection process provided in an embodiment of the present application;

图6是本申请实施例提供的设备连接装置的结构示意图;FIG6 is a schematic diagram of the structure of a device connection device provided in an embodiment of the present application;

图7是本申请实施例提供的电子设备的结构示意图。FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

本申请的实施方式Implementation Methods of the Application

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

本申请实施例提供一种设备连接方法、装置、电子设备及计算机存储介质。该设备连接装置可以集成在电子设备中,该电子设备可以是服务器,也可以是终端等设备。The embodiment of the present application provides a device connection method, device, electronic device and computer storage medium. The device connection device can be integrated in an electronic device, and the electronic device can be a server or a terminal.

其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、网络加速服务(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能电视、智能手表等,但并不局限于此。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。 The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

另外,本申请实施例中的“多个”指两个或两个以上。本申请实施例中的“第一”和“第二”等用于区分描述,而不能理解为暗示相对重要性。In addition, the term "plurality" in the embodiments of the present application refers to two or more than two. The terms "first" and "second" in the embodiments of the present application are used to distinguish descriptions and should not be understood as implying relative importance.

以下分别进行详细说明。需要说明的是,以下实施例的描述顺序不作为对实施例优选顺序的限定。It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

在本实施例中,将从设备连接装置的角度进行描述,为了方便对本申请的设备连接方法进行说明,以下将以设备连接装置集成在终端中进行详细说明,即以终端为电子设备为例子,以终端作为执行主体进行详细说明。In this embodiment, the description will be made from the perspective of the device connection device. In order to facilitate the description of the device connection method of the present application, the device connection device will be integrated in the terminal for detailed description, that is, the terminal will be taken as an example of an electronic device and the terminal will be used as the execution subject for detailed description.

请参阅图1,图1是本申请一实施例提供的设备连接方法的流程示意图。该设备连接方法应用于电子设备,电子设备支持被控服务和控制服务,该设备连接方法可以包括:Please refer to FIG1 , which is a flow chart of a device connection method provided by an embodiment of the present application. The device connection method is applied to an electronic device, and the electronic device supports a controlled service and a control service. The device connection method may include:

S101、获取蓝牙初始化指令,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册。S101, obtaining a Bluetooth initialization instruction, and registering a callback function of the controlled service and a callback function of the control service with an audio and video remote control protocol according to the Bluetooth initialization instruction.

电子设备支持被控服务,指电子设备中存储电子设备在音视频远程控制协议的连接中,可以作为被控设备(Television,TG)的程序,电子设备支持控制服务,指电子设备中存储电子设备在音视频远程控制协议的连接中可以作为控制设备(Controller,CT)的程序。The electronic device supports controlled services, which means that the electronic device stores programs that allow the electronic device to act as a controlled device (Television, TG) in the connection of an audio and video remote control protocol. The electronic device supports control services, which means that the electronic device stores programs that allow the electronic device to act as a controlling device (Controller, CT) in the connection of an audio and video remote control protocol.

在本申请实施例中,终端在获取到蓝牙初始化指令之后,根据蓝牙初始化指令,进行蓝牙初始化,在蓝牙初始化的过程中,对被控服务和控制服务进行初始化,在对被控服务和控制服务进行初始化的过程中,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册。In an embodiment of the present application, after obtaining the Bluetooth initialization instruction, the terminal performs Bluetooth initialization according to the Bluetooth initialization instruction. During the Bluetooth initialization process, the controlled service and the control service are initialized. During the initialization of the controlled service and the control service, the callback function of the controlled service and the callback function of the control service are registered for the audio and video remote control protocol.

其中,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册,可以理解为向音视频远程控制协议所在的应用层注册被控服务的回调函数和控制服务的回调函数,以便后续可以根据注册后的回调函数建立音视频远程控制协议的连接。Among them, registering the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol can be understood as registering the callback function of the controlled service and the callback function of the control service to the application layer where the audio and video remote control protocol is located, so that the connection of the audio and video remote control protocol can be established subsequently according to the registered callback function.

可选地,为了在建立音视频远程控制协议的连接时,方便调用注册后的回调函数,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册的过程可以为:Optionally, in order to facilitate calling the registered callback function when establishing a connection of the audio and video remote control protocol, the process of registering the callback function of the controlled service and the callback function of the control service for the audio and video remote control protocol according to the Bluetooth initialization instruction can be:

根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册,得到控制服务的回调函数对应的第一标识,以及得到被控服务的回调函数对应的第二标识。According to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol, and the first identifier corresponding to the callback function of the control service and the second identifier corresponding to the callback function of the controlled service are obtained.

比如,如图2所示,第一标识可以为1,第二标识可以为2,AvrcpCT服务指控制服务,AvrcpTG服务指被控服务。 For example, as shown in FIG. 2 , the first identifier may be 1, the second identifier may be 2, the AvrcpCT service refers to the control service, and the AvrcpTG service refers to the controlled service.

可选地,终端可以响应于用户的操作,获取到蓝牙初始化指令,或者,终端也可以根据蓝牙的启动指令,生成蓝牙初始化指令,或者,终端也可以接收其他终端发送的蓝牙初始化指令。对于终端获取蓝牙初始化指令的方式,可以根据实际情况进行选择,本申请实施例在此不做限定。Optionally, the terminal can obtain the Bluetooth initialization instruction in response to the user's operation, or the terminal can also generate the Bluetooth initialization instruction according to the Bluetooth startup instruction, or the terminal can also receive the Bluetooth initialization instruction sent by other terminals. The way in which the terminal obtains the Bluetooth initialization instruction can be selected according to actual conditions, and the embodiments of the present application are not limited here.

可选地,终端在蓝牙初始化完成之后,可以与目标设备建立蓝牙音频传输模型协议的(Advanced Audio Distribution Profile,A2DP)连接,以便可以在目标设备和终端之间,可以通过蓝牙音频传输模型协议的连接,传输多媒体。Optionally, after the Bluetooth initialization is completed, the terminal can establish a Bluetooth audio transmission model protocol (Advanced Audio Distribution Profile, A2DP) connection with the target device, so that multimedia can be transmitted between the target device and the terminal through the Bluetooth audio transmission model protocol connection.

多媒体是多种媒体的综合,其可以包括文本、声音、图像以及视频中的至少一种。Multimedia is a combination of various media, which may include at least one of text, sound, image and video.

在终端与目标设备建立蓝牙音频传输模型协议的连接时,可以是目标设备作为源设备(Audio Source),终端作为接收设备(Audio Sink),也可以是目标设备作为接收设备,终端作为源设备。When the terminal and the target device establish a connection based on the Bluetooth audio transmission model protocol, the target device can be the source device (Audio Source) and the terminal can be the receiving device (Audio Sink), or the target device can be the receiving device and the terminal can be the source device.

当目标设备作为源设备,终端作为接收设备时,多媒体的传输方向为从目标设备到终端,当目标设备作为接收设备,终端作为源设备时,多媒体的传输方向为从终端到目标设备。When the target device acts as a source device and the terminal acts as a receiving device, the multimedia transmission direction is from the target device to the terminal. When the target device acts as a receiving device and the terminal acts as a source device, the multimedia transmission direction is from the terminal to the target device.

比如,当目标设备为音箱,终端为电视时,音箱为接收设备,电视为源设备,多媒体的传输方向为从电视到音箱。又比如,当目标设备为手机,终端为电视时,电视为接收设备,手机为源设备,多媒体的传输方向为从手机到电视。For example, when the target device is a speaker and the terminal is a TV, the speaker is the receiving device and the TV is the source device, and the multimedia transmission direction is from the TV to the speaker. For another example, when the target device is a mobile phone and the terminal is a TV, the TV is the receiving device and the mobile phone is the source device, and the multimedia transmission direction is from the mobile phone to the TV.

S102、获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据控制连接请求,获取目标设备支持的第一目标服务。S102: Obtain a control connection request sent by a target device for an audio and video remote control protocol, and obtain a first target service supported by the target device according to the control connection request.

目标设备针对音视频远程控制协议发送的控制连接请求,指用于建立音视频远程控制协议的连接的控制连接请求。The control connection request sent by the target device for the audio and video remote control protocol refers to a control connection request used to establish a connection for the audio and video remote control protocol.

终端在获取到控制连接请求之后,获取目标设备支持的第一目标服务。第一目标服务包括第一被控服务和第一控制服务中的至少一种。After obtaining the control connection request, the terminal obtains a first target service supported by the target device. The first target service includes at least one of a first controlled service and a first control service.

当第一目标服务包括第一被控服务时,表示目标设备在音视频远程控制协议的连接中,可以作为被控设备(TG),当第一目标服务包括第一控制服务时,表示目标设备在音视频远程控制协议的连接中,可以作为控制设备(CT)。When the first target service includes the first controlled service, it means that the target device can be used as a controlled device (TG) in the connection of the audio and video remote control protocol. When the first target service includes the first control service, it means that the target device can be used as a control device (CT) in the connection of the audio and video remote control protocol.

可选地,终端可以根据控制连接请求,从目标设备中获取目标设备支持的第一目标服务,或者,终端也可以根据控制连接请求,从服务器中获取目标设备支持的第一目标服务, 又或者,终端也可以根据控制连接请求,从本地存储空间中获取目标设备支持的第一目标服务。Optionally, the terminal may obtain the first target service supported by the target device from the target device according to the control connection request, or the terminal may obtain the first target service supported by the target device from the server according to the control connection request. Alternatively, the terminal may also obtain the first target service supported by the target device from the local storage space according to the control connection request.

对于获取目标设备支持的第一目标服务的方式,可以根据实际情况进行选择,本申请实施例在此不做限定。The method for obtaining the first target service supported by the target device can be selected according to actual conditions, and the embodiment of the present application does not limit this.

在一些实施例中,电子设备与第一目标设备建立音视频远程控制协议的连接;根据控制连接请求,获取目标设备支持的第一目标服务,包括:In some embodiments, the electronic device establishes a connection with the first target device using an audio and video remote control protocol; and according to the control connection request, obtains a first target service supported by the target device, including:

根据控制连接请求,获取目标设备的优先级和第一目标设备的优先级;According to the control connection request, obtaining the priority of the target device and the priority of the first target device;

若目标设备的优先级高于第一目标设备的优先级,则断开与第一目标设备的音视频远程控制协议的连接;If the priority of the target device is higher than the priority of the first target device, disconnecting the audio and video remote control protocol connection with the first target device;

获取目标设备支持的第一目标服务。Gets the first target service supported by the target device.

由于终端可以与多个设备建立音视频远程控制协议的连接,因此,可以设置每个设备的优先级,以便根据每个设备的优先级确定与哪个设备建立音视频远程控制协议的连接。Since the terminal can establish audio and video remote control protocol connections with multiple devices, the priority of each device can be set to determine which device to establish the audio and video remote control protocol connection with according to the priority of each device.

如果目标设备的优先级低于第一目标设备的优先级,则不断开与目标设备的音视频远程控制协议的连接。If the priority of the target device is lower than the priority of the first target device, the connection of the audio and video remote control protocol with the target device is not disconnected.

在本申请实施例中,在终端中共存被控服务和控制服务,并且在蓝牙初始化的过程,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册,使得即使终端在与目标设备的音视频远程控制协议的连接中作为的角色和在与第一目标设备的音视频远程控制协议的连接中作为的角色不相同,也不需要重新启动被控服务或控制服务。In an embodiment of the present application, a controlled service and a control service coexist in a terminal, and during the Bluetooth initialization process, the callback function of the controlled service and the callback function of the control service are registered for the audio and video remote control protocol, so that even if the role played by the terminal in the connection with the audio and video remote control protocol of the target device and the role played by the terminal in the connection with the audio and video remote control protocol of the first target device are different, there is no need to restart the controlled service or the control service.

比如,在与目标设备的音视频远程控制协议的连接中,终端的角色为控制设备,在与第一目标设备的音视频远程控制协议的连接中,终端的角色为被控设备,则即使终端先与第一目标设备建立音视频远程控制协议的连接,在与目标设备建立音视频远程控制协议的连接时,也无需重新启动控制服务。For example, in the connection of the audio and video remote control protocol with the target device, the role of the terminal is the control device, and in the connection of the audio and video remote control protocol with the first target device, the role of the terminal is the controlled device. Even if the terminal first establishes a connection of the audio and video remote control protocol with the first target device, there is no need to restart the control service when establishing a connection of the audio and video remote control protocol with the target device.

S103、从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务。S103: Filter out services matching the first target service from the controlled services and the control services, and obtain a second target service for the control connection request.

与第一目标服务匹配的服务,指与第一目标服务互补的服务。比如,当第一目标服务为第一被控服务时,目标设备作为被控设备,第二目标服务为控制服务,终端作为控制设备。又比如,当第一目标服务为第一控制服务时,目标设备作为控制设备,第二目标服务为被控服务,终端作为被控设备。 The service matching the first target service refers to a service that is complementary to the first target service. For example, when the first target service is the first controlled service, the target device is the controlled device, the second target service is the control service, and the terminal is the control device. For another example, when the first target service is the first control service, the target device is the control device, the second target service is the controlled service, and the terminal is the controlled device.

可选地,当第一目标服务包括第一被控服务和第一控制服务时,从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务的过程为:Optionally, when the first target service includes a first controlled service and a first control service, the process of filtering out a service matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request is:

获取目标筛选策略;Obtain target screening strategies;

从第一被控服务和第一控制服务筛选与目标筛选策略匹配的服务,得到第三目标服务;Filter services matching the target screening policy from the first controlled service and the first control service to obtain a third target service;

从被控服务和控制服务中筛选出与第三目标服务匹配的服务,得到针对控制连接请求的第二目标服务。A service matching the third target service is screened out from the controlled service and the control service to obtain a second target service for the control connection request.

比如,当第三目标服务为第一被控服务时,第二目标服务为控制服务。又比如,当第三目标服务为第一控制服务时,第二目标服务为被控服务。For example, when the third target service is the first controlled service, the second target service is the controlling service. For another example, when the third target service is the first controlling service, the second target service is the controlled service.

目标筛选策略可以根据实际情况进行设置,本申请实施例在此不做限定。比如,获取目标筛选策略的过程可以为:The target screening strategy can be set according to the actual situation, and the present application embodiment does not limit it here. For example, the process of obtaining the target screening strategy can be:

获取多媒体在目标设备和电子设备之间的传输方向;Obtaining the transmission direction of multimedia between the target device and the electronic device;

根据传输方向,确定目标筛选策略。Determine the target screening strategy based on the transmission direction.

由于目标设备和终端已经通过蓝牙音频传输模型协议的连接传输多媒体,因此,可以根据多媒体在目标设备和电子设备之间的传输方向,确定目标筛选策略。Since the target device and the terminal have transmitted multimedia via the connection of the Bluetooth audio transmission model protocol, the target screening strategy can be determined according to the transmission direction of the multimedia between the target device and the electronic device.

如果传输方向为从目标设备到终端,此时,目标设备为源设备,终端为接收设备,则目标筛选策略为筛选出第一被控服务,第三目标服务为第一被控服务,第二目标服务为控制服务,如果传输方向为从终端到目标设备,此时,终端为源设备,目标设备为接收设备,则目标筛选策略为筛选出第一控制服务,第三目标服务为第一控制服务,第二目标服务为被控服务。If the transmission direction is from the target device to the terminal, at this time, the target device is the source device and the terminal is the receiving device, then the target screening strategy is to screen out the first controlled service, the third target service is the first controlled service, and the second target service is the control service. If the transmission direction is from the terminal to the target device, at this time, the terminal is the source device and the target device is the receiving device, then the target screening strategy is to screen out the first control service, the third target service is the first control service, and the second target service is the controlled service.

例如,目标设备为音箱,终端为电视,传输方向为从电视到音箱,则音箱作为控制设备,音箱所采用的服务为第一控制服务,目标筛选策略为筛选出第一控制服务。For example, the target device is a speaker, the terminal is a TV, and the transmission direction is from the TV to the speaker. The speaker serves as a control device, the service used by the speaker is the first control service, and the target screening strategy is to screen out the first control service.

又例如,目标设备为手机,终端为电视,传输方向为从手机到电视,则手机作为被控设备,手机所采用的服务为第一被控服务,目标筛选策略为筛选出第一被控服务。For another example, the target device is a mobile phone, the terminal is a TV, and the transmission direction is from the mobile phone to the TV. The mobile phone is the controlled device, the service used by the mobile phone is the first controlled service, and the target screening strategy is to screen out the first controlled service.

又比如,获取目标筛选策略的过程也可以为:For another example, the process of obtaining the target screening strategy can also be:

获取目标应用程序的启动状态;Get the startup status of the target application;

根据启动状态,确定目标筛选策略。 Determine the target screening strategy based on the startup status.

在本申请实施例,可以单独设置一个目标应用程序,然后当目标应用程序的启动状态为启动时,则将第一控制服务作为第三目标服务,当目标应用程序的启动状态为关闭时,则将第一被控服务作为第三目标服务。In an embodiment of the present application, a target application can be set separately, and then when the startup state of the target application is started, the first control service is used as the third target service, and when the startup state of the target application is closed, the first controlled service is used as the third target service.

需要说明的是,当启动状态为启动时,可以将第一控制服务作为第三目标服务,也可以将第一被控服务作为第三目标服务,本申请实施例在此不做限定。It should be noted that, when the startup state is startup, the first controlling service can be used as the third target service, and the first controlled service can also be used as the third target service, which is not limited in the embodiment of the present application.

又比如,获取目标筛选策略的过程也可以为:For another example, the process of obtaining the target screening strategy can also be:

获取目标设备的历史目标服务;Get the historical target service of the target device;

根据历史目标服务,确定目标筛选策略。Determine target screening strategy based on historical target services.

在本申请实施例中,如果目标设备和终端建立过音视频远程控制协议的连接,则可以根据目标设备的历史目标服务,确定目标筛选策略。In an embodiment of the present application, if the target device and the terminal establish a connection via an audio and video remote control protocol, a target screening strategy may be determined based on the historical target services of the target device.

例如,历史目标服务为第一被控服务,目标设备在过去的A时间,通过第一被控服务与终端建立音视频远程控制协议的连接,则目标筛选策略为筛选出第一被控服务。For example, the historical target service is the first controlled service, and the target device established an audio and video remote control protocol connection with the terminal through the first controlled service at time A in the past. Then the target screening strategy is to screen out the first controlled service.

又例如,历史目标服务为第一控制服务,目标设备在过去的A时间,通过第一控制服务与终端建立音视频远程控制协议的连接,则目标筛选策略为筛选出第一控制服务。For another example, the historical target service is the first control service, and the target device established an audio and video remote control protocol connection with the terminal through the first control service at time A in the past, then the target screening strategy is to screen out the first control service.

可选地,如果历史目标服务存在多个且多个历史目标服务不相同,则可以根据离当前时间最近的时间对应的历史目标服务,确定目标筛选策略,或者,也可以根据出现次数最多的历史目标服务,确定目标筛选策略,或者,也可以根据与当前时间匹配的时间对应的历史目标服务,确定目标筛选策略。Optionally, if there are multiple historical target services and the multiple historical target services are different, the target filtering strategy can be determined based on the historical target service corresponding to the time closest to the current time, or, the target filtering strategy can be determined based on the historical target service that appears the most times, or, the target filtering strategy can be determined based on the historical target service corresponding to the time that matches the current time.

例如,历史目标服务存在10个,其包括第一被控服务和第一控制服务,离当前时间最近的时间对应的历史目标服务为第一控制服务,则根据第一控制服务,确定目标筛选策略。For example, there are 10 historical target services, including a first controlled service and a first controlling service, and the historical target service corresponding to the time closest to the current time is the first controlling service. Then, the target screening strategy is determined according to the first controlling service.

又例如,历史目标服务存在10个,其包括第一被控服务和第一控制服务,第一被控服务出现的次数为7,第一控制服务出现的次数为3,则根据第一被控服务,确定目标筛选策略。For another example, there are 10 historical target services, including a first controlled service and a first controlling service. The first controlled service appears 7 times, and the first controlling service appears 3 times. Then, the target screening strategy is determined according to the first controlled service.

又例如,历史目标服务存在10个,其包括第一被控服务和第一控制服务,当前时间为a号A时间,b号A时间对应的历史目标服务为第一被控服务,b号在a号之前,则根据第一被控服务,确定目标筛选策略。For another example, there are 10 historical target services, including the first controlled service and the first controlling service. The current time is A time a, and the historical target service corresponding to A time b is the first controlled service. B is before a. Then, the target screening strategy is determined based on the first controlled service.

S104、根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接。 S104: Establishing an audio and video remote control protocol connection with the target device according to the callback function after the second target service is registered.

如果第一目标服务为被控服务,则根据被控服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接,如果第一目标服务为控制服务,则根据控制服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接。If the first target service is a controlled service, then according to the callback function registered by the controlled service, a connection of the audio and video remote control protocol is established with the target device; if the first target service is a control service, then according to the callback function registered by the control service, a connection of the audio and video remote control protocol is established with the target device.

当将被控服务的回调函数和控制服务的回调函数注册之后,可以得到控制服务的回调函数对应的第一标识,以及得到被控服务的回调函数对应的第二标识时,根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接的过程可以为:After the callback function of the controlled service and the callback function of the control service are registered, the first identifier corresponding to the callback function of the control service and the second identifier corresponding to the callback function of the controlled service can be obtained. According to the callback function after the second target service is registered, the process of establishing a connection of the audio and video remote control protocol with the target device can be:

若第二目标服务为控制服务,则根据第一标识对应的回调函数,与目标设备建立音视频远程控制协议的连接;If the second target service is a control service, establishing a connection of an audio and video remote control protocol with the target device according to the callback function corresponding to the first identifier;

若第二目标服务为被控服务,则根据第二标识对应的回调函数,与目标设备建立音视频远程控制协议的连接。If the second target service is a controlled service, a connection of an audio and video remote control protocol is established with the target device according to the callback function corresponding to the second identifier.

当终端根据被控服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接时,终端在与目标设备建立音视频远程控制协议的连接之后,可以通过与目标设备的音视频远程控制协议的连接,接收目标设备对终端中的多媒体进行控制的控制指令,然后根据控制指令控制多媒体。When the terminal establishes an audio and video remote control protocol connection with the target device according to the callback function registered by the controlled service, after the terminal establishes the audio and video remote control protocol connection with the target device, it can receive control instructions of the target device to control the multimedia in the terminal through the audio and video remote control protocol connection with the target device, and then control the multimedia according to the control instructions.

当终端根据控制服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接时,终端在与目标设备建立音视频远程控制协议的连接之后,可以通过与目标设备的音视频远程控制协议的连接,对目标设备中的多媒体进行控制。When the terminal establishes an audio and video remote control protocol connection with the target device according to the callback function registered with the control service, the terminal can control the multimedia in the target device through the audio and video remote control protocol connection with the target device.

其中,终端通过与目标设备的音视频远程控制协议的连接,控制目标设备中的多媒体的方式,可以根据实际情况进行选择,比如,可以控制目标设备中的多媒体的暂停、播放、上一首或下一首等,本申请实施例在此不做限定。Among them, the terminal controls the multimedia in the target device by connecting to the audio and video remote control protocol of the target device. The method can be selected according to actual conditions. For example, the multimedia in the target device can be controlled to pause, play, play the previous song or the next song, etc. The embodiment of the present application is not limited here.

在本申请实施例中,终端中共存被控服务和控制服务,根据目标设备的角色确定终端的角色,目标设备的角色为被控设备时,终端的角色为控制设备,目标设备的角色为控制设备时,终端的角色为被控设备,使得终端在与目标设备的音视频远程控制协议的连接中,角色不会出现错误,使得当终端作为控制设备,通过与目标设备的音视频远程控制协议的连接,控制目标设备中的多媒体时,多媒体的控制不会出现错误,提高用户体验,从而提高终端的使用率。In an embodiment of the present application, a controlled service and a control service coexist in a terminal, and the role of the terminal is determined according to the role of the target device. When the role of the target device is a controlled device, the role of the terminal is a control device, and when the role of the target device is a control device, the role of the terminal is a controlled device, so that when the terminal is connected to the audio and video remote control protocol of the target device, there will be no role errors, so that when the terminal acts as a control device and controls the multimedia in the target device through the connection with the audio and video remote control protocol of the target device, there will be no errors in the control of the multimedia, thereby improving the user experience and thus improving the utilization rate of the terminal.

由以上可知,在本申请实施例中,获取蓝牙初始化指令,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册;获取目标设备根据音视频远程控制协议发送的控制连接请求,并根据控制连接请求,获取目标设备支持的 第一目标服务;从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务;根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接,实现在电子设备中共存被控服务和控制服务,然后根据目标设备支持的第一目标服务决定是根据被控服务的回调函数与目标设备建立音视频远程控制协议的连接还是根据控制服务的回调函数与目标设备建立音视频远程控制协议的连接,使得电子设备在音视频远程控制协议中既可以作为被控设备,也可以作为控制设备,提高电子设备的使用率。As can be seen from the above, in the embodiment of the present application, a Bluetooth initialization instruction is obtained, and according to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol; a control connection request sent by the target device according to the audio and video remote control protocol is obtained, and according to the control connection request, the audio and video remote control protocol supported by the target device is obtained. A first target service; filtering out services matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request; establishing an audio and video remote control protocol connection with the target device according to the callback function after the second target service is registered, thereby realizing the coexistence of the controlled service and the control service in the electronic device, and then deciding whether to establish an audio and video remote control protocol connection with the target device according to the callback function of the controlled service or to establish an audio and video remote control protocol connection with the target device according to the callback function of the control service according to the first target service supported by the target device, so that the electronic device can be used as both a controlled device and a control device in the audio and video remote control protocol, thereby improving the utilization rate of the electronic device.

下面根据图3对本申请实施例提供的蓝牙初始化的过程进行进一步说明。The process of Bluetooth initialization provided in the embodiment of the present application is further described below with reference to FIG. 3 .

终端获取蓝牙启动指令,根据蓝牙启动指令,进行蓝牙服务初始化,在蓝牙初始化的过程中,进行被控服务初始化和控制服务初始化。The terminal obtains a Bluetooth startup instruction, and performs Bluetooth service initialization according to the Bluetooth startup instruction. During the Bluetooth initialization process, the controlled service initialization and the control service initialization are performed.

终端在控制服务初始化的过程中,将控制服务的回调函数进行音视频远程控制协议注册,得到控制服务的回调函数对应的第一标识。During the process of initializing the control service, the terminal registers the callback function of the control service with the audio and video remote control protocol to obtain a first identifier corresponding to the callback function of the control service.

终端在被控服务初始化的过程中,将被控服务的回调函数进行音视频远程控制协议注册,得到被控服务的回调函数对应的第二标识。During the initialization of the controlled service, the terminal registers the callback function of the controlled service with the audio and video remote control protocol to obtain a second identifier corresponding to the callback function of the controlled service.

终端在回调函数的注册完成之后,再进行音视频远程控制协议的连接。After the registration of the callback function is completed, the terminal will connect the audio and video remote control protocol.

下面根据图4和图5对本申请实施例提供的设备连接的过程进行进一步说明。The device connection process provided in the embodiment of the present application is further described below with reference to FIG. 4 and FIG. 5 .

终端获取目标设备针对音视频远程控制协议发送的控制连接请求,根据控制连接请求,获取目标设备支持的第一目标服务。The terminal obtains a control connection request sent by the target device for the audio and video remote control protocol, and obtains a first target service supported by the target device according to the control connection request.

若第一目标服务为第一被控服务,终端则将控制服务确定为第二目标服务,根据第一标识对应回调函数,与目标设备建立音视频远程控制协议的连接。If the first target service is the first controlled service, the terminal determines the control service as the second target service, and establishes a connection of an audio and video remote control protocol with the target device according to a callback function corresponding to the first identifier.

若第一目标服务为第一控制服务,终端则将被控服务确定为第二目标服务,根据第二标识对应回调函数,与目标设备建立音视频远程控制协议的连接。If the first target service is the first control service, the terminal determines the controlled service as the second target service, and establishes a connection of the audio and video remote control protocol with the target device according to the callback function corresponding to the second identifier.

若第一目标服务包括第一被控服务和第一控制服务,则判断目标应用程序的启动状态。若目标应用程序的启动状态为启动,则将控制服务确定为第二目标服务,根据第一标识对应回调函数,与目标设备建立音视频远程控制协议的连接。若目标应用程序的启动状态为关闭,终端此时显示的页面可以为任何一个界面,也可以为默认界面,则可以判断多媒体的传输方向。 If the first target service includes the first controlled service and the first control service, the startup state of the target application is determined. If the startup state of the target application is startup, the control service is determined as the second target service, and a connection of the audio and video remote control protocol is established with the target device according to the callback function corresponding to the first identifier. If the startup state of the target application is shutdown, the page displayed by the terminal at this time can be any interface or the default interface, and the transmission direction of the multimedia can be determined.

如果传输方向为从目标设备到终端,终端则将控制服务确定为第二目标服务,根据第一标识对应回调函数,与目标设备建立音视频远程控制协议的连接。如果传输方向为从终端到目标设备,终端则将被控服务确定为第二目标服务,根据第二标识对应回调函数,与目标设备建立音视频远程控制协议的连接。If the transmission direction is from the target device to the terminal, the terminal determines the control service as the second target service, and establishes an audio and video remote control protocol connection with the target device according to the callback function corresponding to the first identifier. If the transmission direction is from the terminal to the target device, the terminal determines the controlled service as the second target service, and establishes an audio and video remote control protocol connection with the target device according to the callback function corresponding to the second identifier.

为便于更好的实施本申请实施例提供的设备连接方法,本申请实施例还提供一种基于上述设备连接方法的装置,该装置应用于电子设备,电子设备支持被控服务和控制服务。其中名词的含义与上述设备连接方法中相同,具体实现细节可以参考方法实施例中的说明。In order to facilitate better implementation of the device connection method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above device connection method, which is applied to an electronic device, and the electronic device supports controlled services and control services. The meanings of the terms are the same as those in the above device connection method, and the specific implementation details can refer to the description in the method embodiment.

例如,如图6所示,该设备连接装置可以包括:For example, as shown in FIG6 , the device connection device may include:

指令获取模块601,用于获取蓝牙初始化指令,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册。The instruction acquisition module 601 is used to acquire a Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction.

请求获取模块602,用于获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据控制连接请求,获取目标设备支持的第一目标服务。The request acquisition module 602 is used to acquire a control connection request sent by a target device for an audio and video remote control protocol, and acquire a first target service supported by the target device according to the control connection request.

服务筛选模块603,用于从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务。The service screening module 603 is used to screen out the service matching the first target service from the controlled service and the control service, and obtain the second target service for the control connection request.

连接建立模块604,用于根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接。The connection establishment module 604 is used to establish a connection of the audio and video remote control protocol with the target device according to the callback function after the second target service is registered.

可选地,第一目标服务包括第一被控服务和第一控制服务。服务筛选模块603具体用于执行:Optionally, the first target service includes a first controlled service and a first controlling service. The service screening module 603 is specifically used to execute:

获取目标筛选策略;Obtain target screening strategies;

从第一被控服务和第一控制服务筛选与目标筛选策略匹配的服务,得到第三目标服务;Filter services matching the target screening policy from the first controlled service and the first control service to obtain a third target service;

从被控服务和控制服务中筛选出与第三目标服务匹配的服务,得到针对控制连接请求的第二目标服务。A service matching the third target service is screened out from the controlled service and the control service to obtain a second target service for the control connection request.

可选地,服务筛选模块603具体用于执行:Optionally, the service screening module 603 is specifically configured to execute:

获取多媒体在目标设备和电子设备之间的传输方向;Obtaining the transmission direction of multimedia between the target device and the electronic device;

根据传输方向,确定目标筛选策略。Determine the target screening strategy based on the transmission direction.

可选地,服务筛选模块603具体用于执行:Optionally, the service screening module 603 is specifically configured to execute:

获取目标应用程序的启动状态;Get the startup status of the target application;

根据启动状态,确定目标筛选策略。 Determine the target screening strategy based on the startup status.

可选地,服务筛选模块603具体用于执行:Optionally, the service screening module 603 is specifically configured to execute:

获取目标设备的历史目标服务;Get the historical target service of the target device;

根据历史目标服务,确定目标筛选策略。Determine target screening strategy based on historical target services.

可选地,电子设备与第一目标设备建立音视频远程控制协议的连接;相应地,请求获取模块602具体用于执行:Optionally, the electronic device establishes a connection with the first target device using an audio and video remote control protocol; accordingly, the request acquisition module 602 is specifically configured to execute:

根据控制连接请求,获取目标设备的优先级和第一目标设备的优先级;According to the control connection request, obtaining the priority of the target device and the priority of the first target device;

若目标设备的优先级高于第一目标设备的优先级,则断开与第一目标设备的音视频远程控制协议的连接;If the priority of the target device is higher than the priority of the first target device, disconnecting the audio and video remote control protocol connection with the first target device;

获取目标设备支持的第一目标服务。Gets the first target service supported by the target device.

可选地,指令获取模块601具体用于执行:Optionally, the instruction acquisition module 601 is specifically used to execute:

根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册,得到控制服务的回调函数对应的第一标识,以及得到被控服务的回调函数对应的第二标识。According to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol, and the first identifier corresponding to the callback function of the control service and the second identifier corresponding to the callback function of the controlled service are obtained.

相应地,连接建立模块604具体用于执行:Accordingly, the connection establishing module 604 is specifically configured to execute:

若第二目标服务为控制服务,则根据第一标识对应的回调函数,与目标设备建立音视频远程控制协议的连接;If the second target service is a control service, establishing a connection of an audio and video remote control protocol with the target device according to the callback function corresponding to the first identifier;

若第二目标服务为被控服务,则根据第二标识对应的回调函数,与目标设备建立音视频远程控制协议的连接。If the second target service is a controlled service, a connection of an audio and video remote control protocol is established with the target device according to the callback function corresponding to the second identifier.

具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施方式以及对应的有益效果可参见前面的方法实施例,在此不再赘述。In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments, which will not be repeated here.

本申请实施例还提供一种电子设备,该电子设备可以是服务器或终端等,如图7所示,其示出了本申请实施例所涉及的电子设备的结构示意图,具体来讲:The embodiment of the present application further provides an electronic device, which may be a server or a terminal, etc. As shown in FIG. 7 , it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application. Specifically:

该电子设备可以包括一个或者一个以上处理核心的处理器701、一个或一个以上计算机可读存储介质的存储器702、电源703和输入单元704等部件。本领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The electronic device may include components such as a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will appreciate that the electronic device structure shown in FIG. 7 does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

处理器701是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器702内的计算机程序和/或模块,以及调用存储在存储 器702内的数据,执行电子设备的各种功能和处理数据。可选的,处理器701可包括一个或多个处理核心;优选的,处理器701可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器701中。The processor 701 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device, and runs or executes computer programs and/or modules stored in the memory 702, and calls the computer programs and/or modules stored in the memory 702. The processor 701 can process data in the processor 702, execute various functions of the electronic device and process data. Optionally, the processor 701 can include one or more processing cores; preferably, the processor 701 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.

存储器702可用于存储计算机程序以及模块,处理器701通过运行存储在存储器702的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器702可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器702可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器702还可以包括存储器控制器,以提供处理器701对存储器702的访问。The memory 702 can be used to store computer programs and modules. The processor 701 executes various functional applications and data processing by running the computer programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 702 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, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.

电子设备还包括给各个部件供电的电源703,优选的,电源703可以通过电源管理系统与处理器701逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源703还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 703 for supplying power to each component. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 703 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

该电子设备还可包括输入单元704,该输入单元704可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The electronic device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器701会按照如下的指令,将一个或一个以上的计算机程序的进程对应的可执行文件加载到存储器702中,并由处理器701来运行存储在存储器702中的计算机程序,从而实现各种功能,比如:Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 701 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 702 according to the following instructions, and the processor 701 will run the computer programs stored in the memory 702, thereby realizing various functions, such as:

获取蓝牙初始化指令,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册;Get the Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction;

获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据控制连接请求,获取目标设备支持的第一目标服务;Obtaining a control connection request sent by a target device for an audio and video remote control protocol, and obtaining a first target service supported by the target device according to the control connection request;

从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务;Filtering out a service matching the first target service from the controlled service and the control service, and obtaining a second target service for the control connection request;

根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接。 According to the callback function after the second target service is registered, a connection of an audio and video remote control protocol is established with the target device.

以上各个操作的具体实施方式以及对应的有益效果可参见上文对设备连接方法的详细描述,在此不作赘述。The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the device connection method above, which will not be elaborated here.

本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过计算机程序来完成,或通过计算机程序控制相关的硬件来完成,该计算机程序可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above-described embodiments may be accomplished by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

为此,本申请实施例提供一种计算机可读存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种设备连接方法中的步骤。例如,该计算机程序可以执行如下步骤:To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any device connection method provided in the embodiment of the present application. For example, the computer program can execute the following steps:

获取蓝牙初始化指令,根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册;Get the Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction;

获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据控制连接请求,获取目标设备支持的第一目标服务;Obtaining a control connection request sent by a target device for an audio and video remote control protocol, and obtaining a first target service supported by the target device according to the control connection request;

从被控服务和控制服务中筛选出与第一目标服务匹配的服务,得到针对控制连接请求的第二目标服务;Filtering out a service matching the first target service from the controlled service and the control service, and obtaining a second target service for the control connection request;

根据第二目标服务注册后的回调函数,与目标设备建立音视频远程控制协议的连接。According to the callback function after the second target service is registered, a connection of an audio and video remote control protocol is established with the target device.

以上各个操作的具体实施方式以及对应的有益效果可参见前面的实施例,在此不再赘述。The specific implementation methods and corresponding beneficial effects of the above operations can be found in the previous embodiments, which will not be described in detail here.

其中,该计算机可读存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Among them, the computer readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or CD, etc.

由于该计算机可读存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种设备连接方法中的步骤,因此,可以实现本申请实施例所提供的任一种设备连接方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Since the computer program stored in the computer-readable storage medium can execute the steps in any device connection method provided in the embodiments of the present application, the beneficial effects that can be achieved by any device connection method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

其中,根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述设备连接方法。According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned device connection method.

以上对本申请实施例所提供的一种设备连接方法、装置、电子设备及计算机存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员, 依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above is a detailed introduction to a device connection method, apparatus, electronic device and computer storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, According to the concept of this application, there may be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims (20)

一种设备连接方法,其中,应用于电子设备,所述电子设备支持被控服务和控制服务,所述方法包括:A device connection method, wherein the method is applied to an electronic device, the electronic device supports a controlled service and a control service, and the method comprises: 获取蓝牙初始化指令,根据蓝牙初始化指令,将所述被控服务的回调函数和所述控制服务的回调函数进行音视频远程控制协议注册;Obtain a Bluetooth initialization instruction, and register the callback function of the controlled service and the callback function of the control service with an audio and video remote control protocol according to the Bluetooth initialization instruction; 获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据所述控制连接请求,获取所述目标设备支持的第一目标服务;Obtaining a control connection request sent by a target device for an audio and video remote control protocol, and obtaining a first target service supported by the target device according to the control connection request; 从所述被控服务和所述控制服务中筛选出与所述第一目标服务匹配的服务,得到针对所述控制连接请求的第二目标服务;Filtering a service matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request; 根据所述第二目标服务注册后的回调函数,与所述目标设备建立所述音视频远程控制协议的连接。According to the callback function after the second target service is registered, a connection of the audio and video remote control protocol is established with the target device. 根据权利要求1所述的设备连接方法,其中,所述第一目标服务包括第一被控服务和第一控制服务;The device connection method according to claim 1, wherein the first target service includes a first controlled service and a first controlling service; 所述从所述被控服务和所述控制服务中筛选出与所述第一目标服务匹配的服务,得到针对所述控制连接请求的第二目标服务,包括:The step of screening out a service matching the first target service from the controlled service and the control service to obtain a second target service for the control connection request includes: 获取目标筛选策略;Obtain target screening strategies; 从所述第一被控服务和所述第一控制服务筛选与所述目标筛选策略匹配的服务,得到第三目标服务;Filtering services matching the target screening policy from the first controlled service and the first controlling service to obtain a third target service; 从所述被控服务和所述控制服务中筛选出与所述第三目标服务匹配的服务,得到针对所述控制连接请求的第二目标服务。A service matching the third target service is screened out from the controlled service and the control service to obtain a second target service for the control connection request. 根据权利要求2所述的设备连接方法,其中,所述获取目标筛选策略,包括:The device connection method according to claim 2, wherein the acquiring target screening strategy comprises: 获取多媒体在所述目标设备和所述电子设备之间的传输方向;Acquire a transmission direction of multimedia between the target device and the electronic device; 根据所述传输方向,确定目标筛选策略。According to the transmission direction, a target screening strategy is determined. 根据权利要求2所述的设备连接方法,其中,所述获取目标筛选策略,包括:The device connection method according to claim 2, wherein the acquiring target screening strategy comprises: 获取目标应用程序的启动状态;Get the startup status of the target application; 根据所述启动状态,确定目标筛选策略。According to the startup state, a target screening strategy is determined. 根据权利要求2所述的设备连接方法,其中,所述获取目标筛选策略,包括:The device connection method according to claim 2, wherein the acquiring target screening strategy comprises: 获取所述目标设备的历史目标服务;Obtaining historical target services of the target device; 根据所述历史目标服务,确定目标筛选策略。 Based on the historical target service, a target screening strategy is determined. 根据权利要求5所述的设备连接方法,其中,根据所述历史目标服务,确定目标筛选策略,包括:The device connection method according to claim 5, wherein determining a target screening strategy based on the historical target service comprises: 确定所述目标设备存在多个不相同的历史目标服务,则根据当前时间最近的时间对应的历史目标服务,确定目标筛选策略;Determining that the target device has multiple different historical target services, determining a target screening strategy according to the historical target service corresponding to the time closest to the current time; 或,根据出现次数最多的历史目标服务,确定目标筛选策略;Or, determine the target screening strategy based on the historical target services with the highest number of occurrences; 或,根据与当前时间匹配的时间对应的历史目标服务,确定目标筛选策略。Or, determine the target filtering strategy based on the historical target service corresponding to the time that matches the current time. 根据权利要求1所述的设备连接方法,其中,所述电子设备与第一目标设备建立所述音视频远程控制协议的连接;The device connection method according to claim 1, wherein the electronic device establishes a connection with the first target device using the audio and video remote control protocol; 所述根据所述控制连接请求,获取所述目标设备支持的第一目标服务,包括:The acquiring, according to the control connection request, a first target service supported by the target device, comprises: 根据所述控制连接请求,获取所述目标设备的优先级和所述第一目标设备的优先级;Acquire, according to the control connection request, a priority of the target device and a priority of the first target device; 若所述目标设备的优先级高于所述第一目标设备的优先级,则断开与所述第一目标设备的所述音视频远程控制协议的连接;If the priority of the target device is higher than the priority of the first target device, disconnecting the audio and video remote control protocol connection with the first target device; 获取所述目标设备支持的第一目标服务。A first target service supported by the target device is obtained. 根据权利要求1所述的设备连接方法,其中,所述根据蓝牙初始化指令,将所述被控服务的回调函数和所述控制服务的回调函数进行音视频远程控制协议注册,包括:The device connection method according to claim 1, wherein the registering the callback function of the controlled service and the callback function of the control service with the audio and video remote control protocol according to the Bluetooth initialization instruction comprises: 根据蓝牙初始化指令,将所述被控服务的回调函数和所述控制服务的回调函数进行音视频远程控制协议注册,得到所述控制服务的回调函数对应的第一标识,以及得到所述被控服务的回调函数对应的第二标识。According to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol, a first identifier corresponding to the callback function of the control service is obtained, and a second identifier corresponding to the callback function of the controlled service is obtained. 根据权利要求8所述的设备连接方法,其中,所述根据所述第二目标服务注册后的回调函数,与所述目标设备建立所述音视频远程控制协议的连接,包括:The device connection method according to claim 8, wherein the establishing a connection of the audio and video remote control protocol with the target device according to the callback function registered with the second target service comprises: 若所述第二目标服务为所述控制服务,则根据所述第一标识对应的回调函数,与所述目标设备建立所述音视频远程控制协议的连接;If the second target service is the control service, establishing a connection of the audio and video remote control protocol with the target device according to the callback function corresponding to the first identifier; 若所述第二目标服务为所述被控服务,则根据所述第二标识对应的回调函数,与所述目标设备建立所述音视频远程控制协议的连接。If the second target service is the controlled service, a connection of the audio and video remote control protocol is established with the target device according to the callback function corresponding to the second identifier. 一种设备连接装置,其中,应用于电子设备,所述电子设备支持被控服务和控制服务,所述装置包括:A device connection device, wherein the device is applied to an electronic device, the electronic device supports a controlled service and a control service, and the device comprises: 指令获取模块,用于获取蓝牙初始化指令,根据蓝牙初始化指令,将所述被控服务的回调函数和所述控制服务的回调函数进行音视频远程控制协议注册; An instruction acquisition module, used for acquiring a Bluetooth initialization instruction, and registering the callback function of the controlled service and the callback function of the control service with an audio and video remote control protocol according to the Bluetooth initialization instruction; 请求获取模块,用于获取目标设备针对音视频远程控制协议发送的控制连接请求,并根据所述控制连接请求,获取所述目标设备支持的第一目标服务;A request acquisition module, used to acquire a control connection request sent by a target device for an audio and video remote control protocol, and acquire a first target service supported by the target device according to the control connection request; 服务筛选模块,用于从所述被控服务和所述控制服务中筛选出与所述第一目标服务匹配的服务,得到针对所述控制连接请求的第二目标服务;A service screening module, used to screen out a service matching the first target service from the controlled service and the control service, and obtain a second target service for the control connection request; 连接建立模块,用于根据所述第二目标服务注册后的回调函数,与所述目标设备建立所述音视频远程控制协议的连接。A connection establishment module is used to establish a connection of the audio and video remote control protocol with the target device according to the callback function after the second target service is registered. 根据权利要求10所述的设备连接装置,其中,所述第一目标服务包括第一被控服务和第一控制服务,所述服务筛选模块还用于执行:The device connection apparatus according to claim 10, wherein the first target service includes a first controlled service and a first control service, and the service screening module is further used to execute: 获取目标筛选策略;Obtain target screening strategies; 从第一被控服务和第一控制服务筛选与目标筛选策略匹配的服务,得到第三目标服务;Filter services matching the target screening policy from the first controlled service and the first control service to obtain a third target service; 从被控服务和控制服务中筛选出与第三目标服务匹配的服务,得到针对控制连接请求的第二目标服务。A service matching the third target service is screened out from the controlled service and the control service to obtain a second target service for the control connection request. 根据权利要求11所述的设备连接装置,其中,所述服务筛选模块还用于执行:The device connection apparatus according to claim 11, wherein the service screening module is further configured to execute: 获取多媒体在目标设备和电子设备之间的传输方向;Obtaining the transmission direction of multimedia between the target device and the electronic device; 根据传输方向,确定目标筛选策略。Determine the target screening strategy based on the transmission direction. 根据权利要求11所述的设备连接装置,其中,所述服务筛选模块还用于执行:The device connection apparatus according to claim 11, wherein the service screening module is further configured to execute: 获取目标应用程序的启动状态;Get the startup status of the target application; 根据启动状态,确定目标筛选策略。Determine the target screening strategy based on the startup status. 根据权利要求11所述的设备连接装置,其中,所述服务筛选模块还用于执行:The device connection apparatus according to claim 11, wherein the service screening module is further configured to execute: 获取目标设备的历史目标服务;Get the historical target service of the target device; 根据历史目标服务,确定目标筛选策略。Determine target screening strategy based on historical target services. 根据权利要求11所述的设备连接装置,其中,所述服务筛选模块还用于执行:The device connection apparatus according to claim 11, wherein the service screening module is further configured to execute: 确定所述目标设备存在多个不相同的历史目标服务,则根据当前时间最近的时间对应的历史目标服务,确定目标筛选策略;Determining that the target device has multiple different historical target services, determining a target screening strategy according to the historical target service corresponding to the time closest to the current time; 或,根据出现次数最多的历史目标服务,确定目标筛选策略;Or, determine the target screening strategy based on the historical target services with the highest number of occurrences; 或,根据与当前时间匹配的时间对应的历史目标服务,确定目标筛选策略。Or, determine the target filtering strategy based on the historical target service corresponding to the time that matches the current time. 根据权利要求10所述的设备连接装置,其中,所述电子设备与第一目标设备建立所述音视频远程控制协议的连接,所述请求获取模块还用于执行: The device connection apparatus according to claim 10, wherein the electronic device establishes a connection with the first target device using the audio and video remote control protocol, and the request acquisition module is further configured to execute: 根据控制连接请求,获取目标设备的优先级和第一目标设备的优先级;According to the control connection request, obtaining the priority of the target device and the priority of the first target device; 若目标设备的优先级高于第一目标设备的优先级,则断开与第一目标设备的音视频远程控制协议的连接;If the priority of the target device is higher than the priority of the first target device, disconnecting the audio and video remote control protocol connection with the first target device; 获取目标设备支持的第一目标服务。Gets the first target service supported by the target device. 根据权利要求10所述的设备连接装置,其中,所述指令获取模块还用于执行:The device connection apparatus according to claim 10, wherein the instruction acquisition module is further configured to execute: 根据蓝牙初始化指令,将被控服务的回调函数和控制服务的回调函数进行音视频远程控制协议注册,得到控制服务的回调函数对应的第一标识,以及得到被控服务的回调函数对应的第二标识。According to the Bluetooth initialization instruction, the callback function of the controlled service and the callback function of the control service are registered with the audio and video remote control protocol, and the first identifier corresponding to the callback function of the control service and the second identifier corresponding to the callback function of the controlled service are obtained. 根据权利要求10所述的设备连接装置,其中,所述连接建立模块还用于执行:The device connection apparatus according to claim 10, wherein the connection establishment module is further configured to execute: 若第二目标服务为控制服务,则根据第一标识对应的回调函数,与目标设备建立音视频远程控制协议的连接;If the second target service is a control service, establishing a connection of an audio and video remote control protocol with the target device according to the callback function corresponding to the first identifier; 若第二目标服务为被控服务,则根据第二标识对应的回调函数,与目标设备建立音视频远程控制协议的连接。If the second target service is a controlled service, a connection of an audio and video remote control protocol is established with the target device according to the callback function corresponding to the second identifier. 一种电子设备,其中,包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于运行所述存储器内的计算机程序,以执行权利要求1至9任一项所述的设备连接方法。An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the device connection method according to any one of claims 1 to 9. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行权利要求1至9任一项所述的设备连接方法。 A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the device connection method according to any one of claims 1 to 9.
PCT/CN2024/096109 2023-08-23 2024-05-29 Device connection method and apparatus, electronic device, and computer storage medium Pending WO2025039655A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311069946.9 2023-08-23
CN202311069946.9A CN117412109A (en) 2023-08-23 2023-08-23 Equipment connection methods, devices, electronic equipment and computer storage media

Publications (1)

Publication Number Publication Date
WO2025039655A1 true WO2025039655A1 (en) 2025-02-27

Family

ID=89495190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/096109 Pending WO2025039655A1 (en) 2023-08-23 2024-05-29 Device connection method and apparatus, electronic device, and computer storage medium

Country Status (2)

Country Link
CN (1) CN117412109A (en)
WO (1) WO2025039655A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117412109A (en) * 2023-08-23 2024-01-16 深圳Tcl新技术有限公司 Equipment connection methods, devices, electronic equipment and computer storage media

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101213582A (en) * 2005-06-29 2008-07-02 西姆毕恩软件有限公司 Remote control
CN105491135A (en) * 2015-12-11 2016-04-13 小米科技有限责任公司 Data connection establishing method and device
US20170171798A1 (en) * 2015-12-10 2017-06-15 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in wireless communication system
CN112738775A (en) * 2019-10-29 2021-04-30 广东美的制冷设备有限公司 Centralized control equipment and topology method, system and equipment thereof
CN117412109A (en) * 2023-08-23 2024-01-16 深圳Tcl新技术有限公司 Equipment connection methods, devices, electronic equipment and computer storage media

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101213582A (en) * 2005-06-29 2008-07-02 西姆毕恩软件有限公司 Remote control
US20170171798A1 (en) * 2015-12-10 2017-06-15 Lg Electronics Inc. Method and apparatus for transmitting and receiving data in wireless communication system
CN105491135A (en) * 2015-12-11 2016-04-13 小米科技有限责任公司 Data connection establishing method and device
CN112738775A (en) * 2019-10-29 2021-04-30 广东美的制冷设备有限公司 Centralized control equipment and topology method, system and equipment thereof
CN117412109A (en) * 2023-08-23 2024-01-16 深圳Tcl新技术有限公司 Equipment connection methods, devices, electronic equipment and computer storage media

Also Published As

Publication number Publication date
CN117412109A (en) 2024-01-16

Similar Documents

Publication Publication Date Title
CN102868729B (en) The method, client and Cloud Server of realizing software service based on cloud service
JP6742465B2 (en) Method, device and bluetooth speaker for continuous wakeup delay reduction in bluetooth speaker
CN110870292B (en) Selective delivery of one or more services in a multi-subscriber identity module (SIM) multi-standby electronic device
CN102754387B (en) System and method for multimedia conferencing between universal plug and play enabled telephony devices and wide area network devices
US20150088966A1 (en) Service activity user interface
US20040230687A1 (en) Service management system, and method, communications unit and integrated circuit for use in such system
WO2023138158A1 (en) Remote controller key updating method and device, remote controller, and storage medium
WO2025039655A1 (en) Device connection method and apparatus, electronic device, and computer storage medium
WO2025040006A1 (en) Device control method and apparatus, control device, and computer storage medium
US9112917B2 (en) Controller system and method therefor
CN116708062B (en) Device management method and electronic device
CN114217759B (en) Screen projection method, device, storage medium and electronic device
CN115766313A (en) Audio-visual system control method, device and storage medium
WO2023273597A1 (en) Communication transfer method, computer device, and storage medium
WO2024160020A1 (en) Video transmission method and apparatus, and electronic device and computer storage medium
WO2025152566A1 (en) Terminal provisioning method, apparatus and device, and storage medium
WO2024007710A1 (en) Animation playing method and apparatus, and electronic device and computer-readable storage medium
WO2021036838A1 (en) Method for installing application, method for operating application, electronic device and computer readable medium
CN112954760A (en) Connection method and device of Bluetooth equipment and electronic equipment
CN113747100A (en) Audio and video call method and device, storage medium and electronic equipment
CN113765886B (en) Multimedia playing method and device, storage medium and electronic equipment
CN115589428B (en) Device interconnection method and related products
CN115987748A (en) Smart TV control method, device, storage medium and electronic equipment
US8996896B2 (en) Hybrid optimized personal computer
CN115878179A (en) Information processing method, information processing device, computer equipment and storage medium

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: 24855385

Country of ref document: EP

Kind code of ref document: A1