Wireless network connection method, terminal and computer storage medium
Technical Field
The present invention relates to the field of networks, and in particular, to a wireless network connection method, a terminal, and a computer storage medium.
Background
The rapid development of the wireless network technology provides great convenience for people to surf the internet anytime and anywhere. After the terminal is connected to the wireless network, the user can conveniently perform operations such as web browsing, video watching and the like through the terminal. Because the wireless network is usually encrypted, when the control terminal is connected to the wireless network, a user needs to input connection information such as a password into a wireless access point connection interface corresponding to the wireless network, so that the wireless access point corresponding to the wireless network judges whether to establish wireless network connection with the terminal according to the connection information sent by the terminal. However, when the input password is wrong, not only the connection between the terminal and the wireless network fails, but also when the user directly clicks the wireless network identifier, such as the service set identifier, to perform network connection next time, the terminal uses the password used for initiating the network connection request to the wireless network last time to perform connection, which continuously causes that the connection to the wireless network is not possible, and user experience is affected.
Disclosure of Invention
The invention aims to provide a wireless network connection method, a terminal and a computer storage medium, which can effectively improve the user experience.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a wireless network connection method, which is applied to a terminal, and the method includes:
sending a network connection request for connecting a first wireless network, wherein the network connection request at least comprises a password to be verified;
obtaining a feedback result aiming at the network connection request;
and deleting the password to be verified in the network connection request when the failure of connecting the first wireless network is determined according to the feedback result.
As one embodiment, before issuing the network connection request for connecting to the first wireless network, the method further includes:
popping up a password input box after receiving an operation instruction for connecting the first wireless network;
acquiring a password to be verified input in the password input box by a user;
after deleting the password to be authenticated in the network connection request, the method further includes:
and clearing the password to be verified input in the password input box.
As an embodiment, after deleting the password to be authenticated in the network connection request, the method further includes:
and popping up a blank password input box after receiving an operation instruction for connecting the first wireless network.
As one of the implementation modes, the method further comprises the following steps:
popping up a password input box after receiving an operation instruction for connecting a second wireless network;
sending a prompt message, wherein the prompt message is used for prompting a user whether to paste the password to be verified to the password input box;
and if the determined pasting operation is detected, pasting the password to be verified into the password input box.
As one of the implementation modes, the method further comprises the following steps:
and after receiving an operation instruction for switching the format of the password to be verified in the password input box, switching the format of the password to be verified according to the operation instruction for switching the format.
As one of the implementation modes, the method further comprises the following steps:
recording the mismatch relation between the password to be verified and the first wireless network, and sending a reminding message for reminding a user of password input error when detecting that the password input by the user is the same as the password to be verified when the user is connected with the first wireless network.
As one embodiment, the sending out the network connection request for connecting to the first wireless network includes:
acquiring a service set identifier of a first wireless fidelity network to be connected;
and sending the network connection request to a corresponding wireless access point according to the service set identification of the first wireless fidelity network.
As an embodiment, the obtaining a feedback result for the network connection request includes:
after sending the network connection request, detecting whether a connection success response message aiming at the network connection request is received within a set time threshold;
if not, the first wireless network is failed to be connected;
if yes, the first wireless network is successfully connected.
In a second aspect, an embodiment of the present invention further provides a terminal, including: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor is configured to, when running the computer program, implement the steps of the wireless network connection method of the first aspect.
In a third aspect, an embodiment of the present invention provides a computer storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to the first aspect are implemented.
The wireless network connection method, the terminal and the computer storage medium provided by the embodiment of the invention are applied to the terminal and comprise the following steps: sending a network connection request for connecting a first wireless network, wherein the network connection request at least comprises a password to be verified; obtaining a feedback result aiming at the network connection request; and deleting the password to be verified in the network connection request when the failure of connecting the first wireless network is determined according to the feedback result. Therefore, the password used by the network connection can be automatically deleted when the network connection fails, so that the password is not used to initiate the connection operation when the subsequent network connection is performed, the problem that the network connection fails due to the fact that the wrong password is repeatedly used for network connection is solved, and the user experience is improved.
Drawings
Fig. 1 is a flowchart illustrating a wireless network connection method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further elaborated by combining the drawings and the specific embodiments in the specification. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a wireless network connection method provided in the embodiment of the present invention may be applied to a terminal, and includes the following steps:
step S101: sending a network connection request for connecting a first wireless network, wherein the network connection request at least comprises a password to be verified;
in this embodiment, a Wireless network is taken as a Wireless Fidelity (WIFI) network for example, and the terminal may be a mobile phone, a tablet computer, a car machine, or other devices capable of providing a network connection function. When the terminal scans an SSID (Service Set Identifier) broadcasted by a wireless access point of the first wireless network, the SSID is added to a wireless access point list, and the SSID can be used for identifying the first wireless network and also can be used for identifying the wireless access point. If the user wants the terminal to establish network connection with the wireless access point, namely the terminal is connected with a first wireless network corresponding to the wireless access point, after the user clicks the SSID in the wireless access point list, the terminal pops up a password input interface comprising information such as a password input box and the like, so that the user can input a password to be verified in the password input box, and after receiving a connection operation instruction, a network connection request for connecting the first wireless network is sent to the wireless access point. The network connection request at least includes a password to be authenticated, and may also include information such as an SSID.
In one embodiment, the sending out the network connection request for connecting to the first wireless network includes: acquiring a service set identifier of a first wireless fidelity network to be connected; and sending the network connection request to a corresponding wireless access point according to the service set identification of the first wireless fidelity network. The first wireless fidelity network to be connected is a WIFI network to which a user expects the terminal to be connected, the terminal can acquire an SSID (service set identifier) sent out by broadcasting by a wireless access point corresponding to the first wireless fidelity network to be connected in a scanning mode in advance, the acquired SSID is added into a wireless access point list, and when the first wireless fidelity network corresponding to the SSID selected by the user is received to be connected, a network connection request is sent to the corresponding wireless access point according to the SSID so as to request for establishing wireless network connection with the wireless access point. For example, taking the terminal as a mobile phone and the mobile phone having opened a Wireless network function as an example, when a user enters a Wireless Local Area Network (WLAN) connection interface of the mobile phone, the interface displays an available WLAN list, an SSID list and a corresponding signal strength identifier are displayed in the WLAN list, and if the user clicks any SSID or a trigger Area corresponding to the SSID, the mobile phone receives an operation instruction for connecting a WIFI network corresponding to the SSID, so as to pop up a password input box. And after the user inputs the password to be verified in the password input box, the terminal can acquire the password to be verified input in the password input box by the user and initiate a network connection request to the access point corresponding to the SSID after receiving a connection operation instruction.
Step S102: obtaining a feedback result aiming at the network connection request;
here, after the terminal issues a network connection request for connecting to the first wireless network to the wireless access point, the terminal obtains a feedback result for the network connection request to detect whether the terminal has successfully connected to the first wireless network according to the feedback result. The terminal may obtain a feedback result for the network connection request, where the feedback result is sent by the wireless access point for the network connection request, and may also be generated according to whether a response message returned by the wireless access point for the network connection request is received. In one embodiment, the step S102, the obtaining a feedback result for the network connection request includes: after sending the network connection request, detecting whether a connection success response message aiming at the network connection request is received within a set time threshold; if not, the first wireless network is failed to be connected; if yes, the first wireless network is successfully connected. The time threshold may be set according to actual requirements, for example, the time threshold may be set to 1 second, 3 seconds, or the like. And the terminal starts timing after sending the network connection request, and when the timing time reaches the set time threshold value and a connection success response message returned by the wireless access point aiming at the network connection request is not received, the situation that the password to be verified is wrong possibly occurs, so that the terminal fails to be connected with the first wireless network. Therefore, the feedback result aiming at the network connection request is obtained in time, so that the subsequent processing of the network connection can be carried out in time according to the feedback result, the speed of the network connection is improved, and the user experience is further improved.
Step S103: and deleting the password to be verified in the network connection request when the failure of connecting the first wireless network is determined according to the feedback result.
Specifically, when the terminal determines that the first wireless network is failed to connect according to the feedback result, the password to be verified in the network connection request is deleted, so that the password is not used to initiate connection operation in subsequent network connection, and the problem of network connection failure caused by repeated utilization of wrong passwords for network connection is solved.
In the prior art, after a terminal initiates a network connection request to a wireless access point according to a password to be verified input by a user, if the terminal fails to connect to a WIFI network corresponding to the wireless access point, when a next time a user initiates a network connection operation to the WIFI network again, the terminal automatically retransmits the network connection request to the wireless access point by using the password to be verified in the previous network connection request, and the terminal continues to fail to connect to the WIFI network. However, by deleting the password to be verified used in the failure of connecting the wireless network in time, the terminal cannot send a network connection request to the wireless access point according to the wrong password to be verified when the terminal receives the next network connection operation which is initiated again to the WIFI network by the user.
In summary, in the wireless network connection method provided in the above embodiment, the terminal sends a network connection request for connecting to the first wireless network, where the network connection request at least includes a password to be verified; obtaining a feedback result aiming at the network connection request; and deleting the password to be verified in the network connection request when the failure of connecting the first wireless network is determined according to the feedback result. Therefore, the password used by the network connection can be automatically deleted when the network connection fails, so that the password is not used to initiate the network connection operation when the subsequent network connection is performed, the problem of network connection failure caused by repeated utilization of wrong passwords for network connection is solved, and the user experience is improved.
In one embodiment, before issuing the network connection request for connecting to the first wireless network, the method further includes:
popping up a password input box after receiving an operation instruction for connecting the first wireless network;
acquiring a password to be verified input in the password input box by a user;
after deleting the password to be authenticated in the network connection request, the method further includes:
and clearing the password to be verified input in the password input box.
It can be understood that, in the prior art, when the terminal is connected to the first wireless network for the first time, the user needs to input the password to be authenticated in the password input box popped up by the terminal. And after the terminal sends a network connection request to the wireless access point corresponding to the first wireless network through the password to be verified, if the interface of the terminal is always kept at the interface with the password input box, that is, the interface of the terminal is not switched by the user, after the terminal fails to connect the first wireless network, the terminal still displays the interface containing the password input box, and the password input box still retains the password to be verified input before. If the user needs to input the password again in the password input box, the password to be verified reserved in the password input box needs to be deleted firstly, and then a new password is input in the password input box. However, after the network connection failure is detected, the password to be verified in the password input box is cleared in time, so that the operation of the user can be reduced, and the user experience is further improved.
In an embodiment, after deleting the password to be authenticated in the network connection request, the method may further include:
and popping up a blank password input box after receiving an operation instruction for connecting the first wireless network.
It can be understood that, in the prior art, when the terminal is connected to the first wireless network for the first time, the user needs to input the password to be authenticated in the password input box popped up by the terminal. And after the terminal sends a network connection request to the wireless access point corresponding to the first wireless network through the password to be verified, if the interface of the terminal is not maintained at the interface displaying the password input box, namely the interface of the user switching the terminal, after the terminal fails to connect the first wireless network, if the terminal receives the operation instruction of connecting the first wireless network again, the terminal pops up the connection interface without popping up the password input box, or the terminal pops up only the password input box reserved with the password to be verified. If the user needs to input the password again in the password input box, the terminal needs to pop up the password input box through corresponding setting operation, or the password to be verified reserved in the password input box is deleted firstly, and then a new password is input in the password input box. However, after the failure of connecting the first wireless network is detected, if the operation instruction of connecting the first wireless network is received again, the blank password input box is directly popped up, so that the operation of the user can be reduced, and the use experience of the user is further improved.
In one embodiment, the method may further include:
popping up a password input box after receiving an operation instruction for connecting a second wireless network;
sending a prompt message, wherein the prompt message is used for prompting a user whether to paste the password to be verified to the password input box;
and if the determined pasting operation is detected, pasting the password to be verified into the password input box.
Here, since the number of the wireless networks may be larger and the corresponding passwords may also be larger, the user may confuse the correspondence relationship between the wireless networks and the passwords, for example, regarding the password corresponding to the second wireless network as the password corresponding to the first wireless network. Or, a user may make a mistake due to personal reasons, for example, the user needs to connect to the second wireless network, but the user carelessly and carelessly selects to connect to the first wireless network and inputs the password corresponding to the second wireless network into the password input box, so that the terminal connects to the first wireless network by using the password corresponding to the second wireless network. Therefore, after receiving an operation instruction for connecting the second wireless network, the terminal pops up a password input box and sends a prompt message to prompt a user whether to paste a password to be verified, which is used when the first wireless network fails to be connected, to the password input box. And if the pasting operation of pasting the password to be verified into the password input box is detected, pasting the password to be verified into the password input box. Therefore, under the condition that the password to be verified is the correct connection password corresponding to the second wireless network and the user does not need to input the password again, the terminal can be successfully connected with the second wireless network, and the user experience is further improved.
In one embodiment, the method further comprises: and after receiving an operation instruction for switching the format of the password to be verified in the password input box, switching the format of the password to be verified according to the operation instruction for switching the format.
Here, since the format of the password may be various, for example, characters in the password are all capital letters, characters in the password are all lowercase letters, and the like, if the user does not switch the format in time when inputting the password in the password input box, it may cause the input password to be wrong. For example, a correct password should contain all characters that are uppercase letters, while an entered password contains all characters that are lowercase letters. Therefore, after the terminal fails to connect the first wireless network according to the password to be verified, if the user selects to reconnect the first wireless network, and the terminal receives an operation instruction for format switching of the password to be verified in the password input frame, the format of the password to be verified is switched according to the operation instruction for format switching, so that network connection operation is initiated on the first wireless network according to the password to be verified after format switching. The receiving of the operation instruction for performing format switching on the password to be authenticated in the password input box may be detecting that a format switching virtual key is triggered, such as being clicked or touched. The format of the password to be verified is switched according to the operation instruction for switching the format, the format of all characters included in the password to be verified can be switched according to the operation instruction for switching the format, and the format of part of characters selected by the user in the password to be verified can be switched according to the operation instruction for switching the format. Therefore, format switching is carried out on the password to be verified directly, the user can be prevented from inputting the password again, and the user experience is further improved.
In one embodiment, the method further comprises: recording the mismatch relation between the password to be verified and the first wireless network, and sending a reminding message for reminding a user of password input error when detecting that the password input by the user is the same as the password to be verified when the user is connected with the first wireless network.
It is understood that when the user forgets the password for connecting to the first wireless network, the user may try to initiate a network connection operation with a different password for the first wireless network, and in practical applications, the same password may be used, for example, the password used for connecting to the first wireless network for the first time may be the same as the password used for connecting to the first wireless network for the fifth time. Therefore, after the terminal fails to connect the first wireless network by using the password to be verified, a prompt message for prompting the user of password input error is sent out by recording the mismatch relation between the password to be verified and the first wireless network when the condition that the password input when the user connects the first wireless network is the same as the password to be verified subsequently is detected, so that the user is prompted to input the password again. The password input by the user when the user is detected to be connected to the first wireless network is the same as the password to be verified, which may be the same as the password to be verified input by the user in the password input box. Therefore, the user is prevented from repeatedly inputting wrong passwords, and the user experience is further improved.
Based on the same inventive concept of the foregoing embodiments, the present embodiment describes technical solutions of the foregoing embodiments in detail through specific examples. Taking the terminal as a vehicle machine as an example, after the vehicle machine is started, a user inputs a password in a password input box by clicking network setting, and then clicks a connection key and the like to trigger the vehicle machine to send a network connection request to a wireless access point. When the vehicle machine detects that the WIFI network cannot be connected, the background automatically forgets the password, namely, the vehicle machine forgets the network. Therefore, when the user clicks the service set identifier of WIFI next time, the car machine pops up the password input box, the user knows that the password is input wrongly, and the user can input the password again in the password input box
Based on the same inventive concept as the foregoing embodiment, an embodiment of the present invention provides a terminal, as shown in fig. 2, including: a processor 310 and a memory 311 for storing computer programs capable of running on the processor 310; the processor 310 illustrated in fig. 2 is not used to refer to the number of the processors 310 as one, but is only used to refer to the position relationship of the processor 310 relative to other devices, and in practical applications, the number of the processors 310 may be one or more; similarly, the memory 311 shown in fig. 2 is also used in the same sense, i.e. it is only used to refer to the position relationship of the memory 311 with respect to other devices, and in practical applications, the number of the memory 311 may be one or more. The processor 310 is configured to implement the wireless network connection method applied to the terminal when running the computer program.
The terminal may further include: at least one network interface 312. The various components in the terminal are coupled together by a bus system 313. It will be appreciated that the bus system 313 is used to enable communications among the components connected. The bus system 313 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 313 in FIG. 2.
The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 311 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the terminal. Examples of such data include: any computer program for operation on the terminal, such as operating systems and application programs; contact data; telephone book data; a message; a picture; video, etc. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services. Here, the program that implements the method of the embodiment of the present invention may be included in an application program.
Based on the same inventive concept of the foregoing embodiments, this embodiment further provides a computer storage medium, where a computer program is stored in the computer storage medium, where the computer storage medium may be a Memory such as a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash Memory (flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read Only Memory (CD-ROM), and the like; or may be a variety of devices including one or any combination of the above memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc. The computer program stored in the computer storage medium implements the wireless network connection method applied to the above terminal when being executed by a processor. Please refer to the description of the embodiment shown in fig. 1 for a specific step flow realized when the computer program is executed by the processor, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps of implementing the above method embodiments may be implemented by hardware associated with program instructions, and the program may be stored in a computer readable storage medium, and when executed, performs the steps including the above method embodiments. The foregoing storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
As used herein, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, including not only those elements listed, but also other elements not expressly listed.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.