A network testing method and apparatus based on FTTR networking structure
By preinstalling virtual clients and virtual servers in the main gateway and subgateway in the FTTR network structure, and using virtual clients and virtual servers for network testing, the problem of the bottleneck of the performance of the existing technology is solved, and accurate performance testing and fault location of the home network are achieved.
Patent Information
- Application Number
- CN202510265132.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing gateway testing and terminal testing methods cannot accurately locate the performance bottlenecks in the home network, especially in the FTTR network structure, the performance evaluation between the main gateway and the sub-gateway is insufficient, making it difficult to identify specific performance problems.
By pre-installing virtual clients and virtual servers in the main gateway and subgateway, the test terminal initiates network test commands to the main gateway, and the virtual clients of each network device generate test instructions. The virtual server conducts data testing based on the test instructions and feedbacks the results to the main gateway, thereby accurately positioning the bandwidth bottleneck of the internal network of the home.
It realizes performance testing of each segment in the home network, accurately identify bottlenecks in the network structure, quickly locate the problems, improves troubleshooting efficiency, and supports home network optimization and operator service quality evaluation.
Smart Images

Figure CN119788564A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a network testing method and device based on an FTTR networking structure. Background Art
[0002] With the popularization of broadband services, broadband users have higher and higher requirements for network quality. How to discover and grasp the network quality of broadband users and effectively improve the end-to-end experience perception of broadband users has become an important part of the network construction and optimization work of telecom operators. This requires network quality evaluation, and the problems of the network provided by the operator can be analyzed and located based on the evaluation results. At the same time, it can also provide data basis for network fault location and network optimization construction.
[0003] Operators generally recommend that customers use terminal testing and gateway testing to evaluate customer bandwidth. Gateway testing reflects the bandwidth from the gateway to the operator's server for testing network performance, while terminal testing reflects the bandwidth from the terminal to the operator's server for testing network performance.
[0004] With the popularization of FTTR (Fiber to the Room) fiber-optic whole-house networking, home networks have become complicated. FTTR includes a main gateway and multiple sub-gateways. The main gateway and sub-gateways have multiple networking modes, including fiber networking, LAN networking and wireless networking. When users use terminals to access the Internet and there are performance problems, the network performance tests of the gateway and the terminal cannot locate the problem. The performance evaluation of the main and sub-gateways is involved. In order to identify which section has performance bottlenecks, the traditional network performance tests of the terminal and the gateway can no longer meet the needs of locating the problem. A more complete solution for testing network performance is urgently needed.
[0005] It should be noted that the information in the above background technology section is only used to enhance the understanding of the background technology of the present application, and therefore may include technical information that is not known or easily inferred by ordinary technicians in the field. Summary of the invention
[0006] In view of the above problems, the present application is proposed to provide a network testing method and device based on FTTR networking structure to overcome the above problems or at least partially solve the above problems, including: A network testing method based on an FTTR networking structure, the method is used to test the network status of a networking structure composed of multiple sub-gateways, the method involves a main gateway, multiple sub-gateways and a test terminal; the test terminal is used to initiate a network test command; the network test command includes an IP address; The method comprises: In response to a network test command initiated by the test terminal, the main gateway determines a target test segment according to the IP address; When the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform a data test according to the first test instruction to obtain a first test result, and feed the first test result back to the main gateway; or; when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; The main gateway performs a data test according to the second test instruction to obtain a second test result.
[0007] Optionally, the main gateway is preset with a first virtual client, and the sub-gateway is preset with a first virtual server; The step of the main gateway generating a first test instruction and sending the first test instruction to the sub-gateway includes: The main gateway calls the first virtual client to generate a first test instruction; The main gateway sends the first test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway.
[0008] Optionally, the sub-gateway is preset with a second virtual client; the step in which the main gateway sends the network test command to the sub-gateway includes: The main gateway sends the network test command to the sub-gateway; the sub-gateway is used to call the second virtual client to generate a second test instruction according to the network test command, and feed back the second test instruction to the main gateway.
[0009] Optionally, the main gateway is preset with a second virtual server; the step of the main gateway performing a data test according to the second test instruction to obtain a second test result includes: The main gateway calls the second virtual server to perform data testing according to the second test instruction to obtain a second test result.
[0010] Optionally, the method further involves a test server, the test server is preset with a third virtual server, and the main gateway is preset with a first virtual client; After the step of, in response to the network test command initiated by the test terminal, the main gateway determining the target test segment according to the IP address, the step further includes: When the target test segment is from the main gateway to the test server, the main gateway calls the first virtual client to generate a third test instruction, and sends the third test instruction to the test server; the test server is used to call the third virtual server to perform data testing according to the third test instruction to obtain a third test result, and feed back the third test result to the main gateway.
[0011] Optionally, the method further involves a first user terminal, the first user terminal is communicatively connected to the main gateway, the first user terminal is preset with a third virtual client, and the main gateway is preset with a second virtual server; After the step of, in response to the network test command initiated by the test terminal, the main gateway determining the target test segment according to the IP address, the step further includes: When the target test segment is from the first user terminal to the main gateway, the main gateway sends the network test command to the first user terminal; the first user terminal is used to call the third virtual client to generate a fourth test instruction according to the network test command, and send the fourth test instruction to the main gateway; The main gateway calls the second virtual server to perform data testing according to the fourth test instruction to obtain a fourth test result.
[0012] Optionally, the method further involves a second user terminal, the second user terminal is communicatively connected to the sub-gateway, the second user terminal is preset with a fourth virtual client, and the sub-gateway is preset with a first virtual server; After the step of, in response to the network test command initiated by the test terminal, the main gateway determining the target test segment according to the IP address, the step further includes: When the target test segment is from the first user terminal to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to send the network test command to the second user terminal; the second user terminal is used to call the fourth virtual client to generate a fifth test instruction according to the network test command, and send the fifth test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the fifth test instruction to obtain a fifth test result, and feed back the fifth test result to the sub-gateway, and the sub-gateway is used to feed back the fifth test result to the main gateway.
[0013] A network testing device, the device is used to test the network status of a networking structure composed of multiple sub-gateways, the device involves a main gateway, multiple sub-gateways and a test terminal; the test terminal is used to initiate a network test command; the network test command includes an IP address; The testing device comprises: A target test segment determination module, configured to respond to a network test command initiated by the test terminal, wherein the main gateway determines a target test segment according to the IP address; A first test result generating module, configured to, when the target test segment is from the main gateway to the sub-gateway, generate a first test instruction by the main gateway and send the first test instruction to the sub-gateway; the sub-gateway is configured to perform a data test according to the first test instruction to obtain a first test result, and feed the first test result back to the main gateway; or; a second test instruction generating module, used for, when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; The second test result generating module is used for the main gateway to perform data testing according to the second test instruction to obtain a second test result.
[0014] A computer device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method described in any embodiment of the present application is implemented.
[0015] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any embodiment of the present application is implemented.
[0016] This application has the following advantages: In an embodiment of the present application, in view of the problem that the existing methods of testing network performance by gateways and terminals cannot identify which segment has a performance bottleneck, the present application provides a solution of "pre-installing virtual clients and virtual servers in each network device, initiating a network test command from the test terminal to the main gateway, generating a test instruction from the virtual client of each network device, and performing a data test according to the test instruction, and then feeding back the data test result to the main gateway", specifically: in response to the network test command initiated by the test terminal, the main gateway determines the target test segment according to the IP address; when the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform a data test according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway; or; when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; the main gateway performs a data test according to the second test instruction to obtain a second test result. The above method provides a full bandwidth speed measurement solution from the terminal to the operator server by accurately locating the bandwidth bottleneck of the home network, combining gateway speed measurement and terminal PC speed measurement. It not only solves the limitations of existing speed measurement methods, but also supports emerging network networking methods, providing a powerful tool for home network optimization and operator service quality evaluation. By deploying speed measurement points between the main gateway and the sub-gateway, the bandwidth of the home network can be accurately detected; it can identify whether the link between the main gateway and the sub-gateway becomes a bottleneck, thereby eliminating the influence of the external network; by performing network performance tests on different target test segments, the bottlenecks in the network structure can be accurately identified, the problem can be quickly located, and the troubleshooting efficiency can be improved; through testing, performance bottlenecks in the network can be discovered, such as insufficient bandwidth, excessive latency, or equipment performance problems, which facilitates targeted optimization and improves overall network efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 This is a flowchart of a network testing method based on an FTTR networking structure provided by an embodiment of the present application; Figure 2is a flow chart of testing network speed provided by a specific embodiment of the present application; Figure 3 is a flow chart of testing network delay provided by a specific embodiment of the present application; Figure 4 It is a structural diagram of a network testing device based on FTTR networking structure provided by an embodiment of the present application; Figure 5 It is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0020] The inventors have found through analysis of the prior art that the existing network testing methods have the following limitations: 1) Limitations of gateway speed measurement: The existing gateway speed measurement can only reflect the bandwidth to the operator server and cannot detect the bottleneck of the home network (such as between the main gateway and the sub-gateway). If the sub-gateway speed measurement does not meet the standard, there may be a problem with the link between the main gateway and the sub-gateway, rather than a problem from the home access point to the operator server. 2) Limitations of terminal PC speed measurement: The terminal PC speed measurement can only reflect the bandwidth from the PC to the operator server and cannot distinguish the bottlenecks of the home network and the external network. If the speed measurement result is not ideal, it is impossible to determine whether it is a problem with the home network or the operator network.
[0021] Reference Figure 1 , shows a network testing method based on an FTTR networking structure provided by an embodiment of the present application, the method is used to test the network status of a networking structure composed of multiple sub-gateways, the method involves a main gateway, multiple sub-gateways and a test terminal; the test terminal is used to initiate a network test command; the network test command includes an IP address; The method comprises the following steps: S110, in response to a network test command initiated by the test terminal, the main gateway determines a target test segment according to the IP address; S120: When the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform a data test according to the first test instruction to obtain a first test result, and feed the first test result back to the main gateway; S130, or; when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; S140. The main gateway performs a data test according to the second test instruction to obtain a second test result.
[0022] In an embodiment of the present application, in view of the problem that the existing gateway test network performance and terminal test network performance methods cannot identify which segment has a performance bottleneck, the present application provides a solution of "pre-installing virtual clients and virtual servers in each network device, the test terminal initiates a network test command to the main gateway, the virtual client of each network device generates a test instruction, the virtual server performs a data test according to the test instruction, and then feeds back the data test result to the main gateway", specifically: in response to the network test command initiated by the test terminal, the main gateway determines the target test segment according to the IP address; when the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform a data test according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway; or; when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; the main gateway performs a data test according to the second test instruction to obtain a second test result. By conducting network performance tests on different target test segments, bottlenecks in the network structure can be accurately identified, problems can be quickly located, and troubleshooting efficiency can be improved. Performance bottlenecks in the network, such as insufficient bandwidth, excessive latency, or equipment performance issues, can be discovered through testing, facilitating targeted optimization and improving overall network efficiency.
[0023] Next, a network testing method based on the FTTR networking structure in this exemplary embodiment will be further described.
[0024] As described in the above step S110, in response to the network test command initiated by the test terminal, the main gateway determines the target test segment according to the IP address; It should be noted that the test terminal can be the following devices or tools: Physical devices: such as laptops / desktops: install Linux, Windows or macOS, and run terminal emulators for remote server management. Mobile devices: such as tablets / mobile phones: use mobile terminal applications such as Termius and JuiceSSH for remote management. Network devices: such as switches and routers, managed through the Console port or SSH. Terminal emulators: For example, software terminals: such as GNOMETerminal, iTerm2, Windows Terminal, etc. For example, Web terminals: such as WebSSH, Shellinabox, provide browser-based terminal access. These terminal tools and devices can help operation and maintenance personnel perform system management, troubleshooting and testing.
[0025] It should be noted that in a home network, the main gateway is a key device that connects internal devices to the external Internet. It usually has functions such as routing, firewall, and network address translation. For example, a wireless router is a common main gateway device for a home network. A wireless router can provide Wi-Fi access and allow wireless devices to connect to the Internet. It supports routing functions to forward data packets from the home network to the Internet. It usually has built-in network address translation and firewall functions to protect the security of the home network.
[0026] It should be noted that the method is used to test the network status of a networking structure composed of multiple sub-gateways, and the method involves a main gateway, multiple sub-gateways, a test terminal, a first user terminal connected to the main gateway, a second user terminal connected to the sub-gateway, and a test server; the test terminal is used to initiate a network test command; the network test command contains the IP address of the target test object, and the target test object can be a sub-gateway, a first user terminal connected to the main gateway, a second user terminal connected to the sub-gateway, and a test server. The main gateway will determine the corresponding target test segment based on the IP address of the received target test object. When the target test object is a sub-gateway, the corresponding target test segment is from the main gateway to the sub-gateway, or from the sub-gateway to the main gateway; when the target test object is a test server, the corresponding target test segment is from the main gateway to the test server; when the target test object is the first user terminal, the corresponding target test segment is from the first user terminal to the main gateway; when the target test object is the second user terminal, the corresponding target test segment is from the second user terminal to the sub-gateway.
[0027] The IP address is a unique address used to identify and locate a network device.
[0028] As described in the above step S120, when the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform data testing according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway; It should be noted that the data test may be a test of any parameter among various network performance indicator parameters such as bandwidth test, delay test, jitter test, packet loss rate test, throughput test, number of connections test and response time test.
[0029] In one embodiment, the specific process of step S120 may be further explained in combination with the following description.
[0030] The main gateway is preset with a first virtual client, and the main gateway is preset with a second virtual server; the sub-gateway is preset with a first virtual server; the main gateway calls the first virtual client to generate a first test instruction; the main gateway sends the first test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway. The main gateway sends the network test command to the sub-gateway; the sub-gateway is used to call the second virtual client to generate a second test instruction according to the network test command, and feed back the second test instruction to the main gateway.
[0031] It should be noted that implanting virtual clients and virtual servers in the main gateway device requires a combination of network architecture, virtualization technology and security policies.
[0032] The following are the virtual server preset process of the main gateway, with specific steps: 1. Ensure that the main gateway device supports virtualization (such as Intel VT-x / AMD-V) and has sufficient CPU, memory, and storage resources. 2. Select a suitable virtualization platform (such as VMware ESXi, KVM, Hyper-V) or containerization technology (such as Docker, Kubernetes). 3. Network planning: Clarify the network requirements of virtual clients and servers, including IP address allocation, VLAN division, and firewall rules. 4. Implant virtual servers: Virtual servers are used to provide network services (such as DNS, DHCP, firewall, VPN, etc.). 5. Install the virtualization platform: Install virtualization software (such as KVM or ESXi) on the main gateway device. 6. Configure the management interface of the virtualization platform. 7. Network configuration: Connect the network interface of the virtual server to the internal or external network of the main gateway. Configure the routing and firewall rules of the main gateway to ensure that traffic can be forwarded to the virtual server correctly.
[0033] The following is the preset process of the virtual client of the main gateway, with specific steps: 1. Create a virtual client environment: Create a virtual machine on the virtualization platform and install the client operating system (such as Windows 10, Ubuntu Desktop). Configure the network interface of the virtual machine to ensure that it can access the main gateway and other network resources. 2. Configure remote access: Install remote access tools (such as RDP, VNC, SSH). Configure the firewall rules of the main gateway to allow external access to the virtual client.
[0034] In one embodiment, the specific process of step S130 may be further explained in combination with the following description.
[0035] The sub-gateway is preset with a second virtual client; the step in which the main gateway sends the network test command to the sub-gateway includes: the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to call the second virtual client to generate a second test instruction according to the network test command, and feed back the second test instruction to the main gateway.
[0036] The above is a description of the steps for pre-setting the virtual client and virtual server of this main gateway. As for the preset process of other network devices (sub-gateways, user terminals, test servers), since they are basically similar to the main gateway, the preset process of the virtual client and virtual server of other network devices will not be repeated. For relevant matters, please refer to the partial description of the main gateway.
[0037] In one embodiment, the specific process of step S130 may be further explained in combination with the following description.
[0038] The sub-gateway is preset with a second virtual client; the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to call the second virtual client to generate a second test instruction according to the network test command, and feed back the second test instruction to the main gateway.
[0039] In one embodiment, the specific process of step S140 may be further explained in combination with the following description.
[0040] The main gateway is preset with a second virtual server; the main gateway calls the second virtual server to perform data testing according to the second test instruction to obtain a second test result.
[0041] The following description can be combined to further illustrate that after step S110, the following may further be included: In one embodiment, the method further involves a test server, the test server is preset with a third virtual server, and the main gateway is preset with a first virtual client; When the target test segment is from the main gateway to the test server, the main gateway calls the first virtual client to generate a third test instruction, and sends the third test instruction to the test server; the test server is used to call the third virtual server to perform data testing according to the third test instruction to obtain a third test result, and feed back the third test result to the main gateway.
[0042] In one embodiment, the method further involves a first user terminal, the first user terminal is communicatively connected to the main gateway, the first user terminal is preset with a third virtual client, and the main gateway is preset with a second virtual server; When the target test segment is from the first user terminal to the main gateway, the main gateway sends the network test command to the first user terminal; the first user terminal is used to call the third virtual client to generate a fourth test instruction according to the network test command, and send the fourth test instruction to the main gateway; The main gateway calls the second virtual server to perform data testing according to the fourth test instruction to obtain a fourth test result.
[0043] In one embodiment, the method further involves a second user terminal, the second user terminal is communicatively connected to the sub-gateway, the second user terminal is preset with a fourth virtual client, and the sub-gateway is preset with a first virtual server; When the target test segment is from the first user terminal to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to send the network test command to the second user terminal; the second user terminal is used to call the fourth virtual client to generate a fifth test instruction according to the network test command, and send the fifth test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the fifth test instruction to obtain a fifth test result, and feed back the fifth test result to the sub-gateway, and the sub-gateway is used to feed back the fifth test result to the main gateway.
[0044] Reference Figure 2 , Figure 2 The specific flow chart for testing network speed is as follows, taking testing network speed as an example, a specific implementation method of the network testing method is described.
[0045] Step 201: The management APP program of the main gateway is installed on the mobile phone of the operator's operation and maintenance personnel. The mobile phone initiates a segmented speed test through the APP. The parameters include the test program type (iperf is used as an example in this embodiment) and the operator's speed test server address (xxxx).
[0046] Step 202: The main gateway receives the segmented speed test command sent by the mobile phone APP and starts uploading the test to the operator's speed test server: iperf -c xxxx -t 15, -t 15 means the speed test time is 15 seconds, and the main gateway sends data to the server. In this step, the speed test server is enabled by default with iperf -s, otherwise the speed test fails; after 15 seconds of speed test, the upload rate US1 is obtained.
[0047] Step 203: After the upload test of the speed test server by the main gateway is completed, a download test is performed: iperf -cx.xxx -t 15 -R, where -R represents that the speed test server sends data to the main gateway. In addition, the speed test server is enabled with iperf -s by default. After the speed test time is 15 seconds, the download rate DS1 is obtained.
[0048] Step 204: After the main gateway and the operator's speed test server finish uploading and downloading, the previous iperf program is terminated. The sub-gateway in the FTTR network and the network connected to the main gateway are detected. After the sub-gateway and the network mode (fiber or wireless) are detected, iperf -s is started, and a segmented speed test command is sent to the sub-gateway.
[0049] Step 205: After receiving the segmented speed test instruction from the main gateway, the sub-gateway first starts to perform an upload test on the main gateway: iperf -c 192.168.1.1 -t 15, where -t 15 represents a speed test time of 15 seconds. Here, it is assumed that the IP address of the main gateway is 192.168.1.1, and the sub-gateway sends data to the main gateway. After the speed test time is 15 seconds, the upload rate US2 is obtained.
[0050] Step 206: After the upload test of the sub-gateway to the main gateway is completed, a download test is performed iperf -c 192.168.1.1 -t 15 -R, where -R represents that the main gateway sends data to the sub-gateway. In addition, the default speed test server here turns on iperf-s by default. After the speed test time is 15 seconds, the download rate DS2 is obtained.
[0051] Step 207: After the speed test of the sub-gateway and the main gateway is completed, it starts to detect whether there is a terminal hanging down. After detecting PC2 (wired or wireless), it starts to test the speed of PC2. Here, it is assumed that the IP address of PC2 is 192.168.1.3. The download test is first performed, iperf -c 192.168.1.3 -t 15, -t 15 represents the speed test time is 15 seconds, and the sub-gateway sends data to PC2. After the speed test time is 15 seconds, the download rate DS3 is obtained (note that it is DS here, and this embodiment defaults to the download direction from the operator's speed test server to the terminal hanging down). It should be noted that PC2, i.e., the second user terminal connected to the sub-gateway communication, can be a mobile phone or a computer.
[0052] Step 208: After the sub-gateway completes the download speed test on PC2, it starts the upload test, iperf -c192.168.1.3 -t 15 -R, -t 15 means the speed test time is 15 seconds, PC2 sends data to. After the speed test time is 15 seconds, the upload rate US3 is obtained.
[0053] Step 209: After the sub-gateway completes the speed test of the main gateway upwards and completes the speed test of the downstream terminal PC2 downwards, it reports the networking mode and test rate with the main gateway and the connection mode and test rate with PC2 to the main gateway. At this point, the speed test of the sub-gateway is completed; Step 210: After receiving the speed test report result from the sub-gateway, the main gateway starts to detect whether the main gateway itself has a terminal PC1 attached to it. If so, it starts to test the speed of PC1. Here, it is assumed that the IP address of PC1 is 192.168.1.2. An upload test is performed first, iperf -c 192.168.1.2 -t 15, -t 15 represents the speed test time of 15 seconds, and the main gateway sends data to PC1. After the speed test time is 15 seconds, the download rate DS4 is obtained (note that it is DS here, and this embodiment defaults to the download direction from the operator's speed test server to the terminal). It should be noted that PC1, i.e., the first user terminal connected to the main gateway communication, can be a mobile phone or a computer, etc.
[0054] Step 211: After the sub-gateway completes the download speed test of PC2, it starts the upload test, iperf -c192.168.1.2 -t 15 -R, -t 15 means the speed test time is 15 seconds, PC2 sends data to the main gateway. After the speed test time is 15 seconds, the main gateway obtains the upload rate US4.
[0055] Step 212: The main gateway reports the speed test result and networking mode reported by the sub-gateway, the speed test result of the server, and the speed test result of the connected PC2 to the management APP program.
[0056] Step 213: The management APP program obtains the theoretical bandwidth of each segment according to the theoretical bandwidth opened by the main gateway, the networking method between the master and slaves, and the connection method of the downstream terminal devices, and then compares the actual speed test results of each segment reported by the main gateway. Each segment lists the actual speed test results and theoretical bandwidth respectively, and can determine which segment has bandwidth that does not meet the standard, thereby guiding the operator's operation and maintenance personnel to check the specific network, thereby helping customers improve the network.
[0057] Reference Figure 3 , Figure 3 This is a specific flow chart for testing network delay. The following takes testing network delay as an example to describe the specific implementation method of the network testing method.
[0058] Step 301: The management APP of the main gateway is installed on the mobile phone of the operator's operation and maintenance personnel. The mobile phone initiates the delay RTT test through the APP. The parameters include the operator's test server address xxxx Step 302: The main gateway receives the latency test command sent by the mobile phone APP, and first starts to pingx.xxx-n15 to the operator test server sent, where -n15 represents the number of test packets is 15. After the test is completed, RTT1 (RTT represents the round-trip delay) between the main gateway and the test server is obtained.
[0059] Step 303: The main gateway detects the sub-gateway of the FTTR network and pings 192.168.1.128-n15, where -n15 represents the number of test packets is 15 and 192.168.1.128 is the IP address of the sub-gateway. After the test is completed, the RTT2 (RTT represents the round-trip time) between the main gateway and the sub-gateway is obtained.
[0060] Step 304: The sub-gateway receives the latency test command sent by the main gateway, and pings 192.168.1.3-n15 to the PC2, where -n15 represents the number of test packets is 15 and 192.168.1.3 is the IP address of the PC2 under the sub-gateway. After the test is completed, RTT3 (RTT represents the round-trip time delay) between the sub-gateway and the PC2 is obtained.
[0061] Step 305: After completing the delay test on the downstream PC2, the sub-gateway reports the RTT3 test result to the main gateway.
[0062] Step 306: The main gateway pings 192.168.1.2-n15 to the downstream PC1, where -n15 represents the number of test packets is 15 and 192.168.1.2 is the IP address of the downstream PC1 of the main gateway. After the test is completed, RTT4 (RTT represents the round-trip time) between the main gateway and the downstream PC1 is obtained.
[0063] Step 303: The main gateway reports the above RTT1 with the test server, RTT2 with the sub-gateway, RTT4 with PC1, and RTT3 between the sub-gateway and PC2 to the mobile phone APP management program.
[0064] Step 308: The mobile phone APP management program displays the delay of each segment accordingly, and provides further positioning to the operation and maintenance personnel to see whether the speed measurement bandwidth does not meet the standard due to the delay.
[0065] The above is a description of the method embodiment of the present application. As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0066] Reference Figure 4 , shows a network test device provided by an embodiment of the present application, the device is used to test the network status of a networking structure composed of multiple sub-gateways, the device involves a main gateway, multiple sub-gateways and a test terminal; the test terminal is used to initiate a network test command; the network test command includes an IP address; The device comprises: A target test segment determination module 410, configured to respond to a network test command initiated by the test terminal, and the main gateway determines a target test segment according to the IP address; A first test result generating module 420 is configured to generate a first test instruction when the target test segment is from the main gateway to the sub-gateway, and send the first test instruction to the sub-gateway; the sub-gateway is configured to perform a data test according to the first test instruction to obtain a first test result, and feed the first test result back to the main gateway; or; a second test instruction generating module 430, configured to send the network test command to the sub-gateway when the target test segment is from the sub-gateway to the main gateway; the sub-gateway is configured to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; The second test result generating module 440 is used to perform data testing according to the second test instruction to obtain a second test result.
[0067] In one embodiment, it further includes: The third test result generating module is used to call the first virtual client to generate a third test instruction when the target test segment is from the main gateway to the test server, and send the third test instruction to the test server; the test server is used to call the third virtual server to perform data testing according to the third test instruction to obtain a third test result, and feed back the third test result to the main gateway.
[0068] a fourth test instruction generating module, configured to send the network test command to the first user terminal when the target test segment is from the first user terminal to the main gateway; the first user terminal is configured to call the third virtual client to generate a fourth test instruction according to the network test command, and send the fourth test instruction to the main gateway; The fourth test result generating module is used for the main gateway to call the second virtual server to perform data testing according to the fourth test instruction to obtain a fourth test result.
[0069] A fifth test result generating module is used to send the network test command to the sub-gateway when the target test segment is from the first user terminal to the main gateway; the sub-gateway is used to send the network test command to the second user terminal; the second user terminal is used to call the fourth virtual client to generate a fifth test instruction according to the network test command, and send the fifth test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the fifth test instruction to obtain a fifth test result, and feed back the fifth test result to the sub-gateway, and the sub-gateway is used to feed back the fifth test result to the main gateway.
[0070] Reference Figure 5 , shows a block diagram of a computer device provided in an embodiment of the present application. The computer device 12 is suitable for implementing the embodiment of the present invention, and may specifically include the following: The computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16). The computer device 12 may be a device attached to the bus.
[0071] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0072] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0073] System memory 28 may include computer system readable media in the form of volatile memory, such as RAM 30 (random access memory) and / or cache 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0074] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0075] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an I / O interface 22 (input / output interface). Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network (e.g., Internet)) through a network adapter 20. Figure 5 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0076] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, for example, implementing a network testing method based on the FTTR networking structure provided by any embodiment of the present invention.
[0077] That is, when the program is executed by the processor, it is implemented as follows: in response to the network test command initiated by the test terminal, the main gateway determines the target test segment according to the IP address; when the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction, and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform a data test according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway; or; when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; the main gateway performs a data test according to the second test instruction to obtain a second test result.
[0078] The computer device 12 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0079] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a network testing method based on an FTTR networking structure as provided in any embodiment of the present application is implemented.
[0080] That is, when the program is executed by the processor, it is implemented as follows: the computing node trains the initial model based on the training data set and determines the local training behavior data; the computing node determines the training trust value based on the local training behavior data; the computing node trains the initial model based on the training data set and the training trust value; wherein, when the initial model training is completed, the master node obtains the trained model from the slave node to aggregate and generate a global model, and sends the global model to the user terminal.
[0081] Computer storage media can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.
[0082] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0083] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0084] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network including a LAN or WAN, or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0085] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0086] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations constitute any such actual relationship or order. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or test terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or test terminal. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method, article or test terminal including the elements.
[0087] The network testing method and device based on the FTTR networking structure provided by the present application are introduced in detail above. The principle and implementation mode of the present application are explained by using specific examples in this article. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for technicians in this field, according to the idea of the present application, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A network testing method based on FTTR networking structure, the method is used to test the network status of a networking structure composed of multiple sub-gateways, characterized in that: The method involves a main gateway, multiple sub-gateways and a test terminal; the test terminal is used to initiate a network test command; The network test command includes an IP address; The method comprises: In response to a network test command initiated by the test terminal, the main gateway determines a target test segment according to the IP address; When the target test segment is from the main gateway to the sub-gateway, the main gateway generates a first test instruction and sends the first test instruction to the sub-gateway; the sub-gateway is used to perform a data test according to the first test instruction to obtain a first test result, and feed the first test result back to the main gateway; or; when the target test segment is from the sub-gateway to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to generate a second test instruction according to the network test command, and send the second test instruction to the main gateway; The main gateway performs a data test according to the second test instruction to obtain a second test result.
2. The method according to claim 1, characterized in that The main gateway is preset with a first virtual client, and the sub-gateway is preset with a first virtual server; The step of the main gateway generating a first test instruction and sending the first test instruction to the sub-gateway includes: The main gateway calls the first virtual client to generate a first test instruction; The main gateway sends the first test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the first test instruction to obtain a first test result, and feed back the first test result to the main gateway.
3. The method according to claim 1, characterized in that The sub-gateway is preset with a second virtual client; the step of the main gateway sending the network test command to the sub-gateway includes: The main gateway sends the network test command to the sub-gateway; the sub-gateway is used to call the second virtual client to generate a second test instruction according to the network test command, and feed back the second test instruction to the main gateway.
4. The method according to claim 1, characterized in that: The main gateway is preset with a second virtual server; the step of the main gateway performing a data test according to the second test instruction to obtain a second test result includes: The main gateway calls the second virtual server to perform data testing according to the second test instruction to obtain a second test result.
5. The method according to claim 1, characterized in that The method further relates to a test server, wherein the test server is preset with a third virtual server, and the main gateway is preset with a first virtual client; After the step of, in response to the network test command initiated by the test terminal, the main gateway determining the target test segment according to the IP address, the step further includes: When the target test segment is from the main gateway to the test server, the main gateway calls the first virtual client to generate a third test instruction, and sends the third test instruction to the test server; the test server is used to call the third virtual server to perform data testing according to the third test instruction to obtain a third test result, and feed back the third test result to the main gateway.
6. The method according to claim 1, characterized in that The method further involves a first user terminal, the first user terminal is in communication connection with the main gateway, the first user terminal is preset with a third virtual client, and the main gateway is preset with a second virtual server; After the step of, in response to the network test command initiated by the test terminal, the main gateway determining the target test segment according to the IP address, the step further includes: When the target test segment is from the first user terminal to the main gateway, the main gateway sends the network test command to the first user terminal; the first user terminal is used to call the third virtual client to generate a fourth test instruction according to the network test command, and send the fourth test instruction to the main gateway; The main gateway calls the second virtual server to perform data testing according to the fourth test instruction to obtain a fourth test result.
7. The method according to claim 1, characterized in that The method further involves a second user terminal, the second user terminal is communicatively connected to the sub-gateway, the second user terminal is preset with a fourth virtual client, and the sub-gateway is preset with a first virtual server; After the step of, in response to the network test command initiated by the test terminal, the main gateway determining the target test segment according to the IP address, the step further includes: When the target test segment is from the first user terminal to the main gateway, the main gateway sends the network test command to the sub-gateway; the sub-gateway is used to send the network test command to the second user terminal; the second user terminal is used to call the fourth virtual client to generate a fifth test instruction according to the network test command, and send the fifth test instruction to the sub-gateway; the sub-gateway is used to call the first virtual server to perform data testing according to the fifth test instruction to obtain a fifth test result, and feed back the fifth test result to the sub-gateway, and the sub-gateway is used to feed back the fifth test result to the main gateway.
8. A network testing device, characterized in that: The device is used to test the network status of a networking structure composed of multiple sub-gateways, and the device involves a main gateway, multiple sub-gateways and a test terminal; the test terminal is used to initiate a network test command; The network test command includes an IP address; The device comprises: A target test segment determination module, configured to respond to a network test command initiated by the test terminal, wherein the main gateway determines a target test segment according to the IP address; A first test result generating module, configured to generate a first test instruction when the target test segment is from the main gateway to the sub-gateway, and send the first test instruction to the sub-gateway; the sub-gateway is configured to perform a data test according to the first test instruction to obtain a first test result, and feed the first test result back to the main gateway; or; a second test instruction generating module, used for sending the network test command to the sub-gateway when the target test segment is from the sub-gateway to the main gateway; the sub-gateway is used for generating a second test instruction according to the network test command, and sending the second test instruction to the main gateway; The second test result generating module is used to perform data testing according to the second test instruction to obtain a second test result.
9. A computer device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Heterogeneous network simulation message service end-to-end testing method and system
CN102256292A
Network test method, device, system and equipment for FTTR system
CN118473523A
All-optical network service testing method and apparatus, computer device and readable medium
WO2023142907A1
Cited By
Fault detection method, device, system and equipment, storage medium and program product
CN121000579A