CN112866101A - Equipment networking method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN112866101A
CN112866101A CN202110019297.6A CN202110019297A CN112866101A CN 112866101 A CN112866101 A CN 112866101A CN 202110019297 A CN202110019297 A CN 202110019297A CN 112866101 A CN112866101 A CN 112866101A
Authority
CN
China
Prior art keywords
connection
router
equipment
signal strength
establishing
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
CN202110019297.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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202110019297.6A priority Critical patent/CN112866101A/en
Publication of CN112866101A publication Critical patent/CN112866101A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results

Landscapes

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

Abstract

The application provides a device networking method and device, an electronic device and a storage medium, wherein the method comprises the following steps: determining that the connection between the first device and the router is abnormal; selecting a second device from at least one device connected to the router, wherein the signal strength of the second device is greater than or equal to a first strength threshold; and establishing connection between the first device and the second device, wherein the first device is networked through the connection with the second device. Through the method and the device, the problem that effective data transmission cannot be guaranteed due to the fact that abnormity easily occurs in a device networking mode in the related technology is solved.

Description

Equipment networking method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications, and in particular, to a device networking method and apparatus, an electronic device, and a storage medium.
Background
At present, a home can use a router as a network access to implement data transmission and downloading. However, when the number of devices connected to the home router is too large or the sub-devices are far from the router, the sub-devices cannot be connected to the router or the connection is unstable, and effective transmission of data cannot be guaranteed.
Therefore, the device networking method in the related art has a problem that effective data transmission cannot be guaranteed due to easy occurrence of connection abnormality.
Disclosure of Invention
The application provides a device networking method and device, electronic equipment and a storage medium, which are used for at least solving the problem that effective data transmission cannot be guaranteed due to easy occurrence of abnormity in a device networking mode in the related technology.
According to an aspect of an embodiment of the present application, there is provided a device networking method, including: determining that the connection between the first device and the router is abnormal; selecting a second device from at least one device connected to the router, wherein a signal strength of the second device is greater than or equal to a first strength threshold; and establishing a connection between the first device and the second device, wherein the first device is networked through the connection with the second device.
Optionally, the determining that the network connection between the first device and the router is abnormal includes at least one of: determining that the network connection between the first device and the router is abnormal when the signal intensity of the router is detected to be smaller than or equal to a second intensity threshold; determining that the network connection between the first device and the router is abnormal in the case that the network connection between the first device and the router is unstable.
Optionally, the selecting the second device from the at least one device connected to the router comprises: respectively acquiring the signal strength of each device in the at least one device, wherein each device has opened a wireless access point; and selecting one device with the signal intensity greater than or equal to the first intensity threshold value from the at least one device according to the signal intensity of each device to obtain the second device.
Optionally, the respectively obtaining the signal strength of each of the at least one device includes: transmitting a target broadcast packet by the first device, wherein the target broadcast packet is used for acquiring the signal strength of a device receiving the target broadcast packet; receiving a data packet returned by each device of the at least one device, wherein the data packet returned by each device carries information used for indicating the signal strength of each device; and respectively determining the signal intensity of each device according to the data packet returned by each device.
Optionally, the establishing of the connection between the first device and the second device includes: sending a first connection request to the second device, wherein the first connection request is used for requesting to establish connection with the second device through a wireless access point of the second device so as to perform networking through the established connection; establishing a connection between the first device and the second device through a wireless access point of the second device upon receiving a first authorized connection response of the second device.
Optionally, after sending the first connection request to the second device, the method further includes: under the condition that a connection rejection response of the second device is received, selecting a third device from the at least one device, wherein the signal strength of the third device is greater than or equal to the first strength threshold; sending a second connection request to the third device, wherein the second connection request is used for requesting to establish connection with the third device through a wireless access point of the third device so as to perform networking through the established connection; establishing, by the wireless access point of the third device, a connection between the first device and the third device upon receiving a second authorized connection response of the third device.
Optionally, after establishing the connection between the first device and the second device, the method further comprises: and under the condition that the signal strength of the router is detected to be larger than or equal to a third strength threshold value, establishing connection between the first equipment and the router, wherein the first equipment is networked through the connection between the first equipment and the router.
According to another aspect of the embodiments of the present application, there is also provided an apparatus networking device, including: a first determining unit, configured to determine that a connection between the first device and the router is abnormal; the router comprises a first selecting unit, a second selecting unit and a control unit, wherein the first selecting unit is used for selecting a second device from at least one device connected to the router, and the signal intensity of the second device is greater than or equal to a first intensity threshold value; the first establishing unit is used for establishing connection between the first equipment and the second equipment, wherein the first equipment is networked through the connection with the second equipment.
Optionally, the first determination unit includes at least one of: the first determining module is used for determining that the network connection between the first device and the router is abnormal when the signal strength of the router is detected to be smaller than or equal to a second strength threshold value; and the second determining module is used for determining that the network connection between the first equipment and the router is abnormal under the condition that the network connection between the first equipment and the router is unstable.
Optionally, the first selecting unit includes: an obtaining module, configured to obtain a signal strength of each device of the at least one device, where each device has opened a wireless access point; and the selecting module is used for selecting one device with the signal strength larger than or equal to the first strength threshold value from the at least one device according to the signal strength of each device to obtain the second device.
Optionally, the obtaining module includes: a sending submodule, configured to send a target broadcast packet through the first device, where the target broadcast packet is used to obtain a signal strength of a device that receives the target broadcast packet; a receiving submodule, configured to receive a data packet returned by each device of the at least one device, where the data packet returned by each device carries information used for indicating signal strength of each device; and the determining submodule is used for determining the signal strength of each device according to the data packet returned by each device.
Optionally, the first establishing unit includes: a sending module, configured to send a first connection request to the second device, where the first connection request is used to request that a connection be established with the second device through a wireless access point of the second device, so as to perform networking through the established connection; the establishing module is used for establishing the connection between the first equipment and the second equipment through a wireless access point of the second equipment under the condition of receiving a first authorized connection response of the second equipment.
Optionally, the apparatus further comprises: a second selecting unit, configured to select a third device from the at least one device when a connection rejection response of the second device is received after the first connection request is sent to the second device, where a signal strength of the third device is greater than or equal to the first strength threshold; a sending unit, configured to send a second connection request to the third device, where the second connection request is used to request that a connection be established with the third device through a wireless access point of the third device, so as to perform networking through the established connection; a second establishing unit, configured to establish, through the wireless access point of the third device, a connection between the first device and the third device in a case where a second authorized connection response of the third device is received.
Optionally, the apparatus further comprises: and a third establishing unit, configured to, after establishing the connection between the first device and the second device, establish the connection between the first device and the router when detecting that the signal strength of the router is greater than or equal to a third strength threshold, where the first device is networked through the connection with the router.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the application, the method comprises the steps that a mode of networking through other equipment is adopted, and the abnormality of the connection between first equipment and a router is determined; selecting a second device from at least one device connected to the router, wherein the signal strength of the second device is greater than or equal to a first strength threshold; establish the connection between first equipment and the second equipment, wherein, first equipment is networked through being connected between with the second equipment, because when taking place unusually with the connection of router, be connected to a better equipment of signal strength among the other equipment under the same router, in order to network as relaying through this equipment, thereby can realize improving the purpose of network stability, reached the technological effect of guaranteeing effective transmission of data, and then solved the equipment networking mode among the correlation technique and had the problem that can't guarantee effective transmission of data because the unusual easy emergence leads to.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of a hardware environment for an alternative method of device networking in accordance with embodiments of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating an alternative method for networking devices according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of another alternative device networking method according to an embodiment of the present application;
FIG. 4 is a block diagram of an alternative device networking apparatus according to an embodiment of the present application;
fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of an embodiment of the present application, a device networking method is provided. Alternatively, in the present embodiment, the device networking method described above may be applied to a hardware environment formed by the terminal 102, the router 104, and the server 106 as shown in fig. 1. As shown in fig. 1, a plurality of terminals 102 may be connected to a router 104 and to a server 106 via the router 104. The router 104 may be a home router, and the server 106 may be configured to provide services (e.g., game services, application services, etc.) for the terminal or a client installed on the terminal, and a database may be provided on the server or separately from the server for providing data storage services for the server 106.
Such networks may include, but are not limited to: a wired network, a wireless network, the wired network may include but is not limited to at least one of the following: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of: bluetooth, WIFI (Wireless Fidelity), mobile network, or other Wireless communication enabled network. The terminal device may be a terminal for calculating data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), an intelligent home device, a notebook computer, a PC, and the like. The server may include, but is not limited to, any hardware device capable of data services.
The device networking method of the embodiment of the present application may be executed by the terminal 102, the router 104, or both the terminal 102 and the router 104. The terminal 102 may also be a client installed thereon to perform the device networking method of the embodiment of the present application.
Taking the terminal 102 as an example to execute the device networking method in this embodiment, fig. 2 is a schematic flowchart of an optional device networking method according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:
step S202, determining that the connection between the first device and the router is abnormal.
The device networking method in this embodiment may be applied to a scenario where one or more sub-devices are hung down by one router, and the router may serve as an entrance of the hung-down sub-device networking to implement data transmission and downloading. The router can be a home router, and the suspended sub-devices can be smart phones, computers (notebook computers, desktop computers and the like), smart home devices or other devices.
For a router (e.g., a target router), the first device may be a child device that the router hangs down, and the first device may use the router as a gateway to the network to enable data transmission and downloading through the router. After connecting to the router, the first device may determine, in real time or periodically, a connection status with the router, and determine whether the connection with the server is normal. The judgment rules of normal connection and abnormal connection can be configured in advance, and according to the preset judgment rules, the first device can determine that the connection between the first device and the router is abnormal.
The determination rule may be set from a plurality of aspects, and may include, but is not limited to, at least one of the following: the number of the sub-devices hung below the router, the signal strength of the first device (the signal strength of the wireless signal of the router detected by the first device), the distance between the first device and the router, and the connection stability.
Step S204, selecting a second device from at least one device connected to the router, wherein the signal intensity of the second device is greater than or equal to the first intensity threshold.
If the connection between one sub-device hung under the router and the router is abnormal, the sub-device can be allowed to be connected to other sub-devices hung under the same router so as to perform networking communication through the sub-devices.
After determining that the connection with the router is abnormal, the first device may select a second device from at least one device connected to the router. At least one device may be all the drop sub-devices of the router, or may be some of the drop sub-devices. The selection conditions of the device may be: connected to the same route and the signal strength of the device is greater than or equal to a first strength threshold.
The first intensity threshold may be a preconfigured intensity threshold, and the corresponding selection rule may be: one device is selected from the devices whose signal strength is greater than or equal to the first strength threshold, and the selection mode may be random selection, or may be the selection mode with the highest signal strength, or may be another selection rule, which is not limited in this embodiment.
The first intensity threshold may also be an intensity threshold obtained according to a selection rule, for example, the selection rule of the device may be: the device with the best signal strength is selected, and the device with the highest signal strength in one or more devices connected with other devices, the number of which is less than or equal to a predetermined number threshold (e.g., 1, 2, etc.), or other selection rules are selected. The first strength threshold may be a signal strength value corresponding to the second device or a value less than or equal to the signal strength value corresponding to the second device. The first intensity threshold is not limited in this embodiment.
The second device may have at least two communication channels, wherein the first communication channel may be a communication channel with the router (e.g., a WIFI channel), the second communication channel may be a communication channel with other devices (e.g., a personal hotspot, bluetooth), and both the first communication channel and the second communication channel of the second device are in an open state. The two communication channels may be both wireless communication channels, and the used communication protocols may be the same or different, which is not limited in this embodiment.
Step S206, establishing a connection between the first device and the second device, wherein the first device is networked through the connection with the second device.
For the selected second device, the first device may interact with the second device, and establish a connection with the second device in a request-response manner. The communication protocol used for establishing the connection may be a communication protocol corresponding to the second communication channel, and the process of establishing the connection may be a process corresponding to the used communication protocol, which is not limited in this embodiment.
After establishing connection with the second device, the first device may use the second device as a relay node, and perform networking through the second device to implement data reporting. For example, the first device may first send data to be transmitted to the second device through the second communication channel, and the second device may perform certain processing on the received data, for example, decapsulating and repackaging the data (which is suitable for switching of the used communication protocol), and forward the data to the router through the first communication channel, and the router performs subsequent data transmission operations.
Determining that the connection between the first device and the router is abnormal through the steps S202 to S206; selecting a second device from at least one device connected to the router, wherein the signal strength of the second device is greater than or equal to a first strength threshold; the method comprises the steps of establishing connection between first equipment and second equipment, wherein the first equipment is connected with the second equipment for networking, the problem that effective transmission of data cannot be guaranteed due to the fact that abnormity easily occurs in an equipment networking mode in the related art is solved, and effective transmission of the data is guaranteed.
As an alternative embodiment, the determining that the network connection between the first device and the router is abnormal includes at least one of:
s11, determining that the network connection between the first device and the router is abnormal when the signal intensity of the router is detected to be less than or equal to the second intensity threshold;
s12, when the network connection between the first device and the router is unstable, it is determined that an abnormality has occurred in the network connection between the first device and the router.
In order to ensure the accuracy of the abnormality determination, the determination may be made by at least one of signal strength and signal stability.
As an alternative embodiment, the first device may detect the signal strength of the router in real time or periodically. If the signal strength of the wireless signal transmitted by the router, which is detected by the first device, is too weak, for example, smaller than or equal to the second strength threshold value, due to too long distance between the router and the sub-device or other reasons, it may be determined that the network connection between the first device and the router is abnormal.
Optionally, it may also be determined that the network connection between the first device and the router is abnormal when detecting that the distance between the first device and the router is greater than or equal to the target distance threshold. The distance between the first device and the router may be calculated according to the detected signal strength, or may be obtained by other means (for example, by detecting through a distance sensor), which is not limited in this embodiment.
As another alternative, the first device may detect the stability of the signal strength of the router in real time or periodically. If the signal of the router detected by the first device is unstable due to an excessive number of sub devices hung under the router or other reasons, for example, the signal strength fluctuates greatly within a predetermined length of time, it may be determined that the network connection between the first device and the router is abnormal.
Alternatively, it may also be determined that the network connection between the first device and the router is abnormal in the case that it is detected that the total number of devices connected to the router is greater than or equal to the target number threshold. The total number of the devices connected to the router may be sent to the first device by the router, or the total number of the devices connected to the router may be counted by other devices, and the counted number of the devices is sent to all the sub-devices hung down by the router, or the sub-devices meeting the sending condition, which is not limited in this embodiment.
Through the embodiment, the self-adaptive networking of the sub-equipment is triggered when the signal of the router is weak or the connection is unstable, so that the timeliness and the accuracy of the self-adaptive network distribution of the sub-equipment can be guaranteed.
As an alternative embodiment, selecting the second device from the at least one device connected to the router comprises:
s21, respectively obtaining the signal strength of each device in at least one device, wherein each device has opened a wireless access point;
and S22, selecting one device with the signal strength greater than or equal to the first strength threshold value from at least one device according to the signal strength of each device to obtain a second device.
The sub-devices hung below the router may include a device that supports connecting to the router and opening a hotspot (personal hotspot), where the personal hotspot may be an Access Point (AP for short). The at least one device may be a device that has opened a wireless access point among the sub-devices that the router hangs down.
The first device may acquire the signal strength of each of the at least one device, and select one device from the at least one device as the second device according to the signal strength of each device, where the signal strength of the selected second device is greater than or equal to the first strength threshold. The selection rule may be as described above, which is not limited in this embodiment.
According to the embodiment, the equipment to be connected is selected from the equipment for opening the wireless access point according to the signal strength, so that the success rate of equipment connection can be improved, and the equipment for connecting the router and opening the hot spot can be compatibly supported.
As an alternative embodiment, the separately obtaining the signal strength of each device of the at least one device includes:
s31, sending a target broadcast packet through the first device, wherein the target broadcast packet is used for acquiring the signal strength of the device receiving the target broadcast packet;
s32, respectively receiving a data packet returned by each device of the at least one device, where the data packet returned by each device carries information used for indicating the signal strength of each device;
and S33, respectively determining the signal strength of each device according to the data packet returned by each device.
Upon detecting an anomaly in connection with the router, the first device may send a target broadcast packet to the surrounding environment, the target broadcast packet being used to obtain the signal strength of the device that received the target broadcast packet. In addition, the target broadcast packet may carry an identifier of the router and indication information for indicating that the device needs to open the wireless access point, so that the device receiving the target broadcast packet can determine whether to return the data packet to the first device.
Alternatively, the first device may acquire device information of all devices connected to the router from the router side. When detecting that the connection with the router is abnormal, the first device may send a target multicast packet to all devices hung under the router, where the target multicast packet is used to obtain the signal strength of the device receiving the target multicast packet; or respectively sending a target request message for requesting to acquire the signal strength, wherein the target request message is used for requesting to acquire the signal strength.
The first device may respectively return a data packet from each device of the at least one device, where the returned data packet carries information indicating the signal strength of each device. The first device may receive a data packet returned by another device in addition to the at least one device, which is not limited in this embodiment.
The first device may extract, from the data packet returned by each device, indication information carried in the data packet and indicating the signal strength of each device, so as to determine the signal strength of each device.
For example, when the sub-device a (first device) detects that the signal of the connected router device is weak or detects that the self-networking is unstable, the sub-device a may actively send a signal strength acquisition broadcast packet (target broadcast packet) to the surrounding environment, and after receiving the data packet, the surrounding sub-device a returns a packet of data to the sub-device a. And after receiving the returned data packet, the sub-device A can obtain the signal intensity of other devices in the surrounding environment, and after comparison, the sub-device B with better signal intensity is selected to execute the connection process.
Through this embodiment, acquire the signal strength of sub equipment around through the mode of broadcast package, can improve the convenience that signal strength acquireed.
As an alternative embodiment, establishing the connection between the first device and the second device includes:
s41, sending a first connection request to a second device, wherein the first connection request is used for requesting to establish connection with the second device through a wireless access point of the second device so as to perform networking through the established connection;
s42, upon receiving the first authorized connection response of the second device, establishing a connection between the first device and the second device through the wireless access point of the second device.
To establish a connection with the second device, the first device may send a first connection request (establish connection request) to the second device to request establishment of a connection with the second device through the wireless access point of the second device for networking through the established connection.
After receiving the first connection request, the second device may display a prompt message on the second device, prompt the first device to request to establish a connection with the second device through the wireless access point, and also prompt the first device to perform networking through the established connection.
If it is determined that the first device is allowed to establish a connection with the second device through the wireless access point of the second device according to the authorization of the usage object of the second device or the configuration information, a first authorized connection response may be returned to the first device. After receiving the first authorized connection response of the second device, the first device may establish a connection between the first device and the second device through the wireless access point of the second device.
Optionally, the second device may also establish, after determining that the first device is allowed to establish a connection with the second device through the wireless access point of the second device, the connection between the first device and the second device directly through the wireless access point of the second device, and a manner of establishing the connection may be adjusted according to a used communication protocol, which is not limited in this embodiment.
For example, the sub-device a may send a connection establishment request to the sub-device B, the sub-device B confirms the authorization, the sub-device a establishes a connection with the sub-device B, and the sub-device a may implement data reporting by networking through the sub-device B.
By the embodiment, the connection between the first device and the second device is established in a request-authorization response mode, so that the reliability of connection establishment can be improved.
As an optional embodiment, after sending the first connection request to the second device, the method further includes:
s51, under the condition that a connection rejection response of the second device is received, selecting a third device from at least one device, wherein the signal intensity of the third device is greater than or equal to a first intensity threshold;
s52, sending a second connection request to a third device, where the second connection request is used to request to establish a connection with the third device through a wireless access point of the third device, so as to perform networking through the established connection;
s53, upon receiving the second authorized connection response of the third device, establishing a connection between the first device and the third device through the wireless access point of the third device.
If the second device rejects the connection, the first device may reselect one device from the at least one device to establish the connection, where the selected device range may be the other device except the second device, and the selection method and the connection establishment method of the device are similar to those described above, and are not described herein again.
Through the embodiment, if the selected equipment is reselected to establish connection when the selected equipment refuses the connection, effective transmission of equipment data can be ensured, and data transmission failure caused by networking incapability is avoided.
As an optional embodiment, after establishing the connection between the first device and the second device, the method further includes:
and S61, under the condition that the signal strength of the router is detected to be larger than or equal to the third strength threshold value, establishing connection between the first equipment and the router, wherein the first equipment is networked through the connection between the first equipment and the router.
After establishing the connection with the second device, the first device may continue to detect the signal strength of the router, and if the signal strength of the router is greater than or equal to the third strength threshold, the connection with the first device and the router may be re-established for networking through the connection with the router.
Optionally, the first device may further determine the number of devices connected to the router after determining that the signal strength of the router is greater than or equal to the third strength threshold, and establish the connection between the first device and the router if the number of devices connected to the router is less than or equal to the target number threshold. Alternatively, the first device may be triggered to establish a connection with the second device when other conditions are met. This is not limited in this embodiment.
Through the embodiment, when the signal strength of the router is greater than or equal to the strength threshold, the connection with the router is reestablished, so that the influence on data transmission caused by the closing of the wireless access point by other equipment or other reasons can be avoided, and the occupation of software and hardware resources of other equipment is reduced.
The device networking method in the embodiments of the present application is explained below with reference to an alternative example. In this example, the router is a home router.
In this optional example, a method for realizing data transmission by self-adaptive networking of smart home sub-devices is provided, which allows data transmission through networking of other sub-devices under the same router: when the number of the sub-devices hung below the home router is too large or the sub-devices are far away from the sub-devices, the sub-devices are allowed to automatically identify the signal intensity of the surrounding devices and are connected with other devices for networking communication, and the user experience is guaranteed.
As shown in fig. 3, the flow of the device networking method in this alternative example may include the following steps:
in step S302, the sub-device a detects that the router signal is weak or the connection is unstable.
When the number of the sub-devices hung under the home router is too large or the router is far away from the sub-devices, networking abnormity or networking instability may occur at the sub-devices. The child device a detects that the router signal is weak or the connection is unstable.
Step S304, the signal intensity of the surrounding neutron equipment is searched.
The sub-device a may search the surrounding environment through the signal strength acquisition broadcast packet, and acquire the signal strengths of other sub-devices in the surrounding environment.
Step S306, sending a connection establishment request to one of the devices B with better signal strength.
In step S308, device B confirms authorization.
Step S310, self-adaptive networking establishment.
Through this example, through discernment router signal strength, perhaps sub-equipment networking stability, hang under the router under the sub-equipment quantity too much, or apart from the sub-equipment under the far condition, sub-equipment self-adaptation peripheral network environment, self-adaptation networking connects other equipment and realizes the networking communication to guarantee the real-time communication of data, can guarantee networking unusual or networking unstable sub-equipment data communication's in the family reliability, ensured user experience.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods according to the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided an apparatus networking device for implementing the above apparatus networking method. Fig. 4 is a block diagram of an alternative device networking apparatus according to an embodiment of the present application, and as shown in fig. 4, the apparatus may include:
a first determining unit 402, configured to determine that an abnormality occurs in a connection between a first device and a router;
a first selecting unit 404, connected to the first determining unit 402, configured to select a second device from at least one device connected to the router, where a signal strength of the second device is greater than or equal to a first strength threshold;
a first establishing unit 406, connected to the first selecting unit 404, configured to establish a connection between a first device and a second device, where the first device performs networking through the connection with the second device.
It should be noted that the first determining unit 402 in this embodiment may be configured to execute the step S202, the first selecting unit 404 in this embodiment may be configured to execute the step S204, and the first establishing unit 406 in this embodiment may be configured to execute the step S206.
Determining that the connection between the first equipment and the router is abnormal through the module; selecting a second device from at least one device connected to the router, wherein the signal strength of the second device is greater than or equal to a first strength threshold; the method comprises the steps of establishing connection between first equipment and second equipment, wherein the first equipment is connected with the second equipment for networking, the problem that effective transmission of data cannot be guaranteed due to the fact that abnormity easily occurs in an equipment networking mode in the related art is solved, and effective transmission of the data is guaranteed.
As an alternative embodiment, the first determining unit 402 includes at least one of:
the first determining module is used for determining that the network connection between the first device and the router is abnormal when the signal intensity of the router is detected to be smaller than or equal to the second intensity threshold;
and the second determining module is used for determining that the network connection between the first equipment and the router is abnormal under the condition that the network connection between the first equipment and the router is unstable.
As an alternative embodiment, the first selecting unit 404 includes:
an obtaining module, configured to obtain a signal strength of each device of at least one device, where each device has opened a wireless access point;
and the selecting module is used for selecting one device with the signal intensity larger than or equal to the first intensity threshold value from at least one device according to the signal intensity of each device to obtain a second device.
As an alternative embodiment, the obtaining module includes:
the transmission submodule is used for transmitting a target broadcast packet through first equipment, wherein the target broadcast packet is used for acquiring the signal intensity of the equipment receiving the target broadcast packet;
the receiving submodule is used for respectively receiving a data packet returned by each device in at least one device, wherein the data packet returned by each device carries information used for indicating the signal intensity of each device;
and the determining submodule is used for determining the signal strength of each device according to the data packet returned by each device.
As an alternative embodiment, the first establishing unit 406 includes:
the device comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a first connection request to second equipment, and the first connection request is used for requesting to establish connection with the second equipment through a wireless access point of the second equipment so as to perform networking through the established connection;
the establishing module is used for establishing connection between the first equipment and the second equipment through a wireless access point of the second equipment under the condition of receiving the first authorized connection response of the second equipment.
As an alternative embodiment, the apparatus further comprises:
a second selecting unit, configured to select, after sending the first connection request to the second device, a third device from the at least one device when receiving a connection rejection response of the second device, where a signal strength of the third device is greater than or equal to a first strength threshold;
a sending unit, configured to send a second connection request to a third device, where the second connection request is used to request that a connection is established with the third device through a wireless access point of the third device, so as to perform networking through the established connection;
and a second establishing unit, configured to establish, by the wireless access point of the third device, a connection between the first device and the third device in a case where a second authorized connection response of the third device is received.
As an alternative embodiment, the apparatus further comprises:
and a third establishing unit, configured to, after establishing the connection between the first device and the second device, establish the connection between the first device and the router when detecting that the signal strength of the router is greater than or equal to a third strength threshold, where the first device performs networking through the connection with the router.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, which may be a terminal, a router, or a combination thereof, for implementing the above device networking method.
Fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 5, including a processor 502, a communication interface 504, a memory 506, and a communication bus 508, where the processor 502, the communication interface 504, and the memory 506 are communicated with each other via the communication bus 508, and where,
a memory 506 for storing a computer program;
the processor 502, when executing the computer program stored in the memory 506, implements the following steps:
s1, determining that the connection between the first device and the router is abnormal;
s2, selecting a second device from at least one device connected to the router, wherein the signal intensity of the second device is greater than or equal to the first intensity threshold;
and S3, establishing connection between the first device and the second device, wherein the first device is networked through the connection with the second device.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, the memory 506 may include, but is not limited to, the first determining unit 402, the first selecting unit 404 and the first establishing unit 406 in the device networking apparatus. In addition, other module units in the above device networking apparatus may also be included, but are not limited to these, and are not described in this example again.
Processor 502 may be a general purpose processor and may include, but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the device implementing the device networking method may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of an embodiment of the present application, there is also provided a storage medium. Optionally, in this embodiment, the storage medium may be configured to execute a program code of any one of the device networking methods in this embodiment of the present application.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
s1, determining that the connection between the first device and the router is abnormal;
s2, selecting a second device from at least one device connected to the router, wherein the signal intensity of the second device is greater than or equal to the first intensity threshold;
and S3, establishing connection between the first device and the second device, wherein the first device is networked through the connection with the second device.
Optionally, the specific example in this embodiment may refer to the example described in the above embodiment, which is not described again in this embodiment.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a ROM, a RAM, a removable hard disk, a magnetic disk, or an optical disk.
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.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, and may also be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for networking devices, comprising:
determining that the connection between the first device and the router is abnormal;
selecting a second device from at least one device connected to the router, wherein a signal strength of the second device is greater than or equal to a first strength threshold;
and establishing a connection between the first device and the second device, wherein the first device is networked through the connection with the second device.
2. The method of claim 1, wherein determining that the network connection between the first device and the router is anomalous comprises at least one of:
determining that the network connection between the first device and the router is abnormal when the signal intensity of the router is detected to be smaller than or equal to a second intensity threshold;
determining that the network connection between the first device and the router is abnormal in the case that the network connection between the first device and the router is unstable.
3. The method of claim 1, wherein selecting the second device from the at least one device connected to the router comprises:
respectively acquiring the signal strength of each device in the at least one device, wherein each device has opened a wireless access point;
and selecting one device with the signal intensity greater than or equal to the first intensity threshold value from the at least one device according to the signal intensity of each device to obtain the second device.
4. The method of claim 3, wherein separately obtaining the signal strength of the each of the at least one device comprises:
transmitting a target broadcast packet by the first device, wherein the target broadcast packet is used for acquiring the signal strength of a device receiving the target broadcast packet;
receiving a data packet returned by each device of the at least one device, wherein the data packet returned by each device carries information used for indicating the signal strength of each device;
and respectively determining the signal intensity of each device according to the data packet returned by each device.
5. The method of claim 1, wherein establishing the connection between the first device and the second device comprises:
sending a first connection request to the second device, wherein the first connection request is used for requesting to establish connection with the second device through a wireless access point of the second device so as to perform networking through the established connection;
establishing a connection between the first device and the second device through a wireless access point of the second device upon receiving a first authorized connection response of the second device.
6. The method of claim 5, wherein after sending the first connection request to the second device, the method further comprises:
under the condition that a connection rejection response of the second device is received, selecting a third device from the at least one device, wherein the signal strength of the third device is greater than or equal to the first strength threshold;
sending a second connection request to the third device, wherein the second connection request is used for requesting to establish connection with the third device through a wireless access point of the third device so as to perform networking through the established connection;
establishing, by the wireless access point of the third device, a connection between the first device and the third device upon receiving a second authorized connection response of the third device.
7. The method according to any one of claims 1 to 6, wherein after establishing the connection between the first device and the second device, the method further comprises:
and under the condition that the signal strength of the router is detected to be larger than or equal to a third strength threshold value, establishing connection between the first equipment and the router, wherein the first equipment is networked through the connection between the first equipment and the router.
8. An apparatus networking device, comprising:
a first determining unit, configured to determine that a connection between the first device and the router is abnormal;
a first selecting unit, configured to select a second device from at least one device connected to the router, where a signal strength of the second device is greater than or equal to a first strength threshold;
the first establishing unit is used for establishing connection between the first equipment and the second equipment, wherein the first equipment is networked through the connection with the second equipment.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor for performing the method steps of any one of claims 1 to 7 by running the computer program stored on the memory.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method steps of any one of claims 1 to 7 when executed.
CN202110019297.6A 2021-01-07 2021-01-07 Equipment networking method and device, electronic equipment and storage medium Pending CN112866101A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110019297.6A CN112866101A (en) 2021-01-07 2021-01-07 Equipment networking method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110019297.6A CN112866101A (en) 2021-01-07 2021-01-07 Equipment networking method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112866101A true CN112866101A (en) 2021-05-28

Family

ID=76004966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110019297.6A Pending CN112866101A (en) 2021-01-07 2021-01-07 Equipment networking method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112866101A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613269A (en) * 2021-07-14 2021-11-05 无锡宇宁智能科技有限公司 Method for improving wifi connectivity, mobile terminal and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160029189A1 (en) * 2014-07-23 2016-01-28 Jeffrey Michael System and Method for Uninterrupted Transfer of Calls Between Cellular and WiFi Networks
CN106131899A (en) * 2016-06-22 2016-11-16 广东欧珀移动通信有限公司 Networking control method and terminal unit
CN106304212A (en) * 2015-06-12 2017-01-04 联想(北京)有限公司 Information processing method and electronic equipment
CN108601057A (en) * 2018-03-07 2018-09-28 青岛海尔科技有限公司 Network data transmission method, equipment and system
CN110753331A (en) * 2019-10-18 2020-02-04 珠海格力电器股份有限公司 Data transmission method, system, storage medium and networking device
CN111315035A (en) * 2020-02-24 2020-06-19 华为技术有限公司 WiFi network connection method and device
CN111757275A (en) * 2020-06-05 2020-10-09 海尔优家智能科技(北京)有限公司 Device connection method and device, storage medium and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160029189A1 (en) * 2014-07-23 2016-01-28 Jeffrey Michael System and Method for Uninterrupted Transfer of Calls Between Cellular and WiFi Networks
CN106304212A (en) * 2015-06-12 2017-01-04 联想(北京)有限公司 Information processing method and electronic equipment
CN106131899A (en) * 2016-06-22 2016-11-16 广东欧珀移动通信有限公司 Networking control method and terminal unit
CN108601057A (en) * 2018-03-07 2018-09-28 青岛海尔科技有限公司 Network data transmission method, equipment and system
CN110753331A (en) * 2019-10-18 2020-02-04 珠海格力电器股份有限公司 Data transmission method, system, storage medium and networking device
CN111315035A (en) * 2020-02-24 2020-06-19 华为技术有限公司 WiFi network connection method and device
CN111757275A (en) * 2020-06-05 2020-10-09 海尔优家智能科技(北京)有限公司 Device connection method and device, storage medium and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113613269A (en) * 2021-07-14 2021-11-05 无锡宇宁智能科技有限公司 Method for improving wifi connectivity, mobile terminal and readable storage medium
CN113613269B (en) * 2021-07-14 2022-06-24 无锡宇宁智能科技有限公司 Method for improving wifi connectivity, mobile terminal and readable storage medium

Similar Documents

Publication Publication Date Title
US10171997B2 (en) Method and apparatus for interconnection between terminal device and gateway device
JP6726426B2 (en) Login-free method and device between terminals
CN110461020A (en) Relay selection method and device, storage medium, terminal for auxiliary link
US10506440B2 (en) Method and apparatus for detecting tethering in a communications network
US20190200287A1 (en) Method for Identifying Access Point and Hotspot and Terminal
CN111885680A (en) Method, system and core equipment for establishing network connection
CN110958593A (en) Bluetooth networking method, device, system and computer readable medium
CN105338529B (en) Wireless network connection method and system
CN106341270B (en) A kind of fault handling method and device
CN112969167A (en) Equipment network distribution method, device and system, electronic equipment and storage medium
CN112235811B (en) Method for networking multiple routers, router, electronic device and storage medium
CN111884875A (en) Offline device determination method and device
CN115022980B (en) Method and device for randomly accessing terminal to network
CN108322366A (en) Access the methods, devices and systems of network
CN113453292A (en) Method for establishing connection, communication device and system
CN112866101A (en) Equipment networking method and device, electronic equipment and storage medium
US20170127472A1 (en) Method and wireless device for controlling disconnection of a wireless device in a wi-fi direct group of a wireless network
US10264480B2 (en) Identifying volte to different technology types
CN109905901B (en) Network selection method and device and computer readable storage medium
CN111315026A (en) Channel selection method, device, gateway and computer readable storage medium
EP3641248A1 (en) Traffic optimization device, communication system, traffic optimization method, and program
CN105163335B (en) A kind of network access management method, server, mobile terminal and system
CN114710801A (en) Processing method, device, storage medium and equipment for evaluation parameters of network performance
CN111294856B (en) Shared flow terminal identification method, device, equipment and readable storage medium
CN112751706A (en) Target data transmission method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210528