[go: up one dir, main page]

CN103841104B - Automatically the method and device to network - Google Patents

Automatically the method and device to network Download PDF

Info

Publication number
CN103841104B
CN103841104B CN201410073142.0A CN201410073142A CN103841104B CN 103841104 B CN103841104 B CN 103841104B CN 201410073142 A CN201410073142 A CN 201410073142A CN 103841104 B CN103841104 B CN 103841104B
Authority
CN
China
Prior art keywords
networking
disconnection
network
layer
network connection
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.)
Expired - Fee Related
Application number
CN201410073142.0A
Other languages
Chinese (zh)
Other versions
CN103841104A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201410073142.0A priority Critical patent/CN103841104B/en
Publication of CN103841104A publication Critical patent/CN103841104A/en
Application granted granted Critical
Publication of CN103841104B publication Critical patent/CN103841104B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present invention is applied to the communications field, there is provided a kind of method and device to network automatically, methods described comprise the following steps:After the trigger signal for receiving manual suspension, trigger actual networking layer and perform suspension;After suspension, operation cushion judges whether to need to start networking;When needing to start networking, trigger actual networking layer and start networking process.The method and device of the embodiment of the present invention can realize the automatic networking under manual suspension.

Description

自动连网的方法及装置Method and device for automatic networking

技术领域technical field

本发明属于通信领域,尤其涉及一种自动连网的方法及装置。The invention belongs to the field of communication, in particular to a method and device for automatic networking.

背景技术Background technique

目前路由器基本上使用网页来控制,通过PPP协议(Point to Point Protocol)拨号上网,在网络使用过程中,自动重连功能是必须实现的技术,这种自动重连技术包含两个方面:At present, routers are basically controlled by web pages, and dial-up Internet access through the PPP protocol (Point to Point Protocol). In the process of using the network, the automatic reconnection function is a technology that must be implemented. This automatic reconnection technology includes two aspects:

(1)网络自己断开,然后自动连上。(1) The network is disconnected by itself, and then connected automatically.

(2)设备使用者主动断网,但如果设置了主动连接,则要求网络可以再次连上。(2) The device user actively disconnects from the network, but if the active connection is set, the network is required to be connected again.

目前许多技术都能实现上面所提第一方面的功能,但在第二方面,几乎只实现单次断网时的断网技术,如果在一段时间内,手动触发断网事件有多个时,如何处理连网过程则很少提及,特别是在多个用户操作路由器等控制界面时更是如此。At present, many technologies can realize the functions of the first aspect mentioned above, but in the second aspect, almost only the disconnection technology for a single disconnection is realized. If there are multiple disconnection events manually triggered within a period of time, How the networking process is handled is rarely mentioned, especially when multiple users operate a control interface such as a router.

发明内容Contents of the invention

本发明实施例的目的在于提供一种自动连网的方法及装置,旨在解决现有的手工断网情况下无法自动连网的问题。The purpose of the embodiments of the present invention is to provide a method and device for automatic network connection, aiming at solving the existing problem that the network cannot be connected automatically when the network is manually disconnected.

本发明实施例是这样实现的,一种自动连网的方法,所述方法包括如下步骤:The embodiment of the present invention is achieved in this way, a method for automatic networking, the method includes the following steps:

收到手工断网的触发信号后,操作缓冲层触发实际连网层执行断网操作;After receiving the trigger signal of manual network disconnection, the operation buffer layer triggers the actual network layer to perform the network disconnection operation;

在所述实际连网层执行断网操作后,所述操作缓冲层判断是否需要启动自动连网;After the actual network connection layer performs a network disconnection operation, the operation buffer layer judges whether automatic network connection needs to be started;

当需要启动连网时,所述操作缓冲层触发所述实际连网层启动自动连网进程。When networking needs to be started, the operation buffer layer triggers the actual networking layer to start an automatic networking process.

进一步地,所述操作缓冲层判断是否需要启动连网包括:Further, the operation buffer layer judging whether to start networking includes:

当满足预设的启动条件时,判定需要启动连网,否则不需要启动连网。When the preset activation condition is met, it is determined that the network connection needs to be activated; otherwise, the network connection does not need to be activated.

进一步地,所述启动条件为:手工断网超过预设的第一时间,和/或用户设置为手工断网后启动连网。Further, the activation condition is: the manual disconnection exceeds the preset first time, and/or the user sets to start the network connection after manual disconnection.

进一步地,在所述触发实际连网层启动连网进程之后,还包括:Further, after triggering the actual networking layer to start the networking process, it also includes:

所述操作缓冲层接收所述实际连网层的反馈,所述反馈包括自动连网成功或自动连网失败的消息;The operation buffer layer receives feedback from the actual networking layer, and the feedback includes a message of automatic networking success or automatic networking failure;

所述操作缓冲层根据所述实际连网层的反馈判断连网是否成功;The operation buffer layer judges whether the networking is successful according to the feedback from the actual networking layer;

当所述操作缓冲层判断连网失败时,所述操作缓冲层再次判断是否需要启动连网,或,When the operation buffer layer judges that the network connection fails, the operation buffer layer judges again whether to start the network connection, or,

当所述操作缓冲层判断连网成功时,所述操作缓冲层进入线程阻塞状态。When the operation buffer layer determines that the network connection is successful, the operation buffer layer enters a thread blocking state.

进一步地,所述操作缓冲层进入线程阻塞之后,还包括:Further, after the operation buffer layer enters thread blocking, it also includes:

判断是否获得实际连网层发送的已经断网信号,若已经获得所述已经断网信号,则所述操作缓冲层从线程阻塞状态中返回,并再次判断是否需要启动连网,否则持续线程阻塞。Judging whether to obtain the disconnection signal sent by the actual network layer, if the disconnection signal has been obtained, the operation buffer layer returns from the thread blocking state, and judges again whether to start the network connection, otherwise the thread blocking continues .

本发明还提出一种自动连网的装置,所述装置包括:The present invention also proposes a device for automatic networking, the device comprising:

触发断网模块,用于收到手工断网的触发信号后,触发所述实际连网层执行断网操作;A trigger disconnection module, configured to trigger the actual network layer to perform a disconnection operation after receiving a trigger signal for manual disconnection;

判断模块,用于在所述实际连网层执行断网操作后,判断是否需要启动自动连网;A judging module, configured to judge whether automatic networking needs to be started after the disconnection operation is performed at the actual networking layer;

触发连网模块,用于当需要启动连网时,触发所述实际连网层启动自动连网进程。The triggering networking module is used to trigger the actual networking layer to start the automatic networking process when the networking needs to be started.

进一步地,所述判断模块具体用于:Further, the judging module is specifically used for:

当满足预设的启动条件时,判定需要启动连网,否则不需要启动连网。When the preset activation condition is met, it is determined that the network connection needs to be activated; otherwise, the network connection does not need to be activated.

进一步地,所述启动条件为手工断网超过一预设的第一时间,和/或用户设置为手工断网后启动连网。Further, the activation condition is that the manual disconnection exceeds a preset first time, and/or the user sets to start the network connection after manual disconnection.

进一步地,所述装置还包括:Further, the device also includes:

反馈模块,用于接收所述实际连网模块的反馈,并根据所述实际连网层的反馈判断连网是否成功,所述反馈包括自动连网成功或自动连网失败的消息;A feedback module, configured to receive feedback from the actual networking module, and judge whether the networking is successful according to the feedback from the actual networking layer, where the feedback includes a message of automatic networking success or automatic networking failure;

当判断连网失败时,再次判断是否需要启动连网,或,When it is judged that the network connection fails, judge again whether to start the network connection, or,

当判断连网成功时,进入线程阻塞状态。When it is judged that the network connection is successful, enter the thread blocking state.

进一步地,所述判断模块还用于,判断是否获得实际连网层发出的已经断网信号,若已经获得所述已经断网信号,则所述判断模块判断再次是否需要启动连网,否则持续线程阻塞。。Further, the judging module is also used to judge whether to obtain the disconnected signal from the actual network layer, if the disconnected signal has been obtained, the judging module judges whether to start the network connection again, otherwise continue Thread blocked. .

在本发明实施例中,实现当用户手工断网后根据需要自动连网,给用户使用提供了方便。同时本发明实施例还可实现自动断网后自动连网,兼顾了手工断网和自动断网的处理。进一步地,本发明实施例采用分层设计,使得连网功能模块化,便于以后开发和维护,给用户提供了良好的体验。In the embodiment of the present invention, when the user manually disconnects from the network, it is automatically connected to the network as needed, which provides convenience for the user. At the same time, the embodiment of the present invention can also realize automatic network connection after automatic network disconnection, taking into account the processing of manual network disconnection and automatic network disconnection. Furthermore, the embodiment of the present invention adopts a layered design, so that the networking function is modularized, which facilitates future development and maintenance, and provides users with a good experience.

附图说明Description of drawings

图1是本发明实施例一提供的自动连网的方法的流程图;FIG. 1 is a flow chart of a method for automatic networking provided in Embodiment 1 of the present invention;

图2是本发明实施例一提供的自动连网的方法中实际连网层的操作流程图;Fig. 2 is the operation flowchart of the actual networking layer in the method for automatic networking provided by Embodiment 1 of the present invention;

图3是本发明实施例二提供的自动连网的装置所适用之网络结构的结构图;FIG. 3 is a structural diagram of a network structure applicable to an automatic networking device provided in Embodiment 2 of the present invention;

图4是本发明实施例二提供的自动连网的装置的结构图;FIG. 4 is a structural diagram of an automatic networking device provided in Embodiment 2 of the present invention;

图5是本发明实施例二提供的自动连网的装置的另一结构图。FIG. 5 is another structural diagram of the device for automatic network connection provided by Embodiment 2 of the present invention.

具体实施方式detailed description

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

实施例一Embodiment one

本发明实施例一提供了一种自动连网的方法。如图1所示,本发明实施例一的方法包括如下步骤:Embodiment 1 of the present invention provides an automatic networking method. As shown in Figure 1, the method of Embodiment 1 of the present invention includes the following steps:

S1、收到手工断网的触发信号后,操作缓冲层触发实际连网层执行断网操作;S1. After receiving the trigger signal of manual network disconnection, the operation buffer layer triggers the actual network layer to perform the network disconnection operation;

本发明实施例一的操作缓冲层负责接收手工断网的信号,然后触发实际连网层执行手工断网及手工断网后的自动连网进行,实际连网层具体执行手工断网、手工断网后的自动连网以及自动断网后的自动连网。The operation buffer layer in Embodiment 1 of the present invention is responsible for receiving the signal of manual disconnection, and then triggers the actual network layer to perform manual disconnection and automatic network connection after manual disconnection. The actual network layer specifically performs manual disconnection, manual disconnection Automatic network connection after network connection and automatic network connection after automatic network disconnection.

操作缓冲层启动一个线程,该线程是个死循环。如操作者进行手工断网操作,则操作缓冲层发送一个“退出连网进程信号”,进入图2所示的实际连网层的操作流程,由实际连网层执行断网操作,实际连网层执行断网操作后,会发送已经断网信号至操作缓冲层。The operation buffer layer starts a thread, which is an endless loop. If the operator manually disconnects the network, the operation buffer layer sends a "signal to exit the network connection process" to enter the operation process of the actual network layer shown in Figure 2. The actual network layer performs the network disconnection operation, and the actual network connection After the layer performs the network disconnection operation, it will send a disconnected signal to the operation buffer layer.

S2、在所述实际连网层执行断网操作后,操作缓冲层判断是否需要启动自动连网;S2. After the actual network connection layer performs a network disconnection operation, the operation buffer layer determines whether automatic network connection needs to be started;

操作缓冲层收到已经断网信号后,判断是否需要启动连网,需要时执行步骤S3。判断是否需要启动连网的启动条件可以根据需要设置,如手工断网超过一预设的第一时间,和/或用户设置为手工断网后启动连网。After receiving the disconnection signal, the operation buffer layer judges whether to start the network connection, and executes step S3 if necessary. The starting conditions for judging whether to start the network connection can be set according to the needs, such as manual network disconnection exceeding a preset first time, and/or the user setting to start the network connection after manual network disconnection.

S3、触发实际连网层启动连网进程,操作缓冲层向实际连网层发出“启动网络信号”,进入图2所示的实际连网层的操作流程,由实际连网层执行自动连网操作,并反馈连网操作成功或失败的消息至操作缓冲层;S3, triggering the actual networking layer to start the networking process, the operation buffer layer sends a "start network signal" to the actual networking layer, and enters the operation process of the actual networking layer shown in Figure 2, and the actual networking layer performs automatic networking Operation, and feed back the success or failure of the network operation to the operation buffer layer;

S4、操作缓冲层根据实际连网层的反馈判断连网是否成功。当连网失败时,返回步骤S2,连网成功则进入步骤S5;S4. The operation buffer layer judges whether the network connection is successful according to the feedback from the actual network connection layer. When the network connection fails, return to step S2, and if the network connection succeeds, enter step S5;

步骤S5、操作缓冲层的线程阻塞,操作缓冲层判断是否获得实际连网层发出的“已经断网信号”,是则返回步骤S2,否则操作缓冲层持续线程阻塞。Step S5, the thread of the operation buffer layer is blocked, and the operation buffer layer judges whether the "disconnection signal" sent by the actual network layer is obtained, and if yes, returns to step S2, otherwise the operation buffer layer continues to block the thread.

步骤S1至S5由操作缓冲层完成,对于步骤S1中操作缓冲层发出的“退出连网进程信号”,实际连网层执行断网操作的具体步骤包括:Steps S1 to S5 are completed by the operation buffer layer. For the "exit networking process signal" sent by the operation buffer layer in step S1, the specific steps for the actual network layer to perform the disconnection operation include:

步骤S10、实际连网层进入待命状态,等待新的信号到来。Step S10, the actual networking layer enters a standby state, waiting for a new signal to arrive.

步骤S11、收到“退出连网进程信号”后,杀死连网进程。Step S11, after receiving the "signal to exit the networking process", kill the networking process.

步骤S12、判断是否终止连网,由于执行的是断网操作,因此执行步骤S13。Step S12, judging whether to terminate the network connection, since the network disconnection operation is performed, step S13 is performed.

步骤S13、终止断网。Step S13, terminating disconnection from the network.

步骤S14、给操作缓冲层发送一个“已经断网信号”,返回步骤S10。Step S14, send a "disconnection signal" to the operation buffer layer, and return to step S10.

对于步骤S3中操作缓冲层发出的触发连网信号,实际连网层执行自动连网操作的具体步骤包括:For the triggering networking signal sent by the operation buffer layer in step S3, the specific steps for the actual networking layer to perform automatic networking operations include:

步骤S10、实际连网层进入待命状态,等待新的信号到来。Step S10, the actual networking layer enters a standby state, waiting for a new signal to arrive.

步骤S21、收到“启动网络信号”。Step S21, receiving the "start network signal".

步骤S22、自动连网。Step S22, automatically connect to the network.

步骤S23、判断连网是否成功,成功则进入步骤S24,否则进行步骤S25。Step S23, judging whether the network connection is successful, if successful, proceed to step S24, otherwise proceed to step S25.

步骤S24、反馈“连网成功信号”给操作缓冲层,返回步骤S10。Step S24. Feedback the "connection success signal" to the operation buffer layer, and return to step S10.

步骤S25、反馈“连网失败信号”给操作缓冲层,返回步骤S10。Step S25. Feedback the "connection failure signal" to the operation buffer layer, and return to step S10.

连上网络后,如果长时间不用或其他原因,实际连网层会收到来自服务器的“自动断网信号”,由于没有手动断网,是服务器自动断开,所以执行:After connecting to the network, if it is not used for a long time or for other reasons, the actual network layer will receive an "automatic disconnection signal" from the server. Since there is no manual disconnection, the server automatically disconnects, so execute:

步骤S10、实际连网层进入待命状态,等待新的信号到来。Step S10, the actual networking layer enters a standby state, waiting for a new signal to arrive.

步骤S31、收到“自动断网信号”。Step S31, receiving an "automatic network disconnection signal".

步骤S12、判断是否终止连网,由于是自动断网,需要自动连网,因此执行步骤S32。Step S12, judging whether to terminate the network connection, since it is an automatic network disconnection, automatic network connection is required, so step S32 is executed.

步骤S32、自动连网,返回步骤S10。Step S32, automatically connect to the network, return to step S10.

在本发明实施例一中,实现当用户手工断网后根据需要自动连网,给用户使用提供了方便。同时本发明实施例还可实现自动断网后自动连网,兼顾了手工断网和自动断网的处理。进一步地,本发明实施例采用分层设计,操作缓冲层起到一个对连网事件和断网事件的缓存作用,实际连网层负责具体的连网和断网操作,他们一起保证了多个用户对网络进行断网和连网操作的功能。In the first embodiment of the present invention, when the user manually disconnects from the network, it is automatically connected to the network as needed, which provides convenience for the user. At the same time, the embodiment of the present invention can also realize automatic network connection after automatic network disconnection, taking into account the processing of manual network disconnection and automatic network disconnection. Furthermore, the embodiment of the present invention adopts a layered design. The operation buffer layer plays a role of caching the network connection event and the network disconnection event. The actual network connection layer is responsible for the specific network connection and network disconnection operations. Together, they guarantee multiple The function for users to disconnect and connect to the network.

实施例二Embodiment two

本发明实施例二提出了一种自动连网的装置,适用于图3所示之系统,该系统包括操作缓冲层10和实际连网层20,其中,操作缓冲层10用于当手工断网后,判断是否需要启动连网;并在需要启动连网时,触发实际连网层20启动连网进程。Embodiment 2 of the present invention proposes an automatic network connection device, which is suitable for the system shown in Figure 3. The system includes an operation buffer layer 10 and an actual network connection layer 20, wherein the operation buffer layer 10 is used for manually disconnecting the network Finally, it is judged whether to start the network connection; and when the network connection needs to be started, the actual network connection layer 20 is triggered to start the network connection process.

如图4所示,本发明实施例二之装置可为了操作缓冲层10本身,或内置操作缓冲层10中的一装置,包括触发断网模块11、判断模块12和触发连网模块13。As shown in FIG. 4 , the device of Embodiment 2 of the present invention can be for operating the buffer layer 10 itself, or a device built into the operating buffer layer 10 , including a trigger disconnection module 11 , a judgment module 12 and a trigger connection module 13 .

其中,触发断网模块11用于收到手工断网的触发信号后,触发实际连网层20执行断网。触发断网模块11负责接收手工断网的信号,然后触发实际连网层20执行手工断网及手工断网后的自动连网进行,实际连网层20具体执行手工断网、手工断网后的自动连网以及自动断网后的自动连网。在实际操作过程中。当操作者手工断网操作,则触发断网模块11发送一个“退出连网进程信号”给实际连网层20,由实际连网层20执行断网操作,实际连网层执行断网操作后,会发送已经断网信号至操作缓冲层10。Wherein, the trigger disconnection module 11 is configured to trigger the actual network connection layer 20 to execute disconnection after receiving a trigger signal of manual disconnection. The trigger disconnection module 11 is responsible for receiving the signal of manual disconnection, and then triggers the actual network layer 20 to perform manual disconnection and automatic network connection after manual disconnection. The actual network layer 20 specifically performs manual disconnection and manual disconnection. Automatic network connection and automatic network connection after automatic disconnection. during actual operation. When the operator manually disconnects the network, the network disconnection module 11 is triggered to send a "signal to exit the network connection process" to the actual network connection layer 20, and the actual network connection layer 20 performs the network disconnection operation. After the actual network connection layer performs the network disconnection operation , will send a disconnection signal to the operation buffer layer 10 .

判断模块12用于断网后,判断是否需要启动连网。判断是否需要启动连网的启动条件可以根据需要设置,如手工断网超过一预设的第一时间,和/或用户设置为手工断网后启动连网。The judging module 12 is used to judge whether to start connecting to the network after the network is disconnected. The starting conditions for judging whether to start the network connection can be set according to the needs, such as manual network disconnection exceeding a preset first time, and/or the user setting to start the network connection after manual network disconnection.

触发连网模块13用于当需要启动连网时,触发实际连网层20启动连网进程。即操作缓冲层10向实际连网层20发出“启动网络信号”,由实际连网层20执行自动连网操作,触发连网模块13等待接收实际连网层自动连网成功或失败的反馈。The triggering networking module 13 is used to trigger the actual networking layer 20 to start the networking process when the networking needs to be started. That is, the operation buffer layer 10 sends a "start network signal" to the actual network layer 20, and the actual network layer 20 performs an automatic network operation, triggering the network module 13 to wait for the feedback of the success or failure of the actual network layer automatic network connection.

如图5所示,本发明实施例二的装置还包括反馈模块14。实际连网层20执行自动连网操作后,反馈模块14根据实际连网层的反馈判断连网是否成功。当连网失败时,返回判断模块12判断是否需要启动连网,是则通知触发连网模块13再次发送“启动网络信号”给实际连网层20,如连网成功则操作缓冲层10的线程阻塞。判断模块12判断是否获得已经断网信号,是则返回,再次判断是否需要启动连网,不需要启动连网则操作缓冲层10持续线程阻塞。As shown in FIG. 5 , the device according to Embodiment 2 of the present invention further includes a feedback module 14 . After the actual network connection layer 20 executes the automatic network connection operation, the feedback module 14 judges whether the network connection is successful or not according to the feedback from the actual network connection layer. When the networking fails, return to the judging module 12 to judge whether it is necessary to start the networking, if so, the notification triggers the networking module 13 to send "starting the network signal" to the actual networking layer 20 again, and if the networking is successful, the thread of the buffer layer 10 is operated block. The judging module 12 judges whether to obtain the disconnection signal, if so, returns, and judges again whether it is necessary to start the network connection, and if it is not necessary to start the network connection, the operation buffer layer 10 continues to block the thread.

而实际连网层20分别执行以下三种操作:The actual networking layer 20 respectively performs the following three operations:

(1)收到触发断网模块11的“退出连网进程信号”时,杀死连网进程。判断是否终止连网,由于执行的是断网操作,因此需要终止连网,实际连网层20终止断网后,给操作缓冲层10发送一个“已经断网信号”,实际连网层20进入线程阻塞。(1) Kill the network connection process when receiving the “signal to exit the network connection process” that triggers the network disconnection module 11 . Determine whether to terminate the network connection. Since the network disconnection operation is performed, the network connection needs to be terminated. After the actual network connection layer 20 terminates the network disconnection, it sends a "disconnection signal" to the operation buffer layer 10, and the actual network connection layer 20 enters Thread blocked.

(2)收到触发连网模块13的“启动网络信号”时自动连网,并判断连网是否成功,成功则发送“连网成功信号”至操作缓冲层,否则发送“连网失败信号”,然后实际连网层20进入线程阻塞。(2) Automatically connect to the network when receiving the "start network signal" that triggers the network connection module 13, and judge whether the network connection is successful. If successful, send a "connection success signal" to the operation buffer layer, otherwise send a "network connection failure signal" , and then the actual networking layer 20 enters thread blocking.

(3)连上网络后,如果长时间不用或其他原因,实际连网层20会收到来自服务器的“自动断网信号”,由于没有手动断网,是服务器自动断开,所以实际执行层20自动连网,并进入线程阻塞。(3) After connecting to the network, if it is not used for a long time or for other reasons, the actual network layer 20 will receive an "automatic disconnection signal" from the server. Since there is no manual disconnection, the server automatically disconnects, so the actual execution layer 20 automatic networking, and enter thread blocking.

在本发明实施例二的装置实现当用户手工断网后根据需要自动连网,给用户使用提供了方便。同时本发明实施例还可实现自动断网后自动连网,兼顾了手工断网和自动断网的处理。进一步地,本发明实施例采用分层设计,由操作缓冲层起到一个对连网事件和断网事件的缓存作用,由实际连网层负责具体的连网和断网操作,他们一起保证了多个用户对网络进行断网和连网操作的功能。The device in Embodiment 2 of the present invention realizes automatic network connection according to needs after the user manually disconnects the network, which provides convenience for the user. At the same time, the embodiment of the present invention can also realize automatic network connection after automatic network disconnection, taking into account the processing of manual network disconnection and automatic network disconnection. Further, the embodiment of the present invention adopts a layered design. The operation buffer layer plays a role of caching the network connection event and the network disconnection event, and the actual network connection layer is responsible for the specific network connection and network disconnection operations. Together, they guarantee The function of multiple users disconnecting and connecting to the network.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (6)

1.一种自动连网的方法,其特征在于,所述方法包括如下步骤:1. A method for automatic networking, characterized in that the method comprises the steps of: 收到手工断网的触发信号后,操作缓冲层触发实际连网层执行断网操作;After receiving the trigger signal of manual network disconnection, the operation buffer layer triggers the actual network layer to perform the network disconnection operation; 在所述实际连网层执行断网操作后,所述操作缓冲层判断是否需要启动自动连网;After the actual network connection layer performs a network disconnection operation, the operation buffer layer judges whether automatic network connection needs to be started; 当需要启动连网时,所述操作缓冲层触发所述实际连网层启动自动连网进程;When networking needs to be started, the operation buffer layer triggers the actual networking layer to start an automatic networking process; 在所述触发实际连网层启动自动连网进程之后,还包括:After said triggering the actual networking layer to start the automatic networking process, it also includes: 所述操作缓冲层接收所述实际连网层的反馈,所述反馈包括自动连网成功或自动连网失败的消息;The operation buffer layer receives feedback from the actual networking layer, and the feedback includes a message of automatic networking success or automatic networking failure; 所述操作缓冲层根据所述实际连网层的反馈判断连网是否成功;The operation buffer layer judges whether the networking is successful according to the feedback from the actual networking layer; 当所述操作缓冲层判断连网失败时,所述操作缓冲层再次判断是否需要启动连网,或,当所述操作缓冲层判断连网成功时,所述操作缓冲层进入线程阻塞状态。When the operation buffer layer determines that the network connection fails, the operation buffer layer determines whether to start the network connection again, or, when the operation buffer layer determines that the network connection is successful, the operation buffer layer enters a thread blocking state. 2.如权利要求1所述的方法,其特征在于,所述操作缓冲层进入线程阻塞状态之后,还包括:2. The method according to claim 1, wherein, after the operation buffer layer enters the thread blocking state, further comprising: 判断是否获得实际连网层发送的已经断网信号,若已经获得所述已经断网信号,则所述操作缓冲层从线程阻塞状态中返回,并再次判断是否需要启动连网,否则持续线程阻塞。Judging whether to obtain the disconnection signal sent by the actual network layer, if the disconnection signal has been obtained, the operation buffer layer returns from the thread blocking state, and judges again whether to start the network connection, otherwise the thread blocking continues . 3.如权利要求1至2任一项所述的方法,其特征在于,所述操作缓冲层判断是否需要启动自动连网,包括:3. The method according to any one of claims 1 to 2, wherein the operation buffer layer judges whether automatic networking needs to be started, comprising: 当满足预设的启动条件时,判定需要启动连网,否则不需要启动连网,所述启动条件为:手工断网超过预设的时间,和/或用户设置为手工断网后启动连网。When the preset starting conditions are met, it is determined that the network connection needs to be started, otherwise the network connection does not need to be started. The starting conditions are: the manual disconnection exceeds the preset time, and/or the user sets the manual disconnection to start the network connection . 4.一种自动连网的装置,其特征在于,所述装置包括:4. A device for automatic networking, characterized in that the device comprises: 触发断网模块,用于收到手工断网的触发信号后,触发实际连网层执行断网操作;The trigger disconnection module is used to trigger the actual network layer to perform the disconnection operation after receiving the trigger signal of manual disconnection; 判断模块,用于在所述实际连网层执行断网操作后,判断是否需要启动自动连网;A judging module, configured to judge whether automatic networking needs to be started after the disconnection operation is performed at the actual networking layer; 触发连网模块,用于当需要启动连网时,触发所述实际连网层启动自动连网进程;Triggering a networking module, used to trigger the actual networking layer to start an automatic networking process when networking needs to be started; 所述装置还包括:The device also includes: 反馈模块,用于接收所述实际连网层的反馈,并根据所述实际连网层的反馈判断连网是否成功,所述反馈包括自动连网成功或自动连网失败的消息;A feedback module, configured to receive feedback from the actual networking layer, and judge whether the networking is successful according to the feedback from the actual networking layer, where the feedback includes a message that automatic networking is successful or automatic networking fails; 当判断连网失败时,再次判断是否需要启动连网,或,When it is judged that the network connection fails, judge again whether to start the network connection, or, 当判断连网成功时,进入线程阻塞状态。When it is judged that the network connection is successful, enter the thread blocking state. 5.如权利要求4所述的装置,其特征在于,所述判断模块还用于,判断是否获得实际连网层发出的已经断网信号,若已经获得所述已经断网信号,则所述判断模块判断再次是否需要启动连网,否则持续线程阻塞。5. The device according to claim 4, wherein the judging module is further used to judge whether to obtain the disconnection signal sent by the actual network layer, and if the disconnection signal has been obtained, the The judging module judges whether the network connection needs to be started again, otherwise, the thread will continue to be blocked. 6.如权利要求4至5中任一项所述的装置,其特征在于,所述判断模块具体用于:6. The device according to any one of claims 4 to 5, wherein the judging module is specifically used for: 当满足预设的启动条件时,判定需要启动连网,否则不需要启动连网,所述启动条件为手工断网超过一预设的第一时间,和/或用户设置为手工断网后启动连网。When the preset startup condition is satisfied, it is determined that the network connection needs to be started, otherwise the network connection does not need to be started. The startup condition is that the manual disconnection exceeds a preset first time, and/or the user sets it to start after the manual disconnection connect to the internet.
CN201410073142.0A 2014-02-28 2014-02-28 Automatically the method and device to network Expired - Fee Related CN103841104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410073142.0A CN103841104B (en) 2014-02-28 2014-02-28 Automatically the method and device to network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410073142.0A CN103841104B (en) 2014-02-28 2014-02-28 Automatically the method and device to network

Publications (2)

Publication Number Publication Date
CN103841104A CN103841104A (en) 2014-06-04
CN103841104B true CN103841104B (en) 2017-12-22

Family

ID=50804236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410073142.0A Expired - Fee Related CN103841104B (en) 2014-02-28 2014-02-28 Automatically the method and device to network

Country Status (1)

Country Link
CN (1) CN103841104B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611589A (en) * 2012-04-12 2012-07-25 南京物联传感技术有限公司 Automatic detection device of disconnection of router and working method thereof
CN202475778U (en) * 2012-02-29 2012-10-03 杭州巨松科技有限公司 Industrial grade 3rd generation (3G) wireless router

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058059B1 (en) * 2001-02-20 2006-06-06 At&T Corp. Layer-2 IP networking method and apparatus for mobile hosts

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202475778U (en) * 2012-02-29 2012-10-03 杭州巨松科技有限公司 Industrial grade 3rd generation (3G) wireless router
CN102611589A (en) * 2012-04-12 2012-07-25 南京物联传感技术有限公司 Automatic detection device of disconnection of router and working method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《详解如何实现路由器设置自动拨号上网》;无;《计算机与网络》;20100108;第28页 *

Also Published As

Publication number Publication date
CN103841104A (en) 2014-06-04

Similar Documents

Publication Publication Date Title
EP2978144B1 (en) Unified device management method and system
EP2645636B1 (en) Home gateway, cloud server, and method for communication therebetween
WO2011134419A1 (en) Method, device and system for managing energy-saving in network management system
CN101094186A (en) Method and interface board of retaining neighbourhood
WO2015078341A1 (en) Method and device for remotely updating application program
WO2013078869A1 (en) Method, system, aoe, aog and terminal for maintaining long connection in aos
JP5416310B2 (en) Packet data network release failure processing method, system and apparatus
CN102055605B (en) Disaster tolerance system and method applied to AAA (authentication, authorization and accounting) server
CN101374144B (en) Method, device and system for controlling session data synchronization
WO2015154366A1 (en) Policy-based m2m terminal device monitoring and control method and device
WO2011035639A1 (en) Method and apparatus for upgrade protection
CN102868945A (en) Upgrading method optical network unit (ONU) in Ethernet passive optical network (EPON)
CN101304544A (en) Business maintenance method, communication system and related equipment
CN106067857B (en) Method and device for preventing user from being forced off-line
CN103841104B (en) Automatically the method and device to network
WO2010133157A1 (en) Method, apparatus and system for communication
WO2015158058A1 (en) Method and system for implementing call saving and recovery
WO2015027477A1 (en) Flow table control method, apparatus, switch and controller
WO2012163164A1 (en) Gateway selection method and device
EP2523480B1 (en) Method and system for emergency switching
CN105450495A (en) Method, device and system for re-establishing secure communication channel
CN106375353B (en) Link establishment processing method and device
CN100488148C (en) Method for realizing interface backup for Ethernet-based point-to-point protocol conversation
WO2013113243A1 (en) Method and terminal for processing data transmission service
TWI423712B (en) Method of managing mobility management layer of a mobile device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: A District No. 9018 Han innovation building in Nanshan District high tech Zone in Shenzhen city of Guangdong Province, North Central Avenue, 518000 floor 10

Applicant after: NUBIA TECHNOLOGY Co.,Ltd.

Address before: A District No. 9018 Han innovation building in Nanshan District high tech Zone in Shenzhen city of Guangdong Province, North Central Avenue, 518000 floor 10

Applicant before: SHENZHEN ZTE MOBILE TELECOM Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171222

CF01 Termination of patent right due to non-payment of annual fee