CN116208981A - CPE network optimization method and system - Google Patents

CPE network optimization method and system Download PDF

Info

Publication number
CN116208981A
CN116208981A CN202310019937.2A CN202310019937A CN116208981A CN 116208981 A CN116208981 A CN 116208981A CN 202310019937 A CN202310019937 A CN 202310019937A CN 116208981 A CN116208981 A CN 116208981A
Authority
CN
China
Prior art keywords
network
cpe
mode
network mode
preset
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.)
Granted
Application number
CN202310019937.2A
Other languages
Chinese (zh)
Other versions
CN116208981B (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.)
Guangzhou Tongze Kangwei Intelligent Technology Co ltd
Original Assignee
Guangzhou Tongze Kangwei Intelligent 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 Guangzhou Tongze Kangwei Intelligent Technology Co ltd filed Critical Guangzhou Tongze Kangwei Intelligent Technology Co ltd
Priority to CN202310019937.2A priority Critical patent/CN116208981B/en
Publication of CN116208981A publication Critical patent/CN116208981A/en
Application granted granted Critical
Publication of CN116208981B publication Critical patent/CN116208981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a CPE network optimization method and system, which comprises the steps of detecting the network state of CPE according to the current first network mode of the CPE, comparing with a preset state threshold value to determine whether the CPE needs to switch the network mode, and switching the network mode of the CPE into a second network mode through a preset network switching rule if the CPE needs to switch the network mode, so that the network stability of the CPE is improved.

Description

CPE network optimization method and system
Technical Field
The present invention relates to the field of network communications technologies, and in particular, to a CPE network tuning method and system.
Background
In the prior art, a CPE reads SIM card information through a baseband processor, and camps on a cellular network cell, a data link is established between an application layer dial-up and a base station, and a user accesses the internet by connecting a wired network port of a 5G CPE with a network cable or connecting a WiFi hotspot provided by the CPE.
The prior art lacks stability. When the arrears occur on the SIM card or the equipment signals are poor due to the adjustment of the base station which is currently resident, the equipment can not access the Internet, the hung equipment such as a PC (personal computer) and a mobile phone can not access the Internet, and if the current environment only has the WiFi AP capable of providing the Internet access condition, the prior art can not enable the 5G CPE to access the Internet.
Disclosure of Invention
The invention discloses a CPE network optimization method and system, which can improve network stability.
In order to achieve the above object, the present invention provides a CPE network tuning method, including:
detecting the network state of the CPE according to a first network mode in which the CPE is currently located;
comparing the network state with a preset state threshold value to determine whether the CPE needs to switch network modes or not;
if the CPE needs to switch the network mode, switching the network mode of the CPE to be a second network mode through a preset network switching rule.
The invention discloses a CPE network optimization method, which comprises the steps of firstly detecting the network state of a CPE according to a first network mode in which the CPE is currently located, then comparing the network state with a preset state threshold value according to the network state, judging whether the network state in which the CPE is currently located is stable or not, judging whether the network state of the CPE is switched or not, and if the CPE determines to switch the network state, switching the network mode of the CPE according to a preset switching rule.
As a preferred example, before detecting the network state of the CPE according to the first network mode in which the CPE is currently located, the method specifically includes:
configuring a network card, adding two vlan to an interface of the network card, setting parameters of the two vlan, and acquiring relevant parameters of a wired network IP in a DHCP or Static mode so as to complete wired network configuration of the CPE;
and installing a WiFi driving file, pulling up a WiFi network card in a Station mode and an AP mode, and scanning an AP available in the current environment through a wpa_cli program and generating a configuration file required by the Station mode so as to finish the WiFi Station network mode of the CPE.
The invention realizes the configuration of the wired network and the wireless network of the CPE by configuring various files on the CPE, ensures the diversity of the CPE network mode, provides various network modes and ensures the stability of the network.
As a preferred example, detecting, in the first network mode according to the current location of the CPE, a network state of the CPE specifically includes:
the first network mode comprises an operator network mode, a wired network mode and a WiFi Station network mode;
according to the first network mode, acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program, and detecting the network state of the CPE according to the network data;
if the CPE is in an operator network mode and a WiFi Station network mode, acquiring RSRP and RSSI values of the current environment of the CPE in real time and detecting a first delay value by using a ping program of an ICMP protocol;
if the CPE is in the wired network mode, a second delay value is detected by a ping procedure using ICMP protocol.
The method and the system detect the current network mode of the CPE in real time, and select corresponding network data according to different network modes so as to conveniently judge whether the network state of the current network mode is stable or not according to the network data, so as to conveniently judge whether to switch the network mode or not and ensure the stability of the network.
As a preferred example, the determining whether the CPE needs to perform network mode switching when comparing with a preset state threshold value specifically includes:
if the CPE is in an operator network mode or a WiFi Station network mode, judging whether the CPE needs to switch the first network mode or not by comparing the RSRP or RSSI value with a preset first signal value threshold value and comparing the first delay value with a preset first delay value threshold value;
and if the RSRP or RSSI value is smaller than the first signal value threshold or the first delay value is larger than a preset first delay value threshold, the CPE needs to switch the first network mode.
The invention compares the corresponding network data acquired by different network modes with the corresponding threshold data, and judges whether the network state of the current network mode is stable or not according to the numerical comparison, thereby improving the stability of the network.
As a preferred example, the determining whether the CPE needs to perform network mode switching when comparing with a preset state threshold value specifically includes:
if the CPE is in the limited network mode, judging whether the CPE needs to switch the first network mode or not by comparing the second delay value with a preset second delay value threshold;
if the second delay value is greater than a preset second delay value threshold, the CPE needs to switch the first network mode.
The invention compares the corresponding network data acquired by different network modes with the corresponding threshold data, and judges whether the network state of the current network mode is stable or not according to the numerical comparison, thereby improving the stability of the network.
As a preferred example, when the network mode of the CPE is switched to the second network mode by a preset network switching rule, the method specifically includes:
determining a second network mode switched by the CPE according to the priority of the network mode preset by the CPE;
and deleting the relevant route and firewall rules of the first network mode where the CPE is located, and adding the relevant route and firewall rules of the second network mode to enable the network mode of the CPE to be switched to the second network mode.
When the network state of the current network mode is unstable, the method determines the second network mode to be switched through the preset network priority, then deletes the relevant route and the firewall rule of the first network mode, adds the relevant route and the firewall rule of the second network mode, and accordingly completes the switching of the network modes, and ensures the stability of the network.
As a preferred example, when the network mode of the CPE is switched to the second network mode by a preset network switching rule, the method further includes:
and if the first network mode is a WiFi Station network mode, disconnecting the WiFi AP connected with the CPE.
The WIFI AP is disconnected, so that the subsequent switching of the network mode is facilitated.
On the other hand, the invention provides a CPE network tuning system, which comprises a detection module, a judgment module and a switching module;
the detection module is used for detecting the network state of the CPE according to a first network mode in which the CPE is currently located;
the judging module is used for comparing the network state with a preset state threshold value to determine whether the CPE needs to switch network modes or not;
the switching module is configured to switch the network mode of the CPE to a second network mode according to a preset network switching rule if the CPE needs to switch the network mode.
The invention discloses a CPE network optimization system, which comprises the steps of firstly detecting the network state of a CPE according to a first network mode in which the CPE is currently located, then comparing the network state with a preset state threshold value according to the network state, judging whether the network state in which the CPE is currently located is stable or not, judging whether the network state of the CPE is switched or not, and if the CPE determines to switch the network state, switching the network mode of the CPE according to a preset switching rule.
As a preferable example, the detection module includes a mode unit and an acquisition unit;
the mode unit is used for acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program according to the first network mode, and detecting the network state of the CPE according to the network data;
the acquisition unit is used for acquiring RSRP and RSSI values of the current environment of the CPE and detecting a first delay value by using a ping program of an ICMP protocol in real time if the CPE is in an operator network mode and a WiFi Station network mode; if the CPE is in the wired network mode, a second delay value is detected by a ping procedure using ICMP protocol.
The method and the system detect the current network mode of the CPE in real time, and select corresponding network data according to different network modes so as to conveniently judge whether the network state of the current network mode is stable or not according to the network data, so as to conveniently judge whether to switch the network mode or not and ensure the stability of the network.
As a preferable example, the switching module includes a determination unit and a switching unit;
the determining unit is used for determining a second network mode switched by the CPE according to the priority of the network mode preset by the CPE;
the switching unit is configured to switch the network mode of the CPE to the second network mode by deleting the relevant route and firewall rule of the first network mode where the CPE is located and adding the relevant route and firewall rule of the second network mode.
When the unstable network state of the current network mode is detected, a second network mode to be switched is determined through the preset network priority, then the relevant route and the firewall rule of the first network mode are deleted, the relevant route and the firewall rule of the second network mode are added, so that the switching of the network modes is completed, and the stability of the network is ensured.
Drawings
Fig. 1: the flow diagram of the CPE network tuning method provided by the embodiment of the invention is provided;
fig. 2: the CPE network tuning system provided by the embodiment of the invention is a structural schematic diagram;
fig. 3: a flow chart of a CPE network tuning method according to another embodiment of the present invention is provided.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The embodiment of the invention provides a CPE network tuning method, referring to fig. 1 for a main implementation flow, mainly including steps 101 to 103, each step specifically including:
step 101: and detecting the network state of the CPE according to the first network mode of the CPE.
In this embodiment, before executing this step, specifically includes: configuring a network card, adding two vlan to an interface of the network card, setting parameters of the two vlan, and acquiring relevant parameters of a wired network IP in a DHCP or Static mode so as to complete wired network configuration of the CPE; and installing a WiFi driving file, pulling up a WiFi network card in a Station mode and an AP mode, and scanning an AP available in the current environment through a wpa_cli program and generating a configuration file required by the Station mode so as to finish the WiFi Station network mode of the CPE.
In this embodiment, the steps specifically include: the first network mode comprises an operator network mode, a wired network mode and a WiFi Station network mode; according to the first network mode, acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program, and detecting the network state of the CPE according to the network data; if the CPE is in an operator network mode and a WiFi Station network mode, acquiring RSRP and RSSI values of the current environment of the CPE in real time and detecting a first delay value by using a ping program of an ICMP protocol; if the CPE is in the wired network mode, a second delay value is detected by a ping procedure using ICMP protocol.
Step 102: and comparing the network state with a preset state threshold value to determine whether the CPE needs to switch network modes.
In this embodiment, the steps specifically include: if the CPE is in an operator network mode or a WiFi Station network mode, judging whether the CPE needs to switch the first network mode or not by comparing the RSRP or RSSI value with a preset first signal value threshold value and comparing the first delay value with a preset first delay value threshold value; and if the RSRP or RSSI value is smaller than the first signal value threshold or the first delay value is larger than a preset first delay value threshold, the CPE needs to switch the first network mode. If the CPE is in the limited network mode, judging whether the CPE needs to switch the first network mode or not by comparing the second delay value with a preset second delay value threshold; if the second delay value is greater than a preset second delay value threshold, the CPE needs to switch the first network mode.
Step 103: if the CPE needs to switch the network mode, switching the network mode of the CPE to be a second network mode through a preset network switching rule.
In this embodiment, the steps specifically include: determining a second network mode switched by the CPE according to the priority of the network mode preset by the CPE; and deleting the relevant route and firewall rules of the first network mode where the CPE is located, and adding the relevant route and firewall rules of the second network mode to enable the network mode of the CPE to be switched to the second network mode. And if the first network mode is a WiFi Station network mode, disconnecting the WiFi AP connected with the CPE.
On the other hand, the embodiment of the present invention further provides a CPE network tuning system, and the structure of the system referring to fig. 2 mainly includes a detection module 201, a judgment module 202, and a switching module 203.
The detection module 201 is configured to detect a network state of the CPE according to a first network mode in which the CPE is currently located.
The judging module 202 is configured to compare the network status with a preset status threshold to determine whether the CPE needs to switch network modes.
The switching module 203 is configured to switch the network mode of the CPE to the second network mode according to a preset network switching rule if the CPE needs to switch the network mode.
In this embodiment, the detection module 201 includes a mode unit and an acquisition unit;
the mode unit is used for acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program according to the first network mode, and detecting the network state of the CPE according to the network data.
The acquisition unit is used for acquiring RSRP and RSSI values of the current environment of the CPE and detecting a first delay value by using a ping program of an ICMP protocol in real time if the CPE is in an operator network mode and a WiFi Station network mode; if the CPE is in the wired network mode, a second delay value is detected by a ping procedure using ICMP protocol.
In this embodiment, the switching module 203 includes a determining unit and a switching unit.
The determining unit is configured to determine a second network mode switched by the CPE according to a priority of the network mode preset by the CPE.
The switching unit is configured to switch the network mode of the CPE to the second network mode by deleting the relevant route and firewall rule of the first network mode where the CPE is located and adding the relevant route and firewall rule of the second network mode.
The embodiment of the invention discloses a CPE network optimization method and system, which comprises the steps of firstly detecting the network state of a CPE according to a first network mode in which the CPE is currently located, then comparing the network state with a preset state threshold value according to the network state, judging whether the network state in which the CPE is currently located is stable or not, judging whether the network state of the CPE is switched or not, and if the CPE determines to switch the network state, switching the network mode of the CPE according to a preset switching rule.
Example two
Another embodiment of the present invention provides another CPE network tuning method, referring to fig. 3, the flow of the method mainly includes steps 301 to 303, each of which specifically includes:
step 301: and collecting network state data corresponding to the current network mode of the CPE.
In this embodiment, the steps mainly include: according to a first network mode in which the CPE is currently located, acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program, and detecting the network state of the CPE according to the network data.
In this embodiment, before executing this step, specifically includes: first, a wired network is configured: (1) adding two vlan ids which are 10/20 respectively on a network card interface eth1, wherein the eth1.20 network card is used for a wired WAN; vconfig add eth1 10vconfig add eth1 20; (2) setting REORDER_HDR parameters of VLAN, and using default vconfig set_flag eth1.10 11 and vconfig set_flag eth1.20 1 1; (3) configuring a network card, namely, an ifconfig eth1.10 up, an ifconfig eth1.10 hw ether98, namely, an A9:42:11:22:33, an ifconfig eth1.20 up and an ifconfig eth1.20 hw ether98, namely, an A9:42:11:22:44; (4) the method comprises the steps of selecting a DHCP or Static mode to acquire IP related parameters of a wired network, wherein the DHCP mode acquires IP by using an executable file of the udhcpc: the udhcpc eth1.20-s/etc/udhcpc.d/udhcpc.script-p/var/run/udhcpc.pid & Static mode is directly configured with ip addr, then the WiFi Station network mode is configured: (1) installing a wifi driving file insmod wlan. Ko; (2) the WiFi network card in the Station mode and the AP mode is pulled up, the Station mode uses a network card wlan0, the AP mode uses a wlan1, and the ifconfig wlan0 up and the ifconfig wlan1up; (3) scanning available APs in the current environment by using a wpa_cli program, wherein the wpa_cli-i wlan0 scan; (scanning available APs for the current environment), wpa_cli-i wlan0 scan_results; (acquiring a scanning result); (4) generating a configuration file wpa_supplicant.conf required by the station mode, wherein the file contains a WiFi SSID and a secret key required to be connected; (5) WiFi Station mode is configured using the wpa_suppicant program, wpa_suppicant-i wlan0-D nl 80211-B-cwpa_suppicant.
In this embodiment, the steps specifically include: firstly judging whether the network mode where CPE is currently located is an operator network mode, a wired network mode or a WiFi Station network mode, if the network mode is the operator network mode, acquiring an RSRP/RSSI value of the current environment by using an AT instruction of a baseband module bottom layer, detecting the size of a delay value by using a ping program of an ICMP protocol, including binding a network card used by the corresponding network mode by using a socket, taking three ip/domain names (8.8.8.8/114.114.114.114/baidu.com domain names are not fixed, and can be customized by a user) as destination addresses, sending an ICMP protocol packet to the destination addresses every 10 seconds, and detecting whether a response data packet is obtained and the delay time of the response packet is received. If the network mode is a wired network mode, detecting whether to obtain a response data packet and the delay time for receiving the response packet by adopting a mode of sending ICMP packets adopted in the operator network mode.
In this embodiment, if the network mode is a WiFi Station network mode, the current connection AP signal strength is obtained through a corresponding instruction, where the instruction is: wpa_cli-i wlan0 scan; wpa_cli-i wlan0 scan_results; and acquiring the signal strength of the current connection AP according to the instruction. And simultaneously, the method is combined with the mode of sending the ICMP packet, and whether the response data packet is obtained or not and the delay time for receiving the response packet are detected.
Step 302: and judging whether the CPE needs to switch the network mode or not through a preset judging mechanism according to the network state data.
In this embodiment, the steps mainly include: and comparing the acquired network data corresponding to the network mode of the CPE with a preset state threshold value respectively to determine whether the CPE needs to switch the network mode.
In this embodiment, the steps specifically include: if the network mode is an operator network mode, determining the signal strength of the operator network according to the acquired RSRP and RSSI values through a preset registry, as shown in table 1.
Figure BDA0004042156780000101
Figure BDA0004042156780000111
TABLE 1
In this embodiment, an AT instruction AT the bottom layer of the baseband module is used to obtain an RSRP/RSSI value of the current environment, and the RSRP/RSSI value is divided into five signal levels according to the logic in table 1, when the signal strength is less than or equal to Level 1, the current network is considered to be not enabled, and the current network needs to be switched to another network mode, and if no response data packet of the transmitted ICMP packet is detected or the delay time is greater than 100ms, the current network is considered to be not enabled, and the current network needs to be switched to another network mode.
In this embodiment, when the network mode is the wired network mode, if no reply packet of the transmitted ICMP packet is received or the delay time is greater than 100ms, the current network is considered to be not connected, and it is necessary to switch to another network mode.
In this embodiment, when the network mode is a WiFi Station network mode, the acquired RSRP and RSSI values are used to determine the WiFi signal strength of the WiFi Station network according to a preset signal strength table, as shown in table 2.
Signal value Description of the invention
RSSI<=-100 Level 0
-100<RSSI<=-88 Level 1
-88<RSSI<=-77 Level 2
-66<RSSI<=-55 Level 3
-55<RSSI Level 4
Watch II
As shown in table 2, as a logic reference for dividing the WiFi signal strength in the present solution, the logic reference is combined with the manner of sending the ICMP packet to form a basis for judging the state of the WiFi Station network, when the WiFi strength is less than Level 2 or the ICMP packet is sent without response/delay too much, the current network is considered to be unavailable, and the network mode needs to be switched.
Step 303: if the network mode needs to be switched, the network mode of the CPE is switched through a preset network mode switching rule.
In this embodiment, the steps mainly include: determining a second network mode switched by the CPE according to the priority of the network mode preset by the CPE; and deleting the relevant route and firewall rules of the first network mode where the CPE is located, and adding the relevant route and firewall rules of the second network mode to enable the network mode of the CPE to be switched to the second network mode. And if the first network mode is a WiFi Station network mode, disconnecting the WiFi AP connected with the CPE.
In this embodiment, the steps specifically include: in the three network modes, the priority of an operator network is highest, the priority of a WiFi Station network is lowest, an automatic switching mode is used by default after a CPE device is started, an SIM card is used for residing on the operator network through a baseband module, then link detection is carried out on the current network for 10 seconds once, if the current network is detected to be unavailable, the link detection is carried out on the wired network to check whether the wired network is available, and if the wired network is available, the operation is switched to the wired network or the WiFi Station network according to the following steps:
(1) Deleting relevant routes and firewall rules for current network mode
ip route del default;
iptables-w-t nat-D POSTROUTING-o ifname-j MASQUERADE;
(ifname is a network interface used for the corresponding network mode)
(2) Adding network mode related routes to be switched and firewall rules
ip route add IP_SEG/24dev ifname;
ip route replace default via IP_GATEWAY dev ifname;
iptables-w-t nat-A POSTROUTING-o ifname-j MASQUERADE;
(IP_SEG is the corresponding network segment, IP_GATEWAY is the corresponding GATEWAY, and ifname is the network interface of the corresponding network mode)
Before the WiFi Station mode is switched to another mode, the currently connected WiFi AP needs to be disconnected firstly, and the disconnection instruction is as follows: wpa_cli-i wlan0 disconnect.
In this embodiment, three available network modes are provided by the CPE network tuning method, and the network modes do not need to be manually switched in the automatic mode, the system can automatically detect the current environment to switch, a more stable internet surfing environment is provided for users, and meanwhile, based on the addition of the WiFi Station network mode, the internet surfing requirements under the extreme conditions that an operator network is unavailable or has poor signals, a wired network is lacking, and only a WiFi AP network is available are guaranteed, and the 5G CPE can be used as relay WiFi to be applied to all scenes in which the WiFi AP signal range needs to be enlarged.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (10)

1. A CPE network tuning method, comprising:
detecting the network state of the CPE according to a first network mode in which the CPE is currently located;
comparing the network state with a preset state threshold value to determine whether the CPE needs to switch network modes or not;
if the CPE needs to switch the network mode, switching the network mode of the CPE to be a second network mode through a preset network switching rule.
2. The CPE network tuning method of claim 1, wherein the detecting the network status of the CPE according to the first network mode in which the CPE is currently located specifically comprises:
configuring a network card, adding two vlan to an interface of the network card, setting parameters of the two vlan, and acquiring relevant parameters of a wired network IP in a DHCP or Static mode so as to complete wired network configuration of the CPE;
and installing a WiFi driving file, pulling up a WiFi network card in a Station mode and an AP mode, and scanning an AP available in the current environment through a wpa_cli program and generating a configuration file required by the Station mode so as to finish the WiFi Station network mode of the CPE.
3. The CPE network tuning method of claim 1, wherein the detecting the network status of the CPE according to the first network mode in which the CPE is currently located specifically includes:
the first network mode comprises an operator network mode, a wired network mode and a WiFi Station network mode;
according to the first network mode, acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program, and detecting the network state of the CPE according to the network data;
if the CPE is in an operator network mode and a WiFi Station network mode, acquiring RSRP and RSSI values of the current environment of the CPE in real time and detecting a first delay value by using a ping program of an ICMP protocol;
if the CPE is in the wired network mode, a second delay value is detected by a ping procedure using ICMP protocol.
4. A method for optimizing a CPE network according to claim 3, wherein the comparing with a preset state threshold value determines whether the CPE needs to perform network mode switching, specifically comprising:
if the CPE is in an operator network mode or a WiFi Station network mode, judging whether the CPE needs to switch the first network mode or not by comparing the RSRP or RSSI value with a preset first signal value threshold value and comparing the first delay value with a preset first delay value threshold value;
and if the RSRP or RSSI value is smaller than the first signal value threshold or the first delay value is larger than a preset first delay value threshold, the CPE needs to switch the first network mode.
5. A method for optimizing a CPE network according to claim 3, wherein the comparing with a preset state threshold value determines whether the CPE needs to perform network mode switching, specifically comprising:
if the CPE is in the limited network mode, judging whether the CPE needs to switch the first network mode or not by comparing the second delay value with a preset second delay value threshold;
if the second delay value is greater than a preset second delay value threshold, the CPE needs to switch the first network mode.
6. The CPE network tuning method of claim 1, wherein the switching the network mode of the CPE to the second network mode by a preset network switching rule specifically includes:
determining a second network mode switched by the CPE according to the priority of the network mode preset by the CPE;
and deleting the relevant route and firewall rules of the first network mode where the CPE is located, and adding the relevant route and firewall rules of the second network mode to enable the network mode of the CPE to be switched to the second network mode.
7. The CPE network tuning method of claim 6, wherein the switching the network mode of the CPE to the second network mode by a preset network switching rule further comprises:
and if the first network mode is a WiFiStation network mode, disconnecting the WiFi AP connected with the CPE.
8. The CPE network tuning system is characterized by comprising a detection module, a judgment module and a switching module;
the detection module is used for detecting the network state of the CPE according to a first network mode in which the CPE is currently located;
the judging module is used for comparing the network state with a preset state threshold value to determine whether the CPE needs to switch network modes or not;
the switching module is configured to switch the network mode of the CPE to a second network mode according to a preset network switching rule if the CPE needs to switch the network mode.
9. The CPE network tuning system of claim 8, wherein the detection module comprises a mode unit and an acquisition unit;
the mode unit is used for acquiring network data corresponding to the CPE in the first network mode in real time through a preset monitoring program according to the first network mode, and detecting the network state of the CPE according to the network data;
the acquisition unit is used for acquiring RSRP and RSSI values of the current environment of the CPE and detecting a first delay value by using a ping program of an ICMP protocol in real time if the CPE is in an operator network mode and a WiFi Station network mode; if the CPE is in the wired network mode, a second delay value is detected by a ping procedure using ICMP protocol.
10. The CPE network tuning system of claim 8, wherein the switching module comprises a determining unit and a switching unit;
the determining unit is used for determining a second network mode switched by the CPE according to the priority of the network mode preset by the CPE;
the switching unit is configured to switch the network mode of the CPE to the second network mode by deleting the relevant route and firewall rule of the first network mode where the CPE is located and adding the relevant route and firewall rule of the second network mode.
CN202310019937.2A 2023-01-06 2023-01-06 CPE network optimization method and system Active CN116208981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310019937.2A CN116208981B (en) 2023-01-06 2023-01-06 CPE network optimization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310019937.2A CN116208981B (en) 2023-01-06 2023-01-06 CPE network optimization method and system

Publications (2)

Publication Number Publication Date
CN116208981A true CN116208981A (en) 2023-06-02
CN116208981B CN116208981B (en) 2024-02-23

Family

ID=86508774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310019937.2A Active CN116208981B (en) 2023-01-06 2023-01-06 CPE network optimization method and system

Country Status (1)

Country Link
CN (1) CN116208981B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283976A (en) * 2013-07-10 2015-01-14 中兴通讯股份有限公司 Switching method of network interfaces and access equipment
CN105282796A (en) * 2014-07-01 2016-01-27 中兴通讯股份有限公司 Network mode switching method, device and terminal
CN105636086A (en) * 2014-10-28 2016-06-01 中兴通讯股份有限公司 Network mode switching processing method, network mode switching processing device and terminal comprising network mode switching processing device
CN106470170A (en) * 2015-08-21 2017-03-01 中兴通讯股份有限公司 Method for switching network and device
CN111885644A (en) * 2020-06-16 2020-11-03 太原市高远时代科技有限公司 Automatic switching method for wired network and wireless network
CN112134774A (en) * 2020-09-22 2020-12-25 Oppo广东移动通信有限公司 Client front-end device, communication control method for client front-end device, and storage medium
CN114125816A (en) * 2020-08-28 2022-03-01 荣耀终端有限公司 User equipment and network switching method and device thereof
CN216873404U (en) * 2021-11-17 2022-07-01 上海移远通信技术股份有限公司 CPE (customer premises Equipment)

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283976A (en) * 2013-07-10 2015-01-14 中兴通讯股份有限公司 Switching method of network interfaces and access equipment
CN105282796A (en) * 2014-07-01 2016-01-27 中兴通讯股份有限公司 Network mode switching method, device and terminal
CN105636086A (en) * 2014-10-28 2016-06-01 中兴通讯股份有限公司 Network mode switching processing method, network mode switching processing device and terminal comprising network mode switching processing device
CN106470170A (en) * 2015-08-21 2017-03-01 中兴通讯股份有限公司 Method for switching network and device
CN111885644A (en) * 2020-06-16 2020-11-03 太原市高远时代科技有限公司 Automatic switching method for wired network and wireless network
CN114125816A (en) * 2020-08-28 2022-03-01 荣耀终端有限公司 User equipment and network switching method and device thereof
CN112134774A (en) * 2020-09-22 2020-12-25 Oppo广东移动通信有限公司 Client front-end device, communication control method for client front-end device, and storage medium
CN216873404U (en) * 2021-11-17 2022-07-01 上海移远通信技术股份有限公司 CPE (customer premises Equipment)

Also Published As

Publication number Publication date
CN116208981B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
US8934629B2 (en) Communication apparatus, image input apparatus, image output apparatus, wireless communication circuit, method for controlling apparatus, and program
KR101457879B1 (en) Self-configuration of femtocell access points (fap)
CN105722058B (en) User equipment and information forwarding method
CN104283976B (en) Switching method of network interface and access equipment
EP3585099A1 (en) Vowifi call processing method of mobile terminal, system, and mobile terminal
WO2016165235A1 (en) Wireless network connection method, device and terminal
CN111404814B (en) Data transmission method and communication device
JP4842120B2 (en) Radio base station, cell radio detection apparatus, and line connection apparatus
CN104010292B (en) A kind of VoWLAN loaming methods based on AP auxiliary
US8295223B2 (en) Wireless connection method and device
CN107613530A (en) The collocation method and double-frequency wireless router of internet of things equipment based on router
CN106888488A (en) The networking method and its device of smart machine
CN104717709A (en) Network switching method and device
CN104320818B (en) A kind of terminal connection management mechanism of wireless repeater applied to WLAN
JP2014158255A (en) Radio communication apparatus, radio communication method, and program
CN107124744B (en) Network switching method and wireless access point
CN115243330A (en) Method, terminal and storage medium for automatically switching WiFi and cellular network
CN111479248A (en) Fast roaming automatic configuration method and system
CN116208981B (en) CPE network optimization method and system
WO2015043089A1 (en) Network access point, network controller, network device, and load control method thereof
WO2022073304A1 (en) Ap network configuration processing method and apparatus
WO2010000178A1 (en) Method, device and system for mobile terminal rapidly residing in access point cell
CN111954293B (en) Data synchronization method, network connection method, device and wireless access point
US20130288670A1 (en) Signaling of preferred visited nsp for roaming services
CN106376042B (en) A kind of switching method and device of WiFi access point

Legal Events

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

Address after: 510000 room 1301, No. 37, Jinlong street, Xiangjiang financial and business center, Nansha District, Guangzhou City, Guangdong Province (office only)

Applicant after: Guangzhou Tongze Kangwei Technology Co.,Ltd.

Address before: 510000 room 1301, No. 37, Jinlong street, Xiangjiang financial and business center, Nansha District, Guangzhou City, Guangdong Province (office only)

Applicant before: Guangzhou Tongze Kangwei Intelligent Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant