WO2023160372A1 - 外部设备配对方法、装置、设备及存储介质 - Google Patents

外部设备配对方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023160372A1
WO2023160372A1 PCT/CN2023/074710 CN2023074710W WO2023160372A1 WO 2023160372 A1 WO2023160372 A1 WO 2023160372A1 CN 2023074710 W CN2023074710 W CN 2023074710W WO 2023160372 A1 WO2023160372 A1 WO 2023160372A1
Authority
WO
WIPO (PCT)
Prior art keywords
pairing
external device
user
broadcast message
computer
Prior art date
Application number
PCT/CN2023/074710
Other languages
English (en)
French (fr)
Inventor
罗诚
刘开罩
段潇潇
袁江
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202210312318.8A external-priority patent/CN116700800A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023160372A1 publication Critical patent/WO2023160372A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/40Near-field transmission systems, e.g. inductive or capacitive transmission systems characterised by components specially adapted for near-field transmission
    • H04B5/48Transceivers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • the present application relates to the technical field of terminals, and in particular to an external device pairing method, device, device and storage medium.
  • the pairing process with the computer host is to connect the wired socket of the external device to the computer host, but for wireless external devices device, the pairing process is relatively complicated, especially when an external device is paired with multiple computer hosts at the same time, it is even more cumbersome.
  • the host computer is equipped with a set of external devices, which is obviously a bit wasteful and takes up space.
  • a mouse 101 can be used to pair and connect with a notebook computer 111, a desktop computer 112, and a tablet computer 113 respectively, and by switching control between the notebook computer 111, the desktop computer 112, and the tablet computer 113 during use, Can greatly improve user convenience.
  • steps S202 and S203 need to pair the first host computer first, and the process is to click the external device switch button to select the first channel until the indicator light of the first channel flashes, and then go to the Bluetooth configuration of the first host computer Find the corresponding external device in , and click pairing to connect.
  • step S204 and step S205 is performed, and the second channel is selected to pair the second host computer repeatedly, and similarly, the third host computer is paired through steps S206 and S207.
  • the above process is obviously complicated to operate, especially for users who are unfamiliar with computer operations, which greatly affects the user experience.
  • the present application provides an external device pairing method, device, device, and storage medium to solve the technical problems in the prior art that the external device is paired with multiple computer hosts, which is complicated to operate and has poor user experience.
  • the present application provides the following technical solutions.
  • a method for pairing an external device which is applied to an external device, and the method for pairing an external device includes the following steps:
  • the computer host establishes a pairing connection based on the first idle channel, and the confirmation message of the first computer host responds to the first pairing broadcast message;
  • this embodiment can support continuous idle channel pairing of external devices, thereby automatically establishing pairing connections with multiple computer hosts, reducing the complexity of manual operations, and improving user experience.
  • the judging whether the external device has other idle channels to determine whether to continue pairing includes:
  • the second idle channel of the external device automatically realizes the pairing connection with the second computer host after the first idle channel completes the pairing connection, thereby reducing manual operations.
  • the first idle channel and the second idle channel are sequentially determined according to numbers of the idle channels.
  • this implementation manner can ensure the order in which paired connections are established by the first idle channel and the second idle channel, and reduce unnecessary conflicts.
  • a pairing trigger input on the external device is received to start pairing.
  • this embodiment provides a trigger interface for starting the pairing of the external device, which improves the flexibility of starting the pairing.
  • the pairing trigger input is an operation of a physical key on the external device.
  • one-key automatic pairing of multiple computer hosts can be realized through physical keys, and the user experience is good.
  • a first time threshold is set, and the pairing is stopped when no confirmation message is received from the computer host after the pairing broadcast message is sent beyond the first time threshold;
  • this embodiment provides a termination condition for the end of the pairing of the external device, so as to ensure that the pairing cycle can be ended in time during the actual pairing process and reduce unnecessary power consumption.
  • the pairing broadcast message includes a device identifier corresponding to an idle channel.
  • a device identifier such as a physical address corresponding to a Bluetooth channel can be used to identify a corresponding idle channel to improve operability.
  • the pairing broadcast message includes a Bluetooth physical address corresponding to an idle channel, and the idle channel is a Bluetooth channel.
  • this embodiment specifically provides an implementation manner of Bluetooth pairing, which reduces the complexity of pairing a Bluetooth mouse, keyboard, etc., and improves user experience.
  • the pairing broadcast message includes the name and/or device type of the external device, and the name and/or device type of the external device are used to display when the computer host prompts the user to perform authorized pairing .
  • this embodiment can provide more external device information for the computer host executing the response, and provide substantial information reference for the user's operation.
  • a method for pairing external devices is provided, which is applied to a host computer, and the method for pairing external devices includes Include the following steps:
  • this implementation mode can aim at the continuous idle channel pairing of the external device in the first aspect, realize continuous and automatic prompting of the user to perform authorized pairing, reduce the complexity of manual operation, and improve user experience.
  • a specific computer host can establish a pairing connection with an external device, so as to realize the user's confirmation operation.
  • the display content that prompts the user is closed.
  • the host computer that completes the pairing connection can automatically close the window that prompts the user, reducing the interference caused by the prompt, and indirectly notifying the user that the pairing is complete.
  • the monitoring whether there are other pairing broadcast messages to determine whether to continue prompting the user to perform authorized pairing includes:
  • the host computer after the host computer completes the pairing connection with the corresponding external device according to the first pairing broadcast, it automatically prompts the user to perform new authorized pairing according to the second pairing broadcast, and the user only needs to confirm as needed without additional operations .
  • the monitoring whether there are other pairing broadcast messages to determine whether to continue prompting the user to perform authorized pairing includes:
  • the display content for prompting the user is updated according to the second pairing broadcast message to prompt the user to perform authorized pairing on the second idle channel.
  • the computer host does not respond to the first pairing broadcast, and automatically updates the display content to prompt the user according to the second pairing broadcast, and the user only needs to confirm as needed without additional operations.
  • the pairing broadcast message includes the name and/or device type of the external device, and the name and/or device type of the external device are used to display when prompting the user to perform authorized pairing.
  • this embodiment can provide substantial information reference for the user's operation.
  • a computer host to recommend pairing is prompted according to historical pairing conditions of the corresponding channel.
  • this embodiment can guide the user to perform authorized pairing, reduce the difficulty of the user's selection, and improve the user experience.
  • the pairing broadcast message of the external device is not processed and notified, so as to reduce unnecessary interference to the user.
  • the monitoring whether there are other pairing broadcast messages to determine whether to continue prompting the user to perform authorized pairing includes:
  • the display content for prompting the user is turned off.
  • the window that prompts the user can be automatically closed, thereby reducing the user's operation intervention and improving user experience.
  • the pairing broadcast message includes a device identifier corresponding to an idle channel.
  • a device identifier such as a physical address corresponding to a Bluetooth channel can be used to identify a corresponding idle channel to improve operability.
  • the pairing broadcast message includes a Bluetooth physical address corresponding to an idle channel, and the idle channel is a Bluetooth channel.
  • this embodiment specifically provides an implementation manner of Bluetooth pairing, which reduces the complexity of pairing a Bluetooth mouse, keyboard, etc., and improves user experience.
  • an external device pairing device including:
  • a broadcast unit configured to determine a first idle channel of the external device and send a first pairing broadcast message corresponding to the first idle channel
  • a pairing unit configured to receive a confirmation message from the first computer host and establish a pairing connection based on the first idle channel with the first computer host according to the confirmation message from the first computer host, and the first computer host an acknowledgment message in response to the first pairing broadcast message;
  • the broadcast unit is also used to judge whether there are other idle channels in the external device, so as to determine whether to continue pairing.
  • the broadcasting unit judging whether there are other idle channels on the external device, so as to determine whether to continue pairing includes:
  • the first idle channel and the second idle channel are sequentially determined according to numbers of the idle channels.
  • the apparatus for pairing an external device further includes a starting unit configured to receive a pairing trigger input related to the external device to start pairing.
  • the pairing trigger input is an operation of a physical key on the external device.
  • the external device pairing device further includes a closing unit, and the closing The unit is used to set a first time threshold, and stop pairing when no confirmation message is received from the computer host after sending the pairing broadcast message beyond the first time threshold; or
  • the pairing broadcast message includes a device identifier corresponding to an idle channel.
  • the pairing broadcast message includes a Bluetooth physical address corresponding to an idle channel, and the idle channel is a Bluetooth channel.
  • the pairing broadcast message includes the name and/or device type of the external device, and the name and/or device type of the external device are used to display when the computer host prompts the user to perform authorized pairing .
  • an external device pairing device which is characterized in that it includes:
  • a monitoring unit configured to monitor a first pairing broadcast message of the external device, the first pairing broadcast message corresponding to the first idle channel of the external device;
  • a prompting unit configured to prompt the user to perform authorized pairing on the first idle channel according to the first pairing broadcast message
  • the monitoring unit is also used to monitor whether there are other pairing broadcast messages, so as to determine whether to continue prompting the user to perform authorized pairing.
  • the prompting unit after prompting the user to perform authorized pairing on the first idle channel according to the first pairing broadcast message, the prompting unit further includes:
  • the prompting unit when the prompting unit receives a user's confirmation operation on the first free channel, it closes the display content that prompts the user.
  • the monitoring by the monitoring unit on whether there are other pairing broadcast messages to determine whether to continue prompting the user to perform authorized pairing includes:
  • the prompting unit after prompting the user to perform authorized pairing on the first idle channel according to the first pairing broadcast message, the prompting unit further includes:
  • the listening unit monitors whether there are other pairing broadcast messages to determine whether to continue to prompt the user to perform authorized pairing, including:
  • the display content for prompting the user is updated according to the second pairing broadcast message to prompt the user to perform authorized pairing on the second idle channel.
  • the pairing broadcast message includes the name and/or device type of the external device, and the name and/or device type of the external device are used to display when prompting the user to perform authorized pairing.
  • the prompting unit when the prompting unit prompts the user to perform authorized pairing, it prompts a computer host to recommend pairing according to historical pairing conditions of the corresponding channel.
  • the prompting unit after prompting the user to perform authorized pairing on the first idle channel according to the first pairing broadcast message, the prompting unit further includes:
  • the monitoring by the monitoring unit on whether there are other pairing broadcast messages to determine whether to continue prompting the user to perform authorized pairing includes:
  • the display content for prompting the user is turned off.
  • the pairing broadcast message includes a device identifier corresponding to an idle channel.
  • the pairing broadcast message includes a Bluetooth physical address corresponding to an idle channel, and the idle channel is a Bluetooth channel.
  • the fifth aspect provides an external device pairing system, including the external device pairing device as provided in the third aspect and any one of the optional implementations of the third aspect and any one of the fourth aspect and any one of the optional implementations of the fourth aspect The way provided by the external device pairing device.
  • an external device including a memory, a processor, and a computer program stored on the memory and operable on the processor.
  • the processor executes the computer program, the first aspect and the first aspect are implemented.
  • the method provided by any optional embodiment.
  • a computer host including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the second aspect and the second aspect when executing the computer program.
  • the method provided by any optional embodiment.
  • a computer program product containing instructions, which, when run on a computer, cause the computer to execute the first aspect, any one of the optional implementation modes of the first aspect and the second aspect, any one of the second aspect The method provided by an alternative embodiment.
  • a computer-readable storage medium is provided.
  • a computer program is stored in the computer-readable storage medium.
  • any optional implementation of the first aspect and the first aspect can be realized. mode, the second aspect, and the method provided in any optional implementation manner of the second aspect.
  • this application performs pairing with the multi-computer host through the external device, automatically switches the unpaired channel according to the unpaired channel of the external device and sends the corresponding pairing broadcast message to the outside, and according to the response feedback of the computer host , pair and connect the unpaired channel with the corresponding computer host one by one.
  • the application simplifies the pairing and connection operation between the external device and the multi-computer host, and improves the user experience.
  • FIG. 1 is a schematic diagram of an external device paired with multiple computer hosts in the prior art.
  • Fig. 2 is a schematic diagram of a pairing process of an external device in the prior art.
  • FIG. 3 is a schematic diagram of a pairing interaction architecture between an external device and a host computer in an embodiment of the present application.
  • FIG. 4 is a flow chart of an external device pairing method in an embodiment of the present application.
  • FIG. 5 is a flow chart of an external device pairing method in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a computer host user prompting in an embodiment of the present application.
  • Fig. 7 is a schematic diagram of a prompt for a host computer user in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a computer host user prompting in an embodiment of the present application.
  • FIG. 9 is a flow chart of pairing and interaction between an external device and multiple computer hosts in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of an external device pairing device in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an external device pairing device in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of the configuration of external equipment in an embodiment of the present application.
  • FIG. 13 is a schematic diagram of the configuration of a computer host in an embodiment of the present application.
  • a computer system can be simply regarded as a system for digital information processing, and its scope of meaning is not limited to traditional computers, but also includes a variety of other computing devices with independent information processing, such as driving computers, set-top boxes, robots, etc.
  • a computer system can generally be divided into two parts: a computer mainframe and external devices.
  • a computer mainframe In the general concept of a computer mainframe, it refers to the main body parts other than input devices and output devices, usually including at least a processor and a memory, etc., but in this application
  • the computer host will be extended accordingly, and the host device itself is integrated with specific input devices and output devices.
  • External equipment or peripheral equipment, referred to as peripheral equipment, is most of the hardware equipment that inputs or outputs information and data except the host computer, including input equipment such as mouse, keyboard, stylus, etc., and monitors, speakers, printers, etc. etc., including the output device.
  • the external device provides the conditions for the host computer to interact with the outside world. It is an indispensable auxiliary accessory for the host computer.
  • the external device is connected to the host computer via wired or wireless, and the two are paired to achieve corresponding input or output operations.
  • FIG. 3 is a schematic diagram of a pairing interaction architecture between an external device and a host computer in an embodiment of the present application.
  • the computer host and the external device are two relatively independent devices, and the interaction between the two is realized through communication.
  • the two realize the interaction through Bluetooth communication, and the corresponding Bluetooth
  • the mouse includes multiple Bluetooth channels that can establish connections, and supports connection with multiple hosts. By switching, the Bluetooth mouse can be controlled among multiple hosts, thereby realizing the scene of multi-host pairing.
  • the software system on the host computer may include but not limited to Hongmeng OS, Windows, MacOS, Android, etc.
  • Further implementation modules may include device discovery UI (User Interface, user interface), proximity discovery service, Bluetooth pairing management Service, where the proximity discovery service discovers connectable external devices, such as a Bluetooth mouse, by listening to the corresponding pairing broadcast messages.
  • the device discovery UI is responsible for displaying the discovered external devices to the user, and can interact with the user to obtain user authorization pairing confirmation operation.
  • the software system on the external device may include but not limited to Hongmeng OS, Linux, etc.
  • Further implementation modules may include mode management service, channel management service, and Bluetooth pairing management service, where the mode management service can manage the external device.
  • the channel management service is responsible for managing the communication channels owned by external devices, which can include managing unpaired idle channels, determining idle channels to be paired, and sending pairing broadcast messages to external host computers discover yourself. Further, the Bluetooth pairing management service of the computer host and the Bluetooth pairing management service of the external device realize Bluetooth pairing and establish a Bluetooth connection.
  • step S301 the mode management service in the Bluetooth mouse notifies the channel management service to start the pairing mode, that is, the channel management service starts the pairing work, and sends a pairing broadcast through step S302 message, including the mac1 (Media Access Control Address, media access control address, also known as physical address) address corresponding to the Bluetooth channel.
  • the proximity discovery service in the corresponding laptop can discover the Bluetooth mouse that sends the pairing broadcast message, and send the found result to the device discovery UI through step S303 to prompt the user to pair with a pop-up box.
  • step S304 send the instruction of the user to determine the pairing to the Bluetooth pairing management service of the notebook computer, and then enter step S305, establish a pairing connection with the Bluetooth mouse. If the pairing is successful, the Bluetooth pairing management service of the Bluetooth mouse will notify the channel management service of the successful pairing information, ie step S306.
  • step S307 if there is an unpaired channel, update the pairing broadcast message (such as pairing broadcast The physical address corresponding to the bluetooth channel to be paired in the message is updated to mac2), so as to achieve the purpose of pairing with other computer hosts.
  • FIG. 4 is a flow chart of an external device pairing method in an embodiment of the present application.
  • the external device pairing method can be specifically applied to external devices, such as a mouse, a keyboard, etc., and the external device pairing method includes step S401, step S402 and step S403, wherein,
  • Step S401 Determine a first free channel of the external device and send a first pairing broadcast message corresponding to the first free channel.
  • the first pairing broadcast message may include the first device identifier corresponding to the first free channel, such as the physical address of the Bluetooth channel, and the first pairing broadcast may also include the name of the external device, device type, broadcast type, and protocol version One or more of , business type, sub-product ID, and distance measurement fields.
  • the external device itself includes multiple channels that can establish a connection with the computer host. Among them, the channel that has established a connection with any computer host is an occupied channel, and the channel that has not established a connection with any computer host is an idle channel. A host computer that is paired with the external device establishes a connection.
  • the external device when it starts pairing, it can take inventory of its own free channels and determine a free channel to meet the pairing requirements. In one case, the order of determining the free channels can be sequentially determined according to the numbering order of the free channels , if the channel corresponding to the number is already matched and occupied, it will be confirmed by a number.
  • the Bluetooth module in the Bluetooth mouse has three Bluetooth channels. When pairing is started, none of the three Bluetooth channels is connected to any computer host, that is, there are three idle channels, namely channel 1, channel 2, and channel 3. , when pairing is started, pairing starts from channel 1 first, and channel 1 is determined as the first free channel.
  • the number of channels may be factory-set, or the number of the corresponding channel may be dynamically adjusted according to usage conditions or preference settings.
  • the first device identifier corresponding to the first free channel can be obtained, and the first device identifier is included in the first pairing broadcast message sent externally to tell the external computer host the first pairing broadcast is corresponding to the first idle channel, and the corresponding computer host can establish a pairing connection with the external device based on the first idle channel.
  • the device identifier can be the physical address of the corresponding Bluetooth channel, and the corresponding Bluetooth channel can be locked to establish a connection through the physical address.
  • Step S402 receiving a confirmation message from the first computer host and establishing a pairing connection based on the first idle channel with the first computer host according to the confirmation message from the first computer host, and the confirmation message from the first computer host Responding to the first pairing broadcast message.
  • the first device identifier in the pairing broadcast message may be identified to determine whether to establish a pairing connection with the corresponding first idle channel.
  • whether the host computer establishes a pairing connection with the corresponding first idle channel may be a confirmation operation received by the user, and when the user confirms establishing a pairing connection with the first idle channel, respond to the first pairing broadcast message and return to the corresponding external device Confirm the message.
  • the first computer host will send a confirmation message to the external device, and after receiving the confirmation message from the first computer host, the external device knows that the first computer host is willing to pass through the first free channel Establish a pairing connection with itself, so the external device establishes a pairing connection with the first host computer, so that the external device can continue to interact with the first host computer after the pairing is established, such as controlling the first host computer with a Bluetooth mouse to implement input operations.
  • Step S403 judging whether the external device has other idle channels, so as to determine whether to continue pairing.
  • step S402 completes the pairing and connection of the first idle channel
  • the first idle channel is automatically converted from the idle state to the occupied state.
  • step S401 and step S402 do not end the entire pairing In the process, if it is judged that the external device has other free channels, continue pairing.
  • the second free channel of the external device determines the second free channel of the external device and send the second pairing broadcast message corresponding to the second free channel; receive the confirmation message of the second computer host and perform the matching according to the confirmation message of the second computer host and the The second computer host establishes a pairing connection based on the second idle channel, and the confirmation message of the second computer host responds to the second pairing broadcast message.
  • the first idle channel and the second idle channel do not have an absolute distinction, they can be two idle Bluetooth channels in the Bluetooth module, and any one of the Bluetooth channels is selected as the first idle channel to establish a connection After that, it will automatically turn to another Bluetooth channel as the second free channel to establish a connection.
  • the second idle channel also has a corresponding second device identifier.
  • the second device identifier is the physical address of the corresponding Bluetooth channel. Different device identifiers are used to identify whether it is the first idle channel or the second idle channel. Further, the second pairing broadcast message corresponding to the second idle channel is sent to inform the external computer host that the corresponding external device still has a second idle channel to establish a connection. When the second host computer receives the second pairing broadcast message, it returns a confirmation message in response to the second pairing broadcast message according to the user's confirmation operation, so as to establish a connection with the second idle channel. Similarly, the second pairing broadcast message may also include information such as the name and/or device type of the external device, and the name and/or device type of the external device are used to display when the computer host prompts the user to perform authorized pairing.
  • the second computer host is not necessarily two different hosts from the first computer host.
  • the first host computer that establishes the connection can also receive the second pairing broadcast message and respond to the second pairing broadcast message.
  • the first computer host and the second computer host are the same host.
  • the tablet computer originally established a connection with channel 1 of the Bluetooth keyboard through steps S401 and 402, and the Bluetooth keyboard can normally control the tablet computer through channel 1, but when the Bluetooth keyboard automatically switches to channel 2 for pairing, at this time
  • the tablet computer will also prompt the user that there is channel 2 that can be paired. If the user wants to use channel 2 to establish a connection with the Bluetooth keyboard, the user can also click OK to send a confirmation message to the Bluetooth keyboard.
  • the Bluetooth keyboard is connected to the tablet computer through channel 2 again establish connection.
  • channel 1 is automatically released at this time, that is, channel 1 returns from the occupied state to the idle state, so that after channel 2 is paired, it will still pass Step S403 judges whether there are other idle channel processes in the external device, so as to re-pair the channel 1 with other computer hosts. Therefore, the above example can well reflect the flexibility of pairing in this embodiment.
  • the user does not need to know the occupancy of each channel in detail. The user does not need to specify the Bluetooth channel, and one-click initiates multi-host pairing, which is very user-friendly. .
  • the performance of different channels of external devices is not necessarily the same. For example, some only support low speed, and some can support high speed, so as to adapt to different scenarios.
  • the pairing needs to be changed during the process. Further, in order to assist the user whether to choose to confirm the operation, it is also possible to prompt the user to perform When performing authorized pairing, additional prompts about the pairing channel supporting low-speed or supporting high-speed channel attribute information, such information can be embedded in the pairing broadcast message, obtained by extracting the pairing broadcast message, optionally, according to the channel attribute information
  • the type of computer host to be recommended for pairing is prompted, for example, the computer host to be recommended for pairing is prompted according to the historical pairing situation of the corresponding channel.
  • the historical pairing situation may also be embedded in the pairing broadcast message.
  • channels are not limited to being all Bluetooth channels, and different wireless channels may also be set according to actual needs.
  • step S403 Through the automatic cyclic pairing from step S401 to step S403, continuous idle channel pairing of external devices can be supported, so that pairing connections can be automatically established with multiple computer hosts, reducing the complexity of manual operations and improving user experience.
  • the function of step S403 is to support circular pairing of idle channels. When any idle channel completes the pairing connection establishment, it will trigger to detect whether there is an unpaired channel, that is, it can be an inventory of idle channels. If there is, continue to perform pairing. It includes sending a pairing broadcast message, establishing a pairing connection with a corresponding computer host, and if there is no pairing, stopping pairing, including stopping sending a pairing broadcast message.
  • this embodiment can also pair more than three channels in a loop, such as supporting a Bluetooth mouse that is simultaneously connected to three computer hosts.
  • steps S401 to S403 realize the multi-channel pairing process of external devices.
  • a pairing trigger input about the external device will be received to start pairing.
  • the pairing trigger input can be an external The operation of the physical button on the device generates a pairing trigger input through the operation of the physical button, or a similar event such as changing the battery of the external device and re-powering on, automatically generates a pairing trigger input through the occurrence of the above events.
  • step S403 specifically, when it is judged that the channels of the external device are all occupied, that is, when detecting whether there is an unpaired channel, it is determined that there is no channel, and at this time, the pairing will be stopped, that is, the corresponding cycle will be ended, and no corresponding communication will be sent to the outside world.
  • paired broadcast message At the same time, in order to reduce unnecessary cycles and waiting in the pairing process, optionally, a first time threshold is set, and when no confirmation message is received from the computer host after sending the pairing broadcast message, the pairing is stopped.
  • the external device sends the first pairing broadcast message for the first idle channel or the second pairing broadcast message for the second idle channel, as long as the corresponding pairing broadcast message is sent and there is no response after timeout, that is, within the first time threshold If there is no confirmation message fed back by any host computer, the pairing will be stopped directly, and correspondingly, the continuous sending of the pairing broadcast message will be stopped. For example, when a Bluetooth device still sends a pairing broadcast message for pairing when there is an unpaired channel, since the computer host around the Bluetooth device does not have a pairing requirement or has a response failure, if the Bluetooth device is still performing pairing at this time, the pairing message is sent externally. If you broadcast a message, it will enter an endless loop, consuming the power of the Bluetooth device. If you set a timeout mechanism for the first time threshold (such as 3 minutes), you can jump out of the loop and end the pairing when the timeout occurs.
  • a timeout mechanism for the first time threshold such as 3 minutes
  • FIG. 5 is a flow chart of an external device pairing method in an embodiment of the present application.
  • the external device pairing method can be specifically applied to a computer host, such as a notebook computer, a tablet computer, etc., and the external device pairing method includes step S501, step S502 and step S503, wherein,
  • Step S501 Listen to a first pairing broadcast message of an external device, where the first pairing broadcast message corresponds to a first idle channel of the external device.
  • the computer host will monitor the pairing broadcast message sent by the external device, so that the computer host can discover the corresponding external device.
  • the external device initiates the pairing of the first idle channel, it will send the first pairing broadcast message corresponding to the first idle channel.
  • the host computer monitors the first pairing broadcast message, it can determine whether to match the corresponding
  • the external device establishes a pairing connection based on the first idle channel. For example, for a pairing broadcast message of a Bluetooth device, the physical address of the corresponding Bluetooth channel may be included to determine the channel that can be paired and connected.
  • Step S502 prompting the user to perform authorized pairing on the first idle channel according to the first pairing broadcast message.
  • the host computer monitors and acquires the first pairing broadcast message, and further displays a corresponding prompt on the screen equipped with the computer host according to the first pairing broadcast message to ask whether the user is compatible with the external party that sent the first pairing broadcast message.
  • the device establishes the pairing connection, which also includes a channel for establishing the pairing connection, and receives the user's choice.
  • the information includes one or more of the name of the external device and the type of the device, and the name of the specific external device (such as the brand name of the external device) and/or the type of the device can also be displayed on the corresponding computer host screen, so that the user can know at a glance Know exactly what kind of external device needs to be authorized for pairing, and provide a reference for the user to choose.
  • the host computer prompts the user to authorize the pairing of the first idle channel
  • the corresponding host computer responds to the first pairing broadcast message to the corresponding
  • the external device sends a confirmation message, so that the corresponding external device establishes a pairing connection with the corresponding computer host.
  • a dialog box can automatically pop up on the graphical interface, which prompts the corresponding Bluetooth mouse information.
  • Bluetooth The mouse name and device type can be determined by pairing the external device name and device type in the broadcast message.
  • a confirmation button is set in the dialog box to receive the user's confirmation operation.
  • the confirmation button When the user clicks the confirmation button, it means that the user is willing to use this laptop to establish a pairing connection with the Bluetooth mouse. Correspondingly, the laptop will send a confirmation message to the Bluetooth mouse to notify the Bluetooth mouse. The pairing connection is established, and the prompt dialog box will be closed. But if the user is not going to use this notebook computer to establish a pairing connection with the Bluetooth mouse, then you can do nothing, and the corresponding prompt dialog box will remain on the screen. As shown in Figure 7, the dialog box that pops up on the notebook computer includes not only a confirmation button, but also a close button. If the user is not going to use this notebook computer to establish a connection with the Bluetooth mouse, he can also click the close button.
  • Close the prompt dialog box correspondingly, end the processing of the pairing broadcast message sent by the bluetooth mouse, that is, no longer pop up a prompt dialog box for the pairing broadcast message sent by the same bluetooth mouse.
  • the close button For the content of the dialog box, if you do not establish a pairing connection, you can also not click the close button, that is, do nothing.
  • a second time threshold will be set, only within the second time threshold after clicking the close button, the pairing broadcast message of the same Bluetooth mouse will not be responded to, and when the close button is clicked and the second time threshold is exceeded, the Bluetooth mouse will be heard again When the pairing broadcast message, the prompt dialog box still pops up.
  • a prompt dialog box can also pop up according to the monitored pairing broadcast message if there is an event such as a corresponding computer host restarting. It should be noted that this embodiment is not limited to the Bluetooth mouse and notebook computer shown in FIG. 6 and FIG. 7 , and can be applied to pairing between all external devices and a host computer.
  • Step S503 monitor whether there are other pairing broadcast messages, to determine whether to continue prompting the user to perform authorized pairing.
  • the external device After sending the first pairing broadcast message to establish the pairing connection, it will also send the corresponding pairing broadcast message according to other idle channels, so the host computer will also continue to monitor whether there are other pairing broadcast messages sent by the external device, In this way, it is determined whether to prompt the user to continue the authorized pairing.
  • the host computer When receiving other pairing broadcast messages, such as the second pairing broadcast message, in one case, the host computer has already established a pairing connection in response to the first pairing broadcast message, and at this time, a dialog box may pop up on the user interface to prompt the user to proceed.
  • Authorized pairing is to prompt the user to perform authorized pairing according to the second pairing broadcast message, so that an operation interface can be provided for the user to change the pairing connection.
  • the prompt dialog box can not pop up when the computer host has completed the pairing connection according to the setting.
  • the host computer does not respond when it receives the first pairing broadcast message. For example, when an external device sends the first pairing broadcast message, the user is operating other host computers for pairing, and the user does not need to broadcast the first pairing message.
  • the pop-up dialog box of the message is processed.
  • the corresponding computer host has not received the user’s confirmation operation on the first free channel.
  • the content of the pop-up dialog box of the first pairing broadcast message can be updated. Update The content of is determined according to the monitored new pairing broadcast message.
  • monitoring whether there are other pairing broadcast messages to determine whether to prompt the user to continue authorized pairing specifically includes: monitoring the second pairing broadcast message of the external device, and the second pairing broadcast message corresponds to the second pairing broadcast message of the external device.
  • An idle channel according to the second pairing broadcast message, the user is prompted to authorize the pairing of the second idle channel, or according to the second pairing broadcast message, the display content for prompting the user is updated to prompt the user to perform authorization pairing on the second idle channel.
  • Authorize pairing when receiving the user's confirmation operation on the second device identification, a confirmation message may be sent to the corresponding external device in response to the second pairing broadcast message, so that the corresponding external device establishes a pairing connection with the corresponding computer host.
  • the host computer will continuously monitor the pairing broadcast messages of the external devices.
  • the channel corresponding to the first pairing broadcast message completes the pairing establishment, the first pairing broadcast message will stop, and the second pairing broadcast message will be received by the computer.
  • the host monitors that at this moment, the computer host needs to update the content of the prompt according to the content of the second pairing broadcast message, so as to tell the user that it is now an authorized pairing operation of another channel.
  • the prompt dialog box corresponding to the previous first pairing broadcast message is not closed, when the second pairing broadcast message is obtained, the content in the prompt dialog box will be automatically updated, prompting It is a confirmation of the connection to channel 2, and this update does not require user intervention.
  • a new dialog box pops up again to display the corresponding pairing prompt information.
  • the host computer will monitor whether the external device stops sending the pairing broadcast message. For example, if all channels of the corresponding external device have completed the pairing connection, the pairing broadcast will be stopped. Sending of messages.
  • the host computer can set a third time threshold, and when no pairing broadcast message from the external device is received within the third time threshold, it is determined that the external device stops sending the pairing broadcast, and the host computer closes the display content that prompts the user, and accordingly can It is to automatically close the displayed prompt dialog box, and the user does not need to do any operation. The user can also judge that the corresponding pairing process is over when the corresponding dialog box is automatically closed.
  • FIG. 9 is a flow chart of pairing and interaction between an external device and multiple computer hosts in an embodiment of the present application. As shown in FIG. 9 , the pairing interaction process of the external device is described through an embodiment in which a Bluetooth device establishes a pairing connection with the host 1 and the host 2 .
  • the Bluetooth device can be a Bluetooth mouse, a Bluetooth keyboard, etc.
  • the host 1 and host 2 can be a notebook computer, a tablet computer, a desktop computer, etc.
  • step S901 the user starts the pairing mode for the Bluetooth device, such as clicking the corresponding pairing button on the Bluetooth device, the Bluetooth device starts the pairing mode, determines the idle first Bluetooth channel (mac1), and sends a pairing broadcast message through step S911, carrying mac1 address, the host 1 and host 2 around the Bluetooth device can receive the pairing broadcast message through their own proximity discovery service, and send pairing prompts about mac1 to their respective device discovery UIs, that is, step S912. 2 See the corresponding pairing prompt.
  • step S913 is executed, and a confirmation operation is input to the host 1.
  • the host 1 enters step S914, establishes a pairing connection with the Bluetooth device, and pairs mac1.
  • step S915 after the pairing is successful, it is checked whether there is an unpaired channel, if there is no unpaired channel, it will jump to step S931, if there is an unpaired channel, it will enter step S921.
  • Determine the idle second bluetooth channel (mac2) send a pairing broadcast message through step S921, carrying the mac2 address, the host 1 and host 2 around the bluetooth device can also receive the pairing broadcast message through their own proximity discovery service, and report to their respective The device discovery UI sends a pairing prompt about mac2, ie step S922.
  • step S923 the pairing prompts displayed on the host 1 and the host 2 are updated according to the new pairing prompt content.
  • Step S924 is executed, the user inputs a confirmation operation to the host 2, and accordingly, the host 2 enters step S925 to pair mac2 with the Bluetooth device.
  • step S926 When the pairing is successful, continue to execute step S926 to detect whether there is an unpaired channel, if there is no unpaired channel, enter step S931, the Bluetooth device stops pairing broadcast, and ends the pairing.
  • step S932 correspondingly, host 1 and host 2 can monitor that the pairing broadcast stops, and enter step S933 to close the prompt boxes displayed on host 1 and host 2.
  • the Bluetooth device Every time the Bluetooth device is paired with the corresponding Bluetooth channel, it will detect whether there is an unpaired channel. If there is an unpaired channel, it will automatically initiate the pairing of the remaining channels, and the host 1 and host 2 will monitor the pairing broadcast. According to the pairing broadcast The content in the message automatically updates the content of the pairing reminder. If there is no unpaired channel, the Bluetooth device stops pairing, host 1 and host 2 monitor that the pairing broadcast stops, and automatically close the pairing prompt. The user is using the Bluetooth device to communicate with the main When device 1 and host 2 are paired, you only need to operate on the Bluetooth device, host 1, and host 2 respectively, and the operations are all performed under prompts, which greatly improves the user experience.
  • FIG. 10 is a schematic diagram of an external device pairing device in an embodiment of the present application.
  • the external device pairing apparatus 1001 includes a broadcast unit 1011 and a pairing unit 1012, wherein,
  • a broadcast unit 1011 configured to determine a first idle channel of the external device and send a first pairing broadcast message corresponding to the first idle channel;
  • the pairing unit 1012 is configured to receive a confirmation message from the first computer host and establish a pairing connection based on the first idle channel with the first computer host according to the confirmation message from the first computer host, and the first computer host an acknowledgment message in response to the first pairing broadcast message;
  • the broadcasting unit 1011 is further configured to judge whether there are other idle channels of the external device, so as to determine whether to continue pairing.
  • the broadcasting unit 1011 judging whether there are other idle channels in the external device, so as to determine whether to continue pairing includes:
  • the first idle channel and the second idle channel are sequentially determined according to numbers of the idle channels.
  • the external device pairing apparatus further includes an activation unit configured to receive a pairing trigger input on the external device to start pairing.
  • the pairing trigger input is an operation of a physical key on the external device.
  • the apparatus for pairing external devices further includes a closing unit, the closing unit is configured to set a first time threshold, and when no confirmation message from the host computer is received beyond the first time threshold after sending the pairing broadcast message, stop pairing; or
  • the pairing broadcast message includes a device identifier corresponding to the idle channel.
  • the pairing broadcast message includes a Bluetooth physical address corresponding to an idle channel, and the idle channel is a Bluetooth channel.
  • the pairing broadcast message includes the name and/or device type of the external device, and the name and/or device type of the external device are used to display when the computer host prompts the user to perform authorized pairing.
  • FIG. 11 is a schematic diagram of an external device pairing device in an embodiment of the present application.
  • the external device pairing apparatus 1101 includes a monitoring unit 1111 and a prompting unit 1112, wherein,
  • a monitoring unit 1111 configured to monitor a first pairing broadcast message of an external device, where the first pairing broadcast message corresponds to a first idle channel of the external device;
  • a prompting unit 1112 configured to prompt the user to perform authorized pairing on the first idle channel according to the first pairing broadcast message
  • the monitoring unit 1111 is also configured to monitor whether there are other pairing broadcast messages, so as to determine whether to continue prompting the user to perform authorized pairing.
  • the prompting unit 1112 further includes:
  • the prompting unit 1112 when the prompting unit 1112 receives a user's confirmation operation on the first free channel, it closes the display content that prompts the user.
  • the monitoring unit 1111 monitors whether there are other pairing broadcast messages, so as to determine whether to continue prompting the user to perform authorized pairing includes:
  • the prompting unit 1112 further includes:
  • the monitoring unit 1111 monitors whether there are other pairing broadcast messages to determine whether to continue to prompt the user to perform authorized pairing, including:
  • the display content for prompting the user is updated according to the second pairing broadcast message to prompt the user to perform authorized pairing on the second idle channel.
  • the pairing broadcast message includes the name and/or device type of the external device, and the name and/or device type of the external device are used for display when prompting the user to perform authorized pairing.
  • the prompting unit 1112 when prompting the user to perform authorized pairing, the prompting unit 1112 prompts the computer host for recommending pairing according to the historical pairing situation of the corresponding channel.
  • the prompting unit 1112 further includes:
  • the monitoring unit 1111 monitors whether there are other pairing broadcast messages, so as to determine whether to continue prompting the user to perform authorized pairing includes:
  • the display content for prompting the user is turned off.
  • the pairing broadcast message includes a device identifier corresponding to the idle channel.
  • the pairing broadcast message includes a Bluetooth physical address corresponding to an idle channel, and the idle channel is a Bluetooth channel.
  • an external device pairing system includes at least the external device pairing device shown in FIG. 10 and the external device pairing device shown in FIG. 11 , for details, refer to the external device pairing method and optional implementation shown in FIG. The specific content of the manner, the external device pairing method shown in FIG. 5 and the specific content of an optional implementation.
  • FIG. 12 is a schematic diagram of the configuration of external equipment in an embodiment of the present application.
  • the external device 1201 can be a mouse, a keyboard, etc.
  • the external device 1201 includes a processor 1211 and a memory 1212.
  • the external device 1201 can also include a Bluetooth module.
  • the computer program is stored in the memory 1212 and can run on the processor 1211, and the processor 1211 executes the computer program to implement the external device pairing method shown in FIG. 4 and the method provided in an optional embodiment.
  • the external device 1201 can manage the service through the channel Determine the free channel and send a pairing broadcast, and establish a pairing connection through the Bluetooth pairing management service.
  • FIG. 13 is a schematic diagram of the configuration of a computer host in an embodiment of the present application.
  • the host computer 1301 can be a notebook computer, a tablet computer, etc.
  • the host computer 1301 includes a processor 1311 and a memory 1312.
  • the host computer 1301 can also include a display and a Bluetooth module.
  • the computer program is stored in the memory 1312 and can run on the processor 1311, and the processor 1311 executes the computer program to implement the external device pairing method shown in FIG. 5 and the method provided in an optional embodiment.
  • the host computer 1301 can discover pairable external devices through the proximity discovery service, interact with the user through the device discovery UI to implement authorized pairing, and establish a pairing connection through the Bluetooth pairing management service.
  • a computer program product containing instructions, when running on a computer, causes the computer to execute the external device pairing method shown in Figure 4 and the method provided in an optional embodiment, and the external device shown in Figure 5 Pairing methods and methods provided by optional embodiments.
  • a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, and when the computer program is run, the external device pairing method and optional implementation manner as shown in FIG. 4 are realized
  • this application performs pairing with multiple computer hosts through external devices, and automatically switches unpaired channels and sends corresponding pairing broadcast messages to the outside according to the unpaired channel conditions of the external devices. Make a pairing connection between the unpaired channel and the corresponding computer host.
  • the application simplifies the pairing and connection operation between the external device and the multi-computer host, and improves the user experience.
  • a computer program product includes one or more computer instructions.
  • a computer can be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).
  • each software module corresponding to the computer program flow can also correspond to each hardware module, such as ASIC (Application Specific Integrated Circuit, application specific integrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic devices, discrete gate or crystal logic devices, discrete hardware components, or any suitable combination thereof.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • other programmable logic devices discrete gate or crystal logic devices, discrete hardware components, or any suitable combination thereof.
  • the functions of each module can be implemented in one or more software and/or hardware when implementing the present application.
  • each step and process number does not mean the order of execution, and the execution order of each step and process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请涉及终端技术领域,尤其涉及一种外部设备配对方法、装置、设备及存储介质。本申请通过外部设备与多计算机主机进行配对,根据外部设备所具有的未配对通道情况,自动切换未配对通道并对外发送对应的配对广播消息,根据计算机主机的响应反馈,逐个对未配对通道与对应计算机主机进行配对连接。本申请简化了外部设备与多计算机主机进行配对连接的操作,提高了用户的使用体验。

Description

外部设备配对方法、装置、设备及存储介质
本申请要求在2022年2月25日提交中国国家知识产权局、申请号为202210178884.4的中国专利申请的优先权,发明名称为“外部设备配对方法、装置、设备及存储介质”的中国专利申请的优先权,要求在2022年3月28日提交中国国家知识产权局、申请号为202210312318.8的中国专利申请的优先权,发明名称为“外部设备配对方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种外部设备配对方法、装置、设备及存储介质。
背景技术
对于计算机系统而言,没有输入设备、输出设备等外部设备,就如同计算机系统没有软件一样,是毫无意义的。外部设备可以包括鼠标、键盘、手写笔、显示器、音箱、打印机等,针对有线的外部设备,与计算机主机的配对过程即是将外部设备的有线插口接入到计算机主机上,但对于无线的外部设备,则配对过程就相对复杂一点,特别是一个外部设备同时与多个计算机主机进行配对时,就更加繁琐。当前市场上为了满足用户的多主机场景需求,支持多主机的外部设备越来越多,如图1所示,当用户同时拥有笔记本电脑111、台式机112、平板电脑113时,如果为每台计算机主机都配备一套外部设备,显然有点浪费,且占用空间。以鼠标101为例,如果可以用一个鼠标101分别与笔记本电脑111、台式机112、平板电脑113进行配对连接,而使用时通过在笔记本电脑111、台式机112、平板电脑113之间切换控制,可以大大提高用户的使用便利性。
如图2所示,在现有技术中,为了实现外部设备与多个计算机主机的配对,从步骤S201、开始外部设备配对到步骤S208、结束外部设备配对之间,需要经历多个复杂、重复的步骤,步骤S202、步骤S203需要先对第一计算机主机进行配对,其过程是先点击外部设备切换键选择第一通道,直到第一通道指示灯闪烁,然后再去第一计算机主机的蓝牙配置中找到对应的外部设备,点击配对连接。对第一计算机主机配对完成后,还要进行步骤S204、步骤S205的操作,选择第二通道对第二计算机主机进行重复配对,同理通过步骤S206、步骤S207对第三计算机主机进行配对。上述过程显然操作复杂,特别是对于计算机操作生疏的用户来讲极不友好,大大影响使用体验。
发明内容
本申请提供一种外部设备配对方法、装置、设备及存储介质,以解决现有技术中外部设备配对多个计算机主机操作复杂,使用体验不佳的技术问题。
为了解决上述技术问题,本申请提供了以下技术方案。
第一方面,提供一种外部设备配对方法,应用于外部设备,所述外设备配对方法包括如下步骤:
确定所述外部设备的第一空闲通道并发送所述第一空闲通道对应的第一配对广播消息;
接收第一计算机主机的确认消息并根据所述第一计算机主机的确认消息与所述第一计算 机主机建立基于所述第一空闲通道的配对连接,所述第一计算机主机的确认消息响应于所述第一配对广播消息;
判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对。
可以理解,本实施方式可以支持外部设备连续的空闲通道配对,从而可以自动地与多个计算机主机建立配对连接,减少人工操作的复杂度,提高用户体验。
在第一方面的一种可选实施方式中,所述判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对包括:
确定所述外部设备的第二空闲通道并发送所述第二空闲通道对应的第二配对广播消息;
接收第二计算机主机的确认消息并根据所述第二计算机主机的确认消息与所述第二计算机主机建立基于所述第二空闲通道的配对连接,所述第二计算机主机的确认消息响应于所述第二配对广播消息。
可以理解,本实施方式外部设备的第二空闲通道在第一空闲通道完成配对连接后,自动与第二计算机主机实现配对连接,减少人工的操作。
在第一方面的一种可选实施方式中,所述第一空闲通道、第二空闲通道是根据空闲通道的编号依次确定的。
可以理解,本实施方式可以保证第一空闲通道、第二空闲通道建立配对连接的先后顺序,减少不必要的相互冲突。
在第一方面的一种可选实施方式中,接收关于所述外部设备的配对触发输入以开始配对。
可以理解,本实施方式为外部设备配对的启动提供的了触发接口,提高配对开始的灵活性。
在第一方面的一种可选实施方式中,所述配对触发输入是所述外部设备上实体按键的操作。
可以理解,本实施方式可以通过实体按键实现一键自动配对多个计算机主机,用户体验好。
在第一方面的一种可选实施方式中,设置第一时间阈值,在发送配对广播消息后超过所述第一时间阈值未接收到计算机主机的确认消息时,停止配对;或者
判断所述外部设备的通道全部占用时,停止配对。
可以理解,本实施方式为外部设备配对的结束提供了终断条件,保证在实际配对过程中可以及时结束配对循环,减少不必要的功耗。
在第一方面的一种可选实施方式中,配对广播消息包括空闲通道对应的设备标识。
可以理解,本实施方式可以采用例如蓝牙通道对应的物理地址等设备标识来识别对应的空闲通道,提高可操作性。
在第一方面的一种可选实施方式中,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
可以理解,本实施方式具体提供了蓝牙配对的实现方式,减少了蓝牙鼠标、键盘等配对的复杂度,提高了用户体验。
在第一方面的一种可选实施方式中,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在计算机主机提示用户进行授权配对时显示。
可以理解,本实施方式可以为执行响应的计算机主机提供更多的外部设备信息,为用户的操作提供充实的信息参考。
第二方面,提供一种外部设备配对方法,应用于计算机主机,所述外部设备配对方法包 括如下步骤:
监听外部设备的第一配对广播消息,所述第一配对广播消息对应于所述外部设备的第一空闲通道;
根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对;
监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对。
可以理解,本实施方式可以针对第一方面外部设备的连续空闲通道配对,实现连续地自动提示用户进行授权配对,减少人工操作的复杂度,提高用户体验。
在第二方面的一种可选实施方式中,所述根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在接收到用户对所述第一空闲通道的确认操作时,向所述外部设备发送所述第一配对广播消息的确认消息,以与所述外部设备建立基于所述第一空闲通道的配对连接。
可以理解,本实施方式可以使特定的计算机主机与外部设备建立配对连接,实现用户的确认操作。
在第二方面的一种可选实施方式中,在接收到用户对所述第一空闲通道的确认操作时,关闭提示用户的显示内容。
可以理解,本实施方式可以使完成配对连接的计算机主机自动关闭提示用户的窗口,减少提示带来的干扰,间接告知用户配对完成。
在第二方面的一种可选实施方式中,所述监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
根据所述第二配对广播消息提示用户对所述第二空闲通道进行授权配对。
可以理解,本实施方式计算机主机根据第一配对广播完成与对应外部设备配对连接后,自动根据第二配对广播提示用户进行新的授权配对,用户只要按需进行确认就可以,不需要额外的操作。
在第二方面的一种可选实施方式中,所述根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在未接收到用户对所述第一空闲通道的确认操作时,保持提示用户的显示内容;
所述监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
根据所述第二配对广播消息更新提示用户的显示内容以提示用户对所述第二空闲通道进行授权配对。
可以理解,本实施方式计算机主机未对第一配对广播进行响应,自动根据第二配对广播更新提示用户的显示内容,用户只要按需进行确认就可以,不需要额外的操作。
在第二方面的一种可选实施方式中,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在提示用户进行授权配对时显示。
可以理解,本实施方式可以在提示用户进行授权配对时,为用户的操作提供充实的信息参考。
在第二方面的一种可选实施方式中,提示用户进行授权配对时,根据对应通道的历史配对情况提示推荐配对的计算机主机。
可以理解,本实施方式可以引导用户进行授权配对,减少用户的选择难度,提高用户的使用体验。
在第二方面的一种可选实施方式中,所述根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在接收到用户关闭提示的操作时,关闭提示用户的显示内容并结束对所述外部设备发送的配对广播消息的处理。
可以理解,本实施方式在接收到用户关闭提示的操作后,不对所述外部设备的配对广播消息进行处理并提示,减少对用户的不必要干扰。
在第二方面的一种可选实施方式中,所述监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
在监听到外部设备停止配对广播消息的发送时,关闭提示用户的显示内容。
可以理解,本实施方式可以自动关闭提示用户的窗口,减少用户的操作介入,提高用户体验。
在第二方面的一种可选实施方式中,配对广播消息包括空闲通道对应的设备标识。
可以理解,本实施方式可以采用例如蓝牙通道对应的物理地址等设备标识来识别对应的空闲通道,提高可操作性。
在第二方面的一种可选实施方式中,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
可以理解,本实施方式具体提供了蓝牙配对的实现方式,减少了蓝牙鼠标、键盘等配对的复杂度,提高了用户体验。
第三方面,提供一种外部设备配对装置,包括:
广播单元,用于确定所述外部设备的第一空闲通道并发送所述第一空闲通道对应的第一配对广播消息;
配对单元,用于接收第一计算机主机的确认消息并根据所述第一计算机主机的确认消息与所述第一计算机主机建立基于所述第一空闲通道的配对连接,所述第一计算机主机的确认消息响应于所述第一配对广播消息;
所述广播单元还用于判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对。
在第三方面的一种可选实施方式中,所述广播单元判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对包括:
确定所述外部设备的第二空闲通道并发送所述第二空闲通道对应的第二配对广播消息;
接收第二计算机主机的确认消息并根据所述第二计算机主机的确认消息与所述第二计算机主机建立基于所述第二空闲通道的配对连接,所述第二计算机主机的确认消息响应于所述第二配对广播消息。
在第三方面的一种可选实施方式中,所述第一空闲通道、第二空闲通道是根据空闲通道的编号依次确定的。
在第三方面的一种可选实施方式中,所述外部设备配对装置还包括启动单元,所述启动单元用于接收关于所述外部设备的配对触发输入以开始配对。
在第三方面的一种可选实施方式中,所述配对触发输入是所述外部设备上实体按键的操作。
在第三方面的一种可选实施方式中,所述外部设备配对装置还包括关闭单元,所述关闭 单元用于设置第一时间阈值,在发送配对广播消息后超过所述第一时间阈值未接收到计算机主机的确认消息时,停止配对;或者
判断所述外部设备的通道全部占用时,停止配对。
在第三方面的一种可选实施方式中,配对广播消息包括空闲通道对应的设备标识。
在第三方面的一种可选实施方式中,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
在第三方面的一种可选实施方式中,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在计算机主机提示用户进行授权配对时显示。
第四方面,提供一种外部设备配对装置,其特征在于,包括:
监听单元,用于监听外部设备的第一配对广播消息,所述第一配对广播消息对应于所述外部设备的第一空闲通道;
提示单元,用于根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对;
所述监听单元还用于监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对。
在第四方面的一种可选实施方式中,所述提示单元根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在接收到用户对所述第一空闲通道的确认操作时,向所述外部设备发送所述第一配对广播消息的确认消息,以与所述外部设备建立基于所述第一空闲通道的配对连接。
在第四方面的一种可选实施方式中,所述提示单元在接收到用户对所述第一空闲通道的确认操作时,关闭提示用户的显示内容。
在第四方面的一种可选实施方式中,所述监听单元监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
根据所述第二配对广播消息提示用户对所述第二空闲通道进行授权配对。
在第四方面的一种可选实施方式中,所述提示单元根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在未接收到用户对所述第一空闲通道的确认操作时,保持提示用户的显示内容;
所述监听单元监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
根据所述第二配对广播消息更新提示用户的显示内容以提示用户对所述第二空闲通道进行授权配对。
在第四方面的一种可选实施方式中,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在提示用户进行授权配对时显示。
在第四方面的一种可选实施方式中,所述提示单元提示用户进行授权配对时,根据对应通道的历史配对情况提示推荐配对的计算机主机。
在第四方面的一种可选实施方式中,所述提示单元根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在接收到用户关闭提示的操作时,关闭提示用户的显示内容并结束对所述外部设备发送 的配对广播消息的处理。
在第四方面的一种可选实施方式中,所述监听单元监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
在监听到外部设备停止配对广播消息的发送时,关闭提示用户的显示内容。
在第四方面的一种可选实施方式中,配对广播消息包括空闲通道对应的设备标识。
在第四方面的一种可选实施方式中,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
第五方面,提供一种外部设备配对系统,包括如第三方面、第三方面任意一种可选实施方式所提供的外部设备配对装置及如第四方面、第四方面任意一种可选实施方式所提供的外部设备配对装置。
第六方面,提供一种外部设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面及第一方面任意一种可选实施方式所提供的方法。
第七方面,提供一种计算机主机,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第二方面及第二方面任意一种可选实施方式所提供的方法。
第八方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第一方面、第一方面任意一种可选实施方式及第二方面、第二方面任意一种可选实施方式所提供的方法。
第九方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被运行时,实现如第一方面、第一方面任意一种可选实施方式及第二方面、第二方面任意一种可选实施方式所提供的方法。
相较于现有技术,本申请通过外部设备与多计算机主机进行配对,根据外部设备所具有的未配对通道情况,自动切换未配对通道并对外发送对应的配对广播消息,根据计算机主机的响应反馈,逐个对未配对通道与对应计算机主机进行配对连接。本申请简化了外部设备与多计算机主机进行配对连接的操作,提高了用户的使用体验。
附图说明
为了更清楚地说明本申请现有技术或实施方式中的技术方案,下面将对现有技术或实施方式描述中所需要使用的附图作简单地介绍。显而易见地,下面附图中反映的仅仅是本申请中记载的一部分实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得本申请的其他实施方式,而所有这些实施方式都在本申请的保护范围之内。
图1为现有技术中外部设备配对多个计算机主机示意图。
图2为现有技术中外部设备配对流程示意图。
图3为本申请一实施方式中外部设备与计算机主机配对交互架构示意图。
图4为本申请一实施方式中外部设备配对方法流程图。
图5为本申请一实施方式中外部设备配对方法流程图。
图6为本申请一实施方式中计算机主机用户提示示意图。
图7为本申请一实施方式中计算机主机用户提示示意图。
图8为本申请一实施方式中计算机主机用户提示示意图。
图9为本申请一实施方式中外部设备与多个计算机主机配对交互流程图。
图10为本申请一实施方式中外部设备配对装置示意图。
图11为本申请一实施方式中外部设备配对装置示意图。
图12为本申请一实施方式中外部设备构成示意图。
图13为本申请一实施方式中计算机主机构成示意图。
具体实施方式
为使本申请的目的、技术方案和技术效果更加清楚,以下将结合附图所示的各实施方式对本申请进行详细的描述。但是,所描述的这些实施方式仅仅是本申请的一部分实施方式,而不是全部的实施方式,本领域普通技术人员在不付出创造性劳动的前提下,所获得的所有其他实施方式,都属于本申请的保护范围。
计算机系统可以简单地看成一套用于数字化信息处理的系统,其含义范畴可以不仅仅局限于传统的电脑,还包括多种其他具有独立信息处理的计算设备,例如行车电脑、机顶盒、机器人等。计算机系统大体上可以分为计算机主机和外部设备两部分,在计算机主机的一般概念中指的是除去输入设备、输出设备以外的主要机体部分,通常至少包括处理器和存储器等,但在本申请中会对计算机主机做相应的扩大解释,将本身就集成有特定输入设备、输出设备的主机设备也直接认定为计算机主机,比如笔记本电脑、一体机、平板电脑、手机等。外部设备,或叫外围设备,简称外设,是除主机外的大部分起输入或输出信息及数据的硬件设备,包括鼠标、键盘、手写笔等在内的输入设备及包括显示器、音箱、打印机等在内的输出设备。外部设备为计算机主机提供与外界交互的条件,是计算机主机不可缺少的辅助配件,通过外部设备与计算机主机进行有线或无线的连接,将两者进行配对,从而实现相应的输入或输出操作。
对于外部设备与计算机主机进行有线连接的配对,其接入计算机主机的过程即完成配对,但是对于无线连接的配对就相对比较复杂了,特别是一个外部设备需要与多个计算机主机进行配对的过程。如图2所示,传统配对方式中,外部设备每当与一个计算机主机进行配对时,都要先在外部设备点击切换键,然后再到对应计算机主机上操作发现的外部设备连接,进一步点击连接,这个过程由于存在严格的先后顺序,而且差一步都会导致配对失败,因此需要对外部设备及计算机主机的设置逻辑非常清楚才能特别顺畅地完成多个计算机主机的配对,显然用户体验非常不佳,本申请就是通过简化用户操作的过程,来提高外部设备与多主机的配对体验。
图3为本申请一实施方式中外部设备与计算机主机配对交互架构示意图。如图3所示,计算机主机与外部设备为两个相对独立的设备,两者之间通过通信来实现交互,以蓝牙鼠标与笔记本电脑为例,两者通过蓝牙通信来实现交互,相应的蓝牙鼠标包括多个可建立连接的蓝牙通道,支持与多个主机进行连接,通过切换可以使蓝牙鼠标在多个主机间进行控制,从而实现多主机配对的场景。对于计算机主机而言,计算机主机上的软件系统可以包括但不限于鸿蒙OS、Windows、MacOS、Android等,进一步实现模块可以包括设备发现UI(User Interface,用户界面)、靠近发现服务、蓝牙配对管理服务,其中靠近发现服务通过监听相应的配对广播消息来发现可连接的外部设备,比如蓝牙鼠标,设备发现UI负责将发现到的外部设备显示给用户,并可以与用户进行交互以获得用户授权配对的确认操作。对于外部设备而言,外部设备上的软件系统可以包括但不限于鸿蒙OS、Linux等,进一步实现模块可以包括模式管理服务、通道管理服务、蓝牙配对管理服务,其中模式管理服务可以管理外部设备的工作状态从 而触发开启相应的通道配对流程,通道管理服务负责对外部设备拥有的通信通道进行管理,具体可以包括管理未配对的空闲通道、确定准备配对的空闲通道、对外发送配对广播消息让外部的计算机主机发现自身。进一步,计算机主机的蓝牙配对管理服务与外部设备的蓝牙配对管理服务之间实现蓝牙配对,建立蓝牙连接。
以蓝牙鼠标与支持蓝牙连接的笔记本电脑进行配对的流程为例,首先步骤S301,蓝牙鼠标中的模式管理服务通知通道管理服务开启配对模式,即通道管理服务开启配对工作,通过步骤S302发送配对广播消息,其中包括对应蓝牙通道的mac1(Media Access Control Address,媒体存取控制位址,也称物理地址)地址。相应笔记本电脑中的靠近发现服务可以发现发送配对广播消息的蓝牙鼠标,并通过步骤S303将发现的结果发送给设备发现UI用以弹框提示用户配对,如果设备发现UI接收到用户的确认操作则进入步骤S304,将用户确定配对的指令发送给笔记本电脑的蓝牙配对管理服务,然后进入步骤S305,与蓝牙鼠标建立配对连接。如果配对成功后,蓝牙鼠标的蓝牙配对管理服务会将配对成功的信息通知给通道管理服务,即步骤S306。此时通道管理服务知道特定通道的配对已经完成,需要自动去确定是否还存在其他空闲通道,切换到其他空闲通道进行配对,即步骤S307,如果存在未配对通道,更新配对广播消息(比如配对广播消息中待配对蓝牙通道对应的物理地址更新为mac2),以达到与其他计算机主机进行配对的目的。
图4为本申请一实施方式中外部设备配对方法流程图。如图4所示,外部设备配对方法,具体地可以应用于外部设备,比如鼠标、键盘等,所述外部设备配对方法包括步骤S401、步骤S402及步骤S403,其中,
步骤S401、确定所述外部设备的第一空闲通道并发送所述第一空闲通道对应的第一配对广播消息。可选地,第一配对广播消息可以包括第一空闲通道对应的第一设备标识,比如是蓝牙通道的物理地址,第一配对广播还可以包括外部设备的名称、设备类型及广播类型、协议版本、业务类型、子产品ID、测距字段中的一种或多种。外部设备本身包括多个可以与计算机主机建立连接的通道,其中,已经与任意计算机主机建立连接的通道是占用通道,而没有跟任意计算机主机建立连接的通道就是空闲通道,可以利用空闲通道与需要与外部设备配对的计算机主机建立连接。具体地,外部设备在开始配对的时候,可以对自身具有的空闲通道进行盘点,确定一个空闲通道来满足配对需求,在一种情况下,空闲通道的确定顺序可以根据空闲通道的编号顺序依次确定,如果对应编号的通道已经匹配占用了,就顺延一个编号进行确定。在一个示例中,蓝牙鼠标中的蓝牙模组具有三个蓝牙通道,在开始配对时三个蓝牙通道都没有连接任意计算机主机,即存在三个空闲通道,分别是通道1、通道2、通道3,在开始执行配对时,先从通道1开始配对,将通道1确定为第一空闲通道。在更多的实施方式中,通道的编号可以是出厂设置的,也可以是根据使用情况或偏好设置来动态调整相应通道的编号。
在确定到第一空闲通道后,可以获取第一空闲通道对应的第一设备标识,在对外发送的第一配对广播消息中包含所述第一设备标识,以告诉外部的计算机主机第一配对广播是对应于第一空闲通道的,相应的计算机主机可以基于第一空闲通道与外部设备建立配对连接。在对蓝牙设备(如蓝牙鼠标、蓝牙键盘等)实现配对的实施方式中,设备标识可以是对应的蓝牙通道的物理地址,通过物理地址可以锁定对应的蓝牙通道建立连接。
步骤S402、接收第一计算机主机的确认消息并根据所述第一计算机主机的确认消息与所述第一计算机主机建立基于所述第一空闲通道的配对连接,所述第一计算机主机的确认消息响应于所述第一配对广播消息。当外部的计算机主机接收到步骤S401的第一配对广播消息时, 可以对配对广播消息中的第一设备标识进行识别,以确定是否与对应的第一空闲通道建立配对连接。相应地,计算机主机是否与对应的第一空闲通道建立配对连接可以是接收用户的确认操作,在用户确认与第一空闲通道建立配对连接时,响应第一配对广播消息,向对应的外部设备返回确认消息。以第一计算机主机响应第一配对广播消息为例,第一计算机主机会向外部设备发送确认消息,外部设备接收到第一计算机主机的确认消息后,知道第一计算机主机愿意通过第一空闲通道与自身建立配对连接,因此外部设备与第一计算机主机建立配对连接,这样外部设备配对建立完成后可以与第一计算机主机进行持续的交互,比如蓝牙鼠标控制第一计算机主机实现输入操作。
步骤S403、判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对。当步骤S402对第一空闲通道完成配对连接后,第一空闲通道则自动由空闲状态转换成占用状态,此时会进一步对其他空闲通道进行配对工作,即步骤S401、步骤S402并没有结束整个配对过程,如果判断外部设备还有其他空闲通道时,还要继续进行配对。具体地,确定所述外部设备的第二空闲通道并发送所述第二空闲通道对应的第二配对广播消息;接收第二计算机主机的确认消息并根据所述第二计算机主机的确认消息与所述第二计算机主机建立基于所述第二空闲通道的配对连接,所述第二计算机主机的确认消息响应于所述第二配对广播消息。需要说明的是,第一空闲通道和第二空闲通道并不具有绝对的区分关系,它们可以是蓝牙模组中的两个空闲的蓝牙通道,选取其中任意一个蓝牙通道作为第一空闲通道建立连接后,自动转向另一个蓝牙通道作为第二空闲通道建立连接。同样第二空闲通道也存在相应的第二设备标识,对于蓝牙设备而言,第二设备标识是对应蓝牙通道的物理地址,通过不同的设备标识来识别是第一空闲通道还是第二空闲通道。进一步,将第二空闲通道对应的第二配对广播消息发送出去,以告诉外部的计算机主机,对应的外部设备还存在第二空闲通道可以建立连接。第二计算机主机当接收到第二配对广播消息时,根据用户的确认操作响应第二配对广播消息返回确认消息,以与第二空闲通道建立连接。同理,第二配对广播消息中也可以包括外部设备的名称和/或设备类型等信息,所述外部设备的名称和/或设备类型用于在计算机主机提示用户进行授权配对时显示。
需要说明的是,第二计算机主机并不必然与第一计算机主机是不同的两个主机,比如在第一空闲通道配对时误操作或者切换到第二空闲通道后用户更愿意将特定主机与第二空闲通道建立连接时,此时建立连接的第一计算机主机同样可以接收到第二配对广播消息并对第二配对广播消息做出响应,此时第一计算机主机和第二计算机主机则是同一台主机。在一个示例中,平板电脑本来通过步骤S401、步骤402与蓝牙键盘的通道1建立了连接,蓝牙键盘可以通过通道1正常控制平板电脑,但是当蓝牙键盘自动切换到通道2进行配对时,此时平板电脑相应地还会提示用户存在通道2可以配对,用户此时想用通道2与蓝牙键盘建立连接,同样可以点击确认操作发送确认消息给蓝牙键盘,此时蓝牙键盘重新通过通道2与平板电脑建立连接。相应地,由于蓝牙键盘与平板电脑之间连接的通道由通道1变成通道2,此时通道1自动释放,即通道1由占用状态恢复为空闲状态,这样通道2建立配对后,还会通过步骤S403判断所述外部设备是否存在其他空闲通道过程,来重新对通道1与其他计算机主机进行配对。因此,上述示例可以很好地体现出本实施方式配对的灵活性,同时并不需要用户具体知道各个通道的占用情况,用户无需指定蓝牙通道,一键发起多主机配对,对用户的操作很友好。需要补充的是,外部设备的不同通道性能并不必然完全相同,比如有的只支持低速,有的可以支持高速,从而适应不同需求的场景,这种情况就特别容易发生上述示例中用户在配对过程中需要更改配对。进一步,为了辅助用户是否选择确认操作,还可以在提示用户进 行授权配对时,附加提示关于配对通道支持低速或支持高速等通道属性信息,此类信息可以是在配对广播消息中嵌入,通过提取配对广播消息来获取,可选地,还可以根据通道属性信息提示推荐配对的计算机主机类型,比如根据对应通道的历史配对情况提示推荐配对的计算机主机,相应地,历史配对情况也可以嵌入在配对广播消息中。在更多的实施方式中,通道与通道之间并不局限于都是蓝牙通道,也可以根据实际需求设置不同的无线通道。
通过步骤S401到步骤S403的自动循环配对,可以支持外部设备连续的空闲通道配对,从而可以自动地与多个计算机主机建立配对连接,减少人工操作的复杂度,提高用户体验。步骤S403的作用在于可以支持循环对空闲通道进行配对,当任意一个空闲通道完成配对连接建立后,就会触发检测是否存在未配对通道,即可以是对空闲通道的盘点,如果存在继续执行配对,包括发送配对广播消息,与响应的计算机主机建立配对连接,如果不存在,则停止配对,包括停止发送配对广播消息。需要说明的是,在上述支持两个通道配对的示例之外,本实施方式还可以循环配对三个以上的通道,比如支持与三个计算机主机进行同时连接的蓝牙鼠标等。如上所述,步骤S401到步骤S403实现了外部设备的多通道配对过程,进一步,为了提高配对触发的灵活性,会接收关于所述外部设备的配对触发输入以开始配对,配对触发输入可以是外部设备上实体按键的操作,通过实体按键的操作来产生配对触发输入,亦或者是外部设备更换电池重新上电等类似事件,通过上述事件的发生来自动产生配对触发输入。
在步骤S403中,具体地,在判断所述外部设备的通道都全部占用,即检测是否存在未配对通道时确定不存在,此时则会停止配对,即结束相应的循环,不再对外发送相应的配对广播消息。同时,为了减少配对流程中不必要的循环及等待,可选地,设置第一时间阈值,在发送配对广播消息后超过所述第一时间阈值未接收到计算机主机的确认消息时,停止配对。外部设备无论是针对第一空闲通道发送的第一配对广播消息,还是针对第二空闲通道发送的第二配对广播消息,只要相应的配对广播消息发送后超时无响应,即在第一时间阈值内无任意计算机主机反馈确认消息,则直接停止配对,相应地,则停止配对广播消息的继续发送。例如,蓝牙设备在存在未配对通道仍然发送配对广播消息进行配对时,由于蓝牙设备周边的计算机主机不具有配对需求或者存在响应故障,此时如果蓝牙设备还在不停地执行配对,对外发送配对广播消息,则会进入死循环,耗费蓝牙设备的电量,如果设置第一时间阈值(比如3分钟)的超时机制,就可以在超时的情况下跳出循环结束配对。
图5为本申请一实施方式中外部设备配对方法流程图。如图5所示,外部设备配对方法,具体地可以应用于计算机主机,比如笔记本电脑、平板电脑等,所述外部设备配对方法包括步骤S501、步骤S502及步骤S503,其中,
步骤S501、监听外部设备的第一配对广播消息,所述第一配对广播消息对应于所述外部设备的第一空闲通道。相对于外部设备的配对流程,计算机主机会监听外部设备发送出来的配对广播消息,以使计算机主机可以发现对应的外部设备。具体地,当外部设备发起对第一空闲通道的配对,会发送第一空闲通道对应的第一配对广播消息,当计算机主机监听到第一配对广播消息后,可以根据自身的需要确定是否与对应的外部设备建立基于第一空闲通道的配对连接。比如对于蓝牙设备的配对广播消息,可以包括对应蓝牙通道的物理地址用于确定可配对连接的通道。
步骤S502、根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对。在步骤S501中,计算机主机监听获取到第一配对广播消息,进一步会根据第一配对广播消息在计算机主机配设的屏幕上显示相应的提示,以询问用户是否与发送第一配对广播消息的外部设备建立配对连接,其中还包括建立配对连接的通道,接收用户的选择。如果在配对广播消 息中包括外部设备的名称、设备类型中的一种或多种,还可以在对应的计算机主机屏幕上显示具体外部设备的名称(比如外部设备的品牌名)和/或设备类型,用户可以一目了然地知道需要授权配对的外部设备具体是什么设备,为用户选择提供参考。
可选地,计算机主机在提示用户对所述第一空闲通道进行授权配对后,接收到用户对所述第一空闲通道的确认操作时,则由对应计算机主机响应于第一配对广播消息向对应外部设备发送确认消息,以使对应外部设备与对应计算机主机建立配对连接。如图6所示,以蓝牙鼠标为例,当笔记本电脑在监听到蓝牙鼠标的配对广播消息时,可以在图形界面上自动弹出一个对话框,其中提示相应的蓝牙鼠标信息,如上所述,蓝牙鼠标名称及设备类型可以通过配对广播消息中的外部设备名称及设备类型来确定。对话框中设置了一个确认按钮以接收用户的确认操作,用户点击确认按钮就表示愿意用此台笔记本电脑与蓝牙鼠标建立配对连接,相应地,笔记本电脑会向蓝牙鼠标发送确认消息以通知蓝牙鼠标建立配对连接,提示对话框也会关闭。但是如果用户不准备用此台笔记本电脑与蓝牙鼠标建立配对连接,则可以不做任何操作,相应的提示对话框会保持在屏幕上。如图7所示,对于笔记本电脑上弹出的对话框中,不仅包括确认按钮,还可以包括关闭按钮,用户如果不准备用此台笔记本电脑与蓝牙鼠标建立连接时,也可以通过点击关闭按钮来关闭提示对话框,相应地,结束对蓝牙鼠标发送的配对广播消息的处理,即不再针对同一蓝牙鼠标发出的配对广播消息弹出提示对话框,可以理解的是,由于本实施方式可以自动更新提示对话框的内容,如果不建立配对连接也可以不点击关闭按钮,即不做任何操作。可选地,会设置一个第二时间阈值,仅仅在点击关闭按钮后第二时间阈值内不响应同一蓝牙鼠标的配对广播消息,当点击关闭按钮后超过第二时间阈值,再次监听到蓝牙鼠标发送的配对广播消息时,仍然弹出提示对话框。可选地,点击关闭按钮虽然结束对蓝牙鼠标发送的配对广播消息的处理,但存在对应的计算机主机重启等事件发生,也能根据监听到的配对广播消息弹出提示对话框。需要说明的是,本实施方式并不以上述图6、图7中的蓝牙鼠标与笔记本电脑为限,可以应用在所有外部设备和计算机主机之间的配对。
步骤S503、监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对。对于外部设备而言,在发送第一配对广播消息建立配对连接后,还会根据其他空闲通道情况发送对应的配对广播消息,因此计算机主机也会继续监听是否存在外部设备发送的其他配对广播消息,从而来确定是否提示用户继续进行授权配对。在接收到其他配对广播消息时,比如第二配对广播消息,在一种情况下,计算机主机已经响应于第一配对广播消息建立配对连接,此时也可以在用户界面上弹出对话框提示用户进行授权配对,即根据所述第二配对广播消息提示用户进行授权配对,这样可以给用户更改配对连接提供操作界面,当然也可以根据设置在计算机主机已经完成配对连接时并不弹出提示对话框。在另一种情况下,计算机主机在接收到第一配对广播消息时并没有响应,比如外部设备发送第一配对广播消息时,用户在操作其他计算机主机进行配对,用户可以无需对第一配对广播消息弹出的对话框进行处理,对应计算机主机并没有接收到用户关于第一空闲通道的确认操作,当监听到其他配对广播消息时,可以对第一配对广播消息弹出的对话框内容进行更新,更新的内容是根据监听到的新配对广播消息来确定的。
因此,监听是否存在其他配对广播消息,以确定是否提示用户继续进行授权配对具体包括:监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;根据所述第二配对广播消息提示用户对所述第二空闲通道进行授权配对,或者根据所述第二配对广播消息更新提示用户的显示内容以提示用户对所述第二空闲通道进行 授权配对。进一步,还可以在接收到用户关于第二设备标识的确认操作时,响应于第二配对广播消息向对应外部设备发送确认消息,以使对应外部设备与对应计算机主机建立配对连接。
如上所述,计算机主机会不断地去监听外部设备的配对广播消息,当第一配对广播消息对应的通道完成配对建立时,第一配对广播消息就会停止,第二配对广播消息就会被计算机主机监听到,此时计算机主机需要根据第二配对广播消息的内容来更新提示的内容,以告诉用户现在是另一个通道的授权配对操作。如图8所示,在一个实施例中,在前的第一配对广播消息对应的提示对话框并没有关闭,当获取到第二配对广播消息时,提示对话框中内容会自动发生更新,提示是对通道2的连接确认,而这种更新是无需用户的操作介入的。在一种情况下,如果在前的提示对话框已经关闭,则是重新弹出新的对话框显示相应的配对提示信息。
为了减少用户操作计算机主机的复杂度,提供一种傻瓜式的体验,计算机主机会监听外部设备是否停止配对广播消息的发送,比如对应外部设备的所有通道都完成了配对连接,则会停止配对广播消息的发送。相应地,计算机主机可以设置第三时间阈值,在第三时间阈值内未收到外部设备的任何配对广播消息时,确定外部设备停止发送配对广播,计算机主机关闭提示用户的显示内容,相应地可以是自动地将显示的提示对话框关闭,用户无须做任何操作,用户看到相应的对话框自动关闭也可以判断相应的配对过程结束。
图9为本申请一实施方式中外部设备与多个计算机主机配对交互流程图。如图9所示,通过一个蓝牙设备与主机1、主机2建立配对连接的实施例,来对外部设备配对交互流程展开描述。蓝牙设备可以是蓝牙鼠标、蓝牙键盘等,主机1、主机2可以是笔记本电脑、平板电脑、台式机等。
在步骤S901中,用户对蓝牙设备开启配对模式,比如点击蓝牙设备上对应的配对按键,蓝牙设备开启配对模式,确定空闲的第一蓝牙通道(mac1),通过步骤S911发送配对广播消息,携带mac1的地址,蓝牙设备周边的主机1、主机2可以通过自身的靠近发现服务接收到配对广播消息,分别向各自的设备发现UI发送关于mac1的配对提示,即步骤S912,用户可以在主机1、主机2看到相应的配对提示。当用户选择主机1与蓝牙设备建立配对连接,执行步骤S913,向主机1输入确认操作,主机1接收到确认操作后进入步骤S914,与蓝牙设备建立配对连接,配对mac1。在步骤S915中,配对成功后,检测是否存在未配对通道,如果不存在未配对通道则会跳到步骤S931,如果存在未配对通道,则会进入步骤S921。确定空闲的第二蓝牙通道(mac2),通过步骤S921发送配对广播消息,携带mac2地址,蓝牙设备周边的主机1、主机2同样可以通过自身的靠近发现服务接收到配对广播消息,分别向各自的设备发现UI发送关于mac2的配对提示,即步骤S922。在步骤S923中,根据新的配对提示内容将主机1、主机2上显示的配对提示进行更新。可选地,由于主机1已经与蓝牙设备建立了配对连接,可以不处理携带mac2的配对广播消息及对应的配对提示。执行步骤S924,用户向主机2输入确认操作,相应地,主机2进入步骤S925与蓝牙设备配对mac2。当配对成功后,继续执行步骤S926,检测是否存在未配对通道,如果不存在未配对通道,进入步骤S931,蓝牙设备停止配对广播,结束配对。在步骤S932中,相应地,主机1、主机2可以监听到配对广播停止,进入步骤S933,关闭主机1、主机2上显示的提示框。
通过上述的交互,蓝牙设备每当配对完成对应蓝牙通道后,检测是否存在未配对通道,如果存在未配对通道,自动发起剩余通道的配对,而主机1、主机2会监听配对广播,根据配对广播消息中的内容自动更新配对提示的内容。如果不存在未配对通道,蓝牙设备停止配对,主机1、主机2监听到配对广播停止,自动关闭配对提示。用户在用蓝牙设备分别与主 机1、主机2进行配对时,只需要在蓝牙设备、主机1、主机2上分别操作一次,且操作都是在提示之下进行,大大提高了用户的体验。
图10为本申请一实施方式中外部设备配对装置示意图。如图10所示,外部设备配对装置1001包括广播单元1011、配对单元1012,其中,
广播单元1011,用于确定所述外部设备的第一空闲通道并发送所述第一空闲通道对应的第一配对广播消息;
配对单元1012,用于接收第一计算机主机的确认消息并根据所述第一计算机主机的确认消息与所述第一计算机主机建立基于所述第一空闲通道的配对连接,所述第一计算机主机的确认消息响应于所述第一配对广播消息;
广播单元1011还用于判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对。
可选地,广播单元1011判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对包括:
确定所述外部设备的第二空闲通道并发送所述第二空闲通道对应的第二配对广播消息;
接收第二计算机主机的确认消息并根据所述第二计算机主机的确认消息与所述第二计算机主机建立基于所述第二空闲通道的配对连接,所述第二计算机主机的确认消息响应于所述第二配对广播消息。
可选地,所述第一空闲通道、第二空闲通道是根据空闲通道的编号依次确定的。
可选地,所述外部设备配对装置还包括启动单元,所述启动单元用于接收关于所述外部设备的配对触发输入以开始配对。
可选地,所述配对触发输入是所述外部设备上实体按键的操作。
可选地,所述外部设备配对装置还包括关闭单元,所述关闭单元用于设置第一时间阈值,在发送配对广播消息后超过所述第一时间阈值未接收到计算机主机的确认消息时,停止配对;或者
判断所述外部设备的通道全部占用时,停止配对。
可选地,配对广播消息包括空闲通道对应的设备标识。
可选地,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
可选地,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在计算机主机提示用户进行授权配对时显示。
需要说明的是,进一步还可以参照图4所示的外部设备配对方法及可选实施方式的具体内容。
图11为本申请一实施方式中外部设备配对装置示意图。如图11所示,外部设备配对装置1101包括监听单元1111、提示单元1112,其中,
监听单元1111,用于监听外部设备的第一配对广播消息,所述第一配对广播消息对应于所述外部设备的第一空闲通道;
提示单元1112,用于根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对;
监听单元1111还用于监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对。
可选地,提示单元1112根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在接收到用户对所述第一空闲通道的确认操作时,向所述外部设备发送所述第一配对广播消息的确认消息,以与所述外部设备建立基于所述第一空闲通道的配对连接。
可选地,提示单元1112在接收到用户对所述第一空闲通道的确认操作时,关闭提示用户的显示内容。
可选地,监听单元1111监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
根据所述第二配对广播消息提示用户对所述第二空闲通道进行授权配对。
可选地,提示单元1112根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在未接收到用户对所述第一空闲通道的确认操作时,保持提示用户的显示内容;
监听单元1111监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
根据所述第二配对广播消息更新提示用户的显示内容以提示用户对所述第二空闲通道进行授权配对。
可选地,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在提示用户进行授权配对时显示。
可选地,提示单元1112提示用户进行授权配对时,根据对应通道的历史配对情况提示推荐配对的计算机主机。
可选地,提示单元1112根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
在接收到用户关闭提示的操作时,关闭提示用户的显示内容并结束对所述外部设备发送的配对广播消息的处理。
可选地,监听单元1111监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
在监听到外部设备停止配对广播消息的发送时,关闭提示用户的显示内容。
可选地,配对广播消息包括空闲通道对应的设备标识。
可选地,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
需要说明的是,进一步还可以参照图5所示的外部设备配对方法及可选实施方式的具体内容。
可选地,一种外部设备配对系统,至少包括图10所示的外部设备配对装置及图11所示的外部设备配对装置,具体还可以参照图4所示的外部设备配对方法及可选实施方式的具体内容、图5所示的外部设备配对方法及可选实施方式的具体内容。
图12为本申请一实施方式中外部设备构成示意图。如图12所示,外部设备1201可以为鼠标、键盘等,外部设备1201包括处理器1211、存储器1212,对于支持蓝牙配对的外部设备1201,外部设备1201还可以包括蓝牙模组。相应地,计算机程序存储在存储器1212上并可在处理器1211上运行,处理器1211执行所述计算机程序实现如图4所示的外部设备配对方法及可选实施方式提供的方法。具体地,参照图3,外部设备1201可以通过通道管理服务 确定空闲通道并发送配对广播,通过蓝牙配对管理服务建立配对连接。
图13为本申请一实施方式中计算机主机构成示意图。如图13所示,计算机主机1301可以为笔记本电脑、平板电脑等,计算机主机1301包括处理器1311、存储器1312,为了支持蓝牙配对的操作,计算机主机1301还可以包括显示器、蓝牙模组。相应地,计算机程序存储在存储器1312上并可在处理器1311上运行,处理器1311执行所述计算机程序实现如图5所示的外部设备配对方法及可选实施方式提供的方法。具体地,参照图3,计算机主机1301可以通过靠近发现服务发现可配对的外部设备,通过设备发现UI与用户交互实现授权配对,通过蓝牙配对管理服务建立配对连接。
可选地,一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如图4所示的外部设备配对方法及可选实施方式提供的方法、图5所示的外部设备配对方法及可选实施方式提供的方法。
可选地,一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被运行时,实现如图4所示的外部设备配对方法及可选实施方式提供的方法、图5所示的外部设备配对方法及可选实施方式提供的方法。
综上所述,本申请通过外部设备与多计算机主机进行配对,根据外部设备所具有的未配对通道情况,自动切换未配对通道并对外发送对应的配对广播消息,根据计算机主机的响应反馈,逐个对未配对通道与对应计算机主机进行配对连接。本申请简化了外部设备与多计算机主机进行配对连接的操作,提高了用户的使用体验。
在上述实施方式中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令,在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施方式所述的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
可以理解的是,结合本申请所公开的技术方案,可以直接体现为硬件、由控制单元执行的软件模块或二者组合,即一个或多个步骤和/或一个或多个步骤组合,既可以对应于计算机程序流程的各个软件模块,亦可以对应于各个硬件模块,例如ASIC(Application Specific Integrated Circuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或其他可编程逻辑器件、分立门或晶体逻辑器件、分立硬件组件或者其任意适当组合。为了描述的方便,描述上述装置时以功能分为各种模块分别描述,当然,在实施本申请时可以把各模块的功能在同一个或多个软件和/或硬件中实现。
可以理解的是,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示单独存在A、单独存在B、同时存在A和B。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,一般表示前后关联对象是一种“相除”的关系。
可以理解的是,各数字编号、各实施方式中所提到的“第一”、“第二”等仅仅是为了描 述的方便,并不代表结构或功能上的绝对区分关系,同时,在不同的实施方式中,可能使用相同的标号或标记,这些并不代表结构或功能上的绝对联系关系,不应用来限制本申请的实施方式范围。各步骤、过程编号的大小并不意味着执行顺序的先后,各步骤、过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施过程构成任何限定。
可以理解的是,尽管结合具体的特征及实施方式对本申请进行了描述,显而易见地,在不脱离本申请的精神和范围的情况下,可以对其进行各种修改和组合。相应地,本申请说明书和附图仅仅是所附权利要求书所界定本申请的示例性说明,且视为已覆盖本申请范围内的任意及所有修改、变化、组合或等同物。

Claims (21)

  1. 一种外部设备配对方法,其特征在于,应用于外部设备,所述外部设备配对方法包括如下步骤:
    确定所述外部设备的第一空闲通道并发送所述第一空闲通道对应的第一配对广播消息;
    接收第一计算机主机的确认消息并根据所述第一计算机主机的确认消息与所述第一计算机主机建立基于所述第一空闲通道的配对连接,所述第一计算机主机的确认消息响应于所述第一配对广播消息;
    判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对。
  2. 根据权利要求1所述的外部设备配对方法,其特征在于,所述判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对包括:
    确定所述外部设备的第二空闲通道并发送所述第二空闲通道对应的第二配对广播消息;
    接收第二计算机主机的确认消息并根据所述第二计算机主机的确认消息与所述第二计算机主机建立基于所述第二空闲通道的配对连接,所述第二计算机主机的确认消息响应于所述第二配对广播消息。
  3. 根据权利要求2所述的外部设备配对方法,其特征在于,所述第一空闲通道、第二空闲通道是根据空闲通道的编号依次确定的。
  4. 根据权利要求1-3中任一项所述的外部设备配对方法,其特征在于,接收关于所述外部设备的配对触发输入以开始配对。
  5. 根据权利要求4所述的外部设备配对方法,其特征在于,所述配对触发输入是所述外部设备上实体按键的操作。
  6. 根据权利要求1-5中任一项所述的外部设备配对方法,其特征在于,设置第一时间阈值,在发送配对广播消息后超过所述第一时间阈值未接收到计算机主机的确认消息时,停止配对;或者
    判断所述外部设备的通道全部占用时,停止配对。
  7. 根据权利要求1-6中任一项所述的外部设备配对方法,其特征在于,配对广播消息包括空闲通道对应的蓝牙物理地址,所述空闲通道为蓝牙通道。
  8. 一种外部设备配对方法,其特征在于,应用于计算机主机,所述外部设备配对方法包括如下步骤:
    监听外部设备的第一配对广播消息,所述第一配对广播消息对应于所述外部设备的第一空闲通道;
    根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对;
    监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对。
  9. 根据权利要求8所述的外部设备配对方法,其特征在于,所述根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
    在接收到用户对所述第一空闲通道的确认操作时,向所述外部设备发送所述第一配对广播消息的确认消息,以与所述外部设备建立基于所述第一空闲通道的配对连接。
  10. 根据权利要求9所述的外部设备配对方法,其特征在于,在接收到用户对所述第一空闲通道的确认操作时,关闭提示用户的显示内容。
  11. 根据权利要求9-10中任一项所述的外部设备配对方法,其特征在于,所述监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
    监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
    根据所述第二配对广播消息提示用户对所述第二空闲通道进行授权配对。
  12. 根据权利要求8-11中任一项所述的外部设备配对方法,其特征在于,所述根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
    在未接收到用户对所述第一空闲通道的确认操作时,保持提示用户的显示内容;
    所述监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
    监听所述外部设备的第二配对广播消息,所述第二配对广播消息对应于所述外部设备的第二空闲通道;
    根据所述第二配对广播消息更新提示用户的显示内容以提示用户对所述第二空闲通道进行授权配对。
  13. 根据权利要求8-12中任一项所述的外部设备配对方法,其特征在于,配对广播消息包括外部设备的名称和/或设备类型,所述外部设备的名称和/或设备类型用于在提示用户进行授权配对时显示。
  14. 根据权利要求8-13中任一项所述的外部设备配对方法,其特征在于,所述根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对之后,还包括:
    在接收到用户关闭提示的操作时,关闭提示用户的显示内容并结束对所述外部设备发送的配对广播消息的处理。
  15. 根据权利要求8-14中任一项所述的外部设备配对方法,其特征在于,所述监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对包括:
    在监听到外部设备停止配对广播消息的发送时,关闭提示用户的显示内容。
  16. 一种外部设备配对装置,其特征在于,包括:
    广播单元,用于确定所述外部设备的第一空闲通道并发送所述第一空闲通道对应的第一配对广播消息;
    配对单元,用于接收第一计算机主机的确认消息并根据所述第一计算机主机的确认消息与所述第一计算机主机建立基于所述第一空闲通道的配对连接,所述第一计算机主机的确认消息响应于所述第一配对广播消息;
    所述广播单元还用于判断所述外部设备是否存在其他空闲通道,以确定是否继续进行配对。
  17. 一种外部设备配对装置,其特征在于,包括:
    监听单元,用于监听外部设备的第一配对广播消息,所述第一配对广播消息对应于所述外部设备的第一空闲通道;
    提示单元,用于根据所述第一配对广播消息提示用户对所述第一空闲通道进行授权配对;
    所述监听单元还用于监听是否存在其他配对广播消息,以确定是否继续提示用户进行授权配对。
  18. 一种外部设备配对系统,其特征在于,包括如权利要求16所述的外部设备配对装置及如权利要求17所述的外部设备配对装置。
  19. 一种外部设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-7中任一项所述的方法。
  20. 一种计算机主机,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器 上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求8-15中任一项所述的方法。
  21. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被运行时,实现如权利要求1-7及8-15中任一项所述的方法。
PCT/CN2023/074710 2022-02-25 2023-02-07 外部设备配对方法、装置、设备及存储介质 WO2023160372A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210178884.4 2022-02-25
CN202210178884 2022-02-25
CN202210312318.8A CN116700800A (zh) 2022-02-25 2022-03-28 外部设备配对方法、装置、设备及存储介质
CN202210312318.8 2022-03-28

Publications (1)

Publication Number Publication Date
WO2023160372A1 true WO2023160372A1 (zh) 2023-08-31

Family

ID=87764809

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/074710 WO2023160372A1 (zh) 2022-02-25 2023-02-07 外部设备配对方法、装置、设备及存储介质

Country Status (1)

Country Link
WO (1) WO2023160372A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108668266A (zh) * 2018-04-19 2018-10-16 浙江东胜物联技术有限公司 一种一配二蓝牙遥控器
CN109076322A (zh) * 2017-06-27 2018-12-21 深圳市大疆创新科技有限公司 无线设备的配对方法和装置以及计算设备
CN109803168A (zh) * 2019-01-07 2019-05-24 Oppo广东移动通信有限公司 分体式设备的控制方法和装置
US20210328687A1 (en) * 2018-12-14 2021-10-21 Google Llc Audio Pairing Between Electronic Devices
CN114071439A (zh) * 2021-11-15 2022-02-18 宁波奥克斯电气股份有限公司 蓝牙遥控器与多设备配对的方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109076322A (zh) * 2017-06-27 2018-12-21 深圳市大疆创新科技有限公司 无线设备的配对方法和装置以及计算设备
CN108668266A (zh) * 2018-04-19 2018-10-16 浙江东胜物联技术有限公司 一种一配二蓝牙遥控器
US20210328687A1 (en) * 2018-12-14 2021-10-21 Google Llc Audio Pairing Between Electronic Devices
CN109803168A (zh) * 2019-01-07 2019-05-24 Oppo广东移动通信有限公司 分体式设备的控制方法和装置
CN114071439A (zh) * 2021-11-15 2022-02-18 宁波奥克斯电气股份有限公司 蓝牙遥控器与多设备配对的方法、装置、设备及存储介质

Similar Documents

Publication Publication Date Title
WO2021004489A1 (zh) 显示控制方法及装置
US8346985B2 (en) Receiver configured to pair to multiple wireless devices
US8656067B2 (en) Peripheral device identification for pairing
JP5100854B2 (ja) 通信装置、及び通信方法
US11243595B2 (en) Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker
US8966138B2 (en) Communication between a host device and an accessory using multiple-endpoint identification
CN110168942A (zh) 选择蓝牙设备的方法、终端和系统
EP3869346B1 (en) Apparatus and method of recognizing external device in a communication system
EP2918080B1 (en) Method, device, computer-readable medium and system for sharing an output device between multimedia devices to transmit and receive data
US10582636B2 (en) Server having a dual-mode serial bus port enabling selective access to a baseboard management controller
WO2020134566A1 (zh) 移动终端的Doze模式的控制方法、存储介质及移动终端
WO2023103599A1 (zh) 投屏方法、装置、存储介质及电子设备
WO2023160372A1 (zh) 外部设备配对方法、装置、设备及存储介质
WO2016019695A1 (zh) 语音互动的方法及终端
KR20120030158A (ko) 레거시와 입출력 모듈의 원격 제어 센서들을 이용하여 서비스 호출들을 지원하는 장치, 시스템 및 방법
US20240114281A1 (en) A method for selecting a response, an earphone base, a method of selecting a wireless earphone, a device and a medium
CN116700800A (zh) 外部设备配对方法、装置、设备及存储介质
US11822500B2 (en) Messages based on input/output device signals to virtual computers
EP3750054B1 (en) Signals to i/o devices based on virtual computer messages
WO2019015089A1 (zh) 一种全局菜单的控制方法、装置、设备和存储介质
US11818785B2 (en) Reestablishment control for dropped calls
WO2024051336A1 (zh) 内容协同方法、装置、系统、存储介质及电子设备
US20240073210A1 (en) Control method and device and electronic device
WO2020220969A1 (zh) 智能交互设备及其控制方法
CN117676236A (zh) 一种无线传屏连接方法、无线传屏器及存储介质

Legal Events

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

Ref document number: 23758997

Country of ref document: EP

Kind code of ref document: A1