Optical network unit equipment test method and device in FTTR, terminal and storage medium
By designing the optical network unit equipment test system in FTTR, the problem of the stability testing of existing optical network unit equipment is solved, and efficient and accurate automated testing is achieved, enhancing the reliability of the test results.
Patent Information
- Application Number
- CN202510232062.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The stability testing of existing optical network unit equipment requires manual execution by technicians, which is time-consuming and labor-intensive, and is prone to introduce human errors, affecting the reliability of the test results.
A test system for optical network unit equipment in FTTR is designed, including a first module and a second module, for obtaining the status information of the optical network unit equipment and performing a restart operation, confirming the normal operation status of the dynamic host configuration protocol server, and generating target test results.
Through automated testing systems, the efficiency and accuracy of optical network unit equipment testing can be improved, human errors can be reduced, and the reliability of test results can be enhanced.
Smart Images

Figure CN119945549A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of optical fiber communication technology, and in particular to a method, device, terminal and storage medium for testing optical network unit equipment in FTTR. Background Art
[0002] In the process of management and maintenance of optical network unit equipment, namely ONU, operators of existing networks often involve optical network unit equipment cutover, remote upgrade, remote restart, and power-off restart. If there are defects in the optical network unit equipment, it is easy to cause abnormalities, so batch equipment stability testing is required to detect problems in advance. Traditional optical network unit equipment stability testing requires technicians to remotely log in to the optical line terminal equipment, namely OLT (Optical Line Terminal), restart the specific optical network unit equipment under the interface of PON, namely passive optical network, by executing commands, and wait for a period of time (such as 5 minutes) to observe whether the optical network unit equipment is online normally, and at the same time detect whether there is a long light emission or burst light phenomenon, which may cause other optical network unit equipment to drop offline. It is also necessary to check whether the network address can be obtained normally through the optical network unit equipment access terminal to confirm the DHCP SERVER of the optical network unit equipment, that is, the dynamic host configuration protocol server corresponding to the optical network unit equipment. This process needs to be repeated many times (such as more than 2000 times) to ensure the accuracy and comprehensiveness of the test. It is time-consuming and laborious for technicians to manually perform such tests, and it is easy to introduce human errors, affecting the reliability of the test results. Summary of the invention
[0003] The main purpose of this application is to provide a method, device, terminal and storage medium for testing optical network unit equipment in FTTR, aiming to implement testing of optical network unit equipment through a designed optical network unit equipment testing system in FTTR to improve testing efficiency and accuracy.
[0004] To achieve the above-mentioned purpose, the present application provides an optical network unit device testing method in an FTTR, which is applied to an optical network unit device testing system in an FTTR, wherein the optical network unit device testing system in the FTTR comprises a first module and a second module, wherein the first module is used to obtain status information of each optical network unit device and to perform a restart operation according to an interface corresponding to the optical network unit device and an identification code corresponding to the optical network unit device, and the second module is used to confirm whether a dynamic host configuration protocol server corresponding to the optical network unit device is in a normal operating state, wherein the optical network unit device comprises a companion optical network unit device and a main optical network unit device; The method comprises: In response to the restart instruction sent by the optical line terminal device, restart the optical network unit device, and obtain the device status information of the accompanying optical network unit device; Obtaining device status information of the main photometric network unit device; Obtain server status information of a dynamic host configuration protocol server corresponding to the optical network unit device; A target test result is generated based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
[0005] Specifically, before the optical network unit device is restarted in response to the restart instruction sent by the optical line terminal device, and the device status information of the accompanying optical network unit device is obtained, the method further includes: Based on a preset configuration file, determine the optical network unit device, the logical optical identifier of the optical network unit device, the number of restarts corresponding to the optical network unit device, the restart waiting time corresponding to the optical network unit device, the main optical network unit device, and the companion optical network unit device from the optical network unit device to be tested in the passive optical network; Establishing a connection with the optical line terminal device through a first network card of a control terminal corresponding to the passive optical network and a preset communication protocol; In response to the restart instruction, query and obtain device status information of the optical network unit device to be tested in the passive optical network; The device status information of the optical network unit device to be tested is saved in a first preset text file.
[0006] Specifically, it is characterized in that the acquiring the device status information of the companion optical network unit device comprises: After restarting the optical network unit device, waiting for the restart waiting time, and restarting the optical network unit device; Detecting whether the accompanying optical network unit device is in an offline state, if the accompanying optical network unit device is not in an offline state, determining that the accompanying optical network unit device does not have a long light emission problem or a burst light problem; if the accompanying optical network unit device is in an offline state, determining that the accompanying optical network unit device has a light receiving and transmitting problem; The device status information of the companion optical network unit device having the problem of receiving and transmitting light is saved to a second preset text file, wherein the second preset text file is used to characterize the device status information of the companion optical network unit device.
[0007] Specifically, it is characterized in that the acquiring the device status information of the main photometric network unit device comprises: Acquire online status information of the main light measuring network unit device, wherein the online status information is used to represent the online time of the main light measuring network unit device and the connection status of the main light measuring network unit device; Reading the optical fiber transmit and receive optical power data in the first preset text file; Based on the comparison result between the current optical fiber receiving and transmitting optical power data corresponding to the main optical measurement network unit device and the optical fiber receiving and transmitting optical power data in the first preset text file, the device status information of the main optical measurement network unit device is obtained.
[0008] Specifically, it is characterized in that the acquiring the server status information of the dynamic host configuration protocol server corresponding to the optical network unit device includes: Establishing a connection with a switch corresponding to the passive optical network through a second network card of a control terminal corresponding to the passive optical network; Based on the configuration file, performing an address resolution protocol detection on the optical network unit device to obtain an address detection result; Based on the address detection result, server status information of the dynamic host configuration protocol server is obtained.
[0009] Specifically, it is characterized in that, based on the configuration file, performing address resolution protocol detection on the optical network unit device to obtain the address detection result includes: An address resolution protocol is performed on a preset network address within a management network segment corresponding to the optical network unit device to obtain an address detection result, wherein the address detection result does not include the management address corresponding to the optical network unit device or the network address of the control terminal corresponding to the passive optical network.
[0010] Specifically, obtaining the server status information of the dynamic host configuration protocol server based on the address detection result includes: If the number of active network addresses in the address detection result is the same as the number of terminals hanging under the optical network unit device, it is determined that the dynamic host configuration protocol server is in a normal working state; if the number of active network addresses in the address detection result is different from the number of terminals hanging under the optical network unit device, it is determined that the dynamic host configuration protocol server is not in a normal working state.
[0011] To achieve the above-mentioned purpose, the present application also provides an optical network unit device testing device in an FTTR, which is applied to an optical network unit device testing system in an FTTR. The optical network unit device testing system in the FTTR includes a first module and a second module. The first module is used to obtain status information of each optical network unit device and to perform a restart operation according to an interface corresponding to the optical network unit device and an identification code corresponding to the optical network unit device. The second module is used to confirm whether a dynamic host configuration protocol server corresponding to the optical network unit device is in a normal operating state. The optical network unit device includes a companion optical network unit device and a main optical network unit device. The device includes: The first unit is used to restart the optical network unit device in response to the restart instruction sent by the optical line terminal device, and obtain the device status information of the accompanying optical network unit device; The second unit is used to obtain device status information of the main photometric network unit device; The third unit is used to obtain server status information of the dynamic host configuration protocol server corresponding to the optical network unit device; The fourth unit is used to generate a target test result based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
[0012] To achieve the above-mentioned purpose, the present application also provides a terminal, including a memory storing multiple instructions; the processor loads instructions from the memory to execute the steps in any one of the methods provided in the present application.
[0013] To achieve the above objectives, the present application also provides a storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any method provided in the present application.
[0014] The present application provides a method, device, terminal and storage medium for testing an optical network unit device in an FTTR. The method can firstly respond to a restart instruction sent by the optical line terminal device, restart the optical network unit device, and obtain the device status information of the companion optical network unit device; then, obtain the device status information of the main optical network unit device; then, obtain the server status information of the dynamic host configuration protocol server corresponding to the optical network unit device; finally, based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device and the server status information of the dynamic host configuration protocol server, generate a target test result, thereby realizing the test of the optical network unit device and improving the test efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a process for a method provided in an embodiment of the present application; Figure 2 The bottom layer processing diagram of the optical network unit device test system in the FTTR provided in the embodiment of the present application; Figure 3 An architecture network diagram of an optical network unit device test system in an FTTR provided in an embodiment of the present application; Figure 4 A test process diagram of an optical network unit device test system in an FTTR provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of the device provided in the embodiment of the present application; Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0017] Since the traditional stability test of optical network unit equipment needs to check whether the network address can be obtained normally through the optical network unit equipment access terminal to confirm the DHCP SERVER of the optical network unit equipment, that is, the dynamic host configuration protocol server corresponding to the optical network unit equipment, this process needs to be repeated many times (such as more than 2000 times) to ensure the accuracy and comprehensiveness of the test. It is time-consuming and laborious for technicians to manually perform such tests, and it is easy to introduce human errors, affecting the reliability of the test results.
[0018] Therefore, the embodiments of the present application provide a method, apparatus, terminal and storage medium for testing optical network unit equipment in FTTR to solve practical technical problems.
[0019] In some embodiments, the device may be specifically integrated into an electronic device, which may be a terminal, a server or other device.
[0020] In some embodiments, the server may also be implemented in the form of a terminal.
[0021] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0022] The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0023] An embodiment of the present application provides a method for testing an optical network unit device in an FTTR. The method can implement testing of the optical network unit device through a designed optical network unit device testing system in the FTTR, thereby improving testing efficiency and accuracy.
[0024] A method for testing an optical network unit device in an FTTR is applied to an optical network unit device testing system in the FTTR. The optical network unit device testing system in the FTTR comprises a first module and a second module. The first module is used to obtain status information of each optical network unit device and to perform a restart operation according to an interface corresponding to the optical network unit device and an identification code corresponding to the optical network unit device. The second module is used to confirm whether a dynamic host configuration protocol server corresponding to the optical network unit device is in a normal operating state. The optical network unit device comprises a companion optical network unit device and a main optical network unit device.
[0025] In some embodiments, an optical network unit device, namely an Optical Network Unit device or ONU device, is a user-side device of a fiber-optic access network. An ONU device is a device used to receive and process optical signals and convert them into electrical signals that can be understood by user devices. It is a terminal device in a fiber-optic communication system and a bridge between an optical line terminal (OLT) and user terminal devices. It plays a key role in broadband access networks such as fiber to the home (FTTH) and fiber to the building (FTTB).
[0026] Dynamic Host Configuration Protocol Server (DHCP SERVER) is a network service program. The core function of a DHCP server is to dynamically assign IP addresses to client devices in the network. When a client device (such as a computer, smartphone, tablet, printer, etc.) connects to the network, it sends a request to the DHCP server, and the DHCP server selects an available IP address from its address pool and assigns it to the client. In addition to assigning IP addresses, the DHCP server also provides other network configuration information to the client, including subnet mask, default gateway, DNS (Domain Name System) server address, domain name suffix, etc., to ensure that the client device can communicate with the network and access network resources normally.
[0027] Specifically, Figure 2 , the optical network unit equipment test system in the FTTR includes a set of automated scripts specifically for ONU stability testing, which can automatically log in to the OLT device. After restarting the ONU, the script automatically waits for a specified time (such as 5 minutes), and then checks whether the ONU is successfully online. The script uses the built-in optical signal detection algorithm to monitor in real time whether there is a long light emission or burst light phenomenon, and whether these phenomena have adverse effects on other ONUs. The script confirms the active IP by sending an ARP detection message on the ONU LAN, and determines whether the DHCP SERVER of the ONU works normally based on the number of active IPs. During the test, all key data (such as the number of ONU restarts, online status, online time, optical signal status, offline reasons, etc.) are automatically recorded. After the test, a detailed test report is generated. If an abnormality is detected, the script immediately issues an alarm and provides possible fault location information. According to the test requirements, the script can customize the number of executions and automatically perform multiple (such as 2000) cycle tests. The test results are statistically analyzed to evaluate the stability and reliability of the ONU.
[0028] In some embodiments, Figure 3 As shown, the optical network unit equipment test system in the FTTR adopts Python as the programming language, and uses its powerful network programming and automated testing capabilities to design and develop an automated system. The optical network unit equipment test system in the FTTR is mainly composed of two functional modules: The check_onu_status module, i.e., the first module, is mainly used to read and record the status information of the ONU on the OLT, and perform a restart operation according to the interface where the ONU is located and the ONU ID: (1) Define a login_olt function, read the OLT account information, the loid list of each ONU registered, the number of tests, the ONU ID of the ONU that needs to be restarted, the ONU ID of the accompanying test ONU, and other information through the json module, and create a telnet object through the telnetlib library to log in to the OLT. To ensure successful login to the OLT as much as possible, set a timeout of 1 minute and try to log in to the OLT multiple times within the timeout.
[0029] (2) Define a save_onu_result function to append and record the onu status.
[0030] (3) Define an arrange_onu_info function, and return the queried onu information in dictionary form through the regular expression of the re module. The return form is as follows: {"loid":"xxx","onu_online":True,"onu_online_time":"2024-12-14_12:12:12","receive_db":"-20", "send_db":"-18","last_down_cause":"reset","rogue_onu":"no"} (4) Define a reset_onu function, call login_olt to establish a connection with OLT through the telnet protocol, enter the username and password to log in to OLT, and after successful login, traverse the read loid list, query the interface and ONU ID where the ONU is located respectively, execute the command to query all ONU status information under the PON port, read the ONU online status, online time, receiving and transmitting information, and offline reason through the arrange_onu_info function, call the save_onu_result function to save the information, and then enter the interface to execute the restart command and wait for the ONU to restart. The waiting time is obtained by reading the read_config function.
[0031] check_subdevice_status, the second module, mainly builds and sends ARP messages in the LAN, checks the number of ARP messages received in response, and confirms whether the ONU DHCP SERVER is normal: (1) Define a discover_devices function to broadcast an ARP request to the LAN to discover active IP addresses and MAC addresses. The ARP layer pdst is the IP address range of the network (for example, '192.168.1.0 / 24'), and the Ethernet frame Ether layer destination MAC address is the ff:ff:ff:ff:ff:ff broadcast address. The ARP request packet and Ethernet frame combination ether_frame / arp_request is sent to the broadcast through the srp in the scapy.sendrecv module and waits for a response. The response contains all the responding ARP packets. Each response includes an IP address (received.psrc) and a MAC address (received.hwsrc). This information is saved in the devices dictionary, with the key being the IP address and the value being the MAC address. The number of terminals attached to the ONU is obtained based on the length of the dictionary.
[0032] (2) Define a test execution entry, run_main, call the reset_onu function in the check_onu_status module, record all ONU status information under the PON port and execute the restart ONU command, then call the discover_devices function to detect the number of terminal accesses to the ONU. If there are multiple ONUs, the run_main function is traversed and executed according to the loid list in the json configuration file. According to the configuration information in the json configuration file, the test results are obtained after the execution is completed.
[0033] In some embodiments, Figure 2 As shown, the test environment of the optical network unit equipment test system in the FTTR can be configured and constructed as follows: Network segment configuration: To ensure the uniqueness of the test environment and avoid IP address conflicts, each ONU needs to be configured with a different IP network segment.
[0034] Control terminal network card configuration: First network card: dedicated to connecting to OLT equipment to ensure unimpeded communication with OLT.
[0035] Second network card: used to connect to the switch to facilitate management and communication of ONUs in the network.
[0036] IP address setting: For each ONU's IP network segment, the control PC network card 2 needs to configure the second IP address of the network segment as its own static IP. For example, if the ONU's IP network segment is 192.168.1.0 / 24, the control PC should add the IP address 192.168.1.2.
[0037] Automated test system deployment: Use the pyinstaller tool to package the code file into an .exe executable file, and then deploy it to the specified control PC.
[0038] Companion test ONU configuration: Under the same test PON port of OLT, several companion test ONU devices need to be configured for comparative testing.
[0039] Test networking equipment configuration: (1) Control terminal: Contains automated test scripts and necessary testing tools.
[0040] Equipped with two network cards, the first network card is used to connect to the OLT device and operate the OLT, and the second network card is used for the switch to communicate with the ONU.
[0041] (2)OLT equipment: The optical line terminal of the passive optical network is responsible for managing and controlling the ONU devices under the PON port.
[0042] Provides Telnet or other remote login protocol interfaces for control PC access.
[0043] (3)ONU: ONU (Optical Network Unit): Optical Network Unit is a device in the optical access network system, usually located at the user end.
[0044] (4) Switch: The second-layer switch is responsible for the connection and communication between the ONU and the control PC.
[0045] (5) User terminal: It can be a PC, set-top box, camera, etc. During the test, the terminal is set to obtain the IP address in DHCP mode.
[0046] like Figure 1 and Figure 4 As shown, the specific process of the method can be as follows: S110: Responding to a restart instruction sent by the optical line terminal device, restarting the optical network unit device, and obtaining device status information of the companion optical network unit device.
[0047] In some embodiments, before the step of restarting the optical network unit device in response to the restart instruction sent by the optical line terminal device and obtaining the device status information of the companion optical network unit device, the method further includes steps R1 to R4 as shown below: R1. Based on a preset configuration file, determine the optical network unit device, the logical optical identifier of the optical network unit device, the number of restarts corresponding to the optical network unit device, the restart waiting time corresponding to the optical network unit device, the main measuring optical network unit device and the companion measuring optical network unit device from the optical network unit device to be tested in the passive optical network.
[0048] Specifically, according to the test requirements, the ONU serial number, LOID, restart times, restart waiting time, and the serial number of the accompanying test device, etc. to be restarted can be set through the config.json configuration file, that is, the preset configuration file.
[0049] R2. Establish a connection with the optical line terminal device through the first network card of the control terminal corresponding to the passive optical network and a preset communication protocol.
[0050] Specifically, a connection is established with the OLT by using the first network card of the control terminal through the Telnet protocol, ie, the preset communication protocol.
[0051] R3. In response to the restart instruction, query and obtain device status information of the optical network unit device to be tested in the passive optical network.
[0052] Specifically, the OLT command, namely the restart instruction, is executed to query the status information of all ONUs under the current PON port.
[0053] R4. Save the device status information of the optical network unit device to be tested to a first preset text file.
[0054] Specifically, the online status, online time, and light and light transmission of all ONU devices under the PON port are recorded, and this information is saved in the init_result.csv file, that is, the first preset text file.
[0055] In some embodiments, the step of obtaining the device status information of the companion optical network unit device includes the following steps S111 to S113: S111 . After restarting the optical network unit device, wait for the restart waiting time, and restart the optical network unit device.
[0056] S112, detecting whether the accompanying optical network unit device is in an offline state. If the accompanying optical network unit device is not in an offline state, determining that the accompanying optical network unit device does not have a long light emission problem or a burst light problem; if the accompanying optical network unit device is in an offline state, determining that the accompanying optical network unit device has a light receiving and transmitting problem.
[0057] Specifically, you can wait for 5 minutes and execute the OLT command again to check whether the companion ONU is offline. If the companion ONU is not offline, it is determined that there is no long light and burst light problem; otherwise, it is considered that there is a light transmission and receiving problem.
[0058] S113: Save the device status information of the companion optical network unit device having the light receiving and transmitting problem to a second preset text file, wherein the second preset text file is used to represent the device status information of the companion optical network unit device.
[0059] In some embodiments, the serial number of the ONU with problems may be recorded and output to a result.csv file, that is, the second preset text file.
[0060] S120: Obtain device status information of the main photometric network unit device.
[0061] In some embodiments, the step of obtaining the device status information of the main photometric network unit device includes the following steps S121 to S123: S121. Obtain online status information of the main light metering network unit device, wherein the online status information is used to represent the online time of the main light metering network unit device and the connection status of the main light metering network unit device.
[0062] S122: Read the optical fiber transmit and receive optical power data in the first preset text file.
[0063] S123. Obtain device status information of the main optical measurement network unit device based on a comparison result between the current optical fiber receiving and transmitting optical power data corresponding to the main optical measurement network unit device and the optical fiber receiving and transmitting optical power data in the first preset text file.
[0064] Specifically, check whether the online time and status of the ONU are normal. Read the optical fiber transmit and receive optical power data before the restart (refer to init_result.csv). Compare the current optical fiber transmit and receive optical power with the data before the restart. If the difference is within ±0.5dB, it is determined that the transmit and receive optical power is normal; otherwise, it is considered that there is a problem. According to the test results, record the results in the established format and output them to the result.csv file for subsequent analysis.
[0065] S130: Obtain server status information of a dynamic host configuration protocol server corresponding to the optical network unit device.
[0066] In some embodiments, the obtaining of server status information of a dynamic host configuration protocol server corresponding to the optical network unit device includes the following steps S131 to S133: S131. Establish a connection with a switch corresponding to the passive optical network through a second network card of a control terminal corresponding to the passive optical network.
[0067] S132: Based on the configuration file, perform an address resolution protocol detection on the optical network unit device to obtain an address detection result.
[0068] In some embodiments, performing address resolution protocol detection on the optical network unit device based on the configuration file to obtain an address detection result includes the following specific implementation process: An address resolution protocol is performed on a preset network address within a management network segment corresponding to the optical network unit device to obtain an address detection result, wherein the address detection result does not include the management address corresponding to the optical network unit device or the network address of the control terminal corresponding to the passive optical network.
[0069] S134. Obtain server status information of the dynamic host configuration protocol server based on the address detection result.
[0070] In some embodiments, obtaining the server status information of the dynamic host configuration protocol server based on the address detection result includes the following specific implementation process: If the number of active network addresses in the address detection result is the same as the number of terminals hanging under the optical network unit device, it is determined that the dynamic host configuration protocol server is in a normal working state; if the number of active network addresses in the address detection result is different from the number of terminals hanging under the optical network unit device, it is determined that the dynamic host configuration protocol server is not in a normal working state.
[0071] Specifically, the second network card of the control terminal is used to establish a connection with the switch. For each ONU, perform arp detection one by one according to its management network segment configuration in config.json. During the detection process, the ONU management address and the IP address of the control PC are excluded, and only the 3rd IP to the 255th IP in the management network segment are detected by arp. If the number of active IP addresses detected by arp is consistent with the number of terminals under the ONU, it is determined that the ONU DHCP SERVER is working normally; otherwise, it is determined that the ONU DHCP SERVER is not working properly.
[0072] In some embodiments, the server status information may be output to a result.csv file.
[0073] S140: Generate a target test result based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
[0074] In some embodiments, whether to continue executing the test process is determined according to the number of restarts set by the user. Finally, based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server, a test report is generated in a specific format. The report content should cover all test process data, test analysis and results. The test report is used to characterize the target test result.
[0075] The embodiment of the present application first responds to the restart instruction sent by the optical line terminal device, restarts the optical network unit device, and obtains the device status information of the companion optical network unit device; then, obtains the device status information of the main measurement optical network unit device; then, obtains the server status information of the dynamic host configuration protocol server corresponding to the optical network unit device; finally, based on the device status information of the companion measurement optical network unit device, the device status information of the main measurement optical network unit device and the server status information of the dynamic host configuration protocol server, generates the target test result.
[0076] In summary, the present application provides a method for testing an optical network unit device in an FTTR, and implements testing of the optical network unit device through a designed optical network unit device testing system in an FTTR, thereby improving testing efficiency and accuracy.
[0077] In order to better implement the above method, the embodiment of the present application also provides an optical network unit device test device in FTTR, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0078] For example, in this embodiment, the method of the embodiment of the present application is described in detail by taking the optical network unit equipment test device in the FTTR as an example in which the optical network unit equipment test device is specifically integrated in the terminal.
[0079] For example, Figure 5As shown, the optical network unit device testing device 500 in the FTTR may include a first unit 501, a second unit 502, a third unit 503 and a fourth unit 504, which are applied to the optical network unit device testing system in the FTTR. The optical network unit device testing system in the FTTR includes a first module and a second module. The first module is used to obtain the status information of each optical network unit device and to perform a restart operation according to the interface corresponding to the optical network unit device and the identification code corresponding to the optical network unit device. The second module is used to confirm whether the dynamic host configuration protocol server corresponding to the optical network unit device is in a normal operating state. The optical network unit device includes a companion optical network unit device and a main optical network unit device. The device includes: The first unit 501 is used to restart the optical network unit device in response to the restart instruction sent by the optical line terminal device, and obtain the device status information of the accompanying optical network unit device; The second unit 502 is used to obtain device status information of the main optical measurement network unit device; The third unit 503 is used to obtain server status information of the dynamic host configuration protocol server corresponding to the optical network unit device; The fourth unit 504 is configured to generate a target test result based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
[0080] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0081] It can be seen from the above that the embodiments of the present application can implement the test of the optical network unit device through the designed optical network unit device test system in the FTTR, thereby improving the test efficiency and accuracy.
[0082] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.
[0083] In some embodiments, the product processing device may also be integrated into multiple electronic devices. For example, the product processing device may be integrated into multiple servers, and the optical network unit device testing method in the FTTR of the present application may be implemented by multiple servers.
[0084] In this embodiment, the electronic device of this embodiment is a terminal as an example for detailed description, for example, Figure 6 As shown, it shows a schematic diagram of the structure of the terminal 600 involved in the embodiment of the present application, specifically: The terminal 600 may include one or more processors 601 of processing cores, one or more storage media 602, a power supply 603, an input module 604, and a communication module 605. Those skilled in the art will appreciate that Figure 6 The structure of the terminal 600 shown in the figure does not constitute a limitation on the terminal 600, and the terminal 600 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. The processor 601 is the control center of the terminal 600. It uses various interfaces and lines to connect various parts of the entire terminal 600. It executes various functions of the terminal 600 and processes data by running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, so as to monitor the terminal 600 as a whole. In some embodiments, the processor 601 may include one or more processing cores; in some embodiments, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.
[0085] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal 600, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0086] The terminal 600 also includes a power supply 603 for supplying power to various components. In some embodiments, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 603 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0087] The terminal 600 may further include an input module 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0088] The terminal 600 may also include a communication module 605. In some embodiments, the communication module 605 may include a wireless module. The terminal 600 may perform short-range wireless transmission through the wireless module of the communication module 605, thereby providing the user with wireless broadband Internet access. For example, the communication module 605 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0089] Although not shown, the terminal 600 may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 601 in the terminal 600 will load the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 will run the applications stored in the memory 602, thereby realizing various functions, as follows: In response to the restart instruction sent by the optical line terminal device, restart the optical network unit device, and obtain the device status information of the accompanying optical network unit device; Obtaining device status information of the main photometric network unit device; Obtain server status information of a dynamic host configuration protocol server corresponding to the optical network unit device; A target test result is generated based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
[0090] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0091] It can be seen from the above that the embodiments of the present application can improve the testing efficiency and accuracy by implementing the testing of optical network unit devices.
[0092] A person skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a storage medium and loaded and executed by a processor.
[0093] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the optical network unit device testing methods in FTTR provided in the embodiments of the present application. For example, the instructions can execute the following steps: In response to the restart instruction sent by the optical line terminal device, restart the optical network unit device, and obtain the device status information of the accompanying optical network unit device; Obtaining device status information of the main photometric network unit device; Obtain server status information of a dynamic host configuration protocol server corresponding to the optical network unit device; A target test result is generated based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
[0094] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0095] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations provided in the above embodiments.
[0096] Since the instructions stored in the storage medium can execute the steps in any one of the optical network unit device testing methods in the FTTR provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the optical network unit device testing methods in the FTTR provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.
[0097] The above is a detailed introduction to the optical network unit equipment testing method, device, terminal and storage medium in the FTTR provided by the embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for testing an optical network unit device in an FTTR, characterized in that: An optical network unit device test system applied to an FTTR, the optical network unit device test system in the FTTR comprising a first module and a second module, the first module being used to obtain status information of each optical network unit device and to perform a restart operation according to an interface corresponding to the optical network unit device and an identification code corresponding to the optical network unit device, the second module being used to confirm whether a dynamic host configuration protocol server corresponding to the optical network unit device is in a normal operating state, the optical network unit device comprising a companion optical network unit device and a main optical network unit device; The method comprises: In response to the restart instruction sent by the optical line terminal device, restart the optical network unit device, and obtain the device status information of the accompanying optical network unit device; Obtaining device status information of the main photometric network unit device; Obtain server status information of a dynamic host configuration protocol server corresponding to the optical network unit device; A target test result is generated based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
2. The method according to claim 1, characterized in that Before the step of restarting the optical network unit device in response to the restart instruction sent by the optical line terminal device and acquiring the device status information of the accompanying optical network unit device, the method further comprises: Based on a preset configuration file, determine the optical network unit device, the logical optical identifier of the optical network unit device, the number of restarts corresponding to the optical network unit device, the restart waiting time corresponding to the optical network unit device, the main optical network unit device, and the companion optical network unit device from the optical network unit device to be tested in the passive optical network; Establishing a connection with the optical line terminal device through a first network card of a control terminal corresponding to the passive optical network and a preset communication protocol; In response to the restart instruction, query and obtain device status information of the optical network unit device to be tested in the passive optical network; The device status information of the optical network unit device to be tested is saved in a first preset text file.
3. The method according to claim 2, characterized in that The obtaining of device status information of the companion optical network unit device includes: After restarting the optical network unit device, waiting for the restart waiting time, and restarting the optical network unit device; Detecting whether the accompanying optical network unit device is in an offline state, if the accompanying optical network unit device is not in an offline state, determining that the accompanying optical network unit device does not have a long light emission problem or a burst light problem; if the accompanying optical network unit device is in an offline state, determining that the accompanying optical network unit device has a light receiving and transmitting problem; The device status information of the companion optical network unit device having the problem of receiving and transmitting light is saved to a second preset text file, wherein the second preset text file is used to characterize the device status information of the companion optical network unit device.
4. The method according to claim 2, characterized in that The obtaining of device status information of the main photometric network unit device includes: Acquire online status information of the main light measuring network unit device, wherein the online status information is used to represent the online time of the main light measuring network unit device and the connection status of the main light measuring network unit device; Reading the optical fiber transmit and receive optical power data in the first preset text file; Based on the comparison result between the current optical fiber receiving and transmitting optical power data corresponding to the main optical measurement network unit device and the optical fiber receiving and transmitting optical power data in the first preset text file, the device status information of the main optical measurement network unit device is obtained.
5. The method according to claim 2, characterized in that The obtaining of server status information of a dynamic host configuration protocol server corresponding to the optical network unit device includes: Establishing a connection with a switch corresponding to the passive optical network through a second network card of a control terminal corresponding to the passive optical network; Based on the configuration file, performing an address resolution protocol detection on the optical network unit device to obtain an address detection result; Based on the address detection result, server status information of the dynamic host configuration protocol server is obtained.
6. The method according to claim 5, characterized in that The performing address resolution protocol detection on the optical network unit device based on the configuration file to obtain an address detection result includes: An address resolution protocol is performed on a preset network address within a management network segment corresponding to the optical network unit device to obtain an address detection result, wherein the address detection result does not include the management address corresponding to the optical network unit device or the network address of the control terminal corresponding to the passive optical network.
7. The method according to claim 5, characterized in that The obtaining of server status information of the dynamic host configuration protocol server based on the address detection result includes: If the number of active network addresses in the address detection result is the same as the number of terminals hanging under the optical network unit device, it is determined that the dynamic host configuration protocol server is in a normal working state; if the number of active network addresses in the address detection result is different from the number of terminals hanging under the optical network unit device, it is determined that the dynamic host configuration protocol server is not in a normal working state.
8. An optical network unit equipment test device in FTTR, characterized in that: An optical network unit device test system applied to an FTTR, the optical network unit device test system in the FTTR comprises a first module and a second module, the first module is used to obtain status information of each optical network unit device and to perform a restart operation according to an interface corresponding to the optical network unit device and an identification code corresponding to the optical network unit device, the second module is used to confirm whether a dynamic host configuration protocol server corresponding to the optical network unit device is in a normal operating state, the optical network unit device comprises a companion optical network unit device and a main optical network unit device, and the device comprises: The first unit is used to restart the optical network unit device in response to the restart instruction sent by the optical line terminal device, and obtain the device status information of the accompanying optical network unit device; The second unit is used to obtain device status information of the main photometric network unit device; The third unit is used to obtain server status information of the dynamic host configuration protocol server corresponding to the optical network unit device; The fourth unit is used to generate a target test result based on the device status information of the companion optical network unit device, the device status information of the main optical network unit device, and the server status information of the dynamic host configuration protocol server.
9. A terminal, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the method as claimed in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute the steps in the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Fault detection debugging method of passive optical network system and communication message device
CN101047443A
xPON comprehensive test instrument for detecting fiber optic access network and test method
CN104333416A
Abnormal PON terminal detection method and device
CN106303763A
Exception message capturing method for optical network terminal and optical network terminal
CN106982092A
Link state detection method and system
CN107547129A