CN114390500A - Device connection method, device and storage medium - Google Patents

Device connection method, device and storage medium Download PDF

Info

Publication number
CN114390500A
CN114390500A CN202210132139.6A CN202210132139A CN114390500A CN 114390500 A CN114390500 A CN 114390500A CN 202210132139 A CN202210132139 A CN 202210132139A CN 114390500 A CN114390500 A CN 114390500A
Authority
CN
China
Prior art keywords
connection
condition
reconnection
broadcast
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210132139.6A
Other languages
Chinese (zh)
Inventor
曾瀑文
林熙祺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210132139.6A priority Critical patent/CN114390500A/en
Publication of CN114390500A publication Critical patent/CN114390500A/en
Priority to PCT/CN2022/144138 priority patent/WO2023151423A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2823Reporting information sensed by appliance or service execution status of appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a device connection method, a device, equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: acquiring a reconnection condition under the condition that the connection between the first equipment and the second equipment is abnormally disconnected; and sending back a reconnection broadcast based on the reconnection condition, wherein the reconnection broadcast is used for requesting a third device meeting the reconnection condition to establish connection with the first device. Since the reconnection condition is a condition that needs to be met by the device which establishes reconnection with the first device, the device which receives the reconnection broadcast can determine whether the device can establish reconnection with the first device based on the reconnection broadcast, so that the device which limits reconnection with the first device through the reconnection condition is realized, instead of being limited to establish reconnection with the device which is disconnected currently, and the connection between the devices is more flexible.

Description

Device connection method, device and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a device connection method, a device and a storage medium.
Background
The development of computer technology makes people's lives increasingly intelligent, thereby providing users with a lot of convenience. For example, a user may establish a connection with a plurality of second devices in a home through a first device, that is, each second device may be controlled through the first device, however, the connection between the first device and the second device may be abnormally disconnected, and at this time, the connection needs to be reestablished with the currently disconnected second device. However, this way of establishing a connection is limited and not flexible enough.
Disclosure of Invention
The embodiment of the application provides a device connection method, a device and a storage medium, so that the connection between the devices is more flexible. The technical scheme is as follows:
according to an aspect of embodiments of the present application, there is provided a device connection method, performed by a first device, the method including:
under the condition that the connection between the first equipment and the second equipment is abnormally disconnected, obtaining a reconnection condition, wherein the reconnection condition is a condition required to be met by the equipment which establishes reconnection with the first equipment;
and sending back a loopback broadcast based on the loopback condition, wherein the loopback broadcast is used for requesting a third device meeting the loopback condition to establish connection with the first device.
According to another aspect of the embodiments of the present application, there is provided another device connection method, performed by a third device, the method including:
receiving a reconnection broadcast sent by first equipment, wherein the reconnection broadcast is used for requesting the equipment meeting the reconnection conditions to establish connection with the first equipment, and the reconnection conditions are conditions required to be met by the equipment establishing reconnection with the first equipment;
establishing a connection with the first device if the third device satisfies the loopback condition.
According to another aspect of the embodiments of the present application, there is provided a device connecting apparatus configured to a first device, the apparatus including:
the condition acquisition module is used for acquiring a reconnection condition under the condition that the connection between the first equipment and the second equipment is abnormally disconnected, wherein the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment;
and the broadcast sending module is used for sending back a reconnection broadcast based on the reconnection condition, wherein the reconnection broadcast is used for requesting a third device meeting the reconnection condition to establish connection with the first device.
According to another aspect of the embodiments of the present application, there is provided another device connecting apparatus, configured to a third device, the apparatus including:
the broadcast receiving module is used for receiving a reconnection broadcast sent by first equipment, wherein the reconnection broadcast is used for requesting equipment meeting reconnection conditions to establish connection with the first equipment, and the reconnection conditions are conditions required to be met by the equipment establishing reconnection with the first equipment;
a connection establishing module, configured to establish a connection with the first device when the third device satisfies the loopback condition.
According to another aspect of embodiments of the present application, there is provided an electronic device including a processor and a memory; the memory stores at least one program code for execution by the processor to implement the device connecting method as described in the above aspect.
According to another aspect of the embodiments of the present application, there is provided a chip, which includes a programmable logic circuit and/or program instructions, and when the chip is run on an electronic device, the chip is used to implement the device connection method of the above aspect.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium storing at least one program code for execution by a processor to implement the device connecting method according to the above aspect.
According to another aspect of embodiments of the present application, there is provided a computer program product having at least one program code stored therein for execution by a processor to implement the device connecting method of the above aspect.
In the embodiment of the application, when the connection between the first device and the second device is abnormally disconnected, the first device acquires a loop connection condition, and because the loop connection condition is a condition that needs to be met by a device that establishes a loop connection with the first device, the device that receives the loop connection broadcast can determine whether the device can establish the loop connection with the first device based on the loop connection condition to request the device that meets the loop connection condition to establish the connection with the first device, so that the device that receives the loop connection broadcast can determine whether the device can establish the loop connection with the first device based on the loop connection broadcast, and the device that performs the loop connection with the first device is limited by the loop connection condition instead of establishing the loop connection between the first device and the device that is currently disconnected, so that the connection between the devices is more flexible.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 illustrates a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a flow chart of a method for device connectivity provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of another method for device connection provided by an exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of yet another method of device connection provided by an exemplary embodiment of the present application;
FIG. 5 illustrates a flow chart of yet another method for device connection provided by an exemplary embodiment of the present application;
FIG. 6 illustrates a schematic diagram of a loopback confirmation popup provided by an exemplary embodiment of the present application;
FIG. 7 is a schematic diagram illustrating an interface of a device during connection in a screen-projection scenario according to an exemplary embodiment of the present application;
FIG. 8 illustrates a flow chart of yet another method for device connection provided by an exemplary embodiment of the present application;
FIG. 9 illustrates a network diagram provided by an exemplary embodiment of the present application;
FIG. 10 is a block diagram illustrating an apparatus for connecting devices according to an exemplary embodiment of the present application;
FIG. 11 is a block diagram illustrating another device connecting apparatus provided in an exemplary embodiment of the present application;
fig. 12 shows a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
As used herein, the term "at least one" refers to one or more, and "a plurality" refers to two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) referred to in the present application is information authorized by the user or sufficiently authorized by each party.
Fig. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to fig. 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 the first device 101 and the second device 102 illustratively include a notebook computer, a mobile phone, a tablet computer, a sound box, a car machine, a watch, a television, an electric lamp, a treadmill, a refrigerator, and the like.
Wherein, the first device 101 is configured to send back the connection broadcast to request the device meeting the connection-back condition to establish a connection with the first device 101 in case that the connection between the first device 101 and the second device 102 is abnormally disconnected. The reconnection condition is a condition that needs to be satisfied by the device that establishes the reconnection with the first device 101. The method can utilize the loopback condition to limit the devices that are in the loopback connection with the first device 101, but not to establish the loopback connection between the first device 101 and the currently disconnected second device 102, so that the connection between the devices is more flexible.
Illustratively, the first device 101 and the second device 102 have applications installed therein, and the first device 101 and the second device 102 can establish a connection through the applications and transmit data based on the connection. Optionally, the application is an application in an 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, and the like, and the embodiment of the present application is not limited thereto.
Optionally, the implementation environment further includes at least one third device 103 (1 is taken as an example in the figure), and the third device 103 is configured to receive the backhaul broadcast sent by the first device 101, determine whether itself meets a backhaul condition, and establish a connection with the first device 101 if the backhaul condition is met. It should be noted that the second device 102 also receives the backhaul broadcast transmitted by the first device 101, and can establish a connection with the first device 101 if it satisfies the backhaul condition.
The method provided by the embodiment of the application can be applied to a screen projection scene. For example, the first device is a television, the second device is a mobile phone, the third device is a tablet personal computer, after the television and the mobile phone are connected, video content in the mobile phone is launched on the television, and due to movement of a user, the mobile phone carried by the user is far away from the television, so that the connection between the television and the mobile phone is abnormally disconnected. After receiving the reconnection broadcast, the tablet computer determines that the tablet computer meets the reconnection condition, and then establishes connection with the television. The user can then drop the video content of the tablet computer onto the television. It should be noted that, in the case where the mobile phone also receives the return connection broadcast, the mobile phone does not establish a connection with the television because the distance between the mobile phone and the television exceeds the target distance.
The method provided by the embodiment of the application can be applied to scenes for controlling the household appliances. For example, the first device is a mobile phone, the second device is a television, the third device is an electric lamp, the user establishes connection with the television through the mobile phone, so that television channels are switched through the mobile phone, and establishes connection with the electric lamp through the mobile phone, so that the user turns on the lamp through the mobile phone. Due to the fact that the connection between the mobile phone and the television and the electric lamp is abnormally disconnected due to the automatic restart of the mobile phone, in this case, the mobile phone sends back the continuous broadcast after being restarted. Optionally, the loopback broadcast is used to request that a home appliance that has been connected to the mobile phone and is not currently connected to the mobile phone is connected to the mobile phone, and then the electric lamp and the television respectively establish connection to the mobile phone after receiving the loopback broadcast. Optionally, the reconnection broadcast is used for requesting a connection with the mobile phone, and an electric lamp which is not currently connected with the mobile phone establishes a connection with the mobile phone, so that after receiving the reconnection broadcast, the electric lamp determines that the electric lamp meets a reconnection condition, and then establishes a connection with the mobile phone. After the television receives the reconnection broadcast, the type of the equipment is determined to be not consistent with the type of the equipment which is allowed to be reconnected with the mobile phone, and then the television is determined not to meet the reconnection condition, so that the connection with the mobile phone is not established.
For another example, the reconnection condition includes that the device establishing reconnection with the first device is connected with the first device, the device is not currently connected with the first device, and the distance between the device and the first device is not greater than the target distance, then only the device having been connected with the first device, which has been currently disconnected, and the distance between the device and the first device is not greater than the target distance, can establish connection with the first device. Then, taking the first device as a home appliance and the second device as a mobile phone as an example, the user holds the mobile phone and moves from room a to room B, and the mobile phone is disconnected from the home appliance in room a because the mobile phone is far away from the home appliance in room a. And after the user arrives at the room B, the mobile phone is connected with the household appliances in the room B, and when the subsequent user returns to the room A from the room B, the mobile phone receives the back connection broadcast sent by the household appliances in the room A and is connected with the household appliances in the room A again. Similarly, when the user moves from room a to room B, the connection with the household appliance in room a is disconnected, and the user connects to the household appliance in room B based on the back connection broadcast sent by the household appliance in room B. Therefore, the mobile phone is automatically connected with the household appliance in the current room, and the user can conveniently control the household appliance.
The method provided by the embodiment of the present application can also be applied to other scenarios, and the embodiment of the present application does not limit this.
Fig. 2 shows a flowchart of a device connection method provided in an exemplary embodiment of the present application, and referring to fig. 2, the method is interactively performed by a first device and a third device, and the method includes:
201. the method comprises the steps that under the condition that connection between first equipment and second equipment is abnormally disconnected, a reconnection condition is obtained, and the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment.
Here, the connection back refers to a process of connecting two devices that have been connected but disconnected again. Optionally, the reconnection condition is that the first device currently obtains from the server, or the reconnection condition is stored in the first device in advance, or the first device receives a currently input reconnection condition. For example, in the case where the connection between the first device and the second device is abnormally disconnected, the first device displays a loop-back condition input interface, and receives a loop-back condition input at the loop-back condition input interface. Or, the first device receives the input voice information and identifies the reconnection condition in the voice information under the condition that the connection between the first device and the second device is abnormally disconnected. Of course, the first device can also obtain the reconnection condition in other ways, which is not limited in this embodiment of the application.
In a possible implementation manner, in the case that the connection between the first device and the second device is abnormally disconnected, acquiring the reconnection condition includes: and the first equipment acquires the reconnection condition under the condition that the target instruction is not received and the connection between the first equipment and the second equipment is disconnected. Wherein the target instruction indicates to disconnect the connection between the first device and the second device.
In the embodiment of the application, the first device does not receive the instruction indicating to disconnect the connection between the first device and the second device, so that the connection between the first device and the second device is disconnected, the connection can be objectively shown to be abnormally disconnected, in this case, the connection sending-back broadcast is sent to realize the connection back between the devices, and the connection back operation can be avoided under the condition that the user normally disconnects the connection between the devices, so that the interference to the user is caused.
202. The first device sends back a reconnection broadcast based on the reconnection condition, wherein the reconnection broadcast is used for requesting a third device meeting the reconnection condition to establish connection with the first device.
Optionally, the backhaul broadcast is a BLE (Bluetooth Low Energy) broadcast or other broadcast. Optionally, the type character is carried in the backhaul broadcast, and the device receiving the backhaul broadcast determines the type of the backhaul broadcast based on the type character, so as to parse the backhaul broadcast based on the type. Optionally, the backhaul broadcast is a Device ID Filter (a type of bluetooth low energy broadcast).
Optionally, when the connection between the first device and the second device is abnormally disconnected, the first device obtains the connection-back condition through an application in the first device, and then calls a connection service module in the first device through the application to send back the connection broadcast. Wherein the application is an application that uses the connection to transfer data. The connection service module is a module in the first device for establishing a connection between the electronic devices.
In a possible implementation manner, the reconnection condition includes that the device which establishes the reconnection with the first device is connected with the first device, and the device is not connected with the first device currently, so that the subsequent devices which are connected with the first device but disconnected can be connected with the first device again.
In one possible implementation, the tieback condition further comprises at least one of:
(1) in at least one device which is connected with the first device and is not connected with the first device currently, a disconnection time point corresponding to a device which establishes a loop connection with the first device is closest to or farthest from the current time point, and the disconnection time point is a time point when the device is disconnected from the first device.
(2) The corresponding disconnection time point of the device is in a target time period, and the target time period is any time period, for example, 7-12 pm.
(3) The type of the device is a target type. Wherein the target type can be set to any type, such as electric lamp, mobile phone, computer, etc.
(4) The distance between the device and the first device is not greater than the target distance. Wherein the target distance can be set to any distance, e.g. 1 meter, 2 meters, etc.
(5) The device is at a target location of the first device. The target direction can be set to any direction, for example, left front, rear, and the like.
In the embodiment of the application, the reconnection conditions are set from a plurality of angles, such as time of disconnection from the first device, distance from the first device, orientation relative to the first device, and device type, so that the device for performing reconnection with the first device can be selected from the plurality of angles, and more accurate reconnection is realized.
203. And the third equipment receives the back-connection broadcast sent by the first equipment.
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.
204. And the third equipment establishes connection with the first equipment under the condition that the loop-back condition is met.
Optionally, the type of connection established between the third device and the first device is 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.
For example, if the loopback condition is that the device establishing the loopback with the first device is connected with the first device and the device is not currently connected with the first device, the third device establishes connection with the first device as long as it is determined that the third device has been connected with the first device and is not currently connected with the first device. For another example, if the reconnection condition is that the device establishing reconnection with the first device is connected with the first device, the device is not currently connected with the first device, and the device is a television, the third device determines that the third device has been connected with the first device, is not currently connected with the first device, and establishes connection with the first device if the device type of the third device is a television.
It should be noted that the steps executed by the first device and the third device may independently become an embodiment, that is, the steps 201 and 202 may independently become an embodiment, and the steps 203 and 204 may independently become an embodiment.
In the embodiment of the application, when the connection between the first device and the second device is abnormally disconnected, the first device acquires a loop connection condition, and because the loop connection condition is a condition that needs to be met by a device that establishes a loop connection with the first device, the device that receives the loop connection broadcast can determine whether the device can establish the loop connection with the first device based on the loop connection condition to request the device that meets the loop connection condition to establish the connection with the first device, so that the device that receives the loop connection broadcast can determine whether the device can establish the loop connection with the first device based on the loop connection broadcast, and the device that performs the loop connection with the first device is limited by the loop connection condition instead of establishing the loop connection between the first device and the device that is currently disconnected, so that the connection between the devices is more flexible.
Fig. 3 is a flowchart illustrating a method for device connection provided in an exemplary embodiment of the present application, and referring to fig. 3, the method is performed by a first device and a third device interactively, in the method, a backhaul broadcast carries an identifier of a device that meets a backhaul condition, and a device that receives the backhaul broadcast determines whether to establish a connection with the first device based on the identifier. The method comprises the following steps:
301. the method comprises the steps that under the condition that connection between first equipment and second equipment is abnormally disconnected, a reconnection condition is obtained, and the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment.
Please refer to step 201 above, and details of this step are not repeated here.
302. The first device determines an identity of a third device that satisfies the loopback condition.
In a possible implementation manner, the first device obtains the connection record of the first device, and queries the identifier of the third device meeting the reconnection conditions from the connection record, so that the identifier of the third device meeting the reconnection conditions can be determined quickly and accurately by means of the connection record.
Wherein the connection record includes an identification of historical devices that have established a connection with the first device. Optionally, the connection record further includes other information, for example, a current connection state between the historical device that has established a connection with the first device and the first device, a time point when the historical device establishes a connection with the first device, a time point when the connection is disconnected, a connection manner between the historical device and the first device, a device type of the historical device, and the like, which is not limited in this embodiment of the application.
In one possible implementation, the loopback condition includes that the device establishing the loopback connection with the first device is connected with the first device, and the device is not currently connected with the first device. Because the connection record records the identifier of the historical device which has established connection with the first device, the first device queries the identifier of the historical device which is in a corresponding connection state and is not connected from the connection record, and the queried identifier is the identifier of the third device which meets the reconnection condition.
In a possible implementation manner, the reconnection condition further includes that, in at least one device which is connected with the first device and is not currently connected with the first device, the disconnection time point corresponding to the device which establishes the reconnection with the first device is closest to or farthest from the current time point. Correspondingly, the first device selects the identifier of the history device closest to the current time point from the disconnection time points based on the disconnection time points corresponding to the identifiers of the history devices in the connection record, and the identifier of the history device is the identifier of the third device meeting the reconnection condition.
In one possible implementation, the reconnection condition further includes that the disconnection time point corresponding to the device establishing the reconnection with the first device is within the target time period. Correspondingly, the first device selects the identifier of the historical device of the disconnection time point in the target time period from the disconnection time points corresponding to the identifiers of the historical devices in the connection record, wherein the identifier of the historical device is the identifier of the third device meeting the reconnection condition. By restricting the devices that are looped back from the time dimension, devices that are not allowed to be looped back in the time dimension can be excluded, thereby reducing performance consumption on the devices.
In one possible implementation, the loopback condition further includes that the type of the device establishing the loopback connection with the first device is the target type. Correspondingly, the first device queries the identifier of the historical device with the corresponding connection state being unconnected from the connection record, and then determines the identifier of the historical device with the corresponding device type being the target type from the queried identifier of the historical device, so that the identifier is the identifier of the third device meeting the reconnection condition.
In one possible implementation manner, the determining, by the first device, an identifier of a third device that satisfies the backhaul condition includes: the first device determines an identification of a target number of third devices that satisfy the reconnection condition. For example, the first device randomly selects the identities of the target number of third devices from the identities of the third devices that satisfy the reconnection condition. For another example, the first device selects, from the identifiers of the third devices that satisfy the loop back condition, the identifiers of the third devices that are closest to the current time point from the disconnection time point of the first device by the target number. For another example, the reconnection condition includes that the device establishing reconnection with the first device is connected with the first device, the device is not currently connected with the first device, and the type of the device is an electric lamp, then the first device selects the identification of the target number of electric lamps from the identifications of the electric lamps which are connected with the first device and are not currently connected. Wherein the target number can be set to any number, e.g. 3, 4, etc.
In the embodiment of the application, because the device receiving the loopback broadcast establishes connection with the first device when determining that the loopback broadcast includes the identifier of the device, the number of the identifiers of the third devices meeting the loopback condition is determined, so that the limitation of the number of the devices establishing the loopback with the first device is realized, and the flexibility of establishing connection among the devices is improved.
303. The first device sends back a loopback broadcast, the loopback broadcast comprises an identifier of the third device, and the loopback broadcast is used for requesting the third device meeting the loopback condition to establish connection with the first device.
304. And the third equipment receives the reconnection broadcast sent by the first equipment, wherein the reconnection broadcast comprises the identification of the equipment meeting the reconnection conditions.
Optionally, the backhaul broadcast further includes an identifier of the first device, a connection mode of the first device, and the like.
305. The third device establishes a connection with the first device if the backhaul broadcast includes an identification of the third device.
For example, the loopback broadcast includes three electric lamp identifiers, and three electric lamps corresponding to the three electric lamp identifiers establish a connection with the first device when the loopback broadcast is received.
In the embodiment of the application, the identifier of the third device meeting the reconnection conditions is determined by the first device sending the broadcast, and the identifier of the third device is carried in the reconnection broadcast, so that after the third device receives the reconnection broadcast, the third device can know whether the third device meets the reconnection conditions by only determining whether the reconnection broadcast comprises the identifier of the third device, the efficiency of determining whether the third device meets the reconnection conditions is improved, and the consumption of the performance of the third device is reduced.
Fig. 4 is a flowchart illustrating a method for connecting devices according to an exemplary embodiment of the present application, and referring to fig. 4, the method is performed interactively by a first device and a third device, in which method, a backhaul broadcast carries a backhaul condition, and a device receiving the backhaul broadcast determines whether to establish a connection with the first device based on the backhaul condition. The method comprises the following steps:
401. the method comprises the steps that under the condition that connection between first equipment and second equipment is abnormally disconnected, a reconnection condition is obtained, and the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment.
Please refer to step 201 above, and details of this step are not repeated here.
402. The first device sends a backhaul broadcast including a backhaul condition, and the backhaul broadcast is used to request a third device satisfying the backhaul condition to establish a connection with the first device.
Optionally, the backhaul broadcast further includes an identifier of the first device, a connection mode of the first device, and the like.
403. And the third equipment receives the back-connection broadcast sent by the first equipment.
404. And the third equipment establishes connection with the first equipment under the condition that the loop-back condition is met.
In one possible implementation, the loopback condition includes that the device establishing the loopback connection with the first device is connected with the first device, and the device is not currently connected with the first device. Correspondingly, the third device establishes connection with the first device under the condition that the loop-back condition is met, and the connection establishment method comprises the following steps: the third device obtains a connection record of the third device, wherein the connection record comprises an identifier of a historical device which is connected with the third device and a current connection state of the historical device and the third device, and the third device establishes connection with the first device when the third device determines that the connection record comprises the identifier of the first device and the first device is not connected with the third device currently. Therefore, the third equipment can quickly and accurately determine whether the third equipment meets the reconnection conditions or not by virtue of the connection records, and establishes connection with the first equipment under the condition that the reconnection conditions are met.
In a possible implementation manner, the reconnection condition further includes that the type of the device establishing the reconnection with the first device is a target type, and accordingly, the establishing of the connection with the first device by the third device if the reconnection condition is met includes: and the third equipment acquires the equipment type of the third equipment under the condition that the third equipment is determined to be connected with the first equipment and is not connected with the first equipment currently, and establishes connection with the first equipment under the condition that the equipment type belongs to the target type. The method can effectively improve the robustness of connection and reduce the occurrence of misconnection operation by limiting the types of the devices capable of being connected back.
In a possible implementation manner, the reconnection condition further includes that a disconnection time point corresponding to the device establishing reconnection with the first device is within a target time period, and accordingly, the establishing of the connection with the first device by the third device if the reconnection condition is met includes: and the third equipment establishes connection with the first equipment within the target time period after determining that the disconnection time point of the third equipment and the first equipment is within the target time period. The method can eliminate the devices which are not allowed to be connected back in the time dimension by limiting the devices for connecting back from the time dimension, thereby reducing the performance consumption of the devices.
In another possible implementation manner, the reconnection condition further includes that a distance between the device establishing the reconnection with the first device and the first device is not greater than a target distance, and accordingly, the establishing of the connection with the first device by the third device under the condition that the reconnection condition is met includes: the third equipment determines the received signal strength of the back-connection broadcast under the condition that the third equipment is connected with the first equipment and is not connected with the first equipment currently; determining a distance between itself and the first device based on the received signal strength; and establishing connection with the first equipment under the condition that the distance is not greater than the target distance.
In another possible implementation manner, the loopback condition further includes a target orientation of the device in the first device, the device in the loopback connection with the first device, and accordingly, the third device establishes a connection with the first device if the loopback condition is met, including: the third equipment determines the position of the third equipment relative to the first equipment based on the received loop connection broadcast under the condition that the third equipment is determined to be connected with the first equipment and is not connected with the first equipment currently; in the case where the orientation coincides with the target orientation, a connection is established with the first device. Optionally, the third device determines its position relative to the first device by UWB (Ultra Wide Band) technology based on the received backhaul broadcast.
It should be noted that the above-mentioned various loop-back conditions can be combined in any manner, and for example, the loop-back conditions include: the device which establishes the loop connection with the first device is connected with the first device, the device is not connected with the first device currently, the type of the device is a target type, and the distance between the device and the first device is not more than the target distance. Correspondingly, the third device acquires the device type of the third device when the third device is determined to be connected with the first device and not connected with the first device currently, and determines the received signal strength of the back connection broadcast when the device type belongs to the target type; and determining the distance between the first device and the self based on the received signal strength, and establishing connection with the first device under the condition that the distance is not more than the target distance.
In the embodiment of the application, the first device sends the loop connection broadcast including the loop connection condition, and the device receiving the loop connection broadcast determines whether the device meets the loop connection condition based on the loop connection condition, so that the first device sending the loop connection broadcast does not need to determine the identifier of the device meeting the loop connection condition, and the consumption of the performance of the first device is reduced.
Fig. 5 shows a flowchart of a device connection method provided in an exemplary embodiment of the present application, and referring to fig. 5, the method is interactively performed by a first device and a third device, and the method describes a confirmation process for establishing a connection between the first device and the third device, and the method includes:
501. the method comprises the steps that under the condition that connection between first equipment and second equipment is abnormally disconnected, a reconnection condition is obtained, and the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment.
Please refer to step 201 above, and details of this step are not repeated here.
502. The first device displays the broadcast confirmation information and sends back the continuous broadcast in response to the confirmation operation of the broadcast confirmation information, or the first device sends back the continuous broadcast without displaying the broadcast confirmation information, and the continuous broadcast is used for requesting a third device meeting the continuous broadcast condition to establish connection with the first device.
Optionally, the first device displays a broadcast confirmation popup, where the popup includes a confirmation control, and the first device sends back a continuous broadcast in response to a trigger operation on the confirmation control.
In the embodiment of the application, the broadcast confirmation information is displayed, and the continuous broadcast is sent back only when the user confirms the broadcast confirmation information, so that the option of whether the user performs the continuous broadcast is given to the user, the process of establishing the continuous broadcast can be avoided when the user does not agree, the initiation of the current continuous broadcast process is ensured to meet the requirements of the user, the user experience is improved, and the user viscosity can be improved.
In the embodiment of the application, in consideration of the situation that under the condition that the connection between the devices is more, if the user needs to manually send the connection back each time, the operation burden of the user is increased, therefore, the first device directly sends the connection broadcast back under the condition that the broadcast confirmation information is not displayed, the user operation can be reduced, the user experience is improved, and the user viscosity is improved.
503. And the third equipment receives the reconnection broadcast sent by the first equipment, wherein the reconnection broadcast also comprises second indication information, and the second indication information indicates the third equipment to display reconnection confirmation information.
And the reconnection confirmation information is used for the third equipment to confirm the connection establishment with the first equipment.
504. And the third equipment displays the reconnection confirmation information under the condition that the third equipment meets the reconnection condition, and responds to the confirmation operation of the reconnection confirmation information to establish connection with the first equipment.
The loopback confirmation information is used for the third equipment to confirm the connection establishment with the first equipment. Optionally, the first device displays a loopback confirmation popup, where the popup 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, when the third device receives a loopback broadcast sent by multiple devices at the same time, the third device displays the identifiers of the multiple devices in the popup window, and a confirmation control corresponding to the identifier of each device, 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 loopback popup window.
Fig. 6 is a schematic diagram of a reconnect confirmation popup, and referring to fig. 6, the reconnect confirmation popup displays a device a, a confirmation control, and a cancellation control, where "reconnect" is displayed on the confirmation control, and a user triggers the confirmation control to establish a connection with the device a. The user triggers the cancel control to refuse to establish a connection with device a and close the pop-up window. It should be noted that, in addition to the device a, other device identifiers are also displayed in the popup, and the user may perform a sliding operation on the device identifier in the loopback confirmation popup, so that identifiers of other devices are completely displayed. After the identifiers of other devices are completely displayed, the reconnection control is triggered, and then the third device can be triggered to establish connection with the device.
In the embodiment of the application, the second indication information is carried in the reconnection broadcast to indicate the third device meeting the reconnection condition to display the reconnection confirmation information, and the connection is established with the first device only when the user confirms the reconnection confirmation information, so that the connection with the first device can be avoided being reestablished without the user agreement, the connection with the first device is ensured to be currently established according with the user requirement, and the user viscosity can be improved.
In one possible implementation, the reconnection broadcast includes not the second indication information but the first indication information indicating that the third device does not display the reconnection confirmation information. Accordingly, the third device does not display the reconnection confirmation information and establishes a connection with the first device in the case where the reconnection condition is satisfied.
In the embodiment of the application, in consideration of a scene that the connection between the devices is more, if the user needs to manually trigger the reconnection every time, the operation burden of the user is increased, and therefore, the first indication information is carried in the reconnection broadcast to indicate that the third device meeting the reconnection condition does not display the reconnection confirmation information, so that the third device can establish the connection with the first device without the user confirming the reconnection, the user operation can be reduced, and the user stickiness is improved.
It should be noted that the first device sends back the connectively broadcast without displaying the broadcast confirmation information, and the third device directly establishes a connection with the first device without displaying the connectively confirmation information when the connectively return condition is met, where this connection mode may be called silent connectively return, that is, the connectively return between the two devices is implemented in a mode without interface disturbance and without the need of the user to perform a trigger operation. In consideration of future Internet of everything interconnection stage, the types and the number of IOT (Internet of Things) devices connected by common devices will increase explosively, and the number of connected IOT devices can reach hundreds or thousands. Even if only a small part of the data needs the user to perform the loop back operation, the heavy operation burden is also caused to the user, and therefore, the disturbance to the user can be greatly reduced by adopting the silent loop back connection mode. Moreover, the execution of silent reconnection can effectively reduce the connection time consumption perceived by the user, and even under the condition that the user does not perceive, the reconnection is realized, so that the user viscosity can be improved.
Optionally, it can also be determined whether the device employs a silent loop or a loop that requires a user to perform an operation according to the type of the device. For example, a PC (Personal Computer) uses a callback requiring a user to perform an operation, for example, a broadcast confirmation message is displayed during the connection process, and a tablet PC uses a silent callback, which is not limited in the embodiment of the present application.
In a possible implementation manner, in consideration of the fact that there are a plurality of third devices satisfying the loop-back condition, each of the third devices displays loop-back confirmation information, in order to reduce interference to the user, the first device transmits a confirmation information cancellation broadcast for requesting other third devices except for the third device that establishes a connection with the first device to cancel displaying the loop-back confirmation information after establishing a connection with any of the third devices based on the loop-back broadcast. Correspondingly, after the other third devices display the reconnection acknowledgement information, the reconnection acknowledgement information is cancelled and displayed under the condition that the acknowledgement information cancellation broadcast sent by the first device is received, so that the reconnection acknowledgement information displayed by each third device can automatically disappear after the first device establishes connection with any third device, a user does not need to cancel the display manually, and the user viscosity is improved. With continued reference to fig. 6, in a case where the third device simultaneously receives the back connection broadcasts transmitted by the multiple devices, and the back connection broadcasts transmitted by the multiple devices all include the second indication information, the third device displays the identifications of the multiple devices in the popup window, and in a case where the confirmation information cancellation broadcast transmitted by any one of the multiple devices is received, the identifications of the devices are cancelled to be displayed in the popup window. The third device closes the popup window upon receiving the acknowledgment information cancellation broadcast transmitted by each of the plurality of devices.
Fig. 7 is a schematic interface diagram of a device in a connection process in a screen projection scene. Referring to fig. 7, the three interfaces in the upper row of fig. 7 are the interfaces of a first device, and the three interfaces in the lower row are the interfaces of a second device. When the second device and the first device have established connection and the picture of the second device is projected in the first device, the connection between the first device and the second device is abnormally disconnected, at the moment, the first device displays an interface 1 in fig. 7, the interface comprises broadcast confirmation information, namely 'reconnection', a user triggers a control to 'reconnection', the first device sends back a connection broadcast, and an interface 2 in fig. 7 is displayed. The second device receives the reconnection broadcast, and displays an interface 4 in fig. 7 when determining that the second device meets the reconnection conditions, wherein the interface comprises a reconnection confirmation popup, the reconnection confirmation popup comprises an identifier of the first device and a reconnection confirmation control, a connection is displayed in the reconnection confirmation control, the user triggers the reconnection confirmation control, the second device can establish a connection with the first device, and the interface 5 in fig. 7 is displayed. Under the condition that the second device is successfully connected with the first device, the second device displays the interface 6 in fig. 7, and continues to project the picture in the first device, so that the interface displayed by the first device, that is, the interface 3 in fig. 7, is the same as the interface displayed by the second device at this time. The connection process needs the user to perform the reconnection operation, and it should be noted that, with reference to fig. 7, in the silent reconnection process, when the first device displays the interface 1 in fig. 7, the user does not need to trigger the "reconnection" control, and the first device sends back the reconnection broadcast. Alternatively, no "reconnect" control is displayed in the interface. After the first device sends back the connection broadcast, interface 2 in fig. 7 is still displayed. Moreover, after receiving the backhaul broadcast, the second device does not display the interface 4 in fig. 7 and the interface 5 in fig. 7, and after the second device is successfully connected with the first device, the second device directly displays the interface 6 in fig. 7, and continues to project the screen in the first device, so that the interface displayed by the first device at this time, that is, the interface 3 in fig. 7 is the same as the interface displayed by the second device. Or, in the silent reconnection process, after the second device is successfully connected with the first device, the interface 6 is not displayed, and the picture is continuously projected in the first device. Additionally, in the event of loss of silence back, the user may trigger a "reconnect" control in the first device, triggering the first device to resend the connection broadcast. And, in case of receiving the loop back broadcast, the second device does not perform silence loop back, but displays the interface 4 in fig. 7, and establishes connection with the first device again when the user triggers the "connect" control.
Fig. 8 shows a flowchart of a device connection method provided in an exemplary embodiment of the present application, and referring to fig. 8, the method is interactively performed by a first device and a third device, and the method describes a procedure for the third device to establish a WLAN connection with the first device, and the method includes:
801. the method comprises the steps that under the condition that connection between first equipment and second equipment is abnormally disconnected, a reconnection condition is obtained, and the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment.
802. The first device sends back a reconnection broadcast based on the reconnection conditions, wherein the reconnection broadcast is used for requesting the devices meeting the reconnection conditions to establish connection with the first device.
803. And the third equipment receives the back-connection broadcast sent by the first equipment.
Please refer to the above method embodiments for the implementation of steps 801 through 803, which are not described herein again.
804. And the third equipment establishes BLE connection with the first equipment under the condition that the loop-back condition is met, and establishes WLAN connection with the first equipment based on the BLE connection.
Optionally, the third device establishes a BLE connection with the first device based on connection information carried in the backhaul broadcast when the backhaul condition is met, where the connection information includes any information used for the third device to establish a BLE connection with the first device, which is not limited in this embodiment of the present disclosure.
Optionally, after the BLE connection is established with the first device, the third device interacts with the first device based on the BLE connection to establish connection information for establishing the WLAN connection, and then establishes the WLAN connection based on the interacted connection information.
In the embodiment of the application, the operation of establishing the BLE connection is simple, and the power consumption of the terminal is low, so that after the BLE connection is established, the WLAN connection is established on the basis of the BLE connection, and the operation difficulty of establishing the WLAN connection can be reduced. It should be noted that, establishing the WLAN connection with the first device based on the BLE connection is only an exemplary illustration, and in other embodiments, a P2P connection, an NFC (Near Field Communication) connection, and the like can also be established with the first device based on the BLE connection, which is not limited in this application.
Because the number of the WLAN connections is not limited, that is, the first device can establish the WLAN connections with multiple devices at the same time, the third device establishes the WLAN connections with the first device when the backhaul condition is satisfied, and can successfully establish the connections with the first device without affecting the established WLAN connections between the third device and other devices, thereby avoiding the preemption of connection resources and effectively improving the connection stability.
Fig. 9 is a diagram of a wireless lan. Referring to fig. 9, the wireless local area network includes a wireless network access point, a router, and a plurality of electronic devices, any two of which are capable of establishing a WLAN connection therebetween through the router.
Optionally, in order to improve security of data interaction, data interacted between the first device and the third device is encrypted, and the encryption mode is not limited in the embodiment of the present application. Optionally, in order to improve a success rate of establishing the connection, in a process of establishing the connection, the first device and the third device may further be capable of mutually checking a version number of the connection service supported by the other device, and establish the connection when the versions of the connection service are consistent.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 10, a block diagram of a device connection apparatus according to an exemplary embodiment of the present application is shown. The device connecting apparatus is provided to a first device, and includes:
a condition obtaining module 1001, configured to obtain a reconnection condition when a connection between a first device and a second device is abnormally disconnected, where the reconnection condition is a condition that needs to be satisfied by a device that establishes reconnection with the first device;
the broadcast sending module 1002 is configured to send a backhaul broadcast back based on a backhaul condition, where the backhaul broadcast is used to request a third device meeting the backhaul condition to establish a connection with the first device.
In the embodiment of the application, when the connection between the first device and the second device is abnormally disconnected, the first device acquires a loop connection condition, and because the loop connection condition is a condition that needs to be met by a device that establishes a loop connection with the first device, the device that receives the loop connection broadcast can determine whether the device can establish the loop connection with the first device based on the loop connection condition to request the device that meets the loop connection condition to establish the connection with the first device, so that the device that receives the loop connection broadcast can determine whether the device can establish the loop connection with the first device based on the loop connection broadcast, and the device that performs the loop connection with the first device is limited by the loop connection condition instead of establishing the loop connection between the first device and the device that is currently disconnected, so that the connection between the devices is more flexible.
In one possible implementation, the broadcast sending module 1002 includes:
an identifier determining unit configured to determine an identifier of a third device that satisfies a reconnection condition;
a broadcast transmitting unit for transmitting back a backhaul broadcast including an identification of the third device.
In a possible implementation manner, the identifier determining unit is configured to obtain 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 satisfies the reconnection condition is queried from the connection record.
In a possible implementation manner, the identification determination unit is configured to determine the identification of the target number of third devices that satisfy the backhaul condition.
In one possible implementation, the broadcast sending module 1002 is configured to send a backhaul broadcast including a backhaul condition.
In a possible implementation manner, the condition obtaining module 1001 is configured to obtain a reconnection condition when the target instruction is not 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.
In a possible implementation manner, the broadcast sending module 1002 is configured to display broadcast confirmation information, and send back a continuous broadcast in response to a confirmation operation on the broadcast confirmation information; alternatively, the continuous broadcast is sent back without displaying the broadcast confirmation information.
In one possible implementation, the backhaul broadcast further includes second indication information;
the second indication information indicates the third device to display reconnection confirmation information, and the reconnection confirmation information is used for the third device to confirm that the third device establishes connection with the first device.
In a possible implementation manner, the number of the third devices is multiple, each third device is configured to display reconnection acknowledgement information when receiving a reconnection broadcast, where the reconnection acknowledgement information is used for the third device to confirm that the third device establishes a connection with the first device; the broadcast sending module 1002 is further configured to send an acknowledgement cancellation broadcast after establishing a connection with any third device based on the backhaul broadcast, where the acknowledgement cancellation broadcast is used to request that third devices other than the third device establishing a connection with the first device cancel displaying the backhaul acknowledgement.
In one possible implementation, the backhaul broadcast further includes first indication information;
the first indication information indicates that the third device does not display the reconnection confirmation information, and the reconnection confirmation information is used for the third device to confirm that the third device establishes connection with the first device.
In a possible implementation manner, the reconnection condition includes that the device establishing the reconnection with the first device is connected with the first device, and the device establishing the reconnection with the first device is not currently connected with the first device.
In one possible implementation, the tieback condition further comprises at least one of:
in at least one device which is connected with the first device and is not connected with the first device currently, a disconnection time point corresponding to the device which establishes the loop connection with the first device is closest to or farthest from the current time point, and the disconnection time point is the time point of disconnection between the device which establishes the loop connection with the first device and the first device;
the disconnection time point corresponding to the equipment which establishes the loop connection with the first equipment is in the target time period;
the type of the equipment which establishes the loop connection with the first equipment is a target type;
the distance between the equipment which establishes the loop connection with the first equipment and the first equipment is not more than the target distance;
a target position of a device in loop connection with the first device at the first device;
in one possible implementation, the backhaul broadcast is configured to request a third device satisfying a backhaul condition to establish a Bluetooth Low Energy (BLE) connection with the first device, and the apparatus further includes:
a connection establishing module for establishing a BLE connection with a third device based on a backhaul broadcast; establishing a wireless local area network, WLAN, connection with a third device based on the BLE connection.
Referring to fig. 11, a block diagram of a device connection apparatus according to an exemplary embodiment of the present application is shown. The device connecting apparatus is provided to a third device, and the device connecting apparatus includes:
the broadcast receiving module 111 is configured to receive a reconnection broadcast sent by a first device, where the reconnection broadcast is used to request a device that meets a reconnection condition to establish a connection with the first device, and the reconnection condition is a condition that needs to be met by the device that establishes a reconnection with the first device;
and a connection establishing module 112, configured to establish a connection with the first device if the third device satisfies the loop-back condition.
In this embodiment of the application, the third device receives a backhaul broadcast sent by the first device, and since the backhaul broadcast is used to request a device meeting a backhaul condition to establish a connection with the first device, the device that receives the backhaul broadcast can determine whether it can establish a backhaul connection with the first device based on the backhaul broadcast, so that a device that performs a backhaul connection with the first device is limited by the backhaul condition instead of being limited to establishing a backhaul connection between the first device and a device that is currently disconnected, and the connection between the devices is more flexible.
In a possible implementation, the backhaul broadcast includes an identifier of a device that satisfies the backhaul condition, and the connection establishing module 112 is configured to establish a connection with the first device if the backhaul broadcast includes an identifier of a third device; or,
the backhaul broadcast includes a backhaul condition.
In a possible implementation manner, the reconnection condition includes that the device establishing reconnection with the first device is connected with the first device, and the device establishing reconnection with the first device is not currently connected with the first device, and the connection establishing module 112 is configured to obtain a connection record of the third device, where the connection record includes an identifier of a history device establishing connection with the third device and a current connection state of the history device and the third device; and under the condition that the connection record comprises the identification of the first equipment and the first equipment is not connected with the third equipment currently, the connection is established with the first equipment.
In one possible implementation, the tieback condition further comprises at least one of:
in at least one device which is connected with the first device and is not connected with the first device currently, a disconnection time point corresponding to the device which establishes the loop connection with the first device is closest to or farthest from the current time point, and the disconnection time point is the time point of disconnection between the device which establishes the loop connection with the first device and the first device;
the disconnection time point corresponding to the equipment which establishes the loop connection with the first equipment is in the target time period;
the type of the equipment which establishes the loop connection with the first equipment is a target type;
the distance between the equipment which establishes the loop connection with the first equipment and the first equipment is not more than the target distance;
the device that establishes the loopback connection with the first device is at the target location of the first device.
In a possible implementation manner, the reconnection broadcast further includes second indication information, where the second indication information indicates that the third device displays the reconnection acknowledgement information; a connection establishment module 112, comprising:
an information display unit configured to display reconnection confirmation information in a case where the third device satisfies a reconnection condition;
and the connection establishing unit is used for responding to the confirmation operation of the reconnection confirmation information and establishing connection with the first equipment.
In a possible implementation manner, the information display unit is further configured to cancel displaying the loopback confirmation information in a case of receiving a confirmation information cancellation broadcast sent by the first device.
In a possible implementation manner, the reconnection broadcast further includes first indication information, where the first indication information indicates that the third device does not display reconnection confirmation information, and the reconnection confirmation information is used for the third device to confirm that the third device establishes a connection with the first device;
and a connection establishing module 112, configured to, in a case where the third device satisfies the reconnection condition, not display the reconnection confirmation information, and establish a connection with the first device.
In one possible implementation, the backhaul broadcast is configured to request a device meeting a backhaul condition to establish a BLE connection with the first device, and the connection establishing module 112 is configured to establish a BLE connection with the first device if a third device meets the backhaul condition; a WLAN connection is established with the first device based on the BLE connection.
It should be noted that, in the apparatus provided in the foregoing embodiment, when the functions of the apparatus are implemented, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the electronic device may be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The embodiment of the application provides an electronic device, which comprises a processor and a memory; the memory stores at least one program code for execution by the processor to implement the device connecting method as provided by the various method embodiments described above.
In some embodiments, the electronic device is a terminal, please refer to fig. 12, which shows a block diagram of a terminal according to an exemplary embodiment of the present application. In some embodiments, the terminal 1200 is a smartphone, tablet, wearable device, or the like capable of accessing 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, memory 1220, and at least two wireless links 1230.
In some embodiments, processor 1210 includes one or more processing cores. The processor 1210 connects various parts within the entire terminal 1200 using various interfaces and lines, performs various functions of the terminal 1200 and processes data by running or executing program codes stored in the memory 1220 and calling data stored in the memory 1220. In some embodiments, processor 1210 is implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1210 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Neural-Network Processing Unit (NPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the NPU is used for realizing an Artificial Intelligence (AI) function; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1210, but may be implemented by a single chip.
In some embodiments, the processor 1210 is configured to control the operation of at least two Wireless links 1230, and accordingly, the processor 1210 is a processor integrated with a Wireless Fidelity (Wi-Fi) chip. Wherein, the Wi-Fi chip is a chip with double Wi-Fi processing capacity. For example, the Wi-Fi chip is a Dual Band Dual Current (DBDC) chip, a Dual Band Simultaneous (DBS) chip, or the like.
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 medium. The memory 1220 may be used for storing program codes. The memory 1220 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data (such as audio data, a phonebook) created according to the use of the terminal 1200, and the like.
In some embodiments, memory 1220 has stored therein different reception schemes for receiving beacon frames for wireless link 1230. As well as the identity of the access node to which the different wireless links 1230 are connected, the identity of the wireless links 1230, etc.
The at least two wireless links 1230 are used to connect different Access Points (APs). And receiving downlink data issued by the AP. Wherein, the different access nodes are the access nodes in the same router or the access nodes in different routers.
In some embodiments, a display screen is also included in terminal 1200. A 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, and a user can perform a touch operation on the display screen by using any suitable object such as a finger, a touch pen, and the like. In some embodiments, the display screen is typically disposed on a front panel of terminal 1200. In some embodiments, the display screen is designed as a full-face screen, curved screen, contoured screen, double-face screen, or folded screen. In some embodiments, the display screen is further designed to be a combination of a full-face screen and a curved-face screen, a combination of a special-shaped screen and a curved-face screen, and the like, which is not limited by the embodiment.
In addition, those skilled in the art will appreciate that the configuration of terminal 1200 illustrated in the above-described figures is not meant to be limiting with respect to terminal 1200, as terminal 1200 may include more or less components than those shown, or some components may be combined, or a different arrangement of components. For example, the terminal 1200 further includes a microphone, a speaker, an input unit, a sensor, an audio circuit, a module, a power supply, a bluetooth module, and other components, which are not described herein again.
The present application also provides a computer-readable storage medium storing at least one program code, which is loaded and executed by the processor to implement the device connecting method as shown in the above embodiments.
The present application also provides a chip comprising programmable logic circuits and/or program instructions for implementing the device connection method as shown in the various embodiments above when the chip is run on an electronic device.
The present application also provides a computer program product having at least one program code stored therein for execution by a processor to implement the device connecting method as shown in the various embodiments above.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps in the method for connecting devices according to the above embodiments may be implemented by hardware, or may be implemented by a program instructing associated hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like. The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (23)

1. A device connection method, performed by a first device, the method comprising:
under the condition that the connection between the first equipment and the second equipment is abnormally disconnected, obtaining a reconnection condition, wherein the reconnection condition is a condition required to be met by the equipment which establishes reconnection with the first equipment;
and sending back a loopback broadcast based on the loopback condition, wherein the loopback broadcast is used for requesting a third device meeting the loopback condition to establish connection with the first device.
2. The method of claim 1, wherein sending back a backhaul broadcast based on the backhaul condition comprises:
determining an identity of the third device that satisfies the tieback condition;
sending the loopback broadcast, the loopback broadcast including an identification of the third device.
3. The method of claim 2, wherein the determining the identity of the third device that satisfies the loopback condition comprises:
acquiring a connection record of the first device, wherein the connection record comprises an identifier of historical equipment which has established connection with the first device;
querying the connection record for an identification of the third device that satisfies the tieback condition.
4. The method of claim 1, wherein sending back a backhaul broadcast based on the backhaul condition comprises:
transmitting the backhaul broadcast including the backhaul condition.
5. The method according to claim 1, wherein in case of abnormal disconnection between the first device and the second device, acquiring a reconnection condition comprises:
under the condition that a target instruction is not received and the connection between the first equipment and the second equipment is disconnected, acquiring the loop-back condition;
wherein the target instruction indicates to disconnect the connection between the first device and the second device.
6. The method of claim 1, wherein sending back a backhaul broadcast based on the backhaul condition comprises:
displaying broadcast confirmation information, and responding to confirmation operation of the broadcast confirmation information to send the loop back broadcast; or,
transmitting the back-connected broadcast without displaying the broadcast confirmation information.
7. The method according to claim 1, wherein the number of the third devices is plural, and each of the third devices is configured to display a reconnection confirmation message for the third device to confirm establishment of connection with the first device, in a case where the reconnection broadcast is received; after the sending back of the concatenated broadcast based on the concatenated condition, the method further comprises:
after connection is established with any one of the third devices based on the loopback broadcast, sending a confirmation information cancellation broadcast for requesting other third devices except the third device establishing connection with the first device to cancel displaying the loopback confirmation information.
8. The method of claim 1, wherein the backhaul broadcast further comprises first indication information;
the first indication information indicates that the third device does not display reconnection confirmation information, and the reconnection confirmation information is used for the third device to confirm that the third device establishes connection with the first device.
9. The method of any of claims 1-8, wherein the loopback condition comprises a device that established a loopback connection with the first device being connected to the first device, and a device that established a loopback connection with the first device being not currently connected to the first device.
10. The method of claim 9, wherein the tieback condition further comprises at least one of:
in at least one device which is connected with the first device and is not connected with the first device currently, a disconnection time point corresponding to a device which establishes a loop connection with the first device is closest to or farthest from the current time point, and the disconnection time point is a time point of disconnection between the device which establishes the loop connection with the first device and the first device;
the disconnection time point corresponding to the equipment which establishes the loop connection with the first equipment is in a target time period;
the type of the equipment which establishes the loop connection with the first equipment is a target type;
the distance between the equipment which establishes the loop connection with the first equipment and the first equipment is not more than the target distance;
the device that establishes the loopback connection with the first device is at the target location of the first device.
11. The method according to any one of claims 1-8, wherein the loopback broadcast is used to request a third device satisfying the loopback condition to establish a Bluetooth Low Energy (BLE) connection with the first device, the method further comprising:
establishing the BLE connection with the third device based on the backhaul broadcast;
establishing a wireless local area network, WLAN, connection with the third device based on the BLE connection.
12. A device connection method, performed by a third device, the method comprising:
receiving a reconnection broadcast sent by first equipment, wherein the reconnection broadcast is used for requesting the equipment meeting the reconnection conditions to establish connection with the first equipment, and the reconnection conditions are conditions required to be met by the equipment establishing reconnection with the first equipment;
establishing a connection with the first device if the third device satisfies the loopback condition.
13. The method of claim 12,
the loopback broadcast includes an identification of a device satisfying the loopback condition, establishing a connection with the first device if the third device satisfies the loopback condition, including: establishing a connection with the first device if the backhaul broadcast includes an identification of the third device; or,
the loopback broadcast includes the loopback condition.
14. The method of claim 12, wherein the loopback condition comprises that a device in loopback connection with the first device is connected with the first device, and the device in loopback connection with the first device is not currently connected with the first device, and wherein establishing a connection with the first device if the third device satisfies the loopback condition comprises:
acquiring a connection record of the third device, wherein the connection record comprises an identifier of a historical device which is connected with the third device and a current connection state of the historical device and the third device;
and establishing connection with the first equipment under the condition that the connection record comprises the identification of the first equipment and the third equipment are not connected currently.
15. The method of claim 14, wherein the tieback condition further comprises at least one of:
in at least one device which is connected with the first device and is not connected with the first device currently, a disconnection time point corresponding to a device which establishes a loop connection with the first device is closest to or farthest from the current time point, and the disconnection time point is a time point of disconnection between the device which establishes the loop connection with the first device and the first device;
the disconnection time point corresponding to the equipment which establishes the loop connection with the first equipment is in a target time period;
the type of the equipment which establishes the loop connection with the first equipment is a target type;
the distance between the equipment which establishes the loop connection with the first equipment and the first equipment is not more than the target distance;
the device that establishes the loopback connection with the first device is at the target location of the first device.
16. The method of claim 12, wherein the loopback broadcast comprises second indication information instructing the third device to display a loopback confirmation information;
the establishing a connection with the first device if the third device satisfies the loopback condition includes:
displaying the reconnection confirmation information in a case where the third device satisfies the reconnection condition;
and responding to the confirmation operation of the loopback confirmation information, and establishing connection with the first equipment.
17. The method of claim 12, wherein the backhaul broadcast comprises first indication information indicating that the third device does not display backhaul confirmation information for the third device to confirm establishment of the connection with the first device;
the establishing a connection with the first device if the third device satisfies the loopback condition includes:
in a case where the third device satisfies the reconnection condition, the reconnection confirmation information is not displayed, and a connection is established with the first device.
18. The method according to any one of claims 12-17, wherein the backhaul broadcast is configured to request a device satisfying the backhaul condition to establish a BLE connection with the first device, and wherein establishing a connection with the first device if the third device satisfies the backhaul condition comprises:
establishing the BLE connection with the first device if the third device satisfies the loopback condition;
establishing a WLAN connection with the first device based on the BLE connection.
19. An apparatus for connecting devices, the apparatus being configured for a first device, the apparatus comprising:
the condition acquisition module is used for acquiring a reconnection condition under the condition that the connection between the first equipment and the second equipment is abnormally disconnected, wherein the reconnection condition is a condition which needs to be met by equipment which establishes reconnection with the first equipment;
and the broadcast sending module is used for sending back a reconnection broadcast based on the reconnection condition, wherein the reconnection broadcast is used for requesting a third device meeting the reconnection condition to establish connection with the first device.
20. An apparatus for connecting devices, the apparatus being configured for a third device, the apparatus comprising:
the broadcast receiving module is used for receiving a reconnection broadcast sent by first equipment, wherein the reconnection broadcast is used for requesting equipment meeting reconnection conditions to establish connection with the first equipment, and the reconnection conditions are conditions required to be met by the equipment establishing reconnection with the first equipment;
a connection establishing module, configured to establish a connection with the first device when the third device satisfies the loopback condition.
21. An electronic device, comprising a processor and a memory; the memory stores at least one program code for execution by the processor to implement the device connecting method of any of claims 1 to 18.
22. A computer-readable storage medium, characterized in that the storage medium stores at least one program code for execution by a processor to implement the device connecting method according to any one of claims 1 to 18.
23. A chip comprising programmable logic circuits and/or program instructions for implementing a device connection method as claimed in any one of claims 1 to 18 when the chip is run on an electronic device.
CN202210132139.6A 2022-02-14 2022-02-14 Device connection method, device and storage medium Pending CN114390500A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210132139.6A CN114390500A (en) 2022-02-14 2022-02-14 Device connection method, device and storage medium
PCT/CN2022/144138 WO2023151423A1 (en) 2022-02-14 2022-12-30 Device connection method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210132139.6A CN114390500A (en) 2022-02-14 2022-02-14 Device connection method, device and storage medium

Publications (1)

Publication Number Publication Date
CN114390500A true CN114390500A (en) 2022-04-22

Family

ID=81206331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210132139.6A Pending CN114390500A (en) 2022-02-14 2022-02-14 Device connection method, device and storage medium

Country Status (2)

Country Link
CN (1) CN114390500A (en)
WO (1) WO2023151423A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151423A1 (en) * 2022-02-14 2023-08-17 Oppo广东移动通信有限公司 Device connection method and apparatus, device, and storage medium

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105636004A (en) * 2015-12-25 2016-06-01 惠州Tcl移动通信有限公司 Bluetooth automatic reconnection method and system based on low power consumption Bluetooth
CN107770758A (en) * 2017-09-21 2018-03-06 深圳市汉普电子技术开发有限公司 The bluetooth of Baffle Box of Bluetooth returns even method, Baffle Box of Bluetooth and storage medium
US20180220482A1 (en) * 2015-04-01 2018-08-02 Huawei Technologies Co., Ltd. Data Transmission Method, Device, and System
CN108419226A (en) * 2012-09-27 2018-08-17 华为终端(东莞)有限公司 A kind of method and bluetooth equipment connected between bluetooth equipment
CN109379730A (en) * 2018-10-11 2019-02-22 国网四川省电力公司电力科学研究院 A kind of blue-teeth data exchange method and bluetooth equipment
CN109451474A (en) * 2018-10-15 2019-03-08 四川长虹电器股份有限公司 Controlled terminal equipment and its bluetooth return even method
US20200084606A1 (en) * 2017-05-18 2020-03-12 Opple Lighting Co., Ltd. Method, apparatus and system of configuring wireless network node
CN110944313A (en) * 2019-12-04 2020-03-31 惠州Tcl移动通信有限公司 Bluetooth connection method, device, storage medium and terminal
CN111436039A (en) * 2019-10-23 2020-07-21 珠海市杰理科技股份有限公司 Bluetooth reconnection method and system, Bluetooth master and slave device reconnection method and Bluetooth master and slave devices
CN112469010A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Bluetooth connection method and related device
US20210176810A1 (en) * 2017-12-04 2021-06-10 Samsung Electronics Co., Ltd. Method and device for reconnecting bluetooth communication
CN113395687A (en) * 2021-05-19 2021-09-14 深圳Tcl新技术有限公司 Reconnection method, reconnection device, electronic equipment and storage medium
CN113453381A (en) * 2021-07-08 2021-09-28 Oppo广东移动通信有限公司 Device pairing method and related product
CN113490192A (en) * 2021-07-26 2021-10-08 深圳市元征未来汽车技术有限公司 Bluetooth connection method, device, terminal equipment and readable storage medium
CN113570841A (en) * 2021-06-07 2021-10-29 宁波奥克斯电气股份有限公司 Bluetooth pairing control method and device, Bluetooth remote controller and household appliance
CN113810890A (en) * 2021-09-16 2021-12-17 Oppo广东移动通信有限公司 Device loop-back method, device, electronic device and storage medium
CN113891297A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015061308A (en) * 2013-09-20 2015-03-30 株式会社東芝 Communication device and control method
CN110191442B (en) * 2019-04-18 2021-05-11 华为技术有限公司 Bluetooth connection method, equipment and system
CN114390500A (en) * 2022-02-14 2022-04-22 Oppo广东移动通信有限公司 Device connection method, device and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108419226A (en) * 2012-09-27 2018-08-17 华为终端(东莞)有限公司 A kind of method and bluetooth equipment connected between bluetooth equipment
US20180220482A1 (en) * 2015-04-01 2018-08-02 Huawei Technologies Co., Ltd. Data Transmission Method, Device, and System
CN105636004A (en) * 2015-12-25 2016-06-01 惠州Tcl移动通信有限公司 Bluetooth automatic reconnection method and system based on low power consumption Bluetooth
US20200084606A1 (en) * 2017-05-18 2020-03-12 Opple Lighting Co., Ltd. Method, apparatus and system of configuring wireless network node
CN107770758A (en) * 2017-09-21 2018-03-06 深圳市汉普电子技术开发有限公司 The bluetooth of Baffle Box of Bluetooth returns even method, Baffle Box of Bluetooth and storage medium
US20210176810A1 (en) * 2017-12-04 2021-06-10 Samsung Electronics Co., Ltd. Method and device for reconnecting bluetooth communication
CN109379730A (en) * 2018-10-11 2019-02-22 国网四川省电力公司电力科学研究院 A kind of blue-teeth data exchange method and bluetooth equipment
CN109451474A (en) * 2018-10-15 2019-03-08 四川长虹电器股份有限公司 Controlled terminal equipment and its bluetooth return even method
CN112469010A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Bluetooth connection method and related device
CN111436039A (en) * 2019-10-23 2020-07-21 珠海市杰理科技股份有限公司 Bluetooth reconnection method and system, Bluetooth master and slave device reconnection method and Bluetooth master and slave devices
CN110944313A (en) * 2019-12-04 2020-03-31 惠州Tcl移动通信有限公司 Bluetooth connection method, device, storage medium and terminal
CN113395687A (en) * 2021-05-19 2021-09-14 深圳Tcl新技术有限公司 Reconnection method, reconnection device, electronic equipment and storage medium
CN113891297A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment
CN113570841A (en) * 2021-06-07 2021-10-29 宁波奥克斯电气股份有限公司 Bluetooth pairing control method and device, Bluetooth remote controller and household appliance
CN113453381A (en) * 2021-07-08 2021-09-28 Oppo广东移动通信有限公司 Device pairing method and related product
CN113490192A (en) * 2021-07-26 2021-10-08 深圳市元征未来汽车技术有限公司 Bluetooth connection method, device, terminal equipment and readable storage medium
CN113810890A (en) * 2021-09-16 2021-12-17 Oppo广东移动通信有限公司 Device loop-back method, device, electronic device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151423A1 (en) * 2022-02-14 2023-08-17 Oppo广东移动通信有限公司 Device connection method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
WO2023151423A1 (en) 2023-08-17

Similar Documents

Publication Publication Date Title
CN108323246B (en) Networking method, chip and wireless network system
JP4751867B2 (en) Equipment for centralized control of mesh networks
WO2020134720A1 (en) Data transmission control method and related product
WO2020164349A1 (en) Data transmission control method and related product
US11284452B2 (en) Establishing a short-range communication pathway
CN113316131B (en) Connection establishment method, device, electronic equipment and storage medium
CN104539324B (en) Bluetooth low-power-consumption networking interconnecting method and system
KR20220061199A (en) How to enable transport configuration status, devices and storage media
CN113765930B (en) Multi-party call control method, client and server
KR20190047598A (en) Method and device of transmitting data
CN113810887B (en) Bluetooth protocol connection method and device, storage medium and related equipment
WO2020164522A1 (en) Data transmission control method and related product
WO2013166762A1 (en) Networking method and system for personal area network devices
WO2023151423A1 (en) Device connection method and apparatus, device, and storage medium
US20240137745A1 (en) Communication method, communication apparatus, and non-transitory computer-readable storage medium
CN113330757A (en) Data transmission method and related device
CN105828253A (en) Wireless connection control method and device in audio playing system
TW201735711A (en) D2D based communication method and terminal
CN111279778A (en) Communication processing method, device and computer storage medium
CN113519176B (en) Communication method, communication device and terminal
CN115515254A (en) Point-to-point connection establishing method and device, storage medium and electronic equipment
JP7389122B2 (en) Port configuration method and device
CN116489818A (en) Device connection method, device connection apparatus, device storage medium and chip
JP2022553529A (en) Apparatus, method and computer program for operating network devices
US10349456B2 (en) Video communication system, video transmission terminal, video reception terminal, communication method, and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Lin Xiqi

Inventor after: Zeng Puwen

Inventor before: Zeng Puwen

Inventor before: Lin Xiqi

CB03 Change of inventor or designer information