Device connection method, device, equipment and storage medium
By obtaining the back connection condition and sending the back connection broadcast, the equipment that meets the conditions is allowed to be disconnected and reconnected after reconnecting, solving the problem of inflexible equipment connection in the prior art, and improving the stability and user experience of the connection.
Patent Information
- Application Number
- CN202210132139.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-14
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-02-14
AI Technical Summary
The existing equipment connection method is relatively limited, and it is impossible to flexibly deal with abnormal disconnection and reconnection problems between devices, resulting in inflexible connections.
By obtaining the back connection condition when the device is disconnected and sending the back connection broadcast to request the device that meets the conditions to reconnect, the device that meets the conditions is allowed to establish a connection with the device rather than being limited to the currently disconnected device.
It realizes flexibility in device connection, avoids users accidentally triggering connection back operation under normal disconnection, and improves user experience and connection stability between devices.
Smart Images

Figure CN114390500B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a device connection method, apparatus, device and storage medium. Background Art
[0002] The development of computer technology has made people's lives increasingly intelligent, thus providing users with a lot of convenience. For example, a user can establish a connection with multiple second devices at home through a first device, and then control each second device through the first device. However, the connection between the first device and the second device may be abnormally disconnected, and it is necessary to re-establish the connection with the currently disconnected second device. However, this way of establishing a connection is relatively limited and not flexible enough. Summary of the invention
[0003] The embodiment of the present application provides a device connection method, apparatus, device and storage medium, which makes the connection between devices more flexible. The technical solution is as follows:
[0004] According to one aspect of an embodiment of the present application, a device connection method is provided, which is performed by a first device, and the method includes:
[0005] When the connection between the first device and the second device is abnormally disconnected, obtaining a reconnection condition, where the reconnection condition is a condition that needs to be satisfied by a device to establish a reconnection with the first device;
[0006] Based on the reconnection condition, a reconnection broadcast is sent, where the reconnection broadcast is used to request a third device that meets the reconnection condition to establish a connection with the first device.
[0007] According to another aspect of an embodiment of the present application, another device connection method is provided, which is performed by a third device, and the method includes:
[0008] receiving a back-connection broadcast sent by the first device, where the back-connection broadcast is used to request a device that meets a back-connection condition to establish a connection with the first device, where the back-connection condition is a condition that needs to be met by the device that establishes a back-connection with the first device;
[0009] When the third device meets the backconnection condition, a connection is established with the first device.
[0010] According to another aspect of an embodiment of the present application, a device connection apparatus is provided, which is configured on a first device, and the apparatus includes:
[0011] a condition acquisition module, configured to acquire a reconnection condition when the connection between the first device and the second device is abnormally disconnected, wherein the reconnection condition is a condition that needs to be satisfied by the device to establish a reconnection with the first device;
[0012] The broadcast sending module is used to send a back-connection broadcast based on the back-connection condition, where the back-connection broadcast is used to request a third device that meets the back-connection condition to establish a connection with the first device.
[0013] According to another aspect of an embodiment of the present application, another device connection apparatus is provided, which is configured on a third device, and the apparatus includes:
[0014] a broadcast receiving module, configured to receive a back-connection broadcast sent by a first device, wherein the back-connection broadcast is used to request a device that meets a back-connection condition to establish a connection with the first device, wherein the back-connection condition is a condition that needs to be met by the device that establishes a back-connection with the first device;
[0015] The connection establishing module is used to establish a connection with the first device when the third device meets the backconnection condition.
[0016] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the device connection method as described in the above aspect.
[0017] According to another aspect of an embodiment of the present application, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on an electronic device, it is used to implement the device connection method described in the above aspects.
[0018] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the device connection method as described in the above aspects.
[0019] According to another aspect of an embodiment of the present application, a computer program product is provided. The computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the device connection method described in the above aspect.
[0020] In an embodiment of the present application, when the connection between the first device and the second device is abnormally disconnected, the first device obtains a reconnection condition. Since the reconnection condition is a condition that needs to be met by a device to establish a reconnection with the first device, a reconnection broadcast is sent based on the reconnection condition to request the device that meets the reconnection condition to establish a connection with the first device. The device that receives the reconnection broadcast can determine whether it can establish a reconnection with the first device based on the reconnection broadcast, thereby limiting the device that reconnects with the first device through the reconnection condition, rather than limiting the first device to establish a reconnection with the currently disconnected device, making the connection between devices more flexible. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;
[0023] Figure 2 A flow chart of a device connection method provided by an exemplary embodiment of the present application is shown;
[0024] Figure 3 A flowchart of another device connection method provided by an exemplary embodiment of the present application is shown;
[0025] Figure 4 A flowchart of another device connection method provided by an exemplary embodiment of the present application is shown;
[0026] Figure 5 A flowchart of another device connection method provided by an exemplary embodiment of the present application is shown;
[0027] Figure 6 A schematic diagram of a connection confirmation pop-up window provided by an exemplary embodiment of the present application is shown;
[0028] Figure 7 A schematic diagram of an interface of a device during a connection process in a screen projection scenario provided by an exemplary embodiment of the present application is shown;
[0029] Figure 8 A flowchart of another device connection method provided by an exemplary embodiment of the present application is shown;
[0030] Fig. 9 A network schematic diagram provided by an exemplary embodiment of the present application is shown;
[0031] Fig.10 A structural block diagram of a device connection apparatus provided by an exemplary embodiment of the present application is shown;
[0032] Fig.11 A structural block diagram of another device connection apparatus provided by an exemplary embodiment of the present application is shown;
[0033] Fig.12 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0035] In this article, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0036] It should be noted that the user information involved in this application (including but not limited to user device information, user personal information, etc.) is information authorized by the user or fully authorized by all parties.
[0037] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Figure 1 , the implementation environment includes a first device 101 and a second device 102. The first device 101 and the second device 102 are connected via a wireless or wired network. The first device and the second device are any electronic devices, and illustratively, the first device 101 and the second device 102 include a laptop, a mobile phone, a tablet computer, a speaker, a car computer, a watch, a television, a lamp, a treadmill, a refrigerator, etc.
[0038] The first device 101 is used to send a reconnection broadcast when the connection between the first device 101 and the second device 102 is abnormally disconnected, so as to request a device that meets the reconnection condition to establish a connection with the first device 101. The reconnection condition is a condition that needs to be met by the device that establishes a reconnection with the first device 101. This method can use the reconnection condition to limit the device that reconnects with the first device 101, rather than being limited to establishing a reconnection between the first device 101 and the currently disconnected second device 102, so that the connection between devices is more flexible.
[0039] Exemplarily, an application is installed in the first device 101 and the second device 102, and the first device 101 and the second device 102 can establish a connection through the application and transmit data based on the connection. Optionally, the application is an application in the operating system of the first device 101 and the second device 102, or an application provided by a third party. Optionally, the application is any application, for example, a game application, a music application, a video application, etc., which is not limited in the embodiments of the present application.
[0040] Optionally, the implementation environment further includes at least one third device 103 (one is used as an example in the figure), and the third device 103 is used to receive the back-connection broadcast sent by the first device 101, determine whether it meets the back-connection condition, and establish a connection with the first device 101 if the back-connection condition is met. It should be noted that the second device 102 will also receive the back-connection broadcast sent by the first device 101, and can establish a connection with the first device 101 if it meets the back-connection condition.
[0041] The method provided in the embodiment of the present application can be applied to the scenario of screen projection. For example, the first device is a TV, the second device is a mobile phone, and the third device is a tablet computer. After the TV and the mobile phone are connected, the video content in the mobile phone is projected on the TV. Due to the movement of the user, the mobile phone carried by the user is far away from the TV, which causes the abnormal disconnection of the connection between the TV and the mobile phone. In this case, the TV sends a back-connection broadcast, which is used to request a device that has been connected to the TV but is not currently connected and whose distance from the TV is not greater than the target distance to establish a connection with the TV. After the tablet computer receives the back-connection broadcast, it determines that it meets the back-connection conditions, so it establishes a connection with the TV. After that, the user can project the video content of the tablet computer onto the TV. One thing that needs to be explained is that when the mobile phone also receives the back-connection broadcast, the mobile phone will not establish a connection with the TV because the distance between the mobile phone and the TV has exceeded the target distance.
[0042] The method provided by the embodiment of the present application can be applied to the scene of controlling household appliances. For example, the first device is a mobile phone, the second device is a TV, and the third device is an electric lamp. The user establishes a connection with the TV through the mobile phone, thereby switching the TV channel through the mobile phone, and establishes a connection with the electric lamp through the mobile phone, thereby turning on the light through the mobile phone. Due to the automatic restart of the mobile phone, the connection between the mobile phone and the TV and the electric lamp is abnormally disconnected. In this case, the mobile phone sends a back-connection broadcast after restarting. Optionally, the back-connection broadcast is used to request that the household appliances that have been connected to the mobile phone and are not currently connected to the mobile phone establish a connection with the mobile phone, so the electric lamp and the TV establish a connection with the mobile phone respectively after receiving the back-connection broadcast. Optionally, the back-connection broadcast is used to request that the electric lamp that has been connected to the mobile phone and is not currently connected to the mobile phone establish a connection with the mobile phone, so after receiving the back-connection broadcast, the electric lamp determines that it meets the back-connection conditions, so it establishes a connection with the mobile phone. After receiving the back-connection broadcast, the TV determines that its device type does not match the device type allowed to connect back to the mobile phone, so it determines that it does not meet the back-connection conditions, and thus will not establish a connection with the mobile phone.
[0043] For another example, the back-connection condition includes that the device that establishes a back-connection with the first device has been connected to the first device, and the device is not currently connected to the first device, and the distance between the device and the first device is not greater than the target distance. Then, only the device that has been connected to the first device, is currently disconnected, and the distance between the device and the first device is not greater than the target distance can establish a connection with the first device. Then, taking the first device as a household appliance and the second device as a mobile phone as an example, the user moves the mobile phone from room A to room B. Since the distance between the mobile phone and the household appliances in room A is far, the mobile phone is disconnected from the household appliances in room A. After the user arrives at room B, the mobile phone establishes a connection with the household appliances in room B. When the user returns to room A from room B, the back-connection broadcast sent by the household appliances in room A is received, and the connection is re-established with the household appliances in room A. Similarly, when the user goes from room A to room B, the connection with the household appliances in room A is disconnected, and the back-connection broadcast sent by the household appliances in room B is connected to the household appliances in room B. In this way, the mobile phone is automatically connected to the household appliances in the current room, which is convenient for the user to control the household appliances.
[0044] The method provided in the embodiment of the present application can also be applied to other scenarios, and the embodiment of the present application does not limit this.
[0045] Figure 2 A flow chart of a device connection method provided by an exemplary embodiment of the present application is shown. Figure 2 The method is interactively executed by the first device and the third device, and the method includes:
[0046] 201. When a connection between a first device and a second device is abnormally disconnected, the first device obtains a reconnection condition, where the reconnection condition is a condition that needs to be satisfied by the device to establish a reconnection with the first device.
[0047] Among them, reconnection refers to the process of reconnecting two devices that have been connected but disconnected. Optionally, the reconnection condition is currently obtained by the first device from the server, or the reconnection condition is stored in the first device in advance, or the first device receives the currently input reconnection condition. For example, when the connection between the first device and the second device is abnormally disconnected, the first device displays a reconnection condition input interface and receives the reconnection condition entered in the reconnection condition input interface. Alternatively, when the connection between the first device and the second device is abnormally disconnected, the first device receives input voice information and identifies the reconnection condition in the voice information. Of course, the first device can also obtain the reconnection condition in other ways, and the embodiments of the present application are not limited to this.
[0048] In a possible implementation, when the connection between the first device and the second device is abnormally disconnected, obtaining the reconnection condition includes: when the first device does not receive a target instruction and the connection between the first device and the second device is disconnected, obtaining the reconnection condition. The target instruction indicates to disconnect the connection between the first device and the second device.
[0049] In an embodiment of the present application, the first device disconnects the connection with the second device without receiving an instruction to disconnect the connection between the first device and the second device, which can objectively indicate that the connection is abnormally disconnected. In this case, sending a reconnection broadcast to achieve reconnection between devices can avoid performing a reconnection operation when the user normally disconnects the connection between the devices, which may cause interference to the user.
[0050] 202. The first device sends a reconnection broadcast based on a reconnection condition, where the reconnection broadcast is used to request a third device that meets the reconnection condition to establish a connection with the first device.
[0051] Optionally, the backlink broadcast is a BLE (Bluetooth Low Energy) broadcast or other broadcast. Optionally, the backlink broadcast carries a type character, and the device receiving the backlink broadcast determines the type of the backlink broadcast based on the type character, and then parses the backlink broadcast based on the type. Optionally, the backlink broadcast is a Device IDFilter (a type of low-power Bluetooth broadcast).
[0052] Optionally, when the connection between the first device and the second device is abnormally disconnected, the first device obtains the reconnection condition through an application in the first device, and then calls the connection service module in the first device through the application to send a reconnection broadcast. The application is an application that uses the connection to transmit data. The connection service module is a module in the first device for establishing a connection between electronic devices.
[0053] In a possible implementation, the reconnection condition includes that the device that establishes a reconnection with the first device has been connected to the first device, and the device is not currently connected to the first device, so that any subsequent devices that have been connected to the first device but have been disconnected can reconnect to the first device.
[0054] In a possible implementation, the reconnection condition further includes at least one of the following:
[0055] (1) Among at least one device that has been connected to the first device and is not currently connected to the first device, the disconnection time point corresponding to the device that establishes a back connection with the first device is closest to or farthest from the current time point, and the disconnection time point is the time point when the connection between the device and the first device is disconnected.
[0056] (2) The disconnection time point corresponding to the device is within the target time period, which can be any time period, for example, 7:00 p.m. to 12:00 a.m.
[0057] (3) The type of the device is the target type. The target type can be set to any type, such as a light, a mobile phone, a computer, etc.
[0058] (4) The distance between the device and the first device is not greater than the target distance. The target distance can be set to any distance, for example, 1 meter, 2 meters, etc.
[0059] (5) The target position of the device in the first device. The target position can be set to any position, for example, the left front, the back, etc.
[0060] In an embodiment of the present application, the reconnection conditions are set from multiple angles such as the time of disconnection from the first device, the distance from the first device, the orientation relative to the first device, and the device type. In this way, the device to be reconnected to the first device can be selected from these multiple angles to achieve more accurate reconnection.
[0061] 203. The third device receives the connection back broadcast sent by the first device.
[0062] The third device is any device except the first device. Optionally, the third device is the second device, or the third device includes the second device and other devices.
[0063] 204. When the reconnection condition is met, the third device establishes a connection with the first device.
[0064] Optionally, the connection type established between the third device and the first device is of any type, for example, the third device establishes a BLE connection with the first device, establishes a P2P (Peer to Peer) connection with the first device based on the BLE connection, or establishes a WLAN (Wireless Local Area Network) connection with the first device based on the BLE connection.
[0065] For example, if the back-connection condition is that the device that establishes a back-connection with the first device has been connected to the first device, and the device is not currently connected to the first device, then the third device will establish a connection with the first device as long as it determines that it has been connected to the first device and is not currently connected to the first device. For another example, if the back-connection condition is that the device that establishes a back-connection with the first device has been connected to the first device, and the device is not currently connected to the first device, and the device is a TV, then the third device will establish a connection with the first device as long as it determines that it has been connected to the first device and is not currently connected to the first device, and its device type is a TV.
[0066] It should be noted that the steps performed by the first device and the third device can independently become an embodiment, that is, steps 201-202 can independently become an embodiment, and steps 203-204 can independently become an embodiment.
[0067] In an embodiment of the present application, when the connection between the first device and the second device is abnormally disconnected, the first device obtains a reconnection condition. Since the reconnection condition is a condition that needs to be met by a device to establish a reconnection with the first device, a reconnection broadcast is sent based on the reconnection condition to request the device that meets the reconnection condition to establish a connection with the first device. The device that receives the reconnection broadcast can determine whether it can establish a reconnection with the first device based on the reconnection broadcast, thereby limiting the device that reconnects with the first device through the reconnection condition, rather than limiting the first device to establish a reconnection with the currently disconnected device, making the connection between devices more flexible.
[0068] Figure 3 A flow chart of a device connection method provided by an exemplary embodiment of the present application is shown. Figure 3 The method is interactively executed by the first device and the third device. In the method, the backlink broadcast carries the identifier of the device that meets the backlink condition, and the device receiving the backlink broadcast determines whether to establish a connection with the first device based on the identifier. The method includes:
[0069] 301. When the connection between the first device and the second device is abnormally disconnected, the first device obtains a reconnection condition, where the reconnection condition is a condition that needs to be met by the device to establish a reconnection with the first device.
[0070] For the implementation of this step, please refer to the above step 201, which will not be repeated here.
[0071] 302. The first device determines an identifier of a third device that meets a reconnection condition.
[0072] In a possible implementation, the first device obtains a connection record of the first device, and queries the identity of the third device that meets the reconnection condition from the connection record, so that the identity of the third device that meets the reconnection condition can be quickly and accurately determined based on the connection record.
[0073] The connection record includes the identifier of the historical device that has established a connection with the first device. Optionally, the connection record also includes other information, such as the current connection status of the historical device that has established a connection with the first device, the time point when the historical device established a connection with the first device, the time point when the connection was disconnected, the connection method between the historical device and the first device, the device type of the historical device, etc., which is not limited in the embodiments of the present application.
[0074] In a possible implementation, the reconnection condition includes that the device that establishes a reconnection with the first device has been connected to the first device, and the device is not currently connected to the first device. Since the connection record records the identifiers of historical devices that have established a connection with the first device, the first device queries the connection record for the identifiers of historical devices whose corresponding connection status is not connected, and the queried identifier is the identifier of the third device that meets the reconnection condition.
[0075] In a possible implementation, the reconnection condition also includes that, among at least one device that has been connected to the first device and is not currently connected to the first device, the disconnection time point corresponding to the device that establishes a reconnection with the first device is closest to or farthest from the current time point. Accordingly, the first device selects the identifier of the historical device whose disconnection time point is closest to the current time point based on the disconnection time points corresponding to the identifiers of each historical device in the connection record, and the identifier of the historical device is the identifier of the third device that meets the reconnection condition.
[0076] In a possible implementation, the reconnection condition also includes that the disconnection time point corresponding to the device that establishes the reconnection with the first device is within the target time period. Accordingly, the first device selects the identifier of the historical device whose disconnection time point is within the target time period based on the disconnection time point corresponding to the identifier of each historical device in the connection record, and the identifier of the historical device is the identifier of the third device that meets the reconnection condition. By limiting the devices that reconnect from the time dimension, devices that are not allowed to reconnect in the time dimension can be excluded, thereby reducing the performance consumption of the device.
[0077] In a possible implementation, the reconnection condition also includes that the type of the device establishing the reconnection with the first device is the target type. Accordingly, the first device queries the connection record for the identifier of the corresponding historical device whose connection status is not connected, and then determines the identifier of the historical device whose corresponding device type is the target type from the identifiers of the queried historical devices, and the identifier is the identifier of the third device that meets the reconnection condition.
[0078] In one possible implementation, the first device determines the identifier of the third device that meets the reconnection condition, including: the first device determines the identifier of the target number of third devices that meet the reconnection condition. For example, the first device randomly selects the identifier of the target number of third devices from the identifiers of the third devices that meet the reconnection condition. For another example, the first device selects the identifier of the target number of third devices whose disconnection time point from the first device is closest to the current time point from the identifiers of the third devices that meet the reconnection condition. For another example, the reconnection condition includes that the device that establishes a reconnection with the first device has been connected to the first device, and the device is not currently connected to the first device, and the type of the device is a lamp, then the first device selects the identifier of the target number of lamps from the identifiers of the lamps that have been connected to the first device and are not currently connected. Among them, the target number can be set to any number, for example, 3, 4, etc.
[0079] In an embodiment of the present application, since the device that receives the back-connection broadcast establishes a connection with the first device when it determines that the back-connection broadcast includes its own identifier, the number of devices that establish a back-connection with the first device is limited by determining the number of identifiers of third devices that meet the back-connection conditions, thereby improving the flexibility of establishing connections between devices.
[0080] 303. The first device sends a reconnection broadcast, where the reconnection broadcast includes an identifier of the third device, and the reconnection broadcast is used to request the third device that meets the reconnection condition to establish a connection with the first device.
[0081] 304. The third device receives the reconnection broadcast sent by the first device, where the reconnection broadcast includes an identifier of a device that meets the reconnection condition.
[0082] Optionally, the back-connection broadcast further includes an identifier of the first device, a connection mode of the first device, and the like.
[0083] 305. The third device establishes a connection with the first device when the backlink broadcast includes the identifier of the third device.
[0084] For example, the back-connection broadcast includes the identifiers of three electric lights. Then, when the three electric lights corresponding to the identifiers of the three electric lights receive the back-connection broadcast, they will establish a connection with the first device.
[0085] In an embodiment of the present application, the first device sending the broadcast determines the identifier of the third device that meets the backconnection condition, and carries the identifier of the third device in the backconnection broadcast, so that after receiving the backconnection broadcast, the third device only needs to determine whether the backconnection broadcast includes its own identifier to know whether it meets the backconnection condition, thereby improving the efficiency of the third device in determining whether it meets the backconnection condition and reducing the consumption of the performance of the third device.
[0086] Figure 4A flow chart of a device connection method provided by an exemplary embodiment of the present application is shown. Figure 4 The method is interactively executed by the first device and the third device. In the method, the backlink broadcast carries the backlink condition, and the device receiving the backlink broadcast determines whether to establish a connection with the first device based on the backlink condition. The method includes:
[0087] 401. When the connection between the first device and the second device is abnormally disconnected, the first device obtains a reconnection condition, where the reconnection condition is a condition that needs to be met by the device to establish a reconnection with the first device.
[0088] For the implementation of this step, please refer to the above step 201, which will not be repeated here.
[0089] 402. The first device sends a reconnection broadcast including a reconnection condition, where the reconnection broadcast is used to request a third device that meets the reconnection condition to establish a connection with the first device.
[0090] Optionally, the back-connection broadcast further includes an identifier of the first device, a connection mode of the first device, and the like.
[0091] 403. The third device receives the back-connection broadcast sent by the first device.
[0092] 404. When the reconnection condition is met, the third device establishes a connection with the first device.
[0093] In one possible implementation, the reconnection condition includes that the device that establishes a reconnection with the first device has been connected to the first device, and the device is not currently connected to the first device. Accordingly, the third device establishes a connection with the first device when the reconnection condition is met, including: the third device obtains a connection record of the third device, the connection record includes an identifier of a historical device that has established a connection with the third device and the current connection status of the historical device and the third device, and the third device establishes a connection with the first device when it is determined that the connection record includes an identifier of the first device and the first device is not currently connected to the third device. In this way, the third device can quickly and accurately determine whether it meets the reconnection condition based on the connection record, and establish a connection with the first device when the reconnection condition is met.
[0094] In a possible implementation, the reconnection condition also includes that the type of the device that establishes a reconnection with the first device is a target type. Accordingly, when the reconnection condition is met, the third device establishes a connection with the first device, including: when the third device determines that it has been connected to the first device and is not currently connected to the first device, it obtains its own device type, and when the device type belongs to the target type, it establishes a connection with the first device. This method can effectively improve the robustness of the connection and reduce the occurrence of misconnection operations by limiting the types of devices that can be reconnected.
[0095] In a possible implementation, the reconnection condition also includes that the disconnection time point corresponding to the device that establishes the reconnection with the first device is within the target time period, and accordingly, the third device establishes a connection with the first device when the reconnection condition is met, including: the third device establishes a connection with the first device after determining that the disconnection time point between itself and the first device is within the target time period. This method can exclude devices that are not allowed to reconnect in the time dimension by limiting the devices that reconnect from the time dimension, thereby reducing the performance consumption of the device.
[0096] In another possible implementation, the backconnection condition also includes that the distance between the device that establishes a backconnection with the first device and the first device is not greater than the target distance. Accordingly, the third device establishes a connection with the first device when the backconnection condition is met, including: when the third device determines that it has been connected to the first device and is not currently connected to the first device, determining the received signal strength of the backconnection broadcast; determining the distance between itself and the first device based on the received signal strength; and establishing a connection with the first device when the distance is not greater than the target distance.
[0097] In another possible implementation, the back-connection condition also includes that the device establishing a back-connection with the first device is at the target position of the first device. Accordingly, when the back-connection condition is met, the third device establishes a connection with the first device, including: when the third device determines that it has been connected to the first device and is not currently connected to the first device, based on the received back-connection broadcast, it determines its position relative to the first device; when the position is consistent with the target position, it establishes a connection with the first device. Optionally, the third device determines its position relative to the first device based on the received back-connection broadcast through UWB (Ultra Wide Band) technology.
[0098] One thing that needs to be explained is that the above-mentioned multiple back-connection conditions can be combined in any way. For example, the back-connection conditions include: the device that establishes a back-connection with the first device has been connected to the first device, and the device is not currently connected to the first device, and the type of the device is the target type, and the distance between the device and the first device is not greater than the target distance. Correspondingly, when the third device determines that it has been connected to the first device and is not currently connected to the first device, it obtains its own device type, and when the device type belongs to the target type, it determines the received signal strength of the back-connection broadcast; based on the received signal strength, it determines the distance between itself and the first device, and when the distance is not greater than the target distance, it establishes a connection with the first device.
[0099] In an embodiment of the present application, the first device sends a reconnection broadcast including a reconnection condition, and the device receiving the reconnection broadcast determines whether it satisfies the reconnection condition based on the reconnection condition. In this way, the first device sending the reconnection broadcast does not need to determine the identifier of the device that satisfies the reconnection condition, thereby reducing the consumption of the performance of the first device.
[0100] Figure 5 A flow chart of a device connection method provided by an exemplary embodiment of the present application is shown. Figure 5 The method is interactively executed by the first device and the third device, and the method describes a confirmation process of establishing a connection between the first device and the third device. The method includes:
[0101] 501. When the connection between the first device and the second device is abnormally disconnected, the first device obtains a reconnection condition, where the reconnection condition is a condition that needs to be met by the device to establish a reconnection with the first device.
[0102] For the implementation of this step, please refer to the above step 201, which will not be repeated here.
[0103] 502. The first device displays the broadcast confirmation information, and in response to a confirmation operation on the broadcast confirmation information, sends a reconnection broadcast. Alternatively, the first device sends a reconnection broadcast without displaying the broadcast confirmation information. The reconnection broadcast is used to request a third device that meets the reconnection condition to establish a connection with the first device.
[0104] Optionally, the first device displays a broadcast confirmation pop-up window, which includes a confirmation control. The first device sends a connection back broadcast in response to a triggering operation on the confirmation control.
[0105] In the embodiment of the present application, by displaying the broadcast confirmation information, the reconnection broadcast is sent only when the user confirms the broadcast confirmation information, giving the user the right to choose whether to reconnect, and can avoid initiating the process of establishing a reconnection without the user's consent, ensuring that the initiation of the current reconnection process meets the user's needs, improving the user experience, and thus being able to increase user stickiness.
[0106] In an embodiment of the present application, considering that in a scenario with a large number of connections between devices, if the user is required to manually trigger the reconnection every time, it will increase the user's operating burden. Therefore, the first device directly sends the reconnection broadcast without displaying the broadcast confirmation information, which can reduce user operations, improve user experience, and thus increase user stickiness.
[0107] 503. The third device receives the reconnection broadcast sent by the first device. The reconnection broadcast also includes second indication information. The second indication information instructs the third device to display reconnection confirmation information.
[0108] The back-connection confirmation information is used by the third device to confirm the establishment of a connection with the first device.
[0109] 504. When the third device meets the reconnection condition, the third device displays reconnection confirmation information, and establishes a connection with the first device in response to a confirmation operation on the reconnection confirmation information.
[0110] The reconnection confirmation information is used for the third device to confirm the establishment of a connection with the first device. Optionally, the first device displays a reconnection confirmation pop-up window, which includes a confirmation control, and the third device establishes a connection with the first device in response to a trigger operation on the confirmation control. Optionally, in the case where the third device simultaneously receives reconnection broadcasts sent by multiple devices, the third device displays the identifiers of the multiple devices and the confirmation controls corresponding to the identifiers of each device in the pop-up window, and establishes a connection with the device in response to a trigger operation on the confirmation control corresponding to the identifier of any device in the reconnection pop-up window.
[0111] Figure 6 This is a schematic diagram of a connection confirmation pop-up window, see Figure 6 , the reconnect confirmation pop-up window displays device A, a confirmation control, and a cancel control, where "Reconnect" is displayed on the confirmation control. When the user triggers the confirmation control, the connection with device A can be established. When the user triggers the cancel control, the connection with device A can be refused and the pop-up window can be closed. It should be noted that in addition to device A, other device logos are also displayed in the pop-up window. The user can slide the device logo in the reconnect confirmation pop-up window to fully display the logos of other devices. After the logos of other devices are fully displayed, triggering the "Reconnect" control can trigger the third device to establish a connection with the device.
[0112] In an embodiment of the present application, by carrying the second indication information in the reconnection broadcast to instruct the third device that meets the reconnection conditions to display the reconnection confirmation information, the connection is established with the first device only when the user confirms the reconnection confirmation information. This can avoid re-establishing the connection with the first device without the user's consent, ensuring that the current connection with the first device meets the user's needs, thereby improving user stickiness.
[0113] In a possible implementation, the back-connection broadcast includes the first indication information instead of the second indication information, and the first indication information indicates that the third device does not display the back-connection confirmation information. Accordingly, when the back-connection condition is met, the third device does not display the back-connection confirmation information and establishes a connection with the first device.
[0114] In an embodiment of the present application, considering that in a scenario with a large number of connections between devices, if the user is required to manually trigger the reconnection each time, the user's operating burden will increase. Therefore, by carrying the first indication information in the reconnection broadcast to instruct the third device that meets the reconnection conditions not to display the reconnection confirmation information, the third device can establish a connection with the first device without the user confirming the reconnection, which can reduce user operations and thus improve user stickiness.
[0115] One point that needs to be explained is that the first device sends a reconnection broadcast without displaying the broadcast confirmation information, and the third device does not display the reconnection confirmation information when the reconnection conditions are met, and directly establishes a connection with the first device. This connection method can be called silent reconnection, that is, the reconnection between the two devices is achieved without the user performing a trigger operation in a non-interface disturbing manner. Considering the future stage of the Internet of Things, the types and number of IOT (Internet of Things) devices connected to commonly used devices will explode, and the number of connected IOT devices may reach hundreds or thousands. Even if only a small part of them requires the user to perform a reconnection operation, it will cause a heavy operating burden on the user. Therefore, the use of silent reconnection can greatly reduce the disturbance to the user. In addition, executing silent reconnection can effectively reduce the connection time perceived by the user, and even achieve reconnection without the user's perception, thereby improving user stickiness.
[0116] Optionally, it is also possible to determine whether the device uses a silent backlink or a backlink that requires a user to perform an operation based on the type of the device. For example, a PC (Personal Computer) uses a backlink that requires a user to perform an operation, such as displaying a broadcast confirmation message during the connection process, while a tablet computer uses a silent backlink, and the embodiments of the present application do not limit this.
[0117] In one possible implementation, considering that there are multiple third devices that meet the reconnection conditions, each third device will display reconnection confirmation information. In order to reduce interference to the user, after the first device establishes a connection with any third device based on the reconnection broadcast, it sends a confirmation message to cancel the broadcast. The confirmation message cancellation broadcast is used to request other third devices except the third device connected to the first device to cancel the display of the reconnection confirmation information. Accordingly, after other third devices display the reconnection confirmation information, they cancel the display of the reconnection confirmation information when they receive the confirmation message cancellation broadcast sent by the first device. This makes it possible for the reconnection confirmation information displayed by each third device to disappear automatically after the first device establishes a connection with any third device, without the need for the user to manually cancel the display, thereby improving user stickiness. Continue to refer to Figure 6When the third device receives the reconnection broadcasts sent by multiple devices at the same time, and the reconnection broadcasts sent by the multiple devices all include the second indication information, the third device displays the identifiers of the multiple devices in the pop-up window, and cancels the display of the identifier of the device in the pop-up window when receiving the confirmation information sent by any of the multiple devices to cancel the broadcast. When the third device receives the confirmation information sent by each of the multiple devices to cancel the broadcast, it closes the pop-up window.
[0118] Figure 7 This is a schematic diagram of the interface of a device during the connection process in a screen projection scenario. Figure 7 , Figure 7 The three interfaces in the upper middle row are the interfaces of the first device, and the three interfaces in the lower row are the interfaces of the second device. When the second device has established a connection with the first device, and the screen of the second device is projected on the first device, the connection between the first device and the second device is abnormally disconnected. At this time, the first device displays Figure 7 Interface 1 in the example includes broadcast confirmation information, i.e., "Reconnect". When the user triggers the control "Reconnect", the first device will send a return broadcast and display Figure 7 Interface 2 in the figure. When the second device receives the backlink broadcast and determines that it meets the backlink conditions, it displays Figure 7 Interface 4 in the embodiment includes a reconnection confirmation pop-up window, which includes an identifier of the first device and a reconnection confirmation control. The reconnection confirmation control displays "connection". When the user triggers the reconnection confirmation control, the second device establishes a connection with the first device and displays Figure 7 When the second device is successfully connected to the first device, the second device displays Figure 7 , and continue to project the screen to the first device. You can see that the interface displayed on the first device is Figure 7 The interface 3 in the second device is the same as the interface displayed by the second device. The above connection process requires the user to perform a back connection operation. It should be noted that, continue to refer to Figure 7 During the silent reconnection process, the first device displays Figure 7 When the user displays the interface 1 in the figure, the user does not need to trigger the "Reconnect" control, and the first device will send a return broadcast. Alternatively, the "Reconnect" control is not displayed in the interface. After the first device sends a return broadcast, it still displays Figure 7 In addition, after the second device receives the backlink broadcast, it will not display Figure 7 Interface 4 and Figure 7 In interface 5, after the second device successfully connects with the first device, it will directly display Figure 7 6 in the screen, and continue to project the screen to the first device, you can see the interface displayed on the first device at this time, that is, Figure 7Interface 3 in the figure is the same as the interface displayed on the second device. Alternatively, during the silent reconnection process, after the second device successfully connects to the first device, it does not display interface 6 and continues to project the screen on the first device. In addition, if the silent reconnection fails, the user can trigger the "Reconnect" control in the first device to trigger the first device to resend the reconnection broadcast. And, when the second device receives the reconnection broadcast, it no longer performs the silent reconnection, but displays Figure 7 Interface 4 in the example, and when the user triggers the “connect” control, a connection is established with the first device.
[0119] Figure 8 A flow chart of a device connection method provided by an exemplary embodiment of the present application is shown. Figure 8 The method is interactively executed by the first device and the third device, and the method describes a process of establishing a WLAN connection between the third device and the first device. The method includes:
[0120] 801. When a connection between a first device and a second device is abnormally disconnected, the first device obtains a reconnection condition, where the reconnection condition is a condition that needs to be satisfied by the device to establish a reconnection with the first device.
[0121] 802. The first device sends a reconnection broadcast based on a reconnection condition, where the reconnection broadcast is used to request a device that meets the reconnection condition to establish a connection with the first device.
[0122] 803. The third device receives the back-connection broadcast sent by the first device.
[0123] For the implementation of steps 801-803, please refer to the above method embodiment, which will not be repeated here.
[0124] 804. When the reconnection condition is met, the third device establishes a BLE connection with the first device, and based on the BLE connection, establishes a WLAN connection with the first device.
[0125] Optionally, when the reconnection conditions are met, the third device establishes a BLE connection with the first device based on the connection information carried in the reconnection broadcast, wherein the connection information includes any information related to establishing a BLE connection between the third device and the first device, which is not limited in this embodiment of the present disclosure.
[0126] Optionally, after establishing a BLE connection with the first device, the third device exchanges connection information for establishing a WLAN connection with the first device based on the BLE connection, and then establishes the WLAN connection based on the exchanged connection information.
[0127] In the embodiment of the present application, since the operation of establishing a BLE connection is simple and the power consumption of the terminal is low, after the BLE connection is established, a WLAN connection is established on the basis of the BLE connection, which can reduce the difficulty of establishing the WLAN connection. It should be noted that establishing a WLAN connection with the first device based on the BLE connection is only an exemplary description. In other embodiments, a P2P connection, an NFC (Near Field Communication) connection, etc. can also be established with the first device based on the BLE connection, and the embodiment of the present application does not limit this.
[0128] Since there is no limit on the number of WLAN connections, that is, the first device can establish WLAN connections with multiple devices at the same time, the third device can establish a WLAN connection with the first device when the reconnection conditions are met. Without affecting the WLAN connection that the third device has established with other devices, the third device can successfully establish a connection with the first device, thereby avoiding the preemption of connection resources and effectively improving the stability of the connection.
[0129] Fig. 9 A schematic diagram of a wireless local area network. Fig. 9 A wireless local area network includes a wireless network access point, a router, and multiple electronic devices. Any two of these multiple devices can establish a WLAN connection through the router.
[0130] Optionally, in order to improve the security of data interaction, the data exchanged between the first device and the third device is encrypted, and the encryption method is not limited in the embodiment of the present application. Optionally, in order to improve the success rate of establishing a connection, during the process of establishing a connection, the first device and the third device can also check the version number of the connection service supported by the other device, and establish a connection when the version of the connection service is consistent.
[0131] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0132] Please refer to Fig.10 , which shows a structural block diagram of a device connection device provided by an exemplary embodiment of the present application. The device connection device is configured on a first device, and the device connection device includes:
[0133] The condition acquisition module 1001 is used to acquire a reconnection condition when the connection between the first device and the second device is abnormally disconnected, where the reconnection condition is a condition that needs to be satisfied by the device to establish a reconnection with the first device;
[0134] The broadcast sending module 1002 is used to send a back-connection broadcast based on the back-connection condition, where the back-connection broadcast is used to request a third device that meets the back-connection condition to establish a connection with the first device.
[0135] In an embodiment of the present application, when the connection between the first device and the second device is abnormally disconnected, the first device obtains a reconnection condition. Since the reconnection condition is a condition that needs to be met by a device to establish a reconnection with the first device, a reconnection broadcast is sent based on the reconnection condition to request the device that meets the reconnection condition to establish a connection with the first device. The device that receives the reconnection broadcast can determine whether it can establish a reconnection with the first device based on the reconnection broadcast, thereby limiting the device that reconnects with the first device through the reconnection condition, rather than limiting the first device to establish a reconnection with the currently disconnected device, making the connection between devices more flexible.
[0136] In a possible implementation, the broadcast sending module 1002 includes:
[0137] An identification determination unit, configured to determine an identification of a third device that meets a reconnection condition;
[0138] The broadcast sending unit is used to send a back-connection broadcast, where the back-connection broadcast includes an identifier of the third device.
[0139] In a possible implementation, the identifier determination unit is configured to obtain a connection record of the first device, the connection record including identifiers of historical devices that have established connections with the first device; and query the connection record for an identifier of a third device that meets a reconnection condition.
[0140] In a possible implementation manner, the identifier determining unit is configured to determine identifiers of a target number of third devices that meet a reconnection condition.
[0141] In a possible implementation, the broadcast sending module 1002 is configured to send a reconnection broadcast including a reconnection condition.
[0142] In a possible implementation, the condition acquisition module 1001 is used to acquire the reconnection condition when no target instruction is received and the connection between the first device and the second device is disconnected; wherein the target instruction indicates to disconnect the connection between the first device and the second device.
[0143] In a possible implementation, the broadcast sending module 1002 is configured to display the broadcast confirmation information, and send a connect-back broadcast in response to a confirmation operation on the broadcast confirmation information; or send a connect-back broadcast without displaying the broadcast confirmation information.
[0144] In a possible implementation manner, the backlink broadcast further includes second indication information;
[0145] The second indication information instructs the third device to display reconnection confirmation information, where the reconnection confirmation information is used by the third device to confirm the establishment of a connection with the first device.
[0146] In one possible implementation, there are multiple third devices, and each third device is used to display reconnection confirmation information when receiving a reconnection broadcast, and the reconnection confirmation information is used by the third device to confirm the establishment of a connection with the first device; the broadcast sending module 1002 is also used to send a confirmation message to cancel the broadcast after establishing a connection with any third device based on the reconnection broadcast, and the confirmation message cancellation broadcast is used to request other third devices except the third device connected to the first device to cancel the display of the reconnection confirmation information.
[0147] In a possible implementation manner, the backlink broadcast further includes first indication information;
[0148] The first indication information instructs the third device not to display the reconnection confirmation information, where the reconnection confirmation information is used by the third device to confirm the establishment of a connection with the first device.
[0149] In a possible implementation, the backconnection condition includes that the device establishing the backconnection with the first device has been connected to the first device, and the device establishing the backconnection with the first device is not currently connected to the first device.
[0150] In a possible implementation, the reconnection condition further includes at least one of the following:
[0151] Among at least one device that has been connected to the first device and is not currently connected to the first device, the disconnection time point corresponding to the device that establishes a back connection with the first device is closest to or farthest from the current time point, and the disconnection time point is the time point when the connection between the device that establishes a back connection with the first device and the first device is disconnected;
[0152] The disconnection time point corresponding to the device establishing a back connection with the first device is within the target time period;
[0153] The type of the device establishing a back connection with the first device is the target type;
[0154] The distance between the device establishing a back connection with the first device and the first device is not greater than the target distance;
[0155] The device establishing a back connection with the first device is at the target location of the first device;
[0156] In a possible implementation, the backlink broadcast is used to request a third device that meets the backlink condition to establish a low-power Bluetooth BLE connection with the first device, and the apparatus further includes:
[0157] The connection establishment module is used to establish a BLE connection with a third device based on the back-connection broadcast; and to establish a wireless local area network WLAN connection with the third device based on the BLE connection.
[0158] Please refer to Fig.11 , which shows a structural block diagram of a device connection device provided by an exemplary embodiment of the present application. The device connection device is configured on a third device, and the device connection device includes:
[0159] The broadcast receiving module 111 is used to receive a back-connection broadcast sent by the first device, where the back-connection broadcast is used to request a device that meets a back-connection condition to establish a connection with the first device, where the back-connection condition is a condition that needs to be met by the device that establishes a back-connection with the first device;
[0160] The connection establishing module 112 is configured to establish a connection with the first device when the third device meets the reconnection condition.
[0161] In an embodiment of the present application, a third device receives a reconnection broadcast sent by the first device. Since the reconnection broadcast is used to request a device that meets the reconnection condition to establish a connection with the first device, the device that receives the reconnection broadcast can determine whether it can establish a reconnection with the first device based on the reconnection broadcast, thereby limiting the devices that reconnect to the first device through the reconnection condition, rather than being limited to establishing a reconnection between the first device and the currently disconnected device, making the connection between devices more flexible.
[0162] In a possible implementation, the backlink broadcast includes an identifier of a device that meets the backlink condition, and the connection establishment module 112 is configured to establish a connection with the first device when the backlink broadcast includes the identifier of the third device; or
[0163] The back-connection broadcast includes the back-connection conditions.
[0164] In one possible implementation, the backconnection condition includes that the device that establishes a backconnection with the first device has been connected to the first device, and the device that establishes a backconnection with the first device is not currently connected to the first device, and the connection establishment module 112 is used to obtain a connection record of a third device, the connection record includes an identifier of a historical device that has established a connection with the third device and a current connection status between the historical device and the third device; when the connection record includes the identifier of the first device and the first device and the third device are not currently connected, a connection is established with the first device.
[0165] In a possible implementation, the reconnection condition further includes at least one of the following:
[0166] Among at least one device that has been connected to the first device and is not currently connected to the first device, the disconnection time point corresponding to the device that establishes a back connection with the first device is closest to or farthest from the current time point, and the disconnection time point is the time point when the connection between the device that establishes a back connection with the first device and the first device is disconnected;
[0167] The disconnection time point corresponding to the device establishing a back connection with the first device is within the target time period;
[0168] The type of the device establishing a back connection with the first device is the target type;
[0169] The distance between the device establishing a back connection with the first device and the first device is not greater than the target distance;
[0170] The device establishing a back connection with the first device is at the target location of the first device.
[0171] In a possible implementation, the back-connection broadcast further includes second indication information, and the second indication information indicates that the third device displays the back-connection confirmation information; the connection establishment module 112 includes:
[0172] An information display unit, configured to display reconnection confirmation information when the third device meets the reconnection condition;
[0173] The connection establishing unit is configured to establish a connection with the first device in response to a confirmation operation on the back-connection confirmation information.
[0174] In a possible implementation manner, the information display unit is further configured to cancel displaying the reconnection confirmation information when receiving confirmation information sent by the first device to cancel broadcasting.
[0175] In a possible implementation, the back-connection broadcast further includes first indication information, where the first indication information indicates that the third device does not display the back-connection confirmation information, and the back-connection confirmation information is used by the third device to confirm the establishment of a connection with the first device;
[0176] The connection establishing module 112 is configured to establish a connection with the first device without displaying the reconnection confirmation message when the third device meets the reconnection condition.
[0177] In one possible implementation, the backconnection broadcast is used to request a device that meets the backconnection condition to establish a BLE connection with the first device. The connection establishment module 112 is used to establish a BLE connection with the first device when the third device meets the backconnection condition; and to establish a WLAN connection with the first device based on the BLE connection.
[0178] It should be noted that the device provided in the above embodiment, when implementing its functions, only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0179] An embodiment of the present application provides an electronic device, which includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the device connection method provided in the above-mentioned various method embodiments.
[0180] In some embodiments, the electronic device is a terminal, please refer to Fig.12 , which shows a block diagram of a terminal provided by an exemplary embodiment of the present application. In some embodiments, the terminal 1200 is a terminal such as a smart phone, a tablet computer, a wearable device, etc. that can access a wireless local area network as a wireless station. The terminal 1200 in the present application includes at least one or more of the following components: a processor 1210, a memory 1220, and at least two wireless links 1230.
[0181] In some embodiments, the processor 1210 includes one or more processing cores. The processor 1210 uses various interfaces and lines to connect various parts of the entire terminal 1200, and executes various functions and processes data of the terminal 1200 by running or executing program codes stored in the memory 1220, and calling data stored in the memory 1220. In some embodiments, the processor 1210 is implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1210 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1210, but may be implemented by a separate chip.
[0182] In some embodiments, the processor 1210 is used to control the working conditions of at least two wireless links 1230. Accordingly, the processor 1210 is a processor integrated with a wireless fidelity (Wireless Fidelity, Wi-Fi) chip. The Wi-Fi chip is a chip with dual Wi-Fi processing capabilities. For example, the Wi-Fi chip is a dual-band dual concurrent (Dual Band Dual Concurrent, DBDC) chip, or a dual-band synchronous (Dual Band Simultaneous, DBS) chip, etc.
[0183] In some embodiments, the memory 1220 includes a random access memory (RAM), and in some embodiments, the memory 1220 includes a read-only memory (ROM). In some embodiments, the memory 1220 includes a non-transitory computer-readable storage medium. The memory 1220 can be used to store program codes. The memory 1220 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the terminal 1200 (such as audio data, a phone book), etc.
[0184] In some embodiments, the memory 1220 stores reception schemes for receiving beacon frames of different wireless links 1230, as well as identifiers of access nodes connected to different wireless links 1230, identifiers of wireless links 1230, and the like.
[0185] The at least two wireless links 1230 are used to connect different access points (APs) to receive downlink data sent by the APs, wherein the different access points are access points in the same router or access points in different routers.
[0186] In some embodiments, the terminal 1200 also includes a display screen. The display screen is a display component for displaying a user interface. In some embodiments, the display screen is a display screen with a touch function, through which the user can use any suitable object such as a finger or a touch pen to perform touch operations on the display screen. In some embodiments, the display screen is usually arranged on the front panel of the terminal 1200. In some embodiments, the display screen is designed to be a full screen, a curved screen, a special-shaped screen, a double-sided screen or a folding screen. In some embodiments, the display screen is also designed to be a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which is not limited in this embodiment.
[0187] In addition, those skilled in the art will appreciate that the structure of the terminal 1200 shown in the above drawings does not limit the terminal 1200, and the terminal 1200 includes more or fewer components than shown in the drawings, or combines certain components, or arranges components differently. For example, the terminal 1200 also includes components such as a microphone, a speaker, an input unit, a sensor, an audio circuit, a module, a power supply, and a Bluetooth module, which will not be described in detail here.
[0188] The present application also provides a computer-readable storage medium, which stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the device connection method shown in the above embodiments.
[0189] The present application also provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on an electronic device, it is used to implement the device connection method shown in the above embodiments.
[0190] The present application also provides a computer program product, which stores at least one program code, and the at least one program code is used to be executed by a processor to implement the device connection method shown in the above embodiments.
[0191] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0192] Those skilled in the art can understand that all or part of the steps in the device connection method of the above embodiment can be completed by hardware, or by a program to instruct the relevant hardware to complete, and the program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc. The above is only an optional embodiment of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A device connection method, characterized in that: Executed by a first device, the method includes: In the case where the connection between the first device and the second device is abnormally disconnected, obtaining a reconnection condition, where the reconnection condition is a condition that needs to be satisfied by a device that establishes a reconnection with the first device, and the reconnection condition includes that the device that establishes a reconnection with the first device has been connected to the first device, and the device that establishes a reconnection with the first device is not currently connected to the first device; Based on the reconnection condition, a reconnection broadcast is sent, where the reconnection broadcast is used to request a third device that meets the reconnection condition to establish a connection with the first device, and the reconnection broadcast also includes first indication information, where the first indication information is used to instruct the third device not to display reconnection confirmation information when it is determined that the third device has been connected to the first device, and the reconnection confirmation information is used by the third device to confirm the establishment of a connection with the first device.
2. The method according to claim 1, characterized in that The sending the reconnection broadcast based on the reconnection condition includes: Determining an identifier of the third device that meets the backconnection condition; The back-connection broadcast is sent, where the back-connection broadcast includes an identifier of the third device.
3. The method according to claim 2, characterized in that The determining the identifier of the third device that meets the reconnection condition includes: Acquire a connection record of the first device, where the connection record includes an identifier of a historical device that has established a connection with the first device; The identification of the third device that meets the backconnection condition is queried from the connection record.
4. The method according to claim 1, characterized in that The sending the reconnection broadcast based on the reconnection condition includes: The reconnection broadcast including the reconnection condition is sent.
5. The method according to claim 1, characterized in that The acquiring the reconnection condition when the connection between the first device and the second device is abnormally disconnected includes: When no target instruction is received and the connection between the first device and the second device is disconnected, obtaining the reconnection condition; The target instruction instructs to disconnect the connection between the first device and the second device.
6. The method according to claim 1, characterized in that The sending the reconnection broadcast based on the reconnection condition includes: Display broadcast confirmation information, and send the back-connection broadcast in response to a confirmation operation on the broadcast confirmation information; or The back-connection broadcast is sent without displaying the broadcast confirmation information.
7. The method according to claim 1, characterized in that There are multiple third devices, and each of the third devices is used to display reconnection confirmation information when receiving the reconnection broadcast, and the reconnection confirmation information is used by the third device to confirm the establishment of a connection with the first device; after sending the reconnection broadcast based on the reconnection condition, the method further includes: After establishing a connection with any of the third devices based on the back-connection broadcast, sending confirmation information to cancel the broadcast, wherein the confirmation information cancellation broadcast is used to request other third devices except the third device connected to the first device to cancel displaying the back-connection confirmation information.
8. The method according to claim 1, characterized in that The reconnection condition also includes at least one of the following: Among at least one device that has been connected to the first device and is not currently connected to the first device, a disconnection time point corresponding to a device that establishes a back connection with the first device is closest to or farthest from a current time point, and the disconnection time point is a time point when the connection between the device that establishes a back connection with the first device and the first device is disconnected; The disconnection time point corresponding to the device establishing a back connection with the first device is within the target time period; The type of the device establishing a back connection with the first device is a target type; The distance between the device establishing a backlink with the first device and the first device is not greater than the target distance; The device establishing a back connection with the first device is at the target location of the first device.
9. The method according to any one of claims 1 to 7, characterized in that: The back-connection broadcast is used to request a third device that meets the back-connection condition to establish a low-power Bluetooth BLE connection with the first device, and the method further includes: Establishing the BLE connection with the third device based on the backlink broadcast; Based on the BLE connection, a wireless local area network WLAN connection is established with the third device.
10. A device connection method, characterized in that: Executed by a third device, the method includes: receiving a back-connection broadcast sent by a first device, the back-connection broadcast being used to request a device that meets a back-connection condition to establish a connection with the first device, the back-connection condition being a condition that needs to be met by the device that establishes a back-connection with the first device, the back-connection condition including that the device that establishes a back-connection with the first device has been connected to the first device, and the device that establishes a back-connection with the first device is not currently connected to the first device, the back-connection broadcast including first indication information, the first indication information indicating that the third device does not display back-connection confirmation information when it is determined that the third device has been connected to the first device, and the back-connection confirmation information is used by the third device to confirm the establishment of a connection with the first device; Acquire a connection record of the third device, the connection record including an identifier of a historical device that has established a connection with the third device and a current connection status between the historical device and the third device; If the connection record includes the identifier of the first device and the first device is not currently connected to the third device, the reconnection confirmation information is not displayed, and a connection is established with the first device.
11. The method according to claim 10, characterized in that The back-connection broadcast includes an identifier of a device that meets the back-connection condition, and the establishing a connection with the first device when the third device meets the back-connection condition includes: establishing a connection with the first device when the back-connection broadcast includes the identifier of the third device; or The back-connection broadcast includes the back-connection condition.
12. The method according to claim 10, characterized in that The reconnection condition also includes at least one of the following: Among at least one device that has been connected to the first device and is not currently connected to the first device, a disconnection time point corresponding to a device that establishes a back connection with the first device is closest to or farthest from a current time point, and the disconnection time point is a time point when the connection between the device that establishes a back connection with the first device and the first device is disconnected; The disconnection time point corresponding to the device establishing a back connection with the first device is within the target time period; The type of the device establishing a back connection with the first device is a target type; The distance between the device establishing a backlink with the first device and the first device is not greater than the target distance; The device establishing a back connection with the first device is at the target location of the first device.
13. The method according to claim 10, characterized in that The back-connection broadcast includes second indication information, where the second indication information instructs the third device to display back-connection confirmation information; The establishing a connection with the first device when the third device meets the backconnection condition includes: If the third device meets the reconnection condition, display the reconnection confirmation information; In response to a confirmation operation on the back-connection confirmation information, a connection is established with the first device.
14. The method according to any one of claims 10 to 13, characterized in that: The back-connection broadcast is used to request a device that meets the back-connection condition to establish a BLE connection with the first device, and the third device, when the third device meets the back-connection condition, establishes a connection with the first device, including: When the third device meets the backconnection condition, establishing the BLE connection with the first device; Based on the BLE connection, a WLAN connection is established with the first device.
15. A device connection device, characterized in that: Configured in a first device, the apparatus comprises: a condition acquisition module, configured to acquire a reconnection condition when the connection between the first device and the second device is abnormally disconnected, the reconnection condition being a condition that needs to be satisfied by a device that establishes a reconnection with the first device, the reconnection condition including that the device that establishes a reconnection with the first device has been connected to the first device, and the device that establishes a reconnection with the first device is not currently connected to the first device; A broadcast sending module is used to send a backconnection broadcast based on the backconnection condition, wherein the backconnection broadcast is used to request a third device that meets the backconnection condition to establish a connection with the first device, and the backconnection broadcast also includes first indication information, wherein the first indication information indicates that the third device does not display backconnection confirmation information, and the backconnection confirmation information is used by the third device to confirm the establishment of a connection with the first device.
16. A device connection device, characterized in that: Configured in a third device, the apparatus comprises: a broadcast receiving module, configured to receive a back-connection broadcast sent by a first device, wherein the back-connection broadcast is used to request a device that meets a back-connection condition to establish a connection with the first device, wherein the back-connection condition is a condition that needs to be met by the device that establishes a back-connection with the first device, wherein the back-connection condition includes that the device that establishes a back-connection with the first device has been connected to the first device, and the device that establishes a back-connection with the first device is not currently connected to the first device, and the back-connection broadcast includes first indication information, wherein the first indication information indicates that the third device does not display back-connection confirmation information, and the back-connection confirmation information is used by the third device to confirm the establishment of a connection with the first device; A connection establishment module is used to obtain a connection record of the third device, wherein the connection record includes an identifier of a historical device that has established a connection with the third device and a current connection status between the historical device and the third device; when the connection record includes an identifier of the first device and the first device and the third device are not currently connected, the reconnection confirmation information is not displayed, and a connection is established with the first device.
17. An electronic device, characterized in that: The electronic device includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the device connection method as described in any one of claims 1 to 14.
18. A computer-readable storage medium, characterized in that: The storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the device connection method according to any one of claims 1 to 14.
19. A chip, characterized in that: The chip includes a programmable logic circuit and / or program instructions, and when the chip runs on an electronic device, it is used to implement the device connection method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Reconnection method and device, electronic device and storage medium
CN113395687A
Method for controlling Bluetooth connection and electronic equipment
CN113891297A
