WO2023207817A1 - Host connection method, apparatus and system, device, and storage medium - Google Patents
Host connection method, apparatus and system, device, and storage medium Download PDFInfo
- Publication number
- WO2023207817A1 WO2023207817A1 PCT/CN2023/089972 CN2023089972W WO2023207817A1 WO 2023207817 A1 WO2023207817 A1 WO 2023207817A1 CN 2023089972 W CN2023089972 W CN 2023089972W WO 2023207817 A1 WO2023207817 A1 WO 2023207817A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- host
- accessory
- network information
- connection
- devices
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 96
- 230000005540 biological transmission Effects 0.000 claims description 50
- 238000004590 computer program Methods 0.000 claims description 23
- 238000013475 authorization Methods 0.000 claims description 20
- 238000004891 communication Methods 0.000 claims description 9
- 230000006855 networking Effects 0.000 abstract description 21
- 241000699666 Mus <mouse, genus> Species 0.000 description 47
- 238000010586 diagram Methods 0.000 description 21
- 238000007726 management method Methods 0.000 description 18
- 230000003993 interaction Effects 0.000 description 12
- 230000008569 process Effects 0.000 description 12
- 230000001960 triggered effect Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 238000012546 transfer Methods 0.000 description 5
- 241000699670 Mus sp. Species 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000009365 direct transmission Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/50—Secure pairing of devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W8/00—Network data management
- H04W8/005—Discovery of network devices, e.g. terminals
Definitions
- the present application relates to the field of terminal technology, and in particular to a host connection method, device, system, equipment and storage medium.
- Electronic devices can be roughly divided into two categories: host devices and accessory devices.
- Host devices generally refer to computing devices with independent information processing. They are usually equipped with screens and have multiple communication capabilities such as WiFi, Bluetooth, and mobile networks, such as mobile phones and tablets. Computers, laptops, desktops, etc.
- Accessory devices generally refer to hardware devices that function as input or output or provide extended functions for the host device. They usually have no screen or a small screen.
- the supported communication capabilities are mainly limited to low-power Bluetooth, such as mice, keyboards, and speakers. , smart watches, smart schoolbags, etc.
- accessory devices can generally support connection to multiple host devices through wireless communication such as Bluetooth.
- the mouse 101 can be connected to the laptop 111, desktop 112, and tablet 113 at the same time.
- the desktop computer 112 and the tablet computer 113 establish a connection to realize cross-device operation.
- the connection between the laptop 111, the desktop 112, and the tablet 113 requires manual settings one by one, and sometimes manual mutual authentication is required. Especially when dealing with temporary connection requirements in specific scenarios, the user experience is poor. .
- the present application provides a host connection method, device, system, equipment and storage medium to solve the technical problems in the prior art of complicated interconnection between host devices and poor user experience.
- the first aspect provides a host connection method, including the following steps:
- the first accessory manages at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;
- the first accessory sends the first network information to at least a second host connected to the first accessory, and the first network information is used for the second host to establish a connection with the first host.
- this embodiment provides network information of other host devices to the host device connected to the accessory device itself through a networking combination formed by the accessory device connecting to the host device, thereby assisting in automatic direct connection between host devices.
- the method includes:
- the first accessory manages second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host;
- the first accessory sends the second network information to the first host, and the second network information is used by the first host to agree to the first connection initiated by the second host.
- the accessory device provides consistent direct connection information to the first host and the second host respectively, so as to realize mutual authentication of direct connections between the host devices.
- the first network information is the first accessory based on the The host's connection acquisition includes:
- the first accessory obtains the first network information.
- the host device can decide whether to establish a connection with other host devices according to its own needs, thereby improving the controllability of direct connection of the host device.
- the first accessory sending the first network information to at least a second host connected to the first accessory includes:
- the first accessory sends the first network information to the second host.
- the accessory device can decide whether to send the network information of other host devices to the corresponding host device according to the user authorization of the host device.
- the method includes:
- the first accessory When the first accessory triggers data transmission between the first host and the second host, the first accessory triggers the establishment of a connection between the first host and the second host.
- this embodiment triggers a direct connection between the host devices when responding to the cross-host device operation of the accessory device, thereby reducing unnecessary connection consumption between the host devices.
- the method includes:
- the first accessory triggers the transmission of data between the first host and the second host and the type of transmitted data meets the set type
- the first accessory triggers the establishment of a connection between the first host and the second host.
- this embodiment determines whether to trigger a direct connection between host devices based on the type of data to be transmitted. If the data does not meet the set type, the data can be transmitted through the connection channel of the accessory device itself.
- the method includes:
- the first accessory When the first accessory triggers the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold, the first accessory triggers the establishment of a connection between the first host and the second host. .
- this embodiment determines whether to trigger a direct connection between host devices based on the amount of data to be transmitted. When the amount of data is less than the first threshold, transmission can be performed through the connection channel of the accessory device itself.
- the method includes:
- the first accessory manages the third network information of the third host owned by the first host, and the third network information is obtained by the first accessory based on the connection with the first host;
- the first accessory sends the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
- the accessory device in addition to obtaining the first network information of the first host, the accessory device also obtains the third network information obtained based on the connection between the first host and other accessory devices, thereby increasing the scope of network information acquisition.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- this embodiment provides network parameters for direct connection between host devices, and different direct connection methods can also be selected according to actual needs.
- the second aspect provides a host connection method, including the following steps:
- the first host receives the second network information of the second host sent by the first accessory.
- the first host is connected to the first accessory.
- the second network information is the first accessory based on the communication with the second host. The connection obtained;
- the first host establishes a connection with the second host according to the second network information.
- the host device receives network information of other host devices connected to the accessory device through the accessory device, thereby meeting the connection requirements between the host device and other host devices.
- the method includes:
- the first host sends the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
- this embodiment allows other host devices connected to the accessory device to know the network information of the host device and establish a connection with the host device.
- the first host sending the first network information of the first host to the first accessory includes:
- the first host When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
- the host device can determine whether to directly connect to other host devices connected to the accessory device based on user authorization, thereby improving the controllability of the direct connection of the host device.
- the first host establishing a connection with the second host according to the second network information includes:
- the first host When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
- the first host agrees to the first connection and establishes a connection with the second host.
- the first host establishing a connection with the second host according to the second network information includes:
- the first host initiates a second connection to the second host according to the second network information.
- the first host initiates the second connection to establish a connection with the second host.
- the method includes:
- the first host receives the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is the second accessory based on the connection with the third accessory. Obtained from the connection of three hosts;
- the first host establishes a connection with the third host according to the third network information.
- this embodiment can integrate the networking combination of multiple accessory devices to provide the host device with more network information of other host devices, thereby realizing direct connection between host devices.
- the method includes:
- the first host sends the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
- this embodiment allows more host devices to know the first network information of the first host and establish connections with the first host.
- the method includes:
- the first host sends the third network information to the first accessory, so that at least a second host connected to the first accessory obtains the third network information.
- the host device sends the network information obtained from all connected accessory devices to the specific accessory device, thereby increasing the range of host device network information possessed by the accessory device.
- the first host establishing a connection with the second host according to the second network information includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive data from the second host When transmitting data, the first host establishes a connection with the second host.
- this embodiment triggers a direct connection between the host devices when responding to the cross-host device operation of the accessory device, thereby reducing unnecessary connection consumption between the host devices.
- the first host establishing a connection with the second host according to the second network information includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
- this embodiment determines whether to trigger a direct connection between host devices based on the type of data to be transmitted. If the data does not meet the set type, the data can be transmitted through the connection channel of the accessory device itself.
- the first host establishing a connection with the second host according to the second network information includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, the first host and The second host establishes a connection.
- this embodiment determines whether to trigger a direct connection between host devices based on the amount of data to be transmitted. When the amount of data is less than the first threshold, transmission can be performed through the connection channel of the accessory device itself.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- this embodiment provides network parameters for direct connection between host devices, and different direct connection methods can also be selected according to actual needs.
- the method includes:
- the first host determines that the second host is a connectable host device of the first host.
- this embodiment implements automatic direct connection steps based on the determined connectable host devices to improve manageability.
- a host connection device including:
- a storage unit configured for the first accessory to manage at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;
- a distribution unit configured for the first accessory to send the first network information to at least a second host connected to the first accessory, where the first network information is used between the second host and the first host. establish connection.
- the device includes:
- the storage unit is used by the first accessory to manage the second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host;
- the distribution unit is used for the first accessory to send the second network information to the first host, and the second network information is used for the first host to agree to the first connection initiated by the second host.
- the storage unit includes:
- the first accessory obtains the first network information.
- the distribution unit includes:
- the first accessory sends the first network information to the second host.
- the device includes a triggering unit
- the triggering unit is used when the first accessory triggers data transmission between the first host and the second host, and the first accessory triggers the establishment of a connection between the first host and the second host.
- the device includes a triggering unit
- the triggering unit is used for the first accessory to trigger the transmission of data between the first host and the second host and the type of transmitted data meets the set type.
- the first accessory triggers the first host and the second host.
- a connection is established between hosts.
- the device includes a triggering unit
- the triggering unit is used for the first accessory to trigger the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold.
- the first accessory triggers the first host and the second host to transmit data.
- a connection is established between the two hosts.
- the device includes:
- the storage unit is used by the first accessory to manage the third network information of the third host owned by the first host.
- the third network information is obtained by the first accessory based on the connection with the first host. of;
- the distribution unit is used for the first accessory to send the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- a host connection device including:
- a receiving unit configured for the first host to receive the second network information of the second host sent by the first accessory, the first host is connected to the first accessory, and the second network information is the first accessory based on the The connection of the second host is obtained;
- a connection unit configured for the first host to establish a connection with the second host according to the second network information.
- the device includes a sending unit
- the sending unit is configured for the first host to send the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
- the sending unit includes:
- the first host When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
- connection unit includes:
- the first host When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
- connection unit includes:
- the first host initiates a second connection to the second host according to the second network information.
- the device includes:
- the receiving unit is used for the first host to receive the third network information of the third host sent by the second accessory.
- the first host is connected to the second accessory, and the third network information is the second accessory.
- the accessories are obtained based on the connection with the third host;
- connection unit is used for the first host to establish a connection with the third host according to the third network information.
- the device includes:
- the sending unit is configured for the first host to send the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
- the device includes:
- the sending unit is used for the first host to send the third network information to the first accessory, so that the connecting At least a second host of the first accessory obtains the third network information.
- connection unit includes:
- the first host When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host, the first host establishes a connection with the second host.
- connection unit includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
- connection unit includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, the first host and The second host establishes a connection.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- the receiving unit includes:
- the first host determines that the second host is a connectable host device of the first host.
- a host connection system including a host connection device as provided in any one of the third aspect and any optional implementation manner of the third aspect, and a host connection device as provided in any one of the fourth aspect and any optional implementation manner of the fourth aspect. Supplied host connection device.
- a sixth aspect provides an accessory device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
- the processor executes the computer program, the first aspect and the first aspect are implemented.
- the method provided by any optional implementation.
- a host device including a memory, a processor, and a computer program stored in the memory and executable on the processor.
- the processor executes the computer program, the second aspect and the second aspect are implemented.
- the method provided by any optional implementation.
- An eighth aspect provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the first aspect, any one of the optional implementations of the first aspect, and the second aspect, or any one of the second aspects. method provided by an optional implementation.
- 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 or the first aspect is implemented.
- method and the second aspect and the method provided by any optional implementation of the second aspect is implemented.
- this application is based on the application consistency of the accessory device and the host device connected to the accessory device in the scenario, and forms a networking combination with the host device connected to the accessory device itself, and provides a network combination for the host device connected to the accessory device. Network information of other host devices in the network combination, so that connections can be established between host devices. This application simplifies the operation process of connection between host devices and improves the user experience.
- Figure 1 is a schematic diagram of establishing connections between an accessory device and multiple host devices in the prior art.
- FIG. 2 is a schematic diagram of the host connection architecture in some examples of this application.
- Figure 3 is a schematic diagram of the interaction architecture between the host device and the accessory device in some examples of this application.
- Figure 4 is a flow chart of a host connection method in some examples of this application.
- Figure 5 is a flow chart of a host connection method in some examples of this application.
- Figure 6 is a schematic diagram of the host direct connection configuration interface in some examples of this application.
- Figure 7 is a schematic diagram of the interaction process for direct connection establishment of host devices in some examples of this application.
- Figure 8 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
- Figure 9 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
- Figure 10 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
- Figure 11 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
- Figure 12 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
- Figure 13 is a schematic diagram of mouse cross-device operation scenarios in some examples of this application.
- Figure 14 is a schematic diagram of a host connection device in some examples of this application.
- Figure 15 is a schematic diagram of a host connection device in some examples of this application.
- Figure 16 is a schematic diagram of accessory equipment in some examples of this application.
- Figure 17 is a schematic diagram of a host device in some examples of this application.
- the mouse 101 can be connected to the notebook computer 111, the all-in-one computer 112, and the tablet computer 113 at the same time.
- one mouse can uniformly manage the cursor movement, clicking and other operations of the three host devices, thus There is no need to equip each host device with an additional mouse, which greatly improves collaboration.
- the mouse 201 when the mouse 201 is connected to the notebook computer 211, the all-in-one machine 212, and the tablet computer 213 at the same time, the mouse 201 can also control the cursor on the notebook computer 211, the all-in-one machine 212, and the tablet computer 213. Seamless switching between .
- the mouse 201 can also move and paste the selected files between host devices by dragging the cursor, such as dragging files from the laptop 211 to the all-in-one machine 212, without the support of cloud service synchronization.
- the implementation principle is that when a file in the graphical interface of the laptop 211 is dragged to the edge of the screen by the cursor controlled by the mouse, the dragged file is triggered to be transferred to the mouse 201 in the background, and then the file is transferred to the all-in-one machine 212 through the mouse 201 , corresponding files are displayed on the graphical interface of the all-in-one machine 212.
- the disadvantage of the above solution is that the connection between the accessory device and the host device is usually realized through low-speed communication protocols such as Bluetooth. The communication between the host device is relayed through the accessory device, which is very limited by the communication capabilities of the accessory device. For copying When pasting files with large amounts of data, this use Accessory devices are very slow to transfer and transfer, and the operating experience is not very smooth.
- a direct connection channel can be established between the host device and the host device, and the transmission can be performed through the direct connection channel.
- a direct connection channel is established between the host device and the host device, and the transmission is performed through the direct connection channel.
- the files originally transferred through the accessory device are directly transferred in the direct connection channel established between the host devices.
- the direct connection method is to establish a direct connection channel between the notebook computer 211 and the all-in-one machine 212, as shown by the channel indicated by the dotted line. interact directly with each other.
- the direct connection method established between host devices can be WiFi P2P (Peer-to-Peer, point-to-point), Bluetooth connection, LAN connection, etc.
- the network information required to establish a direct connection can be obtained through the connected accessory device, which will be detailed below .
- FIG 3 is a schematic diagram of the interaction architecture between the host device and the accessory device in some examples of this application.
- the host device can obtain the network information of other host devices connected to the accessory device, and then establish a connection with the corresponding host device based on the network information provided by the accessory device.
- the Bluetooth connection established between the host device and the accessory device is established through the accessory management service 310 on the host side and the accessory management service 330 on the accessory end.
- the collaborative networking service 320 and the accessory on the host end will be launched respectively.
- Collaborative networking service 340 works on the end.
- the collaborative networking service 320 is used to manage the connection of the host device and send local network information to the collaborative networking service 340, specifically including a port broadcast module 321, an active connection module 322, and a connected accessory management module 323. , host information management module 324.
- the port broadcast module 321 is used to open a port to monitor the host device with which it initiates a connection, and sends a broadcast so that the local machine can be discovered by external host devices and can establish a connection.
- the connected accessory management module 323 is used to manage accessory devices connected thereto, such as mice, keyboards, etc., and obtain network information of the host device connected to the accessory device by interacting with the connected accessory device.
- the host information management module 324 is used to manage connected host devices and connectable host devices.
- the connectable host devices are determined according to the networking combination provided by the connected accessory device.
- the networking combination may include those managed by the corresponding accessory device. All host devices and corresponding network information, such as host devices based on connections to corresponding accessory devices. Accordingly, the host device connected to the accessory device is compared with the host device connected to the machine to generate a list of connectable host devices.
- the active connection module 322 is configured to proactively directly connect to the host devices in the list according to the list of connectable host devices provided by the host information management module 324 to further realize corresponding information interaction.
- the collaborative networking service 340 is responsible for managing all connected host devices after the accessory device establishes a Bluetooth connection with the host device, and sending accessory connected host network information to the collaborative networking service 320.
- the collaborative networking service 340 It mainly includes a connected host network information management module 341.
- the connected host network information management module 341 obtains network information sent by the host device based on the connection with the host device.
- the network information is used to establish a directly connected network with the host device.
- Parameter information optionally, network information includes IP address and port number, WiFi MAC (Media Access Control Address) address, Bluetooth MAC address, etc.
- the connected host network information management module 341 saves the above network information, and when other host devices are connected to itself, it can also transmit the saved network information to the corresponding host device.
- FIG 4 is a flow chart of a host connection method in some examples of this application. As shown in Figure 4, the host connection method can be specifically applied to accessory devices, such as Bluetooth mice, Bluetooth keyboards, etc.
- the host connection method includes steps S401 and S402, wherein,
- Step S401 The first accessory manages at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host.
- the first accessory includes a storage unit that stores network information of the host device. Between the first accessory and any host device After the connection is made, for example, the first host will receive the first network information sent by the first host to establish a connection with the first host, and the first accessory will save the first network information in the storage unit for other host devices. Sent to the corresponding host device when connecting.
- the first network information may include one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address, so that different direct connection methods can be selected according to different situations, such as realizing LAN connection through IP address and port number. , realize WiFi direct connection through WiFi MAC address, realize Bluetooth connection through Bluetooth MAC address, etc.
- the network information may include network information of different direct connection methods at the same time, set the priorities of different direct connection methods, and use the corresponding direct connection method preferentially according to different situations.
- the first accessory also manages third network information of a third host owned by the first host, and the third network information is obtained by the first accessory based on the connection with the first host. .
- the first host in actual application scenarios, it is not only connected to the first accessory, but also may be connected to the second accessory, and the second accessory is not only connected to the first host, but may also be connected to other host devices.
- the third host the third host.
- the network information of other host devices possessed by the first host can be derived from the network information of the connected host device provided by the first accessory, or can also be derived from the network information of the connected host device provided by the second accessory. Therefore, the first accessory can be obtained through the first host.
- the second accessory is connected to the third network information of the third host, thereby increasing the range of networking combinations.
- the relevant configuration information of the mouse can be viewed through the laptop, such as the name and device type of the mouse, etc. Furthermore, you can also configure the mouse accordingly.
- the connected mouse configuration interface can be called up on the screen of the laptop to at least configure whether the laptop allows mouse-based direct connection to the host, that is, whether the laptop can Actively initiate connections with other host devices connected to the mouse, or agree to connections initiated by other host devices connected with the mouse.
- network information can be exchanged between the host device and the accessory device, that is, whether the host device can send messages to the accessory.
- the device sends its own network information, or the accessory device can send the network information of other host devices to the host device.
- the user configuration allows it, the user authorization is obtained.
- the laptop will send its own network information to the mouse.
- Other host devices connected to the mouse can also provide it through the mouse. network information to establish a connection with the laptop.
- the user configuration is rejected, that is, user authorization has not been obtained. Even if the laptop is connected to the mouse, it will not actively send its own network information to the mouse.
- the host device can synchronize the received user authorization to the corresponding accessory device, so that the accessory device can determine whether network information can be exchanged with the corresponding host device.
- the accessory device can also determine whether the corresponding host device can Send the network information of the host device to the accessory device itself to determine whether the corresponding host device has obtained user authorization.
- the above configuration interface automatically pops up on the screen of the host device for the user to configure direct connection options.
- the host device is allowed or denied direct connection based on the accessory device. That is, when the host device is connected to the accessory device, the host device is triggered to automatically send network information to the accessory device, or network information is not sent to the corresponding accessory device. There is no direct connection.
- users can call the corresponding configuration interface to change settings according to actual needs.
- Step S402 The first accessory sends the first network information to at least a second host connected to the first accessory.
- the first network information is used for the second host to establish a connection with the first host. .
- the first accessory has at least first network information.
- the first accessory can distribute the first network information to any connected host device.
- the first host is connected to the first accessory, and the first accessory can also Return the first network information to the first host.
- the An accessory sends the first network information to the second host.
- the second host may also establish a connection with the first accessory before the first accessory obtains the first network information.
- the first accessory may update and send the second accessory to the second host based on the connected host device information. 1.
- the second host can establish a connection with the first host based on the first network information.
- the second host when the second host receives the first network information, it does not necessarily establish a connection with the first host immediately. It can call the corresponding network information to establish a connection with the corresponding host device when the corresponding trigger condition is met.
- the first accessory can trigger the first host to transmit data to the second host or trigger the second host to transmit data to the first host through control. If there is a data transmission requirement between the host devices, the data to be transmitted can be transmitted first. to the accessory device, and then forwarded by the accessory device to the corresponding host device.
- the second host in order to reduce the limitation on the transmission efficiency of the accessory device, when the first accessory is triggered, the second host can establish a connection with the first host based on the first network information provided by the first accessory.
- the second host can directly connect to the first host through the first accessory.
- a direct connection channel between one host and a second host carries out data transmission.
- the direct connection channel between the first host and the second host can also be closed.
- the set type is, for example, a data type with a generally large amount of data, or In a specific scenario, a more appropriate data type is directly transmitted between host devices.
- the first accessory triggers the establishment of a connection between the first host and the second host.
- the first accessory triggers the establishment of a connection between the first host and the second host. Data transmission between the host and the second host still transmits data through the first accessory. Optionally, no connection is established between the first host and the second host.
- the first threshold is used to determine the size of the data amount
- the third An accessory triggers the establishment of a connection between the first host and the second host.
- the data transmission between the first host and the second host still transmits data through the first accessory.
- no connection is established between the first host and the second host.
- the connection between host devices may require certain authentication requirements.
- the first host may choose to agree to the initiated connection, complete the connection with it, or reject the initiated connection. , connection failure, this can improve the security of the connection between host devices and reduce other illegal connection requests.
- the first accessory manages second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host; the first accessory manages the second network information of the second host.
- the accessory sends the second network information to the first host, where the second network information is used by the first host to agree to the first connection initiated by the second host. After the first accessory obtains the second network information, the peer will send the second network information to the first host.
- the first host can also establish a connection with the second host based on the second network information. More importantly, when the second accessory When the second host initiates a first connection to the first host, the first host can determine the second host that meets the authority based on the second network information, thereby agreeing to the first connection initiated by the second host. Optionally, when another host device initiates a first connection to the first host and the network information of the corresponding host device is not consistent with the second network information, the corresponding first connection is rejected. It should be noted that since the first host and the second host are both connected to the first accessory and are in the networking combination of the first accessory, it can be determined based on the networking combination of the first accessory and the first host. The second host has the authority to legally initiate connections.
- the first host and the second host in the networking combination must also exclude host devices with illegal connections.
- the connection between the first accessory and the first host and the connection between the first accessory and the second host will be established only when the authentication is successful.
- the connection logic based on the accessory device makes the host devices in the entire network combination within the same permission range. This is completely different from the permission management based on the same account. , effectively utilizing the implicit information in actual application scenarios and improving management flexibility.
- FIG. 5 is a flow chart of a host connection method in some examples of this application.
- the host connection method can specifically To be applied to host devices, such as notebook computers, tablet computers, all-in-one computers, etc.
- the host connection method includes steps S501 and step S502, wherein,
- Step S501 The first host receives the second network information of the second host sent by the first accessory.
- the first host is connected to the first accessory.
- the second network information is the first accessory based on the connection with the first accessory.
- the connection of the second host is obtained.
- the first host sends the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
- the first host when a first accessory is connected to the first host, the first network information of the first host is sent to the first accessory.
- the first host may not immediately send the first network information to the first accessory when connected to the first accessory.
- the first host needs to determine the destination based on the user authorization for exchanging network information between the first host and the first accessory.
- the first accessory sends the first network information. As shown in Figure 6, when the first accessory is successfully connected to the first host, it will be selected through the corresponding configuration interface whether the first host needs direct connection based on the first accessory.
- the switch will be turned off and the first host will The first network information will not be sent to the first accessory. If yes, the switch is turned on, and the opening operation triggers the first host to send the first network information to the first accessory based on the connection with the first accessory. After receiving the first network information, the first accessory can store and distribute the first network information.
- the first accessory can send the first network information to the second host.
- the second host obtains the user authorization for exchanging network information between the second host and the first accessory
- the corresponding user authorization can be obtained by the first accessory, for example, the authorization information is synchronized and obtained.
- the second host actively sends the second network information, and the first accessory sends the first network information to the second host.
- the second host does not obtain the user authorization for the second host to exchange network information with the first accessory, The first accessory does not send the first network information to the second host.
- Peer-to-peer when the second host is connected to the first accessory, it can also send the second network information of the second host to the first accessory based on the connection relationship between the two.
- the first accessory can also send the second network information of the second host to the first accessory based on the connection with the first host.
- the second network information is sent to the first host. Therefore, the first host can receive the second network information of the second host. If it is determined that the first host has not established a connection with the second host, the first host determines that the second host is the first host.
- the host device can be connected to the host device, and then the first host can establish a connection with the second host according to the second network information.
- the second host when the first host establishes a connection with the second host, the second host initiates the first connection, and the first host agrees to the first connection initiated by the second host based on the second network information. Further, when receiving the first connection request from the second host, the first host will also authenticate the identity of the second host, and optionally determine whether the second host is connected to the same accessory device as the first host. If so, , then the first connection initiated by the second host is accepted; if not, the first connection initiated by the second host is rejected. In some examples, the first host initiates a second connection to the second host according to the second network information, so that the first host establishes a connection with the second host.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address. Select the specific network information to determine the specific direct connection method.
- the first host not only connects to the first accessory, but also connects to the second accessory.
- an all-in-one machine is connected to a Bluetooth mouse and a Bluetooth keyboard at the same time. After obtaining the network of other host devices managed by the connected Bluetooth mouse, After receiving the information, it will also exchange network information with the connected Bluetooth keyboard.
- the first host receives the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is based on the second accessory. The connection with the third host is obtained; the first host establishes a connection with the third host according to the third network information.
- the first host sends the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
- the first host can be directly connected not only to the host device connected to the first accessory, but also to the host device connected to the second accessory, thereby expanding the scope of direct connection.
- the first host also sends network information of other host devices owned by the first host to the first accessory. Since the first host can connect to multiple accessory devices, such as the first accessory and the second accessory, other host devices owned by the first host
- the network information may include network information of the host device connected to the first accessory and network information of the host device connected to the second accessory.
- the host device connected to the second accessory may not be connected to the first accessory.
- the first host does not send the network information of other host devices it has to the second accessory.
- the second host cannot directly connect to the host device connected to the second accessory, because the second host cannot obtain the network information of these host devices through the first accessory.
- the first host sends the third network information to the first accessory, so that the second host obtains the third network information.
- the third network information is the third host connected to the second accessory. This can greatly increase the range of directly connected host devices.
- the networking combination of the first accessory and the second accessory is also unified in usage scenarios and still has a certain relevance.
- the first host and the second host when they do not immediately establish a connection, but perform the connection based on the trigger of the first accessory or the second accessory.
- the trigger of the accessory instructs the first host to transmit data to the second host or the second host to transmit data to the first host.
- the first host is triggered to establish a connection with the second host.
- the first accessory or the second accessory when the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the type of transmission data matches the set type, it is set
- a certain type is, for example, a data type that generally has a large amount of data, or a data type that is more suitable for direct transmission between host devices in a specific scenario.
- the first host establishes a connection with the second host, and the type of data to be transmitted does not matter. When the set type is met, the data transmission between the first host and the second host still transmits data through the first accessory, and the first host does not establish a connection with the second host.
- the first accessory or the second host triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold
- the first threshold is used to determine the amount of data.
- the first host establishes a connection with the second host. When the amount of data to be transmitted does not exceed the first threshold, the data transmission between the first host and the second host still passes through the first
- the accessory transmits data and optionally the first host does not establish a connection with the second host.
- Figure 6 is a schematic diagram of the host direct connection configuration interface in some examples of this application.
- the accessory device whenever the accessory device establishes a connection with the host device, there will be a corresponding configuration interface, which can be configured freely by flipping the switches on the configuration interface.
- the corresponding host device can exchange network information with the connected accessory device, and can also establish connections with other host devices based on the network information of other host devices provided by the corresponding accessory device.
- the configuration shown in Figure 6 can still be modified, that is, the mouse-based direct connection option is turned off.
- the corresponding host device automatically disconnects from other host devices. Open the connection, and optionally notify the connected accessory device to delete the network information of the machine. If you need to re-establish a connection with another host device, you can turn the Allow mouse-based direct connections option back on.
- host A after receiving the network information of host B, where the network information includes the WiFi MAC address of host B, acts as the initiator to host B (receiving end) Initiate a connection and prepare to establish a WiFi direct connection with host B.
- Host B can implement step S701 monitoring through the port broadcast module 321 shown in Figure 3.
- Host A initiates step S702 scanning based on host B's network information.
- host B receives a connection request from host A during the monitoring process, if host A receives connection, host A responds to step S703.
- Host A determines that the device has been found in step S704, enters step S705, and connects to host B.
- Host B implements step S706 to respond to host A that the channel is successfully established, and enters step S707 to complete the connection. . After host A and host B establish a direct connection channel, they can directly exchange information. Since the connection between host A and host B is completely automatic, the user experience is greatly improved.
- host A and host B can establish connections with the accessory through Bluetooth.
- the accessory can implement information exchange with host A and host B respectively.
- step S811 the host A establishes a Bluetooth connection with the accessory.
- the host A can immediately share the network information of the host with the accessory. information, accordingly, step S812 sends the host A network information to the accessory.
- the accessory saves the host A network information in the accessory connected host network information, and sends the accessory connected host network information to the connected host device according to the connection status of the accessory.
- step S813 sends the host A network information to the host A, because At this time, the network information of the accessory connected to the host only contains the network information of host A.
- step S821 host B and the accessory also establish a Bluetooth connection. After the connection is successful, host B sends host B network information to the accessory through step S822. At this time, the accessory has connected to the host.
- the network information not only contains the network information of host A, but also updates Add the network information of host B, and send the updated accessory connected host network information including the network information of host A and the network information of host B to host B and host A through steps S823 and S824 respectively.
- the accessory sends the accessory connected host network information after sending the accessory connected
- steps S831 and S832 after receiving the information that the accessory is connected to the host network, host A and host B compare the accessory with the connected host device and determine the unconnected host device as a connectable host device. In this example, for host A, host B is a connectable host device, and for host B, host A is a connectable host device. Therefore, step S833 is entered, and host A and host B establish a direct connection.
- host A according to The network information that can be connected to host B initiates a connection to host B, or host B initiates a connection to host A based on the network information that can be connected to host A. After the connection is completed between host A and host B, they can directly exchange information with each other.
- the host device when the host device connects with the accessory device, it does not share its own network information with the accessory device by default. That is, the host device needs to be authorized by the user before it can realize the communication with other host devices.
- Direct connection steps After host A and host B establish a Bluetooth connection with the accessory, the accessory can normally control the operation of host A and host B. The accessory does not store the network information of host A and host B and needs to wait for the user's authorization operation.
- Step S911 The user performs a direct connection operation on host A, and host A can automatically establish a direct connection with other host devices. Host A sends host A network information to the accessory through step S912 under direct connection authorization.
- the accessory saves host A network information in the accessory connected host network information, and sends accessory connected including host A network information to host A through step S913. Host network information.
- the user also performs the operation of allowing direct connection to host B.
- Host B sends host B network information to the accessory through step S922.
- the accessory has been connected to the host network information update, including host A network information and host B network information.
- the updated accessory connected host network information is sent to host B and host A through steps S923 and S924 respectively.
- the corresponding host device object can be The network information of the device is deleted from the network information of the host connected to the accessory to reduce redundancy.
- steps S931 and S932 after receiving the accessory-connected host network information including the network information of host A and the network information of host B, host A and host B compare the host devices with which they are connected, and compare the host devices with which they are not connected.
- the host device is determined to be a host device that it can connect to.
- host B is a connectable host device
- host A is a connectable host device. Therefore, step S933 is entered.
- Host A and host B establish a direct connection.
- Host A and host B After the connection is completed, B can directly exchange information with each other.
- host A triggers sending host A network information to the accessory after establishing a Bluetooth connection through steps S1011 to S1013 and obtains the accessory connected host network information returned by the accessory.
- host B triggers the sending of host B network information to the accessory after establishing a Bluetooth connection through steps S1021 to S1023 and obtains the accessory connected host network information returned by the accessory (including host A, host B network information) , since the network information of the host B has been updated in the accessory connected host network information, the updated accessory connected host network information will also be returned to the host A through step S1024.
- Host A can know that host B is a connectable host device through the accessory connected host network information provided by the accessory.
- host B can know that host A is a connectable host device through the accessory connected host network information provided by the accessory.
- the direct connection is not established immediately, but when the direct connection requirement is triggered, the direct connection is established. in steps S1031.
- Host A triggers connection to host B.
- Host B triggers connection to host A. Since the host devices triggered by host A and host B to connect are all host devices that can be connected to this machine, step S1033 is entered.
- Host A and host B Direct connection at this time, the corresponding information interaction can be implemented in response to the demand for triggering the connection. Optionally, if the corresponding connection demand disappears, the corresponding connection can also be disconnected.
- host A and host B normally establish Bluetooth connections with the accessory, and host A and host B receive the user's information about the accessory in the local machine in the state of Bluetooth connection.
- Direct connection authorization operation After receiving the user's permission to directly connect through steps S1111 to S1113, host A triggers sending the host A network information to the accessory and obtains the accessory connected host network information (including host A network information) returned by the accessory.
- Host B goes through steps S1121 to Step S1123 triggers the sending of the host B network information to the accessory after receiving the user's permission for direct connection and obtains the accessory connected host network information (including host A and host B network information) returned by the accessory.
- the accessory connected host network information has been increased due to the update.
- the network information of host B is obtained, so the updated accessory connected host network information is also returned to host A through step S1124.
- Host A can know that host B is a connectable host device through the accessory connected host network information provided by the accessory.
- host B can know that host A is a connectable host device through the accessory connected host network information provided by the accessory.
- the direct connection is not established immediately, but when the direct connection requirement is triggered, the direct connection is established.
- step S1131 host A triggers connection to host B
- host B triggers connection to host A.
- step S1133 is entered.
- Host A and Host B is directly connected.
- the corresponding information interaction can be implemented in response to the demand for triggering the connection.
- the corresponding connection demand disappears, the corresponding connection can also be disconnected.
- host A and host B normally establish Bluetooth connections with the accessory, and realize ordinary information interaction under the operation of the accessory.
- step S1201 is used to send an instruction to host A to trigger host A to connect to host B
- step S1202 is used to send an instruction to host B to trigger host B to connect to host A.
- the direct connection step of host A and host B is activated.
- Host A sends host A network information to the accessory through step S1203, and host B sends host B network information to the accessory through step S1204.
- the accessory receives the network information of host A and the network information of host B respectively and saves them in the network information of the host connected to the accessory, and then sends the network information of host A and the network information of host B to host A and host B respectively through step S1205.
- the accessory is connected to the host network information of the information.
- Host A can determine the network information of host B to be connected after receiving the accessory connected host network information.
- Host B can determine the network information of host A to be connected after receiving the accessory connected host network information. , therefore, host A and host B are directly connected through step S1206. After the connection is completed, direct information exchange can be performed with each other.
- the mouse 1302 establishes Bluetooth connections with the all-in-one machine 1311 and the all-in-one machine 1312 respectively.
- the mouse 1302 can control the cursor on the all-in-one machine 1311 to operate, and can also control the cursor on the all-in-one machine 1312 to operate. .
- the file 1303 moves across the screen between the two host devices, but in the background
- the operating mechanism is to send the file 1303 from the all-in-one machine 1311 to the all-in-one machine 1312.
- the file 1303 can be transmitted to the all-in-one machine 1312 through this channel.
- the above-mentioned transmission method is not efficient, so it can be determined whether the data amount of the file 1303 exceeds the first threshold.
- the transmission from the mouse 1302 is given up, and the data is sent to the all-in-one machine 1311 and the all-in-one machine 1312.
- the instruction triggers direct transmission of information from the all-in-one machine 1311 to the all-in-one machine 1312. Specifically, when the file 1303 is dragged by the mouse 1302 from the all-in-one machine 1311 on the left to the right of the all-in-one machine 1311 When the edge of the screen triggers transmission, the all-in-one machine 1311 can obtain the URI1 (Uniform Resource Identifier, Uniform Resource Identifier) of the file 1303 through the clipboard.
- URI1 Uniform Resource Identifier
- the URI1 can be sent directly through the mouse 1302 To the all-in-one machine 1312, optionally, information whose data volume does not exceed the first threshold can also be transmitted through the direct connection channel established between the host devices.
- the all-in-one machine 1312 replaces it with URI2 and injects it into the clipboard of the all-in-one machine 1312.
- the all-in-one machine 1312 searches for the resource of the file 1303 through URI2.
- the file transfer service requests the all-in-one machine 1311 to transfer the file 1303 to the all-in-one machine 1312 according to the mapping relationship between URI1 and URI2.
- the all-in-one machine 1311 obtains the network information of the all-in-one machine 1312 through the connection with the mouse 1302, or the all-in-one machine 1312 obtains the network information of the all-in-one machine 1312 through the connection with the mouse 1302.
- the connection of 1302 obtains the network information of the all-in-one machine 1311.
- the all-in-one machine 1311 and the all-in-one machine 1312 establish a direct connection channel.
- the file 1303 can be sent from the all-in-one machine 1311 to the all-in-one machine 1312 through this direct connection channel, so that on the all-in-one machine
- the icon of file 1303 and the cursor for dragging file 1303 are displayed on the screen of 1312, and the mouse 1302 is also switched to the all-in-one machine 1312 for continuous control.
- FIG 14 is a schematic diagram of a host connection device in some examples of this application.
- the host connection device 1401 may be the first accessory described below, or a device deployed in the first accessory described below.
- the host connection device 1401 includes a storage unit 1411 and a distribution unit 1412, where,
- Storage unit 1411 configured for the first accessory to manage at least the first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;
- Distribution unit 1412 configured for the first accessory to send the first network information to at least a second host connected to the first accessory, where the first network information is used between the second host and the first accessory.
- the host establishes a connection.
- both the storage unit 1411 and the distribution unit 1412 can be executed by the connected host network information management module 341 shown in FIG. 3 .
- the host connection device 1401 includes:
- the storage unit 1411 is used by the first accessory to manage the second network information of the second host, where the second network information is obtained by the first accessory based on the connection with the second host;
- the distribution unit 1412 is used for the first accessory to send the second network information to the first host, and the second network information is used for the first host to agree to the first connection initiated by the second host.
- the storage unit 1411 includes:
- the first accessory obtains the first network information.
- the distribution unit 1412 includes:
- the first accessory sends the first network information to the second host.
- the host connection device 1401 includes a trigger unit 1413;
- the triggering unit 1413 is used when the first accessory triggers the transmission of data between the first host and the second host, and the first accessory triggers the establishment of a connection between the first host and the second host.
- the host connection device 1401 includes a trigger unit 1413;
- the trigger unit 1413 is used for the first accessory to trigger the transmission of data between the first host and the second host and the type of the transmitted data meets the set type.
- the first accessory triggers the first host and the second host. establish a connection between them.
- the host connection device 1401 includes a trigger unit 1413;
- the trigger unit 1413 is used for the first accessory to trigger the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold.
- the first accessory triggers the first host and the second host to transmit data.
- a connection is established between hosts.
- the host connection device 1401 includes:
- the storage unit 1411 is used for the first accessory to manage the third network information of the third host owned by the first host, so The third network information is obtained by the first accessory based on the connection with the first host;
- the distribution unit 1412 is used for the first accessory to send the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- FIG 15 is a schematic diagram of a host connection device in some examples of this application.
- the host connection device 1501 may be the first host described below, or a device deployed in the first host described below.
- the host connection device 1501 includes a receiving unit 1511 and a connection unit 1512, where,
- the receiving unit 1511 is configured for the first host to receive the second network information of the second host sent by the first accessory.
- the first host is connected to the first accessory.
- the second network information is based on the first accessory. Obtained from the connection with the second host;
- the connection unit 1512 is used for the first host to establish a connection with the second host according to the second network information.
- the receiving unit 1511 can be executed by the connected accessory management module 323 and the host information management module 324 shown in FIG. 3
- the connecting unit 1512 can be executed by the port broadcast module 321 and the active connection module 322 shown in FIG. 3 .
- the host connection device 1501 includes a sending unit 1513;
- the sending unit 1513 is configured for the first host to send the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
- the sending unit 1513 includes:
- the first host When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
- connection unit 1512 includes:
- the first host When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
- connection unit 1512 includes:
- the first host initiates a second connection to the second host according to the second network information.
- the host connection device 1501 includes:
- the receiving unit 1511 is used for the first host to receive the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is the second accessory. Obtained based on the connection with the third host;
- the connection unit 1512 is used for the first host to establish a connection with the third host according to the third network information.
- the host connection device 1501 includes:
- the sending unit 1513 is configured for the first host to send the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
- the host connection device 1501 includes:
- the sending unit 1513 is configured for the first host to send the third network information to the first accessory, so that at least a second host connected to the first accessory obtains the third network information.
- connection unit 1512 includes:
- the first host When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host, the first host establishes a connection with the second host.
- connection unit 1512 includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
- connection unit 1512 includes:
- the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, the first host and The second host establishes a connection.
- the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- the receiving unit 1512 includes:
- the first host determines that the second host is a connectable host device of the first host.
- Figure 16 is a schematic diagram of accessory equipment in some examples of this application.
- the accessory device 1601 can be a Bluetooth mouse, a Bluetooth keyboard, etc.
- the accessory device 1601 includes a processor 1611 and a memory 1612.
- the accessory device 1601 can also include a Bluetooth module, etc.
- the computer program is stored on the memory 1612 and can be run on the processor 1611.
- the processor 1611 executes the computer program to implement the host connection method shown in Figure 4 and the method provided by the optional embodiment.
- the accessory device 1601 can manage the host device network information obtained when connecting to multiple host devices through the connected host network information management module 341, and send the accessory connected host information to the connected host device according to the situation of the connected host device.
- Internet Information is a schematic diagram of accessory equipment in some examples of this application.
- FIG 17 is a schematic diagram of a host device in some examples of this application.
- the host device 1701 can be a notebook computer, a tablet computer, an all-in-one machine, etc.
- the host device 1701 includes a processor 1711 and a memory 1712.
- the host device 1701 may also include a Bluetooth module, and further the host device 1701 may also include a WiFi module to implement WiFi direct connection, local area network connection, etc.
- the computer program is stored on the memory 1712 and can be run on the processor 1711.
- the processor 1711 executes the computer program to implement the host connection method shown in Figure 5 and the method provided by the optional embodiment.
- the host device 1701 can not only manage all connected accessory devices through the connected accessory management module 323 and obtain accessory connected host network information sent by the accessory device, but also manage connected accessory devices through the host information management module 324.
- the host devices and connectable host devices will not be described again here.
- processor and memory in the accessory device and the host device can be set separately or integrated together.
- a computer program product containing instructions, when run on a computer, causes the computer to execute the host connection method shown in Figure 4 and the method provided by the optional implementation, and the host connection method shown in Figure 5 and methods provided by alternative embodiments.
- a computer-readable storage medium has a computer program stored in the computer-readable storage medium.
- the host connection method as shown in Figure 4 and the optional implementation are provided.
- this application is based on the application consistency of the accessory device and the host device connected to the accessory device in the scenario, and forms a networking combination of the host device connected to the accessory device itself, and provides a networking combination for the host device connected to the accessory device. network information of other host devices in the host device so that connections can be established between host devices. This application simplifies the operation process of connection between host devices and improves the user experience.
- Computer program products include One or more computer instructions, when loaded and executed on a computer, produce, in whole or in part, the processes or functions described in the embodiments of the present application.
- the computer may be a general purpose computer, a special purpose computer, a 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., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g.
- Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless means to transmit to another website site, computer, server or data center.
- Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or other integrated media that contains 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)), etc.
- each software module corresponding to the computer program flow can also correspond to each hardware module, such as ASIC (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 appropriate combination thereof.
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array, Field Programmable Gate Array
- other programmable logic devices discrete gate or crystal logic devices, discrete hardware components, or any appropriate combination thereof.
- the functions of each module can be implemented in the same or multiple software and/or hardware.
- each numerical number, “first”, “second”, etc. mentioned in each embodiment are only for the convenience of description and do not represent an absolute distinction in structure or function. At the same time, in different In the embodiments, the same numbers or signs may be used, but these do not represent an absolute relationship in structure or function, and should not be used to limit the scope of the embodiments of the present application.
- the size of each step and process number does not mean the order of execution. 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)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Information Transfer Between Computers (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present application relates to the technical field of terminals, and in particular to a host connection method, apparatus and system, a device, and a storage medium. In the present application, on the basis of the application consistency between an accessory device and a host device connected to the accessory device in a scene, the host device connected to the accessory device itself is formed into a networking combination, and network information of other host devices in the networking combination is provided for the host device connected to the accessory device, so that a connection can be established between the host devices. According to the present application, the operation flow of the connection between the host devices is simplified, and the use experience of a user is improved.
Description
本申请要求在2022年4月27日提交中国国家知识产权局、申请号为202210455111.6的中国专利申请的优先权,发明名称为“主机连接方法、装置、系统、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210455111.6 submitted to the State Intellectual Property Office of China on April 27, 2022. The invention is titled "Host connection method, device, system, equipment and storage medium". priority, the entire contents of which are incorporated herein by reference.
本申请涉及终端技术领域,尤其涉及一种主机连接方法、装置、系统、设备及存储介质。The present application relates to the field of terminal technology, and in particular to a host connection method, device, system, equipment and storage medium.
电子设备大致可分为主机设备和配件设备两类,主机设备一般是指具有独立信息处理的计算设备,通常都设置有屏幕,具有WiFi、蓝牙、移动网络等多种通信能力,比如手机、平板电脑、笔记本电脑、台式机等。配件设备一般是指起输入、输出作用或为主机设备提供扩展功能的硬件设备,通常没有屏幕或者屏幕较小,可支持的通信能力主要局限在低功耗的蓝牙等,比如鼠标、键盘、音箱、智能手表、智慧书包等。目前,配件设备一般可以通过蓝牙等无线通信支持连接多台主机设备,如图1所示,当用户同时拥有笔记本电脑111、台式机112、平板电脑113时,鼠标101可以同时与笔记本电脑111、台式机112、平板电脑113建立连接,实现跨设备操作。但是,笔记本电脑111、台式机112、平板电脑113之间进行连接还要通过人工进行逐一设置,有时还需要人工相互认证,尤其在处理特定场景下的临时连接需求时,就显得用户体验不佳。Electronic devices can be roughly divided into two categories: host devices and accessory devices. Host devices generally refer to computing devices with independent information processing. They are usually equipped with screens and have multiple communication capabilities such as WiFi, Bluetooth, and mobile networks, such as mobile phones and tablets. Computers, laptops, desktops, etc. Accessory devices generally refer to hardware devices that function as input or output or provide extended functions for the host device. They usually have no screen or a small screen. The supported communication capabilities are mainly limited to low-power Bluetooth, such as mice, keyboards, and speakers. , smart watches, smart schoolbags, etc. At present, accessory devices can generally support connection to multiple host devices through wireless communication such as Bluetooth. As shown in Figure 1, when the user has a laptop 111, a desktop 112, and a tablet 113 at the same time, the mouse 101 can be connected to the laptop 111, desktop 112, and tablet 113 at the same time. The desktop computer 112 and the tablet computer 113 establish a connection to realize cross-device operation. However, the connection between the laptop 111, the desktop 112, and the tablet 113 requires manual settings one by one, and sometimes manual mutual authentication is required. Especially when dealing with temporary connection requirements in specific scenarios, the user experience is poor. .
发明内容Contents of the invention
本申请提供一种主机连接方法、装置、系统、设备及存储介质,以解决现有技术中主机设备之间相互连接实现复杂,用户体验不佳的技术问题。The present application provides a host connection method, device, system, equipment and storage medium to solve the technical problems in the prior art of complicated interconnection between host devices and poor user experience.
为了解决上述技术问题,本申请提供了以下技术方案。In order to solve the above technical problems, this application provides the following technical solutions.
第一方面,提供一种主机连接方法,包括如下步骤:The first aspect provides a host connection method, including the following steps:
第一配件管理至少第一主机的第一网络信息,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的;The first accessory manages at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;
所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息,所述第一网络信息用于所述第二主机与所述第一主机建立连接。The first accessory sends the first network information to at least a second host connected to the first accessory, and the first network information is used for the second host to establish a connection with the first host.
可以理解,本实施方式通过配件设备连接主机设备形成的组网组合,来为连接配件设备自身的主机设备提供其他主机设备的网络信息,从而辅助主机设备之间进行自动直连。It can be understood that this embodiment provides network information of other host devices to the host device connected to the accessory device itself through a networking combination formed by the accessory device connecting to the host device, thereby assisting in automatic direct connection between host devices.
在第一方面的一种可选实施方式中,所述方法包括:In an optional implementation of the first aspect, the method includes:
所述第一配件管理所述第二主机的第二网络信息,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The first accessory manages second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host;
所述第一配件向所述第一主机发送所述第二网络信息,所述第二网络信息用于所述第一主机同意所述第二主机发起的第一连接。The first accessory sends the second network information to the first host, and the second network information is used by the first host to agree to the first connection initiated by the second host.
可以理解,本实施方式中配件设备分别对第一主机、第二主机提供一致的直连信息,以实现主机设备之间直连的相互认证。It can be understood that in this embodiment, the accessory device provides consistent direct connection information to the first host and the second host respectively, so as to realize mutual authentication of direct connections between the host devices.
在第一方面的一种可选实施方式中,所述第一网络信息是所述第一配件基于与所述第一
主机的连接获取的包括:In an optional implementation of the first aspect, the first network information is the first accessory based on the The host's connection acquisition includes:
在用户授权所述第一主机与所述第一配件交换网络信息时,所述第一配件获取到所述第一网络信息。When the user authorizes the first host and the first accessory to exchange network information, the first accessory obtains the first network information.
可以理解,本实施方式主机设备可以根据自身需要决定是否与其他主机设备建立连接,提高主机设备直连的可控性。It can be understood that in this embodiment, the host device can decide whether to establish a connection with other host devices according to its own needs, thereby improving the controllability of direct connection of the host device.
在第一方面的一种可选实施方式中,所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息包括:In an optional implementation of the first aspect, the first accessory sending the first network information to at least a second host connected to the first accessory includes:
在用户授权所述第二主机与所述第一配件交换网络信息时,所述第一配件向所述第二主机发送所述第一网络信息。When the user authorizes the second host and the first accessory to exchange network information, the first accessory sends the first network information to the second host.
可以理解,本实施方式配件设备可以根据主机设备的用户授权来决定是否向对应的主机设备发送其他主机设备的网络信息。It can be understood that in this embodiment, the accessory device can decide whether to send the network information of other host devices to the corresponding host device according to the user authorization of the host device.
在第一方面的一种可选实施方式中,所述方法包括:In an optional implementation of the first aspect, the method includes:
所述第一配件触发所述第一主机、第二主机之间传输数据时,所述第一配件触发所述第一主机、第二主机之间建立连接。When the first accessory triggers data transmission between the first host and the second host, the first accessory triggers the establishment of a connection between the first host and the second host.
可以理解,本实施方式是在响应配件设备的跨主机设备操作时触发主机设备之间的直连,减少主机设备之间不必要的连接耗费。It can be understood that this embodiment triggers a direct connection between the host devices when responding to the cross-host device operation of the accessory device, thereby reducing unnecessary connection consumption between the host devices.
在第一方面的一种可选实施方式中,所述方法包括:In an optional implementation of the first aspect, the method includes:
所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的类型符合设定类型时,所述第一配件触发所述第一主机、第二主机之间建立连接。When the first accessory triggers the transmission of data between the first host and the second host and the type of transmitted data meets the set type, the first accessory triggers the establishment of a connection between the first host and the second host.
可以理解,本实施方式根据传输数据的类型决定是否触发主机设备之间的直连,在不符合设定类型时,可以通过配件设备本身的连接通道进行传输。It can be understood that this embodiment determines whether to trigger a direct connection between host devices based on the type of data to be transmitted. If the data does not meet the set type, the data can be transmitted through the connection channel of the accessory device itself.
在第一方面的一种可选实施方式中,所述方法包括:In an optional implementation of the first aspect, the method includes:
所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的数据量超过第一阈值时,所述第一配件触发所述第一主机、第二主机之间建立连接。When the first accessory triggers the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold, the first accessory triggers the establishment of a connection between the first host and the second host. .
可以理解,本实施方式根据传输数据的数据量决定是否触发主机设备之间的直连,在数据量小于第一阈值时,可以通过配件设备本身的连接通道进行传输。It can be understood that this embodiment determines whether to trigger a direct connection between host devices based on the amount of data to be transmitted. When the amount of data is less than the first threshold, transmission can be performed through the connection channel of the accessory device itself.
在第一方面的一种可选实施方式中,所述方法包括:In an optional implementation of the first aspect, the method includes:
所述第一配件管理所述第一主机具有的第三主机的第三网络信息,所述第三网络信息是所述第一配件基于与所述第一主机的连接获取的;The first accessory manages the third network information of the third host owned by the first host, and the third network information is obtained by the first accessory based on the connection with the first host;
所述第一配件向所述第二主机发送所述第三网络信息,所述第三网络信息用于所述第二主机与所述第三主机建立连接。The first accessory sends the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
可以理解,本实施方式配件设备在获取第一主机的第一网络信息外,还获取基于第一主机与其他配件设备连接获取到的第三网络信息,增加网络信息获取的范围。It can be understood that in this embodiment, in addition to obtaining the first network information of the first host, the accessory device also obtains the third network information obtained based on the connection between the first host and other accessory devices, thereby increasing the scope of network information acquisition.
在第一方面的一种可选实施方式中,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。In an optional implementation of the first aspect, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
可以理解,本实施方式为主机设备之间的直连提供网络参数,还可以根据实际的需要选择不同的直连方式。It can be understood that this embodiment provides network parameters for direct connection between host devices, and different direct connection methods can also be selected according to actual needs.
第二方面,提供一种主机连接方法,包括如下步骤:The second aspect provides a host connection method, including the following steps:
第一主机接收第一配件发送的第二主机的第二网络信息,所述第一主机与所述第一配件连接,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The first host receives the second network information of the second host sent by the first accessory. The first host is connected to the first accessory. The second network information is the first accessory based on the communication with the second host. The connection obtained;
所述第一主机根据所述第二网络信息与所述第二主机建立连接。
The first host establishes a connection with the second host according to the second network information.
可以理解,本实施方式主机设备通过配件设备接收配件设备连接的其他主机设备的网络信息,从而满足主机设备与其他主机设备的连接需求。It can be understood that in this embodiment, the host device receives network information of other host devices connected to the accessory device through the accessory device, thereby meeting the connection requirements between the host device and other host devices.
在第二方面的一种可选实施方式中,所述方法包括:In an optional implementation of the second aspect, the method includes:
所述第一主机向所述第一配件发送所述第一主机的第一网络信息,以使连接所述第一配件的至少第二主机获取所述第一网络信息。The first host sends the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
可以理解,本实施方式可以让配件设备连接的其他主机设备知道主机设备的网络信息,并与主机设备建立连接。It can be understood that this embodiment allows other host devices connected to the accessory device to know the network information of the host device and establish a connection with the host device.
在第二方面的一种可选实施方式中,所述第一主机向所述第一配件发送所述第一主机的第一网络信息包括:In an optional implementation manner of the second aspect, the first host sending the first network information of the first host to the first accessory includes:
所述第一主机在获取到所述第一主机与所述第一配件交换网络信息的用户授权时,向所述第一配件发送所述第一网络信息。When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
可以理解,本实施方式主机设备可以根据用户授权来确定是否与配件设备连接的其他主机设备进行直连,提高主机设备直连的可控性。It can be understood that in this embodiment, the host device can determine whether to directly connect to other host devices connected to the accessory device based on user authorization, thereby improving the controllability of the direct connection of the host device.
在第二方面的一种可选实施方式中,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:In an optional implementation manner of the second aspect, the first host establishing a connection with the second host according to the second network information includes:
在所述第二主机根据所述第一网络信息向所述第一主机发起第一连接时,所述第一主机根据所述第二网络信息同意所述第一连接。When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
可以理解,本实施方式第一主机同意第一连接而与第二主机建立连接。It can be understood that in this embodiment, the first host agrees to the first connection and establishes a connection with the second host.
在第二方面的一种可选实施方式中,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:In an optional implementation manner of the second aspect, the first host establishing a connection with the second host according to the second network information includes:
所述第一主机根据所述第二网络信息向所述第二主机发起第二连接。The first host initiates a second connection to the second host according to the second network information.
可以理解,本实施方式第一主机发起第二连接以与第二主机建立连接。It can be understood that in this embodiment, the first host initiates the second connection to establish a connection with the second host.
在第二方面的一种可选实施方式中,所述方法包括:In an optional implementation of the second aspect, the method includes:
所述第一主机接收第二配件发送的第三主机的第三网络信息,所述第一主机与所述第二配件连接,所述第三网络信息是所述第二配件基于与所述第三主机的连接获取的;The first host receives the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is the second accessory based on the connection with the third accessory. Obtained from the connection of three hosts;
所述第一主机根据所述第三网络信息与所述第三主机建立连接。The first host establishes a connection with the third host according to the third network information.
可以理解,本实施方式可以综合多个配件设备的组网组合,来为主机设备提供更多的其他主机设备的网络信息,从而实现主机设备之间直连。It can be understood that this embodiment can integrate the networking combination of multiple accessory devices to provide the host device with more network information of other host devices, thereby realizing direct connection between host devices.
在第二方面的一种可选实施方式中,所述方法包括:In an optional implementation of the second aspect, the method includes:
所述第一主机向所述第二配件发送所述第一主机的第一网络信息,以使连接所述第二配件的至少第三主机获取所述第一网络信息。The first host sends the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
可以理解,本实施方式可以让更多的主机设备知道第一主机的第一网络信息,并与第一主机建立连接。It can be understood that this embodiment allows more host devices to know the first network information of the first host and establish connections with the first host.
在第二方面的一种可选实施方式中,所述方法包括:In an optional implementation of the second aspect, the method includes:
所述第一主机向所述第一配件发送所述第三网络信息,以使连接所述第一配件的至少第二主机获取所述第三网络信息。The first host sends the third network information to the first accessory, so that at least a second host connected to the first accessory obtains the third network information.
可以理解,本实施方式主机设备将从连接的所有配件设备获取到的网络信息都发送给特定配件设备,增加配件设备所具有的主机设备网络信息的范围。It can be understood that in this embodiment, the host device sends the network information obtained from all connected accessory devices to the specific accessory device, thereby increasing the range of host device network information possessed by the accessory device.
在第二方面的一种可选实施方式中,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:In an optional implementation manner of the second aspect, the first host establishing a connection with the second host according to the second network information includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机
的传输数据时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive data from the second host When transmitting data, the first host establishes a connection with the second host.
可以理解,本实施方式是在响应配件设备的跨主机设备操作时触发主机设备之间的直连,减少主机设备之间不必要的连接耗费。It can be understood that this embodiment triggers a direct connection between the host devices when responding to the cross-host device operation of the accessory device, thereby reducing unnecessary connection consumption between the host devices.
在第二方面的一种可选实施方式中,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:In an optional implementation manner of the second aspect, the first host establishing a connection with the second host according to the second network information includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的类型符合设定类型时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
可以理解,本实施方式根据传输数据的类型决定是否触发主机设备之间的直连,在不符合设定类型时,可以通过配件设备本身的连接通道进行传输。It can be understood that this embodiment determines whether to trigger a direct connection between host devices based on the type of data to be transmitted. If the data does not meet the set type, the data can be transmitted through the connection channel of the accessory device itself.
在第二方面的一种可选实施方式中,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:In an optional implementation manner of the second aspect, the first host establishing a connection with the second host according to the second network information includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的数据量超过第一阈值时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, the first host and The second host establishes a connection.
可以理解,本实施方式根据传输数据的数据量决定是否触发主机设备之间的直连,在数据量小于第一阈值时,可以通过配件设备本身的连接通道进行传输。It can be understood that this embodiment determines whether to trigger a direct connection between host devices based on the amount of data to be transmitted. When the amount of data is less than the first threshold, transmission can be performed through the connection channel of the accessory device itself.
在第二方面的一种可选实施方式中,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。In an optional implementation of the second aspect, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
可以理解,本实施方式为主机设备之间的直连提供网络参数,还可以根据实际的需要选择不同的直连方式。It can be understood that this embodiment provides network parameters for direct connection between host devices, and different direct connection methods can also be selected according to actual needs.
在第二方面的一种可选实施方式中,所述第一主机接收所述第一配件发送的所述第二主机的第二网络信息之后,所述方法包括:In an optional implementation manner of the second aspect, after the first host receives the second network information of the second host sent by the first accessory, the method includes:
判断所述第一主机未与所述第二主机建立连接时,所述第一主机确定所述第二主机为所述第一主机的可连接主机设备。When it is determined that the first host has not established a connection with the second host, the first host determines that the second host is a connectable host device of the first host.
可以理解,本实施方式获取到其他主机设备的网络信息后,根据确定的可连接主机设备来实现自动的直连步骤,提高可管理性。It can be understood that after obtaining the network information of other host devices, this embodiment implements automatic direct connection steps based on the determined connectable host devices to improve manageability.
第三方面,提供一种主机连接装置,包括:In a third aspect, a host connection device is provided, including:
存储单元,用于第一配件管理至少第一主机的第一网络信息,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的;A storage unit configured for the first accessory to manage at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;
分发单元,用于所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息,所述第一网络信息用于所述第二主机与所述第一主机建立连接。A distribution unit configured for the first accessory to send the first network information to at least a second host connected to the first accessory, where the first network information is used between the second host and the first host. establish connection.
在第三方面的一种可选实施方式中,所述装置包括:In an optional implementation of the third aspect, the device includes:
所述存储单元用于所述第一配件管理所述第二主机的第二网络信息,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The storage unit is used by the first accessory to manage the second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host;
所述分发单元用于所述第一配件向所述第一主机发送所述第二网络信息,所述第二网络信息用于所述第一主机同意所述第二主机发起的第一连接。The distribution unit is used for the first accessory to send the second network information to the first host, and the second network information is used for the first host to agree to the first connection initiated by the second host.
在第三方面的一种可选实施方式中,所述存储单元包括:In an optional implementation of the third aspect, the storage unit includes:
在用户授权所述第一主机与所述第一配件交换网络信息时,所述第一配件获取到所述第一网络信息。When the user authorizes the first host and the first accessory to exchange network information, the first accessory obtains the first network information.
在第三方面的一种可选实施方式中,所述分发单元包括:In an optional implementation of the third aspect, the distribution unit includes:
在用户授权所述第二主机与所述第一配件交换网络信息时,所述第一配件向所述第二主机发送所述第一网络信息。
When the user authorizes the second host and the first accessory to exchange network information, the first accessory sends the first network information to the second host.
在第三方面的一种可选实施方式中,所述装置包括触发单元;In an optional implementation of the third aspect, the device includes a triggering unit;
所述触发单元用于所述第一配件触发所述第一主机、第二主机之间传输数据时,所述第一配件触发所述第一主机、第二主机之间建立连接。The triggering unit is used when the first accessory triggers data transmission between the first host and the second host, and the first accessory triggers the establishment of a connection between the first host and the second host.
在第三方面的一种可选实施方式中,所述装置包括触发单元;In an optional implementation of the third aspect, the device includes a triggering unit;
所述触发单元用于所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的类型符合设定类型时,所述第一配件触发所述第一主机、第二主机之间建立连接。The triggering unit is used for the first accessory to trigger the transmission of data between the first host and the second host and the type of transmitted data meets the set type. The first accessory triggers the first host and the second host. A connection is established between hosts.
在第三方面的一种可选实施方式中,所述装置包括触发单元;In an optional implementation of the third aspect, the device includes a triggering unit;
所述触发单元用于所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的数据量超过第一阈值时,所述第一配件触发所述第一主机、第二主机之间建立连接。The triggering unit is used for the first accessory to trigger the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold. The first accessory triggers the first host and the second host to transmit data. A connection is established between the two hosts.
在第三方面的一种可选实施方式中,所述装置包括:In an optional implementation of the third aspect, the device includes:
所述存储单元用于所述第一配件管理所述第一主机具有的第三主机的第三网络信息,所述第三网络信息是所述第一配件基于与所述第一主机的连接获取的;The storage unit is used by the first accessory to manage the third network information of the third host owned by the first host. The third network information is obtained by the first accessory based on the connection with the first host. of;
所述分发单元用于所述第一配件向所述第二主机发送所述第三网络信息,所述第三网络信息用于所述第二主机与所述第三主机建立连接。The distribution unit is used for the first accessory to send the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
在第三方面的一种可选实施方式中,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。In an optional implementation of the third aspect, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
第四方面,提供一种主机连接装置,包括:In a fourth aspect, a host connection device is provided, including:
接收单元,用于第一主机接收第一配件发送的第二主机的第二网络信息,所述第一主机与所述第一配件连接,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;A receiving unit configured for the first host to receive the second network information of the second host sent by the first accessory, the first host is connected to the first accessory, and the second network information is the first accessory based on the The connection of the second host is obtained;
连接单元,用于所述第一主机根据所述第二网络信息与所述第二主机建立连接。A connection unit, configured for the first host to establish a connection with the second host according to the second network information.
在第四方面的一种可选实施方式中,所述装置包括发送单元;In an optional implementation of the fourth aspect, the device includes a sending unit;
所述发送单元用于所述第一主机向所述第一配件发送所述第一主机的第一网络信息,以使连接所述第一配件的至少第二主机获取所述第一网络信息。The sending unit is configured for the first host to send the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
在第四方面的一种可选实施方式中,所述发送单元包括:In an optional implementation of the fourth aspect, the sending unit includes:
所述第一主机在获取到所述第一主机与所述第一配件交换网络信息的用户授权时,向所述第一配件发送所述第一网络信息。When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
在第四方面的一种可选实施方式中,所述连接单元包括:In an optional implementation of the fourth aspect, the connection unit includes:
在所述第二主机根据所述第一网络信息向所述第一主机发起第一连接时,所述第一主机根据所述第二网络信息同意所述第一连接。When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
在第四方面的一种可选实施方式中,所述连接单元包括:In an optional implementation of the fourth aspect, the connection unit includes:
所述第一主机根据所述第二网络信息向所述第二主机发起第二连接。The first host initiates a second connection to the second host according to the second network information.
在第四方面的一种可选实施方式中,所述装置包括:In an optional implementation of the fourth aspect, the device includes:
所述接收单元用于所述第一主机接收第二配件发送的第三主机的第三网络信息,所述第一主机与所述第二配件连接,所述第三网络信息是所述第二配件基于与所述第三主机的连接获取的;The receiving unit is used for the first host to receive the third network information of the third host sent by the second accessory. The first host is connected to the second accessory, and the third network information is the second accessory. The accessories are obtained based on the connection with the third host;
所述连接单元用于所述第一主机根据所述第三网络信息与所述第三主机建立连接。The connection unit is used for the first host to establish a connection with the third host according to the third network information.
在第四方面的一种可选实施方式中,所述装置包括:In an optional implementation of the fourth aspect, the device includes:
所述发送单元用于所述第一主机向所述第二配件发送所述第一主机的第一网络信息,以使连接所述第二配件的至少第三主机获取所述第一网络信息。The sending unit is configured for the first host to send the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
在第四方面的一种可选实施方式中,所述装置包括:In an optional implementation of the fourth aspect, the device includes:
所述发送单元用于所述第一主机向所述第一配件发送所述第三网络信息,以使连接所述
第一配件的至少第二主机获取所述第三网络信息。The sending unit is used for the first host to send the third network information to the first accessory, so that the connecting At least a second host of the first accessory obtains the third network information.
在第四方面的一种可选实施方式中,所述连接单元包括:In an optional implementation of the fourth aspect, the connection unit includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host, the first host establishes a connection with the second host.
在第四方面的一种可选实施方式中,所述连接单元包括:In an optional implementation of the fourth aspect, the connection unit includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的类型符合设定类型时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
在第四方面的一种可选实施方式中,所述连接单元包括:In an optional implementation of the fourth aspect, the connection unit includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的数据量超过第一阈值时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, the first host and The second host establishes a connection.
在第四方面的一种可选实施方式中,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。In an optional implementation of the fourth aspect, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
在第四方面的一种可选实施方式中,所述接收单元包括:In an optional implementation of the fourth aspect, the receiving unit includes:
判断所述第一主机未与所述第二主机建立连接时,所述第一主机确定所述第二主机为所述第一主机的可连接主机设备。When it is determined that the first host has not established a connection with the second host, the first host determines that the second host is a connectable host device of the first host.
第五方面,提供一种主机连接系统,包括如第三方面、第三方面任意一种可选实施方式所提供的主机连接装置及如第四方面、第四方面任意一种可选实施方式所提供的主机连接装置。In a fifth aspect, a host connection system is provided, including a host connection device as provided in any one of the third aspect and any optional implementation manner of the third aspect, and a host connection device as provided in any one of the fourth aspect and any optional implementation manner of the fourth aspect. Supplied host connection device.
第六方面,提供一种配件设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面及第一方面任意一种可选实施方式所提供的方法。A sixth aspect provides an accessory device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the first aspect and the first aspect are implemented. The method provided by any optional implementation.
第七方面,提供一种主机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第二方面及第二方面任意一种可选实施方式所提供的方法。In a seventh aspect, a host device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the second aspect and the second aspect are implemented. The method provided by any optional implementation.
第八方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如第一方面、第一方面任意一种可选实施方式及第二方面、第二方面任意一种可选实施方式所提供的方法。An eighth aspect provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the first aspect, any one of the optional implementations of the first aspect, and the second aspect, or any one of the second aspects. method provided by an optional implementation.
第九方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被运行时,实现如第一方面、第一方面任意一种可选实施方式及第二方面、第二方面任意一种可选实施方式所提供的方法。In a ninth aspect, a computer-readable storage medium is provided. A computer program is stored in the computer-readable storage medium. When the computer program is run, any optional implementation of the first aspect or the first aspect is implemented. method and the second aspect and the method provided by any optional implementation of the second aspect.
相较于现有技术,本申请基于配件设备与连接配件设备的主机设备在场景中的应用一致性,将配件设备自身连接的主机设备形成一个组网组合,为连接配件设备的主机设备提供组网组合中的其他主机设备的网络信息,从而使主机设备之间可以建立连接。本申请简化了主机设备之间连接的操作流程,提高了用户的使用体验。Compared with the existing technology, this application is based on the application consistency of the accessory device and the host device connected to the accessory device in the scenario, and forms a networking combination with the host device connected to the accessory device itself, and provides a network combination for the host device connected to the accessory device. Network information of other host devices in the network combination, so that connections can be established between host devices. This application simplifies the operation process of connection between host devices and improves the user experience.
为了更清楚地说明本申请现有技术或实施方式中的技术方案,下面将对现有技术或实施方式描述中所需要使用的附图作简单地介绍。显而易见地,下面附图中反映的仅仅是本申请中记载的一部分实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得本申请的其他实施方式,而所有这些实施方式都在本申请的保护范围之内。
In order to more clearly explain the technical solutions in the prior art or embodiments of the present application, the drawings needed to describe the prior art or embodiments will be briefly introduced below. Obviously, the following drawings reflect only a part of the embodiments recorded in the present application. For those of ordinary skill in the art, other implementations of the present application can be obtained based on these drawings without exerting creative efforts. manner, and all these implementations are within the protection scope of this application.
图1为现有技术中一个配件设备与多个主机设备建立连接示意图。Figure 1 is a schematic diagram of establishing connections between an accessory device and multiple host devices in the prior art.
图2为本申请一些示例中主机连接架构示意图。Figure 2 is a schematic diagram of the host connection architecture in some examples of this application.
图3为本申请一些示例中主机设备与配件设备之间交互架构示意图。Figure 3 is a schematic diagram of the interaction architecture between the host device and the accessory device in some examples of this application.
图4为本申请一些示例中主机连接方法流程图。Figure 4 is a flow chart of a host connection method in some examples of this application.
图5为本申请一些示例中主机连接方法流程图。Figure 5 is a flow chart of a host connection method in some examples of this application.
图6为本申请一些示例中主机直连配置界面示意图。Figure 6 is a schematic diagram of the host direct connection configuration interface in some examples of this application.
图7为本申请一些示例中主机设备直连建立交互流程示意图。Figure 7 is a schematic diagram of the interaction process for direct connection establishment of host devices in some examples of this application.
图8为本申请一些示例中配件与主机A、主机B交互流程示意图。Figure 8 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
图9为本申请一些示例中配件与主机A、主机B交互流程示意图。Figure 9 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
图10为本申请一些示例中配件与主机A、主机B交互流程示意图。Figure 10 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
图11为本申请一些示例中配件与主机A、主机B交互流程示意图。Figure 11 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
图12为本申请一些示例中配件与主机A、主机B交互流程示意图。Figure 12 is a schematic diagram of the interaction process between accessories and host A and host B in some examples of this application.
图13为本申请一些示例中鼠标跨设备操作场景示意图。Figure 13 is a schematic diagram of mouse cross-device operation scenarios in some examples of this application.
图14为本申请一些示例中主机连接装置示意图。Figure 14 is a schematic diagram of a host connection device in some examples of this application.
图15为本申请一些示例中主机连接装置示意图。Figure 15 is a schematic diagram of a host connection device in some examples of this application.
图16为本申请一些示例中配件设备示意图。Figure 16 is a schematic diagram of accessory equipment in some examples of this application.
图17为本申请一些示例中主机设备示意图。Figure 17 is a schematic diagram of a host device in some examples of this application.
为使本申请的目的、技术方案和技术效果更加清楚,以下将结合附图所示的各实施方式对本申请进行详细的描述。但是,所描述的这些实施方式仅仅是本申请的一部分实施方式,而不是全部的实施方式,本领域普通技术人员在不付出创造性劳动的前提下,所获得的所有其他实施方式,都属于本申请的保护范围。In order to make the purpose, technical solutions and technical effects of the present application clearer, the present application will be described in detail below with reference to each embodiment shown in the accompanying drawings. However, these described embodiments are only some of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by those of ordinary skill in the art without exerting creative efforts belong to this application. scope of protection.
目前,电子设备的发展日新月异,差异化的定位使得电子设备衍生出了各种类型的产品。以主机设备为例,在传统的计算机组成架构不变的前提下,单单根据屏幕尺寸的不同定位就设计出了满足不同需求的主机设备,比如手机、平板电脑、笔记本电脑、一体机等。而对于用户而言,往往会选择同时拥有多个主机设备来满足日常的需要,但由于多个主机设备之间缺乏互联,用户疲于来回切换,用户体验极其不佳。为了提高用户的跨设备协同性,会存在一些支持连接多主机设备的配件设备来实现对多主机设备的统一控制。如图1所示,鼠标101可以同时连接笔记本电脑111、一体机112、平板电脑113,在这种场景下,一个鼠标就可以统一地去管理三台主机设备的光标移动、点击等操作,从而不需要额外为每个主机设备都配备鼠标,大大提高了协同性。At present, the development of electronic equipment is changing with each passing day, and differentiated positioning has led to various types of products derived from electronic equipment. Taking host equipment as an example, under the premise that the traditional computer composition structure remains unchanged, host equipment that meets different needs is designed based solely on the different positioning of screen sizes, such as mobile phones, tablets, laptops, all-in-one computers, etc. For users, they often choose to have multiple host devices at the same time to meet their daily needs. However, due to the lack of interconnection between multiple host devices, users are tired of switching back and forth, and the user experience is extremely poor. In order to improve users' cross-device collaboration, there will be some accessory devices that support the connection of multiple host devices to achieve unified control of multiple host devices. As shown in Figure 1, the mouse 101 can be connected to the notebook computer 111, the all-in-one computer 112, and the tablet computer 113 at the same time. In this scenario, one mouse can uniformly manage the cursor movement, clicking and other operations of the three host devices, thus There is no need to equip each host device with an additional mouse, which greatly improves collaboration.
进一步,如图2所示,在本申请中,在鼠标201同时连接笔记本电脑211、一体机212、平板电脑213时,鼠标201还可以通过控制光标在笔记本电脑211、一体机212、平板电脑213之间进行无缝切换。可选地,鼠标201还可以通过光标拖动选择的文件在主机设备之间进行移动粘贴,比如将笔记本电脑211中的文件拖动到一体机212上,在没有云服务同步的支持下,其实现原理是,当笔记本电脑211图形界面中的文件被鼠标控制的光标拖动到屏幕边缘时,触发将拖动的文件在后台中传输给鼠标201,再通过鼠标201将文件传输给一体机212,相应地在一体机212的图形界面上显示相应的文件。上述方案的缺点在于,配件设备与主机设备的连接通常都是通过蓝牙等低速通讯协议来实现的,主机设备之间的通信通过配件设备来中转,非常受限于配件设备的通信能力,对于复制粘贴大数据量的文件时,这种利用
配件设备来中转传输就显得非常的慢,操作的体验就不会很流畅。Further, as shown in Figure 2, in this application, when the mouse 201 is connected to the notebook computer 211, the all-in-one machine 212, and the tablet computer 213 at the same time, the mouse 201 can also control the cursor on the notebook computer 211, the all-in-one machine 212, and the tablet computer 213. Seamless switching between . Optionally, the mouse 201 can also move and paste the selected files between host devices by dragging the cursor, such as dragging files from the laptop 211 to the all-in-one machine 212, without the support of cloud service synchronization. The implementation principle is that when a file in the graphical interface of the laptop 211 is dragged to the edge of the screen by the cursor controlled by the mouse, the dragged file is triggered to be transferred to the mouse 201 in the background, and then the file is transferred to the all-in-one machine 212 through the mouse 201 , corresponding files are displayed on the graphical interface of the all-in-one machine 212. The disadvantage of the above solution is that the connection between the accessory device and the host device is usually realized through low-speed communication protocols such as Bluetooth. The communication between the host device is relayed through the accessory device, which is very limited by the communication capabilities of the accessory device. For copying When pasting files with large amounts of data, this use Accessory devices are very slow to transfer and transfer, and the operating experience is not very smooth.
在一些示例中,为了提高传输效率,可以在一个主机设备向另一个主机设备传输数据量超过第一阈值时,在主机设备与主机设备之间建立直连通道,通过直连通道进行传输。在一些示例中,在一个主机设备向另一个主机设备传输数据的类型符合设定类型时,在主机设备与主机设备之间建立直连通道,通过直连通道进行传输。具体地,响应于配件设备的跨设备操作,将本来通过配件设备传输的文件直接在主机设备之间建立的直连通道中进行传输,但需要说明的是,自动直连并不局限于为了满足配件设备触发的跨设备传输信息的需求。如图2所示,相对于笔记本电脑211与一体机212之间通过鼠标201进行传输不同,直连方式是在笔记本电脑211和一体机212之间建立直接连接的通道,如虚线所指的通道直接进行相互之间的交互。主机设备之间建立的直连方式可以是WiFi P2P(Peer-to-Peer,点对点)、蓝牙连接、局域网连接等,建立直连所需的网络信息可以通过连接的配件设备获取,以下将详述。In some examples, in order to improve transmission efficiency, when the amount of data transmitted from one host device to another host device exceeds the first threshold, a direct connection channel can be established between the host device and the host device, and the transmission can be performed through the direct connection channel. In some examples, when the type of data transmitted from one host device to another host device meets the set type, a direct connection channel is established between the host device and the host device, and the transmission is performed through the direct connection channel. Specifically, in response to the cross-device operation of the accessory device, the files originally transferred through the accessory device are directly transferred in the direct connection channel established between the host devices. However, it should be noted that the automatic direct connection is not limited to meeting the requirements of The need for cross-device transmission of information triggered by accessory devices. As shown in Figure 2, compared to the transmission between the notebook computer 211 and the all-in-one machine 212 through the mouse 201, the direct connection method is to establish a direct connection channel between the notebook computer 211 and the all-in-one machine 212, as shown by the channel indicated by the dotted line. interact directly with each other. The direct connection method established between host devices can be WiFi P2P (Peer-to-Peer, point-to-point), Bluetooth connection, LAN connection, etc. The network information required to establish a direct connection can be obtained through the connected accessory device, which will be detailed below .
图3为本申请一些示例中主机设备与配件设备之间交互架构示意图。如图3所示,主机设备与配件设备之间连接时,主机设备可以获取到配件设备连接的其他主机设备的网络信息,然后根据配件设备提供的网络信息与对应的主机设备建立连接。具体以蓝牙连接为例,主机设备与配件设备建立蓝牙连接,是通过主机端的配件管理服务310和配件端的配件管理服务330建立,当建立完成后会分别拉起主机端的协同组网服务320和配件端的协同组网服务340工作。在一些示例中,协同组网服务320用于对主机设备进行连接的管理,向协同组网服务340发送本机网络信息,具体包括端口广播模块321、主动连接模块322、已连接配件管理模块323、主机信息管理模块324。其中,端口广播模块321用于开启端口监听与其发起连接的主机设备,发送广播让本机可以被外面的主机设备发现并可以建立连接。已连接配件管理模块323用于管理与其连接的配件设备,比如鼠标、键盘等,通过与已连接的配件设备交互获取配件设备连接的主机设备网络信息。主机信息管理模块324用于管理已连接的主机设备和可连接的主机设备,可连接的主机设备是根据连接的配件设备提供的组网组合来确定的,组网组合可以包括对应配件设备所管理的所有主机设备及相应的网络信息,比如基于与对应配件设备连接的主机设备。相应地,将配件设备连接的主机设备与本机已连接的主机设备进行比较,生成可连接主机设备列表。主动连接模块322用于根据主机信息管理模块324提供的可连接主机设备列表主动与列表中的主机设备进行直连,进一步实现相应的信息交互。在一些示例中,协同组网服务340负责在配件设备与主机设备建立蓝牙连接后,对连接的所有主机设备进行管理,向协同组网服务320发送配件已连接主机网络信息,协同组网服务340主要包括已连接主机网络信息管理模块341,已连接主机网络信息管理模块341基于与主机设备的连接,获取主机设备发送过来的网络信息,该网络信息是用于与该主机设备建立直连的网络参数信息,可选地,网络信息包括IP地址与端口号、WiFi MAC(Media Access Control Address,媒体存取控制位址)地址、蓝牙MAC地址等等。已连接主机网络信息管理模块341将上述网络信息进行保存,在有其他主机设备与自身进行连接时,还可以将保存的网络信息传输给对应的主机设备。Figure 3 is a schematic diagram of the interaction architecture between the host device and the accessory device in some examples of this application. As shown in Figure 3, when the host device and the accessory device are connected, the host device can obtain the network information of other host devices connected to the accessory device, and then establish a connection with the corresponding host device based on the network information provided by the accessory device. Specifically, taking Bluetooth connection as an example, the Bluetooth connection established between the host device and the accessory device is established through the accessory management service 310 on the host side and the accessory management service 330 on the accessory end. When the establishment is completed, the collaborative networking service 320 and the accessory on the host end will be launched respectively. Collaborative networking service 340 works on the end. In some examples, the collaborative networking service 320 is used to manage the connection of the host device and send local network information to the collaborative networking service 340, specifically including a port broadcast module 321, an active connection module 322, and a connected accessory management module 323. , host information management module 324. Among them, the port broadcast module 321 is used to open a port to monitor the host device with which it initiates a connection, and sends a broadcast so that the local machine can be discovered by external host devices and can establish a connection. The connected accessory management module 323 is used to manage accessory devices connected thereto, such as mice, keyboards, etc., and obtain network information of the host device connected to the accessory device by interacting with the connected accessory device. The host information management module 324 is used to manage connected host devices and connectable host devices. The connectable host devices are determined according to the networking combination provided by the connected accessory device. The networking combination may include those managed by the corresponding accessory device. All host devices and corresponding network information, such as host devices based on connections to corresponding accessory devices. Accordingly, the host device connected to the accessory device is compared with the host device connected to the machine to generate a list of connectable host devices. The active connection module 322 is configured to proactively directly connect to the host devices in the list according to the list of connectable host devices provided by the host information management module 324 to further realize corresponding information interaction. In some examples, the collaborative networking service 340 is responsible for managing all connected host devices after the accessory device establishes a Bluetooth connection with the host device, and sending accessory connected host network information to the collaborative networking service 320. The collaborative networking service 340 It mainly includes a connected host network information management module 341. The connected host network information management module 341 obtains network information sent by the host device based on the connection with the host device. The network information is used to establish a directly connected network with the host device. Parameter information, optionally, network information includes IP address and port number, WiFi MAC (Media Access Control Address) address, Bluetooth MAC address, etc. The connected host network information management module 341 saves the above network information, and when other host devices are connected to itself, it can also transmit the saved network information to the corresponding host device.
图4为本申请一些示例中主机连接方法流程图。如图4所示,主机连接方法,具体地可以应用于配件设备中,比如蓝牙鼠标、蓝牙键盘等,所述主机连接方法包括步骤S401、步骤S402,其中,Figure 4 is a flow chart of a host connection method in some examples of this application. As shown in Figure 4, the host connection method can be specifically applied to accessory devices, such as Bluetooth mice, Bluetooth keyboards, etc. The host connection method includes steps S401 and S402, wherein,
步骤S401、第一配件管理至少第一主机的第一网络信息,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的。Step S401: The first accessory manages at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host.
在第一配件中,包括有存储主机设备网络信息的存储单元,在第一配件与任意主机设备
进行连接之后,比如第一主机,会接收到第一主机发送过来的用于与第一主机建立连接的第一网络信息,第一配件会将第一网络信息保存在存储单元中供其他主机设备连接时发送给对应的主机设备。第一网络信息可以包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种,以根据不同的情况,选择不同的直连方式,比如通过IP地址、端口号实现局域网连接,通过WiFi MAC地址实现WiFi直连,通过蓝牙MAC地址实现蓝牙连接等。进一步,网络信息中可以同时包括不同直连方式的网络信息,设置不同直连方式的优先级,根据不同的情况优先使用对应的直连方式。The first accessory includes a storage unit that stores network information of the host device. Between the first accessory and any host device After the connection is made, for example, the first host will receive the first network information sent by the first host to establish a connection with the first host, and the first accessory will save the first network information in the storage unit for other host devices. Sent to the corresponding host device when connecting. The first network information may include one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address, so that different direct connection methods can be selected according to different situations, such as realizing LAN connection through IP address and port number. , realize WiFi direct connection through WiFi MAC address, realize Bluetooth connection through Bluetooth MAC address, etc. Furthermore, the network information may include network information of different direct connection methods at the same time, set the priorities of different direct connection methods, and use the corresponding direct connection method preferentially according to different situations.
可选地,所述第一配件还管理所述第一主机具有的第三主机的第三网络信息,所述第三网络信息是所述第一配件基于与所述第一主机的连接获取的。对于第一主机而言,在实际的应用场景中,不仅与第一配件连接,还可能与第二配件连接,而第二配件不仅与第一主机进行连接,还可能与其他主机设备进行连接,比如第三主机。第一主机具有的其他主机设备网络信息可以来源于第一配件提供的连接主机设备网络信息,也可以来源于第二配件提供的连接主机设备网络信息,因此,第一配件可以通过第一主机获取到第二配件连接第三主机的第三网络信息,提高了组网组合的范围。Optionally, the first accessory also manages third network information of a third host owned by the first host, and the third network information is obtained by the first accessory based on the connection with the first host. . For the first host, in actual application scenarios, it is not only connected to the first accessory, but also may be connected to the second accessory, and the second accessory is not only connected to the first host, but may also be connected to other host devices. For example, the third host. The network information of other host devices possessed by the first host can be derived from the network information of the connected host device provided by the first accessory, or can also be derived from the network information of the connected host device provided by the second accessory. Therefore, the first accessory can be obtained through the first host. The second accessory is connected to the third network information of the third host, thereby increasing the range of networking combinations.
需要说明的是,当第一配件与第一主机建立连接时,比如蓝牙鼠标与笔记本电脑建立蓝牙连接,可以通过笔记本电脑查看到鼠标的相关配置信息,比如可以查看鼠标的名称及设备类型等,进一步,还可以针对鼠标进行相应的配置。如图6所示,当鼠标与笔记本电脑建立连接后,可以在笔记本电脑的屏幕中调出连接的鼠标配置界面,以至少可以配置笔记本电脑是否允许基于鼠标的主机直连,即笔记本电脑是否可以主动与鼠标连接的其他主机设备发起连接,或同意与鼠标连接的其他主机设备发起的连接,相应地,可以是指主机设备和配件设备之间是否可以交换网络信息,即主机设备是否可以向配件设备发送自身的网络信息,或者配件设备是否可以向主机设备发送其他主机设备的网络信息。可选地,通过拨动开关来获取用户授权的选择,当用户配置允许时,即获取到用户授权,笔记本电脑会将自身的网络信息发送给鼠标,连接鼠标的其他主机设备也可以通过鼠标提供的网络信息与笔记本电脑建立连接。当用户配置拒绝时,即未获取到用户授权,笔记本电脑即使与鼠标连接也不会主动将自身的网络信息发送给鼠标,相应地,连接鼠标的其他主机设备也不会基于这个鼠标知道笔记本电脑的存在。即对于连接配件设备的主机设备而言,只有获取到用户授权的主机设备才会向配件设备发送网络信息,并由配件设备在连接的网络中共享这个主机设备的网络信息。在一些示例中,主机设备可以将接收到的用户授权同步给对应的配件设备,以使配件设备确定是否可以与对应主机设备交换网络信息,在一些示例中,配件设备也可以根据对应主机设备是否向配件设备自身发送主机设备的网络信息来确定对应主机设备是否获取到用户授权。可选地,对于配件设备而言,在接入到主机设备时,在一些示例中,是在主机设备的屏幕上自动弹出上述的配置界面由用户来配置直连的选项,在一些示例中,是默认允许或拒绝基于该配件设备的主机直连,即主机设备与配件设备连接时触发主机设备自动发送网络信息给配件设备,或不会向对应配件设备发送网络信息,在直连方面不做任何处理,用户根据实际的需要可以调用相应的配置界面来改变设置。It should be noted that when the first accessory establishes a connection with the first host, for example, a Bluetooth mouse establishes a Bluetooth connection with a laptop, the relevant configuration information of the mouse can be viewed through the laptop, such as the name and device type of the mouse, etc. Furthermore, you can also configure the mouse accordingly. As shown in Figure 6, after the mouse is connected to the laptop, the connected mouse configuration interface can be called up on the screen of the laptop to at least configure whether the laptop allows mouse-based direct connection to the host, that is, whether the laptop can Actively initiate connections with other host devices connected to the mouse, or agree to connections initiated by other host devices connected with the mouse. Correspondingly, it can refer to whether network information can be exchanged between the host device and the accessory device, that is, whether the host device can send messages to the accessory. The device sends its own network information, or the accessory device can send the network information of other host devices to the host device. Optionally, you can choose to obtain user authorization by flipping the switch. When the user configuration allows it, the user authorization is obtained. The laptop will send its own network information to the mouse. Other host devices connected to the mouse can also provide it through the mouse. network information to establish a connection with the laptop. When the user configuration is rejected, that is, user authorization has not been obtained. Even if the laptop is connected to the mouse, it will not actively send its own network information to the mouse. Correspondingly, other host devices connected to the mouse will not know the laptop based on this mouse. The presence. That is, for the host device connected to the accessory device, only the host device that has obtained user authorization will send network information to the accessory device, and the accessory device will share the network information of the host device in the connected network. In some examples, the host device can synchronize the received user authorization to the corresponding accessory device, so that the accessory device can determine whether network information can be exchanged with the corresponding host device. In some examples, the accessory device can also determine whether the corresponding host device can Send the network information of the host device to the accessory device itself to determine whether the corresponding host device has obtained user authorization. Optionally, for the accessory device, when it is connected to the host device, in some examples, the above configuration interface automatically pops up on the screen of the host device for the user to configure direct connection options. In some examples, By default, the host device is allowed or denied direct connection based on the accessory device. That is, when the host device is connected to the accessory device, the host device is triggered to automatically send network information to the accessory device, or network information is not sent to the corresponding accessory device. There is no direct connection. For any processing, users can call the corresponding configuration interface to change settings according to actual needs.
步骤S402、所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息,所述第一网络信息用于所述第二主机与所述第一主机建立连接。Step S402: The first accessory sends the first network information to at least a second host connected to the first accessory. The first network information is used for the second host to establish a connection with the first host. .
如步骤S401所述,在第一配件中至少具有第一网络信息,第一配件可以将第一网络信息向连接的任意主机设备进行分发,第一主机与第一配件连接,第一配件也可以将第一网络信息返回给第一主机。更重要的是,当有其他主机设备与第一配件连接时,比如第二主机,第
一配件将第一网络信息发送给第二主机。可选地,第二主机也可以是在第一配件获取到第一网络信息前就与第一配件建立连接,此时第一配件可以根据已连接的主机设备信息来向第二主机更新发送第一网络信息。第二主机在接收到了第一网络信息后,就可以根据第一网络信息与第一主机建立连接。可选地,第二主机在接收到第一网络信息时,并不必然立即与第一主机建立连接,可以在满足相应的触发条件时调用对应网络信息与对应主机设备建立连接。在一些示例中,第一配件通过控制可以触发第一主机向第二主机传输数据或触发第二主机向第一主机传输数据,主机设备之间存在数据传输需求,可以先将待传输的数据传输到配件设备中,然后再由配件设备转发到对应的主机设备。在一些示例中,为了减少配件设备传输效率的限制,在第一配件触发时,第二主机可以根据第一配件提供的第一网络信息与第一主机建立连接,当连接成功时,直接通过第一主机与第二主机之间的直连通道进行数据传输。可选地,当数据传输结束时,还可以将第一主机与第二主机之间的直连通道关闭。在一些示例中,所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的类型符合设定类型时,设定类型比如是数据量普遍较大的数据类型,或者特定场景下主机设备之间直接传输更为合适的数据类型,所述第一配件触发所述第一主机、第二主机之间建立连接,在传输数据的类型不符合设定类型时,第一主机、第二主机之间的数据传输仍然通过第一配件传输数据,可选地,第一主机、第二主机之间不建立连接。在一些示例中,所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的数据量超过第一阈值时,第一阈值用于判断数据量的大小,所述第一配件触发所述第一主机、第二主机之间建立连接,在传输数据的数据量不超过第一阈值时,第一主机、第二主机之间的数据传输仍然通过第一配件传输数据,可选地,第一主机、第二主机之间不建立连接。As described in step S401, the first accessory has at least first network information. The first accessory can distribute the first network information to any connected host device. The first host is connected to the first accessory, and the first accessory can also Return the first network information to the first host. More importantly, when there are other host devices connected to the first accessory, such as the second host, the An accessory sends the first network information to the second host. Optionally, the second host may also establish a connection with the first accessory before the first accessory obtains the first network information. At this time, the first accessory may update and send the second accessory to the second host based on the connected host device information. 1. Network information. After receiving the first network information, the second host can establish a connection with the first host based on the first network information. Optionally, when the second host receives the first network information, it does not necessarily establish a connection with the first host immediately. It can call the corresponding network information to establish a connection with the corresponding host device when the corresponding trigger condition is met. In some examples, the first accessory can trigger the first host to transmit data to the second host or trigger the second host to transmit data to the first host through control. If there is a data transmission requirement between the host devices, the data to be transmitted can be transmitted first. to the accessory device, and then forwarded by the accessory device to the corresponding host device. In some examples, in order to reduce the limitation on the transmission efficiency of the accessory device, when the first accessory is triggered, the second host can establish a connection with the first host based on the first network information provided by the first accessory. When the connection is successful, the second host can directly connect to the first host through the first accessory. A direct connection channel between one host and a second host carries out data transmission. Optionally, when the data transmission ends, the direct connection channel between the first host and the second host can also be closed. In some examples, when the first accessory triggers the transmission of data between the first host and the second host and the type of transmitted data conforms to a set type, the set type is, for example, a data type with a generally large amount of data, or In a specific scenario, a more appropriate data type is directly transmitted between host devices. The first accessory triggers the establishment of a connection between the first host and the second host. When the type of transmitted data does not meet the set type, the first accessory triggers the establishment of a connection between the first host and the second host. Data transmission between the host and the second host still transmits data through the first accessory. Optionally, no connection is established between the first host and the second host. In some examples, when the first accessory triggers the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold, the first threshold is used to determine the size of the data amount, and the third An accessory triggers the establishment of a connection between the first host and the second host. When the amount of data transmitted does not exceed the first threshold, the data transmission between the first host and the second host still transmits data through the first accessory. Optionally, no connection is established between the first host and the second host.
在一些示例中,主机设备之间的连接可以需要一定的认证要求,在第二主机向第一主机发起连接时,第一主机可以选择同意发起的连接,与其完成连接,也可以拒绝发起的连接,连接失败,这样可以提高主机设备之间连接的安全性,减少其他非法的连接请求。在一些示例中,所述第一配件管理所述第二主机的第二网络信息,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;所述第一配件向所述第一主机发送所述第二网络信息,所述第二网络信息用于所述第一主机同意所述第二主机发起的第一连接。第一配件在获取到第二网络信息后,对等地会向第一主机发送第二网络信息,第一主机同样可以根据第二网络信息与第二主机建立连接,更重要的是,当第二主机向第一主机发起第一连接时,第一主机可以根据第二网络信息来判断符合权限的第二主机,从而同意第二主机发起的第一连接。可选地,当有其他主机设备向第一主机发起第一连接,对应主机设备的网络信息并不与第二网络信息一致,拒绝相应的第一连接。需要说明的是,由于第一主机、第二主机都是与第一配件连接的,都是在第一配件的组网组合中的,因此基于第一配件的组网组合可以确定第一主机与第二主机都具有合法发起连接的权限,相应地,组网组合中的第一主机、第二主机也必然排除掉为非法连接的主机设备。可选地,第一配件与第一主机的连接、第一配件与第二主机的连接是在认证成功时才会建立,比如蓝牙键盘在与对应的主机设备进行蓝牙连接时,需要相应的验证码认证,只有认证成功时才会建立连接,这种主机设备与配件设备的认证关系可以合理地延伸到连接到同一配件设备的多个主机设备之间,因为通常情况下,配件设备的用户与连接配件设备的主机设备用户为同一个或者同属一个用户组,因此基于配件设备的连接逻辑使整个组网组合中的主机设备都在同一个权限范围内,这个与基于同一账号的权限管理截然不同,有效地利用了实际应用场景中的隐含信息,提高了管理的灵活性。In some examples, the connection between host devices may require certain authentication requirements. When the second host initiates a connection to the first host, the first host may choose to agree to the initiated connection, complete the connection with it, or reject the initiated connection. , connection failure, this can improve the security of the connection between host devices and reduce other illegal connection requests. In some examples, the first accessory manages second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host; the first accessory manages the second network information of the second host. The accessory sends the second network information to the first host, where the second network information is used by the first host to agree to the first connection initiated by the second host. After the first accessory obtains the second network information, the peer will send the second network information to the first host. The first host can also establish a connection with the second host based on the second network information. More importantly, when the second accessory When the second host initiates a first connection to the first host, the first host can determine the second host that meets the authority based on the second network information, thereby agreeing to the first connection initiated by the second host. Optionally, when another host device initiates a first connection to the first host and the network information of the corresponding host device is not consistent with the second network information, the corresponding first connection is rejected. It should be noted that since the first host and the second host are both connected to the first accessory and are in the networking combination of the first accessory, it can be determined based on the networking combination of the first accessory and the first host. The second host has the authority to legally initiate connections. Correspondingly, the first host and the second host in the networking combination must also exclude host devices with illegal connections. Optionally, the connection between the first accessory and the first host and the connection between the first accessory and the second host will be established only when the authentication is successful. For example, when a Bluetooth keyboard makes a Bluetooth connection with the corresponding host device, corresponding verification is required. Code authentication, the connection will be established only when the authentication is successful. This authentication relationship between the host device and the accessory device can be reasonably extended to multiple host devices connected to the same accessory device, because usually, the user of the accessory device and The host device users connecting to the accessory device are the same or belong to the same user group. Therefore, the connection logic based on the accessory device makes the host devices in the entire network combination within the same permission range. This is completely different from the permission management based on the same account. , effectively utilizing the implicit information in actual application scenarios and improving management flexibility.
图5为本申请一些示例中主机连接方法流程图。如图5所示,主机连接方法,具体地可
以应用于主机设备中,比如笔记本电脑、平板电脑、一体机等,所述主机连接方法包括步骤S501、步骤S502,其中,Figure 5 is a flow chart of a host connection method in some examples of this application. As shown in Figure 5, the host connection method can specifically To be applied to host devices, such as notebook computers, tablet computers, all-in-one computers, etc., the host connection method includes steps S501 and step S502, wherein,
步骤S501、第一主机接收第一配件发送的第二主机的第二网络信息,所述第一主机与所述第一配件连接,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的。Step S501: The first host receives the second network information of the second host sent by the first accessory. The first host is connected to the first accessory. The second network information is the first accessory based on the connection with the first accessory. The connection of the second host is obtained.
在一些示例中,所述第一主机向所述第一配件发送所述第一主机的第一网络信息,以使连接所述第一配件的至少第二主机获取所述第一网络信息。对于第一主机而言,当有第一配件与第一主机连接时,会将第一主机的第一网络信息发送给第一配件。可选地,第一主机也可以在与第一配件连接时不立即向第一配件发送第一网络信息,需要基于所述第一主机与所述第一配件交换网络信息的用户授权来确定向第一配件发送第一网络信息。如图6所示,当第一配件与第一主机连接成功后,会通过相应的配置界面来选择第一主机有没有基于第一配件的直连需要,如果没有,则关闭开关,第一主机不会向第一配件发送第一网络信息,如果有,则打开开关,通过打开操作触发第一主机基于与第一配件的连接向第一配件发送第一网络信息。第一配件接收到第一网络信息后可以对第一网络信息进行存储及分发的管理,当第二主机与第一配件进行连接时,第一配件就可以将第一网络信息发送给第二主机,可选地,第二主机在获取到所述第二主机与所述第一配件交换网络信息的用户授权时,相应的用户授权可以被第一配件所获取到,比如授权信息同步、获取到第二主机主动发送的第二网络信息,第一配件向第二主机发送第一网络信息,第二主机在没有获取到所述第二主机与所述第一配件交换网络信息的用户授权时,第一配件就不向第二主机发送第一网络信息。In some examples, the first host sends the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information. For the first host, when a first accessory is connected to the first host, the first network information of the first host is sent to the first accessory. Optionally, the first host may not immediately send the first network information to the first accessory when connected to the first accessory. The first host needs to determine the destination based on the user authorization for exchanging network information between the first host and the first accessory. The first accessory sends the first network information. As shown in Figure 6, when the first accessory is successfully connected to the first host, it will be selected through the corresponding configuration interface whether the first host needs direct connection based on the first accessory. If not, the switch will be turned off and the first host will The first network information will not be sent to the first accessory. If yes, the switch is turned on, and the opening operation triggers the first host to send the first network information to the first accessory based on the connection with the first accessory. After receiving the first network information, the first accessory can store and distribute the first network information. When the second host is connected to the first accessory, the first accessory can send the first network information to the second host. , optionally, when the second host obtains the user authorization for exchanging network information between the second host and the first accessory, the corresponding user authorization can be obtained by the first accessory, for example, the authorization information is synchronized and obtained. The second host actively sends the second network information, and the first accessory sends the first network information to the second host. When the second host does not obtain the user authorization for the second host to exchange network information with the first accessory, The first accessory does not send the first network information to the second host.
对等地,第二主机在与第一配件连接时,也可以基于两者的连接关系将第二主机的第二网络信息发送到第一配件,第一配件基于与第一主机的连接可以将第二网络信息发送给第一主机。因此,第一主机就可以接收到第二主机的第二网络信息,如果判断第一主机未与所述第二主机建立连接时,所述第一主机确定所述第二主机为所述第一主机的可连接主机设备,然后第一主机可以根据第二网络信息与第二主机建立连接。在一些示例中,第一主机与第二主机建立连接是由第二主机发起第一连接,所述第一主机根据所述第二网络信息同意所述第二主机发起的第一连接。进一步,第一主机在接收到第二主机的第一连接请求时,还会对第二主机的身份进行认证,可选地,判断第二主机是否与第一主机连接同一个配件设备,如果是,则同意第二主机发起的第一连接,如果否,则拒绝第二主机发起的第一连接。在一些示例中,所述第一主机根据所述第二网络信息向所述第二主机发起第二连接,以实现第一主机与第二主机建立连接。可选地,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种,选择具体的网络信息确定具体的直连方式。Peer-to-peer, when the second host is connected to the first accessory, it can also send the second network information of the second host to the first accessory based on the connection relationship between the two. The first accessory can also send the second network information of the second host to the first accessory based on the connection with the first host. The second network information is sent to the first host. Therefore, the first host can receive the second network information of the second host. If it is determined that the first host has not established a connection with the second host, the first host determines that the second host is the first host. The host device can be connected to the host device, and then the first host can establish a connection with the second host according to the second network information. In some examples, when the first host establishes a connection with the second host, the second host initiates the first connection, and the first host agrees to the first connection initiated by the second host based on the second network information. Further, when receiving the first connection request from the second host, the first host will also authenticate the identity of the second host, and optionally determine whether the second host is connected to the same accessory device as the first host. If so, , then the first connection initiated by the second host is accepted; if not, the first connection initiated by the second host is rejected. In some examples, the first host initiates a second connection to the second host according to the second network information, so that the first host establishes a connection with the second host. Optionally, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address. Select the specific network information to determine the specific direct connection method.
在一些示例中,第一主机不仅与第一配件进行连接,还会跟第二配件进行连接,比如一体机同时连接蓝牙鼠标和蓝牙键盘,在获取到连接的蓝牙鼠标管理的其他主机设备的网络信息后,还会与连接的蓝牙键盘进行网络信息交换。可选地,所述第一主机接收第二配件发送的第三主机的第三网络信息,所述第一主机与所述第二配件连接,所述第三网络信息是所述第二配件基于与所述第三主机的连接获取的;所述第一主机根据所述第三网络信息与所述第三主机建立连接。可选地,所述第一主机向所述第二配件发送所述第一主机的第一网络信息,以使连接所述第二配件的至少第三主机获取所述第一网络信息。第一主机不仅可以与第一配件连接的主机设备进行直连,也可以与第二配件连接的主机设备进行直连,扩大可直连的范围。In some examples, the first host not only connects to the first accessory, but also connects to the second accessory. For example, an all-in-one machine is connected to a Bluetooth mouse and a Bluetooth keyboard at the same time. After obtaining the network of other host devices managed by the connected Bluetooth mouse, After receiving the information, it will also exchange network information with the connected Bluetooth keyboard. Optionally, the first host receives the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is based on the second accessory. The connection with the third host is obtained; the first host establishes a connection with the third host according to the third network information. Optionally, the first host sends the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information. The first host can be directly connected not only to the host device connected to the first accessory, but also to the host device connected to the second accessory, thereby expanding the scope of direct connection.
可选地,第一主机还向第一配件发送第一主机具有的其他主机设备网络信息。第一主机由于可以连接多个配件设备,比如第一配件、第二配件,因此第一主机具有的其他主机设备
网络信息可以包括与第一配件连接的主机设备网络信息及与第二配件连接的主机设备网络信息。在一些示例中,与第二配件连接的主机设备可能并没有与第一配件进行连接,对于连接第一配件的第二主机而言,在第一主机不发送自身具有的其他主机设备网络信息给第一配件时,第二主机是无法与第二配件连接的主机设备进行直连的,因为第二主机不能通过第一配件获取到这些主机设备的网络信息。相应地,所述第一主机向所述第一配件发送所述第三网络信息,以使所述第二主机获取所述第三网络信息,第三网络信息是连接第二配件的第三主机的网络信息,这样可以大大提高直连的主机设备范围,第一配件、第二配件叠加的组网组合在使用场景上也是统一的,仍然具有一定的关联性。Optionally, the first host also sends network information of other host devices owned by the first host to the first accessory. Since the first host can connect to multiple accessory devices, such as the first accessory and the second accessory, other host devices owned by the first host The network information may include network information of the host device connected to the first accessory and network information of the host device connected to the second accessory. In some examples, the host device connected to the second accessory may not be connected to the first accessory. For the second host connected to the first accessory, the first host does not send the network information of other host devices it has to the second accessory. When the first accessory is used, the second host cannot directly connect to the host device connected to the second accessory, because the second host cannot obtain the network information of these host devices through the first accessory. Correspondingly, the first host sends the third network information to the first accessory, so that the second host obtains the third network information. The third network information is the third host connected to the second accessory. This can greatly increase the range of directly connected host devices. The networking combination of the first accessory and the second accessory is also unified in usage scenarios and still has a certain relevance.
在一些示例中,第一主机、第二主机在接收到对方的网络信息时,并不立即建立连接,而是根据第一配件或第二配件的触发执行连接,所述第一配件或第二配件的触发指示第一主机向第二主机传输数据或第二主机向第一主机传输数据,当存在传输需求时,触发第一主机与第二主机建立连接。在一些示例中,所述第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的类型符合设定类型时,设定类型比如是数据量普遍较大的数据类型,或者特定场景下主机设备之间直接传输更为合适的数据类型,所述第一主机与所述第二主机建立连接,在传输数据的类型不符合设定类型时,第一主机与第二主机的数据传输仍然通过第一配件传输数据,第一主机不与第二主机建立连接。在一些示例中,所述第一配件或第二主机触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的数据量超过第一阈值时,第一阈值用于判断数据量的大小,所述第一主机与第二主机建立连接,在传输数据的数据量不超过第一阈值时,第一主机与第二主机的数据传输仍然通过第一配件传输数据,可选地,第一主机不与第二主机建立连接。In some examples, when the first host and the second host receive each other's network information, they do not immediately establish a connection, but perform the connection based on the trigger of the first accessory or the second accessory. The trigger of the accessory instructs the first host to transmit data to the second host or the second host to transmit data to the first host. When there is a transmission requirement, the first host is triggered to establish a connection with the second host. In some examples, when the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the type of transmission data matches the set type, it is set A certain type is, for example, a data type that generally has a large amount of data, or a data type that is more suitable for direct transmission between host devices in a specific scenario. The first host establishes a connection with the second host, and the type of data to be transmitted does not matter. When the set type is met, the data transmission between the first host and the second host still transmits data through the first accessory, and the first host does not establish a connection with the second host. In some examples, when the first accessory or the second host triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, The first threshold is used to determine the amount of data. The first host establishes a connection with the second host. When the amount of data to be transmitted does not exceed the first threshold, the data transmission between the first host and the second host still passes through the first The accessory transmits data and optionally the first host does not establish a connection with the second host.
图6为本申请一些示例中主机直连配置界面示意图。如图6所示,每当配件设备与主机设备建立连接时,都会存在相应的配置界面,通过拨动配置界面上的开关可以进行自由地配置。当配置允许基于对应配件设备的直连时,相应的主机设备可以与连接的配件设备交换网络信息,同时还可以根据对应配件设备提供的其他主机设备的网络信息与其他主机设备建立连接。进一步,当对应的主机设备与其他主机设备已经建立连接后,仍然可以对图6所示的配置进行修改,即将允许基于鼠标的直连选项关闭,此时对应的主机设备自动与其他主机设备断开连接,可选地,通知连接的配件设备删除本机的网络信息。如果需要重新与其他主机设备建立连接,则可以将允许基于鼠标的直连选项再次打开。Figure 6 is a schematic diagram of the host direct connection configuration interface in some examples of this application. As shown in Figure 6, whenever the accessory device establishes a connection with the host device, there will be a corresponding configuration interface, which can be configured freely by flipping the switches on the configuration interface. When the configuration allows direct connection based on the corresponding accessory device, the corresponding host device can exchange network information with the connected accessory device, and can also establish connections with other host devices based on the network information of other host devices provided by the corresponding accessory device. Furthermore, after the corresponding host device has established a connection with other host devices, the configuration shown in Figure 6 can still be modified, that is, the mouse-based direct connection option is turned off. At this time, the corresponding host device automatically disconnects from other host devices. Open the connection, and optionally notify the connected accessory device to delete the network information of the machine. If you need to re-establish a connection with another host device, you can turn the Allow mouse-based direct connections option back on.
如图7所示,在一些示例中,比如WiFi P2P直连,主机A在接收到主机B的网络信息后,其中网络信息包括主机B的WiFi MAC地址,作为发起端向主机B(接收端)发起连接,准备与主机B建立WiFi直连。主机B可以通过图3所示的端口广播模块321实现步骤S701监听,主机A根据主机B的网络信息发起步骤S702扫描,主机B在监听过程中接收到主机A的连接请求时,如果接收主机A的连接,对主机A实现步骤S703的回应,主机A在步骤S704中确定发现到设备,进入步骤S705,连接到主机B,主机B实施步骤S706响应主机A通道建立成功,并进入步骤S707完成连接。主机A与主机B建立直连通道后,就可以直接进行信息交互。由于主机A与主机B之间建立连接完全是自动的,所以大大提高了用户的体验。As shown in Figure 7, in some examples, such as WiFi P2P direct connection, host A, after receiving the network information of host B, where the network information includes the WiFi MAC address of host B, acts as the initiator to host B (receiving end) Initiate a connection and prepare to establish a WiFi direct connection with host B. Host B can implement step S701 monitoring through the port broadcast module 321 shown in Figure 3. Host A initiates step S702 scanning based on host B's network information. When host B receives a connection request from host A during the monitoring process, if host A receives connection, host A responds to step S703. Host A determines that the device has been found in step S704, enters step S705, and connects to host B. Host B implements step S706 to respond to host A that the channel is successfully established, and enters step S707 to complete the connection. . After host A and host B establish a direct connection channel, they can directly exchange information. Since the connection between host A and host B is completely automatic, the user experience is greatly improved.
如图8所示,在一些示例中,主机A、主机B可以通过蓝牙与配件建立连接,在连接的状态下,配件可以分别对主机A、主机B实现信息交互。在步骤S811中,主机A与配件建立蓝牙连接,本示例中,主机A与配件连接成功后,默认可以立即向配件分享本机的网络信
息,相应地,步骤S812向配件发送主机A网络信息。配件将主机A网络信息保存在配件已连接主机网络信息中,并根据配件的连接情况向连接的主机设备发送配件已连接主机网络信息,相应地,步骤S813向主机A发送主机A网络信息,因为此时配件已连接主机网络信息中只有主机A网络信息。步骤S821中,主机B与配件同样建立蓝牙连接,主机B也是在连接成功后,通过步骤S822向配件发送主机B网络信息,此时配件已连接主机网络信息中不仅具有主机A网络信息,并更新增加主机B网络信息,分别通过步骤S823、步骤S824向主机B、主机A发送更新后包括主机A网络信息、主机B网络信息的配件已连接主机网络信息,可选地,配件在发送配件已连接主机网络信息时,可以根据接收的主机设备对象,将对应主机设备的网络信息从配件已连接主机网络信息中删除,减少冗余。在步骤S831、步骤S832中,主机A、主机B在接收到配件已连接主机网络信息后,与自身已经连接的主机设备进行比较,将未连接的主机设备确定为可连接的主机设备。在本示例中,对于主机A,主机B就是可连接的主机设备,对于主机B,主机A就是可连接的主机设备,因此进入步骤S833,主机A与主机B建立直连连接,比如主机A根据可连接主机B的网络信息向主机B发起连接,或者主机B根据可连接主机A的网络信息向主机A发起连接,主机A与主机B之间完成连接后就可以相互进行直接的信息交互。As shown in Figure 8, in some examples, host A and host B can establish connections with the accessory through Bluetooth. In the connected state, the accessory can implement information exchange with host A and host B respectively. In step S811, the host A establishes a Bluetooth connection with the accessory. In this example, after the host A successfully connects with the accessory, by default, the host A can immediately share the network information of the host with the accessory. information, accordingly, step S812 sends the host A network information to the accessory. The accessory saves the host A network information in the accessory connected host network information, and sends the accessory connected host network information to the connected host device according to the connection status of the accessory. Correspondingly, step S813 sends the host A network information to the host A, because At this time, the network information of the accessory connected to the host only contains the network information of host A. In step S821, host B and the accessory also establish a Bluetooth connection. After the connection is successful, host B sends host B network information to the accessory through step S822. At this time, the accessory has connected to the host. The network information not only contains the network information of host A, but also updates Add the network information of host B, and send the updated accessory connected host network information including the network information of host A and the network information of host B to host B and host A through steps S823 and S824 respectively. Optionally, the accessory sends the accessory connected host network information after sending the accessory connected When receiving host network information, you can delete the network information of the corresponding host device from the host network information connected to the accessory based on the received host device object to reduce redundancy. In steps S831 and S832, after receiving the information that the accessory is connected to the host network, host A and host B compare the accessory with the connected host device and determine the unconnected host device as a connectable host device. In this example, for host A, host B is a connectable host device, and for host B, host A is a connectable host device. Therefore, step S833 is entered, and host A and host B establish a direct connection. For example, host A according to The network information that can be connected to host B initiates a connection to host B, or host B initiates a connection to host A based on the network information that can be connected to host A. After the connection is completed between host A and host B, they can directly exchange information with each other.
如图9所示,在一些示例中,主机设备与配件设备进行连接时,并不默认向配件设备分享自身的网络信息,即主机设备需要在用户授权的前提下才会实现与其他主机设备的直连步骤。主机A、主机B与配件建立蓝牙连接后,可以正常的实现配件对主机A、主机B的操作控制等,配件中并没有存储有主机A、主机B的网络信息,需要等待用户的授权操作。步骤S911,用户对主机A实施允许直连操作,主机A可以与其他主机设备自动建立直连。主机A在直连授权下通过步骤S912向配件发送主机A网络信息,配件将主机A网络信息保存在配件已连接主机网络信息中,通过步骤S913向主机A发送包括主机A网络信息的配件已连接主机网络信息。在步骤S921中,用户也对主机B实施允许直连的操作,主机B通过步骤S922向配件发送主机B网络信息,此时配件已连接主机网络信息更新包括主机A网络信息、主机B网络信息,分别通过步骤S923、步骤S924向主机B、主机A发送更新后的配件已连接主机网络信息,可选地,配件在发送配件已连接主机网络信息时,可以根据接收的主机设备对象,将对应主机设备的网络信息从配件已连接主机网络信息中删除,减少冗余。在步骤S931、步骤S932中,主机A、主机B在接收到包括主机A网络信息、主机B网络信息的配件已连接主机网络信息后,与自身已经连接的主机设备进行比较,将与自身未连接的主机设备确定为自身可连接的主机设备。在本示例中,对于主机A,主机B就是可连接的主机设备,对于主机B,主机A就是可连接的主机设备,因此进入步骤S933,主机A与主机B建立直连连接,主机A与主机B之间在完成连接后就可以相互进行直接的信息交互。As shown in Figure 9, in some examples, when the host device connects with the accessory device, it does not share its own network information with the accessory device by default. That is, the host device needs to be authorized by the user before it can realize the communication with other host devices. Direct connection steps. After host A and host B establish a Bluetooth connection with the accessory, the accessory can normally control the operation of host A and host B. The accessory does not store the network information of host A and host B and needs to wait for the user's authorization operation. Step S911: The user performs a direct connection operation on host A, and host A can automatically establish a direct connection with other host devices. Host A sends host A network information to the accessory through step S912 under direct connection authorization. The accessory saves host A network information in the accessory connected host network information, and sends accessory connected including host A network information to host A through step S913. Host network information. In step S921, the user also performs the operation of allowing direct connection to host B. Host B sends host B network information to the accessory through step S922. At this time, the accessory has been connected to the host network information update, including host A network information and host B network information. The updated accessory connected host network information is sent to host B and host A through steps S923 and S924 respectively. Optionally, when the accessory sends the accessory connected host network information, the corresponding host device object can be The network information of the device is deleted from the network information of the host connected to the accessory to reduce redundancy. In steps S931 and S932, after receiving the accessory-connected host network information including the network information of host A and the network information of host B, host A and host B compare the host devices with which they are connected, and compare the host devices with which they are not connected. The host device is determined to be a host device that it can connect to. In this example, for host A, host B is a connectable host device, and for host B, host A is a connectable host device. Therefore, step S933 is entered. Host A and host B establish a direct connection. Host A and host B After the connection is completed, B can directly exchange information with each other.
如图10所示,在一些示例中,与图8的示例类似,主机A通过步骤S1011到步骤S1013在建立蓝牙连接后触发向配件发送主机A网络信息并获取配件返回的配件已连接主机网络信息(包含主机A网络信息),主机B通过步骤S1021到步骤S1023在建立蓝牙连接后触发向配件发送主机B网络信息并获取配件返回的配件已连接主机网络信息(包括主机A、主机B网络信息),配件已连接主机网络信息中由于更新增加了主机B网络信息,因此还会通过步骤S1024向主机A返回更新后的配件已连接主机网络信息。主机A通过配件提供的配件已连接主机网络信息可以知道主机B是可连接的主机设备,相应地,主机B通过配件提供的配件已连接主机网络信息可以知道主机A是可连接的主机设备,但在本示例中,在确定到有可连接的主机设备时,并不立即建立直连,而是在触发具有直连需求时,才会建立直连。在步骤
S1031、主机A触发连接主机B,步骤S1032、主机B触发连接主机A,由于主机A、主机B触发连接的主机设备都是本机可连接的主机设备,因此进入步骤S1033,主机A与主机B直连,此时可以响应触发连接的需求实现相应的信息交互,可选地,如果相应的连接需求消失时,还可以将相应的连接断开。As shown in Figure 10, in some examples, similar to the example in Figure 8, host A triggers sending host A network information to the accessory after establishing a Bluetooth connection through steps S1011 to S1013 and obtains the accessory connected host network information returned by the accessory. (including host A network information), host B triggers the sending of host B network information to the accessory after establishing a Bluetooth connection through steps S1021 to S1023 and obtains the accessory connected host network information returned by the accessory (including host A, host B network information) , since the network information of the host B has been updated in the accessory connected host network information, the updated accessory connected host network information will also be returned to the host A through step S1024. Host A can know that host B is a connectable host device through the accessory connected host network information provided by the accessory. Correspondingly, host B can know that host A is a connectable host device through the accessory connected host network information provided by the accessory. However, In this example, when it is determined that there is a connectable host device, the direct connection is not established immediately, but when the direct connection requirement is triggered, the direct connection is established. in steps S1031. Host A triggers connection to host B. Step S1032. Host B triggers connection to host A. Since the host devices triggered by host A and host B to connect are all host devices that can be connected to this machine, step S1033 is entered. Host A and host B Direct connection, at this time, the corresponding information interaction can be implemented in response to the demand for triggering the connection. Optionally, if the corresponding connection demand disappears, the corresponding connection can also be disconnected.
如图11所示,在一些示例中,与图9的示例类似,主机A、主机B正常与配件建立蓝牙连接,主机A、主机B在蓝牙连接的状态下接收用户关于配件在本机中的直连授权操作。主机A通过步骤S1111到步骤S1113在接收到用户的允许直连后触发向配件发送主机A网络信息并获取配件返回的配件已连接主机网络信息(包含主机A网络信息),主机B通过步骤S1121到步骤S1123在接收到用户的允许直连后触发向配件发送主机B网络信息并获取配件返回的配件已连接主机网络信息(包括主机A、主机B网络信息),配件已连接主机网络信息由于更新增加了主机B网络信息,因此还会通过步骤S1124向主机A返回更新后的配件已连接主机网络信息。主机A通过配件提供的配件已连接主机网络信息可以知道主机B是可连接的主机设备,相应地,主机B通过配件提供的配件已连接主机网络信息可以知道主机A是可连接的主机设备,但在本示例中,在确定到有可连接的主机设备时,并不立即建立直连,而是在触发具有直连需求时,才会建立直连。在步骤S1131、主机A触发连接主机B,步骤S1132、主机B触发连接主机A,由于主机A、主机B触发连接的主机设备都是本机可连接的主机设备,因此进入步骤S1133,主机A与主机B直连,此时可以响应触发连接的需求实现相应的信息交互,可选地,如果相应的连接需求消失时,还可以将相应的连接断开。As shown in Figure 11, in some examples, similar to the example in Figure 9, host A and host B normally establish Bluetooth connections with the accessory, and host A and host B receive the user's information about the accessory in the local machine in the state of Bluetooth connection. Direct connection authorization operation. After receiving the user's permission to directly connect through steps S1111 to S1113, host A triggers sending the host A network information to the accessory and obtains the accessory connected host network information (including host A network information) returned by the accessory. Host B goes through steps S1121 to Step S1123 triggers the sending of the host B network information to the accessory after receiving the user's permission for direct connection and obtains the accessory connected host network information (including host A and host B network information) returned by the accessory. The accessory connected host network information has been increased due to the update. The network information of host B is obtained, so the updated accessory connected host network information is also returned to host A through step S1124. Host A can know that host B is a connectable host device through the accessory connected host network information provided by the accessory. Correspondingly, host B can know that host A is a connectable host device through the accessory connected host network information provided by the accessory. However, In this example, when it is determined that there is a connectable host device, the direct connection is not established immediately, but when the direct connection requirement is triggered, the direct connection is established. In step S1131, host A triggers connection to host B, and in step S1132, host B triggers connection to host A. Since the host devices triggered by host A and host B to connect are both host devices that the machine can connect to, step S1133 is entered. Host A and Host B is directly connected. At this time, the corresponding information interaction can be implemented in response to the demand for triggering the connection. Optionally, if the corresponding connection demand disappears, the corresponding connection can also be disconnected.
如图12所示,在一些示例中,主机A、主机B正常与配件建立蓝牙连接,在配件的操作下实现普通的信息交互。当配件触发需要在主机A与主机B之间建立直连通道的需求时,分别通过步骤S1201向主机A发送指令触发主机A连接主机B,步骤S1202向主机B发送指令触发主机B连接主机A。此时主机A、主机B的直连步骤被激活,主机A通过步骤S1203向配件发送主机A网络信息,主机B通过步骤S1204向配件发送主机B网络信息。相应地,配件分别接收到主机A网络信息、主机B网络信息并将其保存在配件已连接主机网络信息中,然后通过步骤S1205分别向主机A、主机B发送包括主机A网络信息、主机B网络信息的配件已连接主机网络信息,主机A接收到配件已连接主机网络信息后可以确定待连接主机B的网络信息,主机B接收到配件已连接主机网络信息后可以确定待连接主机A的网络信息,因此通过步骤S1206在主机A与主机B之间直连,完成连接后就可以相互进行直接的信息交互。As shown in Figure 12, in some examples, host A and host B normally establish Bluetooth connections with the accessory, and realize ordinary information interaction under the operation of the accessory. When the accessory triggers the need to establish a direct connection channel between host A and host B, step S1201 is used to send an instruction to host A to trigger host A to connect to host B, and step S1202 is used to send an instruction to host B to trigger host B to connect to host A. At this time, the direct connection step of host A and host B is activated. Host A sends host A network information to the accessory through step S1203, and host B sends host B network information to the accessory through step S1204. Correspondingly, the accessory receives the network information of host A and the network information of host B respectively and saves them in the network information of the host connected to the accessory, and then sends the network information of host A and the network information of host B to host A and host B respectively through step S1205. The accessory is connected to the host network information of the information. Host A can determine the network information of host B to be connected after receiving the accessory connected host network information. Host B can determine the network information of host A to be connected after receiving the accessory connected host network information. , therefore, host A and host B are directly connected through step S1206. After the connection is completed, direct information exchange can be performed with each other.
如图13所示,在一些示例中,鼠标1302分别与一体机1311、一体机1312建立蓝牙连接,鼠标1302可以控制一体机1311上的光标进行操作,也可以控制一体机1312上的光标进行操作。为了实现鼠标1302在一体机1311、一体机1312之间无缝切换,需要一体机1311到鼠标1302、再到一体机1312之间具有一条信息交互的通道,以至少在鼠标1302准备控制一体机1311上的光标向一体机1312上移动时,由一体机1311通过鼠标1302向一体机1312交接相应的光标位置信息。进一步,在本示例中,鼠标1302准备拖动一体机1311上的文件1303到一体机1312时,从用户界面的显示效果上看是文件1303在两个主机设备之间进行跨屏幕移动,但是后台的运行机制是要从一体机1311中将文件1303发送到一体机1312上。如上所述,由于一体机1311、鼠标1302、一体机1312之间存在一条信息交互的通道,因此文件1303可以通过这条通道传输到一体机1312上。但是上述的传输方式并不高效,因此可以判断文件1303的数据量是否超过第一阈值,在超过第一阈值时,就放弃从鼠标1302上进行传输,而是向一体机1311、一体机1312发送指令触发从一体机1311向一体机1312直接传输信息。具体地,当文件1303被鼠标1302从左边的一体机1311往右拖动至一体机1311的
屏幕边缘时,触发传输,一体机1311能通过剪贴板获取到文件1303的URI1(Uniform Resource Identifier,统一资源标识符),由于URI1的数据量没有超过第一阈值,可以直接通过鼠标1302将URI1发送到一体机1312上,可选地,数据量没有超过第一阈值的信息也可以在主机设备之间建立的直连通道进行传输。一体机1312收到URI1之后替换为URI2,注入到一体机1312的剪贴板,一体机1312通过URI2寻找文件1303的资源。文件传输服务根据URI1和URI2的映射关系请求一体机1311向一体机1312传输文件1303,相应地,一体机1311通过与鼠标1302的连接获取到一体机1312的网络信息,或者一体机1312通过与鼠标1302的连接获取到一体机1311的网络信息,一体机1311与一体机1312建立起直连通道,然后文件1303就可以借助这个直连通道从一体机1311发送到一体机1312上,从而在一体机1312的屏幕上配合显示文件1303的图标及拖动文件1303的光标,鼠标1302也切换到一体机1312上进行持续的控制。As shown in Figure 13, in some examples, the mouse 1302 establishes Bluetooth connections with the all-in-one machine 1311 and the all-in-one machine 1312 respectively. The mouse 1302 can control the cursor on the all-in-one machine 1311 to operate, and can also control the cursor on the all-in-one machine 1312 to operate. . In order to realize the seamless switching of the mouse 1302 between the all-in-one machine 1311 and the all-in-one machine 1312, there needs to be an information exchange channel between the all-in-one machine 1311, the mouse 1302, and then the all-in-one machine 1312, at least when the mouse 1302 is ready to control the all-in-one machine 1311 When the cursor moves toward the all-in-one machine 1312, the all-in-one machine 1311 transfers the corresponding cursor position information to the all-in-one machine 1312 through the mouse 1302. Furthermore, in this example, when the mouse 1302 is preparing to drag the file 1303 on the all-in-one machine 1311 to the all-in-one machine 1312, from the display effect of the user interface, the file 1303 moves across the screen between the two host devices, but in the background The operating mechanism is to send the file 1303 from the all-in-one machine 1311 to the all-in-one machine 1312. As mentioned above, since there is an information exchange channel between the all-in-one machine 1311, the mouse 1302, and the all-in-one machine 1312, the file 1303 can be transmitted to the all-in-one machine 1312 through this channel. However, the above-mentioned transmission method is not efficient, so it can be determined whether the data amount of the file 1303 exceeds the first threshold. When it exceeds the first threshold, the transmission from the mouse 1302 is given up, and the data is sent to the all-in-one machine 1311 and the all-in-one machine 1312. The instruction triggers direct transmission of information from the all-in-one machine 1311 to the all-in-one machine 1312. Specifically, when the file 1303 is dragged by the mouse 1302 from the all-in-one machine 1311 on the left to the right of the all-in-one machine 1311 When the edge of the screen triggers transmission, the all-in-one machine 1311 can obtain the URI1 (Uniform Resource Identifier, Uniform Resource Identifier) of the file 1303 through the clipboard. Since the data volume of the URI1 does not exceed the first threshold, the URI1 can be sent directly through the mouse 1302 To the all-in-one machine 1312, optionally, information whose data volume does not exceed the first threshold can also be transmitted through the direct connection channel established between the host devices. After receiving URI1, the all-in-one machine 1312 replaces it with URI2 and injects it into the clipboard of the all-in-one machine 1312. The all-in-one machine 1312 searches for the resource of the file 1303 through URI2. The file transfer service requests the all-in-one machine 1311 to transfer the file 1303 to the all-in-one machine 1312 according to the mapping relationship between URI1 and URI2. Accordingly, the all-in-one machine 1311 obtains the network information of the all-in-one machine 1312 through the connection with the mouse 1302, or the all-in-one machine 1312 obtains the network information of the all-in-one machine 1312 through the connection with the mouse 1302. The connection of 1302 obtains the network information of the all-in-one machine 1311. The all-in-one machine 1311 and the all-in-one machine 1312 establish a direct connection channel. Then the file 1303 can be sent from the all-in-one machine 1311 to the all-in-one machine 1312 through this direct connection channel, so that on the all-in-one machine The icon of file 1303 and the cursor for dragging file 1303 are displayed on the screen of 1312, and the mouse 1302 is also switched to the all-in-one machine 1312 for continuous control.
图14为本申请一些示例中主机连接装置示意图。如图14所示,主机连接装置1401可以为下述的第一配件,或部署在下述第一配件中的装置,主机连接装置1401包括存储单元1411、分发单元1412,其中,Figure 14 is a schematic diagram of a host connection device in some examples of this application. As shown in Figure 14, the host connection device 1401 may be the first accessory described below, or a device deployed in the first accessory described below. The host connection device 1401 includes a storage unit 1411 and a distribution unit 1412, where,
存储单元1411,用于第一配件管理至少第一主机的第一网络信息,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的;Storage unit 1411, configured for the first accessory to manage at least the first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;
分发单元1412,用于所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息,所述第一网络信息用于所述第二主机与所述第一主机建立连接。例如:存储单元1411和分发单元1412都可以由图3所示的已连接主机网络信息管理模块341来执行。Distribution unit 1412, configured for the first accessory to send the first network information to at least a second host connected to the first accessory, where the first network information is used between the second host and the first accessory. The host establishes a connection. For example: both the storage unit 1411 and the distribution unit 1412 can be executed by the connected host network information management module 341 shown in FIG. 3 .
可选地,主机连接装置1401包括:Optionally, the host connection device 1401 includes:
存储单元1411用于所述第一配件管理所述第二主机的第二网络信息,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The storage unit 1411 is used by the first accessory to manage the second network information of the second host, where the second network information is obtained by the first accessory based on the connection with the second host;
分发单元1412用于所述第一配件向所述第一主机发送所述第二网络信息,所述第二网络信息用于所述第一主机同意所述第二主机发起的第一连接。The distribution unit 1412 is used for the first accessory to send the second network information to the first host, and the second network information is used for the first host to agree to the first connection initiated by the second host.
可选地,存储单元1411包括:Optionally, the storage unit 1411 includes:
在用户授权所述第一主机与所述第一配件交换网络信息时,所述第一配件获取到所述第一网络信息。When the user authorizes the first host and the first accessory to exchange network information, the first accessory obtains the first network information.
可选地,分发单元1412包括:Optionally, the distribution unit 1412 includes:
在用户授权所述第二主机与所述第一配件交换网络信息时,所述第一配件向所述第二主机发送所述第一网络信息。When the user authorizes the second host and the first accessory to exchange network information, the first accessory sends the first network information to the second host.
可选地,主机连接装置1401包括触发单元1413;Optionally, the host connection device 1401 includes a trigger unit 1413;
触发单元1413用于所述第一配件触发所述第一主机、第二主机之间传输数据时,所述第一配件触发所述第一主机、第二主机之间建立连接。The triggering unit 1413 is used when the first accessory triggers the transmission of data between the first host and the second host, and the first accessory triggers the establishment of a connection between the first host and the second host.
可选地,主机连接装置1401包括触发单元1413;Optionally, the host connection device 1401 includes a trigger unit 1413;
触发单元1413用于所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的类型符合设定类型时,所述第一配件触发所述第一主机、第二主机之间建立连接。The trigger unit 1413 is used for the first accessory to trigger the transmission of data between the first host and the second host and the type of the transmitted data meets the set type. The first accessory triggers the first host and the second host. establish a connection between them.
可选地,主机连接装置1401包括触发单元1413;Optionally, the host connection device 1401 includes a trigger unit 1413;
触发单元1413用于所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的数据量超过第一阈值时,所述第一配件触发所述第一主机、第二主机之间建立连接。The trigger unit 1413 is used for the first accessory to trigger the transmission of data between the first host and the second host and the amount of transmitted data exceeds a first threshold. The first accessory triggers the first host and the second host to transmit data. A connection is established between hosts.
可选地,主机连接装置1401包括:Optionally, the host connection device 1401 includes:
存储单元1411用于所述第一配件管理所述第一主机具有的第三主机的第三网络信息,所
述第三网络信息是所述第一配件基于与所述第一主机的连接获取的;The storage unit 1411 is used for the first accessory to manage the third network information of the third host owned by the first host, so The third network information is obtained by the first accessory based on the connection with the first host;
分发单元1412用于所述第一配件向所述第二主机发送所述第三网络信息,所述第三网络信息用于所述第二主机与所述第三主机建立连接。The distribution unit 1412 is used for the first accessory to send the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
可选地,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。Optionally, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
需要说明的是,进一步还可以参照图4所示的主机连接方法及可选实施方式的具体内容。It should be noted that further reference may be made to the specific contents of the host connection method and optional implementations shown in FIG. 4 .
图15为本申请一些示例中主机连接装置示意图。如图15所示,主机连接装置1501可以为下述的第一主机,或部署在下述第一主机中的装置,主机连接装置1501包括接收单元1511、连接单元1512,其中,Figure 15 is a schematic diagram of a host connection device in some examples of this application. As shown in Figure 15, the host connection device 1501 may be the first host described below, or a device deployed in the first host described below. The host connection device 1501 includes a receiving unit 1511 and a connection unit 1512, where,
接收单元1511,用于第一主机接收第一配件发送的第二主机的第二网络信息,所述第一主机与所述第一配件连接,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The receiving unit 1511 is configured for the first host to receive the second network information of the second host sent by the first accessory. The first host is connected to the first accessory. The second network information is based on the first accessory. Obtained from the connection with the second host;
连接单元1512,用于所述第一主机根据所述第二网络信息与所述第二主机建立连接。例如,接收单元1511可以由图3所示的已连接配件管理模块323、主机信息管理模块324来执行,连接单元1512可以由图3所示的端口广播模块321、主动连接模块322来执行。The connection unit 1512 is used for the first host to establish a connection with the second host according to the second network information. For example, the receiving unit 1511 can be executed by the connected accessory management module 323 and the host information management module 324 shown in FIG. 3 , and the connecting unit 1512 can be executed by the port broadcast module 321 and the active connection module 322 shown in FIG. 3 .
可选地,主机连接装置1501包括发送单元1513;Optionally, the host connection device 1501 includes a sending unit 1513;
发送单元1513用于所述第一主机向所述第一配件发送所述第一主机的第一网络信息,以使连接所述第一配件的至少第二主机获取所述第一网络信息。The sending unit 1513 is configured for the first host to send the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
可选地,发送单元1513包括:Optionally, the sending unit 1513 includes:
所述第一主机在获取到所述第一主机与所述第一配件交换网络信息的用户授权时,向所述第一配件发送所述第一网络信息。When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
可选地,连接单元1512包括:Optionally, the connection unit 1512 includes:
在所述第二主机根据所述第一网络信息向所述第一主机发起第一连接时,所述第一主机根据所述第二网络信息同意所述第一连接。When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
可选地,连接单元1512包括:Optionally, the connection unit 1512 includes:
所述第一主机根据所述第二网络信息向所述第二主机发起第二连接。The first host initiates a second connection to the second host according to the second network information.
可选地,主机连接装置1501包括:Optionally, the host connection device 1501 includes:
接收单元1511用于所述第一主机接收第二配件发送的第三主机的第三网络信息,所述第一主机与所述第二配件连接,所述第三网络信息是所述第二配件基于与所述第三主机的连接获取的;The receiving unit 1511 is used for the first host to receive the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is the second accessory. Obtained based on the connection with the third host;
连接单元1512用于所述第一主机根据所述第三网络信息与所述第三主机建立连接。The connection unit 1512 is used for the first host to establish a connection with the third host according to the third network information.
可选地,主机连接装置1501包括:Optionally, the host connection device 1501 includes:
发送单元1513用于所述第一主机向所述第二配件发送所述第一主机的第一网络信息,以使连接所述第二配件的至少第三主机获取所述第一网络信息。The sending unit 1513 is configured for the first host to send the first network information of the first host to the second accessory, so that at least a third host connected to the second accessory obtains the first network information.
可选地,主机连接装置1501包括:Optionally, the host connection device 1501 includes:
发送单元1513用于所述第一主机向所述第一配件发送所述第三网络信息,以使连接所述第一配件的至少第二主机获取所述第三网络信息。The sending unit 1513 is configured for the first host to send the third network information to the first accessory, so that at least a second host connected to the first accessory obtains the third network information.
可选地,连接单元1512包括:Optionally, the connection unit 1512 includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host, the first host establishes a connection with the second host.
可选地,连接单元1512包括:
Optionally, the connection unit 1512 includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的类型符合设定类型时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
可选地,连接单元1512包括:Optionally, the connection unit 1512 includes:
在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的数据量超过第一阈值时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host and the amount of transmitted data exceeds the first threshold, the first host and The second host establishes a connection.
可选地,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。Optionally, the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
可选地,接收单元1512包括:Optionally, the receiving unit 1512 includes:
判断所述第一主机未与所述第二主机建立连接时,所述第一主机确定所述第二主机为所述第一主机的可连接主机设备。When it is determined that the first host has not established a connection with the second host, the first host determines that the second host is a connectable host device of the first host.
需要说明的是,进一步还可以参照图5所示的主机连接方法及可选实施方式的具体内容。It should be noted that further reference may be made to the specific contents of the host connection method and optional implementations shown in FIG. 5 .
图16为本申请一些示例中配件设备示意图。如图16所示,配件设备1601可以为蓝牙鼠标、蓝牙键盘等,配件设备1601包括处理器1611、存储器1612,为了支持与主机设备的蓝牙连接,配件设备1601还可以包括蓝牙模组等。相应地,计算机程序存储在存储器1612上并可在处理器1611上运行,处理器1611执行所述计算机程序实现如图4所示的主机连接方法及可选实施方式提供的方法。具体地,参照图3,配件设备1601可以通过已连接主机网络信息管理模块341在与多个主机设备连接时管理获取到的主机设备网络信息,根据连接的主机设备情况向其发送配件已连接主机网络信息。Figure 16 is a schematic diagram of accessory equipment in some examples of this application. As shown in Figure 16, the accessory device 1601 can be a Bluetooth mouse, a Bluetooth keyboard, etc. The accessory device 1601 includes a processor 1611 and a memory 1612. In order to support the Bluetooth connection with the host device, the accessory device 1601 can also include a Bluetooth module, etc. Correspondingly, the computer program is stored on the memory 1612 and can be run on the processor 1611. The processor 1611 executes the computer program to implement the host connection method shown in Figure 4 and the method provided by the optional embodiment. Specifically, referring to Figure 3, the accessory device 1601 can manage the host device network information obtained when connecting to multiple host devices through the connected host network information management module 341, and send the accessory connected host information to the connected host device according to the situation of the connected host device. Internet Information.
图17为本申请一些示例中主机设备示意图。如图17所示,主机设备1701可以为笔记本电脑、平板电脑、一体机等,主机设备1701包括处理器1711、存储器1712,为了支持与配件设备的蓝牙连接及与其他主机设备的蓝牙连接,主机设备1701还可以包括蓝牙模组,进一步主机设备1701中还可以包括WiFi模组以实现WiFi直连、局域网连接等。相应地,计算机程序存储在存储器1712上并可在处理器1711上运行,处理器1711执行所述计算机程序实现如图5所示的主机连接方法及可选实施方式提供的方法。具体地,参照图3,主机设备1701不仅可以通过已连接配件管理模块323管理所有连接的配件设备并获取到配件设备发送的配件已连接主机网络信息,还可以通过主机信息管理模块324管理已连接的主机设备和可连接的主机设备,在此不再赘述。Figure 17 is a schematic diagram of a host device in some examples of this application. As shown in Figure 17, the host device 1701 can be a notebook computer, a tablet computer, an all-in-one machine, etc. The host device 1701 includes a processor 1711 and a memory 1712. In order to support Bluetooth connections with accessory devices and Bluetooth connections with other host devices, the host device 1701 The device 1701 may also include a Bluetooth module, and further the host device 1701 may also include a WiFi module to implement WiFi direct connection, local area network connection, etc. Correspondingly, the computer program is stored on the memory 1712 and can be run on the processor 1711. The processor 1711 executes the computer program to implement the host connection method shown in Figure 5 and the method provided by the optional embodiment. Specifically, referring to Figure 3, the host device 1701 can not only manage all connected accessory devices through the connected accessory management module 323 and obtain accessory connected host network information sent by the accessory device, but also manage connected accessory devices through the host information management module 324. The host devices and connectable host devices will not be described again here.
需要说明的是,配件设备、主机设备中的处理器、存储器可以分立设置,也可以集成在一起。It should be noted that the processor and memory in the accessory device and the host device can be set separately or integrated together.
可选地,一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如图4所示的主机连接方法及可选实施方式提供的方法、图5所示的主机连接方法及可选实施方式提供的方法。Optionally, a computer program product containing instructions, when run on a computer, causes the computer to execute the host connection method shown in Figure 4 and the method provided by the optional implementation, and the host connection method shown in Figure 5 and methods provided by alternative embodiments.
可选地,一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被运行时,实现如图4所示的主机连接方法及可选实施方式提供的方法、图5所示的主机连接方法及可选实施方式提供的方法。Optionally, a computer-readable storage medium has a computer program stored in the computer-readable storage medium. When the computer program is run, the host connection method as shown in Figure 4 and the optional implementation are provided. The method, the host connection method shown in Figure 5 and the method provided by the optional implementation.
综上所述,本申请基于配件设备与连接配件设备的主机设备在场景中的应用一致性,将配件设备自身连接的主机设备形成一个组网组合,为连接配件设备的主机设备提供组网组合中的其他主机设备的网络信息,从而使主机设备之间可以建立连接。本申请简化了主机设备之间连接的操作流程,提高了用户的使用体验。To sum up, this application is based on the application consistency of the accessory device and the host device connected to the accessory device in the scenario, and forms a networking combination of the host device connected to the accessory device itself, and provides a networking combination for the host device connected to the accessory device. network information of other host devices in the host device so that connections can be established between host devices. This application simplifies the operation process of connection between host devices and improves the user experience.
在上述实施方式中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括
一个或多个计算机指令,在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施方式所述的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. Computer program products include One or more computer instructions, when loaded and executed on a computer, produce, in whole or in part, the processes or functions described in the embodiments of the present application. The computer may be a general purpose computer, a special purpose computer, a 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., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website site, computer, server or data center. Computer-readable storage media can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or other integrated media that contains 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)), etc.
可以理解的是,结合本申请所公开的技术方案,可以直接体现为硬件、由控制单元执行的软件模块或二者组合,即一个或多个步骤和/或一个或多个步骤组合,既可以对应于计算机程序流程的各个软件模块,亦可以对应于各个硬件模块,例如ASIC(Application Specific Integrated Circuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或其他可编程逻辑器件、分立门或晶体逻辑器件、分立硬件组件或者其任意适当组合。为了描述的方便,描述上述装置时以功能分为各种模块分别描述,当然,在实施本申请时可以把各模块的功能在同一个或多个软件和/或硬件中实现。It can be understood that, in conjunction with the technical solution disclosed in this application, it can be directly embodied as hardware, a software module executed by a control unit, or a combination of both, that is, one or more steps and/or one or more step combinations, either Each software module corresponding to the computer program flow can also correspond to each hardware module, such as ASIC (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 appropriate combination thereof. For the convenience of description, when describing the above device, the functions are divided into various modules and described separately. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and/or hardware.
可以理解的是,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示单独存在A、单独存在B、同时存在A和B。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,一般表示前后关联对象是一种“相除”的关系。It can be understood that the term "and/or" is only an association relationship describing related objects, indicating that three relationships can exist. For example, A and/or B can mean that A exists alone, B exists alone, and A exists simultaneously. and B. In addition, the character "/" in this article generally means that the related objects are an "or" relationship; in the formula, the character "/" generally means that the related objects are a "division" relationship.
可以理解的是,各数字编号、各实施方式中所提到的“第一”、“第二”等仅仅是为了描述的方便,并不代表结构或功能上的绝对区分关系,同时,在不同的实施方式中,可能使用相同的标号或标记,这些并不代表结构或功能上的绝对联系关系,不应用来限制本申请的实施方式范围。各步骤、过程编号的大小并不意味着执行顺序的先后,各步骤、过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施过程构成任何限定。It can be understood that each numerical number, "first", "second", etc. mentioned in each embodiment are only for the convenience of description and do not represent an absolute distinction in structure or function. At the same time, in different In the embodiments, the same numbers or signs may be used, but these do not represent an absolute relationship in structure or function, and should not be used to limit the scope of the embodiments of the present application. The size of each step and process number does not mean the order of execution. 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.
可以理解的是,尽管结合具体的特征及实施方式对本申请进行了描述,显而易见地,在不脱离本申请的精神和范围的情况下,可以对其进行各种修改和组合。相应地,本申请说明书和附图仅仅是所附权利要求书所界定本申请的示例性说明,且视为已覆盖本申请范围内的任意及所有修改、变化、组合或等同物。
It is understood that although the present application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the present application. Accordingly, the specification and drawings of this application are merely illustrative of the application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of this application.
Claims (26)
- 一种主机连接方法,其特征在于,包括如下步骤:A host connection method, characterized by including the following steps:第一配件管理至少第一主机的第一网络信息,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的;The first accessory manages at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息,所述第一网络信息用于所述第二主机与所述第一主机建立连接。The first accessory sends the first network information to at least a second host connected to the first accessory, and the first network information is used for the second host to establish a connection with the first host.
- 根据权利要求1所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to claim 1, characterized in that the method includes:所述第一配件管理所述第二主机的第二网络信息,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The first accessory manages second network information of the second host, and the second network information is obtained by the first accessory based on the connection with the second host;所述第一配件向所述第一主机发送所述第二网络信息,所述第二网络信息用于所述第一主机同意所述第二主机发起的第一连接。The first accessory sends the second network information to the first host, and the second network information is used by the first host to agree to the first connection initiated by the second host.
- 根据权利要求1-2中任一项所述的主机连接方法,其特征在于,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的包括:The host connection method according to any one of claims 1-2, characterized in that the first network information obtained by the first accessory based on the connection with the first host includes:在用户授权所述第一主机与所述第一配件交换网络信息时,所述第一配件获取到所述第一网络信息。When the user authorizes the first host and the first accessory to exchange network information, the first accessory obtains the first network information.
- 根据权利要求1-3中任一项所述的主机连接方法,其特征在于,所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息包括:The host connection method according to any one of claims 1-3, wherein the first accessory sending the first network information to at least a second host connected to the first accessory includes:在用户授权所述第二主机与所述第一配件交换网络信息时,所述第一配件向所述第二主机发送所述第一网络信息。When the user authorizes the second host and the first accessory to exchange network information, the first accessory sends the first network information to the second host.
- 根据权利要求1-4中任一项所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to any one of claims 1-4, characterized in that the method includes:所述第一配件触发所述第一主机、第二主机之间传输数据时,所述第一配件触发所述第一主机、第二主机之间建立连接。When the first accessory triggers data transmission between the first host and the second host, the first accessory triggers the establishment of a connection between the first host and the second host.
- 根据权利要求1-4中任一项所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to any one of claims 1-4, characterized in that the method includes:所述第一配件触发所述第一主机、第二主机之间传输数据且传输数据的类型符合设定类型时,所述第一配件触发所述第一主机、第二主机之间建立连接。When the first accessory triggers the transmission of data between the first host and the second host and the type of transmitted data meets the set type, the first accessory triggers the establishment of a connection between the first host and the second host.
- 根据权利要求1-6中任一项所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to any one of claims 1-6, characterized in that the method includes:所述第一配件管理所述第一主机具有的第三主机的第三网络信息,所述第三网络信息是所述第一配件基于与所述第一主机的连接获取的;The first accessory manages the third network information of the third host owned by the first host, and the third network information is obtained by the first accessory based on the connection with the first host;所述第一配件向所述第二主机发送所述第三网络信息,所述第三网络信息用于所述第二主机与所述第三主机建立连接。The first accessory sends the third network information to the second host, and the third network information is used for the second host to establish a connection with the third host.
- 根据权利要求1-7中任一项所述的主机连接方法,其特征在于,网络信息包括IP地址与端口号、WiFi MAC地址、蓝牙MAC地址中的一种或多种。The host connection method according to any one of claims 1-7, wherein the network information includes one or more of IP address and port number, WiFi MAC address, and Bluetooth MAC address.
- 一种主机连接方法,其特征在于,包括如下步骤:A host connection method, characterized by including the following steps:第一主机接收第一配件发送的第二主机的第二网络信息,所述第一主机与所述第一配件连接,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;The first host receives the second network information of the second host sent by the first accessory. The first host is connected to the first accessory. The second network information is the first accessory based on the communication with the second host. The connection obtained;所述第一主机根据所述第二网络信息与所述第二主机建立连接。The first host establishes a connection with the second host according to the second network information.
- 根据权利要求9所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to claim 9, characterized in that the method includes:所述第一主机向所述第一配件发送所述第一主机的第一网络信息,以使连接所述第一配件的至少第二主机获取所述第一网络信息。The first host sends the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
- 根据权利要求10中任一项所述的主机连接方法,其特征在于,所述第一主机向所述 第一配件发送所述第一主机的第一网络信息包括:The host connection method according to any one of claims 10, characterized in that the first host connects to the The first network information sent by the first accessory to the first host includes:所述第一主机在获取到所述第一主机与所述第一配件交换网络信息的用户授权时,向所述第一配件发送所述第一网络信息。When the first host obtains user authorization for exchanging network information between the first host and the first accessory, the first host sends the first network information to the first accessory.
- 根据权利要求10-11中任一项所述的主机连接方法,其特征在于,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:The host connection method according to any one of claims 10-11, wherein the first host establishing a connection with the second host according to the second network information includes:在所述第二主机根据所述第一网络信息向所述第一主机发起第一连接时,所述第一主机根据所述第二网络信息同意所述第一连接。When the second host initiates a first connection to the first host based on the first network information, the first host agrees to the first connection based on the second network information.
- 根据权利要求9-11中任一项所述的主机连接方法,其特征在于,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:The host connection method according to any one of claims 9-11, wherein the first host establishing a connection with the second host according to the second network information includes:所述第一主机根据所述第二网络信息向所述第二主机发起第二连接。The first host initiates a second connection to the second host according to the second network information.
- 根据权利要求9-13中任一项所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to any one of claims 9-13, characterized in that the method includes:所述第一主机接收第二配件发送的第三主机的第三网络信息,所述第一主机与所述第二配件连接,所述第三网络信息是所述第二配件基于与所述第三主机的连接获取的;The first host receives the third network information of the third host sent by the second accessory, the first host is connected to the second accessory, and the third network information is the second accessory based on the connection with the third accessory. Obtained from the connection of three hosts;所述第一主机根据所述第三网络信息与所述第三主机建立连接。The first host establishes a connection with the third host according to the third network information.
- 根据权利要求14所述的主机连接方法,其特征在于,所述方法包括:The host connection method according to claim 14, characterized in that the method includes:所述第一主机向所述第一配件发送所述第三网络信息,以使连接所述第一配件的至少第二主机获取所述第三网络信息。The first host sends the third network information to the first accessory, so that at least a second host connected to the first accessory obtains the third network information.
- 根据权利要求9-15中任一项所述的主机连接方法,其特征在于,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:The host connection method according to any one of claims 9-15, wherein the first host establishing a connection with the second host according to the second network information includes:在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive transmission data from the second host, the first host establishes a connection with the second host.
- 根据权利要求9-15中任一项所述的主机连接方法,其特征在于,所述第一主机根据所述第二网络信息与所述第二主机建立连接包括:The host connection method according to any one of claims 9-15, wherein the first host establishing a connection with the second host according to the second network information includes:在第一配件或第二配件触发所述第一主机向所述第二主机传输数据或接收所述第二主机的传输数据且传输数据的类型符合设定类型时,所述第一主机与所述第二主机建立连接。When the first accessory or the second accessory triggers the first host to transmit data to the second host or receive the transmission data from the second host and the type of transmission data matches the set type, the first host and the The second host establishes a connection.
- 根据权利要求9-17中任一项所述的主机连接方法,其特征在于,所述第一主机接收第一配件发送的第二主机的第二网络信息之后,所述方法包括:The host connection method according to any one of claims 9-17, wherein after the first host receives the second network information of the second host sent by the first accessory, the method includes:判断所述第一主机未与所述第二主机建立连接时,所述第一主机确定所述第二主机为所述第一主机的可连接主机设备。When it is determined that the first host has not established a connection with the second host, the first host determines that the second host is a connectable host device of the first host.
- 一种主机连接装置,其特征在于,包括:A host connection device, characterized by including:存储单元,用于第一配件管理至少第一主机的第一网络信息,所述第一网络信息是所述第一配件基于与所述第一主机的连接获取的;A storage unit configured for the first accessory to manage at least first network information of the first host, where the first network information is obtained by the first accessory based on the connection with the first host;分发单元,用于所述第一配件向与所述第一配件连接的至少第二主机发送所述第一网络信息,所述第一网络信息用于所述第二主机与所述第一主机建立连接。A distribution unit configured for the first accessory to send the first network information to at least a second host connected to the first accessory, where the first network information is used between the second host and the first host. establish connection.
- 根据权利要求19所述的主机连接装置,其特征在于,所述装置包括触发单元;The host connection device according to claim 19, wherein the device includes a trigger unit;所述触发单元用于所述第一配件触发所述第一主机、第二主机之间传输数据时,所述第一配件触发所述第一主机、第二主机之间建立连接。The triggering unit is used when the first accessory triggers data transmission between the first host and the second host, and the first accessory triggers the establishment of a connection between the first host and the second host.
- 一种主机连接装置,其特征在于,包括:A host connection device, characterized by including:接收单元,用于第一主机接收第一配件发送的第二主机的第二网络信息,所述第一主机与所述第一配件连接,所述第二网络信息是所述第一配件基于与所述第二主机的连接获取的;A receiving unit configured for the first host to receive the second network information of the second host sent by the first accessory, the first host is connected to the first accessory, and the second network information is the first accessory based on the The connection of the second host is obtained;连接单元,用于所述第一主机根据所述第二网络信息与所述第二主机建立连接。 A connection unit, configured for the first host to establish a connection with the second host according to the second network information.
- 根据权利要求21所述的主机连接装置,其特征在于,所述装置包括发送单元;The host connection device according to claim 21, wherein the device includes a sending unit;所述发送单元用于所述第一主机向所述第一配件发送所述第一主机的第一网络信息,以使连接所述第一配件的至少第二主机获取所述第一网络信息。The sending unit is configured for the first host to send the first network information of the first host to the first accessory, so that at least a second host connected to the first accessory obtains the first network information.
- 一种主机连接系统,其特征在于,包括如权利要求19-20中任一项所述的主机连接装置及如权利要求21-22中任一项所述的主机连接装置。A host connection system, characterized by comprising the host connection device according to any one of claims 19-20 and the host connection device according to any one of claims 21-22.
- 一种配件设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1-8中任一项所述的方法。An accessory device, characterized in that it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any one of claims 1-8 method described in the item.
- 一种主机设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求9-18中任一项所述的方法。A host device, characterized in that it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any one of claims 9-18 is implemented. method described in the item.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序被运行时,实现如权利要求1-8及9-18中任一项所述的方法。 A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium. When the computer program is run, the implementation of any one of claims 1-8 and 9-18 is achieved. method described.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210455111.6A CN117014842A (en) | 2022-04-27 | 2022-04-27 | Host connection method, device, system, equipment and storage medium |
CN202210455111.6 | 2022-04-27 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023207817A1 true WO2023207817A1 (en) | 2023-11-02 |
Family
ID=88517715
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/089972 WO2023207817A1 (en) | 2022-04-27 | 2023-04-23 | Host connection method, apparatus and system, device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117014842A (en) |
WO (1) | WO2023207817A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050033880A1 (en) * | 2003-08-07 | 2005-02-10 | Ali Corporation | USB-based host-to-host networking method |
CN101179749A (en) * | 2006-11-09 | 2008-05-14 | 艾威梯软件技术(北京)有限公司 | System and method for supporting automatic establishment and disconnection of wireless cluster connection |
CN108132900A (en) * | 2017-11-10 | 2018-06-08 | 西安万像电子科技有限公司 | Interconnecting device, telecommunication system and data transmission method |
WO2021098605A1 (en) * | 2019-11-22 | 2021-05-27 | 华为技术有限公司 | Accessory apparatus, host apparatus, and data transmission method |
CN114339697A (en) * | 2020-09-30 | 2022-04-12 | 华为技术有限公司 | Communication connection establishing method, system, electronic device and storage medium |
-
2022
- 2022-04-27 CN CN202210455111.6A patent/CN117014842A/en active Pending
-
2023
- 2023-04-23 WO PCT/CN2023/089972 patent/WO2023207817A1/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050033880A1 (en) * | 2003-08-07 | 2005-02-10 | Ali Corporation | USB-based host-to-host networking method |
CN101179749A (en) * | 2006-11-09 | 2008-05-14 | 艾威梯软件技术(北京)有限公司 | System and method for supporting automatic establishment and disconnection of wireless cluster connection |
CN108132900A (en) * | 2017-11-10 | 2018-06-08 | 西安万像电子科技有限公司 | Interconnecting device, telecommunication system and data transmission method |
WO2021098605A1 (en) * | 2019-11-22 | 2021-05-27 | 华为技术有限公司 | Accessory apparatus, host apparatus, and data transmission method |
CN114339697A (en) * | 2020-09-30 | 2022-04-12 | 华为技术有限公司 | Communication connection establishing method, system, electronic device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117014842A (en) | 2023-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI617919B (en) | Devices and methods for facilitating direct pairing in a wireless docking system | |
JP6598848B2 (en) | Presenting the computing environment on multiple devices | |
US10165391B2 (en) | Companion application for activity cooperation | |
EP2868065B1 (en) | Apparatus and method for selection of a device for content sharing operations | |
JP6219501B2 (en) | Access control for wireless docking | |
US8954394B2 (en) | Using mobile devices of a user as an edge cache to stream video files | |
WO2014153480A2 (en) | Utilizing user devices for backing up and retrieving data in a distributed backup system | |
WO2013143414A1 (en) | File transmission method, mobile terminal, and system | |
EP2651179B1 (en) | Method of reducing a waiting time when cancelling a connection and an electronic device therefor | |
KR20130124363A (en) | Ad hoc file sharing | |
JP6142079B2 (en) | Wireless docking | |
KR20160013956A (en) | Wireless docking architecture | |
CN107077436A (en) | Target device resource is lent to host device computing environment | |
WO2019218951A1 (en) | Method and terminal for transmitting file | |
WO2019196253A1 (en) | Networking method and device | |
KR20160013953A (en) | Utilization and configuration of wireless docking environments | |
WO2021104455A1 (en) | Cad drawing sharing and discussing system and method thereof, terminal, server, electronic device, and storage medium | |
TW201621706A (en) | Sharing content with permission control using near field communication | |
WO2013167064A2 (en) | Method, system and server for service switching | |
US10148749B2 (en) | Local connection and sharing system | |
WO2023207817A1 (en) | Host connection method, apparatus and system, device, and storage medium | |
US20150350268A1 (en) | Electronic device and data copy method between electronic devices | |
WO2016070373A1 (en) | Method for implementing synchronous preview display between mobile terminal and web terminal | |
US20140033057A1 (en) | Method, apparatus, and system for managing information in a mobile device | |
US20170103009A1 (en) | Monitoring a device status for an application |
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: 23795250 Country of ref document: EP Kind code of ref document: A1 |