CN113613346B - Network connection method, device, storage medium and electronic equipment - Google Patents

Network connection method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113613346B
CN113613346B CN202110783059.2A CN202110783059A CN113613346B CN 113613346 B CN113613346 B CN 113613346B CN 202110783059 A CN202110783059 A CN 202110783059A CN 113613346 B CN113613346 B CN 113613346B
Authority
CN
China
Prior art keywords
network
router
connection
wireless network
reconnection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110783059.2A
Other languages
Chinese (zh)
Other versions
CN113613346A (en
Inventor
孙月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202110783059.2A priority Critical patent/CN113613346B/en
Publication of CN113613346A publication Critical patent/CN113613346A/en
Application granted granted Critical
Publication of CN113613346B publication Critical patent/CN113613346B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The application discloses a network connection method, a device, a storage medium and electronic equipment, and relates to the technical field of networks, wherein the method comprises the following steps: receiving interrupt indication information sent by a router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal; when the disconnection of the wireless network connection with the router is monitored, obtaining the interruption reason information of the disconnection of the wireless network connection from the interruption indication information; and if the interruption reason information accords with the network reconnection condition, performing network non-inductive reconnection operation on a network layer so as to restore wireless network connection with the router. The method and the device realize the user noninductive efficient network reconnection, and effectively improve the network connection stability.

Description

Network connection method, device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of network technologies, and in particular, to a network connection method, a device, a storage medium, and an electronic apparatus.
Background
Currently, wireless network technology is becoming more and more popular, and stability of wireless network connection is particularly important when a user uses network equipment. Instability of the wireless network connection may lead to a reduced user experience, such as poor experience of playing video, game, etc.
However, in the current wireless network connection, if the wireless network is unstable, the router will actively disconnect the network, at this time, the wireless network will be disconnected, the user will perceive the disconnection of the network, and the video playing will generate a clip, resulting in lower stability of the wireless network connection.
Disclosure of Invention
The embodiment of the application provides a scheme, which can realize the high-efficiency network reconnection without user feel and effectively improve the network connection stability.
In order to solve the technical problems, the embodiment of the application provides the following technical scheme:
according to one embodiment of the present application, a network connection method includes: receiving interrupt indication information sent by a router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal; when the disconnection of the wireless network connection with the router is monitored, obtaining the interruption reason information of the disconnection of the wireless network connection from the interruption indication information; and if the interruption reason information accords with the network reconnection condition, performing network non-inductive reconnection operation on a network layer so as to restore wireless network connection with the router.
In some embodiments of the present application, the receiving the interrupt indication information sent by the router includes: establishing wireless network connection with the router, triggering the router to acquire a network abnormal state when the wireless network connection is abnormal, and generating a de-authentication frame carrying interrupt reason information according to the network abnormal state; and receiving the interrupt indication information sent by the router, wherein the interrupt indication information comprises a de-authentication frame.
In some embodiments of the present application, before the network layer performs the network non-inductive loop operation if the interruption reason information meets the network loop-back condition, the method further includes: obtaining an interrupt reason matching table, wherein the interrupt reason matching table stores preset interrupt reason information; matching the interrupt reason information with the preset interrupt reason information to obtain matching degree; and when the matching degree is higher than a preset threshold value, determining that the interruption reason information accords with a network reconnection condition.
In some embodiments of the present application, the performing, at a network layer, a network sensorless loop operation to restore a wireless network connection with the router includes: constructing a network reconnection unit for performing network non-sense reconnection operation on a network layer; and based on the network connection unit, requesting connection from the router at a network layer by hiding the connection state from an application layer so as to restore wireless network connection with the router.
In some embodiments of the present application, the building a network reconnection unit for performing a network non-inductive reconnection operation at a network layer includes: adding a target mark in a wireless network card management unit, wherein the target mark is used for indicating the wireless network card management unit to perform network non-inductive loop-back operation on a network layer; and taking the wireless network card management unit added with the target mark as the network reconnection unit.
In some embodiments of the present application, the method further comprises: when the router is connected with the wireless network, the network connecting unit is converted into a sensitive connecting unit; and carrying out network inductive connection operation based on the inductive connection unit so as to inform an application layer of the network connection state.
In some embodiments of the present application, the network reconnection unit includes a wireless network card management unit to which a target flag is added; the converting the network reconnection unit into a sensible connection unit includes: and replacing the target mark with a conversion mark so as to convert the wireless network card management unit into the inductive connection unit.
According to one embodiment of the present application, a network connection device, the device includes: the receiving module is used for receiving interrupt indication information sent by the router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal; the monitoring module is used for acquiring interrupt reason information of the wireless network from the interrupt indication information when the disconnection of the wireless network is monitored; and the reconnection module is used for carrying out network non-sense reconnection operation on a network layer if the interruption reason information accords with the network reconnection condition so as to restore wireless network connection with the router.
According to another embodiment of the present application, a storage medium has stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method described in the embodiments of the present application.
According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and the processor reads the computer program stored in the memory to execute the method according to the embodiment of the application.
In the embodiment of the application, interrupt indication information sent by a router can be received, wherein the interrupt indication information is generated when the router is abnormally connected with a wireless network; when the disconnection of the wireless network connection with the router is monitored, obtaining interrupt reason information of the disconnection of the wireless network connection from interrupt instruction information; if the interruption reason information accords with the network reconnection condition, network non-sense reconnection operation is carried out on the network layer so as to restore wireless network connection with the router.
In this way, after the router generates the interrupt indication information when the wireless network connection is abnormal, the interrupt indication information is received, so that the network can be indicated to have an abnormal state, when the wireless network connection is monitored to be disconnected, interrupt reason information of the wireless network caused by the abnormal state can be obtained from the interrupt indication information, further, if the interrupt reason information accords with the network reconnection condition, the network non-inductive reconnection operation is triggered at the network layer, the triggering efficiency of reconnection is effectively improved, meanwhile, the network non-inductive reconnection operation at the network layer further avoids redundant reconnection inductive operation to improve the network connection efficiency, and further, the user non-inductive high-efficiency network reconnection can be realized on the whole, and the network connection stability is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 shows a schematic diagram of a system to which embodiments of the present application may be applied.
Fig. 2 shows a flow chart of a network connection method according to one embodiment of the present application.
Fig. 3 shows a block diagram of a network connection device according to one embodiment of the present application.
Fig. 4 shows a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise indicated. Thus, these steps and operations will be referred to in several instances as being performed by a computer, which as referred to herein performs operations that include processing units by the computer that represent electronic signals that represent data in a structured form. This operation transforms the data or maintains it in place in the computer's memory system, which may reconfigure or otherwise alter the computer's operation in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the foregoing text and are not meant to be limiting, and one skilled in the art will recognize that various steps and operations described below may also be implemented in hardware.
Fig. 1 shows a schematic diagram of a system 100 to which embodiments of the present application may be applied. As shown in fig. 1, system 100 may include a router 101 and a terminal 102. The terminal 102 may be any computer device such as a computer, a mobile phone, a smart watch, a home appliance, etc. Router 101 is a gateway device. The server 101 and the terminal 102 may be connected by a wireless network connection.
In an embodiment, the terminal 102 is a home appliance, and the router 101 is a gateway device for the home appliance to connect to a network through a wireless network connection, so that the service performance of the home appliance can be effectively improved according to the embodiment of the application. The home appliances may be a refrigerator, a television, an air conditioner, a humidifier, and the like.
In one embodiment of the present example, the terminal 102 may receive interrupt indication information sent by the router 101, where the interrupt indication information is generated by the router 101 when the wireless network connection is abnormal; when the disconnection of the wireless network connection with the router is monitored, obtaining interrupt reason information of the disconnection of the wireless network connection from interrupt instruction information; if the interruption reason information meets the network connection condition, network connection is restored to the router 101 by performing network connection operation without sense at the network layer.
Fig. 2 schematically shows a flow chart of a network connection method according to one embodiment of the present application. The main body of execution of the network connection method may be any device, such as the terminal 102 shown in fig. 1.
As shown in fig. 2, the network connection method may include steps S210 to S230.
Step S210, receiving interrupt indication information sent by a router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal;
step S220, when the disconnection of the wireless network connection with the router is monitored, obtaining the interruption reason information of the disconnection of the wireless network connection from the interruption instruction information;
step S230, if the interruption reason information accords with the network connection condition, the network connection operation is performed in the network layer without sense, so as to restore the wireless network connection with the router.
The specific procedure of each step performed when the network connection is performed is described below.
In step S210, interrupt instruction information sent by the router is received, the interrupt instruction information being generated when the wireless network connection of the router is abnormal.
In the embodiment of the present example, the terminal and the router establish a wireless network connection in advance, and when the router senses that the wireless network connection is abnormal, the router triggers the router to generate interrupt indication information. The wireless network connection abnormality may be an abnormality caused by unstable network connection.
The router sends the interrupt indication information to the terminal after generating the interrupt indication information, and the router can disconnect the wireless network connection after sending the interrupt indication information only when the wireless network connection is abnormal and is not interrupted.
In one embodiment, in step S210, receiving interrupt indication information sent by a router includes:
establishing wireless network connection with a router, triggering the router to acquire a network abnormal state when the wireless network connection is abnormal, and generating a de-authentication frame carrying interrupt reason information according to the network abnormal state; and receiving interrupt indication information sent by the router, wherein the interrupt indication information comprises a de-authentication frame.
When the wireless network connection is abnormal, the triggering router can collect network abnormal states, the router can inquire a preset terminal reason information table according to the network abnormal states, inquire interrupt reason information matched with the network abnormal state information from the preset terminal reason information table, and then generate a de-authentication frame carrying the interrupt reason information.
The Deauthentication frame is a deauth frame, and is used for deauthenticating identity, that is, ending authentication relationship between the terminal and the router, and after the router generates the Deauthentication frame, disconnecting the authentication relationship between the wireless network connection ending terminal and the router.
After the router generates the de-authentication frame carrying the interruption reason information, the de-authentication frame is sent to the terminal, the terminal can immediately judge that the network is about to be interrupted based on the fact that the de-authentication frame is received as interruption indication information, and immediately acquire the terminal reason information to determine whether the network non-inductive reconnection operation is carried out or not, so that the network reconnection efficiency is further improved.
In step S220, when it is detected that the wireless network connection with the router is disconnected, interruption cause information of the disconnection of the wireless network is acquired from the interruption instruction information.
In an embodiment of the present example, the terminal may determine that the wireless network connection is disconnected when receiving the interruption indication information and detecting that data cannot be transmitted through the network. In one embodiment, the terminal may determine that the wireless network connection is disconnected immediately after receiving the interruption indication information. When determining that the wireless network connection is disconnected, the terminal can acquire interruption reason information of the wireless network connection disconnection carried in the interruption instruction information.
The terminal can acquire the interrupt reason information marked by the feature marks from the interrupt instruction information, and the specific marks such as "# definition" ensure the accuracy of the interrupt reason information.
In step S230, if the interruption reason information meets the network connection condition, the network connection is restored with the router by performing a network connection operation without sense in the network layer.
In this example embodiment, the network reconnection condition is a preset condition for judging whether to perform network reconnection, so as to improve the success rate of network reconnection. In one embodiment, the network connection condition may be a connection condition based on an interruption reason matching table, and if interruption reason information is in the interruption reason matching table, it is determined that the interruption reason information meets the network connection condition. In one embodiment, the network reconnection condition may be a reconnection condition based on a hash algorithm, the interruption cause information may be hashed based on a preset hash function, and if a value obtained by hashing the interruption cause information based on the preset hash function is a specific value, it is determined that the interruption cause information meets the network reconnection condition.
The network layer is the wireless network background connection relative to the application layer in the terminal. The network non-sense reconnection operation is carried out on the network layer, namely, the terminal directly carries out wireless network reconnection application on the router in the background, and the operation of information interaction with the application layer is not carried out, so that redundant connection operation can be further avoided, and the network reconnection efficiency is improved.
In one embodiment, if the interruption reason information meets the network reconnection condition, before the network layer performs the network non-inductive reconnection operation, the method further includes:
obtaining an interrupt reason matching table, and storing preset interrupt reason information in the interrupt reason matching table; matching the interrupt reason information with preset interrupt reason information to obtain matching degree; and when the matching degree is higher than a preset threshold value, determining that the interruption reason information accords with the network reconnection condition.
In this embodiment, the network reconnection condition may be a reconnection condition based on an interruption reason matching table, and if interruption reason information is determined to be in accordance with the network reconnection condition in the interruption reason matching table, it may be determined that the interruption reason information is in accordance with the network reconnection condition with high efficiency and accuracy.
In one example, the preset interrupt reason information stored in the interrupt reason matching table may include the following 9 pieces:
defined wlan_read_unshifled (UNSPECIFIED REASON, unknown cause) 1;
# define wlan_read_prev_auth_not_valid (Previous authentication no longer VALID, i.e., historical authentication is no longer VALID, client associated but NOT authorized) 2;
# define wlan_read_deauth_leave (Deauthenticated because sending STA is LEAVING (or has left) IBSS orESS, i.e., access point failure cancels client authentication) 3;
# defined wlan_read_discsoc_due_to_ INACTIVITY (Disassociated DUE TO inactivity, i.e., client session timeout) 4;
# define wlan_read_discsosc_ap_busy (Disassociated because AP is unable to handle all currently associated STAs, i.e., router BUSY) 5;
the # definition wlan_read_class_class_frame_from_non_sta (CLASS 2FRAME received FROM nonauthenticated STA, i.e. client tries to transmit data before validating it) 6;
the # definition wlan_read_class_class_frame_from_non_sta (CLASS 3FRAME received FROM nonassociated STA, i.e. client tries to transmit data before association) 7;
a #defined wlan_read_discsosc_sta_hasjleft 8 (Disassociated because sending STA is leaving (or HAS LEFT) BSS), i.e. the operating system uses non-compressive load balancing to move the client to another access point);
the # defined wlan_read_sta_req_assoc_without_auth9 (STA requesting (re) association is not authenticated with responding STA, i.e. the client has not been authorized yet, is still attempting to associate with the access point).
And carrying out matching processing on the interruption reason information and the preset interruption reason information to obtain matching degree, namely carrying out similarity calculation on the interruption reason information and the preset interruption reason information to obtain similarity as matching degree, and determining that the interruption reason information accords with the network reconnection condition if the matching degree is higher than a preset threshold value to indicate that the interruption reason information is in the interruption reason matching table.
In one embodiment, performing a network non-inductive loop back operation at a network layer to restore a wireless network connection with a router, comprising:
constructing a network reconnection unit for performing network non-sense reconnection operation on a network layer; based on the network connection unit, connection is requested to the router at the network layer by hiding the connection state from the application layer to restore the wireless network connection with the router.
The network reconnection unit for performing the network non-inductive reconnection operation at the network layer is built in the terminal, so that the terminal can request the router for connection at the network layer by hiding the connection state of the application layer based on the built network reconnection unit, and the network non-inductive reconnection operation is realized. The application layer conceals the connection state, namely, the terminal directly applies for wireless network connection back to the router in the background, and does not interact information with the application layer.
The method comprises the steps of setting up a network reconnection unit for performing network non-inductive reconnection operation at a network layer in a terminal, wherein in one embodiment, the method can comprise activating a pre-injected program module for performing network non-inductive reconnection operation at the network layer in the terminal to set up the network reconnection unit for performing network non-inductive reconnection operation at the network layer; in one embodiment, the wireless network card management unit in the terminal can be modified to build a network reconnection unit for performing network noninductive reconnection operation at a network layer.
In one embodiment, a network reconnection unit for performing a network non-inductive reconnection operation at a network layer is constructed, comprising:
adding a target mark in the wireless network card management unit, wherein the target mark is used for indicating the wireless network card management unit to perform network non-inductive loop-back operation on a network layer; and taking the wireless network card management unit added with the target mark as a network reconnection unit.
In the embodiment, the wireless network card management unit in the terminal is modified to build the network reconnection unit for performing the network non-inductive reconnection operation on the network layer, so that the network reconnection can be conveniently and efficiently performed, and the reconnection efficiency is further improved.
The wireless network card management unit, that is, the wpa_suppurative module in the terminal, adds a target mark in the wireless network card management unit, that is, the wpa_suppurative module may be added with the target mark, and specifically, the fastconnect of the quick connection mark in the wpa_suppurative module may be set to be equal to 1, so as to be used as the target mark. In the case that fastconnect is equal to 1, the wpa_supplicant module does not notify the upper application layer of all the states of network disconnection and connection back, and the wireless network state seen by the user does not change at all.
In one embodiment, the method further comprises: when the router recovers the wireless network connection, the network reconnection unit is converted into a sensitive connection unit; and carrying out network sensible connection operation based on the sensible connection unit so as to inform the application layer of the network connection state.
The network sensible connection operation is that the network connection mode of the application layer informing the network connection state realizes the network sensible connection operation, and the network sensible connection operation is performed based on the sensible connection unit so as to inform the application layer of the network connection state, so that after the network connection is successful, a user is informed that the network reconnection operation is just performed, and the user experience is improved.
The method includes that a network reconnection unit is converted into a sensible connection unit, in one embodiment, a program module which is injected in advance and used for performing network non-sensible reconnection operation at a network layer is activated in a terminal, when the network reconnection unit used for performing the network non-sensible reconnection operation at the network layer is built, the program module is closed in the activated program module, and the program module used for performing the network sensible connection operation is activated, so that the network reconnection unit is converted into the sensible connection unit; in one embodiment, when the network reconnection unit for performing the network non-inductive reconnection operation on the network layer is set up by modifying the wireless network card management unit in the terminal, the wireless network card management unit is restored to a state before modification, so that the network reconnection unit is converted into the inductive connection unit.
In one embodiment, the network reconnection unit includes a wireless network card management unit to which a target flag is added; converting the network reconnection unit into a sensible connection unit, comprising: the target mark is replaced by a conversion mark so as to convert the wireless network card management unit into a sensitive connection unit.
In this embodiment, the network connection unit is converted into the inductive connection unit by restoring the modification made to the wireless network card management unit to the state before the modification. The wireless network card management unit, namely the wpa_suppurative module in the terminal, can modify the target mark added in the wpa_suppurative module into a conversion mark, and further recover the transformation of the wpa_suppurative module and convert the transformation into the sensible connection unit.
Specifically, the fastconnect of the quick-connection flag in the wpa_supplicant module is set to be equal to 1, and when the fastconnect is used as the target flag, the fastconnect is modified to be 0, and then the target flag is replaced by the conversion flag.
In this way, based on steps S210 to S230, after the interruption indication information is generated when the wireless network connection is abnormal by the router, the interruption indication information is received, so that the network can be indicated to have an abnormal state, when the wireless network connection is monitored to be disconnected, interruption reason information of the wireless network due to the abnormal state can be obtained from the interruption indication information, further, the interruption reason information accords with the network reconnection condition, the network non-inductive reconnection operation is triggered at the network layer, the triggering efficiency of reconnection is effectively improved, meanwhile, the network non-inductive reconnection operation at the network layer further avoids redundant reconnection inductive operation to improve the network connection efficiency, and further, the user non-inductive high-efficiency network reconnection can be realized on the whole, and the network connection stability is effectively improved.
In order to facilitate better implementation of the network connection method provided by the embodiment of the application, the embodiment of the application also provides a network connection device based on the network connection method. Where the meaning of a noun is the same as in the network connection method described above, specific implementation details may be referred to in the description of the method embodiment. Fig. 3 shows a block diagram of a network connection device according to one embodiment of the present application.
As shown in fig. 3, the network connection device 300 may include a receiving module 310, a monitoring module 320, and a reconnecting module 330.
The receiving module 310 may be configured to receive interrupt indication information sent by a router, where the interrupt indication information is generated when the wireless network connection of the router is abnormal; the monitoring module 320 may be configured to obtain, when it is detected that the wireless network connection with the router is disconnected, interruption reason information of the disconnection of the wireless network connection from the interruption indication information; the connection module 330 may be configured to perform a network connection operation at the network layer without sense if the interruption reason information meets the network connection condition, so as to restore the wireless network connection with the router.
In some embodiments of the present application, the receiving module 310 includes: the wireless network connection establishment unit is used for establishing wireless network connection with the router, triggering the router to acquire a network abnormal state when the wireless network connection is abnormal, and generating a de-authentication frame carrying interrupt reason information according to the network abnormal state; and the interrupt indication information receiving unit is used for receiving the interrupt indication information sent by the router, and the interrupt indication information comprises the de-authentication frame.
In some embodiments of the present application, the apparatus further comprises: the interrupt reason matching table acquisition module is used for acquiring an interrupt reason matching table, wherein the interrupt reason matching table stores preset interrupt reason information; the matching processing module is used for carrying out matching processing on the interrupt reason information and the preset interrupt reason information to obtain matching degree; and the network reconnection condition determining module is used for determining that the interruption reason information accords with the network reconnection condition when the matching degree is higher than a preset threshold value.
In some embodiments of the present application, the loop module 330 includes: the network reconnection unit building unit is used for building a network reconnection unit for performing network non-sense reconnection operation on a network layer; and the request connection unit is used for requesting connection to the router at a network layer through hiding the connection state from an application layer based on the network connection unit so as to restore wireless network connection with the router.
In some embodiments of the present application, the network-connected unit building unit is configured to: adding a target mark in a wireless network card management unit, wherein the target mark is used for indicating the wireless network card management unit to perform network non-inductive loop-back operation on a network layer; and taking the wireless network card management unit added with the target mark as the network reconnection unit.
In some embodiments of the present application, the apparatus further comprises: the perceived connection unit building module is used for converting the network reconnection unit into a perceived connection unit when the perceived connection unit is connected with the router in a wireless network restoration mode; and the network sensible connection module is used for performing network sensible connection operation based on the sensible connection unit so as to inform the application layer of the network connection state.
In some embodiments of the present application, the network reconnection unit includes a wireless network card management unit to which a target flag is added; the inductive connecting unit building module is used for: and replacing the target mark with a conversion mark so as to convert the wireless network card management unit into the inductive connection unit.
In this way, based on the network connection device 300, after interrupt indication information can be generated by the router when the wireless network connection is abnormal, the interrupt indication information is received, so that the network can be indicated to have an abnormal state, when the wireless network connection is monitored to be disconnected, interrupt reason information of the wireless network caused by the abnormal state can be obtained from the interrupt indication information, further, if the interrupt reason information accords with the network reconnection condition, the network non-inductive reconnection operation is triggered at the network layer, the triggering efficiency of the reconnection is effectively improved, meanwhile, the network non-inductive reconnection operation at the network layer further avoids redundant reconnection inductive operation to improve the network connection efficiency, and further, the user non-inductive efficient network reconnection can be realized on the whole, and the network connection stability is effectively improved.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, in accordance with embodiments of the present application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, the embodiment of the application further provides an electronic device, which may be a terminal or a server, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user page, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 executes the computer programs stored in the memory 402, so as to implement various functions, for example, the processor 401 may perform the following steps:
receiving interrupt indication information sent by a router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal; when the disconnection of the wireless network connection with the router is monitored, obtaining the interruption reason information of the disconnection of the wireless network connection from the interruption indication information; and if the interruption reason information accords with the network reconnection condition, performing network non-inductive reconnection operation on a network layer so as to restore wireless network connection with the router.
In some embodiments of the present application, when the receiving router sends the interrupt indication information, the processor 401 may execute: establishing wireless network connection with the router, triggering the router to acquire a network abnormal state when the wireless network connection is abnormal, and generating a de-authentication frame carrying interrupt reason information according to the network abnormal state; and receiving the interrupt indication information sent by the router, wherein the interrupt indication information comprises the de-authentication frame.
In some embodiments of the present application, before the network layer performs the network non-inductive loop operation if the interruption reason information meets the network loop-back condition, the processor 401 may execute: obtaining an interrupt reason matching table, wherein the interrupt reason matching table stores preset interrupt reason information; matching the interrupt reason information with the preset interrupt reason information to obtain matching degree; and when the matching degree is higher than a preset threshold value, determining that the interruption reason information accords with a network reconnection condition.
In some embodiments of the present application, when the network layer performs a network sensorless loopback operation to restore a wireless network connection with the router, the processor 401 may perform: constructing a network reconnection unit for performing network non-sense reconnection operation on a network layer; and based on the network connection unit, requesting connection from the router at a network layer by hiding the connection state from an application layer so as to restore wireless network connection with the router.
In some embodiments of the present application, the processor 401 may execute, when setting up a network connection unit for performing a network sensorless connection operation at a network layer: adding a target mark in a wireless network card management unit, wherein the target mark is used for indicating the wireless network card management unit to perform network non-inductive loop-back operation on a network layer; and taking the wireless network card management unit added with the target mark as the network reconnection unit.
In some embodiments of the present application, the processor 401 may perform: when the router is connected with the wireless network, the network connecting unit is converted into a sensitive connecting unit; and carrying out network inductive connection operation based on the inductive connection unit so as to inform an application layer of the network connection state.
In some embodiments of the present application, the network reconnection unit includes a wireless network card management unit to which a target flag is added; the processor 401 may execute, when the network connection unit is converted into a sensory connection unit: and replacing the target mark with a conversion mark so as to convert the wireless network card management unit into the inductive connection unit.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present embodiments also provide a storage medium having stored therein a computer program that can be loaded by a processor to perform the steps of any of the methods provided by the embodiments of the present application.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Since the computer program stored in the storage medium may perform any of the steps in the method provided in the embodiment of the present application, the beneficial effects that can be achieved by the method provided in the embodiment of the present application may be achieved, which are detailed in the previous embodiments and are not described herein.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It will be understood that the present application is not limited to the embodiments that have been described above and shown in the drawings, but that various modifications and changes can be made without departing from the scope thereof.

Claims (9)

1. A method of network connection, comprising:
receiving interrupt indication information sent by a router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal;
when the disconnection of the wireless network connection with the router is monitored, obtaining the interruption reason information of the disconnection of the wireless network connection from the interruption indication information;
if the interruption reason information accords with the network reconnection condition, requesting connection from the router at the network layer through hiding the connection state to the application layer so as to restore wireless network connection with the router;
the interrupt indication information sent by the receiving router comprises: establishing wireless network connection with the router, triggering the router to acquire a network abnormal state when the wireless network connection is abnormal, and generating a de-authentication frame carrying interrupt reason information according to the network abnormal state; and receiving the interrupt indication information sent by the router, wherein the interrupt indication information comprises the de-authentication frame.
2. The method of claim 1, wherein before the network layer performs the network non-inductive loop back operation if the interruption cause information meets the network loop back condition, the method further comprises:
obtaining an interrupt reason matching table, wherein the interrupt reason matching table stores preset interrupt reason information;
matching the interrupt reason information with the preset interrupt reason information to obtain matching degree;
and when the matching degree is higher than a preset threshold value, determining that the interruption reason information accords with a network reconnection condition.
3. The method of claim 1, wherein requesting a connection from the router at the network layer by hiding a connection state from an application layer to restore a wireless network connection with the router comprises:
constructing a network reconnection unit for performing network non-sense reconnection operation on a network layer;
and based on the network connection unit, requesting connection from the router at a network layer by hiding the connection state from an application layer so as to restore wireless network connection with the router.
4. A method according to claim 3, wherein the building a network reconnection unit for performing a network non-inductive reconnection operation at a network layer comprises:
adding a target mark in a wireless network card management unit, wherein the target mark is used for indicating the wireless network card management unit to perform network non-inductive loop-back operation on a network layer;
and taking the wireless network card management unit added with the target mark as the network reconnection unit.
5. A method according to claim 3, characterized in that the method further comprises:
when the router is connected with the wireless network, the network connecting unit is converted into a sensitive connecting unit;
and carrying out network inductive connection operation based on the inductive connection unit so as to inform an application layer of the network connection state.
6. The method of claim 5, wherein the network connection unit comprises a wireless network card management unit to which a target tag is added;
the converting the network reconnection unit into a sensible connection unit includes:
and replacing the target mark with a conversion mark so as to convert the wireless network card management unit into the inductive connection unit.
7. A network connection device, comprising:
the receiving module is used for receiving interrupt indication information sent by a router, wherein the interrupt indication information is generated when the wireless network connection of the router is abnormal; the interrupt indication information sent by the receiving router comprises: establishing wireless network connection with the router, triggering the router to acquire a network abnormal state when the wireless network connection is abnormal, and generating a de-authentication frame carrying interrupt reason information according to the network abnormal state; receiving the interrupt indication information sent by the router, wherein the interrupt indication information comprises the de-authentication frame;
the monitoring module is used for acquiring interrupt reason information of the disconnection of the wireless network from the interrupt indication information when the disconnection of the wireless network with the router is monitored;
and the reconnection module is used for requesting connection from the router at the network layer by hiding the connection state of the application layer if the interruption reason information accords with the network reconnection condition so as to restore the wireless network connection with the router.
8. A storage medium having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of any of claims 1 to 6.
9. An electronic device, comprising: a memory storing a computer program; a processor reading a computer program stored in a memory to perform the method of any one of claims 1 to 6.
CN202110783059.2A 2021-07-12 2021-07-12 Network connection method, device, storage medium and electronic equipment Active CN113613346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110783059.2A CN113613346B (en) 2021-07-12 2021-07-12 Network connection method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110783059.2A CN113613346B (en) 2021-07-12 2021-07-12 Network connection method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113613346A CN113613346A (en) 2021-11-05
CN113613346B true CN113613346B (en) 2023-08-01

Family

ID=78304407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110783059.2A Active CN113613346B (en) 2021-07-12 2021-07-12 Network connection method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113613346B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116347536A (en) * 2021-12-24 2023-06-27 维沃移动通信有限公司 Image frame acquisition method and device and communication equipment
CN114158025B (en) * 2022-02-09 2022-06-14 荣耀终端有限公司 Device reconnection method and related device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013185031A1 (en) * 2012-06-09 2013-12-12 Apple Inc. Adjusting connection states of a mobile wireless device
CN107801201A (en) * 2017-10-19 2018-03-13 维沃移动通信有限公司 Network recovery method and device
CN108307540A (en) * 2016-09-22 2018-07-20 普天信息技术有限公司 A kind of gateway restarts the quick recovery method of rear user apparatus service
CN110933775A (en) * 2019-11-25 2020-03-27 北京三体云时代科技有限公司 Method and device for establishing signal connection and electronic equipment
CN111010706A (en) * 2019-11-22 2020-04-14 杭州迪普科技股份有限公司 Exception recovery method and device
WO2021001480A1 (en) * 2019-07-04 2021-01-07 Telefonaktiebolaget Lm Ericsson (Publ) Nas recovery in a wireless communication network
CN112398689A (en) * 2020-11-13 2021-02-23 Oppo广东移动通信有限公司 Network recovery method and device, storage medium and electronic equipment
WO2021129018A1 (en) * 2019-12-25 2021-07-01 中兴通讯股份有限公司 Network connection reestablishment method and device, storage medium, and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101339849B1 (en) * 2007-12-24 2013-12-11 삼성전자주식회사 Apparatus and method for service connecting in a portable terminal
CN103179597B (en) * 2011-12-21 2016-03-09 华为技术有限公司 A kind of processing method of adopting wireless fidelity technology and subscriber equipment
WO2018036071A1 (en) * 2016-08-21 2018-03-01 华为技术有限公司 Method and device for networking devices
JP6634995B2 (en) * 2016-09-30 2020-01-22 富士通クライアントコンピューティング株式会社 Monitoring device, reconnection method and reconnection program
CN106507289A (en) * 2016-12-07 2017-03-15 广东欧珀移动通信有限公司 A kind of cut-in method of wireless network and mobile terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013185031A1 (en) * 2012-06-09 2013-12-12 Apple Inc. Adjusting connection states of a mobile wireless device
CN108307540A (en) * 2016-09-22 2018-07-20 普天信息技术有限公司 A kind of gateway restarts the quick recovery method of rear user apparatus service
CN107801201A (en) * 2017-10-19 2018-03-13 维沃移动通信有限公司 Network recovery method and device
WO2021001480A1 (en) * 2019-07-04 2021-01-07 Telefonaktiebolaget Lm Ericsson (Publ) Nas recovery in a wireless communication network
CN111010706A (en) * 2019-11-22 2020-04-14 杭州迪普科技股份有限公司 Exception recovery method and device
CN110933775A (en) * 2019-11-25 2020-03-27 北京三体云时代科技有限公司 Method and device for establishing signal connection and electronic equipment
WO2021129018A1 (en) * 2019-12-25 2021-07-01 中兴通讯股份有限公司 Network connection reestablishment method and device, storage medium, and electronic device
CN112398689A (en) * 2020-11-13 2021-02-23 Oppo广东移动通信有限公司 Network recovery method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113613346A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN113613346B (en) Network connection method, device, storage medium and electronic equipment
JP5281641B2 (en) Method, system, and apparatus for preventing degradation attack while terminal is moving
CN113765714B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN113746821B (en) Intelligent device control method and device, storage medium and electronic device
CN110167192B (en) Bluetooth connection management method and device, electronic equipment and non-transient storage medium
CN106656985B (en) Backup account login method, device and system
CN111614548A (en) Message pushing method and device, computer equipment and storage medium
CN110213247A (en) A kind of method and system improving pushed information safety
CN106357807A (en) Data processing method, device and system
CN111757305A (en) Switching method, device and system of service execution terminal and storage medium
CN111404918A (en) Cloud mobile phone distributed service emergency authentication method, device and system
CN107943622B (en) Standby operation and maintenance method, device and system
CN111193585B (en) Communication request management method and device
CN108200059A (en) Document transmission method, device, equipment and computer readable storage medium
CN110891270B (en) Selection method and device of authentication algorithm
CN114302351B (en) Short message service processing method and device, computer equipment and storage medium
CN113850938B (en) Intelligent door lock control method and device, storage medium and electronic equipment
CN111930218B (en) Bluetooth fingerprint power consumption control method, Bluetooth fingerprint device and storage medium
CN111465121B (en) Equipment control method, first equipment, second equipment and electronic equipment
CN106713180B (en) Hotspot device control method and device
CN113840276A (en) 5G identifier hiding compatible configuration method, user identification module and terminal
CN111404669A (en) Key generation method, terminal equipment and network equipment
CN105490810B (en) Method, device and system for processing virtual resource data
CN114513844B (en) Network registration method and device, storage medium and electronic equipment
CN111862398B (en) Service providing terminal unlocking method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant