CN117336890A - Equipment connection method and device, electronic equipment and storage medium - Google Patents

Equipment connection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117336890A
CN117336890A CN202311280621.5A CN202311280621A CN117336890A CN 117336890 A CN117336890 A CN 117336890A CN 202311280621 A CN202311280621 A CN 202311280621A CN 117336890 A CN117336890 A CN 117336890A
Authority
CN
China
Prior art keywords
connection
sub
priority
list
disconnecting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311280621.5A
Other languages
Chinese (zh)
Inventor
吴静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202311280621.5A priority Critical patent/CN117336890A/en
Publication of CN117336890A publication Critical patent/CN117336890A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

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

Abstract

The embodiment of the application discloses a device connection method, a device, an electronic device and a storage medium, which are applied to first equipment, wherein the method comprises the following steps: receiving a connection request sent by second equipment; determining the connection priority of the second device based on a device list and a connection request, wherein the device list comprises at least one second device, at least one first device and a third device connected with the first device; disconnecting the connection with the third device based on the connection priority such that the second device establishes a connection with the first device or the second device establishes a connection with the third device.

Description

Equipment connection method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing and communication, and in particular, to a device connection method, an apparatus, an electronic device, and a storage medium.
Background
The playing device is connected with other devices (such as a mobile phone, a tablet computer and/or a notebook computer, etc.) in a wireless local area network (such as a Bluetooth network). The playback device may be single (the bluetooth headset, although being a single playback device, contains both the left and right channels) or may contain multiple sub-playback devices (e.g., the bluetooth sound contains multiple sounds). At present, when the device connected with the playing device reaches the upper limit of connection of the playing device, if a new device is connected, a user needs to manually switch on the connected device, or disconnect the connected device first and then connect the new device. The operation of switching the equipment connected with the playing equipment by the user is very complicated, and the use experience is poor.
Disclosure of Invention
The application provides a device connection method, a device, an electronic device and a storage medium, so as to solve the technical problems.
To this end, an aspect of an embodiment of the present application provides a device connection method, which is applied to a first device, where the method includes:
receiving a connection request sent by second equipment;
determining a connection priority of the second device based on a device list and the connection request, wherein the device list comprises at least one second device, a first device and a third device connected with the first device;
disconnecting the connection with the third device based on the connection priority so that the second device establishes a connection with the first device or the second device establishes a connection with the third device.
Wherein the method further comprises:
receiving an updated device list sent by a second device, wherein the updated device list comprises information that the second device is connected with a third device or the second device is connected with a first device;
and storing the updated device list in the first device.
Wherein the determining the connection priority of the second device based on the device list and the connection request includes:
determining an operation scene of the second device and/or a device type of the second device based on the device list and the connection request;
and determining the connection priority of the second device based on the operation scene and/or the device type of the second device.
Wherein the third device includes at least one sub-device, and the disconnecting the connection with the third device based on the connection priority, so that the second device establishes a connection with the third device, includes:
and disconnecting at least one sub-device of the third device based on the connection priority of the second device, so that the sub-device of the third device is connected with the first device and the second device respectively, or disconnecting the sub-device of the third device, so that all the sub-devices of the third device are connected with the second device.
Wherein the first device comprises at least one sub-device, each sub-device having been connected to a different third device, the disconnecting the third device based on the connection priority and establishing a connection with the second device, comprising:
determining a target third device from the third devices based on the connection priority;
disconnecting the connection with the target third device, and establishing connection between the sub-device disconnected with the target third device and the second device.
Wherein the first device comprises at least one sub-device, each sub-device having been connected to the same third device, the disconnecting from the third device based on the connection priority and establishing a connection with the second device, comprising:
if the connection priority of the third device and the second device is greater than or equal to the preset priority, determining a target sub-device disconnected with the third device from at least one sub-device, and establishing connection between the target sub-device and the second device;
and if the connection priority of the third device is smaller than that of the second device, disconnecting all the sub-devices from the third device and establishing connection with the second device.
Wherein the first device includes at least one sub-device, there is at least one idle sub-device, and the establishing connection with the second device includes:
and establishing connection between at least one idle sub-device and the second device.
Another aspect of the embodiments of the present application provides a device connection apparatus, including:
the communication module is used for receiving a connection request sent by the second equipment;
a computing module, configured to determine a connection priority of the second device based on a device list and the connection request, where the device list includes at least one second device and a first device, and a third device connected to the first device;
and the processing module is used for disconnecting the connection with the third device based on the connection priority so as to enable the second device to establish connection with the first device or enable the second device to establish connection with the third device.
Still another aspect of the present invention provides an electronic device, including:
a processor, a memory for storing instructions executable by the processor;
the processor is configured to read the executable instruction from the memory and execute the instruction to implement the device connection method.
A further aspect of the present invention provides a computer-readable storage medium storing a computer program for executing the device connection method.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a flow chart of a device connection method according to one embodiment of the present application;
FIG. 2 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 3 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 4 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 5 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 6 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 7 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 8 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 9 shows a flow chart of a device connection method according to another embodiment of the present application;
FIG. 10 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 11 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 12 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 13 illustrates a flow chart of a device connection method according to another embodiment of the present application;
FIG. 14 shows a schematic structural view of a device connection apparatus according to one embodiment of the present application;
fig. 15 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present application more obvious and understandable, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In order to realize automatic switching of devices connected with a playing device, reduce user operations and improve user experience, an embodiment of the present application provides a device connection method, which is applied to a first device, as shown in fig. 1, and the method includes:
step 101, receiving a connection request sent by the second device.
In this embodiment, the first device is a playing device (such as a bluetooth headset, a bluetooth sound device, etc.), and the second device is a device (such as a mobile phone, a tablet, a computer, etc.) that has been paired with the playing device but not connected to the playing device.
The second device sends a connection request to the first device.
Step 102, determining the connection priority of the second device based on a device list and the connection request, wherein the device list comprises at least one second device, a first device and a third device connected with the first device.
The first device stores a device list, which includes all devices paired with the first device (including at least one second device and the first device, and a third device connected to the first device), and device information of each device.
A connection priority of the second device is determined based on the list of devices and the connection request of the second device.
And step 103, disconnecting the connection with the third device based on the connection priority, so that the second device establishes connection with the first device.
The third device is a device (may be a mobile phone, a computer, etc.) that is being connected to the first device, and the connection priority of the third device is included in the device list of the first device.
If the connection priority of the second device is greater than or equal to the connection priority of the third device, the first device disconnects the connection with the third device and establishes connection with the second device.
In the above scheme, the first device receives the connection request sent by the second device, determines the connection priority of the second device based on the connection request, and determines the connection priority of the third device being connected with the first device based on the device list. When the connection priority of the second equipment is greater than or equal to that of the third equipment, the first equipment automatically disconnects the connection with the third equipment and establishes connection with the second equipment, so that automatic switching of the connection equipment is realized, operations required by a user when the equipment connected with the first equipment needs to be switched are reduced, and the use experience of the user is obviously improved.
In an example of the present application, as shown in fig. 2, there is further provided a device connection method, where the first device includes at least one sub-device, each sub-device has been connected to a different third device, and the disconnecting the connection with the third device and establishing a connection with the second device based on the connection priority includes:
and step 201, determining a target third device from third devices based on the connection priority.
In this embodiment, the first device is a playback device (such as a bluetooth headset including left and right channels, a bluetooth sound including at least one sound) that includes at least one sub-device.
When the first device comprises only one sub-device, then only one corresponding third device is present. And if the connection priority of the third device is less than or equal to the connection priority of the second device, determining the third device as a target third device.
When the first device comprises a plurality of sub-devices, then a corresponding plurality of third devices is present. And if at least one third device with the connection priority smaller than or equal to that of the second device exists, selecting the third device with the lowest connection priority from the at least one third device as the target third device.
And 202, disconnecting the connection with the target third device, and establishing connection between the sub-device disconnected with the target third device and the second device.
For example, as shown in fig. 3, the first device is a bluetooth sound and only includes one sub-device, and the first device is connected to the third device a. The second device has sent a connection request to the first device, determines that the connection priority of the second device is 3 based on the connection request, and determines that the connection priority of the third device a is 2 based on the device list. The connection priority of the second device is equal to or higher than that of the third device a, and therefore, the first device disconnects from the third device a and establishes a connection with the second device.
As another example, as shown in fig. 4, the first device is a bluetooth headset, and the bluetooth headset includes two sub-devices of a left channel and a right channel, the left channel is connected to the third device B, and the right channel is connected to the third device C. The second device sends a connection request to the first device, determines that the connection priority of the second device is 3 based on the connection request, determines that the connection priority of the third device B is 4 based on the device list, and determines that the connection priority of the third device C is 2. The connection priority of the second device is equal to or higher than that of the third device C, so that the first device disconnects the right channel from the third device C and establishes a connection between the right channel and the second device.
In the above-mentioned scheme, when there are multiple third devices connected with multiple sub-devices of the first device, the target third device that needs to be disconnected may be determined based on the connection priority, so that the first device disconnects from the target third device and establishes a connection with the second device. When a plurality of pieces of third equipment are connected with a plurality of pieces of sub equipment of the first equipment, the connection equipment is automatically switched based on the connection priority, and the intelligent equipment connection and the use experience of a user are further improved.
In an example of the present application, as shown in fig. 5, there is further provided a device connection method, where the first device includes at least one sub-device, each sub-device has been connected to the same third device, and the disconnecting the connection with the third device and establishing a connection with the second device based on the connection priority includes:
step 301, if the connection priorities of the third device and the second device are both greater than or equal to a preset priority, determining a target sub-device disconnected from the third device from at least one sub-device, and establishing connection between the target sub-device and the second device.
In this embodiment, the first device is a playback device (such as a bluetooth headset including left and right channels, a bluetooth sound including at least one sound) that includes at least one sub-device.
When a first device comprises a plurality of sub-devices, the plurality of sub-devices may all be connected to the same third device. At this time, it is required to determine whether the connection priorities of the third device and the second device are equal to or greater than the preset priority, if so, it is indicated that the use requirements of the third device and the second device are both higher, then it is required to determine a target sub-device that needs to be disconnected from the third device from at least one sub-device, disconnect the target sub-device from the third device, and connect the target sub-device with the second device, so that the third device and the second device can be simultaneously connected with the first device for use.
For example, as shown in fig. 6, the first device is a bluetooth headset, and the bluetooth headset includes two sub-devices of a left channel and a right channel, where the left channel and the right channel are both connected to the third device D. The second device sends a connection request to the first device, determines that the connection priority of the second device is 4 based on the connection request, determines that the connection priority of the third device D is 5 based on the device list, and sets the preset priority to 3. The connection priorities of the second device and the third device D are equal to or greater than the preset priority, so that the first device disconnects the right channel from the third device D and establishes connection between the right channel and the second device.
And step 302, if the connection priority of the third device is smaller than that of the second device, disconnecting all the sub-devices from the third device and establishing connection with the second device.
If the connection priority of the third device is less than the connection priority of the second device, all the sub-devices may be disconnected from the third device and connected to the second device.
For example, as shown in fig. 7, the first device is a bluetooth headset, and the bluetooth headset includes two sub-devices of a left channel and a right channel, where the left channel and the right channel are both connected to the third device E. The second device has transmitted a connection request to the first device, determines that the connection priority of the second device is 3 based on the connection request, and determines that the connection priority of the third device E is 2 based on the device list. The connection priority of the third device D is smaller than that of the second device, and therefore, the first device disconnects the left and right channels from the third device E, and establishes connection of the left and right channels with the second device.
In the above scheme, when the connection priorities of the third device and the second device are equal to or greater than the preset priority, the connection between the target sub-device and the third device is disconnected by selecting the target sub-device from the plurality of sub-devices connected with the third device, and the target sub-device and the second device are connected, so that when the use requirements of the third device and the second device are higher, the connection between the third device and the first device can be established for use. And when the connection priority of the third device is smaller than that of the second device, the connection between all the sub-devices and the third device can be disconnected, and all the sub-devices and the second device are connected. The intelligent device connection and the use experience of the user are further improved.
In an example of the present application, there is also provided a device connection method, where the first device includes at least one sub-device, there is at least one idle sub-device, and the establishing a connection with the second device includes:
and establishing connection between at least one idle sub-device and the second device.
In this embodiment, the first device is a playback device (such as a bluetooth headset including left and right channels, a bluetooth sound including at least one sound) that includes at least one sub-device.
When a first device contains a plurality of sub-devices, if there is at least one idle sub-device (i.e. no connection is established with any device), the at least one idle sub-device is connected with a second device.
For example, as shown in fig. 8, the first device is a bluetooth headset, and the bluetooth headset includes two sub-devices of a left channel and a right channel, where the right channel is connected to the third device F. The second device sends a connection request to the first device, where the left channel in the first device is not connected to any device, and is an idle sub-device, and therefore the first device establishes a connection between the left channel and the second device.
An embodiment of the present application provides a device connection method, which is applied to a first device, as shown in fig. 9, and includes:
step 401, receiving a connection request sent by a second device.
In this embodiment, the first device is a device (such as a mobile phone, a computer, etc.) that is being connected to the playing device, and the second device is a device (such as a mobile phone, a computer, etc.) that has been paired with the playing device but not connected to the playing device.
The second device sends a connection request to the first device.
Step 402, determining the connection priority of the second device based on a device list and the connection request, wherein the device list comprises at least one second device, a first device and a third device connected with the first device.
The first device also stores a device list, which includes all devices (including at least one second device and the first device, and a third device connected to the first device) paired with a third device (i.e., a playback device such as a bluetooth headset, a bluetooth sound, etc.), and device information of each device.
A connection priority of the second device is determined based on the list of devices and the connection request of the second device.
And step 403, disconnecting the connection with the third device based on the connection priority, so that the second device establishes a connection with the third device.
The device list of the first device includes a connection priority of the first device.
If the connection priority of the second device is greater than or equal to that of the first device, the first device informs the third device to disconnect the first device and establish connection with the second device.
In the above scheme, the first device receives the connection request sent by the second device, determines the connection priority of the second device based on the connection request, and determines the connection priority of the first device based on the device list. When the connection priority of the second device is greater than or equal to that of the first device, the first device notifies the third device to disconnect the connection with the first device and establish the connection with the second device, so that automatic switching of the connection devices is realized, operations required by a user when the devices connected with the first device need to be switched are reduced, the use experience of the user is obviously improved, the first device is used as a device for processing and calculating data, a control module is not required to be arranged in a playing device (namely the third device), and the cost of the playing device is obviously reduced.
In an example of the present application, there is further provided a device connection method, where the third device includes at least one sub-device, and the disconnecting the connection with the third device based on the connection priority, so that the second device establishes a connection with the third device, including:
and disconnecting at least one sub-device of the third device based on the connection priority of the second device, so that the sub-device of the third device is connected with the first device and the second device respectively, or disconnecting the sub-device of the third device, so that all the sub-devices of the third device are connected with the second device.
In this embodiment, the third device is a playing device (such as a bluetooth headset including left and right channels, a bluetooth sound including at least one sound) including at least one sub-device.
When the third device only comprises one sub-device and the connection priority of the first device is smaller than or equal to the connection priority of the second device, the first device disconnects the sub-device from the third device and notifies the third device to establish connection between the sub-device and the second device.
When the third device comprises a plurality of sub-devices, and the connection priority of the first device and the connection priority of the second device are larger than or equal to the preset priority, the first device disconnects at least one sub-device of the third device, and the third device is informed to establish connection between the disconnected at least one sub-device and the second device.
When the third device comprises a plurality of sub-devices and the connection priority of the first device is smaller than that of the second device, the first device disconnects all the sub-devices of the third device and informs the third device to establish connection between all the sub-devices and the second device.
In the above scheme, based on the connection priority of the second device and the first device, different device connection schemes under different conditions are determined, so that the device connection method is more intelligent, and the use experience of the user is further improved.
There is also provided in an example of the present application a device connection method, as shown in fig. 10, the method further including:
step 501, receiving an updated device list sent by the second device, where the updated device list includes information that the second device has been connected to the third device.
In this embodiment, the third device is a playing device, and the first device is a device connected to the playing device.
After the second device has been connected to the third device, the second device updates the device list in the second device based on the change in the connection state and sends it to the first device.
Step 502, saving the updated device list in the first device.
The first device receives the updated device list sent by the second device and stores the updated device list in the first device.
It should be noted that, after the second device updates the device list, the updated device list may also be sent to other devices in the device list (may be sent by a broadcast or a communication protocol, etc.) to update the device list of the other devices.
In the above scheme, after the second device has been connected to the third device, the second device updates the device list in the second device based on the change of the connection state, and sends the updated device list to the first device for synchronization, so that the device lists in the devices are all in the latest version, and the stability of device connection can be improved.
There is also provided in an example of the present application a device connection method, as shown in fig. 11, the method further including:
step 601, receiving an updated device list sent by the second device, where the updated device list includes information that the second device has been connected to the first device.
In this embodiment, the first device is a playing device, and the third device is a device connected to the playing device.
After the second device has been connected to the first device, the second device updates a list of devices in the second device based on the change in the connection state and sends the list of devices to the first device.
And step 602, storing the updated device list in the first device.
The first device receives the updated device list sent by the second device and stores the updated device list in the first device.
It should be noted that, after the second device updates the device list, the updated device list may also be sent to other devices in the device list (may be sent by a broadcast or a communication protocol, etc.) to update the device list of the other devices.
In the above scheme, after the second device has been connected with the first device, the second device updates the device list in the second device based on the change of the connection state, and sends the updated device list to the first device for synchronization, so that the device list in each device is in the latest version, and the stability of device connection can be improved.
In an example of the present application, there is further provided a device connection method, as shown in fig. 12, where the determining, based on a device list and the connection request, a connection priority of the second device includes:
step 701, determining an operation scene of the second device and/or a device type of the second device based on the device list and the connection request.
The connection request includes a running scene (such as a meeting, a call, music or a game, etc.) and/or a device type (such as a mobile phone, a tablet or a computer, etc.) of the second device.
Step 702, determining a connection priority of the second device based on an operation scene and/or a device type of the second device.
After determining the operation scene and/or the device type of the second device, the score of the operation scene and/or the device type may be determined based on the mapping table (the mapping table includes the score corresponding to each operation scene and/or the score corresponding to each device type of each device) and then the connection priority of the second device is determined based on the score.
In the above scheme, the corresponding connection priority is determined based on the operation scene and/or the equipment type of the second equipment, so that the use requirement of the second equipment can be accurately determined, the equipment connection can be more accurately switched, and the intelligence of the equipment connection is further improved.
In an example of the present application, there is also provided a device connection method applied to a second device, as shown in fig. 13, where the method includes:
step 801, based on a device list in the second device, sending a connection request to a first device in the device list, where the connection request is used to request a third device to establish a connection with the second device, and the device list includes at least one second device and the third device, and the first device having a connection relationship with the third device.
In this embodiment, the third device is a playing device, and the first device is a device having a connection relationship with the third device.
The device list includes a first device having a connection relationship with a third device, and based on the device list, the second device sends a connection request to the first device, where the connection request is used to request the third device to establish a connection with the second device (and the first device notifies the third device of implementation).
Step 802, after the second device establishes connection with the third device, updating the status information of the device list, and synchronizing the updated device list to other devices in the device list.
After the second device establishes a connection with the third device, updating a device list in the second device based on the change of the connection state, and synchronizing the updated device list to other devices (including other second devices, all second devices and third devices) in the device list.
In the above scheme, after the second device is connected with the third device, the second device updates the device list in the second device based on the change of the connection state, and sends the updated device list to other devices in the device list for synchronization, so that the device list in each device is in the latest version, and the stability of device connection can be improved.
In order to implement the above device connection method, as shown in fig. 14, an example of the present application provides a device connection apparatus, including:
a communication module 10, configured to receive a connection request sent by the second device;
a calculating module 20, configured to determine a connection priority of the second device based on a device list and the connection request, where the device list includes at least one second device and a first device, and a third device connected to the first device;
a processing module 30, configured to disconnect the connection with the third device based on the connection priority, so that the second device establishes a connection with the first device, or the second device establishes a connection with the third device.
The communication module 10 is further configured to receive an updated device list sent by the second device, where the updated device list includes information that the second device has been connected to the third device or that the second device has been connected to the first device;
the processing module 30 is further configured to store the updated device list in the first device.
Wherein the computing module 20 is further configured to determine an operation scenario of the second device, and/or a device type of the second device, based on the device list and the connection request;
the computing module 20 is further configured to determine a connection priority of the second device based on an operation scenario and/or a device type of the second device.
The communication module 10 is further configured to disconnect at least one sub-device of the third device based on the connection priority of the second device, so that the sub-device of the third device is connected to the first device and the second device, respectively, or disconnect the sub-device of the third device from the third device, so that all the sub-devices of the third device are connected to the second device.
Wherein the computing module 20 is further configured to determine a target third device from the third devices based on the connection priority;
the communication module 10 is further configured to disconnect the connection with the target third device, and establish a connection between a sub-device disconnected from the target third device and the second device.
The communication module 10 is further configured to determine a target sub-device disconnected from the third device from at least one sub-device, and establish a connection between the target sub-device and the second device, if connection priorities of the third device and the second device are both greater than or equal to a preset priority;
the communication module 10 is further configured to disconnect all the sub-devices from the third device and establish connection with the second device if the connection priority of the third device is less than the connection priority of the second device.
Wherein the communication module 10 is further configured to establish a connection between at least one idle sub-device and the second device.
In the above scheme, the first device receives the connection request sent by the second device, determines the connection priority of the second device based on the connection request, and determines the connection priority of the third device being connected with the first device based on the device list. When the connection priority of the second equipment is greater than or equal to that of the third equipment, the first equipment automatically disconnects the connection with the third equipment and establishes connection with the second equipment, so that automatic switching of the connection equipment is realized, operations required by a user when the equipment connected with the first equipment needs to be switched are reduced, and the use experience of the user is obviously improved.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
Fig. 15 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 15, the apparatus 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, for example, the device connection method. For example, in some embodiments, the device connection method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the device connection method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the device connection method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), integrated Systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A device connection method applied to a first device, the method comprising:
receiving a connection request sent by second equipment;
determining a connection priority of the second device based on a device list and the connection request, wherein the device list comprises at least one second device, a first device and a third device connected with the first device;
disconnecting the connection with the third device based on the connection priority so that the second device establishes a connection with the first device or the second device establishes a connection with the third device.
2. The device connection method of claim 1, further comprising:
receiving an updated device list sent by a second device, wherein the updated device list comprises information that the second device is connected with a third device or the second device is connected with a first device;
and storing the updated device list in the first device.
3. The device connection method of claim 1, the determining a connection priority of the second device based on a device list and the connection request, comprising:
determining an operation scene of the second device and/or a device type of the second device based on the device list and the connection request;
and determining the connection priority of the second device based on the operation scene and/or the device type of the second device.
4. The device connection method according to claim 1, the third device including at least one sub-device, the disconnecting from the third device based on the connection priority so that the second device establishes a connection with the third device, comprising:
and disconnecting at least one sub-device of the third device based on the connection priority of the second device, so that the sub-device of the third device is connected with the first device and the second device respectively, or disconnecting the sub-device of the third device, so that all the sub-devices of the third device are connected with the second device.
5. The device connection method according to claim 1, the first device including at least one sub-device, each sub-device having been connected with a different third device, the disconnecting from the third device and establishing a connection with the second device based on the connection priority, comprising:
determining a target third device from the third devices based on the connection priority;
disconnecting the connection with the target third device, and establishing connection between the sub-device disconnected with the target third device and the second device.
6. The device connection method according to claim 1, the first device including at least one sub-device, each sub-device having been connected to the same third device, the disconnecting from the third device based on the connection priority, and establishing a connection with the second device, comprising:
if the connection priority of the third device and the second device is greater than or equal to the preset priority, determining a target sub-device disconnected with the third device from at least one sub-device, and establishing connection between the target sub-device and the second device;
and if the connection priority of the third device is smaller than that of the second device, disconnecting all the sub-devices from the third device and establishing connection with the second device.
7. The device connection method according to claim 1, the first device comprising at least one sub-device, there being at least one sub-device that is idle, the establishing a connection with the second device comprising:
and establishing connection between at least one idle sub-device and the second device.
8. A device connection apparatus, the apparatus comprising:
the communication module is used for receiving a connection request sent by the second equipment;
a computing module, configured to determine a connection priority of the second device based on a device list and the connection request, where the device list includes at least one second device and a first device, and a third device connected to the first device;
and the processing module is used for disconnecting the connection with the third device based on the connection priority so as to enable the second device to establish connection with the first device or enable the second device to establish connection with the third device.
9. An electronic device, comprising:
a processor, a memory for storing instructions executable by the processor;
the processor being configured to read the executable instructions from the memory and execute the instructions to implement the device connection method of any one of claims 1-7.
10. A computer-readable storage medium storing a computer program for executing the device connection method of any one of claims 1 to 7.
CN202311280621.5A 2023-09-28 2023-09-28 Equipment connection method and device, electronic equipment and storage medium Pending CN117336890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311280621.5A CN117336890A (en) 2023-09-28 2023-09-28 Equipment connection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311280621.5A CN117336890A (en) 2023-09-28 2023-09-28 Equipment connection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117336890A true CN117336890A (en) 2024-01-02

Family

ID=89278611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311280621.5A Pending CN117336890A (en) 2023-09-28 2023-09-28 Equipment connection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117336890A (en)

Similar Documents

Publication Publication Date Title
CN113938456B (en) Session message overhead processing method and device
WO2022156684A1 (en) Method and apparatus for processing redirection failure, electronic device and readable storage medium
CN110795205B (en) System and method for providing cloud service based on software container
WO2023221495A1 (en) Web page synchronization method and apparatus, storage medium, and electronic device
CN115268821B (en) Audio playing method and device, equipment and medium
CN117336890A (en) Equipment connection method and device, electronic equipment and storage medium
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN113747423B (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
JP7372380B2 (en) State machine processing, state processing methods, devices, electronic equipment and storage media
CN113010285B (en) Method, apparatus, device, medium, and article for processing data
CN113420275B (en) Data connection processing method, related device and computer program product
CN114374614A (en) Network topology configuration method and device
CN115016955A (en) Method and device for sharing information among multiple applications
CN114915516A (en) Communication method and device
CN113031895A (en) Screen projection control method and device and electronic equipment
CN111176679A (en) Application program updating method and device
CN109426572B (en) Task processing method and device and electronic equipment
CN114385096A (en) Display control method, device, terminal and storage medium
CN115858125B (en) Rendering engine calling method and device, electronic equipment and storage medium
CN118236687A (en) Game acceleration method, device, equipment and storage medium
CN112818060B (en) Data synchronization method, device, electronic equipment and readable storage medium
CN113726883B (en) Cloud data processing method, related device and computer program product
CN117201481A (en) Method and device for downloading software update file, electronic equipment and readable medium
CN113741937B (en) Application updating method and device for cloud terminal and computer program product
CN114116095B (en) Input method, input device, electronic equipment, medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination