CN113423105B - Network connection method and device - Google Patents

Network connection method and device Download PDF

Info

Publication number
CN113423105B
CN113423105B CN202110649926.3A CN202110649926A CN113423105B CN 113423105 B CN113423105 B CN 113423105B CN 202110649926 A CN202110649926 A CN 202110649926A CN 113423105 B CN113423105 B CN 113423105B
Authority
CN
China
Prior art keywords
router
equipment
security code
distribution network
password
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.)
Active
Application number
CN202110649926.3A
Other languages
Chinese (zh)
Other versions
CN113423105A (en
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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202110649926.3A priority Critical patent/CN113423105B/en
Publication of CN113423105A publication Critical patent/CN113423105A/en
Application granted granted Critical
Publication of CN113423105B publication Critical patent/CN113423105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/40Security arrangements using identity modules
    • H04W12/48Security arrangements using identity modules using secure binding, e.g. securely binding identity modules to devices, services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment

Landscapes

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

Abstract

The invention provides a network connection method and a device, comprising the following steps: the method comprises the steps that a first terminal device obtains a first device security code, a first service set identifier and a first password of a first router, and the first terminal device establishes network connection with the first router; the first terminal equipment encrypts the first service set identifier, the first password and the first equipment security code to obtain first distribution network information; the first terminal device broadcasts the first distribution network information, so that the network connection is established between the plurality of devices to be distributed, which receive the first distribution network information, and the first router. The invention solves the problems of complex operation and low efficiency of a multi-device distribution network.

Description

Network connection method and device
Technical Field
The present invention relates to the field of communications, and in particular, to a network connection method and apparatus.
Background
At present, a plurality of terminal devices are used through the internet, for example, mobile phones, computers, tablet computers, smart home devices, and the like. At present, a commonly used network distribution method is to distribute networks to other non-network-distribution devices through the already-distributed network devices. For example, when the terminal device A, B, C, D is distributed, in the prior art, A, B, C, D needs to be sequentially distributed, or a device a needs to be distributed first, then a network B needs to be distributed through a network B, then a network C needs to be distributed through a network B, and finally a network D needs to be distributed through a network C. In addition, although a network of devices is also distributed by a strong current sharing method in the related art, this method is only applicable to strong current devices, and is not applicable to devices charged by a charger or using a battery.
In addition, the networking of the existing smart home in the prior art is generally divided into two modes, namely direct networking (terminal + gateway) between devices and networking of devices through a connection router. In the networking mode of connecting the devices with the router, once the router is replaced or the password is wirelessly modified by the router, all the devices face the problem of re-distribution of the network.
Aiming at the problems of complex operation and low efficiency of a multi-device distribution network in the related technology, an effective solution does not exist at present.
Disclosure of Invention
The embodiment of the invention provides a network connection method and a network connection device, which are used for at least solving the problems of complex operation and low efficiency of a multi-device distribution network in the related art.
According to an embodiment of the present invention, there is provided a network connection method including: a first terminal device acquires a first device security code, and a first service set identifier and a first password of a first router, wherein the first terminal device establishes network connection with the first router; the first terminal equipment encrypts the first service set identifier, the first password and a first equipment security code to obtain first distribution network information; the first terminal device broadcasts the first distribution network information, so that a plurality of devices to be distributed, which receive the first distribution network information, establish network connection with the first router, and the plurality of devices to be distributed are bound with the first device security code; under the condition that the first terminal device, the plurality of devices to be networked and the first router are disconnected, the first terminal device establishes network connection with a second router, and acquires a second service set identifier and a second password of the second router; the first terminal equipment encrypts the second service set identifier, the second password and the first equipment security code to obtain second distribution network information; the first terminal equipment broadcasts the second distribution network information; the equipment to be distributed, disconnected with the first router, of the network to be distributed verifies the second distribution network information through the first equipment security code, and under the condition that the second distribution network information passes the verification, the equipment to be distributed, disconnected with the first router, of the network to be distributed establishes network connection with the second router through a second service set identifier and a second password carried in the second distribution network information
Optionally, the method further comprises: starting a distribution network flow in application software of the first terminal device, wherein the application software is installed in the first terminal device; and the first terminal equipment sets the first equipment security code through the application software.
Optionally, after the network connection is established between the multiple devices to be networked and the first router, the method further includes: the first terminal device receives a binding request sent by a device to be distributed, wherein the binding request is used for requesting binding with a target account, the target account is logged in application software, and the binding request carries the first device security code; and binding the target account with the equipment to be networked under the condition that the first terminal equipment passes the verification of the first equipment security code.
According to another embodiment of the present invention, there is provided a network connection method including: the method comprises the steps that a to-be-distributed network device receives first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device and the first router establish network connection; the equipment to be configured decrypts the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code; the equipment to be distributed establishes network connection with the first router through the first service set identifier and the first password, and is bound with the first equipment security code; under the condition that the equipment to be distributed is disconnected with the first router, the equipment to be distributed receives second distribution network information sent by second terminal equipment, wherein the second distribution network information carries a second equipment safety code; and under the condition that the to-be-distributed network equipment determines that the first equipment security code is the same as the second equipment security code, the to-be-distributed network equipment establishes network connection with a second router through a second service set identifier and a second password carried in the second distribution network information.
Optionally, after the device to be configured establishes a network connection with the first router through the first service set identifier and the first password, the method further includes: the network equipment to be distributed sends a binding request to the first terminal equipment, wherein the binding request is used for requesting binding with a target account, the target account is logged in application software, the application software is installed on the first terminal equipment, and the binding request carries a first equipment security code; and under the condition that the first terminal equipment successfully verifies the first equipment security code, binding the equipment to be distributed with the target account.
According to another embodiment of the present invention, a network connection apparatus is provided, which is applied to a first terminal device and a device to be networked, where the network connection apparatus applied to the first terminal device includes: a first obtaining module, configured to obtain a security code of a first device, and a first service set identifier and a first password of a first router, where the first terminal device establishes a network connection with the first router; the first encryption module is used for encrypting the first service set identifier, the first password and the first equipment security code to obtain first distribution network information; the first broadcasting module is used for broadcasting the first distribution network information so as to establish network connection between a plurality of devices to be distributed, which receive the first distribution network information, and the first router, and the plurality of devices to be distributed are bound with the first device security code; a second obtaining module, configured to establish a network connection with a second router and obtain a second service set identifier and a second password of the second router when the first terminal device and the multiple devices to be networked are disconnected from the first router; the second encryption module is used for encrypting the second service set identifier, the second password and the first equipment security code to obtain second distribution network information; the second broadcasting module is used for broadcasting the second distribution network information; the network connecting device applied to the equipment to be networked comprises: and the first connection module is used for verifying the second distribution network information through the first equipment security code, and establishing network connection with the second router through a second service set identifier and a second password carried in the second distribution network information under the condition that the verification is passed.
According to another embodiment of the present invention, there is provided a network connection device applied to a device to be networked, including: the first receiving module is used for receiving first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device establishes network connection with the first router; the decryption module is used for decrypting the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code; the second connection module is used for establishing network connection with the first router through the first service set identifier and the first password and binding the first router with the first equipment security code; the second receiving module is used for receiving second distribution network information sent by a second terminal device under the condition of disconnection with the first router, wherein the second distribution network information carries a second device security code; and the third connection module is configured to establish network connection with a second router through a second service set identifier and a second password carried in the second distribution network information under the condition that it is determined that the first device security code is the same as the second device security code.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, as the first terminal equipment acquires the first equipment security code, the first service set identifier and the first password of the first router, the first terminal equipment establishes network connection with the first router; the first terminal equipment encrypts the first service set identifier, the first password and the first equipment security code to obtain first distribution network information; the method comprises the steps that first terminal equipment broadcasts first distribution network information, so that a plurality of pieces of equipment to be distributed, which receive the first distribution network information, are connected with a first router in a network, and the plurality of pieces of equipment to be distributed are bound with a first equipment safety code; under the condition that a first terminal device, a plurality of devices to be distributed and a first router are disconnected, the first terminal device and a second router establish network connection, and a second service set identifier and a second password of the second router are obtained; the first terminal equipment encrypts the second service set identifier, the second password and the first equipment security code to obtain second distribution network information; the first terminal equipment broadcasts second distribution network information; and the equipment to be configured, disconnected with the first router, verifies the second distribution network information through the first equipment security code, and establishes network connection with the second router through a second service set identifier and a second password carried in the second distribution network information under the condition that the verification is passed. The purpose that multiple devices are simultaneously distributed can be achieved. Therefore, the problems of complex operation and low efficiency of a multi-device distribution network can be solved, and the effect of improving the efficiency is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a terminal device of a network connection method according to an embodiment of the present invention;
FIG. 2 is a first flowchart of a network connection method according to an embodiment of the present invention;
FIG. 3 is a flow chart two of a network connection method according to an embodiment of the invention;
fig. 4 is a schematic diagram of a network distribution method and flow according to an alternative embodiment of the invention;
figure 5 is a schematic diagram of a device re-networking flow according to an alternative embodiment of the present invention;
FIG. 6 is a block diagram of a network connection device according to an embodiment of the present invention;
fig. 7 is a block diagram of a network connection device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a network connection method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the network connection method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a network connection method operating in the mobile terminal is provided, and fig. 2 is a first flowchart of the network connection method according to the embodiment of the present invention, as shown in fig. 2, the process includes the following steps:
step S202, a first terminal device obtains a first device security code, and a first service set identifier and a first password of a first router, wherein the first terminal device establishes network connection with the first router;
step S204, the first terminal equipment encrypts the first service set identifier, the first password and a first equipment security code to obtain first distribution network information;
step S206, the first terminal device broadcasts the first distribution network information, so that a plurality of devices to be distributed, which receive the first distribution network information, establish network connection with the first router, and the plurality of devices to be distributed are bound with the first device security code;
step S208, under the condition that the first terminal device, the plurality of devices to be networked and the first router are disconnected, the first terminal device establishes network connection with a second router, and acquires a second service set identifier and a second password of the second router;
step S210, the first terminal equipment encrypts the second service set identifier, the second password and the first equipment security code to obtain second distribution network information;
step S212, the first terminal device broadcasts the second distribution network information;
step S214, the network to be distributed device disconnected with the first router verifies the second distribution network information through the first device security code, and if the verification is passed, the network to be distributed device disconnected with the first router establishes network connection with the second router through a second service set identifier and a second password carried in the second distribution network information.
Alternatively, the execution subject of the above steps may be a terminal or the like, but is not limited thereto.
As an alternative, the first terminal device may be terminal devices that are linked together by some protocol rule, and the terminal device is located at a node in the network. It may include a network terminal connected to the internet, a communication network terminal connected to the communication system, a network terminal connected to the internet, such as a computer, a wireless network terminal, a user machine such as a web-enabled mobile terminal, and a communication network terminal connected to the communication system. For example, the network terminal machine may be a mobile terminal, such as a mobile phone, a tablet, a smart home control center device, and the like.
As an alternative embodiment. The first terminal device is installed with application software. Taking an example of a smart home device distribution network in a smart home system, the first terminal device may be a network terminal machine (such as a mobile phone, a tablet, etc.) that controls the smart home device, and the network terminal machine is installed with a smart home management APP. The first terminal device is connected with the first router, and stores and records a Service Set Identifier (SSID) and a first password of the first router, wherein the first password is used for verifying the identity of the first router. And the first terminal equipment encrypts the stored distribution network information such as the SSID, the first password and the input first equipment security code to obtain first distribution network information. Then, the first terminal device can switch the WIFI into an AP hotspot mode and broadcast the encrypted first distribution network information through the AP hotspot.
As an optional implementation manner, the device to be configured may be a network terminal machine (e.g., a mobile phone, a tablet, a smart home device, etc.). And after receiving the encrypted first distribution network information packet, the distribution network equipment decrypts the encrypted first distribution network information packet to obtain the first service set identifier SSID and the first password, and the first service set identifier SSID and the first password are kept to the equipment. The first router is then connected using the decrypted first service set identification SSID and the first password. Taking the example that the to-be-distributed network device is an intelligent home device in an intelligent home system, the intelligent home device decrypts the encrypted first distribution network information received through the mobile phone/tablet broadcast, and connects the first distribution network information to the first router by using the first service set identifier SSID and the first password obtained through decryption. Meanwhile, the intelligent household equipment stores the decrypted equipment security code and binds with the account, so that the intelligent household equipment receiving the first distribution network information can complete distribution network at the same time and bind with the same account, the distribution network flow is simplified, and the distribution network efficiency of multiple devices is improved.
As an alternative embodiment, in the networking mode in which the device is connected to the router, once the router is replaced or the password is wirelessly modified by the router, all devices face the problem of re-configuring the network and networking. In this embodiment, it is assumed that the first terminal device is disconnected from the first router, and the specific reason for the disconnection may be password replacement of the first router or may be an outlet failure of the first router, and the like. The first router and the second router may be the same router or different routers. If the password of the first router is changed, the first router and the second router may be the same router, and the second router is the router after the password of the first router is changed. If the first router fails, the second router may be a router other than the first router. In this embodiment, when the network connection between the first terminal device and the first router is disconnected, the first terminal device establishes network connection with the second terminal device, stores and records the second service set identifier SSID and the second password of the second terminal device, the first device obtains the first device security code, the first terminal device encrypts the second service set identifier SSID, the second password, and the first device security code to obtain the second distribution network information, and broadcasts through the second distribution network information, a plurality of devices to be distributed receive the second distribution network information and then decrypt to obtain a second Service Set Identifier (SSID), a second password and a second device security code, the distribution network equipment disconnected with the router compares the decrypted second equipment security code with the first equipment security code bound by the local machine for verification, and after the verification is consistent, and establishing network connection with the second router through the second service set identifier SSID and the second password. The problem that the network is redistributed to the multi-device after the router is replaced or the SSID and the password of the router are changed is solved, and the efficiency of the redistribution network of the multi-device is improved.
Optionally, the obtaining, by the first terminal device, the first device security code includes: starting a distribution network flow in application software of the first terminal device, wherein the application software is installed in the first terminal device; and the first terminal equipment acquires a first equipment security code through the application software.
As an alternative implementation, the distribution network procedure may be started on application software installed on the first terminal device. Taking the intelligent home system distribution network as an example, the distribution network process can be started on an intelligent home management APP (application) or an intelligent home control center on a mobile phone/tablet computer, and a first device security code is input to trigger the distribution network. The first device security code may be used for the first terminal device to verify the identity of the network device to be connected.
As an optional embodiment, the first terminal device has application software installed thereon, and the distribution network information such as the stored SSID, the stored first password, and the recorded first security code may be encrypted by the application software. Taking an intelligent home system as an example, a mobile terminal such as a mobile phone or a tablet is provided with an intelligent home APP or intelligent home control center software, the intelligent home APP or the intelligent home control center software encrypts stored network distribution information such as an SSID (service set identifier), a first password and an entered first security code, and then switches WIFI into an AP (access point) hotspot mode and broadcasts the encrypted network distribution information through AP hotspots.
Optionally, after the network connection is established between the multiple devices to be networked and the first router, the method further includes: the method comprises the steps that a first terminal device receives a binding request sent by a device to be distributed, wherein the binding request is used for requesting to bind with a target account, the target account logs in application software, and the binding request carries a first device security code; and binding the target account with the equipment to be networked under the condition that the first terminal equipment passes the verification of the first equipment security code.
As an optional implementation manner, the application software on the first terminal device is logged in by the target account, and the user can log in the application software on the terminal device by using the target account, and perform information interaction to the terminal device that has completed the distribution network through the application software logged in by the target account. Taking the smart home system as an example, the smart home APP or the smart home control center software is installed on a mobile terminal such as a mobile phone or a tablet, and the smart home APP or the smart home control center software is logged in by a target account. And after the encrypted distribution network information packet is received by the distribution network equipment, decrypting the SSID, the first password and the first equipment security code, and keeping the SSID, the first password and the first equipment security code to the equipment. The first router is then connected using the decrypted SSID and the first password. After the router is connected, the device to be networked sends a binding request to the first terminal device to request to register to the smart home control center device or the cloud. And binding the target account with the equipment to be distributed under the condition that the intelligent home management APP or the intelligent home control center confirms that the equipment to be distributed belongs to the network through the first equipment safety code.
Optionally, after the target account is bound to the device to be connected with the network, the method further includes: the first terminal device obtains an operation request through the application software, wherein the operation request is used for requesting the device to be networked to execute target operation; and the first terminal equipment sends a control instruction to the equipment to be distributed so as to instruct the equipment to be distributed to execute the target operation.
As an optional implementation manner, after the target account and the device to be networked are bound, the user may send a control instruction to the device to be networked through the application software, and instruct the device to be networked to perform a corresponding operation. Taking an intelligent home system as an example, assuming that the equipment to be distributed is an intelligent washing machine, a user can register a target account with an intelligent home APP, after the target account is bound with the intelligent washing machine, the user can input an operation request in the intelligent home APP, the intelligent home APP generates a corresponding control instruction and sends the control instruction to the intelligent washing machine, and the intelligent washing machine executes the operation indicated in the control instruction.
In this embodiment, a network connection method is provided, and fig. 3 is a second flowchart of the network connection method according to the embodiment of the present invention, as shown in fig. 3, the flowchart includes the following steps:
step S302, a device to be configured receives first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device establishes network connection with the first router;
step S304, the equipment to be configured decrypts the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code;
step S306, the equipment to be distributed establishes network connection with the first router through the first service set identifier and the first password, and is bound with the first equipment security code;
step S308, under the condition that the equipment to be distributed is disconnected with the first router, the equipment to be distributed receives third distribution network information sent by second terminal equipment, wherein the third distribution network information carries a second equipment safety code;
step S310, when the device to be connected to the network determines that the first device security code is the same as the second device security code, the device to be connected to the network establishes a network connection with a third router through a third service set identifier and a third password carried in the third distribution network information.
As an optional implementation manner, when the device to be configured is powered on and started, the device is in an automatic state to be configured. And after receiving the encrypted first distribution network information packet, the distribution network equipment decrypts the first service set identifier SSID, the first password and the first equipment security code and keeps the first service set identifier SSID, the first password and the first equipment security code to the equipment. The first router is then connected using the decrypted SSID and the first password.
Optionally, after the device to be configured establishes a network connection with the first router through the first service set identifier and the first password, the method further includes: the method comprises the steps that the equipment to be distributed sends a binding request to the first terminal equipment, wherein the binding request is used for requesting to bind with a target account, the target account logs in application software, the application software is installed on the first terminal equipment, and the binding request carries a first equipment security code; and under the condition that the first terminal equipment successfully verifies the first equipment security code, binding the equipment to be distributed with the target account.
As an optional implementation manner, after the device to be networked is connected to the router, a binding request is sent to the first terminal, and the first terminal actively registers in the application software or the cloud to bind with the target account, where the application software is logged in by the target account. And the application software confirms that the equipment belongs to the network through the first equipment security code, and completes the binding of the equipment to be networked and the target account. In this embodiment, the application software may be a home management APP or an intelligent home control center in an intelligent home system.
As an optional implementation manner, after the device to be configured, which has completed the distribution network and the networking, is disconnected from the first router, the state of the device to be configured is switched to the state of the distributed network but disconnected, and at this time, the device re-searches for a network signal and tries to connect the original stored network, and receives the broadcast packet states to perform sequential polling switching. And the mobile phone/tablet computer or the intelligent home control center of the first terminal is connected with a new third router and retransmits a new third distribution network information packet. After receiving a new third distribution network information packet, the offline to-be-distributed network equipment compares and verifies whether a second equipment security code in the third distribution network information packet is consistent with a first equipment security code stored in the equipment, if so, a third Service Set Identifier (SSID) and a third password in the new third distribution network information packet are used for reconnecting a new third router, and if not, network signals are searched again, original stored networks are tried to be connected, and states of broadcast packets are received for sequential polling switching. The method and the device solve the problem that the network is redistributed by the multiple devices after the router is replaced or the SSID and the password of the router are changed, and improve the efficiency of the network is redistributed by the multiple devices under the condition that the router is replaced or changed.
As an optional implementation manner, taking a distribution network of an intelligent home system as an example, the present application is described below by using a specific embodiment, and as shown in fig. 4, a distribution network method and a flow diagram according to an optional implementation manner of the present invention are shown, where the distribution network method adopts a manner of simultaneously configuring multiple devices, where the method includes the following steps:
step S41, the device to be networked is powered on and started, and at this time, the device is in an automatic state to be networked. And connecting a first terminal device (a mobile phone/a tablet/intelligent home control center device) with the first router. And storing and recording a first Service Set Identification (SSID) and a first password of the router.
Step S42, a distribution network process is started on a first terminal device (a smart home management APP on a mobile phone/tablet or a smart home control center device), and a first device security code is input to trigger a distribution network. At the moment, the smart home APP or the smart home control center software encrypts the stored first service set identifier SSID, the stored first password, the recorded first equipment security code and other distribution network information, then the WIFI is switched into an AP hotspot mode, and the encrypted first distribution network information is broadcasted through the AP hotspot.
Step S43, after receiving the encrypted first distribution network packet, the device to be networked decrypts the encrypted first distribution network packet, decrypts the first service set identifier SSID, the first password, and the first device security code, and keeps the device. The first router is then connected using the decrypted first service set identification SSID and the first password. After the first router is connected, the first router actively registers to the intelligent home control center equipment or the cloud. The intelligent home management APP or the intelligent home control center confirms that the equipment belongs to the network through the first equipment safety code, and binding is completed.
According to the method, a user does not need to configure the equipment for multiple times, and the configuration process of the multiple equipment is simplified. In addition, the form of the safety code is adopted to prevent other distributed network equipment from being mixed, and the use safety is guaranteed.
The problem that the network is re-distributed by multiple devices after the router is replaced or the SSID and the password of the router are changed can be solved. Fig. 5 is a schematic diagram of a device re-networking process according to an alternative embodiment of the present invention, which includes the following steps:
step S51, after the device which has finished the distribution network and the network connection is disconnected with the first router, the state is switched to the distribution network but disconnected state, at this time, the device searches the network signal again and tries to connect the original saved network, and receives the broadcast packet state to poll and switch in turn.
Step S52, the first terminal (mobile phone/tablet or smart home control center) connects to a new router (second router or third router), and retransmits a new distribution network packet (second distribution network information or third distribution network information).
Step S53, after the offline device receives the new distribution network packet, comparing whether the second device security code in the verification packet is consistent with the first device security code stored in the device, if so, reconnecting the new router using the SSID and password in the new distribution network packet, and if not, executing step S51.
According to the method and the device, the distribution network information packet (SSID, password and security code) is sent in a wireless broadcasting mode, scanning is reduced, the AP is connected, the SSID and password are sent, the complexity of a distribution network is reduced, and the distribution network efficiency is improved. The binding of the distribution network equipment and the control terminal account is realized by using the security code, and the security of network connection is ensured. By means of switching networking and receiving a distribution network information packet of the intelligent household equipment, a dual networking strategy of automatic reconnection and distribution network reconnection is realized on the premise of not resetting the equipment.
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 invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a network connection device is further provided, and the network connection device is used to implement the foregoing embodiments and preferred embodiments, and the description of the network connection device that has been already described is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram of a network connection apparatus according to an embodiment of the present invention, and is bound to the first device security code as shown in fig. 6, where the apparatus includes: the network connection device applied to the first terminal equipment comprises: a first obtaining module 62, configured to obtain a first device security code, and a first service set identifier and a first password of a first router, where the first terminal device establishes a network connection with the first router; a first encryption module 64, configured to encrypt the first service set identifier, the first password, and the first device security code to obtain first distribution network information; a first broadcasting module 66, configured to broadcast the first distribution network information, so that a plurality of devices to be distributed that receive the first distribution network information establish network connection with the first router and the plurality of devices to be distributed are bound to the first device security code; a second obtaining module 68, configured to establish a network connection with a second router and obtain a second service set identifier and a second password of the second router when the first terminal device and the plurality of devices to be networked are disconnected from the first router; a second encryption module 610, configured to encrypt the second service set identifier, the second password, and the first device security code to obtain second distribution network information; a second broadcasting module 612, configured to broadcast the second distribution network information;
the network connecting device applied to the equipment to be networked comprises: and the first connection module is used for verifying the second distribution network information through the first equipment security code, and establishing network connection with the second router through a second service set identifier and a second password carried in the second distribution network information under the condition that the verification is passed.
Optionally, the network connection apparatus applied to the first terminal device is further configured to start a distribution network process in application software of the first terminal device, where the application software is installed in the first terminal device; and acquiring the first equipment security code through the application software.
Optionally, the network connection apparatus applied to the first terminal device is further configured to receive a binding request sent by the devices to be distributed after the devices to be distributed establish network connection with the first router, where the binding request is used to request binding with a target account, the target account is logged in the application software, and the binding request carries the first device security code; and binding the target account with the equipment to be networked under the condition that the first equipment security code is verified to pass.
Optionally, the network connection apparatus applied to the first terminal device is further configured to receive a second binding request sent by the first network-to-be-distributed device after the network connection is established between the network-to-be-distributed device disconnected from the first router and the second router through a second service set identifier and a second password carried in the second network-distribution information, where the second binding request is used to request to bind with a target account, the target account is logged in the application software, and the second binding request carries the first device security code; and binding the target account with the equipment to be networked under the condition that the first terminal equipment passes the verification of the first equipment security code.
In this embodiment, a network connection device is further provided, which is applied to a device to be networked, and fig. 7 is a block diagram of a structure of the network connection device according to an embodiment of the present invention, as shown in fig. 7, the network connection device includes: a first receiving module 72, configured to receive first distribution network information sent by a first terminal device, where the first distribution network information carries a first service set identifier, a first password, and a first device security code of a first router, and the first terminal device establishes a network connection with the first router; a decryption module 74, configured to decrypt the first distribution network information to obtain the first service set identifier, the first password, and the first device security code; a second connection module 76, configured to establish a network connection with the first router through the first service set identifier and the first password, and bind with the first device security code; a second receiving module 78, configured to receive second distribution network information sent by a second terminal device when the second distribution network information is disconnected from the first router, where the second distribution network information carries a second device security code; a third connection module 710, configured to establish a network connection with a second router through a second service set identifier and a second password carried in the second distribution network information, when it is determined that the first device security code is the same as the second device security code.
Optionally, the apparatus is further configured to send a binding request to the first terminal device, where the binding request is used to request to bind with a target account, the target account is logged in application software, the application software is installed in the first terminal device, and the binding request carries the first device security code; and under the condition that the first terminal equipment successfully verifies the first equipment security code, the first terminal equipment is bound with the target account.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, a first terminal device acquires a first device security code, and a first service set identifier and a first password of a first router, wherein the first terminal device establishes network connection with the first router;
s2, the first terminal device encrypts the first service set identifier, the first password and a first device security code to obtain first distribution network information;
s3, the first terminal device broadcasts the first distribution network information so that a plurality of devices to be distributed with the first distribution network information are connected with the first router in a network, and the devices to be distributed are bound with the first device security code;
s4, when the first terminal device, the plurality of devices to be networked, and the first router are disconnected, the first terminal device establishes a network connection with a second router, and obtains a second service set identifier and a second password of the second router;
s5, the first terminal device encrypts the second service set identifier, the second password, and the first device security code to obtain second distribution network information;
s6, the first terminal device broadcasts the second distribution network information;
s7, the network-to-be-distributed device disconnected with the first router verifies the second distribution network information through the first device security code, and under the condition that the verification is passed, the network-to-be-distributed device disconnected with the first router establishes network connection with the second router through a second service set identifier and a second password carried in the second distribution network information.
Optionally, the storage medium is further arranged to store a computer program for performing the steps of:
s1, a device to be configured receives first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device establishes network connection with the first router;
s2, the equipment to be networked decrypts the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code;
s3, the device to be distributed establishes network connection with the first router through the first service set identifier and the first password, and binds with the first device security code;
s4, under the condition that the equipment to be distributed is disconnected from the first router, the equipment to be distributed receives second distribution network information sent by second terminal equipment, wherein the second distribution network information carries a second equipment security code;
and S5, when the device to be distributed determines that the first device security code is the same as the second device security code, the device to be distributed establishes network connection with a second router through a second service set identifier and a second password carried in the second distribution network information.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, a first terminal device acquires a first device security code, and a first service set identifier and a first password of a first router, wherein the first terminal device establishes network connection with the first router;
s2, the first terminal device encrypts the first service set identifier, the first password and a first device security code to obtain first distribution network information;
s3, the first terminal device broadcasts the first distribution network information so that a plurality of devices to be distributed with the first distribution network information are connected with the first router in a network, and the devices to be distributed are bound with the first device security code;
s4, when the first terminal device, the plurality of devices to be networked, and the first router are disconnected, the first terminal device establishes a network connection with a second router, and obtains a second service set identifier and a second password of the second router;
s5, the first terminal device encrypts the second service set identifier, the second password, and the first device security code to obtain second distribution network information;
s6, the first terminal device broadcasts the second distribution network information;
s7, the network-to-be-distributed device disconnected with the first router verifies the second distribution network information through the first device security code, and under the condition that the verification is passed, the network-to-be-distributed device disconnected with the first router establishes network connection with the second router through a second service set identifier and a second password carried in the second distribution network information.
Optionally, in this embodiment, the processor may be further configured to execute, by the computer program, the following steps:
s1, a device to be configured receives first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device establishes network connection with the first router;
s2, the equipment to be networked decrypts the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code;
s3, the device to be distributed establishes network connection with the first router through the first service set identifier and the first password, and binds with the first device security code;
s4, under the condition that the equipment to be distributed is disconnected from the first router, the equipment to be distributed receives second distribution network information sent by second terminal equipment, wherein the second distribution network information carries a second equipment security code;
and S5, when the device to be distributed determines that the first device security code is the same as the second device security code, the device to be distributed establishes network connection with a second router through a second service set identifier and a second password carried in the second distribution network information.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A network connection method, comprising:
a first terminal device acquires a first device security code, and a first service set identifier and a first password of a first router, wherein the first terminal device establishes network connection with the first router;
the first terminal equipment encrypts the first service set identifier, the first password and the first equipment security code to obtain first distribution network information;
the first terminal device broadcasts the first distribution network information, so that a plurality of devices to be distributed, which receive the first distribution network information, establish network connection with the first router, and the plurality of devices to be distributed are bound with the first device security code;
under the condition that the first terminal device, the plurality of devices to be networked and the first router are disconnected, the first terminal device establishes network connection with a second router, and acquires a second service set identifier and a second password of the second router;
the first terminal equipment encrypts the second service set identifier, the second password and the first equipment security code to obtain second distribution network information;
the first terminal equipment broadcasts the second distribution network information;
and the equipment to be distributed, which is disconnected from the first router, of the network to be distributed verifies the second distribution network information through the first equipment security code, and under the condition that the second distribution network information passes the verification, the equipment to be distributed, which is disconnected from the first router, of the network to be distributed establishes network connection with the second router through a second service set identifier and a second password carried in the second distribution network information.
2. The method of claim 1, wherein the first terminal device obtaining a first device security code comprises:
starting a distribution network flow in application software of the first terminal device, wherein the application software is installed in the first terminal device;
and the first terminal equipment acquires the first equipment security code through the application software.
3. The method according to claim 1, wherein after the plurality of devices to be networked establish network connections with the first router, the method further comprises:
the first terminal device receives a binding request sent by a device to be distributed, wherein the binding request is used for requesting binding with a target account, the target account is logged in application software, and the binding request carries the first device security code;
and binding the target account with the equipment to be networked under the condition that the first terminal equipment passes the verification of the first equipment security code.
4. A network connection method, comprising:
the method comprises the steps that a to-be-distributed network device receives first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device and the first router establish network connection;
the equipment to be configured decrypts the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code;
the equipment to be distributed with the network establishes network connection with the first router through the first service set identifier and the first password and is bound with the first equipment security code;
under the condition that the equipment to be distributed is disconnected with the first router, the equipment to be distributed receives second distribution network information sent by second terminal equipment, wherein the second distribution network information carries a second equipment safety code;
and under the condition that the to-be-distributed network equipment determines that the first equipment security code is the same as the second equipment security code, the to-be-distributed network equipment establishes network connection with a second router through a second service set identifier and a second password carried in the second distribution network information.
5. The method of claim 4, wherein after the network connection is established between the device to be connected to the network and the first router through the first service set identifier and the first password, the method further comprises:
the network equipment to be distributed sends a binding request to the first terminal equipment, wherein the binding request is used for requesting binding with a target account, the target account is logged in application software, the application software is installed on the first terminal equipment, and the binding request carries a first equipment security code;
and under the condition that the first terminal equipment successfully verifies the first equipment security code, binding the equipment to be distributed with the target account.
6. A network connection device is applied to a first terminal device and a device to be networked, wherein,
the network connection device applied to the first terminal equipment comprises: the first obtaining module is used for obtaining a first device security code, and a first service set identifier and a first password of a first router, wherein the first terminal device establishes network connection with the first router; the first encryption module is used for encrypting the first service set identifier, the first password and the first equipment security code to obtain first distribution network information; the first broadcasting module is used for broadcasting the first distribution network information so that a plurality of devices to be distributed with the first distribution network information are connected with the first router in a network connection mode and are bound with the first device security code; a second obtaining module, configured to establish a network connection with a second router and obtain a second service set identifier and a second password of the second router when the first terminal device and the multiple devices to be networked are disconnected from the first router; the second encryption module is used for encrypting the second service set identifier, the second password and the first equipment security code to obtain second distribution network information; the second broadcasting module is used for broadcasting the second distribution network information;
the network connecting device applied to the equipment to be networked comprises: and the first connection module is used for verifying the second distribution network information through the first equipment security code, and establishing network connection with the second router through a second service set identifier and a second password carried in the second distribution network information under the condition that the verification is passed.
7. A network connection device is applied to a network device to be distributed, and comprises:
the first receiving module is used for receiving first distribution network information sent by a first terminal device, wherein the first distribution network information carries a first service set identifier, a first password and a first device security code of a first router, and the first terminal device establishes network connection with the first router;
the decryption module is used for decrypting the first distribution network information to obtain the first service set identifier, the first password and the first equipment security code;
the second connection module is used for establishing network connection with the first router through the first service set identifier and the first password and binding the first router with the first equipment security code;
the second receiving module is used for receiving second distribution network information sent by a second terminal device under the condition of disconnection with the first router, wherein the second distribution network information carries a second device security code;
and the third connection module is configured to establish network connection with a second router through a second service set identifier and a second password carried in the second distribution network information under the condition that it is determined that the first device security code is the same as the second device security code.
CN202110649926.3A 2021-06-10 2021-06-10 Network connection method and device Active CN113423105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110649926.3A CN113423105B (en) 2021-06-10 2021-06-10 Network connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110649926.3A CN113423105B (en) 2021-06-10 2021-06-10 Network connection method and device

Publications (2)

Publication Number Publication Date
CN113423105A CN113423105A (en) 2021-09-21
CN113423105B true CN113423105B (en) 2022-06-14

Family

ID=77788157

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110649926.3A Active CN113423105B (en) 2021-06-10 2021-06-10 Network connection method and device

Country Status (1)

Country Link
CN (1) CN113423105B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125052B (en) * 2021-09-24 2024-03-22 青岛海尔科技有限公司 Target operation execution method and device, storage medium and electronic device
CN114422216B (en) * 2021-12-31 2024-01-09 杭州华橙软件技术有限公司 Internet of things equipment binding method, device and storage medium
CN114095558B (en) * 2022-01-24 2022-04-22 深圳市朗琴音响技术有限公司 Communication switching method and device of intelligent sound box
CN114826901B (en) * 2022-04-27 2024-01-26 青岛海尔科技有限公司 Device networking method and device, storage medium and electronic device
CN115225818B (en) * 2022-07-13 2024-05-21 北京有竹居网络技术有限公司 Method, apparatus, device and storage medium for configuring device
CN116684942B (en) * 2022-09-09 2024-07-12 荣耀终端有限公司 Network access method, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726801A (en) * 2019-03-20 2020-09-29 九阳股份有限公司 Network security control method
CN112165713A (en) * 2020-09-30 2021-01-01 青岛海尔科技有限公司 Method, device, system and storage medium for intelligent equipment to access wireless network
CN112261708A (en) * 2020-12-18 2021-01-22 深圳市晶讯技术股份有限公司 System and method for automatically configuring WiFi equipment in batches

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9197671B1 (en) * 2014-05-12 2015-11-24 International Business Machines Corporation Connection configuration
CN104580265B (en) * 2015-02-13 2018-12-18 小米科技有限责任公司 Apparatus bound method and apparatus
CN107948023A (en) * 2016-10-12 2018-04-20 青岛海尔洗衣机有限公司 Household electrical appliance networking method, household electrical appliance, appliance system networking method
US11184767B2 (en) * 2016-10-21 2021-11-23 Comcast Cable Communications, Llc Methods and systems for automatically connecting to a network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726801A (en) * 2019-03-20 2020-09-29 九阳股份有限公司 Network security control method
CN112165713A (en) * 2020-09-30 2021-01-01 青岛海尔科技有限公司 Method, device, system and storage medium for intelligent equipment to access wireless network
CN112261708A (en) * 2020-12-18 2021-01-22 深圳市晶讯技术股份有限公司 System and method for automatically configuring WiFi equipment in batches

Also Published As

Publication number Publication date
CN113423105A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN113423105B (en) Network connection method and device
CN110139271B (en) Method, system and device for configuring intelligent household equipment to access network in batch
CN110708688B (en) Intelligent equipment network distribution method and device, controller and medium
CN108632056B (en) Intelligent equipment network configuration method and system
CN106572148B (en) Network distribution method and network distribution system of intelligent product
KR101743195B1 (en) Method and apparatus for providing information, program and recording medium
CN110636483A (en) Network distribution method and system
CN111490916B (en) Method, system, device and medium for binding ZigBee sub-devices of ZigBee
EP3982590A1 (en) Security authentication method, configuration method, and related device
CN109890029B (en) Automatic network distribution method of intelligent wireless equipment
CN105636040A (en) Device networking method and system
JP7043497B2 (en) Methods and equipment for installing and managing eSIM profiles
WO2024083235A1 (en) Network configuration method based on wi-fi sensing, embedded chip system, and medium
CN106658488B (en) Intelligent household appliance and method and device for safely accessing intelligent household appliance
WO2018113113A1 (en) Double-system terminal wifi sharing method and device
CN111787514B (en) Method and device for acquiring equipment control data, storage medium and electronic device
CN112637931A (en) Method and device for establishing network connection
CN112040484A (en) Password updating method and device, storage medium and electronic device
WO2023005410A1 (en) Information synchronization method and system, storage medium, and electronic device
CN105636026A (en) Configuration method of WIFI one-key intelligent system
CN110149622B (en) Intelligent household appliance control method and device
CN112637221B (en) Equipment control method and device
CN112738785B (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN110730488B (en) Communication method, device, terminal and system based on block chain network
CN112714009A (en) Network distribution method, network equipment to be distributed and network equipment

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
GR01 Patent grant
GR01 Patent grant