A network control method, device and gateway equipment
By detecting the network connection and PON port status of the gateway device, and controlling the WiFi module to turn on or off, the network latency problem caused by fiber optic cable interruption of the gateway device is solved, enabling fast network switching and improving user satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD
- Filing Date
- 2022-12-12
- Publication Date
- 2026-04-17
AI Technical Summary
When the optical cable between the gateway device and the operator's equipment is interrupted, the gateway device loses its network connection but the WiFi module remains on, resulting in a delay when the terminal device switches to the mobile data network.
By acquiring the values of target indicators and the WiFi module status of the gateway device, the network connection status is determined, and the WiFi module is turned on or off according to the connection status. This includes using Internet Protocol version 4/6 connection parameters and optical receiving power as indicators to realize the detection and control of the network connection and PON port status of the gateway device.
It shortened the latency of terminal devices switching to mobile data networks, improved users' network switching speed and satisfaction, and reduced the number of complaints caused by optical cable failures.
Smart Images

Figure CN116249173B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile communication technology, and in particular to a network control method, apparatus, and gateway device. Background Technology
[0002] With the rapid development of internet applications and the widespread use of terminal devices, a large number of applications have emerged. Users can conveniently conduct various online activities using these applications. Compared to fixed broadband, mobile data traffic is still relatively expensive, and many users prefer to use WiFi hotspots whenever possible. Therefore, broadband internet user access has become a key area of competition for various operators, leading to increased focus on improving broadband user satisfaction and user experience.
[0003] However, in scenarios where terminal devices connect to broadband WiFi, the WiFi connection between the terminal device and the gateway device remains constant. Once the optical cable between the gateway device and the operator's equipment is interrupted, the gateway device will lose the network, but the WiFi module will remain on, causing the terminal device to be unable to quickly switch to the mobile data network, thus prolonging the latency of the terminal device switching to the mobile data network. Summary of the Invention
[0004] This invention provides a network control method, apparatus, and gateway device to solve the problem in the prior art where an interruption of the optical cable between the gateway device and the operator's equipment causes the gateway device to lose network access, but the WiFi module remains on, thereby extending the latency for the terminal device to switch to the mobile data network.
[0005] In a first aspect, embodiments of the present invention provide a network control method, comprising:
[0006] The values of target indicators and the status of the mobile hotspot WiFi module of the gateway device are obtained. The target indicators include at least one first indicator and at least one second indicator. The first indicator is used to indicate the network connection status of the gateway device, and the second indicator is used to indicate the passive optical network (PON) port status of the gateway device.
[0007] Based on the value of the target indicator and the status of the WiFi module, determine the network connection status of the gateway device;
[0008] Based on the network connection status of the gateway device, control the WiFi module of the gateway device to be turned on or off.
[0009] Secondly, embodiments of the present invention also provide a service control device, comprising:
[0010] The first acquisition module is used to acquire the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device. The target indicator includes at least one first indicator and at least one second indicator. The first indicator is used to indicate the network connection status of the gateway device, and the second indicator is used to indicate the passive optical network (PON) port status of the gateway device.
[0011] The first determining module is used to determine the network connection status of the gateway device based on the value of the target indicator and the status of the WiFi module.
[0012] The first control module is used to control the WiFi module of the gateway device to be turned on or off according to the network connection status of the gateway device.
[0013] Thirdly, embodiments of the present invention provide a gateway device, including a memory, a transceiver, and a processor:
[0014] The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer programs in the memory and execute the network control method described in the first aspect above.
[0015] Fourthly, embodiments of the present invention provide a processor-readable storage medium storing a computer program for causing the processor to execute the network control method described in the first aspect.
[0016] In this embodiment of the invention, the values of target indicators and the status of the WiFi module of the gateway device can be obtained. Based on the values of the target indicators and the status of the WiFi module, the network connection status of the gateway device can be determined. Then, based on the network connection status of the gateway device, the WiFi module of the gateway device can be controlled to be turned on or off. The target indicator includes at least one first indicator and at least one second indicator. The first indicator indicates the network connection status of the gateway device, and the second indicator indicates the status of the passive optical network (PON) port of the gateway device. Therefore, this embodiment of the invention can detect whether the gateway device has a network connection based on the indicators indicating the network connection status and the indicators indicating the PON port status of the gateway device. Based on the network connection status of the gateway device, the WiFi module of the gateway device can be controlled to be turned on or off. In this way, if the gateway device loses its network connection, the WiFi module can be turned off promptly, allowing the terminal device to quickly switch to a mobile data network, thus shortening the latency of the terminal device switching to a mobile data network. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart of a network control method provided in an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of the overall architecture of the gateway device in an embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of the plug-in operation process in an embodiment of the present invention;
[0021] Figure 4 This is a structural block diagram of a network control device provided in an embodiment of the present invention;
[0022] Figure 5 This is a structural block diagram of a network device provided in an embodiment of the present invention. Detailed Implementation
[0023] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0024] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0026] In a first aspect, embodiments of the present invention provide a network control method, which can be applied to gateway devices, such as... Figure 1 As shown, the method includes the following steps 101 to 103:
[0027] Step 101: Obtain the values of the target indicators and the status of the mobile hotspot WiFi module of the gateway device.
[0028] The target indicators include at least one first indicator and at least one second indicator. The first indicator is used to indicate the network connection status of the gateway device, and the second indicator is used to indicate the status of the passive optical network (PON) port of the gateway device. The WiFi module is in an on or off state.
[0029] Here, the first indicator can indicate whether the network connection status of the gateway device is abnormal, and the second indicator can indicate whether the PON port status of the gateway device is abnormal. Thus, it can be seen that the embodiments of the present invention can detect whether the gateway device has experienced an optical cable failure that causes the optical signal to be lost, and whether it has lost its network connection for other unknown reasons. It is evident that if at least one of the network connection status and PON port status of the gateway device is abnormal, it means that the gateway device has lost its network connection.
[0030] Optionally, the first indicator includes Internet Protocol version 4 or Internet Protocol version 6 (i.e., Internet IPv4 / IPv6) connection parameters, and the second indicator includes optical received power.
[0031] It is understandable that the contents of the first indicator and the second indicator are not limited to this.
[0032] The Internet IPv4 / IPv6 connection parameters indicate whether the Internet IPv4 / IPv6 connection is disconnected or normal. If the Internet IPv4 / IPv6 connection is disconnected, it means that the network connection status of the gateway device is abnormal; if the Internet IPv4 / IPv6 connection is normal, it means that the network connection status of the gateway device is normal.
[0033] In addition, the aforementioned optical reception power is used to indicate whether there is an optical signal at the PON port of the gateway device, that is, whether the PON port status of the gateway device is normal.
[0034] Step 102: Determine the network connection status of the gateway device based on the value of the target indicator and the status of the WiFi module.
[0035] As mentioned above: the first indicator can indicate whether the network connection status of the gateway device is abnormal, and the second indicator can indicate whether the PON port status of the gateway device is abnormal. If at least one of the network connection status and PON port status of the gateway device is abnormal, it means that the gateway device has lost network connection; if neither the network connection status nor the PON port status of the gateway device is abnormal, it means that the gateway device has network connection.
[0036] Optionally, step 102, "determining the network connection status of the gateway device based on the value of the target indicator and the status of the WiFi module," includes:
[0037] With the WiFi module enabled, the network connection status of the gateway device is determined by comparing the value of the target indicator with the first threshold corresponding to the target indicator.
[0038] When the WiFi module is turned off, the network connection status of the gateway device is determined by comparing the value of the target indicator with the second threshold corresponding to the target indicator.
[0039] Therefore, it can be seen that the thresholds corresponding to the first and second indicators can be different depending on the state of the WiFi module, so as to more accurately determine the network connection status of the gateway device.
[0040] For example, if the first indicator includes the aforementioned Internet IPv4 / IPv6 connection parameters, then different thresholds can be set for these connection parameters in different states of the WiFi module. For instance, if the WiFi module is on, the threshold for this connection parameter is X1; if the WiFi module is off, the threshold for this connection parameter is X2. Therefore, when the WiFi module is on, comparing this connection parameter with X1 determines whether the network connection status of the gateway device is abnormal; when the WiFi module is off, comparing this connection parameter with X2 determines whether the network connection status of the gateway device is abnormal.
[0041] For example, if the second indicator includes the aforementioned optical receiving power, then the optical receiving power can be set with different thresholds in different states of the WiFi module. For instance, when the WiFi module is on, the threshold corresponding to the optical receiving power is X3, and when the WiFi module is off, the threshold corresponding to the optical receiving power is X4. When the WiFi module is on, the PON port status of the gateway device is determined by comparing the optical receiving power with X3; when the WiFi module is off, the PON port status of the gateway device is determined by comparing the optical receiving power with X4.
[0042] Furthermore, after determining whether the network connection status of the gateway device is abnormal and whether the PON port status is abnormal, the network connection status of the gateway device can be determined, that is, whether the gateway device has a network connection.
[0043] Step 103: Control the WiFi module of the gateway device to be turned on or off according to the network connection status of the gateway device.
[0044] Optionally, step 103, "controlling the opening or closing of the mobile hotspot WiFi module of the gateway device according to the network connection status of the gateway device," includes:
[0045] When the WiFi module is in a turned-off state and the network connection status indicates that the gateway device has a network connection, turn on the WiFi module.
[0046] When the WiFi module is on and the network connection status indicates that the gateway device has lost network connection, the WiFi module shall be turned off.
[0047] Therefore, if the gateway device's WiFi module is off but the gateway device has a network connection, the WiFi module can be turned on. If the gateway device's WiFi module is on but the gateway device has no network connection, even if the WiFi module is on, the terminal device cannot use the network through the gateway device's WiFi. Instead, the terminal will not be able to quickly switch to the mobile data network. Therefore, in this case, the gateway device's WiFi module can be turned off.
[0048] As can be seen from steps 101 to 103 above, in this embodiment of the invention, the value of the target indicator and the status of the WiFi module of the gateway device can be obtained. Based on the value of the target indicator and the status of the WiFi module, the network connection status of the gateway device can be determined. Then, based on the network connection status of the gateway device, the WiFi module of the gateway device can be controlled to be turned on or off. The target indicator includes at least one first indicator and at least one second indicator. The first indicator indicates the network connection status of the gateway device, and the second indicator indicates the status of the passive optical network (PON) port of the gateway device. Therefore, this embodiment of the invention can detect whether the gateway device has a network connection based on the indicator used to indicate the network connection status of the gateway device and the indicator used to indicate the status of the PON port of the gateway device. Based on the network connection status of the gateway device, the WiFi module of the gateway device can be controlled to be turned on or off. In this way, if the gateway device loses its network connection, the WiFi module can be turned off promptly, allowing the terminal device to quickly switch to the mobile data network, thus shortening the latency of the terminal device switching to the mobile data network.
[0049] Optionally, before step 101 "obtaining the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device", the method further includes:
[0050] Determine whether the user manually turned the WiFi module on or off after the last time the WiFi module's state was controlled based on the network connection status of the gateway device;
[0051] The acquisition of the target indicator value and the status of the mobile hotspot WiFi module of the gateway device includes:
[0052] After the last time the status of the WiFi module was controlled based on the network connection status of the gateway device, and the user did not manually turn the WiFi module on or off, the value of the target indicator and the status of the WiFi module of the gateway device are obtained.
[0053] Therefore, before controlling the WiFi module to turn on or off based on the target indicator value and the WiFi module status, it is possible to determine whether the user has turned the WiFi module on or off since the last automatic control of the WiFi module status change. Only if the user has not manually turned the WiFi module on or off on the gateway device will the target value and the WiFi module status be obtained, and then the WiFi module will be controlled to turn on or off based on the target indicator value and the WiFi module status. If the user has manually turned the WiFi module on or off on the gateway device, the target indicator value and the WiFi module status will not be obtained, so as to avoid the automatic control of the WiFi module going against the user's wishes.
[0054] Optionally, determining whether the user manually turns the WiFi module on or off after the last time the WiFi module's state was controlled based on the network connection status of the gateway device includes:
[0055] Obtain first information and second information, wherein the first information includes the network connection status of the gateway device, the passive optical network PON port status, and the status of the WiFi module after the last time the status change of the WiFi module was controlled according to the network connection status of the gateway device; the second information includes the current network connection status, PON port status, and WiFi module status of the gateway device.
[0056] Based on the first information and the second information, determine whether the user manually turned the WiFi module on or off after the last time the WiFi module's state was controlled according to the network connection status of the gateway device.
[0057] Therefore, it can be determined whether the user manually turned the WiFi module on or off after the last automatic control of the WiFi module's status change by comparing the gateway device's network connection status, PON port status, and WiFi module status after the last automatic control of the WiFi module's status change with the current network connection status, PON port status, and WiFi module status of the gateway device.
[0058] Optionally, determining whether the user manually turns the WiFi module on or off after the last time the WiFi module's state was controlled based on the network connection status of the gateway device, based on the first information and the second information, includes:
[0059] In any of the following conditions (A-1 to A-2), it is determined that after the last time the state change of the WiFi module was controlled based on the network connection status of the gateway device, the user did not manually turn the WiFi module on or off after the last state change:
[0060] Item A-1: The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is enabled. At least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is enabled.
[0061] Item A-2: At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in a turned-off state, while neither the network connection status nor the PON port status in the second information is abnormal, and the WiFi module status in the second information is in a turned-off state.
[0062] Optionally, determining whether the user manually turns the WiFi module on or off after the last time the WiFi module's state was controlled based on the network connection status of the gateway device, based on the first information and the second information, further includes:
[0063] In any of the following circumstances described in items B-1 to B-4, it is determined that the user manually turned the WiFi module on or off after the last time the state change of the WiFi module was controlled based on the network connectivity of the gateway device:
[0064] Item B-1: At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in the off state, while the network connection status and PON port status in the second information are both normal, and the WiFi module status in the second information is in the on state.
[0065] Item B-2: At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in the off state, and at least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is in the on state.
[0066] Item B-3: The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is in the on state; the network connection status and PON port status in the second information are both normal, and the WiFi module status in the second information is in the off state.
[0067] Item B-4: The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is enabled. At least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is disabled. For easier understanding of items A-1 to A-2 and items B-1 to B-4 above, please refer to Table 1 below.
[0068] Table 1 Comparison of First and Second Information
[0069]
[0070] For item A-1, it means that in the time period from the last time the WiFi module's status was automatically changed to the present, at least one of the network connection status and PON port status has become abnormal, but the WiFi module is in the on state. This indicates that the user did not manually turn off the WiFi module during this time period.
[0071] For item A-2, it means that in the time period from the last time the WiFi module's status changed automatically to the present, at least one of the network connection status and PON port status was abnormal, and then returned to normal, but the WiFi module was in the off state. This indicates that the user did not manually turn on the WiFi module during this time period.
[0072] For items B-1 and B-2, it indicates that after the last automatic control of the WiFi module's status change, at least one of the network connection status and PON port status was abnormal. The WiFi module should have been turned off, but it was turned on before this automatic control, which means that the WiFi module was manually turned on by the user.
[0073] For items B-3 and B-4, it indicates that after the last automatic control of the WiFi module's status, the network connection status and PON port status were not abnormal, and the WiFi module should have been on. However, the WiFi module was turned off before this automatic control, which means that the user manually controlled the WiFi module to change from on to off during this period.
[0074] Optionally, before obtaining the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device, the method further includes:
[0075] Subscribe to a first event and a second event, wherein the first event is a network connection status change event of the gateway device, and the second event is a PON port status change event;
[0076] The acquisition of the target indicator value and the status of the mobile hotspot WiFi module of the gateway device includes:
[0077] If at least one of the first event and the second event is detected, the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device are obtained.
[0078] Among them, the network connection status change event of the above-mentioned gateway device is the network connection status changing from never abnormal to abnormal, and from abnormal to normal; the PON port status change event is the PON port status changing from never abnormal to abnormal, and from abnormal to normal.
[0079] Therefore, in this embodiment of the invention, the network connection status change event and the PON port status change event of the gateway device are subscribed in advance. Thus, when at least one subscribed event is detected, the WiFi module is controlled to be turned on or off by obtaining the value of the target indicator and the status of the WiFi module.
[0080] Furthermore, the aforementioned subscription to the first and second events can also be referred to as subscribing to the reverse signals of network connection status and PON port status. This method of subscribing to reverse signals enables real-time monitoring of the network connection status and PON port status of the gateway device, offering advantages such as lower system resource consumption and higher smoothness compared to polling.
[0081] Optionally, the method further includes:
[0082] Based on the network connection status of the gateway device, control the opening or closing of at least one logical network of the WiFi module of the gateway device.
[0083] In this embodiment of the invention, to improve system usability, if a user has a need for home network access, different Service Set Identifiers (SSIDs) can be enabled for the user for both internet access and home network access; that is, different logical networks can be assigned different SSIDs. In this way, based on the network connection status of the gateway device described above, the opening or closing of the corresponding logical network can be controlled at the logical network level.
[0084] Optionally, controlling the opening or closing of at least one logical network of the WiFi module of the gateway device based on the network connection status of the gateway device includes:
[0085] When the network connection status indicates that the gateway device has a network connection, the first logical network of the WiFi module is enabled.
[0086] If the network connectivity status indicates that the gateway device has lost network connectivity, the second logical network of the WiFi module shall be shut down.
[0087] The first logic network and the second logic network can be the same or different.
[0088] Therefore, when a gateway device loses its network connection, the corresponding logical network can be shut down; when the gateway device restores its network connection, the corresponding logical network can be turned on.
[0089] In addition, when a gateway device loses its network connection, it can notify the server, which can then send a notification message to the terminal devices connected to the gateway device to inform the user that the gateway device has lost its network connection. In this way, the user can be informed of the network status of the gateway device in a timely manner.
[0090] Furthermore, in this embodiment of the invention, a plug-in can be configured in the gateway device, thereby enabling the plug-in to perform the network control method described in this embodiment of the invention.
[0091] In summary, the specific implementation of the network control method of this invention can be described as follows:
[0092] Gateway devices can install a self-developed intelligent operating system (OS) based on the OpenWrt operating system, enabling software definition, system upgradeability, service loading, and hardware protection. Gateway devices can also utilize mainstream gateway chips, which incorporate container isolation technology to limit plugin resource consumption, resource access, and mutual isolation, ensuring plugin operational security.
[0093] like Figure 2 The diagram shows the overall architecture of the gateway device. The middleware installs plugins via the data bus (DBus) command and manages the lifecycle of the plugins. The plugins obtain the ability to read or configure the gateway device through the application programming interface (API) provided by the middleware.
[0094] This gateway device supports custom functionality developed through plugins. Considering security and other factors, direct modification of the underlying system is not permitted; instead, pre-packaged interfaces are provided for querying and configuring device information. Therefore, the aforementioned plugin uses a reverse signal subscription method to monitor the device's network connection status and PON port status in real time. Compared to polling, this method offers advantages such as lower system resource consumption and higher performance.
[0095] In addition, based on the above monitoring of network connection status and PON port status, the target algorithm (i.e., self-developed algorithm) is used to determine the current network status of the gateway device, thereby generating control operations (turning off or on) on the WiFi module of the gateway device.
[0096] Specifically, the implementation of this target algorithm (i.e., the self-developed algorithm) is as follows:
[0097] The system reads the current network connection status, PON port status, and WiFi module status of the gateway device and compares them with the status after the last automatic control of the WiFi module's status change. It then determines whether the user manually turned the WiFi module on or off after the last automatic control (i.e., whether the user manually turned the WiFi module on or off). (For specific determination methods, please refer to the previous text; they will not be repeated here.) The system proceeds only if the determination result is negative; if the user manually turned the WiFi module on or off, no control operation is performed on the WiFi module.
[0098] The next step is as follows: with the WiFi module enabled, the network connection status of the gateway device is determined by comparing the value of the target indicator with the corresponding first threshold; with the WiFi module disabled, the network connection status of the gateway device is determined by comparing the value of the target indicator with the corresponding second threshold. The target indicator includes at least one first indicator and at least one second indicator. The first indicator indicates the network connection status of the gateway device, and the second indicator indicates the PON port status of the gateway device.
[0099] At this point, the comparison result is a secondary confirmation. Based on the secondary comparison result, a control signal is sent to the WiFi module to ensure the correctness of the control result.
[0100] Each time the algorithm controls the WiFi module's state, it records the result of that control for future judgments.
[0101] In addition, it should be noted that the plugin's operation process includes the following two stages, such as... Figure 3 As shown:
[0102] Start-up phase:
[0103] When the gateway device starts up, the plugin will run automatically and check the device status every once in a while. When the device startup is completed, the plugin will enter the second stage.
[0104] Operation phase:
[0105] The system queries the initial WiFi module status, network connection status, and PON port status of the gateway device. When the WiFi module is initially enabled, and both the network connection status and PON port status are normal, the system records these statuses as data for the algorithm's decision. It then subscribes to the reverse signals for the network connection status and PON port status. Within the callback function of these reverse signals, the system uses the target algorithm (i.e., the self-developed algorithm) to determine and handle the intelligent start / stop of WiFi. For other initial states, no control operations are performed on the WiFi module; only the reverse signals are subscribed to. This process is repeated once all statuses are normal. This avoids interfering with the user's autonomous behavior regarding the WiFi module.
[0106] Therefore, the embodiments of the present invention utilize a plug-in approach to achieve original functionality, overcoming the shortcomings of gateway devices in this function. Furthermore, it automatically monitors network status and automatically switches the WiFi module on and off without any user intervention. The aforementioned target algorithm determines whether the WiFi module is being actively switched on or off by the user, without interfering with the user's actions. Additionally, this method and approach can be used for extended development to achieve more flexible smart control functions for home gateways, such as controlling specific SSIDs and WiFi signal power.
[0107] In the embodiments of the present invention, by developing functional plug-ins for gateway devices, the WiFi signal, optical signal, and network connection status of the gateway device can be linked. This allows the WiFi module to be automatically shut down when an optical cable failure causes the optical signal to be lost or when the gateway device loses its network connection for unknown reasons. This enables the user's terminal device to quickly switch to the mobile data network without affecting the user's normal use, thereby improving user experience and satisfaction.
[0108] Furthermore, after using the embodiments of the present invention, if the number of complaints from pilot users caused by optical cable faults is extracted and compared with the corresponding number of complaints before the pilot, it is expected to decrease by about 10% to 30%. Moreover, this method and approach can be extended and developed to be applied to more scenarios, such as cybersecurity control and home network control functions.
[0109] The method and apparatus are based on the same concept of the application. Since the methods and apparatus solve problems in similar ways, the implementation of the apparatus and methods can refer to each other, and the repeated parts will not be described again.
[0110] The above describes the service switching method provided by the embodiments of the present invention. The service switching device provided by the embodiments of the present invention will be described below with reference to the accompanying drawings.
[0111] See Figure 4 This invention also provides a network control device applied to a gateway device, the device comprising:
[0112] The first acquisition module 401 is used to acquire the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device. The target indicator includes at least one first indicator and at least one second indicator. The first indicator is used to indicate the network connection status of the gateway device, and the second indicator is used to indicate the passive optical network (PON) port status of the gateway device.
[0113] The first determining module 402 is used to determine the network connection status of the gateway device based on the value of the target indicator and the status of the WiFi module.
[0114] The first control module 403 is used to control the WiFi module of the gateway device to be turned on or off according to the network connection status of the gateway device.
[0115] Optionally, the device further includes:
[0116] The judgment module is used to determine whether the user manually turns the WiFi module on or off after the last time the WiFi module's status was controlled based on the network connection status of the gateway device, before the first acquisition module 401 acquires the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device.
[0117] The first acquisition module is specifically used for:
[0118] If the user has not manually turned the WiFi module on or off since the judgment module determined that the WiFi module's status was changed based on the gateway device's network connection status, the module obtains the value of the target indicator and the status of the gateway device's WiFi module.
[0119] Optionally, the determination module includes:
[0120] The acquisition submodule is used to acquire first information and second information. The first information includes the network connection status of the gateway device, the passive optical network PON port status, and the status of the WiFi module after the last time the status change of the WiFi module was controlled according to the network connection status of the gateway device. The second information includes the current network connection status, PON port status, and WiFi module status of the gateway device.
[0121] The judgment submodule is used to determine, based on the first information and the second information, whether the user manually turned the WiFi module on or off after the last time the WiFi module's state was changed according to the network connection status of the gateway device.
[0122] Optionally, the determination submodule is specifically used for:
[0123] If any of the following conditions are met, it is determined that the user has not manually turned the WiFi module on or off since the last time the WiFi module's state was controlled based on the network connectivity of the gateway device:
[0124] The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is enabled. At least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is enabled.
[0125] At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in a turned-off state, while neither the network connection status nor the PON port status in the second information is abnormal, and the WiFi module status in the second information is in a turned-off state.
[0126] Optionally, the determination submodule is further configured to:
[0127] A determination is made that a user has manually turned the WiFi module on or off since the last time the WiFi module's state was controlled based on the network connectivity status of the gateway device, provided that one of the following conditions is met:
[0128] At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in the off state, while the network connection status and PON port status in the second information are both normal, and the WiFi module status in the second information is in the on state.
[0129] At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in the off state; at least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is in the on state.
[0130] The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is in the on state. The network connection status and PON port status in the second information are both normal, and the WiFi module status in the second information is in the off state.
[0131] The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is enabled. At least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is disabled.
[0132] Optionally, the first determining module 402 is specifically used for:
[0133] With the WiFi module enabled, the network connection status of the gateway device is determined by comparing the value of the target indicator with the first threshold corresponding to the target indicator.
[0134] When the WiFi module is turned off, the network connection status of the gateway device is determined by comparing the value of the target indicator with the second threshold corresponding to the target indicator.
[0135] Optionally, the first control module 403 is specifically used for:
[0136] When the WiFi module is in a turned-off state and the network connection status indicates that the gateway device has a network connection, turn on the WiFi module.
[0137] When the WiFi module is on and the network connection status indicates that the gateway device has lost network connection, the WiFi module shall be turned off.
[0138] Optionally, the device further includes:
[0139] The subscription module is used to subscribe to a first event and a second event before the first acquisition module 401 acquires the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device. The first event is a network connection status change event of the gateway device, and the second event is a PON port status change event.
[0140] The first acquisition module 401 is specifically used for:
[0141] If the subscription module detects at least one of the first event and the second event, it acquires the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device.
[0142] Optionally, the first indicator includes connection parameters of Internet Protocol version 4 or Internet Protocol version 6, and the second indicator includes optical received power.
[0143] Optionally, the device further includes:
[0144] The second control module is used to control the opening or closing of at least one logical network of the WiFi module of the gateway device according to the network connection status of the gateway device.
[0145] Optionally, the second control module is specifically used for:
[0146] When the network connection status indicates that the gateway device has a network connection, the first logical network of the WiFi module is enabled.
[0147] If the network connectivity status indicates that the gateway device has lost network connectivity, the second logical network of the WiFi module shall be shut down.
[0148] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0150] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0151] Embodiments of the present invention also provide a gateway device, such as Figure 5 As shown, the network device includes a memory 520, a transceiver 510, and a processor 500;
[0152] Memory 520 is used to store computer programs;
[0153] Transceiver 510 is used to receive and send data under the control of processor 500;
[0154] The processor 500 is used to read the computer program in the memory 520 and execute the network control method described in the first aspect above.
[0155] Among them, Figure 5 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 500) and memory (memory 520). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 510 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over transmission media, including wireless channels, wired channels, optical fibers, etc. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 can store data used by the processor 500 during operation.
[0156] The processor 500 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor 500 can also adopt a multi-core architecture.
[0157] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0158] Embodiments of the present invention also provide a processor-readable storage medium storing a computer program for causing the processor to execute the network control method described above.
[0159] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0160] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0161] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0162] These processor-executable instructions may also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the processor-readable memory produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0163] These processors can execute instructions that can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0164] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A network control method characterized by comprising: The method includes: The values of target indicators and the status of the mobile hotspot WiFi module of the gateway device are obtained. The target indicators include at least one first indicator and at least one second indicator. The first indicator is used to indicate the network connection status of the gateway device, and the second indicator is used to indicate the status of the passive optical network (PON) port of the gateway device. The status of the WiFi module is either on or off. Based on the value of the target indicator and the status of the WiFi module, the network connection status of the gateway device is determined; the network connection status of the gateway device is used to indicate whether the gateway device has a network connection. Based on the network connection status of the gateway device, control the WiFi module of the gateway device to be turned on or off; Before obtaining the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device, the method further includes: Determine whether the user manually turned the WiFi module on or off after the last time the WiFi module's state was controlled based on the network connection status of the gateway device; The acquisition of the target indicator value and the status of the mobile hotspot WiFi module of the gateway device includes: After the last time the status of the WiFi module was controlled based on the network connection status of the gateway device, and the user did not manually turn the WiFi module on or off, the value of the target indicator and the status of the WiFi module of the gateway device are obtained.
2. The method according to claim 1, characterized in that, The step of determining whether the user manually turns the WiFi module on or off after the last time the WiFi module's state was controlled based on the network connection status of the gateway device includes: Obtain first information and second information, wherein the first information includes the network connection status of the gateway device, the passive optical network PON port status, and the status of the WiFi module after the last time the status change of the WiFi module was controlled according to the network connection status of the gateway device; the second information includes the current network connection status, PON port status, and WiFi module status of the gateway device. Based on the first information and the second information, determine whether the user manually turned the WiFi module on or off after the last time the WiFi module's state was controlled according to the network connection status of the gateway device.
3. The method according to claim 2, characterized in that, The step of determining, based on the first information and the second information, whether the user manually turns the WiFi module on or off after the last time the WiFi module's state was controlled according to the network connection status of the gateway device includes: If any of the following conditions are met, it is determined that the user has not manually turned the WiFi module on or off since the last time the WiFi module's state was controlled based on the network connectivity of the gateway device: The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is enabled. At least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is enabled. At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in a turned-off state. In contrast, neither the network connection status nor the PON port status in the second information is abnormal, and the WiFi module status in the second information is in a turned-off state.
4. The method according to claim 3, characterized in that, The step of determining, based on the first information and the second information, whether the user manually turned the WiFi module on or off after the last time the WiFi module's state was controlled according to the network connection status of the gateway device, further includes: A user has manually turned the WiFi module on or off since the last time the WiFi module's state was controlled based on the network connectivity of the gateway device, provided that one of the following conditions is met: At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in the off state, while the network connection status and PON port status in the second information are both normal, and the WiFi module status in the second information is in the on state. At least one of the network connection status and PON port status in the first information is abnormal, and the WiFi module status in the first information is in the off state; at least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is in the on state. The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is in the enabled state. The network connection status and PON port status in the second information are both normal, and the WiFi module status in the second information is in the disabled state. The network connection status and PON port status in the first information are both normal, and the WiFi module status in the first information is enabled. At least one of the network connection status and PON port status in the second information is abnormal, and the WiFi module status in the second information is disabled.
5. The method according to any one of claims 1 to 4, characterized in that, Determining the network connection status of the gateway device based on the value of the target indicator and the status of the WiFi module includes: With the WiFi module enabled, the network connection status of the gateway device is determined by comparing the value of the target indicator with the first threshold corresponding to the target indicator. When the WiFi module is turned off, the network connection status of the gateway device is determined by comparing the value of the target indicator with the second threshold corresponding to the target indicator.
6. The method according to claim 1, characterized in that, The step of controlling the activation or deactivation of the mobile hotspot WiFi module of the gateway device based on the network connection status of the gateway device includes: When the WiFi module is in a turned-off state and the network connection status indicates that the gateway device has a network connection, turn on the WiFi module. When the WiFi module is on and the network connection status indicates that the gateway device has lost network connection, the WiFi module shall be turned off.
7. The method according to claim 1, characterized in that, Before obtaining the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device, the method further includes: Subscribe to a first event and a second event, wherein the first event is a network connection status change event of the gateway device, and the second event is a PON port status change event; The acquisition of the target indicator value and the status of the mobile hotspot WiFi module of the gateway device includes: If at least one of the first event and the second event is detected, the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device are obtained.
8. The method according to claim 1, characterized in that, The first indicator includes connection parameters of Internet Protocol version 4 or 6, and the second indicator includes optical receive power.
9. The method according to claim 1, characterized in that, The method further includes: Based on the network connection status of the gateway device, control the opening or closing of at least one logical network of the WiFi module of the gateway device.
10. The method according to claim 9, characterized in that, The step of controlling the opening or closing of at least one logical network of the WiFi module of the gateway device based on the network connection status of the gateway device includes: When the network connection status indicates that the gateway device has a network connection, the first logical network of the WiFi module is enabled. If the network connectivity status indicates that the gateway device has lost network connectivity, the second logical network of the WiFi module shall be shut down.
11. A network control device, characterized in that, The device includes: The first acquisition module is used to acquire the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device. The target indicator includes at least one first indicator and at least one second indicator. The first indicator is used to indicate the network connection status of the gateway device, and the second indicator is used to indicate the status of the passive optical network PON port of the gateway device. The status of the WiFi module is either on or off. The first determining module is used to determine the network connection status of the gateway device based on the value of the target indicator and the status of the WiFi module; the network connection status of the gateway device is used to indicate whether the gateway device has a network connection. The first control module is used to control the WiFi module of the gateway device to be turned on or off according to the network connection status of the gateway device; The device further includes: The judgment module is used to determine, before the first acquisition module acquires the value of the target indicator and the status of the mobile hotspot WiFi module of the gateway device, whether the user manually turns the WiFi module on or off after the last time the status of the WiFi module was controlled according to the network connection status of the gateway device. The first acquisition module is specifically used for: If the user has not manually turned the WiFi module on or off since the judgment module determined that the WiFi module's status was changed based on the gateway device's network connection status last time, the module obtains the value of the target indicator and the status of the gateway device's WiFi module.
12. A gateway device, characterized in that, Includes memory, transceiver, and processor: Memory, used to store computer programs; Transceiver, used to send and receive data under the control of the processor; A processor for reading a computer program from the memory and executing the network control method according to any one of claims 1 to 10.
13. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program for causing the processor to execute the network control method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Mobile terminal and control method of wireless fidelity module thereof
CN102438079A
Method and device for providing a backup link
US20200213248A1