Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments 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. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The noun explains:
the dynamic host configures a protocol server, i.e., a DHCP server. DHCP, Dynamic Host configuration Protocol. The dynamic host configuration protocol is a network protocol for a local area network. The method refers to that a server controls a range of IP addresses, and a client can automatically obtain the IP address and the subnet mask allocated by the server when logging in the server.
A Domain Name server, that is, a DNS (Domain Name server) is a server that performs conversion between a Domain Name and an IP address corresponding to the Domain Name. The domain name server consists of a domain name resolver and a domain name server. The process of mapping a domain name to an IP address becomes domain name resolution.
IP Address, internet protocol Address.
According to one aspect of the embodiment of the invention, a networking method of intelligent equipment is provided. In this embodiment, the networking method of the smart devices can be applied to a hardware environment formed by the first smart device 101, the second smart device 102 and the server 103 shown in fig. 1. As shown in fig. 1, a first smart device 101 and a second smart device 102 are connected to a server 103 via a network including, but not limited to: the first smart device 101 may be a robot or other smart device. The second smart device 102 may be a mobile phone terminal, or may be a PC terminal, a notebook terminal, or a tablet terminal.
The hardware environment shown in FIG. 1 operates as follows:
the first smart device 101 and the second smart device 102 in fig. 1 may communicate with each other via bluetooth, or may communicate via connection to the same local area network. Meanwhile, both the first smart device 101 and the second smart device 102 may be connected to the server 103 to communicate with the server 103. In case the first smart device 101 needs authentication through the network connection server 103, authentication may be performed through the second smart device 102. Prior to authentication, the first smart device 101 inputs a login account number and a password through the second smart device 102 to connect to the server 103.
Fig. 2 is a flow chart of a networking method of a smart device according to an embodiment of the invention. As shown in fig. 2, the networking method of the intelligent device includes:
step S202, when the first intelligent device requests to connect to the wireless network, the first intelligent device detects first prompt information, wherein the first prompt information is used for prompting authentication for connecting to the wireless network.
The first smart device is a terminal without an external input device. The wireless network comprises a network which needs to input an account number and a password for logging in and a network which can log in without the password. Networks that do not require password login typically require authentication prior to login. The authentication comprises authentication modes such as webpage authentication, fingerprint authentication, face authentication, voice print authentication and the like. When the first intelligent device requests to connect to the wireless network, if the wireless network needs to be authenticated, the first intelligent device detects first prompt information, and the prompt information prompts the first intelligent device to be authenticated. For example, it is necessary to select "connect immediately" on the interface shown in fig. 3, and jump to the interface shown in fig. 4 after the connection is successful.
Optionally, the requesting, by the first smart device, to connect to the wireless network includes: the first intelligent device receives a second login account and a second login password of the wireless network, which are sent by the second intelligent device; and the first intelligent equipment requests to log in the wireless network through the second login account and the second login password.
For the wireless network which does not need password login, if a plurality of connectable wireless networks need to be selected, the wireless network which needs to be connected is selected on the second intelligent device, and then the account of the selected wireless network is sent to the first intelligent device, so that the first intelligent device can request to connect the selected wireless network according to the received account. The second intelligent device and the first intelligent device can communicate through Bluetooth and send the selected account number of the wireless network to the first intelligent device through Bluetooth. The second intelligent device can also generate a two-dimensional code, and the first intelligent device scans the two-dimensional code to acquire the account number of the wireless network to be connected. If there is only one connectable wireless network, the first smart device may issue a connection request directly to the wireless network.
For a wireless network requiring password login, the second intelligent device is required to select an account from a plurality of wireless networks and input a corresponding password. For example, an account of the wireless network to be logged in is selected on the interface shown in fig. 5, a password is input, and the second intelligent device sends the account and the password to the first intelligent device. The sending mode may be the above-mentioned bluetooth communication or two-dimensional code scanning, and is not described herein again. And after receiving the account number and the password, the first intelligent device logs in the wireless network by using the received account number and the password.
Step S204, the first intelligent device sends second prompt information to the second intelligent device, wherein the second prompt information is used for prompting the second intelligent device to carry out authentication so that the first intelligent device is connected to the wireless network.
The first smart device has no external input device, and when authentication is required, authentication is required by means of the second smart device. And after receiving the first prompt message, sending a second prompt message to the second intelligent device to prompt the second intelligent device to authenticate. That is, authentication is performed on the second smart device to enable authentication of the first smart device through the connected wireless network. The second smart device may authenticate through the authentication page shown in fig. 3.
Step S206, the first intelligent device receives an authentication result sent by the second intelligent device, wherein the authentication result is used for indicating that the second intelligent device completes authentication.
And after finishing authentication according to the second prompt message, the second intelligent device sends an authentication result to the first intelligent device, wherein the authentication result can prompt the first intelligent device, and the current wireless network finishes authentication and can be connected with the network. It should be noted that, when the first smart device receives the first prompt message, the first smart device is connected to the router of the wireless network, but is not connected to the server for data communication, and can be connected to the server only after authentication is required. After the second intelligent device completes authentication, the first intelligent device can be connected to the server through the router for data communication. The second smart device may determine whether the authentication is successful during the authentication process. If the authentication is unsuccessful, the second smart device may continue with the authentication, and if successful, the authentication result may be sent to the first smart device.
Authentication by the second smart device includes, but is not limited to, any of the following forms:
clicking an authentication identifier on the authentication page, such as the 'immediate connection' identifier in fig. 3, to complete authentication;
clicking an authentication identifier on the authentication page, receiving a verification code, and inputting the verification code at a corresponding position of the authentication page to finish authentication;
inputting a fingerprint or shooting a face picture according to the prompt of the authentication page to finish authentication;
and selecting characters required to be input from a plurality of characters to be selected according to characters prompted on the authentication page, and finishing authentication by taking the input characters as authentication information, or reading the characters required to be input and recording, and finishing authentication by taking the recording as the authentication information.
The authentication process may further include performing actions such as tapping, clicking, shaking, and sliding on the second smart device for authentication, which is not illustrated herein.
In step S208, when the authentication result indicates that the second smart device completes authentication, the first smart device determines that the first smart device is successfully connected to the wireless network.
In the event that the second smart device completes authentication, the first smart device may successfully connect to the wireless network.
In the embodiment, when the first intelligent device is connected with the wireless network needing authentication, the authentication of the wireless network is carried out by means of the second intelligent device, so that the technical problem that the intelligent device cannot be connected with the wireless network needing authentication due to the fact that the intelligent device cannot carry out authentication in the prior art is solved, and the technical effect of carrying out authentication to log in the wireless network is achieved.
Optionally, after the first smart device sends the second prompt message to the second smart device and before the first smart device receives the authentication result sent by the second smart device, the method further includes: the first intelligent device provides a wireless hotspot to the second intelligent device, wherein the wireless hotspot is used for enabling the second intelligent device to communicate with the wireless network through a wireless relay network provided by the wireless hotspot.
Because the second intelligent device authenticates, the first intelligent device can be connected with the wireless network, and therefore, when the second intelligent device authenticates, the first intelligent device provides a relay network for the second intelligent device. As shown in fig. 6, a first smart device provides a wireless hotspot, a second smart device can be connected to the wireless hotspot, and the first smart device provides a relay network for the second smart device through the wireless hotspot, so that the second smart device is connected to the first smart device through a wireless network, and is connected to a wireless network to which the first smart device requests to connect through the first smart device, so as to perform authentication. For example, the wireless network to which the first smart device requests to connect is WX-WIFI, and when the wireless network needs authentication, the first smart device provides a wireless hotspot and notifies the second smart device to connect to the wireless hotspot, and after the second smart device connects to the wireless hotspot, the first smart device enables the second smart device to communicate with the wireless network WX-WIFI, and the authentication is performed on the second smart device.
For example: the first intelligent device is a robot, and the second intelligent device is a collection device. On the robot, the mobile phone sends an account number of a wireless network to the robot through Bluetooth, after the robot requests to connect the wireless network, the robot can actively judge whether the currently connected wireless network needs webpage authentication, if so, a wireless hotspot is opened, meanwhile, information (second prompt information) needing the webpage authentication is sent to the mobile phone, the mobile phone is connected with the wireless hotspot of the robot, and webpage authentication is carried out on the robot. As shown in fig. 7, the robot connects to the wireless network of the accumulation in the tangy uterus, the authentication page of the accumulation in the tangy uterus is displayed on the mobile phone, and the user clicks "connect immediately" to complete authentication.
Optionally, the first smart device providing the wireless hotspot to the second smart device comprises: the first intelligent device communicates with the wireless network through a first network interface; adding a second network interface to the first intelligent equipment; enabling the wireless hotspot on the second network interface by the first intelligent device; the first intelligent device sets a routing table, wherein the routing table is used for indicating the second intelligent device to communicate with the wireless network through the second network interface and the first network interface; the first intelligent device sends a first login account and a first login password of the wireless hotspot to the second intelligent device.
Optionally, the adding, by the first smart device, the second network interface includes: the first intelligent equipment configures the IP address of the local machine for the second network interface; the first intelligent device starts a dynamic host configuration protocol server to monitor a second network interface and distributes an IP address for the second intelligent device connected to the wireless hotspot; and the first intelligent equipment sets a domain name server for the second network interface.
The principle that the first intelligent device provides the wireless hotspot technology as the relay route is mainly as follows:
1. the first intelligent device is connected with the wireless network through a first network interface wlan 0;
2. adding a new network interface, namely a second network interface, such as p2p 0;
3. keeping the wireless connection of the wlan0 still, and starting a wireless hotspot on the newly added second network interface, wherein the wireless hotspot comprises a first login account and a first login password;
4. configuring an address range of a local IP address for the second network interface p2p 0;
5. starting a dynamic host configuration protocol server, monitoring a second network interface p2p0, and allocating an IP address to a second intelligent device connected to the second network interface through a wireless hotspot;
6. setting a domain name server of a second network interface p2p0 to support domain name resolution;
7. the local routing table is set up so that a connected second smart device via the second network interface p2p0 can communicate with the server from the first network interface wlan 0.
After the first intelligent device configures the wireless hotspot, the first login account and the first login password are sent to the second intelligent device, and the second intelligent device is connected with the wireless hotspot through the first login account and the first login password. After the second intelligent device is connected to the wireless hotspot, the second intelligent device communicates with the server through the second network interface and the first network interface, which is equivalent to the fact that the second intelligent device communicates with the server through the network of the first intelligent device.
Optionally, in order to ensure that the first smart device can be normally connected to the wireless network for communication after the authentication is completed, after receiving the authentication result, the first smart device may detect whether authentication is further required, and if no prompt message that authentication is required is detected, it is determined that the second smart device has completed authentication in place of the first smart device, and the wireless network may be normally connected, that is, the first smart device successfully connected to the wireless network after the authentication result indicates that the second smart device completes authentication includes: after receiving the authentication result, the first intelligent device detects whether the wireless network prompts the first intelligent device to authenticate or not again; and under the condition that the first intelligent device does not detect the wireless network and prompts the first intelligent device to authenticate, determining that the first intelligent device is successfully connected to the wireless network.
It should be noted that, the second smart device automatically detects whether the authentication is successfully completed after the authentication is performed, re-authenticates if the authentication is failed, and sends the authentication result to the first smart device after the authentication is successful. And the first intelligent device detects whether the prompt message exists again after receiving the authentication result, so as to ensure that the first intelligent device can be connected to the wireless network. The first smart device is connectable to the wireless network even if the first smart device does not detect again whether the prompt authentication is accepted. That is, in the event that the second smart device successfully authenticates, the first smart device may already be connected to the wireless network.
The networking method of the smart device of the present embodiment is explained below with reference to fig. 8. In this embodiment, the robot is the first smart device, and the mobile phone is the second smart device. The following steps performed by the robot may be performed by an application installed in the robot, and the following steps performed by the mobile phone may be performed by an application installed in the collection.
S801, the mobile phone acquires a WiFi account and a password and transmits the WiFi account and the password to the robot through a Bluetooth channel;
s802, the robot receives the WiFi account and the password and requests to connect a wireless network corresponding to the WiFi account;
s803, the robot judges whether the wireless webpage authentication is needed, if not, the distribution network is determined to be successful, and if so, S804 and S805 are executed to send an authentication prompt to the mobile phone;
s804, the robot judges whether the wireless relay is started successfully or not to provide a wireless hotspot; if yes, executing S806, if not, failing to distribute the network;
s805, the mobile phone prompts the user that webpage authentication is needed;
s806, the robot sends the relay WiFi account and the password to the mobile phone, namely sends the account and the password of the wireless hotspot;
s807, the mobile phone receives the relay WiFi account and is connected to the relay WiFi;
s808, popping up a webpage for webpage authentication by the mobile phone, performing webpage authentication, and sending an authentication result to the robot;
s809, the robot checks whether the wireless network can be networked really, if so, the robot determines that the network distribution is successful, and if not, the robot determines that the network distribution is failed.
Wherein, first smart machine provides wireless wiFi relay route and makes the networking of second smart machine, mainly by following several composition parts:
network distribution service of the mobile phone:
the mobile phone is responsible for communicating with the robot through a low-power-consumption Bluetooth technology, the mobile phone end sends WiFi account information to the robot end, and the mobile phone is responsible for opening a corresponding authentication page and authenticating the robot according to whether the network of the robot needs authentication.
Robot WiFi relay service:
the robot is responsible for turning on and turning off the WiFi relay service of the robot, and a WiFi relay hotspot is started for the mobile phone, so that the mobile phone can surf the internet through the WiFi network of the robot, and the robot can realize authentication.
And WiFi authentication checking:
and the system is responsible for checking whether the WiFi network of the robot is available or not, and returning a prompt when the WiFi network of the robot is unavailable to prompt the robot to need authentication.
Through the networking method of the intelligent equipment, authentication in the process of connecting a wireless network can be achieved without adding additional input equipment such as a screen and a keyboard, the manufacturing cost of the intelligent equipment is saved, equipment such as a robot without external input equipment at present can be connected to the network needing authentication, and the networking adaptability of the intelligent equipment is improved. In addition, under the condition that the WiFi network of the current intelligent robot is not disconnected, the robot can share the WiFi hot spot, the function of a wireless routing relay is realized, and the function of the wireless routing relay can be provided for other intelligent equipment to be networked.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
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.
According to another aspect of the embodiment of the present invention, there is also provided a networking apparatus of an intelligent device for implementing the networking method of the intelligent device. The networking means of the smart device is arranged in the first smart device. FIG. 9 is a schematic diagram of a networking apparatus of an ID smart device according to an embodiment of the invention. As shown in fig. 9, the apparatus includes:
the detecting unit 92 is configured to detect first prompt information when the first smart device requests to connect to the wireless network, where the first prompt information is used to prompt authentication for connecting to the wireless network;
the first smart device is a terminal without an external input device. The wireless network comprises a network which needs to input an account number and a password for logging in and a network which can log in without the password. Networks that do not require password login typically require authentication prior to login. The authentication comprises authentication modes such as webpage authentication, fingerprint authentication, face authentication, voice print authentication and the like. When the first intelligent device requests to connect to the wireless network, if the wireless network needs to be authenticated, the first intelligent device detects first prompt information, and the prompt information prompts the first intelligent device to be authenticated. For example, it is necessary to select "connect immediately" on the interface shown in fig. 3, and jump to the interface shown in fig. 4 after the connection is successful.
Optionally, the detection unit comprises: the receiving module is used for receiving a second login account and a second login password of the wireless network, which are sent by the second intelligent device; and the login module is used for requesting to login the wireless network through a second login account and a second login password.
For the wireless network which does not need password login, if a plurality of connectable wireless networks need to be selected, the wireless network which needs to be connected is selected on the second intelligent device, and then the account of the selected wireless network is sent to the first intelligent device, so that the first intelligent device can request to connect the selected wireless network according to the received account. The second intelligent device and the first intelligent device can communicate through Bluetooth and send the selected account number of the wireless network to the first intelligent device through Bluetooth. The second intelligent device can also generate a two-dimensional code, and the first intelligent device scans the two-dimensional code to acquire the account number of the wireless network to be connected. If there is only one connectable wireless network, the first smart device may issue a connection request directly to the wireless network.
For a wireless network requiring password login, the second intelligent device is required to select an account from a plurality of wireless networks and input a corresponding password. For example, an account of the wireless network to be logged in is selected on the interface shown in fig. 5, a password is input, and the second intelligent device sends the account and the password to the first intelligent device. The sending mode may be the above-mentioned bluetooth communication or two-dimensional code scanning, and is not described herein again. And after receiving the account number and the password, the first intelligent device logs in the wireless network by using the received account number and the password.
The sending unit 94 is configured to send second prompt information to the second smart device, where the second prompt information is used to prompt the second smart device to perform authentication, so that the first smart device is connected to the wireless network;
the first smart device has no external input device, and when authentication is required, authentication is required by means of the second smart device. And after receiving the first prompt message, sending a second prompt message to the second intelligent device to prompt the second intelligent device to authenticate. That is, authentication is performed on the second smart device to enable authentication of the first smart device through the connected wireless network. The second smart device may authenticate through the authentication page shown in fig. 3.
The receiving unit 96 is configured to receive an authentication result sent by the second smart device, where the authentication result is used to indicate that the second smart device completes authentication;
and after finishing authentication according to the second prompt message, the second intelligent device sends an authentication result to the first intelligent device, wherein the authentication result can prompt the first intelligent device, and the current wireless network finishes authentication and can be connected with the network. It should be noted that, when the first smart device receives the first prompt message, the first smart device is connected to the router of the wireless network, but is not connected to the server for data communication, and can be connected to the server only after authentication is required. After the second intelligent device completes authentication, the first intelligent device can be connected to the server through the router for data communication. The second smart device may determine whether the authentication is successful during the authentication process. If the authentication is unsuccessful, the second smart device may continue with the authentication, and if successful, the authentication result may be sent to the first smart device.
Authentication by the second smart device includes, but is not limited to, any of the following forms:
clicking an authentication identifier on the authentication page, such as the 'immediate connection' identifier in fig. 3, to complete authentication;
clicking an authentication identifier on the authentication page, receiving a verification code, and inputting the verification code at a corresponding position of the authentication page to finish authentication;
inputting a fingerprint or shooting a face picture according to the prompt of the authentication page to finish authentication;
and selecting characters required to be input from a plurality of characters to be selected according to characters prompted on the authentication page, and finishing authentication by taking the input characters as authentication information, or reading the characters required to be input and recording, and finishing authentication by taking the recording as the authentication information.
The authentication process may further include performing actions such as tapping, clicking, shaking, and sliding on the second smart device for authentication, which is not illustrated herein.
The connection unit 98 is configured to determine that the first smart device is successfully connected to the wireless network when the authentication result indicates that the second smart device completes authentication.
In the event that the second smart device completes authentication, the first smart device may successfully connect to the wireless network.
In the embodiment, when the first intelligent device is connected with the wireless network needing authentication, the authentication of the wireless network is carried out by means of the second intelligent device, so that the technical problem that the intelligent device cannot be connected with the wireless network needing authentication due to the fact that the intelligent device cannot carry out authentication in the prior art is solved, and the technical effect of carrying out authentication to log in the wireless network is achieved.
Optionally, the apparatus further comprises: and the wireless unit is used for providing a wireless hotspot to the second intelligent device after the first intelligent device sends the second prompt message to the second intelligent device and before the first intelligent device receives the authentication result sent by the second intelligent device, wherein the wireless hotspot is used for enabling the second intelligent device to communicate with the wireless network through a wireless relay network provided by the wireless hotspot.
Because the second intelligent device authenticates, the first intelligent device can be connected with the wireless network, and therefore, when the second intelligent device authenticates, the first intelligent device provides a relay network for the second intelligent device. As shown in fig. 6, a first smart device provides a wireless hotspot, a second smart device can be connected to the wireless hotspot, and the first smart device provides a relay network for the second smart device through the wireless hotspot, so that the second smart device is connected to the first smart device through a wireless network, and is connected to a wireless network to which the first smart device requests to connect through the first smart device, so as to perform authentication. For example, the wireless network to which the first smart device requests to connect is WX-WIFI, and when the wireless network needs authentication, the first smart device provides a wireless hotspot and notifies the second smart device to connect to the wireless hotspot, and after the second smart device connects to the wireless hotspot, the first smart device enables the second smart device to communicate with the wireless network WX-WIFI, and the authentication is performed on the second smart device.
For example: the first intelligent device is a robot, and the second intelligent device is a collection device. On the robot, the mobile phone sends an account number of a wireless network to the robot through Bluetooth, after the robot requests to connect the wireless network, the robot can actively judge whether the currently connected wireless network needs webpage authentication, if so, a wireless hotspot is opened, meanwhile, information (second prompt information) needing the webpage authentication is sent to the mobile phone, the mobile phone is connected with the wireless hotspot of the robot, and webpage authentication is carried out on the robot. As shown in fig. 7, the robot connects to the wireless network of the accumulation in the tangy uterus, the authentication page of the accumulation in the tangy uterus is displayed on the mobile phone, and the user clicks "connect immediately" to complete authentication.
Optionally, the wireless unit comprises: the communication module is used for communicating with a wireless network through a first network interface; the adding module is used for adding a second network interface; an enabling module for enabling the wireless hotspot on the second network interface; the routing module is used for setting a routing table, wherein the routing table is used for indicating the second intelligent equipment to communicate with the wireless network through the second network interface and the first network interface; and the sending module is used for sending the first login account and the first login password of the wireless hotspot to the second intelligent device.
Optionally, the adding module includes: the first configuration submodule is used for configuring the local IP address for the second network interface; the monitoring submodule is used for starting the dynamic host configuration protocol server to monitor a second network interface and distributing an IP address for second intelligent equipment connected to the wireless hotspot; and the second configuration submodule is used for setting a domain name server for the second network interface.
The principle that the first intelligent device provides the wireless hotspot technology as the relay route is mainly as follows:
1. the first intelligent device is connected with the wireless network through a first network interface wlan 0;
2. adding a new network interface, namely a second network interface, such as p2p 0;
3. keeping the wireless connection of the wlan0 still, and starting a wireless hotspot on the newly added second network interface, wherein the wireless hotspot comprises a first login account and a first login password;
4. configuring an address range of a local IP address for the second network interface p2p 0;
5. starting a dynamic host configuration protocol server, monitoring a second network interface p2p0, and allocating an IP address to a second intelligent device connected to the second network interface through a wireless hotspot;
6. setting a domain name server of a second network interface p2p0 to support domain name resolution;
7. the local routing table is set up so that a connected second smart device via the second network interface p2p0 can communicate with the server from the first network interface wlan 0.
After the first intelligent device configures the wireless hotspot, the first login account and the first login password are sent to the second intelligent device, and the second intelligent device is connected with the wireless hotspot through the first login account and the first login password. After the second intelligent device is connected to the wireless hotspot, the second intelligent device communicates with the server through the second network interface and the first network interface, which is equivalent to the fact that the second intelligent device communicates with the server through the network of the first intelligent device.
Optionally, to ensure that the first smart device can normally connect to the wireless network for communication after the authentication is completed, after receiving the authentication result, the first smart device may detect whether authentication is still needed, and if no prompt message that the authentication is needed is detected, determine that the second smart device has completed authentication in place of the first smart device, and may normally connect to the wireless network, that is, the connection unit includes: the detection module is used for detecting whether the wireless network prompts the first intelligent device to carry out authentication again after receiving the authentication result; and the connection module is used for determining that the first intelligent device is successfully connected to the wireless network under the condition that the detection module does not detect the wireless network and prompts the first intelligent device to authenticate.
According to yet another aspect of the embodiments of the present invention, there is also provided an electronic apparatus for implementing the networking method of the intelligent device, as shown in fig. 10, the electronic apparatus includes a memory and a processor, the memory stores a computer program, and the processor is configured to execute the steps of any one of the method embodiments through the computer program.
Alternatively, fig. 10 is a block diagram of an electronic device according to an embodiment of the invention. As shown in fig. 10, the electronic device may include: one or more processors 1001 (only one of which is shown), at least one communication bus 1002, a user interface 1003, at least one transmitting device 1004, and memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The transmission means 1004 may optionally include standard wired and wireless interfaces.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, when a first intelligent device requests to connect to a wireless network, the first intelligent device detects first prompt information, wherein the first prompt information is used for prompting authentication for connecting to the wireless network;
s2, the first intelligent device sends second prompt information to a second intelligent device, wherein the second prompt information is used for prompting the second intelligent device to perform the authentication so that the first intelligent device is connected to the wireless network;
s3, the first intelligent device receives an authentication result sent by the second intelligent device, wherein the authentication result is used for indicating that the second intelligent device completes the authentication;
s4, in a case that the authentication result indicates that the second smart device completes the authentication, the first smart device determines that the first smart device is successfully connected to the wireless network.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
The memory 1005 may be used to store software programs and modules, such as program instructions/modules corresponding to the networking method and apparatus of the smart device in the embodiment of the present invention, and the processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1005, so as to implement the networking method of the smart device described above. The memory 1005 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 examples, the memory 1005 may further include memory located remotely from the processor 1001, which may be connected to a terminal over 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 1004 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1004 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 1004 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Specifically, the memory 1005 is used for storing preset action conditions, information of a preset authorized user, and an application program.
By adopting the embodiment of the invention, when the first intelligent equipment is connected with the wireless network needing authentication, the authentication of the wireless network is carried out by the second intelligent equipment, thereby solving the technical problem that the intelligent equipment cannot be connected with the wireless network needing authentication due to the fact that the intelligent equipment cannot be authenticated in the prior art, and achieving the technical effect of carrying out authentication to log in the wireless network.
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, when a first intelligent device requests to connect to a wireless network, the first intelligent device detects first prompt information, wherein the first prompt information is used for prompting authentication for connecting to the wireless network;
s2, the first intelligent device sends second prompt information to a second intelligent device, wherein the second prompt information is used for prompting the second intelligent device to perform the authentication so that the first intelligent device is connected to the wireless network;
s3, the first intelligent device receives an authentication result sent by the second intelligent device, wherein the authentication result is used for indicating that the second intelligent device completes the authentication;
s4, in a case that the authentication result indicates that the second smart device completes the authentication, the first smart device determines that the first smart device is successfully connected to the wireless network.
Optionally, the storage medium is further arranged to store a computer program for performing the steps of:
the first intelligent device provides a wireless hotspot to the second intelligent device, wherein the wireless hotspot is used for enabling the second intelligent device to communicate with the wireless network through a wireless relay network provided by the wireless hotspot.
Optionally, the storage medium is further configured to store a computer program for executing the steps included in the method in the foregoing embodiment, which is not described in detail in this embodiment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.