CN114866997A - Method and device for establishing network connection - Google Patents
Method and device for establishing network connection Download PDFInfo
- Publication number
- CN114866997A CN114866997A CN202210498633.4A CN202210498633A CN114866997A CN 114866997 A CN114866997 A CN 114866997A CN 202210498633 A CN202210498633 A CN 202210498633A CN 114866997 A CN114866997 A CN 114866997A
- Authority
- CN
- China
- Prior art keywords
- information
- hotspot
- connection
- password
- temporary
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 80
- 230000006855 networking Effects 0.000 claims abstract description 84
- 230000005540 biological transmission Effects 0.000 claims description 25
- 238000004891 communication Methods 0.000 claims description 23
- 238000012795 verification Methods 0.000 claims description 21
- 230000006870 function Effects 0.000 claims description 17
- 238000003860 storage Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 8
- 238000007639 printing Methods 0.000 claims description 7
- 238000004458 analytical method Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 16
- 230000006872 improvement Effects 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 5
- 238000009826 distribution Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000000969 carrier Substances 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000010408 sweeping Methods 0.000 description 1
- 238000005406 washing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present specification discloses a method and an apparatus for establishing a network connection, in which an intelligent device first generates temporary hotspot information, where the temporary hotspot information includes a device identifier and a connection password for establishing a hotspot connection with the intelligent device. And then the intelligent equipment generates sharing information carrying the temporary hotspot information according to the temporary hotspot information. And the intelligent equipment displays sharing, so that the terminal equipment analyzes temporary hotspot information according to the sharing information, and sends the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection. And the intelligent equipment is connected with the wireless network according to the acquired networking password.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for establishing a network connection.
Background
With the development of computer technology, in order to make it more convenient for users to use various intelligent devices (e.g., printers, intelligent washing machines, sweeping robots, etc.), the intelligent devices are often required to be configured into a network.
At present, the main way to configure the smart device network is: the method comprises the steps of obtaining hotspot information of the intelligent device through terminal devices (such as mobile phones and tablet computers) used by users, and configuring the intelligent device into a network according to the hotspot information of the intelligent device.
Although the method can configure the intelligent device in the network, when a plurality of intelligent devices of the same type manufactured by the same manufacturer need to be configured at the same time, because the hot spot information of the intelligent devices of the same type manufactured by the same manufacturer is often the same, the network configured with the plurality of intelligent devices at the same time causes hot spot information conflict of the intelligent devices, and causes failure in configuring the network. Or each intelligent device is configured independently, that is, after one intelligent device is configured, the hotspot function of the next intelligent device is started to distribute the network to the next intelligent device, and this way can solve the problem of hotspot information conflict of the intelligent devices, but the efficiency of configuring the intelligent device network is low.
Therefore, how to ensure the success rate of configuring the network of the intelligent device under the condition of improving the efficiency of configuring the network of the intelligent device is an urgent problem to be solved.
Disclosure of Invention
The present specification provides a method and an apparatus for establishing a network connection, which partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides a method for establishing a network connection, which is applied to an intelligent device and includes:
the method comprises the steps that the intelligent equipment generates temporary hotspot information, wherein the temporary hotspot information comprises an equipment identifier and a connection password which are used for establishing hotspot connection with the intelligent equipment;
according to the temporary hotspot information, sharing information carrying the temporary hotspot information is generated;
displaying the sharing information so that the terminal equipment can analyze the temporary hotspot information according to the sharing information and send the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection;
and connecting a wireless network according to the acquired networking password.
Optionally, the temporary hotspot information generated by the smart device specifically includes:
the intelligent device generates the temporary hotspot information according to a preset random function, wherein at least one of a device identifier and a connection password which are contained in the temporary hotspot information and used for establishing hotspot connection with the intelligent device is generated randomly.
Optionally, before connecting to a wireless network according to the acquired networking password, the method further includes:
receiving verification information sent by the terminal equipment, wherein the verification information is generated by the terminal equipment based on the networking password;
connecting a wireless network according to the acquired networking password, specifically comprising:
and if the networking password passes the verification according to the verification information, connecting a wireless network according to the networking password.
Optionally, connecting a wireless network according to the obtained networking password, specifically including:
after the networking password is acquired, closing a hotspot module based on which the hotspot connection is established, and starting a wireless module for connecting a wireless network;
and connecting a wireless network according to the wireless module and the networking password.
Optionally, the method further comprises:
and after the connection to the wireless network is determined, broadcasting a message in the wireless network, so that the terminal equipment determines that the intelligent equipment is connected to the wireless network according to the message.
Optionally, the intelligent device establishes the hotspot connection with at most one terminal device at the same time.
Optionally, the smart device comprises: a printer;
displaying the shared information specifically comprises:
displaying the shared information through a display module configured on the printer, and/or printing the shared information through a configured printing device.
Optionally, the form of the shared information includes: at least one of a bar code and a two-dimensional code.
The present specification provides a method for establishing a network connection, which is applied to a terminal device and includes:
the method comprises the steps that terminal equipment analyzes shared information displayed by intelligent equipment to obtain temporary hotspot information carried in the shared information, wherein the temporary hotspot information comprises an equipment identifier and a connection password used for establishing hotspot connection with the intelligent equipment, and the shared information is generated by the intelligent equipment based on the temporary hotspot information;
establishing the hotspot connection according to the temporary hotspot information;
and acquiring a networking password of a wireless network, and sending the networking password to the intelligent equipment through the hotspot connection, so that the intelligent equipment is connected with the wireless network according to the networking password.
Optionally, before sending the networking password to the smart device through the hotspot connection, the method further includes:
acquiring a communication protocol of the intelligent equipment for the terminal equipment;
sending the networking password to the smart device through the hotspot connection, specifically comprising:
according to the communication protocol, adding a designated identification bit in the message carrying the networking password to obtain a transmission message;
and sending the transmission message to the intelligent equipment so that the intelligent equipment determines the networking password as the password transmitted by the terminal equipment according to the designated identification bit carried in the transmission message.
Optionally, the obtaining of the communication protocol of the intelligent device for the terminal device specifically includes:
and analyzing the communication protocol from the sharing information.
This specification provides an apparatus for establishing a network connection, comprising:
the first generation module is used for generating temporary hotspot information by the intelligent equipment, wherein the temporary hotspot information comprises an equipment identifier and a connection password which are used for establishing hotspot connection with the intelligent equipment;
the second generation module is used for generating sharing information carrying the temporary hotspot information according to the temporary hotspot information;
the display module is used for displaying the sharing information so that the terminal equipment can analyze the temporary hotspot information according to the sharing information and send the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection
And the connection module is used for connecting a wireless network according to the acquired networking password.
This specification provides an apparatus for establishing a network connection, comprising:
the terminal device comprises an analysis module and a processing module, wherein the analysis module is used for analyzing the sharing information displayed by the intelligent device by the terminal device so as to acquire temporary hotspot information carried in the sharing information, the temporary hotspot information comprises a device identifier and a connection password which are used for establishing hotspot connection with the intelligent device, and the sharing information is generated by the intelligent device based on the temporary hotspot information;
the connection module is used for establishing the hotspot connection according to the temporary hotspot information;
and the sending module is used for obtaining the networking password of the wireless network and sending the networking password to the intelligent equipment through the hotspot connection, so that the intelligent equipment is connected with the wireless network according to the networking password.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of establishing a network connection.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method of establishing a network connection when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the method for establishing a network connection provided in this specification, an intelligent device first generates temporary hotspot information, where the temporary hotspot information includes a device identifier and a connection password for establishing a hotspot connection with the intelligent device. And then the intelligent equipment generates sharing information carrying the temporary hotspot information according to the temporary hotspot information. And the intelligent equipment displays sharing, so that the terminal equipment analyzes temporary hotspot information according to the sharing information, and sends the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection. And the intelligent equipment is connected with the wireless network according to the acquired networking password.
According to the method, the hot spot information is generated temporarily by the intelligent equipment every time, so that each intelligent equipment can use different hot spot information to establish hot spot connection with the terminal equipment when the network is distributed, and the problem of hot spot conflict is effectively solved. On the basis, a user does not need to start the hot spot function of the next intelligent device after configuring the network of one intelligent device in the process of configuring the network of the multiple intelligent devices, so as to configure the network of the next intelligent device.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
fig. 1 is a flow chart illustrating a method for establishing a network connection provided in the present specification;
FIG. 2 is a schematic diagram illustrating an interaction process of a method for establishing a network connection according to the present disclosure;
fig. 3 is a schematic diagram of an apparatus for establishing a network connection provided in the present specification;
fig. 4 is a schematic diagram of an apparatus for establishing a network connection provided in the present specification;
fig. 5 is a schematic diagram of an electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method for establishing a network connection provided in this specification, including the following steps:
s101: the intelligent device generates temporary hotspot information, wherein the temporary hotspot information comprises a device identifier and a connection password which are used for establishing hotspot connection with the intelligent device.
In this specification, the executing subject for specifically implementing the method for establishing the network connection may be an intelligent device such as a printer, a television, an air conditioner, and the like, and for convenience of description, the method for establishing the network connection provided in this specification will be described below with only the intelligent device as the executing subject.
Before using the smart device, a user often needs to configure a network for the smart device, so that the user can use the smart device more conveniently. At present, the main way to configure the smart device network is: the method comprises the steps that hot spot information of the intelligent device is obtained through terminal devices (such as a mobile phone and a tablet personal computer) used by a user, and the intelligent device is configured into a network by the terminal devices according to the hot spot information of the intelligent device.
Although the intelligent device can be configured in the network in this way, when a plurality of intelligent devices of the same type generated by the same manufacturer need to be configured at the same time (for example, a network in which a print shop needs to configure a plurality of printers), since hot spot information of the intelligent devices of the same type manufactured by the same manufacturer is often the same, the network in which the plurality of intelligent devices are configured at the same time may cause hot spot information collision of the intelligent devices, resulting in network configuration failure. However, if each intelligent device is configured separately, although the problem of hot spot information conflict of the intelligent device can be solved in this way, the efficiency of configuring the intelligent device network is low.
Based on this, the present specification provides a method for establishing a network connection, in a case where a smart device is not configured with a network, a condition that the smart device configures the network is satisfied, for example, a user presses a configuration button configured with the smart device for a long time of 5 seconds. And for another example, if the intelligent device is not connected to the wireless network after being powered on for 10 minutes, determining that the intelligent device meets the condition for configuring the network.
The intelligent device generates temporary hotspot information after meeting the network configuration condition of the intelligent device, wherein the temporary hotspot information comprises a device identifier and a connection password for establishing hotspot connection with the intelligent device. The temporary hotspot information may be temporary hotspot information generated by the intelligent device according to a preset random function. In this specification, the smart device may randomly generate the temporary hotspot information according to information such as the device number of the smart device itself, or may form the temporary hotspot information by using a random number. In order to distinguish the hot spot information of different intelligent devices, at least one of the device identifier and the connection password contained in the temporary hot spot information is randomly generated.
It should be noted that the temporary hotspot information is generated by the intelligent device after the user triggers the condition for configuring the network, and if the user repeatedly triggers the condition for configuring the network, the generated temporary hotspot information may be generated along with the temporary hotspot information generated last time, or may be regenerated again.
If the intelligent device still does not generate the temporary hotspot information after a preset time period after the user triggers the condition that the intelligent device configures the network, the information that the generated temporary hotspot information is overtime is fed back to the user.
According to the process, the intelligent equipment can generate the temporary hotspot information according to the preset random function, so that even if a plurality of intelligent equipment of the same type produced by the same manufacturer have the same default hotspot information, different temporary hotspot information can be generated for establishing hotspot connection between the intelligent equipment and the terminal equipment in actual use, the problem of hotspot conflict can not occur, the network can be configured for the plurality of intelligent equipment simultaneously, and the network configuration efficiency is improved.
S102: and generating sharing information carrying the temporary hotspot information according to the temporary hotspot information.
After the intelligent device generates the temporary hotspot information, the sharing information carrying the temporary hotspot information can be generated according to the temporary hotspot information. The type of the shared information can be a bar code, a two-dimensional code and other information carriers which can carry temporary hotspot information.
In this specification, the intelligent device can encapsulate the communication protocol of the intelligent device for the terminal device into the shared information, so that the terminal device can communicate with the intelligent device according to the communication protocol, interference of other information is avoided, and meanwhile, the safety of information interaction is improved.
That is to say, the intelligent device may determine different communication protocols for different terminal devices, so that the intelligent device and the terminal devices may communicate separately, specifically, the different communication protocols may be specifically distinguished by different designated identification bits, and the designated identification bits may actually effectively distinguish information sent by the different terminal devices. For example, the communication protocol may provide that the identification bit is specified as the first three bits in the return message, and that the return message is determined to be information returned to the smart device by the terminal device when the character of the identification bit is specified as 111.
S103: and displaying the sharing information so that the terminal equipment analyzes the temporary hotspot information according to the sharing information, and sends the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection.
After the intelligent device generates the sharing information, the sharing information can be displayed through a display module configured on the intelligent device. It should be noted that, if the smart device is a printer, the smart device may display the shared information through a display module configured in the printer, or print the shared information through a printing apparatus configured in the printer.
The terminal equipment can analyze the temporary hotspot information according to the sharing information displayed by the intelligent equipment, so that hotspot connection between the intelligent equipment and the terminal equipment is established.
In practical applications, the shared information may include an address of a program for transmitting data through the hotspot connection. After the program is started, the terminal device can establish the hotspot connection between the terminal device and the intelligent device through the program according to the device identification and the connection password contained in the temporary hotspot information carried in the sharing information.
For example, the terminal device may scan the sharing information using the software a, start the program B according to the address provided by the sharing information, and establish a hotspot connection between the terminal device and the intelligent device through the program B according to the device identifier and the connection password.
It should be noted that if multiple terminal devices configure the network of the same intelligent device at the same time, network conflicts are likely to occur, resulting in failure of the distribution network. Therefore, each intelligent device establishes hot spot connection with at most one terminal device at the same time.
In practical applications, if the shared information is displayed through a display module configured to the smart device, the smart device may stop displaying the shared information after determining that the shared information has been acquired by the terminal device. If the shared information is printed by the printing device configured in the printer, the intelligent device may prohibit other terminal devices from establishing the hot spot connection with the intelligent device through the shared information under the condition that it is determined that the hot spot connection is already established with a certain terminal device.
S104: and connecting a wireless network according to the acquired networking password.
After determining that the hotspot connection with the intelligent device is established, the terminal device can provide a window for inputting a password of the wireless network for the user, and the password input by the user in the window is used as the networking password. The password of the wireless network connected before the hotspot connection is established, which is recorded by the terminal device, can also be used as the networking password (this process needs to be performed after the user authorizes the process).
After the terminal device obtains the networking password, the terminal device may add the designated identification bit to the message carrying the networking password according to the communication protocol analyzed from the sharing information, so as to obtain the transmission message. Wherein, the transmission message is a message at least containing the designated identification bit and the networking password.
Of course, the terminal device may also add the Check information into the transmission message, for example, the terminal device may use a Cyclic Redundancy Check (CRC) technique to generate corresponding Check information according to the networking password, and encapsulate the Check information into the transmission message to send to the smart device.
After the terminal device sends the transmission message to the intelligent device, the intelligent device can analyze the transmission message according to the communication protocol after acquiring the transmission message to obtain verification information and a networking password, the intelligent device can verify the networking password received by the intelligent device according to the verification information (for example, whether the received networking password is complete is verified), and if the networking password is determined to pass the verification, the intelligent device can be connected with a wireless network according to the networking password.
In practical applications, the hotspot connection and the wireless network cannot be connected simultaneously. Therefore, after the intelligent device acquires the transmission information through the hotspot connection and determines that the networking password passes the verification, the hotspot module based on which the hotspot connection is established is closed, and the wireless module used for connecting the wireless network is started. The intelligent device can be connected with the wireless network according to the wireless module and the networking password. In this process, the smart device may save the networking password contained in the transmission information in a storage device of the smart device.
After the intelligent device is determined to be connected to the wireless network, the message can be broadcast in the wireless network, so that the terminal device can determine that the intelligent device is connected to the wireless network according to the message.
It should be noted that the terminal device may start timing when sending out the transmission information, and if the preset time elapses, the message broadcasted by the intelligent device is still not received, the terminal device may send the transmission information to the intelligent device again, and prompt the user that the process is overtime.
The method for establishing network connection provided for the present specification is described below with reference to the accompanying drawings, and an interaction process of the whole process in practical application is described as shown in fig. 2.
Fig. 2 is a schematic diagram of an interaction process of a method for establishing a network connection provided in this specification:
in this embodiment, an intelligent device is taken as an example for explanation.
And under the condition that the printer determines that the network is not configured, and after a user presses a configuration key of the printer for 5 seconds, the printer enters a distribution network mode by an instruction AT + CWMMODE of 2, and a hotspot module is started.
After the printer enters the distribution network mode, the printer can randomly generate the device identification and the connection password according to a preset random function. Meanwhile, communication between the printer and the terminal device is based on a Transport Control Protocol (TCP) or a User Data Protocol (UDP) for information interaction. It should be noted that, if the opening time of the hotspot module exceeds the preset 5 minutes, the user is prompted that the distribution network is overtime.
After the printer acquires the equipment identifier and the connection password, the two-dimensional code is generated according to the equipment identifier, the connection password, the communication protocol and the program address, and the printer prints the two-dimensional code.
The terminal device scans the two-dimensional code through software A, starts a program B according to a program address in the two-dimensional code, and establishes hot spot connection between the terminal device and the intelligent device through the program B according to a device identifier and a connection password obtained by analyzing a communication protocol.
After the terminal equipment determines to establish the hotspot connection, a window for inputting a networking password of a wireless network is provided for a user, after the user inputs the networking password, verification information is generated according to the networking password, the networking password is packaged into a transmission message according to a communication protocol, meanwhile, the verification information is packaged into the transmission message, the transmission message is sent to the intelligent equipment through the hotspot connection, after the intelligent equipment receives the transmission protocol, the verification is determined to pass according to the verification message, and then the verified message is sent to the terminal equipment through the hotspot information, so that the terminal equipment interrupts the hotspot connection and is connected into the wireless network.
After the intelligent device passes the verification, the intelligent device can enter a station mode according to an AT + CWMMODE (1 instruction), namely, the hotspot connection is interrupted, and a wireless module for connecting a wireless network is started. The intelligent device is connected with the wireless network according to the networking password and the wireless module, and after the intelligent device is determined to be connected with the wireless network, the intelligent device broadcasts a message of successful connection in the wireless network and prints out a successful networking result to be displayed to a user. And after receiving the message in the wireless network, the terminal equipment displays the successful connection result to the user.
As can be seen from the method for establishing network connection provided in this specification, the intelligent devices can randomly generate hotspot information, so that each intelligent device has different hotspot information, thereby implementing a network in which a plurality of intelligent devices can be configured simultaneously, and avoiding the problem of hotspot collision, thereby improving the efficiency of configuring the network of the intelligent devices and ensuring the success rate of configuring the network.
Fig. 3 is a schematic diagram of an apparatus for establishing a network connection provided in the present specification, including:
the first generating module 301 is configured to generate temporary hotspot information by an intelligent device, where the temporary hotspot information includes a device identifier and a connection password for establishing a hotspot connection with the intelligent device;
a second generating module 302, configured to generate, according to the temporary hotspot information, shared information carrying the temporary hotspot information;
a display module 303, configured to display the shared information, so that the terminal device analyzes the temporary hotspot information according to the shared information, and sends the obtained networking password of the wireless network to the smart device through the established hotspot connection
And the connection module 304 is configured to connect to a wireless network according to the acquired networking password.
Optionally, the first generating module 301 is specifically configured to, by the smart device, generate the temporary hotspot information according to a preset random function, where at least one of a device identifier and a connection password, which are included in the temporary hotspot information and used for establishing a hotspot connection with the smart device, is generated randomly.
Optionally, the connection module 304 is further configured to receive verification information sent by the terminal device before connecting to a wireless network according to the obtained networking password, where the verification information is generated by the terminal device based on the networking password;
the connection module 304 is specifically configured to, if it is determined that the networking password passes the verification according to the verification information, connect a wireless network according to the networking password.
Optionally, the connection module 304 is specifically configured to, after the networking password is obtained, close a hotspot module based on which the hotspot connection is established, and start a wireless module used for connecting a wireless network; and connecting a wireless network according to the wireless module and the networking password.
Optionally, the connection module 304 is further configured to, after determining to connect to the wireless network, broadcast a message in the wireless network, so that the terminal device determines that the intelligent device has connected to the wireless network according to the message.
Optionally, the intelligent device establishes the hotspot connection with at most one terminal device at the same time.
Optionally, the smart device comprises: a printer;
the display module 303 is specifically configured to display the shared information through a display module configured to the printer, and/or print the shared information through a configured printing device.
Optionally, the form of the shared information includes: at least one of a bar code and a two-dimensional code.
Fig. 4 is a schematic diagram of an apparatus for establishing a network connection provided in this specification, including:
the analysis module 401 is configured to analyze, by a terminal device, shared information displayed by an intelligent device to obtain temporary hotspot information carried in the shared information, where the temporary hotspot information includes a device identifier and a connection password used for establishing a hotspot connection with the intelligent device, and the shared information is generated by the intelligent device based on the temporary hotspot information;
a connection module 402, configured to establish the hotspot connection according to the temporary hotspot information;
a sending module 403, configured to obtain a networking password of a wireless network, and send the networking password to the smart device through the hotspot connection, so that the smart device connects to the wireless network according to the networking password.
Optionally, the sending module 403 is further configured to, before sending the networking password to the smart device through the hotspot connection, obtain a communication protocol of the smart device for the terminal device;
the sending module 403 is specifically configured to add a designated identification bit to the message carrying the networking password according to the communication protocol to obtain a transmission message; and sending the transmission message to the intelligent equipment so that the intelligent equipment determines the networking password as the password transmitted by the terminal equipment according to the designated identification bit carried in the transmission message.
Optionally, the parsing module 401 is specifically configured to parse the communication protocol from the shared information.
The present specification also provides a computer readable storage medium having stored thereon a computer program operable to execute a method of establishing a network connection as provided in figure 1 above.
This specification also provides a schematic block diagram of an electronic device corresponding to that of figure 1, shown in figure 5. As shown in fig. 5, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the method for establishing the network connection described in fig. 1 above. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical blocks. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of this description.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.
Claims (15)
1. A method for establishing network connection, which is applied to intelligent equipment and comprises the following steps:
the method comprises the steps that the intelligent equipment generates temporary hotspot information, wherein the temporary hotspot information comprises an equipment identifier and a connection password which are used for establishing hotspot connection with the intelligent equipment;
according to the temporary hotspot information, sharing information carrying the temporary hotspot information is generated;
displaying the sharing information so that the terminal equipment can analyze the temporary hotspot information according to the sharing information and send the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection;
and connecting a wireless network according to the acquired networking password.
2. The method of claim 1, wherein the temporary hotspot information generated by the intelligent device specifically comprises:
the intelligent device generates the temporary hotspot information according to a preset random function, wherein at least one of a device identifier and a connection password which are contained in the temporary hotspot information and used for establishing hotspot connection with the intelligent device is generated randomly.
3. The method of claim 1, wherein before connecting to a wireless network according to the obtained networking password, the method further comprises:
receiving verification information sent by the terminal equipment, wherein the verification information is generated by the terminal equipment based on the networking password;
connecting a wireless network according to the acquired networking password, specifically comprising:
and if the networking password passes the verification according to the verification information, connecting a wireless network according to the networking password.
4. The method according to claim 1, wherein connecting to a wireless network according to the obtained networking password specifically comprises:
after the networking password is acquired, closing a hotspot module based on which the hotspot connection is established, and starting a wireless module for connecting a wireless network;
and connecting a wireless network according to the wireless module and the networking password.
5. The method of claim 1, wherein the method further comprises:
and after the connection to the wireless network is determined, broadcasting a message in the wireless network, so that the terminal equipment determines that the intelligent equipment is connected to the wireless network according to the message.
6. The method of claim 1, wherein the smart device establishes the hotspot connection with at most one terminal device at a time.
7. The method of claim 1, wherein the smart device comprises: a printer;
displaying the shared information specifically comprises:
displaying the shared information through a display module configured on the printer, and/or printing the shared information through a configured printing device.
8. The method according to any one of claims 1 to 7, wherein the form of the shared information comprises: at least one of a bar code and a two-dimensional code.
9. A method for establishing network connection, which is applied to a terminal device, includes:
the method comprises the steps that terminal equipment analyzes shared information displayed by intelligent equipment to obtain temporary hotspot information carried in the shared information, wherein the temporary hotspot information comprises an equipment identifier and a connection password used for establishing hotspot connection with the intelligent equipment, and the shared information is generated by the intelligent equipment based on the temporary hotspot information;
establishing the hotspot connection according to the temporary hotspot information;
and acquiring a networking password of a wireless network, and sending the networking password to the intelligent equipment through the hotspot connection, so that the intelligent equipment is connected with the wireless network according to the networking password.
10. The method of claim 9, wherein prior to sending the networking password to the smart device over the hotspot connection, the method further comprises:
acquiring a communication protocol of the intelligent equipment for the terminal equipment;
sending the networking password to the smart device through the hotspot connection, specifically comprising:
according to the communication protocol, adding a designated identification bit in the message carrying the networking password to obtain a transmission message;
and sending the transmission message to the intelligent equipment so that the intelligent equipment determines the networking password as the password transmitted by the terminal equipment according to the designated identification bit carried in the transmission message.
11. The method of claim 10, wherein obtaining the communication protocol of the smart device for the terminal device specifically comprises:
and analyzing the communication protocol from the sharing information.
12. An apparatus for establishing a network connection, comprising:
the first generation module is used for generating temporary hotspot information by the intelligent equipment, wherein the temporary hotspot information comprises an equipment identifier and a connection password for establishing hotspot connection with the intelligent equipment;
the second generation module is used for generating sharing information carrying the temporary hotspot information according to the temporary hotspot information;
the display module is used for displaying the sharing information so that the terminal equipment can analyze the temporary hotspot information according to the sharing information and send the acquired networking password of the wireless network to the intelligent equipment through the established hotspot connection;
and the connection module is used for connecting a wireless network according to the acquired networking password.
13. An apparatus for establishing a network connection, comprising:
the terminal device comprises an analysis module and a processing module, wherein the analysis module is used for analyzing the sharing information displayed by the intelligent device by the terminal device so as to acquire temporary hotspot information carried in the sharing information, the temporary hotspot information comprises a device identifier and a connection password which are used for establishing hotspot connection with the intelligent device, and the sharing information is generated by the intelligent device based on the temporary hotspot information;
the connection module is used for establishing the hotspot connection according to the temporary hotspot information;
and the sending module is used for obtaining the networking password of the wireless network and sending the networking password to the intelligent equipment through the hotspot connection, so that the intelligent equipment is connected with the wireless network according to the networking password.
14. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1 to 8 or 9 to 11.
15. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 8 or 9 to 11 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210498633.4A CN114866997A (en) | 2022-05-09 | 2022-05-09 | Method and device for establishing network connection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210498633.4A CN114866997A (en) | 2022-05-09 | 2022-05-09 | Method and device for establishing network connection |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114866997A true CN114866997A (en) | 2022-08-05 |
Family
ID=82637700
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210498633.4A Pending CN114866997A (en) | 2022-05-09 | 2022-05-09 | Method and device for establishing network connection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114866997A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170374552A1 (en) * | 2015-05-12 | 2017-12-28 | Zhejiang Shenghui Lighting Co., Ltd | Smart networking method and smart device |
CN109152093A (en) * | 2018-10-26 | 2019-01-04 | 歌尔科技有限公司 | Wireless network connecting method, mobile terminal, smart machine and storage medium |
CN111148095A (en) * | 2020-01-03 | 2020-05-12 | 华为技术有限公司 | Method for establishing Wi-Fi connection between terminal and wireless access point |
CN111935802A (en) * | 2020-07-24 | 2020-11-13 | 深圳创维数字技术有限公司 | Equipment network distribution method and device and computer readable storage medium |
CN113099450A (en) * | 2019-12-19 | 2021-07-09 | 海信集团有限公司 | Intelligent device and network distribution method thereof, mobile terminal and network distribution system |
-
2022
- 2022-05-09 CN CN202210498633.4A patent/CN114866997A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170374552A1 (en) * | 2015-05-12 | 2017-12-28 | Zhejiang Shenghui Lighting Co., Ltd | Smart networking method and smart device |
CN109152093A (en) * | 2018-10-26 | 2019-01-04 | 歌尔科技有限公司 | Wireless network connecting method, mobile terminal, smart machine and storage medium |
CN113099450A (en) * | 2019-12-19 | 2021-07-09 | 海信集团有限公司 | Intelligent device and network distribution method thereof, mobile terminal and network distribution system |
CN111148095A (en) * | 2020-01-03 | 2020-05-12 | 华为技术有限公司 | Method for establishing Wi-Fi connection between terminal and wireless access point |
CN111935802A (en) * | 2020-07-24 | 2020-11-13 | 深圳创维数字技术有限公司 | Equipment network distribution method and device and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109587052A (en) | A kind of multilink data transmission method and device | |
CN111343635A (en) | Payment assistance method, device and equipment | |
CN108764392A (en) | Method for processing business, device and equipment | |
CN111796860B (en) | Micro front end scheme implementation method and device | |
CN108990059B (en) | Verification method and device | |
WO2019184658A1 (en) | Profile switching method and apparatus, and mobile terminal | |
CN106713004B (en) | Router adaptation method and system | |
CN112954717B (en) | Household appliance network distribution method and device based on H5 page | |
CN105630461A (en) | Managing method of android application interface | |
CN110012455B (en) | Account information management method and device and electronic equipment | |
EP3051921A1 (en) | Method and system for automatically switching user modes by identifying imsis | |
CN104346560A (en) | Security authentication method and security authentication device | |
WO2023151439A1 (en) | Account login processing | |
CN110825448A (en) | Method, device, electronic equipment and storage medium for realizing mutual calling of multiple service modules | |
TWI748438B (en) | Content display method, device and electronic equipment | |
CN105631069A (en) | Intelligent equipment control method and device | |
CN118785526A (en) | Information transmission method, device, equipment and medium | |
CN111726849B (en) | WiFi hotspot type identification method and device and storage medium | |
CN114866997A (en) | Method and device for establishing network connection | |
CN103685249B (en) | A kind of register the method for application, terminal and server | |
CN105142159A (en) | Test system for L2 (Layer 2) in LTE (Long Term Evolution) base station | |
US11533228B2 (en) | Method for information configuration, apparatus, electronic device, storage medium and program product | |
CN114968456A (en) | Method and device for controlling terminal | |
CN103138952B (en) | Reminding business method to set up, system and exchange network | |
CN112601244B (en) | Air interface test method, device and equipment of wireless communication network |
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 |