CN112953750B - Network access method, device and storage medium - Google Patents

Network access method, device and storage medium Download PDF

Info

Publication number
CN112953750B
CN112953750B CN201911269655.8A CN201911269655A CN112953750B CN 112953750 B CN112953750 B CN 112953750B CN 201911269655 A CN201911269655 A CN 201911269655A CN 112953750 B CN112953750 B CN 112953750B
Authority
CN
China
Prior art keywords
network access
parameter
standby
access
network
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
CN201911269655.8A
Other languages
Chinese (zh)
Other versions
CN112953750A (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.)
Huawei Technical Service Co Ltd
Original Assignee
Huawei Technical Service 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 Huawei Technical Service Co Ltd filed Critical Huawei Technical Service Co Ltd
Priority to CN201911269655.8A priority Critical patent/CN112953750B/en
Publication of CN112953750A publication Critical patent/CN112953750A/en
Application granted granted Critical
Publication of CN112953750B publication Critical patent/CN112953750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2854Wide area networks, e.g. public data networks
    • H04L12/2856Access arrangements, e.g. Internet access

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network access method, a network access device and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: when the number of continuous failures of the terminal for network access by using the main network access parameter is larger than a threshold value, acquiring a standby network access parameter stored in the terminal, wherein the standby network access parameter is a network access parameter used when the last network access is successful; and adopting the standby network access parameters to carry out network access. When the continuous failure times of the access parameters of the main network reach the threshold value, the access is performed by adopting the access parameters of the standby network, and the access success of the access parameters of the standby network can be ensured because the access parameters of the standby network are backed up when the access is successful in the last time. Therefore, the problem that the terminal cannot acquire the IP address and register to the network management system after the network access parameters are modified into the error parameters and becomes an out-of-management state can be avoided.

Description

Network access method, device and storage medium
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a network access method, device, and storage medium.
Background
Internet protocol television (Internet Protocol Television, IPTV) is a system that uses a network as a carrier for television signal propagation, providing digital television services to users via the internet protocol. IPTV business develops for decades, the current global user number exceeds two hundred million, one user is a terminal (set top box), and the terminal stock is larger and larger; meanwhile, the life cycle of the terminal is generally three years, the updating is rapid, and the market prospect is good.
However, the terminal still has the problem of difficult online maintenance at present, and how to solve the pain point of the operation of the client can greatly improve the market competitiveness of the terminal product.
Disclosure of Invention
The application provides a network access method, a device and a storage medium, which can still ensure normal access and avoid entering a disconnection state under the condition of network access parameter errors.
In a first aspect, at least one embodiment of the present application provides a network access method, where the method includes:
when the number of continuous failures of the terminal for network access by using the main network access parameter is larger than a threshold value, acquiring a standby network access parameter stored in the terminal, wherein the standby network access parameter is a network access parameter used when the last network access is successful;
And adopting the standby network access parameters to carry out network access.
In the embodiment of the disclosure, when the number of continuous failures of the access parameter of the main network reaches the threshold, the access is performed by adopting the access parameter of the standby network, and the access success of the access by adopting the access parameter of the standby network can be ensured because the access parameter of the standby network is backed up when the access is successful last time. Therefore, the problem that the terminal cannot acquire the IP address and register to the network management system after the network access parameters are modified into the error parameters and becomes an out-of-management state can be avoided. Meanwhile, the scheme does not need to be manually participated, a large amount of human resources are saved, the efficiency is high, and customer complaints are avoided.
Optionally, the acquiring the standby network access parameter stored in the terminal includes:
generating a network access parameter switching request;
and reading the standby network access parameters from a database based on the network access parameter switching request.
In the implementation mode, the data is read from the database in a data request mode, namely, the data in the database is read in a packaging interface mode, so that the smooth completion of the data reading is ensured.
Optionally, the generating the network access parameter switching request includes:
Acquiring a count value of a network access counting module in the terminal, wherein the count value is used for indicating the continuous failure times;
and when the count value reaches the threshold value, generating the network access parameter switching request through the network module.
In the implementation manner, the switching of the active and standby parameters is realized by acquiring the continuous failure times when the active access network parameters are adopted to access, so that an access parameter switching request can be generated when the continuous failure times reach a threshold value.
Optionally, the reading the standby network access parameter from the database based on the network access parameter switching request includes:
determining a parameter source identifier, wherein the parameter source identifier is used for indicating a currently used network access parameter source, and the source comprises the active network access parameter and the standby network access parameter;
changing the parameter source identification;
and reading the network access parameters corresponding to the modified parameter source identifiers from the database to obtain the standby network access parameters.
In the implementation manner, the parameter source identifier is adopted to mark the source of the network access parameter, so that the source of the currently used network access parameter can be determined according to the identifier, and the identifier can be modified when the network access parameter needs to be switched, so that the terminal can determine the source of the modified network access parameter based on the identifier.
Optionally, the method further comprises:
and recording the continuous failure times of network access by adopting the main network access parameters.
In this implementation, by recording the number of consecutive failures when the primary access network parameter is used for access, switching between the primary and secondary parameters can be performed when the number of consecutive failures reaches a threshold.
Optionally, the recording the number of continuous failures of network access by using the active network access parameter includes:
when the terminal uses the main network access parameter to carry out network access failure, generating a network access state notification indicating the access failure through a network module in the terminal;
and counting the number of continuous failures through a network access counting module in the terminal, wherein the network access counting module accumulates the count value based on the network access state notification indicating the access failure generated by the network module.
In this implementation, the network access counting module is instructed to count the number of consecutive access failures by a notification generated when the network access fails.
Optionally, when the terminal uses the primary network access parameter to perform network access failure, generating, by a network module in the terminal, a network access status notification indicating the access failure, including:
When a single transmission protocol is adopted for network access, generating a network access state notification indicating access failure each time the access fails;
or,
when the network access is alternately performed by adopting the two transmission protocols, the network access state notification indicating the access failure is generated every time the cycle number of the network access failure alternately performed by adopting the two transmission protocols reaches the switching threshold value.
In this implementation, the network access status notification is generated indicating access failures, i.e. the count of consecutive failures is incremented by one. For network access using a single transport protocol, the count of consecutive failures is incremented by one for each access failure. For the access mode of dual stack switching, when the number of dual stack switching cycles reaches the switching threshold, the count of continuous failures is increased by one, so that the number of failures is increased after multiple attempts, the accuracy of the failure count is ensured, and meanwhile, the situation that the information is sent too frequently due to the fact that the counting module is informed of the counting after each failure is avoided.
Optionally, the method further comprises:
when the terminal network access is successful, generating a network access state notification indicating that the access is successful through a network module in the terminal; the network access counting module resets the count value to 0 based on a network access status notification generated by the network module indicating that access was successful.
In the implementation mode, when the access is successful, the count value of the network access counting module is cleared by generating a network access state notification indicating that the access is successful, so that the switching action of the main and standby parameters is triggered only when continuous failure occurs.
Optionally, the method further comprises:
and when the access of the active network access parameter is successful, replacing the standby network access parameter by the active network access parameter.
In the implementation mode, when the access of the main network access parameter is successful, the main network access parameter is backed up to a standby data table to obtain the standby network access parameter. Thus, when the subsequent parameters are wrong, the standby network access parameters can be used for access, and the success of the access is ensured.
Optionally, the method further comprises:
when the continuous failure times of the network access by the terminal through the standby network access parameters is larger than a threshold value, acquiring the main network access parameters stored in the terminal;
and adopting the main network access parameters to carry out network access.
In the implementation mode, when the access of the standby network access parameter fails, the access is switched back to the main network access parameter for access, whether the main network access parameter can be normally accessed is tried again, and the failure of the access under the normal condition of the parameter is avoided through multiple times of switching.
Optionally, the method further comprises:
determining the primary and standby switching times, wherein the primary and standby switching times refer to the times of switching the primary network access parameter and the standby network access parameter in the access process;
and stopping network access when the primary and standby switching times reach a switching threshold value.
In the implementation manner, when the number of times of switching between the main and the standby reaches the switching threshold value and the network is still not successfully accessed, the access is stopped, and the loss caused by the excessive access is avoided.
Optionally, the method further comprises:
when the number of continuous failures of network access by using the main network access parameter is larger than a threshold value, reporting log information to a network management system in a network, wherein the log information is used for indicating the failure of the access by adopting the main network access parameter.
In the implementation mode, when the continuous access failure needs to switch network access parameters, log information can be reported to a network management system, so that operators are reminded of manually paying attention, timely access can be ensured when the network access parameters are switched, and the terminal can be finally successfully accessed.
Optionally, the method further comprises:
receiving a one-key rollback instruction sent by the network management system;
Determining at least one modified parameter from the standby network access parameters;
and adopting the parameters obtained from the standby network access parameters to carry out network access.
In the implementation mode, the primary backup switching can be realized based on the number of continuous failures, and the backup network access parameters can be obtained by an operator through issuing a one-key rollback instruction by a network management system, and the backup network access parameters are adopted for access, so that the success of the access is ensured.
In a second aspect, at least one embodiment of the present application provides a network access device, the device comprising:
the acquisition unit is configured to acquire standby network access parameters stored in the terminal when the number of continuous failures of network access by the terminal by using the main network access parameters is greater than a threshold value, wherein the standby network access parameters are network access parameters used when the last network access is successful;
and the access unit is configured to perform network access by adopting the standby network access parameters.
Optionally, the acquiring unit is configured to generate a network access parameter switching request; and reading the standby network access parameters from a database based on the network access parameter switching request.
Optionally, the acquiring unit is configured to acquire a count value of a network access counting module in the terminal, where the count value is used to indicate the number of continuous failures; and when the count value reaches the threshold value, generating the network access parameter switching request through the network module.
Optionally, the acquiring unit is configured to determine a parameter source identifier, where the parameter source identifier is used to indicate a currently used network access parameter source, and the source includes the active network access parameter and the standby network access parameter; changing the parameter source identification; and reading the network access parameters corresponding to the modified parameter source identifiers from the database to obtain the standby network access parameters.
Optionally, the apparatus further comprises:
and the counting unit is configured to record the continuous failure times of network access by adopting the main network access parameters.
Optionally, the counting unit is configured to generate, by a network module in the terminal, a network access status notification indicating an access failure when the terminal fails to access the network using the primary network access parameter; and counting the number of continuous failures through a network access counting module in the terminal, wherein the network access counting module accumulates the count value based on the network access state notification indicating the access failure generated by the network module.
Optionally, the counting unit is configured to generate the network access status notification indicating access failure when network access is performed by adopting a single transmission protocol, each time the access fails; or when the network access is alternately performed by adopting the two transmission protocols, generating the network access state notification indicating the access failure every time the cycle number of the network access failure alternately performed by adopting the two transmission protocols reaches the switching threshold value.
Optionally, the counting unit is further configured to generate, by a network module in the terminal, a network access status notification indicating that the access is successful when the network access of the terminal is successful; the network access counting module resets the count value to 0 based on a network access status notification generated by the network module indicating that access was successful.
Optionally, the apparatus further comprises:
and the backup unit is configured to replace the standby network access parameter with the active network access parameter when the access with the active network access parameter is successful.
Optionally, the acquiring unit is further configured to acquire the active network access parameter stored in the terminal when the number of continuous failures of the network access by using the standby network access parameter by the terminal is greater than a threshold;
The access unit is further configured to perform network access by using the active network access parameter.
Optionally, the apparatus further comprises:
a determining unit configured to determine a primary-standby switching number, where the primary-standby switching number refers to a number of times of switching the primary network access parameter and the standby network access parameter in an access process;
the access unit is further configured to stop network access when the number of primary and standby switching times reaches a switching threshold.
Optionally, the apparatus further comprises:
and the log unit is configured to report log information to a network management system in a network when the number of continuous failures of network access by using the active network access parameters is greater than a threshold value, wherein the log information is used for indicating the failure of the access by using the active network access parameters.
Optionally, the apparatus further comprises:
the receiving unit is configured to receive a one-key rollback instruction sent by the network management system;
the acquisition unit is further configured to determine at least one modified parameter from the standby network access parameters;
the access unit is further configured to perform network access by using parameters obtained from the standby network access parameters.
In a third aspect, at least one embodiment of the present application provides a network access device comprising a processor and a memory; the memory is used for storing software programs and modules, and the processor implements the method in any one of the possible implementation manners of the first aspect by running or executing the software programs and/or modules stored in the memory.
Optionally, the processor is one or more, and the memory is one or more.
Alternatively, the memory may be integrated with the processor or the memory may be separate from the processor.
In a specific implementation process, the memory may be a non-transient (non-transitory) memory, for example, a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
In a fourth aspect, at least one embodiment of the present application provides a computer program (product), the computer program (product) comprising: computer program code which, when run by a computer, causes the computer to perform the method of any one of the possible implementations of the first aspect described above.
In a fifth aspect, at least one embodiment of the present application provides a computer-readable storage medium for storing program code for execution by a processor, the program code comprising instructions for implementing the method of any one of the possible implementations of the first aspect.
In a sixth aspect, a chip is provided, comprising a processor for calling from a memory and executing instructions stored in said memory, such that a communication device on which said chip is mounted performs the method of any of the possible implementations of the first aspect described above.
In a seventh aspect, there is provided another chip comprising: the device comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method in any possible implementation manner of the first aspect.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
Fig. 3 is a flowchart of a network access method provided in an embodiment of the present application;
fig. 4 is a flowchart of another network access method provided in an embodiment of the present application;
fig. 5 is a block diagram of a terminal provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a counting scheme of a terminal according to an embodiment of the present application;
fig. 7 is a flowchart of a network access method provided in an embodiment of the present application;
FIG. 8 is a schematic process diagram of a one-touch fallback function provided by an embodiment of the present application;
fig. 9 is a block diagram of a network access device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In order to facilitate understanding of the technical solution provided in the embodiments of the present application, an application scenario of the present application is first introduced.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. Referring to fig. 1, in this scenario there are included a Set Top Box (STB) 11, an optical network terminal (Optical network terminal, ONT) 12 (i.e. optical cat), a Router 13, a mobile terminal 14, an optical line terminal (Optical line terminal, OLT) 15, a broadband access server (Broadband Remote Access Server, BRAS) 16, an ethernet bearer internet protocol (Internet Protocol over Ethernet, IPOE) server 17, an authentication server 18 and a Core Router (CR) 19.
The set-top box 11 may be a television set-top box, and is configured to provide a television signal to a television; the optical network terminal 12 is an operator provided data terminal, which on the one hand can provide television signals to the set-top box 11 and on the other hand can provide network signals to the router 13, so that the router 13 can provide network signals to the mobile terminal 14; the optical line terminal 15, the broadband access server 16 and the core router 19 are devices in the operator line for transmitting the aforementioned television signal and network signal; the ethernet bearer internet protocol server 17 is configured to implement access of an ethernet bearer internet protocol of the set top box 11; the authentication server 18 is used for authenticating the set-top box 11 during the access of the set-top box 11.
The set-top box 11 may use IPOE, an ethernet bearer Point-to-Point protocol (PPPOE) or a dynamic host configuration protocol (Dynamic Host Configuration Protocol, DHCP) as a network access type to implement network access. For example, the network illustrated in fig. 1 may adopt an IPOE or a PPOE access manner, or may connect the set-top box 11 to the router 13 to implement DHCP access. Typically, the network access parameters of the set-top box are built in the set-top box, and the shipping process is uniformly configured. The network access parameters are related to customer networking, and are different in different networking modes, for example, the set top box is connected under an optical network terminal and a router, and the network access parameters are different.
The network access parameters of the set top box are stored locally in a file mode. The operator can remotely modify the network access parameters of the set top box through a network management system (Terminal Management System, TMS), and likewise, the user can locally log in the configuration page of the set top box to modify the network access parameters of the set top box. When the network access parameters are modified into error parameters, the error parameters can cover old parameter values and take effect, the set top box cannot acquire an IP address and register to a network management system, and the network access parameters become in a disconnection state, commonly called as brick change.
When the set top box cannot be used normally, a fault is reported through a service hot line (such as 10086), and the call center contacts a technician to output a technical recovery scheme after receiving the fault phenomenon, for example, remote guidance is used for modifying the configuration, or the set top box is maintained by going to the door. When the number of set top boxes is large and the number of reporting-impaired users is large, the scheme not only needs to waste a large amount of human resources, but also has low efficiency, uncontrollable recovery period and influence and easy initiation of large-area customer complaints.
Of course, other terminals similar to networking and having similar problems exist besides the set top box 11 in the application, for example, a discrete remote network element or a network element in the form of the internet of things, where the discrete remote network element may be an optical network device (Optical network terminal, ONT) or a router, and the network element in the form of the internet of things may be a vehicle-mounted terminal, intelligent furniture, intelligent screen, or the like.
Fig. 2 is a schematic diagram of a possible hardware structure of the foregoing network device. As shown in fig. 2, the terminal includes a processor 10, a memory 20, and a communication interface 30. It will be appreciated by those skilled in the art that the structure shown in fig. 2 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
Wherein:
the processor 10 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 20 and calling data stored in the memory 20, thereby controlling the terminal as a whole. The processor 10 may be a CPU, but may also be other general purpose processors, digital signal processors (digital signal processing, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field-programmable gate arrays (field-programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an advanced reduced instruction set machine (advanced RISC machines, ARM) architecture.
The memory 20 may be used to store software programs and modules. The processor 10 executes various functional applications and data processing by running software programs and modules stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system 21, an acquisition module 22, and an access module 23, and application programs 24 (such as backup of network parameters, read-write, etc.) required for one or more functions, etc.; the storage data area may store data created according to the use of the terminal, such as a primary network access parameter, a backup network access parameter, etc., and the like. The memory 20 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic RAM (dynamic random access memory, DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and direct memory bus RAM (DR RAM). Accordingly, the memory 20 may also include a memory controller to provide access to the memory 20 by the processor 10.
Wherein the processor 20 performs the following functions by running the acquisition module 22: when the number of continuous failures of the terminal for network access by using the main network access parameter is larger than a threshold value, acquiring a standby network access parameter stored in the terminal, wherein the standby network access parameter is a network access parameter used when the last network access is successful; the processor 20 performs the following functions by running the access module 23: and adopting the standby network access parameters to carry out network access.
The embodiment of the application also provides a chip, which comprises a processor, wherein the processor is used for calling the instructions stored in the memory from the memory and running the instructions stored in the memory, so that the communication device provided with the chip executes the network access method provided by any one of the application.
The embodiment of the application also provides a chip, which comprises: the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the network access method of any one of the above.
It is to be appreciated that the processor described above may be a CPU, but may also be other general purpose processors, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It should be noted that the processor may be a processor supporting the ARM architecture.
Further, in an alternative embodiment, the processor is one or more, and the memory is one or more. Alternatively, the memory may be integrated with the processor or the memory may be separate from the processor. The memory may include read only memory and random access memory and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store information of the device type.
The memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be ROM, PROM, EPROM, EEPROM or flash memory, among others. The volatile memory may be RAM, which acts as external cache. By way of example, and not limitation, many forms of RAM are available. For example SRAM, DRAM, SDRAM, DDR SDRAM, ESDRAM, SLDRAM and DR RAM.
The present application provides a computer program which, when executed by a computer, may cause a processor or computer to perform the corresponding steps and/or flows of the method embodiments of network access of any of the present application.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), etc.
Fig. 3 is a flowchart of a network access method provided in an embodiment of the present application. The method can be executed by the terminal in the application scenario, as shown in fig. 3, and comprises the following steps:
step S31: when the number of continuous failures of the terminal for network access by using the main network access parameter is larger than a threshold value, acquiring the standby network access parameter stored in the terminal, wherein the standby network access parameter is the network access parameter used when the last network access is successful.
Step S32: and adopting the standby network access parameters to carry out network access.
In the embodiment of the application, when the number of continuous failures of the access parameter of the main network reaches the threshold, the access is performed by adopting the access parameter of the standby network, and the access success of the access by adopting the access parameter of the standby network can be ensured because the access parameter of the standby network is backed up when the access is successful last time. Therefore, the problem that the terminal cannot acquire the IP address and register to the network management system after the network access parameters are modified into the error parameters and becomes an out-of-management state can be avoided. Meanwhile, the scheme does not need to be manually participated, a large amount of human resources are saved, the efficiency is high, and customer complaints are avoided.
Fig. 4 is a flowchart of a network access method provided in an embodiment of the present application. The method can be executed by the terminal in the application scenario, as shown in fig. 4, and comprises the following steps:
step S41: and acquiring the access parameters of the main network.
And when the terminal is started normally, reading the access parameters of the main network from the configuration file (setting.secure) of the terminal. The configuration file is physically stored in the terminal, for example under the iptv_data partition of the terminal. The active network access parameters in the configuration file may be modified by the user, TMS, etc.
Step S42: and adopting the main network access parameters to carry out network access. When the access with the active network access parameter is successful, step S43 is executed, and when the access with the active network access parameter is failed, step S44 is executed.
Step S43: and replacing the standby network access parameter by the main network access parameter.
In the embodiment of the present application, the network access parameters of the terminal are stored by using the database 4X. The database 4X stores two tables, a main data table and a standby data table, the main data table stores main network access parameters, the main network access parameters are the same as the main network access parameters in the configuration file, and the standby data table stores standby network access parameters. When the configuration file is modified, the active network access parameters in the active data table are synchronously modified so as to backup the active network access parameters in the configuration file.
Fig. 5 is a schematic structural diagram of a terminal provided in the present disclosure, referring to fig. 5, when network access is successful by using the primary network access parameter, a network access auxiliary module 4A of the terminal receives a network access status notification (which may be sent in a broadcast form) sent by a network module 4B, where the notification indicates that the access is successful. The network access auxiliary module 4A can write the primary network access parameter as a new standby network access parameter into the standby data table, so as to ensure the normal connection of the network when the network access parameter is switched to the standby network access parameter next time.
In this embodiment of the present application, the foregoing database 4X may be a light database, for example, an SQLite light database, where the SQLite light database has the characteristics of high flexibility, capability of storing a plurality of parameter values, convenient updating, and so on, and can well implement backup and read-write of network access parameters in this application.
In the embodiment of the disclosure, a software package (APK) may be built in the terminal, where the APK is configured to refresh the active network access parameter in the active data table to the standby data table when the active network access parameter is successfully accessed, so as to ensure dynamic refresh of the parameter.
In the embodiment of the disclosure, the active network access parameters and the configuration file can be modified by a user or a TMS system in real time, but the standby network access parameters cannot be modified, so that the accuracy and reliability of the standby network access parameters are maintained. And the triple insurance is formed by the mutual cooperation of the main network access parameter, the standby network access parameter and the configuration file, so that the continuous online of the terminal is ensured.
It should be noted that, in the initial state, the active network access parameters in the database 4X need to be read from the real-time network configuration of the terminal by the key parameter backup module 4C in the terminal, and then stored in the configuration file and the active network access parameters in the database 4X.
In the embodiment of the disclosure, the network access parameters include service parameters and service account information. Table 1 below shows by way of table an example of fields contained in the network access parameters in the present application:
TABLE 1
Main network access parameters Standby network access parameters
pppore_on (pppore on) pppoe_on_bak
ipoe_state (ipoe state) ipoe_state_bak
Ethernet_mode (Ethernet mode) ethernet_mode_bak
Network DHCPAccount (dhcp Account) ipoe_user_name_bak
Network dhcpphasword (dhcp password) ipoe_user_pass_bak
pppore_user_name (pppore user name) pppoe_user_name_bak
pppore_user_pass (pppore password) pppoe_user_pass_bak
double stack_on (double stack switch on) doublestack_on_bak
Ethernet_ip (Ethernet ip) ethernet_ip_bak
ethernet_prefix length ethernet_prefixlength_bak
Ethernet_ip route (Ethernet routing) ethernet_iproute_bak
Ethernet_dns1 (Ethernet dns 1) ethernet_dns1_bak
Ethernet_dns2 (Ethernet dns 2) ethernet_dns2_bak
Step S44: and recording the continuous failure times of network access by adopting the main network access parameters. When the number of consecutive failures is greater than the threshold value, step S45 is performed.
In the embodiment of the present disclosure, the above threshold may be configured by a parameter in the terminal. For example, the parameter susist.hw.sys.net.bak.fail.max, which can be preset when leaving the factory, the value range [1,100], the default value is 5 times, and the parameter can be configured correspondingly according to the network requirement; the legal value is greater than 0 and less than or equal to 100, and the default value 5 is used when the illegal value does not exist or is not used.
The terminal is provided with a network access counting module 4D, and the network access counting module 4D counts by acquiring a network access status notification generated by the network module 4B in the terminal. When the terminal uses the main network access parameter to perform network access failure, generating a network access state notification indicating the access failure through a network module 4B in the terminal; and counting the number of continuous failures through a network access counting module in the terminal, wherein the network access counting module 4D accumulates a counting value based on the network access state notification indicating the access failure generated by the network module 4B, and the counting value is used for indicating the number of continuous failures. When the network access of the terminal is successful, generating a network access state notification indicating that the network access is successful through a network module 4B in the terminal; the network access counting module 4D resets the count value to 0 based on the network access status notification indicating that the access was successful generated by the network module 4B. That is, the count is performed when the notification indicates that the access has failed, and the count is cleared when the notification indicates that the access has succeeded. In addition to clearing the access success count, when the terminal is in standby, wakes up in standby, resumes factory setting, plugs network cables and the like, the continuous failure times are cleared.
In the embodiment of the present disclosure, the network access manner includes two modes of performing network access by using a single transmission protocol (i.e., single stack access) and performing network access alternately by using two transmission protocols (i.e., dual stack switching), for example, polling once "DHCP, PPPOE" or "PPPOE, DHCP" is a switching once. For the two connection modes, the counting mode is also different, and the network access counting module 4D may count in the following manner:
when a single transmission protocol is adopted for network access, each time of access failure generates a network access state notification indicating the access failure, and the count value of the network access counting module 4D is increased by one;
or when the two transmission protocols are adopted to alternately perform the network access, the network access state notification indicating the access failure is generated every time the number of periods (i.e. the switching times) for alternately performing the network access failure by adopting the two transmission protocols reaches the switching threshold value, and the count value of the network access counting module 4D is increased by one.
In the embodiment of the disclosure, when a single transmission protocol is adopted for network access, the switching flow is simpler, and only the switching is needed based on the threshold. When two transmission protocols are adopted to alternately perform network access, the switching threshold value needs to be considered besides the threshold value during switching, and the related parameters are as shown in the following table 2:
TABLE 2
Figure BDA0002313811240000101
The double stack_notify4failnum is used for controlling the time of failure to send the network access state notification indicating failure, and is only effective in the dual stack switching mode, and the first failure in the single stack access mode sends the network access state notification indicating failure.
In the embodiment of the present disclosure, processing logic when network access fails is as follows:
Figure BDA0002313811240000111
switching parameter source identification; the source of the switching parameters is switched every susist. Hw. Sys. Bak. Fail. Max times for a continuous failure
The processing logic of the conditions of successful network access or standby, standby awakening, factory setting recovery, network cable plugging and unplugging and the like is as follows:
mcontinuouslyfailcount=0; count of number of consecutive failures of/reset
mdoublestackrunnum=0; count of number of times of double stack of// reset
Since there are two access modes of single stack access and dual stack switching, there are several cases of the following table 3 when switching:
TABLE 3 Table 3
Figure BDA0002313811240000112
The dual stack switching procedure is described below by way of example. The scenario in this example is: the main network access parameter is double stack switching, the standby network access parameter is single stack access, and the related parameters are configured as follows:
double stack_retry_max=10// maximum number of swizzles, the maximum number of swizzles for dual stack is 10
persist. Hw. Sys. Bak. Fail. Max=5// threshold, switching primary and backup parameters with 5 consecutive failures
ethparam.source.switch.limit=10// switching threshold, primary and backup parameters are switched up to 10 times
The network access status notification indicating failure is sent by the 1 st failure when the doublestack_notify4 failnum=1// switch threshold is 1
Fig. 6 is a schematic diagram of a counting scheme of a terminal provided in the present disclosure, referring to fig. 6, in step S4a, dual stack switching access is performed by using a primary network access parameter, and when the number of continuous failures reaches 5, a primary-standby switching action is triggered; in step S4b, adopting the standby network access parameter to carry out single stack access, and triggering the primary-standby switching action when the continuous failure times reach 5 times; in step S4c, the dual stack switching access is performed by using the main network access parameter, and when the number of continuous failures reaches 5, the limit that the maximum number of dual stack switching is 10 is reached, and the connection is stopped.
Step S45: and acquiring standby network access parameters stored in the terminal.
In an embodiment of the present disclosure, this step may include: generating a network access parameter switching request;
the standby network access parameters are read from the database 4X based on the network access parameter switching request.
Here, generating the network access parameter switching request may include: acquiring a count value of a network access counting module 4D in the terminal; when the count value reaches the threshold value, a network access parameter switching request is generated by the network module 4B.
Illustratively, a network access parameter switching request is sent to a network access assistance module 4A by a network module 4B in the terminal, the network access assistance module 4A being configured to manage the database 4X; and acquiring the standby network access parameters read out from the database 4X by the network access auxiliary module 4A.
Illustratively, the network access assistance module 4A encapsulates the read-write operations of the network access parameters into a unified interface. The network module 4B obtains network access parameters through the interface instead, if the number of continuous failures counted by the network access counting module 4D reaches a threshold value, the network module 4B sends a network access parameter switching request, where the network access parameter switching request may be a broadcast message "android.net.data.network_backup_change", and notifies the network access auxiliary module 4A to switch the primary and secondary data sources. When the network access auxiliary module 4A receives the network access parameter switching request, data source switching is performed and the read network access parameter is returned to the network module 4B through the interface.
If the primary network access parameter is currently used, switching to the use of the standby network access parameter;
if the standby network access parameter is currently used, switching to using the active network access parameter.
Here, reading, by the network access assistance module 4A, the standby network access parameter from the database 4X may include:
determining a parameter source identifier, wherein the parameter source identifier is used for indicating a currently used network access parameter source, and the source comprises the active network access parameter and the standby network access parameter;
changing the parameter source identification;
and reading the network access parameters corresponding to the modified parameter source identifiers from the database 4X to obtain the standby network access parameters.
In the embodiment of the present disclosure, the network access auxiliary module 4A may determine the network access parameters to be read according to the parameter source flag in the terminal. The parameter source flag sys.hw.net.eth.param.source is used for identifying whether the parameters used for the network connection are read from the standby network access parameters or the active network access parameters, and the range of the parameter source flag is 0 and 1. If the value is 0 or does not exist, the use of the 'active network access parameter' is indicated; a value of 1 indicates the use of a "standby network access parameter".
The network access auxiliary module 4A reads corresponding data according to the parameter source mark:
if the identification is that the access parameter of the active network is used, the data in the configuration file can be read according to the step S41; of course, the access parameters of the main network in the database can also be read;
and if the identification is that the standby network access parameter is used, reading the standby network access parameter.
The parameter source mark is only recorded in the memory, and the main network access parameter is preferentially used for network connection after the system is restarted, so that the main network access parameter meets the intention of an operator only when the main network access parameter and the standby network access parameter are available.
In addition, after the network is successfully counted, the continuous failure count needs to be cleared, but the parameter source identifier needs to be reserved so as to be used as a reference in the next network access. Similarly, under the conditions of standby wakeup, network cable plugging and the like, the parameter source identification is kept unchanged, and the parameter source identification before continuous use is carried out.
When the network access fails, when the number of continuous failures is larger than a threshold value, modifying the mark of the parameter source so as to use the parameter of the new source when the network access is next time, namely realizing switching:
If the primary network access parameter is currently used, modifying the identification as the use standby network access parameter;
if the standby network access parameter is currently used, the active network access parameter identified as being used is modified.
Optionally, the method may further include:
when the number of continuous failures of network access by using the main network access parameter is larger than a threshold value, reporting log information to a network management system in a network, wherein the log information is used for indicating the failure of the access by adopting the main network access parameter.
After receiving the network access parameter switching request, the network access auxiliary module judges whether the network access auxiliary module is the first switching after power-up/restarting, if so, the network access auxiliary module reports log information to the TMS, and if not, no additional processing is needed.
The log information may be sent via a broadcast message, for example:
reporting 10024 error CODEs through broadcasting message android.intent.action.error_code_report, and carrying error CODE information by using info field, wherein the error CODE information is as follows:
{"ErrorCodeValue":"10024",
"ErrorSource" 1",// means first hand-off
"ErrorDesc":"Network last-access to use backup network parameters"}
"ErrorDesc" enable standby network Access parameter "
Step S46: and adopting the standby network access parameters to carry out network access. When the access with the standby network access parameter is successful, step S47 is performed. When the access using the standby network access parameter fails, step S48 is performed.
In the access process, the user may change the networking scheme, for example, change the terminal from being connected to the optical network terminal to being connected to the router, so that although the network access parameter is adopted when the last access is successful, the access failure is caused by the change of the networking scheme when the standby network access parameter is adopted.
Step S47: and writing the standby network access parameters into a main data table to serve as the main network access parameters.
When the standby network access parameter is successfully accessed, the network access auxiliary module 4A of the terminal receives a network access status notification sent by the network module 4B, the notification indicates that the access is successful, and at this time, the network access auxiliary module 4A can write the standby network access parameter into the main data table and the configuration file in the database.
Step S48: and recording the continuous failure times of network access by adopting the standby network access parameters. When the number of consecutive failures is greater than the threshold value, step S41 is performed.
When the adoption of the standby network access parameter fails, the standby network access parameter can be switched to the main network access parameter, and multiple attempts are made to avoid unsuccessful access under the condition that the network access parameter is correct.
Optionally, the method may further include: and stopping network access when the primary and standby switching times reach a switching threshold value.
In the embodiment of the present disclosure, the switching threshold ethparameter. The switching threshold value range [1,10000] is 10 by default, and the configuration item does not exist or the value is not a default value for rules.
When receiving a network access parameter switching request, the network access auxiliary module 4A judges whether the switching times reach a switching threshold value;
if not, continuing accumulating and switching the data sources; if the threshold has been reached, the data source is not switched. The count is the same as the continuous failure times, and is reset when the terminal is restarted, wakes up in a standby mode, plugs in and plugs out the network cable and is accessed successfully, and other conditions are continuously accumulated.
According to the method and the device, the continuous failure times of network access are counted, and when the times reach the threshold value, the network access parameters used are switched seamlessly, so that the continuous online of the terminal is ensured.
The network access parameter backup and switching scheme adopted in the embodiment of the disclosure can be selected to be started or not started in the terminal.
For example, whether to turn on the function is determined by setting values of the following parameters of the terminal: the value range of the parameter is [0,1], wherein, the value of 0 or unset value indicates that the function is not started; a value of 1 indicates that the function is turned on.
The terminal comprises a setup module 4E which provides a User Interface (UI) for the User, through which the User can make data modifications and queries.
In general, in the user interface, all the active network access parameters are displayed, and after the parameter source identifier is introduced, there may be a problem that the network access parameters displayed in the user interface are not matched with the network access parameters used by the network module 4B.
Although the general user does not care what parameters are used by the current network module 4B to access the network, only the terminal needs to access the network. It is necessary for maintenance personnel to know which parameters the terminal is currently using to access the network in order to discover problems in advance or locate problems that have occurred. Thus, we add the network access parameter information option to the [ more ] menu of the user interface, including the current network access parameter source-enabled standby network access parameters in table 4 below.
TABLE 4 Table 4
Figure BDA0002313811240000141
The network access parameter information options can be displayed by default and can be closed as required.
When the parameter source identifier sys.hw.net.eth.parameter source takes a value of 1, the current network access parameter source is a standby network access parameter, and the "enabled standby network access parameter" is displayed; and the value is not existed or is 0, and the active network access parameter is enabled. The user may click on this option to enter the details page to view the relevant network access parameter information.
The decision of which data to display is based on the current network access mode (DHCP/IpoE/PPPoE/Static), the ethernet_mode field in the network access parameters indicates which access mode the network is currently using. Table 5 below shows the parameters in three modes IpoE/PPPoE/Static.
Considering the above [ more ], the information of the current network access parameter source is only used in the process of maintaining, observing and positioning the network problem, the parameter source identifier is stored by adopting a system attribute, and the user interface cannot know the change of the system attribute value in real time, so that the user interface cannot be updated in real time. The method and the device can be used for refreshing the parameter source identification by reentering after returning to the upper page.
TABLE 5
Figure BDA0002313811240000151
Fig. 7 is a flowchart of a network access method provided in an embodiment of the present application. The method can be executed by the terminal in the application scenario, as shown in fig. 7, and includes the following steps:
step S51: and receiving a one-key rollback instruction sent by the network management system.
And the terminal is internally provided with a device.X_00E0FC.ParameterRestore function, and when the terminal receives an instruction device.X_00E0FC.ParameterRestore=network.ConnectType issued by a network management system (TMS), the terminal executes a one-key rollback function.
The one-touch back instruction may indicate that the parameter before the modification needs to be returned after the modification.
Step S52: at least one modified parameter is determined from the standby network access parameters.
The terminal recognizes the device. X_00e0fc.parameterrestore instruction through the middleware configuration management module, and then performs the following operations:
inquiring whether the recovery parameter HwParmName (the parameter can be any parameter in network access parameters) to be recovered has a backup field HwParmName_bak, if not, ending the operation, and returning to failure; if so, the parameter HwParmOldValue is obtained and step S53 is performed.
Here, the standby network access parameters stored in the terminal may be stored in the manner of the previous step S43.
Step S53: and adopting the parameters obtained from the standby network access parameters to carry out network access.
Updating the HwParmOldValue into a parameter field HwParmName, and recovering the parameter field state in the database after completion:
HwParmName_bak: this field stores the value HwParmOldValue before modification;
HwParmName: the value stored in this field is the same as the backup field HwParmOldValue.
Meanwhile, the method may further include: and refreshing the main data table in the terminal by adopting the standby network access parameters to perform reverse writing, so that the follow-up acquisition of the parameters from the main data table can be ensured to be online.
Fig. 8 is a schematic diagram illustrating a process of adopting a one-key rollback function, as shown in fig. 8, when an operator modifies a network access parameter of a terminal through a network management system and if an error parameter is modified due to misoperation, and a failure that cannot be logged in is caused, one-key rollback can be implemented through the steps to refresh the parameter, so that the terminal is recovered to be normal, and the terminal is prevented from being offline due to misoperation.
After this step, steps S45-S47 may also be continued.
In addition to performing the one-key fallback in the manner of steps S51-S52, the method may also perform the one-key fallback in the following manner: directly modifying network access parameters through issuing parameters SetParameterValues (parameter names, parameter values), and supporting parameters of issuing one-key rollbacks are as follows in table 6:
TABLE 6
Figure BDA0002313811240000161
Fig. 9 is a block diagram of a network access device according to an embodiment of the present application. The network access means may be implemented as all or part of the terminal by software, hardware or a combination of both. The network access device may include: an acquisition unit 601 and an access unit 602.
An obtaining unit 601, configured to obtain a standby network access parameter stored in a terminal when a number of continuous failures of network access performed by the terminal using a primary network access parameter is greater than a threshold, where the standby network access parameter is a network access parameter used when a last network access is successful;
An access unit 602 configured to use the standby network access parameters for network access.
Optionally, the apparatus further comprises:
a backup unit 603 configured to replace the standby network access parameter with the active network access parameter when the access with the active network access parameter is successful.
Optionally, the acquiring unit 601 is configured to generate a network access parameter switching request; and reading the standby network access parameters from a database based on the network access parameter switching request.
Optionally, the acquiring unit 601 is configured to acquire a count value of a network access counting module in the terminal, where the count value is used to indicate the number of consecutive failures; and when the count value reaches the threshold value, generating the network access parameter switching request through the network module.
Optionally, the acquiring unit 601 is configured to determine a parameter source identifier, where the parameter source identifier is used to indicate a currently used network access parameter source, and the source includes the active network access parameter and the standby network access parameter; changing the parameter source identification; and reading the network access parameters corresponding to the modified parameter source identifiers from the database to obtain the standby network access parameters.
Optionally, the apparatus further comprises:
a counting unit 604, configured to record the number of consecutive failures of network access using the active network access parameter.
Optionally, the counting unit 604 is configured to generate, by a network module in the terminal, a network access status notification indicating an access failure when the terminal fails to access the network using the primary network access parameter; and counting the number of continuous failures through a network access counting module in the terminal, wherein the network access counting module accumulates the count value based on the network access state notification indicating the access failure generated by the network module.
Optionally, the counting unit 604 is configured to generate, when network access is performed using a single transmission protocol, the network access status notification indicating access failure every time access fails; or when the network access is alternately performed by adopting the two transmission protocols, generating the network access state notification indicating the access failure every time the cycle number of the network access failure alternately performed by adopting the two transmission protocols reaches the switching threshold value.
Optionally, the counting unit 604 is further configured to generate, by a network module in the terminal, a network access status notification indicating that the access is successful when the network access of the terminal is successful; the network access counting module resets the count value to 0 based on a network access status notification generated by the network module indicating that access was successful.
Optionally, the obtaining unit 601 is further configured to obtain the active network access parameter stored in the terminal when the number of consecutive failures of the network access by the terminal using the standby network access parameter is greater than a threshold value,
the access unit 602 is further configured to perform network access using the active network access parameters.
Optionally, the apparatus further comprises:
a determining unit 605 configured to determine a primary-standby switching number, where the primary-standby switching number refers to a number of times of switching the primary network access parameter and the standby network access parameter in an access process;
the access unit 602 is further configured to stop performing network access when the number of active/standby handover reaches a handover threshold.
Optionally, the apparatus further comprises:
and a log unit 606 configured to report log information to a network management system in the network when the number of continuous failures of network access using the active network access parameter is greater than a threshold, where the log information is used to indicate that access using the active network access parameter fails.
Optionally, the apparatus further comprises:
a receiving unit 607, configured to receive a one-key rollback instruction sent by the network management system;
The obtaining unit 601 is further configured to determine at least one modified parameter from the standby network access parameters;
the access unit 602 is further configured to perform network access using parameters obtained from the standby network access parameters.
It should be noted that: in the network access device provided in the above embodiment, only the division of the functional units is used for illustration, and in practical application, the above-mentioned functional allocation may be performed by different functional units according to needs, that is, the internal structure of the device is divided into different functional units, so as to complete all or part of the functions described above. In addition, the network access device and the network access method embodiment provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the network access device and the network access method embodiment are detailed in the method embodiment, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing is merely an optional embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that may be easily contemplated by those skilled in the art within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (24)

1. A network access method, the method comprising:
when the number of continuous failures of the terminal for network access by using the main network access parameter is larger than a threshold value, acquiring a standby network access parameter stored in the terminal, wherein the standby network access parameter is a network access parameter used when the last network access is successful;
performing network access by adopting the standby network access parameters;
when the number of continuous failures of the network access by the terminal through the standby network access parameters is larger than a threshold value, acquiring the active network access parameters stored in the terminal, wherein the active network access parameters are synchronously modified when a configuration file is modified;
performing network access by adopting the main network access parameters;
continuously counting the double-stack switching times when the main network access parameter and the standby network access parameter are both in a double-stack switching access mode; wherein, the dual stack switching is switching between PPPOE transmission protocol and DHCP transmission protocol;
Or when the main network access parameter is a dual-stack switching access mode, the standby network access parameter is a single-stack access mode, the dual-stack switching times are not cleared when the main network access parameter is switched to the standby network access parameter, and the dual-stack switching times are accumulated when the standby network access parameter is switched to the main network access parameter;
or when the main network access parameter is in a single stack access mode, the standby network access parameter is in a dual stack switching access mode, and when the main network access parameter is switched to the standby network access parameter, accumulating the dual stack switching times, and when the standby network access parameter is switched to the main network access parameter, not clearing the dual stack switching times;
determining the primary and standby switching times, wherein the primary and standby switching times refer to the times of switching the primary network access parameter and the standby network access parameter in the access process;
and stopping network access when the main/standby switching times reach a switching threshold value or the double-stack switching times reach the maximum switching times of double-stack switching.
2. The method of claim 1, wherein the obtaining the standby network access parameters stored in the terminal comprises:
generating a network access parameter switching request;
and reading the standby network access parameters from a database based on the network access parameter switching request.
3. The method of claim 2, wherein generating the network access parameter switching request comprises:
acquiring a count value of a network access counting module in the terminal, wherein the count value is used for indicating the continuous failure times;
and when the count value reaches the threshold value, generating the network access parameter switching request through the network module.
4. The method of claim 2, wherein the reading the standby network access parameters from a database based on the network access parameter switch request comprises:
determining a parameter source identifier, wherein the parameter source identifier is used for indicating a currently used network access parameter source, and the source comprises the active network access parameter and the standby network access parameter;
changing the parameter source identification;
and reading the network access parameters corresponding to the modified parameter source identifiers from the database to obtain the standby network access parameters.
5. A method according to claim 3, characterized in that the method further comprises:
and recording the continuous failure times of network access by adopting the main network access parameters.
6. The method of claim 5, wherein the recording the number of consecutive failures of network access using the active network access parameter comprises:
when the terminal uses the main network access parameter to carry out network access failure, generating a network access state notification indicating the access failure through a network module in the terminal;
and counting the number of continuous failures through a network access counting module in the terminal, wherein the network access counting module accumulates the count value based on the network access state notification indicating the access failure generated by the network module.
7. The method of claim 6, wherein the generating, by the network module in the terminal, a network access status notification indicating an access failure when the terminal fails network access using the primary network access parameter, comprises:
when a single transmission protocol is adopted for network access, generating a network access state notification indicating access failure each time the access fails;
Or,
when the network access is alternately performed by adopting the two transmission protocols, the network access state notification indicating the access failure is generated every time the cycle number of the network access failure alternately performed by adopting the two transmission protocols reaches the switching threshold value.
8. The method of claim 6, wherein the method further comprises:
when the terminal network access is successful, generating a network access state notification indicating that the access is successful through a network module in the terminal; the network access counting module resets the count value to 0 based on a network access status notification generated by the network module indicating that access was successful.
9. The method according to any one of claims 1 to 8, further comprising:
and when the access of the active network access parameter is successful, replacing the standby network access parameter by the active network access parameter.
10. The method according to any one of claims 1 to 8, further comprising:
when the number of continuous failures of network access by using the main network access parameter is larger than a threshold value, reporting log information to a network management system in a network, wherein the log information is used for indicating the failure of the access by adopting the main network access parameter.
11. The method according to claim 10, wherein the method further comprises:
receiving a one-key rollback instruction sent by the network management system;
determining at least one modified parameter from the standby network access parameters;
and adopting the parameters obtained from the standby network access parameters to carry out network access.
12. A network access device, the device comprising:
the acquisition unit is configured to acquire standby network access parameters stored in the terminal when the number of continuous failures of network access by the terminal by using the main network access parameters is greater than a threshold value, wherein the standby network access parameters are network access parameters used when the last network access is successful;
an access unit configured to perform network access using the standby network access parameter;
the acquiring unit is further configured to acquire the active network access parameter stored in the terminal when the number of continuous failures of network access by the terminal using the standby network access parameter is greater than a threshold value, wherein the active network access parameter is synchronously modified when a configuration file is modified;
the access unit is further configured to perform network access by adopting the active network access parameters;
The counting unit is configured to continuously count the double-stack switching times when the main network access parameter and the standby network access parameter are both in a double-stack switching access mode; wherein, the dual stack switching is switching between PPPOE transmission protocol and DHCP transmission protocol;
or when the main network access parameter is a dual-stack switching access mode, the standby network access parameter is a single-stack access mode, the dual-stack switching times are not cleared when the main network access parameter is switched to the standby network access parameter, and the dual-stack switching times are accumulated when the standby network access parameter is switched to the main network access parameter;
or when the main network access parameter is in a single stack access mode, the standby network access parameter is in a dual stack switching access mode, and when the main network access parameter is switched to the standby network access parameter, accumulating the dual stack switching times, and when the standby network access parameter is switched to the main network access parameter, not clearing the dual stack switching times;
A determining unit configured to determine a primary-standby switching number, where the primary-standby switching number refers to a number of times of switching the primary network access parameter and the standby network access parameter in an access process;
and the access unit is further configured to stop network access when the primary and standby switching times reach a switching threshold value or the dual-stack switching times reach a dual-stack switching maximum switching times.
13. The apparatus of claim 12, wherein the obtaining unit is configured to generate a network access parameter handover request; and reading the standby network access parameters from a database based on the network access parameter switching request.
14. The apparatus according to claim 13, wherein the obtaining unit is configured to obtain a count value of a network access counting module in the terminal, the count value being used to indicate the number of consecutive failures; and when the count value reaches the threshold value, generating the network access parameter switching request through the network module.
15. The apparatus according to claim 13, wherein the obtaining unit is configured to determine a parameter source identifier, the parameter source identifier being used to indicate a currently used network access parameter source, the source comprising the primary network access parameter and the backup network access parameter; changing the parameter source identification; and reading the network access parameters corresponding to the modified parameter source identifiers from the database to obtain the standby network access parameters.
16. The apparatus of claim 14, wherein the apparatus further comprises:
and the counting unit is configured to record the continuous failure times of network access by adopting the main network access parameters.
17. The apparatus according to claim 16, wherein the counting unit is configured to generate, by a network module in the terminal, a network access status notification indicating an access failure when the terminal fails network access using a primary network access parameter; and counting the number of continuous failures through a network access counting module in the terminal, wherein the network access counting module accumulates the count value based on the network access state notification indicating the access failure generated by the network module.
18. The apparatus according to claim 17, wherein the counting unit is configured to generate the network access status notification indicating an access failure each time an access fails when network access is performed using a single transport protocol; or when the network access is alternately performed by adopting the two transmission protocols, generating the network access state notification indicating the access failure every time the cycle number of the network access failure alternately performed by adopting the two transmission protocols reaches the switching threshold value.
19. The apparatus of claim 17, wherein the counting unit is further configured to generate, by a network module in the terminal, a network access status notification indicating that access was successful when the terminal network access was successful; the network access counting module resets the count value to 0 based on a network access status notification generated by the network module indicating that access was successful.
20. The apparatus according to any one of claims 12 to 19, further comprising:
and the backup unit is configured to replace the standby network access parameter with the active network access parameter when the access with the active network access parameter is successful.
21. The apparatus according to any one of claims 12 to 19, further comprising:
and the log unit is configured to report log information to a network management system in a network when the number of continuous failures of network access by using the active network access parameters is greater than a threshold value, wherein the log information is used for indicating the failure of the access by using the active network access parameters.
22. The apparatus of claim 21, wherein the apparatus further comprises:
The receiving unit is configured to receive a one-key rollback instruction sent by the network management system;
the acquisition unit is further configured to determine at least one modified parameter from the standby network access parameters;
the access unit is further configured to perform network access by using parameters obtained from the standby network access parameters.
23. A network access device, the network access device comprising a processor and a memory; the memory is used for storing software programs and modules, and the processor implements the method according to any one of claims 1 to 11 by running or executing the software programs and/or modules stored in the memory.
24. A computer readable storage medium for storing program code for execution by a processor, the program code comprising instructions for implementing the method of any one of claims 1 to 11.
CN201911269655.8A 2019-12-11 2019-12-11 Network access method, device and storage medium Active CN112953750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911269655.8A CN112953750B (en) 2019-12-11 2019-12-11 Network access method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911269655.8A CN112953750B (en) 2019-12-11 2019-12-11 Network access method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112953750A CN112953750A (en) 2021-06-11
CN112953750B true CN112953750B (en) 2023-04-28

Family

ID=76234236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911269655.8A Active CN112953750B (en) 2019-12-11 2019-12-11 Network access method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112953750B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268677A (en) * 2021-12-28 2022-04-01 厦门安胜网络科技有限公司 Data transmission method and system based on weak network environment
CN114374749A (en) * 2021-12-29 2022-04-19 中国电信股份有限公司 Network access method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262493A (en) * 2011-10-07 2013-08-21 Lg电子株式会社 Method for accessing multiple networks, and communication equipment for same
CN103685281A (en) * 2013-12-18 2014-03-26 中国联合网络通信集团有限公司 Network address protocol switching method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902731B (en) * 2010-06-21 2015-04-01 优视科技有限公司 Internet access method based on mobile communication equipment terminals
CN103582050B (en) * 2012-07-19 2018-12-11 电信科学技术研究院 A kind of method, system and the equipment of carrying switching
US20150026317A1 (en) * 2013-07-16 2015-01-22 Qualcomm Connected Experiences, Inc. Recovering from a failure to connect to a network that was remotely configured on a headless device
CN107438186A (en) * 2016-05-25 2017-12-05 中兴通讯股份有限公司 A kind of network backup reconnection method, device and set top box
CN109379779B (en) * 2018-09-06 2022-03-15 深圳市广和通无线股份有限公司 Dialing networking method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262493A (en) * 2011-10-07 2013-08-21 Lg电子株式会社 Method for accessing multiple networks, and communication equipment for same
CN103685281A (en) * 2013-12-18 2014-03-26 中国联合网络通信集团有限公司 Network address protocol switching method and device

Also Published As

Publication number Publication date
CN112953750A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
US11258667B2 (en) Network management method and related device
US10063312B2 (en) Optical network unit reset message
CN112953750B (en) Network access method, device and storage medium
CN104883547A (en) IPC access method based on physical port of network access equipment, and NVR
US10917289B2 (en) Handling network failures in networks with redundant servers
CN108848054A (en) Network device registration method, apparatus, computer equipment and storage medium
WO2017202261A1 (en) Network backup reconnection method and apparatus, and set-top box
CN108924043A (en) System monitoring method, gateway communication, gateway apparatus, service processing equipment
CN109982065B (en) Method, device and storage medium for equipment fault recovery in video monitoring network
US9092396B2 (en) Standby system device, a control method, and a program thereof
CN105577616A (en) Authentication method and system for terminal access, and service management server
CN106850268B (en) device and method for realizing linear protection switching
US20170295452A1 (en) Method and Registration Node for Managing Application Resource in Machine to Machine (M2M)
CN110933192A (en) Local area network IP address allocation method, device, system and computer equipment
US20230344702A1 (en) Master/backup negotiation method and device
US9658927B1 (en) Assisted device recovery
CN111488163A (en) Firmware updating method and device, electronic equipment and storage medium
CN115835370A (en) Network distribution method, device, equipment and medium for intelligent equipment
CN113391759B (en) Communication method and equipment
CN111935703B (en) Network connection management method and terminal equipment
CN108933803B (en) Front-end equipment, cloud storage server, and streaming data direct storage method and system
US20210014332A1 (en) Method for managing a group of devices, associated server and system
JP7520158B2 (en) USAGE REPORTING METHOD, NETWORK FUNCTION ENTITY AND STORAGE MEDIUM
CN115695169B (en) Configuration information issuing method, device and storage medium
CN111163459B (en) IMSI configuration method, device, storage medium and control terminal of network equipment

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