CN115226078A - Network switching method and device, electronic equipment and medium - Google Patents

Network switching method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115226078A
CN115226078A CN202110418024.9A CN202110418024A CN115226078A CN 115226078 A CN115226078 A CN 115226078A CN 202110418024 A CN202110418024 A CN 202110418024A CN 115226078 A CN115226078 A CN 115226078A
Authority
CN
China
Prior art keywords
network
centralized
distributed network
configuration information
communication connection
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
CN202110418024.9A
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.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United 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 Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN202110418024.9A priority Critical patent/CN115226078A/en
Publication of CN115226078A publication Critical patent/CN115226078A/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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • H04W16/18Network planning tools
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

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

Abstract

The embodiment of the application provides a network switching method and device, electronic equipment and a medium, wherein the method comprises the following steps: the method comprises the steps that a first device establishes communication connection with at least one second device in the distributed network; the first device broadcasts preset centralized network configuration information in the distributed network based on the communication connection; the first device creates a centralized network, and all second devices in the distributed network switch to the centralized network according to the centralized network configuration information. Through broadcasting the preset centralized network configuration information in the distributed network, the equipment in the distributed network can be automatically switched to the centralized network from the distributed network according to the centralized network configuration information, manual operation of a user is not needed, operation is convenient and fast, and user experience is improved.

Description

Network switching method and device, electronic equipment and medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a network switching method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The distributed network and the centralized network are two different types of networks, and application scenarios are different. Compared with a centralized network, the distributed network has the defects of low safety coefficient, short control distance and the like. If there is an application scenario in which a user originally uses a distributed network control device and wants to switch to a centralized network control device, because one device is not allowed to exist in both a distributed network and a centralized network, the user needs to perform an offline operation on the existing device that has already joined the distributed network, that is, the device exits the original distributed network, and then perform an online operation on the device, that is, the device joins the newly created centralized network. The network switching process needs manual operation of a user and is complex to operate, and user experience is affected.
Disclosure of Invention
In order to solve the existing technical problems, the application provides a network switching method and device, an electronic device and a computer readable storage medium which do not need manual operation of a user.
In order to achieve the above purpose, the technical solution of the embodiment of the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a network handover method, which is applied to a first device, and the method includes:
establishing a communication connection with at least one second device in the distributed network;
broadcasting preset centralized network configuration information in the distributed network based on the communication connection;
and creating a centralized network, wherein all second devices in the distributed network are switched to the centralized network according to the centralized network configuration information.
In a second aspect, an embodiment of the present application provides a network handover method, which is applied to a second device, and the method includes:
establishing a communication connection with a first device in a distributed network;
acquiring preset centralized network configuration information broadcasted by the first equipment in the distributed network through the communication connection;
switching from the distributed network to a centralized network created by the first device according to the centralized network configuration information.
In a third aspect, an embodiment of the present application provides a network switching apparatus, which is applied to a first device, and the apparatus includes:
the first communication module is used for establishing communication connection with at least one second device in the distributed network;
the first communication module is used for establishing communication connection with at least one second device in the distributed network;
a broadcasting module, configured to broadcast preset centralized network configuration information in the distributed network based on the communication connection;
and the first processing module is used for creating a centralized network, and all the second devices in the distributed network are switched to the centralized network according to the centralized network configuration information.
In a fourth aspect, an embodiment of the present application provides a network switching apparatus, which is applied to a second device, and the apparatus includes:
the second communication module is used for establishing communication connection with the first equipment in the distributed network;
an obtaining module, configured to obtain preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection;
and the second processing module is used for switching from the distributed network to the centralized network created by the first equipment according to the centralized network configuration information.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable by the processor, and when the computer program is executed by the processor, the network switching method according to any embodiment of the present application applied to the first electronic device and the second electronic device is implemented.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the network handover method according to any embodiment of the present application is implemented.
In the network switching method and apparatus, the electronic device, and the medium provided in the embodiments of the present application, the first device establishes a communication connection with at least one second device in the distributed network, and broadcasts the preset centralized network configuration information in the distributed network based on the communication connection to create the centralized network, and all the second devices in the distributed network are switched to the centralized network according to the centralized network configuration information. In addition, the device does not need to execute a network connection process, so that the network switching speed is improved.
The computer-readable storage medium provided in the foregoing embodiment is used to implement the network handover method provided in the embodiment of the present application, and has the same technical effect as the network handover method, and for avoiding repetition, details are not described here again.
Drawings
FIG. 1 is a schematic diagram of an application environment suitable for use with embodiments of the present application;
fig. 2 is a flowchart of a network handover method according to an embodiment of the present application;
FIG. 3 is a flowchart of a network handover method according to another embodiment of the present application;
FIG. 4 is a diagram illustrating a network switching device according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a network switching device according to another embodiment of the present application;
fig. 6 is a flowchart of a network handover method according to an alternative example of the present application;
fig. 7 is a first schematic diagram illustrating a network handover state according to an alternative example of the present application;
fig. 8 is a diagram illustrating a network handover state according to an alternative example of the present application;
FIG. 9 is a flowchart of a network handover method according to another alternative example of the present application;
fig. 10 is a first schematic diagram of a network handover state in another alternative example of the present application;
fig. 11 is a second schematic diagram of a network handover state in another alternative example of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device in another embodiment of the present application.
Detailed Description
The technical solution of the present application is further described in detail with reference to the drawings and specific embodiments of the specification.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of implementations of the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In the description of the present application, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, are not to be construed as limiting the present application. In the description of the present application, "a plurality" means two or more unless otherwise specified.
In the description of the present application, it should be noted that, unless otherwise explicitly stated or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, a fixed connection, a detachable connection, or an integral connection; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Referring to fig. 1, fig. 1 is a schematic diagram of an application environment suitable for the embodiment of the present application. The network switching method provided by the embodiment of the application can be applied to an intelligent home system as shown in fig. 1, and the intelligent home system comprises a first device 1 and a second device 2.
Wherein the first device 1 may be used to join a distributed network and/or create a centralized network and the second device 2 may be used to join a distributed network and/or a centralized network. The first device 1 may be a gateway device, etc., and the second device 2 may be a Personal Computer ((Personal Computer, PC), mobile phone, tablet Computer, wearable electronic device, routing device, server, etc.), or may be a sleep device, where the sleep device wakes up when operating, turns on a wireless receiving and transmitting function when waking up, and turns off the wireless receiving and transmitting function when sleeping, and may join a distributed network or a centralized network, in the present embodiment, the routing device mainly refers to a device that starts a network forwarding and broadcasting function from a small network, such as a router device in a zigbee network, and is not limited in this embodiment, the first device 1 may join a distributed network or establish a communication connection with the second device 2 in the distributed network, so as to broadcast preset centralized network configuration information in the distributed network, so that the second device 2 in the distributed network acquires the centralized network configuration information, and then switches from the distributed network to the network based on the centralized network configuration information, where the centralized network architecture refers to centrally store the centralized network configuration information in the central server, and then may submit the centralized network configuration information to the central server for the same server to work safely, and then download the server; the distributed network architecture is that a Computer can be provided as a server with a version centralized storage function, but the server is only used for facilitating the modification of exchanging people, is not used as the server, is only inconvenient to exchange and modify, and each Computer has a separate development environment, the method does not need networking, runs locally directly, and has a much higher safety factor compared with a centralized method, for example, a zigbee3.0 network usually belongs to a distributed network.
The first device 1 and the second device 2 can communicate with each other in a wireless manner such as bluetooth, NFC, infrared, and the like. For example, data transmission between the first device 1 and the second device 2 may be performed in a bluetooth manner, or may be performed through NFC, which is not limited in this embodiment of the present application. It should be understood that the above application environment is only an exemplary description for facilitating understanding of the following embodiments, and does not set any limit to the application environment in which the embodiments of the present application can be actually implemented.
Referring to fig. 2, a network handover method provided in an embodiment of the present application can be applied to the first device shown in fig. 1, where the network handover method includes but is not limited to S101, S103, and S105, and is specifically introduced as follows:
s101, the first device establishes communication connection with at least one second device in the distributed network.
The first device is a device to create or open a centralized network, and may specifically be a gateway device or the like. The first device establishes a communication connection with at least one second device in the distributed network, where the first device establishes a communication connection with at least one second device in the distributed network without joining the distributed network, or the first device joins the distributed network to establish a communication connection with at least one second device in the distributed network. It can be understood that, when a first device joins a distributed network, the first device will automatically establish a communication connection with at least one second device in the distributed network, and at this time, the first device can directly perform information transmission with a plurality of second devices, and the information transmission speed is high. When the first device does not join the distributed network, the operation required for joining the distributed network does not need to be executed, and resources can be effectively saved.
S103, the first device broadcasts preset centralized network configuration information in the distributed network based on the communication connection.
The first device broadcasts preset centralized network configuration information in the distributed network based on the communication connection, and the following two ways may be adopted: firstly, under the condition that a first device joins a distributed network, preset centralized network configuration information is directly sent to at least one second device through communication connection established between the first device and the at least one second device in the distributed network, so that the centralized network configuration information is broadcasted in the distributed network, and the information transmission efficiency can be effectively improved; secondly, under the condition that the first device does not join the distributed network, sending preset centralized network configuration information to at least one second device in the distributed network through communication connection established between the first device and the second device, so that the second device broadcasts the centralized network configuration information in the distributed network, and the stability and the safety of information transmission can be effectively improved. Wherein the centralized network configuration information is used to indicate how to join the centralized network created by the first device.
S105, the first device creates a centralized network, and all the second devices in the distributed network are switched to the centralized network according to the centralized network configuration information.
The first device may create a centralized network actively, or may create a centralized network passively. If the first device actively creates the centralized network, the first device may switch to the coordinator after broadcasting the preset centralized network configuration information in the distributed network, and start to create the centralized network, that is, create the centralized network corresponding to the preset centralized network configuration information, and after all the second devices in the distributed network search the centralized network, add the second devices to the centralized network according to the centralized network configuration information, thereby implementing switching from the distributed network to the centralized network. Therefore, the creating efficiency of the centralized network can be effectively improved, and the convenience is high. If the first device passively creates the centralized network, after broadcasting preset centralized network configuration information in the distributed network, the first device may create the centralized network based on a received centralized network creation instruction, and all second devices in the distributed network may switch to the centralized network according to the centralized network configuration information. Therefore, the centralized network is created after the centralized network creation instruction is received, so that the resource consumption can be effectively saved, and the flexibility of creating the centralized network is improved.
In some embodiments, before the first device creates the centralized network, the method further includes: exiting the distributed network. Before creating the centralized network, if the first device has joined the distributed network, the first device needs to exit the distributed network in a preset manner, and then create the centralized network corresponding to the centralized network configuration information. Here, if the first device has joined the distributed network, after the first device broadcasts the preset centralized network configuration information in the distributed network, the first device needs to exit the distributed network first, and then create the centralized network corresponding to the centralized network configuration information. Therefore, the centralized network is established after the distributed network is quitted, and the resource consumption can be effectively saved.
In the embodiment of the application, a first device establishes a communication connection with at least one second device in a distributed network, and broadcasts preset centralized network configuration information in the distributed network based on the communication connection to create the centralized network, and all the second devices in the distributed network are switched to the centralized network according to the centralized network configuration information.
In some embodiments, the establishing, by the first device, a communication connection with at least a second device in a distributed network includes:
the method comprises the steps that a first device receives a network access operation instruction which is sent by a terminal device and used for indicating to join a distributed network;
and the first equipment responds to the network access operation instruction and joins the distributed network to establish communication connection with at least one second equipment in the distributed network.
Here, the terminal device may be installed with an application program for managing the joining of the first device to the distributed network and/or the creation of the centralized network, and a user may perform a configuration operation on the first device through an operation interface corresponding to the application program displayed on the terminal device, for example, instruct the first device to join the distributed network, where after receiving a network entry operation instruction sent by the terminal device and used for instructing the joining of the distributed network, the first device may join the corresponding distributed network in response to the network entry operation instruction, so as to establish a communication connection with at least one second device in the distributed network. It will be appreciated that when a first device joins the distributed network, the first device will automatically establish a communication connection with at least a second device in the distributed network. In addition, the network access operation instruction may include information of a distributed network to be joined, and the like. Therefore, the first device can timely join the distributed network after acquiring the network access operation instruction, the operation is simple and convenient, and the user experience is further improved. In addition, the first device may also be configured as a routing device to perform a network access operation in advance through an application installed on the terminal device, such as a mobile phone app, and join the distributed network using the first device.
In some embodiments, the establishing, by the first device, a communication connection with at least a second device in a distributed network includes:
the method comprises the steps that a first device obtains connection signal strength between the first device and all second devices supporting short-distance wireless communication in the distributed network;
the first device establishes a short-distance wireless communication connection with at least one second device of which the connection signal strength meets a preset connection condition.
It can be understood that, in the distributed network, there may be a plurality of second devices that support short-range wireless communication and are all within an effective communication range of the first device, and the first device may only need to establish short-range wireless communication connection with one of the second devices, at this time, the first device may first acquire connection signal strength between all the second devices that support short-range wireless communication in the distributed network, and specifically may acquire the connection signal strength in a scanning manner or the like, and then select at least one second device from which the connection signal strength satisfies a preset connection condition to establish short-range wireless communication connection. Wherein the close range wireless communication connection includes, but is not limited to, bluetooth, NFC, infrared, and the like. The preset connection condition refers to a signal strength condition which is preset and needs to be met for establishing the short-distance wireless communication connection between the first device and the second device, and the connection condition may be set according to actual needs, for example, the connection condition may be set to select the second device with the best connection signal strength, that is, to establish the short-distance wireless communication connection with the second device with the best connection signal strength, and after the first device acquires the connection signal strength values with all the second devices supporting the short-distance wireless communication in the distributed network, the first device determines the maximum connection signal strength value therein, and establishes the short-distance wireless communication connection between the second devices corresponding to the maximum connection signal strength value. In addition, after acquiring all the second devices supporting the short-range wireless communication in the distributed network, the first device may display all the second devices supporting the short-range wireless communication in the distributed network, and then establish the short-range wireless communication connection with the second device selected by the user. Therefore, the first device establishes the short-distance wireless communication connection by selecting at least one second device with the connection signal strength meeting the preset connection condition, the reliability of the communication connection is ensured, and the user experience is further improved.
In some embodiments, the first device broadcasts, based on the communication connection, predetermined centralized network configuration information in the distributed network, including:
the first device sends preset centralized network configuration information to at least one second device in the distributed network based on the communication connection, and the at least one second device broadcasts the centralized network configuration information in the distributed network.
Specifically, when a first device joins a distributed network, the first device directly sends preset centralized network configuration information to at least one second device in the distributed network through a communication connection established between the first device and the at least one second device, so as to broadcast the centralized network configuration information in the distributed network; and under the condition that the first device does not join the distributed network, sending preset centralized network configuration information to at least one second device in the distributed network through a communication connection established between the first device and the second device, so that the second device broadcasts the centralized network configuration information in the distributed network. It can be understood that, because there is a direct or indirect communication connection between any two second devices in the distributed network, when obtaining the centralized network configuration information, any one second device may transmit the centralized network configuration information to another second device, thereby implementing broadcasting of the centralized network configuration information in the distributed network. Therefore, the first device sends the preset centralized network configuration information to at least one second device in the distributed network, so that the at least one second device broadcasts the centralized network configuration information in the distributed network, all the second devices in the distributed network can know the centralized network configuration information, the operation is simple and convenient, and the user experience is further improved.
Referring to fig. 3, another aspect of the embodiment of the present application further provides a network handover method, which can be applied to the second device shown in fig. 1, including but not limited to S201, S203, and S205, and is specifically described as follows:
s201, the second device establishes communication connection with the first device in the distributed network.
The first device is a device to create or open a centralized network, and may specifically be a gateway device or the like; the second device may be a device that can join a distributed network and/or a centralized network, and may specifically be a routing device or a dormancy device. When a second device in the distributed network establishes a communication connection with a first device, the first device may be added to the distributed network or may not be added to the distributed network. It will be appreciated that when a first device joins a distributed network, the first device may automatically establish a communication connection with a second device that is in the distributed network.
S203, the second device obtains preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection.
Here, the second device obtaining the preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection may include the second device directly or indirectly receiving the preset centralized network configuration information sent by the first device through the communication connection to obtain the preset centralized network configuration information broadcasted by the first device in the distributed network. Wherein the centralized network configuration information is used to indicate how to join the centralized network created by the first device. In some embodiments, the obtaining, by the second device, preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection includes: and the second equipment receives preset centralized network configuration information sent by the first equipment through the communication connection and broadcasts the centralized network configuration information in the distributed network. When the first device joins or does not join the distributed network, the second device may directly broadcast the centralized network configuration information in the distributed network after receiving preset centralized network configuration information sent by the first device through the communication connection.
S205, the second device switches from the distributed network to the centralized network created by the first device according to the centralized network configuration information.
Since the centralized network configuration information indicates how to join the centralized network created by the first device, the second device can switch from the joined distributed network to the centralized network created by the first device according to the centralized network configuration information to realize switching from the distributed network to the centralized network.
In the embodiment of the application, after the second device in the distributed network establishes a communication connection with the first device, the first device acquires, through the communication connection, the preset centralized network configuration information broadcasted in the distributed network by the first device, and switches from the distributed network to the centralized network created by the first device according to the centralized network configuration information, so that the device that needs to create the centralized network broadcasts the preset centralized network configuration information in the distributed network, so that the device in the distributed network can automatically switch from the distributed network to the centralized network according to the centralized network configuration information, manual operation by a user is not needed, and the operation is convenient and fast.
In some embodiments, the switching, by the second device, from the distributed network to the centralized network created by the first device according to the centralized network configuration information includes: and after exiting the distributed network according to a preset mode, the second equipment is added into the centralized network established by the first equipment according to the centralized network configuration information.
It can be understood that, since one device is not allowed to exist in both the distributed network and the centralized network, if a second device wants to join the centralized network, the second device needs to quit the joined distributed network and join the centralized network created by the first device according to the configuration information of the centralized network. Here, the preset manner may be set according to actual needs, for example, the exit operation may be executed one by one in the order from front to back or from back to front according to the joining time, which is not limited in this embodiment. Therefore, after the second device exits the added distributed network, the second device is added into the centralized network, manual operation of a user is not needed, and user experience is further improved.
In some embodiments, after obtaining the preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection, the second device further includes: and saving the centralized network configuration information.
It can be understood that, after acquiring the preset centralized network configuration information broadcast by the first device in the distributed network through the communication connection, the second device may quickly join the centralized network created by the first device based on the centralized network configuration information in the following by saving the centralized network configuration information in time.
In another aspect of the present embodiment, please refer to fig. 4, which further provides a network switching apparatus, applied to a first device, the apparatus including: a first communication module 11, configured to establish a communication connection with at least one second device in the distributed network; a broadcasting module 12, configured to broadcast preset centralized network configuration information in the distributed network based on the communication connection; a first processing module 13, configured to create a centralized network, where all second devices in the distributed network switch to the centralized network according to the centralized network configuration information.
In some embodiments, the first communication module 11 is specifically configured to:
receiving a network access operation instruction which is sent by terminal equipment and used for indicating to join a distributed network;
responding to the network access operation instruction, and joining the distributed network to establish communication connection with at least one second device in the distributed network.
In some embodiments, the first communication module 11 is specifically configured to:
acquiring connection signal strength between the first equipment and all second equipment supporting short-distance wireless communication in the distributed network;
and establishing the short-distance wireless communication connection with at least one second device of which the connection signal strength meets the preset connection condition.
In some embodiments, the broadcasting module 12 is specifically configured to: and sending preset centralized network configuration information to at least one second device in the distributed network based on the communication connection, wherein the at least one second device broadcasts the centralized network configuration information in the distributed network.
In some embodiments, the first processing module 13 is further configured to exit the distributed network.
It should be noted that: in the network switching device provided in the foregoing embodiment, in the process of implementing network switching, only the division of each program module is illustrated, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules, so as to complete all or part of the method steps described above. In addition, the network switching device and the network switching method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
In another aspect of the embodiment of the present application, please refer to fig. 5, which further provides a network switching apparatus, applied to a second device, where the apparatus includes: a second communication module 21, configured to establish a communication connection with the first device in the distributed network; an obtaining module 22, configured to obtain preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection; a second processing module 23, configured to switch from the distributed network to a centralized network created by the first device according to the centralized network configuration information.
In some embodiments, the obtaining module 22 is specifically configured to:
receiving preset centralized network configuration information sent by the first device through the communication connection, and broadcasting the centralized network configuration information in the distributed network.
In some embodiments, the obtaining module 22 is specifically configured to:
and after exiting the distributed network according to a preset mode, adding the network into the centralized network established by the first equipment according to the centralized network configuration information.
In some embodiments, the apparatus further comprises a storage module 24 for storing the centralized network configuration information.
It should be noted that: in the network switching device provided in the foregoing embodiment, in the process of implementing network switching, only the division of each program module is illustrated, and in practical applications, the processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules, so as to complete all or part of the method steps described above. In addition, the network switching device and the network switching method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
In order to enable a more systematic understanding of the network switching method provided in the embodiments of the present application, different application scenarios are respectively combined and described below by specific examples. It should be noted that the device in this example may be a Router device or an endview device. The Router device is generally a long power supply type device, wireless receiving and transmitting are always in an open state, and a distributed network can be opened or a centralized network can be added. The Enddevice equipment is dormant equipment, is awakened when in work, is turned on when in awakening of wireless receiving and transmitting, is in a closed state when in dormancy, and can be added into a distributed network or a centralized network. The gateway generally contains a plurality of wireless technologies and is used as a network hub to forward messages to play a role in starting and stopping, and a user can realize remote control anytime and anywhere through the equipment.
Application scenario one
Assuming that only distributed networks exist in the current environment, the network handover principle is as follows: the user can configure the gateway as a routing device to execute network access operation through mobile phone app in advance, after the gateway is used for joining the distributed network, the centralized network information to be created by the gateway is published into the distributed network, the device originally in the distributed network receives the centralized network information and then stores the information and quits the original distributed network, the gateway is switched to a coordinator, the centralized network is started to be established, the device originally in the distributed network can safely and quickly join the centralized network created by the gateway due to the fact that the centralized network information is stored in advance, so that the whole network switching process is completed, the network switching can be completed completely without feeling the user, the user does not need any participation of the user in the middle, the network switching can be completed, and after the network switching is completed, the user can realize remote control.
Based on the network handover principle, please refer to fig. 6, which is an exemplary network handover method provided in the present application, including the following steps:
step S301, the gateway starts the network access operation.
And step S303, the gateway joins the distributed network.
Step S305, the gateway sends the centralized network information to the distributed network.
And step S307, all the devices in the distributed network leave the original distributed network.
Step S309, the gateway opens the centralized network.
Step S311, the device rejoins the centralized network created by the gateway.
Referring to fig. 7, when only a distributed network exists in a current environment, a device 4 (here, a gateway) may join a role of a sub-device in the distributed network through a mobile phone or other external means, and then broadcast information of the centralized network to be created in the entire distributed network, and each device in the network exits from an original network in a pre-configured manner after receiving the information, please refer to fig. 8, the device 1, the device 2, the device 3, and the device 4 leave the original network (i.e., the distributed network), and the device 4 opens the centralized network, so that the device 1, the device 2, and the device 3 may leave the original distributed network seamlessly because the centralized network information created by the device 4 is stored in advance, and then join the centralized network opened by the device 4 to obtain communication with the outside, and a user may perform remote control.
Application scenario two
Assuming that only a distributed network exists in the current environment and at least one of the routing devices supports bluetooth or NFC, infrared or other wireless communication technologies, the network switching principle is as follows: after the gateway is connected with the routing equipment in the distributed network through wireless communication technologies such as Bluetooth, NFC, infrared and the like, the centralized network information to be created by the gateway is sent to the routing equipment, the centralized network information is broadcasted in the distributed network by the routing equipment, the equipment originally in the distributed network receives the centralized network information and then stores the information and quits the original distributed network, the gateway starts to build the centralized network, the equipment originally in the distributed network can safely and quickly join the centralized network created by the gateway due to the fact that the centralized network information is stored in advance, so that the whole network switching process is completed, the network switching is completely insensitive to users, the network switching can be completed without any participation of the users in the middle, and the users can realize remote control after the network switching is completed.
Based on the network handover principle, please refer to fig. 9, which is an exemplary network handover method provided in the present application, including the following steps:
step S401, the gateway is connected with the routing equipment in the distributed network through Bluetooth, NFC or infrared technology.
Step S403, the gateway sends the preset configured centralized network information to the routing device.
Step S405, the routing device performs network broadcasting after receiving the centralized network information, and other devices leave the original distributed network after receiving the centralized network information.
Step S407, the gateway opens the centralized network.
In step S409, all devices rejoin the centralized network created by the gateway.
Referring to fig. 10, when only a distributed network exists in the current environment, and at least one routing device supports wireless communication technologies such as bluetooth, NFC, infrared, and the like, a device 4 (here, a gateway) may connect to a routing device in the distributed network through bluetooth or send preconfigured centralized network information to a routing device in the distributed network through wireless technologies such as NFC touch transmission, infrared, and the like, if there are multiple routing devices supporting bluetooth connection or other wireless transmission technologies in the distributed network, a connection is selected according to signal strength, for example, a routing device with the best signal strength is selected for connection, and after receiving the centralized network information, the routing device in the distributed network broadcasts the centralized network information all over the network, and after receiving the centralized network information, each device in the distributed network exits from the original network in a preconfigured manner, please refer to fig. 11, the device 1, the original device 2, and the device 3 leave the network (i.e., the distributed network), the device 4 opens the centralized network, and the devices 1, 2, and 3 can leave the centralized network seamlessly because the centralized network information created by the device 4 is stored, and can leave the distributed network, and then seamlessly join the external communication user can join the distributed network to obtain remote communication technology.
In summary, the network switching method provided by the above embodiment has the following advantages: the network switching is completed without physical operation of the user; the network switching speed is improved, and the equipment stores the centralized network information in advance, so that a network connection process is not needed; the switching mode can be freely configured, the user can select automatic switching or manual switching, and the operation freedom degree is high.
In another aspect of the embodiment of the present application, please refer to fig. 12, further providing an electronic device, including a processor 211, a memory 212, and a computer program stored in the memory 212 and executable by the processor 211, where when the computer program is executed by the processor 211, the network switching method applied to the first device and/or the second device side provided in any embodiment of the present application is implemented, and the same technical effect can be achieved, and is not described herein again to avoid repetition.
Fig. 13 is a block diagram of an alternative hardware structure of an electronic device according to an embodiment of the present disclosure. As shown in fig. 13, electronic devices may have relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 1110 (the processors 1110 may include but are not limited to processing devices such as a microprocessor MCU or a programmable logic device FPGA), a memory 1130 for storing data, and one or more storage media 1120 (e.g., one or more mass storage devices) for storing application programs 1123 or data 1122. The memory 1130 and the storage medium 1120 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 1120 may include one or more modules, each of which may include a series of instruction operations for network handover. Still further, the processor 1110 may be configured to communicate with the storage medium 1120, and execute a series of instruction operations in the storage medium 1120 on the electronic device. The electronic device may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input-output interfaces 1140, and/or one or more operating systems 1121, such as Windows Server, macOSXTM, unixTM, linuxTM, freeBSDTM, and so forth.
The input/output interface 1140 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the electronic device. In one example, i/o interface 1140 includes a network adapter (NIC) that may be coupled to other network devices via a base station to communicate with the internet. In one example, the input/output interface 1140 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 13 is only an illustration, and does not limit the structure of the terminal device. For example, the electronic device may also include more or fewer components than shown in FIG. 13, or have a different configuration than shown in FIG. 13.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the foregoing network handover method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the computer program is not described herein again. The computer-readable storage medium may be a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The above description is only for the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall cover the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A network switching method applied to a first device is characterized by comprising the following steps:
establishing a communication connection with at least one second device in the distributed network;
broadcasting preset centralized network configuration information in the distributed network based on the communication connection;
and creating a centralized network, wherein all second devices in the distributed network are switched to the centralized network according to the centralized network configuration information.
2. The method of claim 1, wherein establishing a communication connection with at least a second device in the distributed network comprises:
receiving a network access operation instruction which is sent by terminal equipment and used for indicating to join a distributed network;
responding to the network access operation instruction, and joining the distributed network to establish communication connection with at least one second device in the distributed network.
3. The method of claim 2, wherein prior to creating the centralized network, further comprising:
and exiting the distributed network.
4. The method of claim 1, wherein the first device is a gateway device, the second device is a routing device, and the communication connection is a short-range wireless communication connection; or
The second device is a dormancy device, and the communication connection is a short-distance wireless communication connection.
5. The method of claim 4, wherein establishing a communication connection with at least a second device in the distributed network comprises:
acquiring connection signal strength between the first equipment and all second equipment supporting short-distance wireless communication in the distributed network;
and establishing the short-distance wireless communication connection with at least one second device of which the connection signal strength meets the preset connection condition.
6. The method according to any of claims 1 to 5, wherein said broadcasting a predetermined centralized network configuration information in said distributed network based on said communication connection comprises:
and sending preset centralized network configuration information to at least one second device in the distributed network based on the communication connection, wherein the at least one second device broadcasts the centralized network configuration information in the distributed network.
7. A network switching method is applied to a second device, and is characterized in that the method comprises the following steps:
establishing a communication connection with a first device in a distributed network;
acquiring preset centralized network configuration information broadcasted by the first equipment in the distributed network through the communication connection;
switching from the distributed network to a centralized network created by the first device according to the centralized network configuration information.
8. The method of claim 7, wherein the obtaining of the preset centralized network configuration information broadcast by the first device in the distributed network over the communication connection comprises:
receiving preset centralized network configuration information sent by the first device through the communication connection, and broadcasting the centralized network configuration information in the distributed network.
9. The method of claim 7, wherein the switching from the distributed network to the centralized network created by the first device according to the centralized network configuration information comprises:
and after exiting the distributed network according to a preset mode, adding the network into the centralized network established by the first equipment according to the centralized network configuration information.
10. The method of claim 7, wherein after the obtaining of the preset centralized network configuration information broadcast by the first device over the communication connection in the distributed network, the method further comprises:
and saving the centralized network configuration information.
11. A network switching apparatus applied to a first device, the apparatus comprising:
the first communication module is used for establishing communication connection with at least one second device in the distributed network;
a broadcasting module, configured to broadcast preset centralized network configuration information in the distributed network based on the communication connection;
and the first processing module is used for creating a centralized network, and all the second devices in the distributed network are switched to the centralized network according to the centralized network configuration information.
12. A network switching apparatus applied to a second device, the apparatus comprising:
the second communication module is used for establishing communication connection with the first equipment in the distributed network;
an obtaining module, configured to obtain preset centralized network configuration information broadcasted by the first device in the distributed network through the communication connection;
and the second processing module is used for switching from the distributed network to the centralized network created by the first equipment according to the centralized network configuration information.
13. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, the computer program, when executed by the processor, implementing the network switching method of any one of claims 1 to 10.
14. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the network handover method of any one of claims 1 to 10.
CN202110418024.9A 2021-04-19 2021-04-19 Network switching method and device, electronic equipment and medium Pending CN115226078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110418024.9A CN115226078A (en) 2021-04-19 2021-04-19 Network switching method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110418024.9A CN115226078A (en) 2021-04-19 2021-04-19 Network switching method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115226078A true CN115226078A (en) 2022-10-21

Family

ID=83605073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110418024.9A Pending CN115226078A (en) 2021-04-19 2021-04-19 Network switching method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115226078A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696249A (en) * 2022-10-31 2023-02-03 云南电网有限责任公司电力科学研究院 Communication and operation system of power place, base station switching method, device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696249A (en) * 2022-10-31 2023-02-03 云南电网有限责任公司电力科学研究院 Communication and operation system of power place, base station switching method, device and medium

Similar Documents

Publication Publication Date Title
US9706600B2 (en) Connectionless Wi-Fi mesh communication
US20150131502A1 (en) Reducing power consumption by a wireless communication device with multiple wireless communication modems
EP3442276A1 (en) Communication configuration method and device
US11102701B2 (en) Method, device and system of controlling bluetooth networking among physical devices
EP3269183B1 (en) System for communication in a network
KR20180011722A (en) Wake-Up Radio Assisted WLAN Power Saving Technologies
CN104333888A (en) Self-organized instant messaging method based on Wi-Fi direct connection
CN111132113B (en) Low-power consumption Bluetooth Mesh network implementation method
US20170078962A1 (en) Application Specific Internet Access
CN106341468B (en) Remote awakening method, device and system of intelligent equipment
CN104283743A (en) Home network equipment and proxy service discovering method
EP2950558A1 (en) Method and apparatus for initiating a high-power connection via a low-power interface
CN103634657A (en) Television and mobile terminal synchronous WIFI connection setup method and device
EP3110074A1 (en) Method for controlling electronic device, control terminal, and system
WO2022017359A1 (en) Direct communication start-up control method and related device
US20170171809A1 (en) Wireless access point power save mode
CN115226078A (en) Network switching method and device, electronic equipment and medium
WO2015154615A1 (en) Wireless access point terminal and method for saving electricity intelligently thereof
WO2022083545A1 (en) Relay configuration method and apparatus, and user equipment
WO2021229478A1 (en) System information acquisition for reduced capability nr devices
CN107135467B (en) Duplex mode BLE application system and method
KR101739040B1 (en) Low-Power Mode Operation of Compound Terminal and Device Using The Same
WO2015015861A1 (en) Information processing device, communication management method and program
CN105792389A (en) Scanning method and system for use in coexistence of dual modes and single channel
JP2014123850A (en) Router device and program

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