Disclosure of Invention
In order to solve the technical problem, the invention provides a device network access method, a device, an intelligent terminal, a network accessed device and a device to be accessed.
The invention provides a method for configuring equipment to access a network, which is applied to an intelligent terminal and comprises the following steps:
acquiring first access information of a device to be accessed to a network in a preset wireless access mode;
and sending a distribution network instruction carrying first access information to the accessed equipment, wherein the distribution network instruction is used for indicating the accessed equipment to access the equipment to be accessed according to the first access information and sending second access information for accessing the home network to the equipment to be accessed.
The method also has the following characteristics:
the device to be accessed to the network is provided with an information code containing first access information; the method for acquiring the first access information of the equipment to be accessed to the network in the preset wireless access mode comprises the following steps: and acquiring first access information of the equipment to be accessed to the network in a preset wireless access mode by scanning the information code.
The method also has the following characteristics:
under the condition that a plurality of network access devices are available, sending a distribution network instruction carrying first access information to the network access devices, comprising: selecting the network access equipment closest to the equipment to be accessed from the plurality of network access equipment, and sending a network distribution instruction carrying access information to the closest network access equipment; or selecting the network access equipment with the minimum load from the plurality of network access equipment, and sending a distribution network instruction carrying access information to the network access equipment with the minimum load; or sending a distribution network instruction carrying access information to all the accessed devices.
The method also has the following characteristics:
the distribution network instructions are further configured to: the method comprises the steps that before the accessed device accesses the device to be accessed according to the first access information, the accessed device is indicated to be disconnected with the home network, and after the accessed device fails to be connected with the device to be accessed and the device to be accessed closes the preset wireless access mode, the accessed device is indicated to be reconnected with the home network.
The invention also provides another method for configuring the equipment to access the network, which is applied to the equipment to be accessed to the network and comprises the following steps:
receiving a connection request of a device which has accessed to the network;
under the condition that the connection request comprises first access information, connecting the device to be accessed to the network, wherein the first access information is access information of the device to be accessed to the network in a preset wireless access mode;
receiving second access information which is sent by the network-accessed equipment and used for accessing the home network;
and accessing the home network according to the second access information.
The method also has the following characteristics:
when receiving connection requests of a plurality of networked devices, the method for connecting the networked devices comprises the following steps:
connecting with the accessed network equipment corresponding to the connection request received firstly; or
And randomly selecting the connected equipment corresponding to one connection request for connection.
The method also has the following characteristics:
after receiving second access information for accessing the home network, which is sent by the network-accessed device, the method further includes: and closing the preset wireless access mode.
The invention also provides another method for configuring the network access of the equipment, which is applied to the network access equipment and comprises the following steps:
receiving a distribution network instruction which is sent by an intelligent terminal and carries first access information, wherein the first access information is access information of equipment to be accessed under a preset wireless access mode;
accessing the equipment to be accessed to the network according to the first access information;
and sending the second access information for accessing the home network to the equipment to be accessed to the network.
The method also has the following characteristics:
after a distribution network instruction which is sent by the intelligent terminal and carries the first access information is received, the method further comprises the following steps: the connection to the home network is disconnected.
The method also has the following characteristics:
under the condition that the number of the network access devices is multiple, before accessing the device to be accessed to the network according to the first access information, the method further comprises the following steps: sending a connection request to the equipment to be accessed to the network; according to the selection condition of the equipment to be accessed to the network according to the connection request, one of the equipment to be accessed to the network is accessed to the equipment to be accessed to the network according to the first access information, and other equipment to be accessed to the network is reconnected to the home network after the connection between the other equipment to be accessed to the network and the equipment to be accessed to the network fails.
The method also has the following characteristics:
after the second access information for accessing the home network is sent to the device to be accessed to the network, the method further includes: and after the equipment to be accessed to the network closes the preset wireless access mode, the home network is reconnected.
The invention also provides an intelligent terminal, comprising:
the first acquisition module is used for acquiring first access information of the equipment to be accessed in a preset wireless access mode;
the first sending module is used for sending a distribution network instruction carrying first access information to the accessed device, wherein the distribution network instruction is used for indicating the accessed device to access the device to be accessed according to the first access information and sending second access information used for accessing the home network to the device to be accessed.
The intelligent terminal also has the following characteristics:
the device to be accessed to the network is provided with an information code containing first access information; the first acquisition module includes: and the second acquisition module is used for acquiring the first access information of the equipment to be accessed to the network in a preset wireless access mode in a mode of scanning the information code.
The intelligent terminal also has the following characteristics:
under the condition that the number of the accessed devices is multiple, the first sending module comprises a second sending module, a third sending module or a fourth sending module;
the second sending module is used for selecting the accessed equipment closest to the equipment to be accessed from the plurality of accessed equipment and sending a distribution network instruction carrying access information to the closest accessed equipment;
the third sending module is used for selecting the network access equipment with the minimum load from the plurality of network access equipment and sending a distribution network instruction carrying access information to the network access equipment with the minimum load;
the fourth sending module is used for sending the distribution network instruction carrying the access information to all the accessed devices.
The intelligent terminal also has the following characteristics:
the distribution network instructions are further configured to: the method comprises the steps that before the accessed device accesses the device to be accessed according to the first access information, the accessed device is indicated to be disconnected with the home network, and after the accessed device fails to be connected with the device to be accessed and the device to be accessed closes the preset wireless access mode, the accessed device is indicated to be reconnected with the home network.
The invention provides a device to be networked, which comprises:
the first receiving module is used for receiving a connection request of a device which has accessed to the network;
the first connection module is used for connecting the device which has accessed the network under the condition that the connection request comprises first access information, wherein the first access information is access information of the device to be accessed the network in a preset wireless access mode;
the second receiving module is used for receiving second access information which is sent by the accessed equipment and used for accessing the home network;
and the first access module is used for accessing the home network according to the second access information.
The equipment to be networked also has the following characteristics:
in the case of receiving connection requests of a plurality of networked devices, the first connection module includes a second connection module or a third connection module:
the second connection module is used for connecting with the accessed network equipment corresponding to the connection request received firstly;
and the third connection module is used for randomly selecting the connected equipment corresponding to the connection request to connect.
The equipment to be networked also has the following characteristics:
the device to be networked further comprises: and the closing module is used for closing the preset wireless access mode after the second receiving module receives second access information which is sent by the accessed equipment and used for accessing the home network.
The invention provides a network access device, which comprises:
the third receiving module is used for receiving a distribution network instruction which is sent by the intelligent terminal and carries first access information, wherein the first access information is access information of the equipment to be accessed under a preset wireless access mode;
the second access module is used for accessing the equipment to be accessed to the network according to the first access information;
and the fifth sending module is used for sending the second access information for accessing the home network to the equipment to be accessed.
The network access equipment also has the following characteristics:
the network-connected device further includes: and the disconnection module is used for disconnecting the connection with the home network after the third receiving module receives the distribution network instruction which is sent by the intelligent terminal and carries the first access information.
The network access equipment also has the following characteristics:
when there are a plurality of networked devices, the networked device further includes:
the sixth sending module is used for sending a connection request to the equipment to be accessed according to the first access information before the second access module accesses the equipment to be accessed;
and the third access module is used for accessing the device to be accessed according to the first access information by one device to be accessed in the plurality of devices to be accessed according to the selection condition of the device to be accessed to the device to be accessed according to the connection request, wherein other devices to be accessed are reconnected to the home network after the connection between the other devices to be accessed and the device to be accessed is failed.
The network access equipment also has the following characteristics:
the network-connected device further includes: and the reconnection module is used for reconnecting the home network after the device to be accessed closes the preset wireless access mode after the fifth sending module sends the second access information for accessing the home network to the device to be accessed.
The invention also provides a device for configuring the equipment to access the network, which comprises the intelligent terminal, the equipment to be accessed to the network and the accessed equipment.
The invention can complete the network access process of the equipment configuration under the condition that the user does not input any information, greatly simplifies the user operation and improves the user experience.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The device to be networked and the device already networked in the present document are typically smart home devices.
Example one
Fig. 1 is a flowchart of a method for configuring a device for an intelligent terminal to access a network in an embodiment, where the method includes:
step 101, acquiring first access information of a device to be accessed to a network in a preset wireless access mode;
and step 102, sending a distribution network instruction carrying first access information to the accessed device, wherein the distribution network instruction is used for indicating the accessed device to access the device to be accessed according to the first access information and sending second access information for accessing the home network to the device to be accessed.
The invention can complete the network access process of the equipment configuration under the condition that the user does not input any information, greatly simplifies the user operation and improves the user experience.
The device to be accessed to the network is provided with an information code containing first access information; the step 101 of acquiring first access information of a device to be networked in a preset wireless access mode includes: and acquiring first access information of the equipment to be accessed to the network in a preset wireless access mode by scanning the information code. The information code can be a bar code, a black and white two-dimensional code, a color two-dimensional code, and the like. The code scanning mode enables the operation to be simpler, more convenient and faster.
The access information of the device to be networked in the preset wireless access mode includes a Service Set Identifier (SSID) and a password.
In the method, the preset wireless access mode is a virtual wireless access mode, such as softAP, or other wireless access modes.
In the step 102, when there are a plurality of devices accessing the network, sending a distribution network instruction carrying first access information to the devices accessing the network, including: selecting the network access equipment closest to the equipment to be accessed from the plurality of network access equipment, and sending a network distribution instruction carrying access information to the closest network access equipment; or selecting the network access equipment with the minimum load from the plurality of network access equipment, and sending a distribution network instruction carrying access information to the network access equipment with the minimum load; or sending a distribution network instruction carrying access information to all the accessed devices.
The network distribution instruction is also used for indicating the connected equipment to be connected to the home network to be disconnected before the connected equipment is connected to the equipment to be connected to the home network according to the first access information, and indicating the connected equipment to be connected to the home network to be reconnected after the connected equipment is failed to be connected to the equipment to be connected to the home network and the preset wireless access mode of the equipment to be connected to the home network is closed.
FIG. 2 is a block diagram of an intelligent terminal according to one embodiment; this intelligent terminal includes:
the first acquisition module is used for acquiring first access information of the equipment to be accessed in a preset wireless access mode;
the first sending module is used for sending a distribution network instruction carrying first access information to the accessed device, wherein the distribution network instruction is used for indicating the accessed device to access the device to be accessed according to the first access information and sending second access information used for accessing the home network to the device to be accessed.
The device to be accessed to the network is provided with an information code containing first access information; the first acquisition module includes: and the second acquisition module is used for acquiring the first access information of the equipment to be accessed to the network in a preset wireless access mode in a mode of scanning the information code.
Under the condition that the number of the accessed devices is multiple, the first sending module comprises a second sending module, a third sending module or a fourth sending module;
the second sending module is used for selecting the accessed equipment closest to the equipment to be accessed from the plurality of accessed equipment and sending a distribution network instruction carrying access information to the closest accessed equipment;
the third sending module is used for selecting the network access equipment with the minimum load from the plurality of network access equipment and sending a distribution network instruction carrying access information to the network access equipment with the minimum load;
the fourth sending module is used for sending the distribution network instruction carrying the access information to all the accessed devices.
The distribution network instructions are further configured to: the method comprises the steps that before the accessed device accesses the device to be accessed according to the first access information, the accessed device is indicated to be disconnected with the home network, and after the accessed device fails to be connected with the device to be accessed and the device to be accessed closes the preset wireless access mode, the accessed device is indicated to be reconnected with the home network.
Example two
The method for configuring the equipment to access the network, which is applied to the equipment to be accessed to the network, comprises the following steps: receiving a connection request of a device which has accessed to the network; under the condition that the connection request comprises first access information, connecting the device to be accessed to the network, wherein the first access information is access information of the device to be accessed to the network in a preset wireless access mode; receiving second access information which is sent by the network-accessed equipment and used for accessing the home network; and accessing the home network according to the second access information.
When receiving connection requests of a plurality of networked devices, the method for connecting the networked devices comprises the following steps: connecting with the accessed network equipment corresponding to the connection request received firstly; or, the connected device corresponding to one connection request is selected to be connected.
The method further comprises: after receiving second access information for accessing the home network, which is sent by the network-accessed device, the method further includes: and closing the preset wireless access mode.
The device to be networked comprises:
the first receiving module is used for receiving a connection request of a device which has accessed to the network;
the first connection module is used for connecting the device which has accessed the network under the condition that the connection request comprises first access information, wherein the first access information is access information of the device to be accessed the network in a preset wireless access mode;
the second receiving module is used for receiving second access information which is sent by the accessed equipment and used for accessing the home network;
and the first access module is used for accessing the home network according to the second access information.
Wherein, under the condition of receiving the connection requests of a plurality of devices which have accessed the network, the first connection module comprises a second connection module or a third connection module:
the second connection module is used for connecting with the accessed network equipment corresponding to the connection request received firstly;
and the third connection module is used for randomly selecting the connected equipment corresponding to the connection request to connect.
The device to be networked further comprises: and the closing module is used for closing the preset wireless access mode after the second receiving module receives second access information which is sent by the accessed equipment and used for accessing the home network.
EXAMPLE III
The method for configuring the equipment network access applied to the network access equipment comprises the following steps: receiving a distribution network instruction which is sent by an intelligent terminal and carries first access information, wherein the first access information is access information of equipment to be accessed under a preset wireless access mode; accessing the equipment to be accessed to the network according to the first access information; and sending the second access information for accessing the home network to the equipment to be accessed to the network.
In the method, after a distribution network instruction carrying first access information sent by an intelligent terminal is received, the method further comprises the following steps: the connection to the home network is disconnected.
Under the condition that the number of the network access devices is multiple, before accessing the device to be accessed to the network according to the first access information, the method further comprises the following steps: sending a connection request to the equipment to be accessed to the network; according to the selection condition of the equipment to be accessed to the network according to the connection request, one of the equipment to be accessed to the network is accessed to the equipment to be accessed to the network according to the first access information, and other equipment to be accessed to the network is reconnected to the home network after the connection between the other equipment to be accessed to the network and the equipment to be accessed to the network fails.
After the second access information for accessing the home network is sent to the device to be accessed to the network, the method further includes: and after the equipment to be accessed to the network closes the preset wireless access mode, the home network is reconnected.
The network-connected device includes:
the third receiving module is used for receiving a distribution network instruction which is sent by the intelligent terminal and carries first access information, wherein the first access information is access information of the equipment to be accessed under a preset wireless access mode;
the second access module is used for accessing the equipment to be accessed to the network according to the first access information;
and the fifth sending module is used for sending the second access information for accessing the home network to the equipment to be accessed.
Wherein the content of the first and second substances,
the network-connected device further includes: and the disconnection module is used for disconnecting the connection with the home network after the third receiving module receives the distribution network instruction which is sent by the intelligent terminal and carries the first access information.
When there are a plurality of networked devices, the networked device further includes:
the sixth sending module is used for sending a connection request to the equipment to be accessed according to the first access information before the second access module accesses the equipment to be accessed;
and the third access module is used for accessing the device to be accessed according to the first access information by one device to be accessed in the plurality of devices to be accessed according to the selection condition of the device to be accessed to the device to be accessed according to the connection request, wherein other devices to be accessed are reconnected to the home network after the connection between the other devices to be accessed and the device to be accessed is failed.
The network-connected device further includes: and the reconnection module is used for reconnecting the home network after the device to be accessed closes the preset wireless access mode after the fifth sending module sends the second access information for accessing the home network to the device to be accessed.
Example four
The invention also provides a device for configuring the equipment to access the network, which comprises the intelligent terminal in the first embodiment, the equipment to be accessed to the network in the second embodiment and the equipment already accessed to the network in the third embodiment.
Two specific examples are given below to illustrate the process in detail.
Detailed description of the preferred embodiment
As shown in fig. 3, the method includes:
step 301, the device to be networked starts a softAP mode.
Step 302, the intelligent terminal scans the two-dimensional code containing the device to be accessed to obtain the access information of the preset mode of the device to be accessed to the network, wherein the access information comprises an SSID and a password.
Step 303, the intelligent terminal selects a network access device from the multiple network access devices.
The selection method may be one of the following ways:
the method comprises the steps that firstly, the intelligent terminal displays information of all the accessed devices accessed to the home network, and a user determines and selects the accessed device closest to the accessed device;
the intelligent terminal acquires the intelligent terminal of the accessed device, and selects the accessed device with the minimum operation load;
and in a third mode, the intelligent terminal determines all the accessed devices capable of receiving the wireless signals of the to-be-accessed device in the preset wireless access mode through interaction with the accessed devices, and selects at least one accessed device.
And step 304, the intelligent terminal sends a distribution network instruction carrying the access information to the selected network-accessed equipment.
Step 305, after the network access device receives the distribution network instruction, disconnecting the connection with the home network, and sending a connection request to the network access device by using the access information of the preset mode of the network access device;
step 306, after receiving the connection request, the device to be networked establishes a connection with the device already networked, and the device already networked sends the access information of the home network to the device to be networked through the connection.
And step 307, the device to be networked closes the softAP mode.
And 308, the device to be accessed to the network requests to access the home network by using the access information of the home network.
Step 309, after the connected device detects that the connection with the device to be connected is disconnected, the device to be connected is connected to the home network again.
Specific example II
As shown in fig. 4, the method includes:
step 401, the device to be networked starts a softAP mode.
Step 402, the intelligent terminal scans the two-dimensional code containing the device to be accessed to obtain the access information of the preset mode of the device to be accessed to the network, wherein the access information comprises an SSID and a password.
And 403, the intelligent terminal sends a distribution network instruction carrying the access information to more than one network-accessed device.
Step 404, after receiving the distribution network instruction, the network-connected device disconnects the home network, and the network-connected device sends a connection request to the network-to-be-connected device by using the access information of the preset mode of the network-to-be-connected device.
Step 405, after the network access device receives the multiple connection requests, selecting one network access device from the multiple connection requests as the determined network access device. For example, the network-accessed device corresponding to the connection request received first is selected, and then the connection request sent by other network-accessed devices is received, and then a response is returned or no processing is performed. For another example, one of the networked devices corresponding to the received connection request is selected arbitrarily.
And the equipment to be accessed to the network establishes connection with the determined equipment to be accessed to the network. And the network-accessed equipment which fails to establish connection with the equipment to be network-accessed reconnects the home network.
Step 406, the connected device establishing connection with the device to be networked sends the access information of the home network to the device to be networked through the connection.
Step 407, the device to be networked closes the softAP mode.
And step 408, the device to be networked requests to access the home network by using the access information of the home network.
The invention can complete the network access process of the equipment configuration under the condition that the user does not input any information, greatly simplifies the user operation and improves the user experience.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
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. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
It is to be noted that, in this document, the terms "comprises", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, so that an article or apparatus including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device comprising the element.
The above embodiments are merely to illustrate the technical solutions of the present invention and not to limit the present invention, and the present invention has been described in detail with reference to the preferred embodiments. It will be understood by those skilled in the art that various modifications and equivalent arrangements may be made without departing from the spirit and scope of the present invention and it should be understood that the present invention is to be covered by the appended claims.