Device Interconnection Method, Apparatus, Electronic Device and Storage Medium

By controlling the device to receive interconnection requests and process them during the device interconnection process, the complex user operation problem is solved, efficient interconnection between devices is achieved, and user experience is improved.

CN114916091BActive Publication Date: 2025-06-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210419827.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-20
Publication Date
2025-06-24
Estimated Expiration
2042-04-20

AI Technical Summary

Technical Problem

The prior art has complex user operations and low efficiency during the device interconnection process, which affects the user experience.

Method used

The control device receives an interconnection request. If the target private protocol has been configured, a directed connection instruction is sent to the first device to instruct it to establish a communication connection with the second device; if the private protocol is not configured, a communication connection with the first device and the second device is established respectively to realize data forwarding.

Benefits of technology

It reduces the operation steps of users to connect devices, improves interaction efficiency, and simplifies the device interconnection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114916091B_ABST
    Figure CN114916091B_ABST
Patent Text Reader

Abstract

The present application discloses a device interconnection method, apparatus, electronic device and storage medium, relating to the field of communication technologies, including: when a control device obtains an interconnection request for connecting a first device and a second device, in response to the interconnection request, when a target private protocol has been configured between the control device and the first device, the control device sends a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes the network information of the second device. After receiving the directed connection instruction, the first device establishes a communication connection with the second device based on the network information. When the target private protocol is not configured between the control device and the first device, the control device establishes communication connections with both the first device and the second device, so that the communication data between the first device and the second device is forwarded through the control device. Therefore, controlling the first device and the second device to communicate through the control device can save the user's operations on the two devices to be interconnected and improve the interaction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and more particularly, to a method and apparatus for device interconnection, an electronic device, and a storage medium. Background Art

[0002] When connecting two devices (including Bluetooth headsets, gamepads, Internet of Things devices, TVs, mobile phones, etc.), the current technical method is that the target device enters the pairing state and continuously sends out broadcasts, and the other device searches for the network information of the pairable devices and displays it on the interaction interface. The user manually selects the target device from the pairable devices on the interaction interface and initiates the connection. In this process, the user operation is complex and the efficiency is low, which greatly affects the user experience. Summary of the Invention

[0003] This application provides a method and apparatus for device interconnection, an electronic device, and a storage medium to improve the above defects.

[0004] In a first aspect, an embodiment of this application provides a method for device interconnection, which is applied to a control device and includes: receiving an interconnection request for requesting to connect a first device and a second device; when a target private protocol has been configured between the control device and the first device, in response to the interconnection request, sending a directed connection instruction defined by the target private protocol to the first device, where the directed connection instruction includes the network information of the second device, and the directed connection instruction is used to instruct the first device to establish a communication connection with the second device based on the network information of the second device; when a target private protocol has not been configured between the control device and the first device, in response to the interconnection request, establishing communication connections with the first device and the second device respectively, so that the communication data between the first device and the second device is forwarded through the control device.

[0005] In a second aspect, an embodiment of this application provides a method for device interconnection, which is applied to a first device and includes: when a target private protocol has been configured between the control device and the first device, obtaining a directed connection instruction sent by the control device based on the target private protocol, where the directed connection instruction is an instruction defined by the target private protocol and includes the network information of a second device; in response to the directed connection instruction, establishing a communication connection with the second device based on the network information.

[0006] In a third aspect, an embodiment of the present application further provides a device interconnection method, which is applied to a device interconnection system. The device interconnection system includes a control device, a first device, and a second device. The control device is connected to the first device. The method includes: the control device receives an interconnection request, which is used to request to connect the first device and the second device; when a target private protocol has been configured between the control device and the first device, the control device, in response to the interconnection request, sends a directional connection instruction defined by the target private protocol to the first device, and the directional connection instruction includes network information of the second device; the first device, in response to the directional connection instruction, establishes a communication connection with the second device based on the network information of the second device; when a target private protocol has not been configured between the control device and the first device, the control device, in response to the interconnection request, respectively establishes communication connections with the first device and the second device, so that communication data between the first device and the second device is forwarded by the control device.

[0007] In a fourth aspect, an embodiment of the present application further provides a device interconnection apparatus, which is applied to a control device. The apparatus includes: an interconnection detection module, a first connection module, and a second connection module. The interconnection detection module is configured to receive an interconnection request, which is used to request to connect a first device and a second device; the first connection module is configured to, when a target private protocol has been configured between the control device and the first device, in response to the interconnection request, send a directional connection instruction defined by the target private protocol to the first device, the directional connection instruction includes network information of the second device, and the directional connection instruction is used to instruct the first device to establish a communication connection with the second device based on the network information of the second device; the second connection module is configured to, when a target private protocol has not been configured between the control device and the first device, in response to the interconnection request, respectively establish communication connections with the first device and the second device, so that communication data between the first device and the second device is forwarded by the control device.

[0008] In a fifth aspect, an embodiment of the present application further provides a device interconnection apparatus, which is applied to a first device. The apparatus includes: an instruction acquisition module and a communication connection module. The instruction acquisition module is configured to, when a target private protocol has been configured between the control device and the first device, acquire a directional connection instruction sent by the control device based on the target private protocol, the directional connection instruction is an instruction defined by the target private protocol, and the directional connection instruction includes network information of a second device; the communication connection module is configured to, in response to the directional connection instruction, establish a communication connection with the second device based on the network information.

[0009] Sixth aspect, an embodiment of the present application further provides a device interconnection system, where the device interconnection system includes a control device, a first device, and a second device, and the control device is connected to the first device; the control device is configured to receive an interconnection request for requesting to connect the first device and the second device; the control device is further configured to, when a target private protocol has been configured between the control device and the first device, in response to the interconnection request, send a directed connection instruction defined by the target private protocol to the first device, where the directed connection instruction includes network information of the second device; the first device is configured to, in response to the directed connection instruction, establish a communication connection with the second device based on the network information of the second device; the control device is further configured to, when a target private protocol has not been configured between the control device and the first device, in response to the interconnection request, establish communication connections with the first device and the second device respectively, so that communication data between the first device and the second device is forwarded through the control device.

[0010] Seventh aspect, an embodiment of the present application further provides an electronic device, including one or more processors; a memory; and one or more application programs, where the one or more application programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more application programs are configured to execute the above method.

[0011] Eighth aspect, an embodiment of the present application further provides a computer-readable storage medium, where at least one instruction, at least one program segment, a code set, or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program segment, the code set, or the instruction set is loaded and executed by a processor to execute the above method.

[0012] Ninth aspect, an embodiment of the present application further provides a computer program product containing instructions, where the computer program product stores instructions, and when the instructions run on a computer, the computer is caused to implement the above method.

[0013] The device interconnection method, device, electronic device, and storage medium provided by the embodiments of the present application. When the control device receives an interconnection request for connecting a first device and a second device, in the case where a target private protocol is configured between the control device and the first device, in response to the interconnection request, the control device sends a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes the network information of the second device. After receiving the directed connection instruction, the first device can establish a communication connection with the second device based on the network information. Therefore, the first device can complete the connection between the first device and the second device based on the indication of the control device, and the user does not need to operate the first device too much. In the case where the target private protocol is not configured between the control device and the first device, in response to the interconnection request, the control device respectively establishes communication connections with the first device and the second device, so that the communication data between the first device and the second device can be forwarded by the control device, that is, the control device connects the first device and the second device. Therefore, controlling the first device and the second device to communicate through the control device can save the user's operation steps for the two devices to be interconnected and improve the interaction efficiency.

[0014] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and part of them will become obvious from the description, or will be understood by implementing the embodiments of the present application. The objectives and other advantages of the embodiments of the present application can be achieved and obtained through the structures specifically pointed out in the written description, claims, and drawings. Brief Description of the Drawings

[0015] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0016] Figure 1 Shows a schematic diagram of a device interconnection system provided by an embodiment of the present application;

[0017] Figure 2 Shows a flowchart of a device interconnection method provided by an embodiment of the present application;

[0018] Figure 3 Shows a schematic diagram of a connection control interface of a control device provided by an embodiment of the present application;

[0019] Figure 4 Shows a schematic diagram of a device selection interface of a control device provided by an embodiment of the present application;

[0020] Figure 5Shows an interconnection architecture diagram of device interconnection provided by an embodiment of the present application;

[0021] Figure 6 Shows an interconnection architecture diagram of device interconnection provided by another embodiment of the present application;

[0022] Figure 7 Shows a method flowchart of a device interconnection method provided by another embodiment of the present application;

[0023] Figure 8 Shows an interaction flowchart among devices in a device interconnection system provided by an embodiment of the present application;

[0024] Figure 9 Shows a method flowchart of a device interconnection method provided by another embodiment of the present application;

[0025] Figure 10 Shows an interaction flowchart among devices in a device interconnection system provided by another embodiment of the present application;

[0026] Figure 11 Shows a method flowchart of a device interconnection method provided by yet another embodiment of the present application;

[0027] Figure 12 Shows an interaction flowchart among devices in a device interconnection system provided by another embodiment of the present application;

[0028] Figure 13 Shows a method flowchart of a device interconnection method of a first device provided by an embodiment of the present application;

[0029] Figure 14 Shows an interaction flowchart among devices in a device interconnection system provided by another embodiment of the present application;

[0030] Figure 15 Shows a method flowchart of a device interconnection method of a device interconnection system provided by an embodiment of the present application;

[0031] Figure 16 Shows a structural block diagram of a device interconnection device provided by an embodiment of the present application;

[0032] Figure 17 Shows a structural block diagram of another device interconnection device provided by an embodiment of the present application;

[0033] Figure 18 Shows a structural block diagram of an electronic device provided by an embodiment of the present application;

[0034] Figure 19 Shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application;

[0035] Figure 20 The block diagram of a computer program product provided by an embodiment of the present application is shown. Detailed implementation manners

[0036] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Usually, the components of the embodiments of the present application described and shown in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0037] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0038] The Internet of Things (IOT) is a network concept that extends and expands its user side to any object-to-object connection on the basis of the "Internet concept" for information exchange and communication. With the development of Internet of Things technology, some scenarios can be configured in an Internet of Things system. For the configured scenarios, multiple intelligent devices may be involved, and there is a certain linkage relationship between the multiple intelligent devices, enabling them to work together. For example, the configured scenario may include that after two devices are interconnected through communication technologies such as Bluetooth, wifi direct, or wifi screen mirroring, communication data can be transmitted between the two devices.

[0039] In the current technical method, when device A is interconnected with device B, if device A is the target device, device A is made to enter the pairing state and continuously send out broadcasts. Device B searches for the network information of the pairable devices and displays it on the interaction interface. The user manually selects device A (i.e., the target device) from the pairable devices on the interaction interface and initiates a connection. In this process, the user not only needs to manually activate the target device to the pairing state, but also needs to select the pairable target device on another device. And the interconnection between two new devices requires repeating the above process. In this process, the user needs to interact with two devices, with low efficiency, which greatly affects the user experience. Among them, device A and device B can be electronic devices such as Bluetooth headsets, gamepads, Internet of Things devices, TVs, mobile phones, etc.

[0040] As Figure 1 shown in the device interconnection system, assuming that the above-mentioned Device A is the first device and Device B is the second device. Specifically, Figure 1 the device interconnection system shown includes a remote controller 110, a first device 120, and a second device 130. Among them, the first device 120 can receive pairing broadcasts of multiple pairable devices including the second device 130. Then, the first device 120 can display information of these multiple pairable devices on the screen. The user can send a control instruction to the first device 120 through the remote controller 110. This control instruction is used to determine the second device 130 from these multiple pairable devices and instruct the first device 120 to establish a connection with the second device 130. The way the user interacts with the first device through the remote controller has too low interaction efficiency and brings a poor experience to the user.

[0041] Therefore, in order to overcome the above defects, the embodiments of the present application provide a device interconnection method, device, electronic device, and storage medium. The process of controlling the first device and the second device to communicate through the control device can save the user's operation steps for the two devices to be interconnected and improve the interaction efficiency.

[0042] Please refer to Figure 2 , Figure 2 which shows a flowchart of a device interconnection method provided by an embodiment of the present application. This device interconnection method can be applied to a control device. Specifically, this method includes: S210 to S240.

[0043] S210: Receive an interconnection request, where the interconnection request is used to request to connect a first device and a second device.

[0044] In the embodiments of the present application, the interconnection request can be used to request to connect a first device and a second device, that is, to request to establish a communication connection between the first device and the second device. Among them, the communication connection between the first device and the second device can be that the first device and the second device are directly connected, or the first device and the second device are indirectly connected through an intermediate device. In the embodiments of the present application, this intermediate device can be a control device.

[0045] As an implementation manner, the interconnection request can be initiated by a user. For example, the interconnection request can be generated based on an interconnection operation initiated by the user on the connection control interface of the control device. That is to say, when the control device detects an interconnection operation initiated by the user on the connection control interface of the control device, such as detecting that the user is in Figure 3Clicking the "Enable Air Connection" button in the shown connection control interface can generate this connection request in the control device. Optionally, the connection control interface can be the display interface of an application developed by the control device to implement the device connection method. The connection control interface provides an operation entry for the user to control the first device and the second device to be interconnected, enabling the user to control the first device or the second device within the connection control interface of the control device.

[0046] As another implementation, the connection request can be initiated by the first device or the second device. In this case, the connection request can be a specified broadcast sent by the first device or the second device in a pairable state, and the specified broadcast carries the network address of the device that initiates the broadcast. Exemplarily, if the connection request is initiated by the first device, that is, the first device actively requests to establish a communication connection with the second device by sending a connection request. At this time, when the control device receives the connection request, the second device can also receive the connection request. However, since the second device needs to wait for the user to input a confirmation instruction for the second device to connect to the first device before sending a connection to the first device, therefore, in the case where the user has not input the confirmation instruction, the second device will not actively connect to the first device. Then, after the control device obtains the connection request, it can perform subsequent operations to establish the communication connection between the first device or the second device. Additionally, in some embodiments, after the second device receives the connection request, it may actively display an interface for whether to connect to the first device. To avoid the second device displaying this interface and causing interference to the user, the control device can broadcast an ignore request externally after receiving the connection request. The second device can receive the above connection request and the above ignore request. Then, in response to the above ignore request, the second device can ignore the above connection request, that is, not respond to the connection request, thereby avoiding the second device responding to the connection request and further parsing to obtain the network address of the first device and displaying a prompt message for whether to connect to the first device, such as the aforementioned interface.

[0047] Exemplarily, if the first device is a TV and the second device is a game controller, when the user uses the game controller, the game controller sends a connection request by means of Bluetooth broadcast or Wi-Fi broadcast, etc., to request to establish a communication connection with the first device. When an electronic device such as a mobile phone serving as the control device receives the connection request, it can obtain the connection request and further control the TV and the game controller to be interconnected through the mobile phone.

[0048] S220: In response to the connection request, determine whether a target private protocol is configured between the control device and the first device. If so, execute S230; if not, execute S240.

[0049] In an embodiment of the present application, a directed connection instruction is defined under a target private protocol, and the directed connection instruction includes the network information of a second device. Therefore, when a first device receives the directed connection instruction, the first device can obtain the network information of the second device from the directed connection instruction, and then establish a communication connection with the second device based on the network information of the second device. Therefore, if a control device wants to control the first device and the second device to be interconnected through the directed connection instruction, both the control device and the first device need to be configured with the target private protocol, so that the network information of the second device can be transmitted through the directed connection instruction between the control device and the first device, and the first device can be instructed to establish a communication connection with the second device based on the network information through the directed connection instruction.

[0050] In one implementation, the target private protocol can be a custom private communication protocol. The control device can encapsulate the directed connection instruction based on the private communication protocol. Therefore, when the first device receives the directed connection instruction, the first device can decrypt the directed connection instruction based on the private communication protocol, and only after decryption can it obtain the network information of the second device and know that the directed connection instruction is an instruction indicating that the first device establishes a communication connection with the second device based on the network information. That is to say, the private communication protocol needs to be configured in both the control device and the first device.

[0051] Furthermore, when determining whether the target private protocol is configured between the control device and the first device, the control device can send a probe message to the first device based on the private communication protocol, and detect in the control device whether a feedback message from the first device to the probe message is received within a preset time. If a feedback message from the first device to the probe message is received within the preset time, it is determined that the target private protocol has been configured between the control device and the first device; if a feedback message from the first device to the probe message is not received within the preset time, it is determined that the target private protocol has not been configured between the control device and the first device.

[0052] In another implementation, the target private protocol can be the API (Application Programming Interface) of the same SDK (Software Development Kit). When the control device and the first device are both provided with this API, the control device and the first device can both implement the functions of the above SDK through this API. At this time, the directed connection instruction can be an instruction defined under the above SDK, and the generation and parsing of the directed connection instruction can be achieved by calling this API. For example, when the control device calls this API, it can encapsulate the network information of the second device into the directed connection instruction and send the directed connection instruction to the first device; when the first device calls this API, it can parse out the network information of the second device from the directed connection instruction when receiving the directed connection instruction, and establish a communication connection with the second device based on this network information.

[0053] At this time, when determining whether the target private protocol is configured between the control device and the first device, first, the API of the SDK that supports this directed connection instruction configured by the control device itself can be determined, and then test data can be sent to the first device based on this API, and it can be detected whether feedback data from the first device to this test data is received within a preset time. If the feedback data from the first device to this test data is received within the preset time, it is determined that the target private protocol has been configured between the control device and the first device; if the feedback data from the first device to this test data is not received within the preset time, it is determined that the target private protocol has not been configured between the control device and the first device.

[0054] It can be understood that whether the target private protocol is a private communication protocol or an API interface of the same SDK, it is possible to determine whether the target private protocol is configured between the control device and the first device by determining whether the control device and the first device are produced by the same manufacturer. Optionally, it is possible to determine whether the control device and the first device are produced by the same manufacturer through the device identifier of the control device and the device identifier of the first device. Among them, the device identifier of the control device and the device identifier of the first device can both be the manufacturer identifier or the device name set when the device leaves the factory (it can be understood that a device name is usually set when the device leaves the factory, and the device names set by the same manufacturer when leaving the factory have a similar naming rule. Therefore, the manufacturer of the electronic device can be identified through the device name set when leaving the factory. For example, the device names set by the devices produced by the same manufacturer when leaving the factory are all "manufacturer abbreviation-xxx"). In addition, the device identifier of the control device and the device identifier of the first device can also be the MAC address of the device (wherein, the manufacturer of the device usually has a MAC address pool, and a MAC address is selected from this MAC address pool as the MAC address of the device when the device leaves the factory. Therefore, it is possible to determine whether the two are produced by the same manufacturer by determining whether the MAC address of the control device and the MAC address of the first device belong to the same MAC address pool), etc.

[0055] In addition, in some other embodiments, when determining whether the target private protocol is configured between the control device and the first device, it is also possible to obtain the device selection operation of the target option in at least one device option on the device selection interface of the control device, and then determine whether the target private protocol is configured between the control device and the first device based on this target option. Among them, the at least one device option can be used to indicate that the target private protocol is configured between the control device and the first device and / or the target private protocol is not configured between the control device and the first device. Exemplarily, if the target private protocol can only be configured in devices produced by the same manufacturer, for the convenience of user identification, the first device can be called the master device and the second device can be called the slave device. As Figure 4 shown, the first device option indicating "this device is from the same manufacturer as the master device" and the second device option indicating "this device is from a different manufacturer from the master device" can be provided for the user on the device selection interface of the control device. If the target option corresponding to the device selection operation is the first device option, that is, the user selects the first device option on the device selection interface, it is determined that the target private protocol is configured between the control device and the first device; if the target option corresponding to the device selection operation is the second device option, that is, the user selects the second device option on the device selection interface, it is determined that the target private protocol is not configured between the control device and the first device.

[0056] S230: Send the directed connection instruction defined by the target private protocol to the first device. The directed connection instruction includes the network information of the second device, and is used to instruct the first device to establish a communication connection with the second device based on the network information.

[0057] In an embodiment of the present application, a directed connection instruction is defined under the target private protocol, and the directed connection instruction includes the network information of the second device. When the first device receives the directed connection instruction, the first device can obtain the network information of the second device from the directed connection instruction, and then establish a communication connection with the second device based on the network information of the second device. Among them, the network information of the second device may be information used to uniquely identify the second device when the second device communicates with devices other than the second device, for example, it may be any one or a combination of the device name, MAC address, and IP address of the second device. Therefore, if the control device wants to control the first device and the second device to be interconnected through the directed connection instruction, both the control device and the first device need to be configured with the target private protocol, so as to transmit the network information of the second device between the control device and the first device through the directed connection instruction, and instruct the first device to establish a communication connection with the second device based on the network information through the directed connection instruction.

[0058] As can be seen from the foregoing embodiments, when the target private protocol has been configured between the control device and the first device, the control device can transmit the network information of the second device through the directed connection instruction defined by the target private protocol, and the control device can also instruct the first device to establish a communication connection with the second device based on the network information through the directed connection instruction.

[0059] In an embodiment of the present application, the control device can first obtain the network information of the second device. As an implementation manner, when obtaining the network information of the second device, the control device and the second device may be in a state where no communication connection has been established. At this time, the control device can obtain the pairing broadcast sent by the second device, and then obtain the network information of the second device based on the pairing broadcast. That is to say, before the control device obtains the network information of the second device, the second device may be in a pairable state, and the second device can send a pairing broadcast in the pairable state. Thus, when the control device responds to the above interconnection request and determines that the target private protocol has been configured between the control device and the first device, the network information of the second device can be obtained according to the pairing broadcast of the second device. As another implementation manner, when the control device obtains the network information of the second device, the control device and the second device may be in a state where a communication connection has been established. At this time, the control device can send a network query request to the second device, and when receiving the network feedback request for the network query request from the second device, the network information of the second device can be determined from the network feedback request.

[0060] After obtaining the network information of the second device, then, the control device can encapsulate the network information of the second device into a directed connection instruction, and then send the directed connection instruction to the first device. After the first device receives the directed connection instruction sent by the control device, since both the first device and the control device have configured the target private protocol, the first device can parse the network information of the second device from the directed connection instruction and can respond to the directed connection instruction, that is, establish a communication connection with the second device based on the network information of the second device. Optionally, when the first device establishes a communication connection with the second device based on the network information of the second device, the first device can send a directed broadcast containing the network information of the second device. When the second device receives the directed broadcast containing its own network information, the second device can send a connection request to the first device for the directed broadcast. Therefore, when the first device receives the connection request from the second device for the directed broadcast, it can establish a communication connection with the second device.

[0061] As Figure 5 shown, taking the control device as the mobile phone 510 as an example, the first device can be the TV 520, and the second device is the game controller 530, then the game controller 530 needs to be connected to the TV 520. Among them, the mobile phone 510 can continuously detect whether it receives an interconnection request for connecting the game controller 530 and the TV 520, for example, continuously detect whether it receives a device selection operation of a target option in at least one device option on the device selection interface of the mobile phone 510 by the user. If the target option selected by the user is the above first device option, it is determined that the target private protocol has been configured between the mobile phone 510 and the TV 520. In this case, before the mobile phone 510 sends the directed connection instruction defined by the target private protocol to the TV 520, the game controller 530 can be adjusted to the pairable state and a pairing broadcast can be sent. Then, the mobile phone 510 can receive the pairing broadcast of the game controller 530 and obtain the network information of the game controller 530 according to the pairing broadcast. Then the mobile phone 510 encapsulates the network information of the game controller 530 into the directed connection instruction, and then sends the directed connection instruction to the TV 520. After receiving the directed connection instruction, the TV 520 can parse the network information of the game controller 530 from the directed connection instruction and respond to the directed connection instruction, that is, establish a communication connection with the game controller 530 according to the network information of the game controller 530.

[0062] Specifically, the directed broadcast may be a connectable directed broadcast (Connectable Directed Event Type) in Bluetooth. Optionally, in addition to establishing a communication connection through Bluetooth, the first device and the second device may also establish a communication connection using the communication protocols corresponding to communication technologies such as Wi-Fi Direct and Wi-Fi screen mirroring. The embodiments of the present application do not limit the communication protocol used when the first device and the second device establish a communication connection. In addition, the embodiments of the present application do not limit the communication protocol used when the control device obtains the network information of the second device.

[0063] It should be noted that the communication technology used when the control device obtains the network information of the second device may be the same as the communication technology used when the first device and the second device establish a communication connection. For example, both use Bluetooth; it may also be different. For example, the control device uses Bluetooth when obtaining the network information of the second device, while the first device and the second device use Wi-Fi when establishing a communication connection, and so on.

[0064] S240: Establish communication connections with the first device and the second device respectively, so that the communication data between the first device and the second device is forwarded through the control device.

[0065] As can be seen from the foregoing embodiments, in the case where the target private protocol is not configured between the control device and the first device, whether the control device does not configure the target private protocol or the first device does not configure the target private protocol, it is impossible to transmit the directed connection instruction between the control device and the first device. Therefore, it is even more impossible for the control device to instruct the first device to establish a communication connection with the second device based on the network information through the directed connection instruction. It can be seen that in the case where the target private protocol is not configured between the control device and the first device, the control device needs to adopt a different method from the case where the target private protocol is configured between the control device and the first device to control the first device and the second device to communicate.

[0066] In the embodiments of the present application, in the case where the target private protocol is not configured between the control device and the first device, the control device may establish communication connections with the first device and the second device respectively, so that the communication data between the first device and the second device can be forwarded through the control device.

[0067] Exemplarily, such as Figure 6As shown, if the control device is a mobile phone 610, the first device is a TV 620, and the second device is a game controller 630, and the target option selected by the user in the control device 610 is the above-mentioned second device option, it is determined that there is no configured target private protocol between the mobile phone 610 and the TV 620. In this case, the mobile phone 610 can establish communication connections with the game controller 630 and the TV 620 respectively. And when the game controller 630 sends joystick operation data to the TV 620, the game controller 630 can first send the joystick operation data to the mobile phone 610 through the communication connection between the mobile phone 610 and the game controller 630, and then the mobile phone 610 forwards the joystick operation data to the TV 620 through the communication connection between the mobile phone 610 and the TV 620.

[0068] In some embodiments, the first device can be used as the master device, and the second device is the slave device. At this time, the same first device can be interconnected with different types of second devices, that is, the same master device supports accessing different types of slave devices (can be accessed simultaneously or non-simultaneously). It can be understood that the communication protocols supported by different types of second devices may be different. For example, human-computer interaction devices such as mice, keyboards, and game controllers support the hid (Human Interface Device) protocol, while Bluetooth headsets support the A2DP (Advanced Audio Distribution Profile) protocol. At this time, if the communication connection established between the control device and the first device does not support the communication protocol supported by the second device, the control device cannot forward the communication data between the first device and the second device.

[0069] To solve this problem, in some embodiments, when establishing a communication connection between the control device and the first device, at least one communication connection can be established between the control device and the first device, and each communication connection corresponds to a communication protocol respectively. That is to say, when the second device is a different type of second device, the control device can forward the communication data of the second device through the communication connection corresponding to the communication protocol supported by the second device in at least one communication connection. Exemplarily, each communication connection in at least one communication connection is established based on a physical link or can also be established based on a logical link.

[0070] In some other embodiments, when establishing a communication connection between the control device and the first device, a communication connection can also be established between the control device and the first device. At this time, assuming that the communication protocol corresponding to the communication data of the second device is the specified communication protocol, the communication connection established between the control device and the first device supports the target communication protocol, and the target communication protocol is different from the specified communication protocol, then the control device can convert the communication data of the specified communication protocol generated by the second device into the communication data of the target communication protocol, and then send the communication data of the target communication protocol to the first device through the communication connection between the control device and the first device.

[0071] In the embodiments of the present application, when the control device obtains an interconnection request for connecting the first device and the second device, in response to the interconnection request, when the target private protocol is configured between the control device and the first device, the control device sends a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes the network information of the second device. Therefore, the control device can instruct the first device to establish a communication connection with the second device based on the network information according to the directed connection instruction, and the user does not need to operate the first device too much. When the target private protocol is not configured between the control device and the first device, the control device establishes communication connections with both the first device and the second device, and the control device can be used to perform the forwarding operation of the communication data between the first device and the second device, that is, the control device connects the first device and the second device. Therefore, the process of controlling the first device and the second device to communicate through the control device can save the user's operation steps for the two devices to be interconnected and improve the interaction efficiency.

[0072] Please refer to Figure 7 , Figure 7 shows a flowchart of a device interconnection method provided by another embodiment of the present application. The device interconnection method can be applied to a control device. When the target private protocol is not configured between the control device and the first device, the control device needs to establish communication connections with the first device and the second device respectively. Specifically, S240 may include: S710 to S730.

[0073] S710: If a communication connection has not been established between the control device and the first device before, control the control device to enter a pairable state, and send a pairing broadcast in the pairable state.

[0074] In the embodiments of the present application, the control device is a new device for the first device, that is, when responding to the interconnection request and the target private protocol is not configured between the control device and the first device, a communication connection has not been established between the control device and the first device before. Therefore, to ensure that the control device can forward the communication data between the first device and the second device, a communication connection needs to be established between the control device and the first device.

[0075] Specifically, when establishing a communication connection between the control device and the first device, first, the control device can control itself to enter a pairable state. When the control device is in the pairable state, the control device can be discovered by the first device. When the first device has not established a communication connection with the control device or has not pre-acquired the network information of the control device, the first device needs to pair with the control device. Through the pairing method, communication information is exchanged between the control device and the first device. This communication information can include data such as network information for establishing a connection. Therefore, for a new device, only when the control device enters the pairable state and sends a pairing broadcast can it be scanned by the first device, and then the pairing with the first device can be completed.

[0076] S720: Receive a connection request returned by the first device based on the pairing broadcast.

[0077] S730: In response to the connection request, establish a communication connection with the first device.

[0078] The process of establishing a communication connection between the control device and the first device is described as follows.

[0079] Assume that the control device is a new device to the first device, that is, the control device has not established a communication connection with the first device, or the first device has not obtained the network information of the control device.

[0080] Currently, the control device has not established a communication connection with the first device, and the first device expects to establish a communication connection with the control device. Then, the control device enters the pairable state so that the first device can scan the control device. Then, the first device obtains the network information of the control device and establishes a connection with the control device. As Figure 8 shown, when the control device enters the pairable state, the first device starts to scan the control device. For example, the control device can send a scan request in the form of a pairing broadcast in the pairable state. The pairing broadcast carries the network information of the control device. The first device can respond to the scan request and send a connection request to the control device based on the network information of the control device. The control device parses the connection request, obtains the network information of the first device, and then the control device establishes a communication connection with the first device based on the network information of the first device. Optionally, if the connection between the control device and the first device is through Bluetooth, the communication connection between the control device and the first device can be established based on Bluetooth; if the connection between the control device and the first device is through wifi, the communication connection between the control device and the first device can be established based on wifi.

[0081] Further, in some embodiments, after a communication connection is established between the control device and the first device, the communication data between the first device and the second device can be forwarded through the control device. In this case, during the process from the establishment of the communication connection between the control device and the first device to the forwarding of the communication data between the first device and the second device, the communication connection between the control device and the first device can be maintained all the time. In other embodiments, after a communication connection is established between the control device and the first device, no communication data is generated between the first device and the second device, that is, there is no need to immediately forward the communication data through the control device. At this time, it can be set that if no data transmission is detected between the control device and the first device after a specified time, the communication connection between the control device and the first device is disconnected, and then reconnected when the communication data needs to be forwarded. For the detailed process, please refer to the corresponding steps in the subsequent embodiments and will not be elaborated here.

[0082] As an embodiment, if only one communication connection is established between the control device and the first device, and the communication protocol corresponding to the communication data of the second device is a specified communication protocol, while the communication connection established between the control device and the first device supports the target communication protocol, and the specified communication protocol is different from the target communication protocol, the control device can convert the communication data of the specified communication protocol generated by the second device into the communication data of the target communication protocol, and then send the communication data of the target communication protocol to the first device through the communication connection between the control device and the first device.

[0083] As another embodiment, multiple communication connections can be established between the control device and the first device, and each communication connection corresponds to a communication protocol. That is to say, when transmitting communication data between different types of second devices and the first device, the control device can forward the communication data of the second device through the communication connection corresponding to the communication protocol supported by the second device among the multiple communication connections. Among them, the multiple communication connections in the embodiments of the present application are one or more communication connections.

[0084] Specifically, the control device includes a plurality of virtual devices, each virtual device corresponding to a communication protocol. Moreover, the control device sends multiple pairing broadcasts in the pairable state, each pairing broadcast corresponding to a virtual device of the control device. The above connection requests are also multiple, each connection request corresponding to a pairing broadcast. Therefore, when establishing multiple communication connections between the control device and the first device, the control device can send a pairing broadcast for each virtual device in the pairable state. When the first device receives the pairing broadcasts sent for each virtual device, it can send a connection request for each pairing broadcast. When the control device receives each connection request, it can respond to each connection request and establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device. Further, when transmitting communication data between the second device supporting a specified communication protocol and the first device, the control device can forward the communication data of the second device to the communication connection corresponding to the specified communication protocol among the multiple established communication connections.

[0085] In the embodiments of the present application, when establishing a communication connection between the control device and the first device, a communication connection can be established separately for each communication protocol. In this way, through the same control device, it is possible to forward the communication data generated between the first device and the second device based on different communication protocols.

[0086] For example, if the second device is a Bluetooth headset that supports the A2DP protocol, a path connection can be established between the control device and the first device based on the A2DP protocol. If the second device is a gamepad that supports the hid protocol, a path connection can also be established between the control device and the first device based on the hid protocol.

[0087] Please refer to Figure 9 , Figure 9 shows a flowchart of a device interconnection method provided by another embodiment of the present application. This device interconnection method can be applied to a control device. When a target private protocol is not configured between the control device and the first device, it is necessary to establish communication connections between the control device and the first device and between the control device and the second device. Specifically, S240 may further include: S910 to S940.

[0088] S910: When a target private protocol is not configured between the control device and the first device, if a communication connection has been established between the control device and the first device before, control the control device to enter the pairable state.

[0089] S920: Based on at least one back-connection request sent by the first device, back-connect at least one of the multiple successfully established communication connections.

[0090] In an embodiment of the present application, if a communication connection has been successfully established between the control device and the first device, and multiple communication connections that have been successfully established between the control device and the first device are all disconnected. For example, if the control device or the first device is turned off, or no data transmission is detected between the control device and the first device within a specified time, resulting in the disconnection of multiple established communication connections between the control device and the first device, then a communication connection can be re-established by means of back connection. Specifically, when the control device and the first device have been successfully paired, the control device can be controlled to enter a pairable state. At this time, the control device can receive at least one back connection request sent by the first device, and back connect the communication connection corresponding to each back connection request among the multiple successfully established communication connections.

[0091] S930: Determine whether at least one communication connection among the multiple communication connections that have been successfully established between the control device and the first device has been successfully back connected this time.

[0092] S940: If at least one communication connection has been successfully back connected, establish a communication connection between the control device and the second device.

[0093] It can be understood that the communication connection corresponding to each back connection request may be successfully back connected or may fail to be back connected. For example, as Figure 10 shown, 3 communication connections have been successfully established between the control device and the first device. Before back connecting according to the back connection request, all 3 communication connections are disconnected. Then the first device can send 3 back connection requests, and each back connection request corresponds to one communication connection. After the control device receives these 3 back connection requests, it can back connect all 3 successfully established communication connections. If 1, 2, or 3 communication connections are successfully back connected ( Figure 10 in it, 1 communication connection is successfully back connected), then at least one communication connection has been successfully back connected. When at least one communication connection has been successfully back connected, a communication connection with the second device can be established at this time. Please refer to Figure 10 again. The control device can send a scan request in the form of a pairing broadcast in the pairable state. The pairing broadcast carries the network information of the control device; the second device responds to the scan request and sends a connection request to the control device based on the network information of the control device; the control device parses the connection request to obtain the network information of the second device. Then, the control device can establish a communication connection with the second device based on the network information of the second device.

[0094] Further, since each communication connection corresponds to a communication protocol, when at least one communication connection has been successfully reconnected, it is necessary to determine the target communication protocol corresponding to the successfully reconnected communication connection, and then determine whether the target communication protocol belongs to the specified communication protocol supported by the second device. For example, it is determined whether the protocol number corresponding to the target communication protocol is the same as the protocol number of the specified communication protocol supported by the second device. If the target communication protocol belongs to the specified communication protocol supported by the second device, the control device and the second device can establish a connection based on the specified communication protocol, and then the control device can forward the communication data between the first device and the second device through the communication connection corresponding to the target communication protocol that has been successfully reconnected between the control device and the first device.

[0095] If the target communication protocol does not belong to the specified communication protocol supported by the second device, and there may be a specified communication connection corresponding to the specified communication protocol among the communication connections that have not been successfully reconnected, it is necessary to determine whether there is such a specified communication connection among the communication connections that have not been successfully reconnected this time. If there is a specified communication connection corresponding to the specified communication protocol, the first device can be instructed to successfully reconnect to the specified communication connection, and the control device and the second device can establish a communication connection based on the specified communication protocol. If there is no specified communication connection corresponding to the specified communication protocol, that is, there is no specified communication connection corresponding to the specified communication protocol among the multiple communication connections that have been successfully established between the control device and the first device, a new communication connection corresponding to the specified communication protocol can be established between the control device and the first device, and the control device and the second device can establish a communication connection based on the specified communication protocol.

[0096] It can be understood that when the target private protocol is not configured between the control device and the first device, before determining that a communication connection has been successfully established between the control device and the first device and controlling the control device to enter the pairable state, it is first necessary to establish multiple communication connections between the control device and the first device.

[0097] Optionally, as Figure 11 shown, Figure 11 FIG. shows a flowchart of a device interconnection method provided by another embodiment of the present application. The device interconnection method can be applied to a control device. When the target private protocol is not configured between the control device and the first device, before determining that a communication connection has been successfully established between the control device and the first device and controlling the control device to enter the pairable state, it may further include: S1110 to S1120.

[0098] S1110: Generate multiple virtual devices, and each virtual device corresponds to a communication protocol.

[0099] First, the control device can generate multiple virtual devices, and each virtual device corresponds to a communication protocol. In some embodiments, the communication modules of different types of electronic devices can be simulated in the control device, and then the simulated communication modules of various types of electronic devices in the control device are used as virtual devices. Among them, the communication module of each type of electronic device can correspond to a communication protocol, and two or more types of electronic devices can correspond to the same communication protocol. That is to say, the relationship between the virtual device and the communication protocol can be many-to-one. For example, the control device can generate electronic devices such as virtual mice, virtual game pads, virtual Bluetooth headsets, etc. The communication protocols corresponding to the virtual mouse and the virtual game pad are the HID protocol, and the communication protocol corresponding to the virtual Bluetooth headset can be, for example, the A2DP protocol.

[0100] S1120: Establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device, and each communication connection between each virtual device and the first device serves as the communication connection between the control device and the first device.

[0101] In some embodiments, a communication connection can be established between each virtual device and the first device respectively, and each communication connection needs to support the communication protocol of the corresponding virtual device. As Figure 12 shown, if the control device 1210 generates three virtual devices, namely, a virtual mouse 1211, a virtual game pad 1212, and a virtual Bluetooth headset 1213, then a communication connection between the virtual mouse 1211 and the first device 1220 is generated based on the HID protocol, a communication connection between the virtual game pad 1212 and the first device 1220 is generated based on the HID protocol, and a communication connection between the virtual Bluetooth headset 1213 and the first device 1220 is generated based on the A2DP protocol, and these three communication connections are all used as the communication connection between the control device 1210 and the first device 1220. When the second device 1230 is a game pad, if the specified communication protocol supported by the game pad is the HID protocol and the above three communication connections have all been successfully reconnected, then a communication connection corresponding to the HID protocol can be selected from the three communication connections. It can be understood that if there are two or more successfully reconnected communication connections, then a communication connection corresponding to the virtual device consistent with the specified device type can be determined from the two or more successfully reconnected communication connections according to the specified device type of the second device as the specified communication connection. Then, after the control device and the second device establish a communication connection, the control device can forward the communication data between the first device and the second device through the specified communication connection between the control device and the first device. As Figure 12As shown, among the successfully reconnected communication connections, the communication protocols corresponding to 2 communication connections are the HID protocol. Then, among these 2 communication connections, the communication connection corresponding to the virtual device that is consistent with the specified device type of the second device, that is, the communication connection corresponding to the virtual gamepad ( Figure 12 the solid line pointing to the virtual gamepad 1212 in

[0102] In this embodiment, multiple communication connections can be established between the control device and the first device in advance. Thereafter, when a new second device needs to transmit communication data with the first device, there is no need to establish a communication connection between the control device and the first device. Instead, only the established multiple communication connections need to be reconnected and a communication connection between the control device and the second device needs to be established. In this way, when a new second device is connected, the connection operation between the control device and the first device can be omitted, saving operation time and improving the interaction efficiency.

[0103] Please refer to Figure 13 , Figure 13 shows a flowchart of a device interconnection method for a first device provided by an embodiment of the present application. This device interconnection method can be applied to the first device. When a target private protocol has been configured between the control device and the first device, the first device can establish a communication connection with the second device based on a directed connection instruction. Specifically, this method can include: S1310 to S11320.

[0104] S1310: When a target private protocol has been configured between the control device and the first device, obtain the directed connection instruction sent by the control device based on the target private protocol. The directed connection instruction is an instruction defined by the target private protocol, and the directed connection instruction includes the network information of the second device.

[0105] S1320: In response to the directed connection instruction, establish a communication connection with the second device based on the network information.

[0106] In an embodiment of the present application, if a target private protocol has been configured between the control device and the first device, then after the first device obtains the directed connection instruction sent by the control device based on the target private protocol, it can parse out the network information of the second device from the directed connection instruction and respond to the directed connection instruction, that is, establish a communication connection with the second device based on the network information of the second device.

[0107] As an embodiment, before obtaining the directed connection instruction, a communication connection can have been established between the first device and the control device so that communication data including the directed connection instruction can be transmitted between the first device and the control device.

[0108] In some embodiments, when the first device establishes a communication connection with the second device based on the network information of the second device, the second device is in a pairable state. At this time, as Figure 14 shown, in response to the directed connection instruction, the first device will enter the connectable state and send a directed broadcast to the second device based on the network information of the second device. After receiving the directed broadcast containing the network information of this device, the second device can return a connection request to the first device based on the directed broadcast. Then, when the first device receives the connection request from the second device, a communication connection with the second device can be successfully established.

[0109] It should be noted that the communication technology used when establishing a communication connection between the first device and the control device can be the same as the communication technology used when establishing a communication connection between the first device and the second device. For example, both use Bluetooth, or they can be different. For example, a Bluetooth connection is established between the first device and the control device, while a Wi-Fi connection is established between the first device and the second device, and so on.

[0110] In addition, in the case where no target private protocol is configured between the control device and the first device, the first device can also establish a communication connection with the control device, and the control device can also establish a communication connection with the second device, so that the communication data between the first device and the second device can be forwarded through the control device.

[0111] It should be noted that for the parts not described in detail in the above steps, reference can be made to the foregoing embodiments and will not be elaborated here.

[0112] Please refer to Figure 15 , Figure 15 which shows a flowchart of a device interconnection method of a device interconnection system provided in an embodiment of the present application. The device interconnection method can be applied to a device interconnection system. The device interconnection system can include a control device, a first device, and a second device. The method can include: S1510 to S1540.

[0113] S1510: The control device receives an interconnection request for requesting to connect the first device and the second device.

[0114] In the embodiments of the present application, the interconnection request can be initiated by a user, or can be initiated by the first device or the second device. The embodiments of the present application do not limit this.

[0115] S1520: In the case where a target private protocol is configured between the control device and the first device, the control device responds to the interconnection request and sends the directed connection instruction defined by the target private protocol to the first device. The directed connection instruction includes the network information of the second device.

[0116] S1530: In response to the directed connection instruction, the first device establishes a communication connection with the second device based on the network information of the second device.

[0117] In some embodiments, only when a target private protocol has been configured between the control device and the first device, can the first device respond to the directed connection instruction received from the control device, that is, obtain the network information of the second device from the directed connection instruction and establish a communication connection with the second device based on this network information. In the case where no target private protocol is configured between the control device and the first device, the control device cannot instruct the first device to establish a communication connection with the second device through the directed connection instruction. Therefore, the control device needs to adopt a different method from the case where a target private protocol is configured between the control device and the first device to control the first device and the second device to communicate.

[0118] S1540: In the case where no target private protocol is configured between the control device and the first device, the control device responds to the interconnection request and establishes communication connections with the first device and the second device respectively, so that the communication data between the first device and the second device is forwarded through the control device.

[0119] In the embodiments of the present application, in the case where no target private protocol is configured between the control device and the first device, the control device can establish communication connections with the first device and the second device respectively. Therefore, the control device forwards the communication data between the first device and the second device without establishing a communication connection between the first device and the second device.

[0120] It can be understood that the content of steps S1510 to S1540 can refer to the execution process of any of the foregoing method embodiments, and the embodiments of the present application will not be elaborated herein.

[0121] In an embodiment of the present application, when the control device receives an interconnection request for connecting a first device and a second device, in response to the interconnection request, when a target private protocol has been configured between the control device and the first device, the control device sends a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes the network information of the second device. After receiving the directed connection instruction, the first device can establish a communication connection with the second device based on the network information. Therefore, the first device can complete the connection between the first device and the second device based on the indication of the control device, and the user does not need to operate the first device too much. When a target private protocol is not configured between the control device and the first device, the control device establishes communication connections with both the first device and the second device, and the control device can be used to perform the forwarding operation of the communication data between the first device and the second device, that is, the control device connects the first device and the second device. Therefore, the process of controlling the first device and the second device to communicate through the control device can save the user's operation steps for the two devices to be interconnected and improve the interaction efficiency.

[0122] Please refer to Figure 16 , which shows a structural block diagram of a device interconnection device provided in an embodiment of the present application. The device can be applied to a control device, and the device may include: an interconnection detection module 1610, a first connection module 1620, and a second connection module 1630.

[0123] The interconnection detection module 1610 is configured to receive an interconnection request for requesting to connect a first device and a second device.

[0124] The first connection module 1620 is configured to, when a target private protocol has been configured between the control device and the first device, in response to the interconnection request, send a directed connection instruction defined by the target private protocol to the first device, where the directed connection instruction includes the network information of the second device, and the directed connection instruction is used to instruct the first device to establish a communication connection with the second device based on the network information of the second device.

[0125] The second connection module 1630 is configured to, when a target private protocol is not configured between the control device and the first device, in response to the interconnection request, establish communication connections with the first device and the second device respectively, so that the communication data between the first device and the second device is forwarded through the control device.

[0126] Further, the second connection module 1630 includes: a first pairing module, configured to, when no target private protocol is configured between the control device and the first device, in response to the interconnection request, if no communication connection has been established between the control device and the first device before, control the control device to enter a pairable state, and send a pairing broadcast in the pairable state; a request acquisition module, configured to receive a connection request returned by the first device based on the pairing broadcast; and a request response module, configured to establish a communication connection with the first device in response to the connection request.

[0127] Further, the above control device includes a plurality of virtual devices, each of the virtual devices corresponding to a communication protocol. The pairing broadcasts are multiple, each of the pairing broadcasts corresponding to one of the virtual devices of the control device, and the connection requests are multiple, each of the connection requests corresponding to one of the pairing broadcasts. Then, the above request response module may include: a response request sub-module, configured to, in response to each of the connection requests, establish a communication connection between each of the virtual devices and the first device based on the communication protocol corresponding to each of the virtual devices.

[0128] Further, the above second connection module 1630 may further include: a state switching module, configured to, when no target private protocol is configured between the control device and the first device, if a communication connection has been established between the control device and the first device before, control the control device to enter a pairable state; a connection reconnecting module, configured to reconnect at least one of the established multiple communication connections based on at least one reconnect request sent by the first device; a reconnect judgment module, configured to judge whether at least one of the multiple communication connections established between the control device and the first device before has been successfully reconnected this time; and a device connection sub-module, configured to establish a communication connection with the second device if at least one communication connection has been successfully reconnected.

[0129] Further, each of the communication connections corresponds to a communication protocol. Then, the above device connection sub-module may include: a protocol determination module, configured to, if at least one communication connection has been successfully reconnected, determine the target communication protocol corresponding to the successfully reconnected communication connection; and a first device connection module, configured to, if the target communication protocol belongs to the specified communication protocols supported by the second device, establish a communication connection with the second device based on the specified communication protocol.

[0130] Further, the above device connection sub-module may further include: a connection determination module, configured to determine whether there is a specified communication connection corresponding to the specified communication protocol in the communication connection that has not been successfully reconnected this time if the target communication protocol does not belong to the specified communication protocols supported by the second device; a second device connection module, configured to, if there is a specified communication connection corresponding to the specified communication protocol, instruct the first device to successfully reconnect to the specified communication connection and establish a communication connection with the second device based on the specified communication protocol.

[0131] Further, the above device connection sub-module may further include: a third device connection module, configured to, if there is no specified communication connection corresponding to the specified communication protocol, create a communication connection corresponding to the specified communication protocol between the control device and the first device and establish a communication connection with the second device based on the specified communication protocol.

[0132] Further, in the case where the target private protocol is not configured between the control device and the first device, if a communication connection has been established between the control device and the first device before, before controlling the control device to enter the pairable state, the device interconnection device may further include: a device virtual module, configured to generate a plurality of virtual devices, each virtual device corresponding to a communication protocol; a virtual connection establishment module, configured to establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device, and regard the communication connection between each virtual device and the first device as the communication connection between the control device and the first device.

[0133] Further, the virtual connection establishment module may include: a broadcast sending module, configured to control the control device to enter the pairable state and send a plurality of pairing broadcasts in the pairable state, each pairing broadcast corresponding to a virtual device of the control device; a request return module, configured to obtain a connection request returned by the first device based on each pairing broadcast; a virtual connection establishment sub-module, configured to, in response to each connection request, establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device.

[0134] Please refer to Figure 17 , which shows a structural block diagram of another device interconnection device provided by an embodiment of the present application. The device may be applied to a first device and may include: an instruction acquisition module 1710 and a communication connection module 1720.

[0135] An instruction acquisition module 1710, configured to, when a target private protocol is configured between the control device and the first device, acquire a directed connection instruction sent by the control device based on the target private protocol, where the directed connection instruction is an instruction defined by the target private protocol and includes network information of a second device; a communication connection module 1720, configured to establish a communication connection with the second device based on the network information in response to the directed connection instruction.

[0136] Optionally, the above communication connection module 1720 may include: a status control module, configured to control the first device to enter a connectable state in response to the directed connection instruction; a communication connection sub-module, configured to send a directed broadcast to the second device based on the network information, and establish a communication connection with the second device when a connection request returned by the second device based on the directed broadcast is received.

[0137] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.

[0138] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical, or other forms of coupling.

[0139] In addition, in each embodiment of the present application, each functional module may be integrated in a processing module, or each module may exist physically alone, or two or more modules may be integrated in one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0140] An embodiment of the present application further provides a device interconnection system, which may include a control device, a first device, and a second device, and the control device is connected to the first device. Among them, the control device is configured to receive an interconnection request for requesting to connect the first device and the second device; the control device is further configured to, when a target private protocol has been configured between the control device and the first device, in response to the interconnection request, send a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes network information of the second device; the first device is configured to, in response to the directed connection instruction, establish a communication connection with the second device based on the network information of the second device; the control device is further configured to, when a target private protocol has not been configured between the control device and the first device, in response to the interconnection request, establish communication connections with the first device and the second device respectively, so that communication data between the first device and the second device is forwarded through the control device.

[0141] Please refer to Figure 18 , which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 1800 may be an electronic device such as a smart phone, a tablet computer, an e-book, etc. that can run application programs. The electronic device 1800 in the present application may also be a server or an operating device. Specifically, the electronic device 1800 may include one or more of the following components: a processor 1810, a memory 1820, and one or more application programs, where one or more application programs may be stored in the memory 1820 and configured to be executed by one or more processors 1810, and one or more programs are configured to execute the methods described in the foregoing method embodiments.

[0142] The processor 1810 may include one or more processing cores. The processor 1810 is connected to various parts within the entire electronic device 1800 through various interfaces and circuits. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1820, and by invoking data stored in the memory 1820, it performs various functions of the electronic device 1800 and processes data. Optionally, the processor 1810 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 1810 may integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communications. It can be understood that the above modem may not be integrated into the processor 1810 and may be implemented separately through a communication chip.

[0143] The memory 1820 may include random access memory (RAM) and may also include read-only memory. The memory 1820 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1820 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created during the use of the electronic device (such as phone book, audio and video data, chat record data, etc.).

[0144] Please refer to Figure 19 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program code is stored in the computer-readable storage medium 1900, and the program code can be called by the processor to execute the methods described in the above method embodiments.

[0145] The computer-readable storage medium 1900 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 1900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1900 has a storage space for program code 1910 that executes any of the method steps in the above-described methods. These program codes can be read out from or written into one or more computer program products. The program code 1910 can be compressed in a suitable form, for example.

[0146] Please refer to Figure 20 , which shows a structural block diagram of a computer program product provided by an embodiment of the present application. The computer program product 2000 stores computer programs / instructions 2010, and when it runs on a computer, it causes the computer programs / instructions 2010 to perform any of the method steps in the above-described methods.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A device interconnection method, characterized in that, Applied to a control device, the method includes: Receiving an interconnection request for requesting to connect a first device and a second device; When a target private protocol has been configured between the control device and the first device, in response to the interconnection request, sending a directed connection instruction defined by the target private protocol to the first device, where the directed connection instruction includes network information of the second device, and the directed connection instruction is used to instruct the first device to establish a communication connection with the second device based on the network information of the second device; When a target private protocol has not been configured between the control device and the first device, in response to the interconnection request, establishing a communication connection with the second device; If a communication connection has not been established between the control device and the first device before, controlling the control device to enter a pair-able state and sending pairing broadcasts in the pair-able state, where the control device includes multiple virtual devices, each virtual device corresponds to a communication protocol, there are multiple pairing broadcasts, each pairing broadcast corresponds to a virtual device of the control device, and there are multiple connection requests, each connection request corresponds to a pairing broadcast; Receiving a connection request returned by the first device based on the pairing broadcast; In response to each connection request, establishing a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device, so that communication data between the first device and the second device is forwarded by the control device, where the forwarding includes forwarding the communication data of the second device to the communication connection corresponding to the specified communication protocol among the established multiple communication connections, and the specified communication protocol is the communication protocol corresponding to the communication data of the second device.

2. The method according to claim 1, wherein When a target private protocol has not been configured between the control device and the first device, in response to the interconnection request, respectively establishing communication connections with the first device and with the second device, including: When a target private protocol has not been configured between the control device and the first device, if a communication connection has been established between the control device and the first device before, controlling the control device to enter a pair-able state; Based on at least one back-connection request sent by the first device, back-connecting at least one communication connection among the established multiple communication connections; Judging whether at least one communication connection among the multiple communication connections established between the control device and the first device before has been successfully back-connected this time; If at least one communication connection has been successfully back-connected, establishing a communication connection with the second device.

3. The method according to claim 2, wherein Each communication connection corresponds to a communication protocol. The step of, if at least one communication connection has been successfully back-connected, establishing a communication connection with the second device, includes: If at least one communication connection has been successfully back-connected, determining the target communication protocol corresponding to the successfully back-connected communication connection; If the target communication protocol belongs to the specified communication protocols supported by the second device, establishing a communication connection with the second device based on the specified communication protocol.

4. The method according to claim 3, wherein The method further includes: If the target communication protocol does not belong to the specified communication protocols supported by the second device, determine whether there is a specified communication connection corresponding to the specified communication protocol in the communication connection that fails to reconnect successfully this time; If there is a specified communication connection corresponding to the specified communication protocol, instruct the first device to successfully reconnect to the specified communication connection, and establish a communication connection with the second device based on the specified communication protocol.

5. The method according to claim 4, characterized in that, The method further includes: If there is no specified communication connection corresponding to the specified communication protocol, create a communication connection corresponding to the specified communication protocol between the control device and the first device, and establish a communication connection with the second device based on the specified communication protocol.

6. The method according to claim 2, characterized in that In the case where the target private protocol is not configured between the control device and the first device, if a communication connection has been established between the control device and the first device before, before controlling the control device to enter the pairable state, it further includes: Generate a plurality of virtual devices, each virtual device corresponding to a communication protocol; Establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device, and regard the communication connection between each virtual device and the first device as the communication connection between the control device and the first device.

7. The method according to claim 6, wherein The establishing a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device includes: Control the control device to enter the pairable state, and send a plurality of pairing broadcasts in the pairable state, each pairing broadcast corresponding to one of the virtual devices of the control device; Obtain the connection requests returned by the first device based on each pairing broadcast; In response to each connection request, establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device.

8. A device interconnection method, characterized in that, Applied to a first device, the method includes: In the case where the target private protocol is configured between the control device and the first device, obtain the directed connection instruction sent by the control device based on the target private protocol, the directed connection instruction being an instruction defined by the target private protocol, and the directed connection instruction including the network information of the second device; In response to the directed connection instruction, establish a communication connection with the second device based on the network information; In the case where no target private protocol is configured between the control device and the first device, if no communication connection has been established between the control device and the first device before, receive the pairing broadcast sent by the control device, and send a connection request to the control device based on the pairing broadcast. Wherein, the control device includes a plurality of virtual devices, each virtual device corresponds to a communication protocol, there are a plurality of the pairing broadcasts, each pairing broadcast corresponds to one of the virtual devices of the control device, there are a plurality of the connection requests, each connection request corresponds to one of the pairing broadcasts, and the connection request is used to enable the control device to establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device, so that the communication data between the first device and the second device is forwarded by the control device. Wherein, the forwarding includes forwarding the communication data of the second device to the communication connection corresponding to the specified communication protocol among the established multiple communication connections, and the specified communication protocol is the communication protocol corresponding to the communication data of the second device.

9. The method according to claim 8, wherein When the second device is in a pairable state, the establishing a communication connection with the second device based on the network information in response to the directed connection instruction includes: In response to the directed connection instruction, control the first device to enter a connectable state; Based on the network information, send a directed broadcast to the second device, and establish a communication connection with the second device when receiving the connection request returned by the second device based on the directed broadcast.

10. A device interconnection method, characterized in that, Applied to a device interconnection system, the device interconnection system includes a control device, a first device, and a second device, the control device is connected to the first device, and the method includes: The control device receives an interconnection request, and the interconnection request is used to request to connect the first device and the second device; In the case where a target private protocol is configured between the control device and the first device, the control device responds to the interconnection request and sends a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes the network information of the second device; The first device responds to the directed connection instruction and establishes a communication connection with the second device based on the network information of the second device; In the case where no target private protocol is configured between the control device and the first device, the control device responds to the interconnection request and establishes a communication connection with the second device; If no communication connection has been established between the control device and the first device before, control the control device to enter a pairable state, and send a pairing broadcast in the pairable state. Wherein, the control device includes a plurality of virtual devices, each virtual device corresponds to a communication protocol, there are a plurality of the pairing broadcasts, each pairing broadcast corresponds to one of the virtual devices of the control device, there are a plurality of the connection requests, each connection request corresponds to one of the pairing broadcasts; The control device receives the connection request returned by the first device based on the pairing broadcast; The control device responds to each of the connection requests, and based on the communication protocol corresponding to each virtual device, establishes a communication connection between each virtual device and the first device, so that the communication data between the first device and the second device is forwarded by the control device. Wherein, the forwarding includes forwarding the communication data of the second device to the communication connection corresponding to the specified communication protocol among the established multiple communication connections, and the specified communication protocol is the communication protocol corresponding to the communication data of the second device.

11. An apparatus for interconnecting devices, characterized in that, Applied to a control device, the apparatus includes: An interconnection detection module, configured to receive an interconnection request for requesting to connect a first device and a second device; A first connection module, configured to, when a target private protocol has been configured between the control device and the first device, in response to the interconnection request, send a directed connection instruction defined by the target private protocol to the first device, where the directed connection instruction includes network information of the second device, and the directed connection instruction is used to instruct the first device to establish a communication connection with the second device based on the network information of the second device; A second connection module, configured to, when a target private protocol has not been configured between the control device and the first device, establish a communication connection with the second device; if a communication connection has not been established between the control device and the first device before, control the control device to enter a pairable state, and send pairing broadcasts in the pairable state. Wherein, the control device includes a plurality of virtual devices, each virtual device corresponds to a communication protocol, there are a plurality of the pairing broadcasts, each pairing broadcast corresponds to one of the virtual devices of the control device, there are a plurality of the connection requests, and each connection request corresponds to one of the pairing broadcasts; receive the connection requests returned by the first device based on the pairing broadcasts; respond to each of the connection requests, and based on the communication protocol corresponding to each virtual device, establish a communication connection between each virtual device and the first device so that the communication data between the first device and the second device is forwarded by the control device. Wherein, the forwarding includes forwarding the communication data of the second device to the communication connection corresponding to the specified communication protocol among the established multiple communication connections, and the specified communication protocol is the communication protocol corresponding to the communication data of the second device.

12. An apparatus for interconnecting devices, characterized in that, Applied to a first device, the apparatus includes: An instruction acquisition module, configured to, when a target private protocol has been configured between the control device and the first device, acquire the directed connection instruction sent by the control device based on the target private protocol, where the directed connection instruction is an instruction defined by the target private protocol, and the directed connection instruction includes network information of a second device; A communication connection module, configured to establish a communication connection with the second device based on the network information in response to the directed connection instruction; in the case that no target private protocol is configured between the control device and the first device, if no communication connection has been established between the control device and the first device before, receive a pairing broadcast sent by the control device, and send a connection request to the control device based on the pairing broadcast, where the control device includes a plurality of virtual devices, each virtual device corresponds to a communication protocol, there are a plurality of the pairing broadcasts, each pairing broadcast corresponds to one of the virtual devices of the control device, there are a plurality of the connection requests, each connection request corresponds to one of the pairing broadcasts, and the connection request is used to enable the control device to establish a communication connection between each virtual device and the first device based on the communication protocol corresponding to each virtual device, so that communication data between the first device and the second device is forwarded by the control device, where the forwarding includes forwarding the communication data of the second device to the communication connection corresponding to the specified communication protocol among the established multiple communication connections, and the specified communication protocol is the communication protocol corresponding to the communication data of the second device.

13. An equipment interconnection system, characterized in that, The device interconnection system includes a control device, a first device, and a second device, and the control device is connected to the first device; The control device is configured to receive an interconnection request, and the interconnection request is used to request to connect the first device and the second device; The control device is further configured to, in the case that a target private protocol is configured between the control device and the first device, in response to the interconnection request, send a directed connection instruction defined by the target private protocol to the first device, and the directed connection instruction includes the network information of the second device; The first device is configured to establish a communication connection with the second device based on the network information of the second device in response to the directed connection instruction; The control device is further configured to, in the case that no target private protocol is configured between the control device and the first device, in response to the interconnection request, establish a communication connection with the second device; If no communication connection has been established between the control device and the first device before, the control device is further configured to enter a pairable state and send a pairing broadcast in the pairable state, where the control device includes a plurality of virtual devices, each virtual device corresponds to a communication protocol, there are a plurality of the pairing broadcasts, each pairing broadcast corresponds to one of the virtual devices of the control device, there are a plurality of the connection requests, each connection request corresponds to one of the pairing broadcasts; The control device is further configured to receive the connection request returned by the first device based on the pairing broadcast; The control device is further configured to, in response to each of the connection requests, establish a communication connection between each of the virtual devices and the first device based on the communication protocol corresponding to each of the virtual devices, so that communication data between the first device and the second device is forwarded by the control device, where the forwarding includes forwarding the communication data of the second device to the communication connection corresponding to the specified communication protocol among the established multiple communication connections, and the specified communication protocol is the communication protocol corresponding to the communication data of the second device.

14. An electronic device, characterized in that, Comprising: One or more processors; A memory; One or more applications, where the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1 to 7 or claims 8 to 9.

15. A computer-readable storage medium, characterized in that, At least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the method according to any one of claims 1 to 7 or claims 8 to 9.

16. A computer program product comprising instructions, characterized in that, Instructions are stored in the computer program product, and when it runs on a computer, the computer is caused to implement the method according to any one of claims 1 to 7 or claims 8 to 9.

Citation Information

Patent Citations

  • Method and system for connection between equipment

    CN105430760A

  • Bluetooth communication method, and device and equipment with Bluetooth communication function

    CN110753334A

  • Intelligent device communication method and system, computer device and readable storage medium

    CN112532607A

  • Method and device for establishing communication connection, electronic equipment and storage medium

    CN113301537A