PON-based government and enterprise gateway testing method, device, equipment and medium
By controlling the on-hook status and voice interaction operation of the serial phone in the PON gateway device, the interaction process record data is obtained for abnormal analysis, which solves the problem of low reliability of voice service testing in the existing technology and achieves higher test reliability and accuracy.
Patent Information
- Application Number
- CN202411040726.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-31
AI Technical Summary
In the existing technology, the reliability of voice service testing of PON gateway equipment is low, mainly due to the interference of subjective factors in manual testing, resulting in inaccurate test results.
Using the PON-based government and enterprise gateway testing method, by controlling the on-hook status and voice interaction operations between the serial phone and the PON gateway device, the interaction process record data is obtained, and based on this data, voice service anomalies are analyzed, and the test is not required. PON gateway equipment tests the equipment that needs to be tested, reducing the impact of subjective and irrelevant factors.
It improves the reliability of voice service testing, ensures the accuracy and reliability of test results, and reduces the impact of manual interference and other factors on test results.
Smart Images

Figure CN118574046B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and more specifically, to a PON-based government and enterprise gateway testing method and device, equipment and medium. Background Art
[0002] In network communication technology, PON (Passive Optical Network) refers to a passive optical fiber network, which is a network architecture based on optical fiber transmission. The PON system uses a passive optical fiber distributor to enable multiple users to share the same optical fiber access, thereby achieving efficient data transmission. Among them, in the PON system, a PON gateway device is generally included. As an access device for the government and enterprise network, the PON gateway device can connect the optical fiber network to the local area network (LAN) or wide area network (WAN) within the government and enterprise. It transmits data to various departments or offices within the government and enterprise through optical fiber to achieve high-speed data transmission, such as voice data transmission. Among them, the PON gateway device plays an important role in the PON system. Therefore, in order to ensure the reliable operation of voice services, it is necessary to test the voice services of the PON gateway device. However, the inventors have found that in the prior art, a manual testing solution is generally adopted, which results in relatively low reliability of the test results. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a PON-based government and enterprise gateway testing method and apparatus, equipment and medium to improve the relatively poor reliability of gateway voice service testing in the prior art.
[0004] To achieve the above purpose, the embodiment of the present application adopts the following technical solution:
[0005] A PON-based government and enterprise gateway testing method is applied to electronic equipment, and the PON-based government and enterprise gateway testing method includes:
[0006] In response to the received gateway voice service test operation, the first serial port telephone and the second serial port telephone are controlled to enter an on-hook state, wherein the electronic device is communicatively connected with the first serial port telephone, the first serial port telephone is communicatively connected with the first PON gateway device, the first PON gateway device is communicatively connected with the voice server through an optical line terminal, the voice server is communicatively connected with the second PON gateway device through the optical line terminal, the second PON gateway device is communicatively connected with the second serial port telephone, the second serial port telephone is communicatively connected with the electronic device, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test;
[0007] After the first serial port phone and the second serial port phone enter the on-hook state, control the first serial port phone and the second serial port phone to perform voice interaction operation through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device;
[0008] Acquire interactive process record data formed by voice interactive operation between the first serial port phone and the second serial port phone, wherein the interactive process record data is used to reflect the voice interactive process between the first serial port phone and the second serial port phone;
[0009] Based on the interaction process record data, a voice service abnormality analysis is performed on the first PON gateway device to obtain a corresponding voice service analysis result, wherein the voice service analysis result is used to reflect whether there is an abnormality in the voice service of the first PON gateway device.
[0010] In a preferred embodiment of the present application, in the above-mentioned PON-based government and enterprise gateway testing method, after the first serial port phone and the second serial port phone enter the on-hook state, the step of controlling the first serial port phone and the second serial port phone to perform voice interaction operations through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device includes:
[0011] After the first serial port phone and the second serial port phone enter the on-hook state, control the first serial port phone to dial the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device, wherein the interaction process record data includes data indicating whether the dialing operation is successful, and when the dialing operation is unsuccessful, the voice service analysis result is used to reflect that the voice service of the first PON gateway device is abnormal;
[0012] After the dialing operation of the first serial port telephone to the second serial port telephone is successful, controlling the second serial port telephone to perform an off-hook operation;
[0013] After the off-hook operation performed by the second serial port telephone is successful, the first serial port telephone is controlled to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device, wherein the interaction process record data also includes data indicating whether the voice data transmission operation is successful, and when the voice data transmission operation is unsuccessful, the voice service analysis result is used to reflect that there is an abnormality in the voice service of the first PON gateway device.
[0014] In a preferred embodiment of the present application, in the above-mentioned PON-based government and enterprise gateway testing method, after the first serial port phone and the second serial port phone enter the on-hook state, the step of controlling the first serial port phone to dial the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device includes:
[0015] After the first serial port phone and the second serial port phone enter the on-hook state, using the pre-created data sending thread, determining the telephone number of the second serial port phone, and generating a corresponding dialing instruction based on the telephone number;
[0016] The data sending thread is used to send the dialing instruction to the first serial port phone through the target universal serial bus hub, wherein the target universal serial bus is communicatively connected to the electronic device through a first serial port line, and is communicatively connected to the first serial port phone through a second serial port line, and the first serial port phone is used to perform a dialing operation on the second serial port phone based on the dialing instruction through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after obtaining the dialing instruction.
[0017] In a preferred embodiment of the present application, in the above-mentioned PON-based government and enterprise gateway testing method, after the dialing operation performed by the first serial port phone to the second serial port phone is successful, the step of controlling the second serial port phone to perform an off-hook operation includes:
[0018] After the first serial port phone performs a dialing operation on the second serial port phone, using a pre-created data sending thread, obtaining dialing status information fed back by the first serial port phone based on the dialing operation;
[0019] After the dialing status information reflects that the dialing operation is successful, using the data sending thread, obtaining the number of rings of the first serial port phone formed based on the dialing operation;
[0020] When the number of ringing times is greater than or equal to a pre-configured reference number, using a pre-created data receiving thread to generate a corresponding off-hook signal;
[0021] The data receiving thread is used to send the off-hook signal to the second serial port phone, so that the second serial port phone performs an off-hook operation based on the off-hook signal, wherein after the second serial port phone performs the off-hook operation, the first serial port phone and the second serial port phone enter a call state capable of performing voice data transmission operations.
[0022] In a preferred choice of the embodiment of the present application, in the above-mentioned PON-based government and enterprise gateway testing method, after the off-hook operation performed by the second serial port telephone is successful, the step of controlling the first serial port telephone to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device includes:
[0023] After controlling the second serial port telephone to perform an off-hook operation, using a pre-created data receiving thread, obtaining off-hook state information of the second serial port telephone based on feedback of the off-hook operation;
[0024] After the off-hook status information reflects that the off-hook operation is successful, the voice data in the pre-created first data list is transmitted to the first serial port phone in sequence by using a pre-created data transmission thread, so that the first serial port phone transmits the voice data in the first data list to the second serial port phone in sequence through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device;
[0025] After the second serial port phone receives the voice data, the data receiving thread is used to obtain the voice data received by the second serial port phone, and a second data list is constructed based on the voice data, and the second data list is compared and analyzed with the first data list to obtain a data list comparison result reflecting whether the voice data in the second data list is consistent with the voice data in the first data list, and data for characterizing whether the voice data transmission operation is successful is generated based on the data list comparison result.
[0026] In a preferred choice of the embodiment of the present application, in the above-mentioned PON-based government and enterprise gateway testing method, after the off-hook operation performed by the second serial port telephone is successful, the step of controlling the first serial port telephone to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device also includes:
[0027] When the comparison result of the data lists shows that the voice data in the first data list and the second data list are inconsistent, regenerating a new first data list;
[0028] Using the data sending thread, the voice data in the new first data list is sequentially transmitted to the first serial port phone, so that the first serial port phone sequentially transmits the voice data in the new first data list to the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device;
[0029] After the second serial port phone receives the voice data, the data receiving thread is used to obtain the voice data received by the second serial port phone, and a new second data list is constructed based on the voice data, and the new second data list is compared and analyzed with the new first data list to obtain a new data list comparison result reflecting whether the voice data in the new second data list is consistent with the voice data in the new first data list, and data for characterizing whether the voice data transmission operation is successful is generated based on the new data list comparison result.
[0030] In a preferred choice of the embodiment of the present application, in the above-mentioned PON-based government and enterprise gateway testing method, a communication connection is also established between the electronic device and the first PON gateway device based on Ethernet, so that the message of the PON port of the first PON gateway device is mirrored to the LAN port of the electronic device, and the PON-based government and enterprise gateway testing method also includes:
[0031] Performing an acquisition operation on the voice data message passing through the PON port of the first PON gateway device through the LAN port to obtain a corresponding voice data message, wherein the voice data message at least includes voice data transmitted by the first serial port telephone and the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device for voice interaction operation;
[0032] When the voice service analysis result reflects that there is an abnormality in the voice service of at least one of the first PON gateway device and the second PON gateway device, based on the voice data message, abnormal location processing is performed on the voice service of the at least one PON gateway device to obtain a corresponding abnormal location result.
[0033] The embodiment of the present application further provides a PON-based government and enterprise gateway testing device, which is applied to electronic equipment. The PON-based government and enterprise gateway testing device includes:
[0034] An on-hook state control module is used to control the first serial port telephone and the second serial port telephone to enter an on-hook state in response to a received gateway voice service test operation, wherein the electronic device is communicatively connected to the first serial port telephone, the first serial port telephone is communicatively connected to a first PON gateway device, the first PON gateway device is communicatively connected to a voice server via an optical line terminal, the voice server is communicatively connected to a second PON gateway device via the optical line terminal, the second PON gateway device is communicatively connected to the second serial port telephone, the second serial port telephone is communicatively connected to the electronic device, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test;
[0035] A voice interaction module, used for controlling the first serial port telephone and the second serial port telephone to perform voice interaction operation through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after the first serial port telephone and the second serial port telephone enter the on-hook state;
[0036] a record data acquisition module, used to acquire interactive process record data formed by the voice interactive operation between the first serial port phone and the second serial port phone, wherein the interactive process record data is used to reflect the voice interactive process between the first serial port phone and the second serial port phone;
[0037] The service anomaly analysis module is used to perform voice service anomaly analysis on the first PON gateway device based on the interaction process record data to obtain a corresponding voice service analysis result, wherein the voice service analysis result is used to reflect whether there is an abnormality in the voice service of the first PON gateway device.
[0038] Based on the above, an embodiment of the present application further provides an electronic device, including:
[0039] Memory for storing computer programs;
[0040] The processor connected to the memory is used to execute the computer program stored in the memory to implement the above-mentioned PON-based government and enterprise gateway testing method.
[0041] Based on the above, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run, each step of the above-mentioned PON-based government and enterprise gateway testing method is executed.
[0042] The PON-based government and enterprise gateway test method, device, equipment and medium provided in the present application relate to the field of network communication technology. In the present application, first, in response to the gateway voice service test operation, the first serial port telephone and the second serial port telephone are controlled to enter the on-hook state; secondly, after the first serial port telephone and the second serial port telephone enter the on-hook state, the first serial port telephone and the second serial port telephone are controlled to perform voice interaction operation through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device; then, the interaction process record data formed by the voice interaction operation of the first serial port telephone and the second serial port telephone is obtained; finally, based on the interaction process record data, the first PON gateway device is analyzed for voice service anomalies to obtain the voice service analysis results. Based on the above content, since there is this configuration "the electronic device is connected to the first serial phone in communication, the first serial phone is connected to the first PON gateway device in communication, the first PON gateway device is connected to the voice server via the optical line terminal, the voice server is connected to the second PON gateway device via the optical line terminal, the second PON gateway device is connected to the second serial phone in communication, the second serial phone is connected to the electronic device in communication, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test", the electronic device can rely on the voice service that does not need to be performed. The second PON gateway device for the abnormal test will not be interfered by subjective data for the first PON gateway device that needs to be tested for voice service abnormality, so that the problem of reduced reliability due to the presence of more subjective factors in manual testing (especially for voice services) can be avoided. In addition, since the test is performed on the PON gateway device that needs to be tested for voice service abnormality using the PON gateway device that does not need to be tested for voice service abnormality, the interference of irrelevant factors in the test process is also reduced. Therefore, the problem of relatively poor reliability of gateway voice service testing in the prior art can be improved, so that the result of the gateway voice service test has higher reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings.
[0044] Figure 1 A structural block diagram of an electronic device provided in an embodiment of the present application.
[0045] Figure 2 A flowchart of a PON-based government and enterprise gateway testing method provided in an embodiment of the present application.
[0046] Figure 3 A block diagram of a PON-based government and enterprise gateway testing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0048] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. 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.
[0049] like Figure 1 As shown, an embodiment of the present application provides an electronic device, wherein the electronic device may include a memory, a processor, and a PON-based government and enterprise gateway testing device.
[0050] In detail, the memory and the processor are electrically connected directly or indirectly to realize data transmission or interaction. For example, they can be electrically connected to each other through one or more communication buses or signal lines. The PON-based government and enterprise gateway testing device includes at least one software function module that can be stored in the memory in the form of software or firmware. The processor is used to execute an executable computer program stored in the memory, for example, the software function modules and computer programs included in the PON-based government and enterprise gateway testing device, so as to implement the PON-based government and enterprise gateway testing method provided in the embodiment of the present application.
[0051] Optionally, the memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0052] Furthermore, the processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a system on chip (SoC), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0053] Understandably, Figure 1 The structure shown is for illustration only, and the electronic device may also include Figure 1 More or fewer components as shown, or with Figure 1 The different configurations shown, for example, may also include a communication unit for exchanging information with other devices (such as a server, etc.).
[0054] Combination Figure 2 The embodiment of the present application also provides a PON-based government and enterprise gateway testing method applicable to the above electronic device. The method steps defined in the process related to the PON-based government and enterprise gateway testing method can be implemented by the electronic device.
[0055] The following will Figure 2 The specific process shown is explained in detail.
[0056] Step S110, in response to the received gateway voice service test operation, controlling the first serial port phone and the second serial port phone to enter an on-hook state.
[0057] In an embodiment of the present application, the electronic device can control the first serial port phone and the second serial port phone to enter an on-hook state (such as an idle state, i.e., a state in which no call or other activities are being performed) in response to a received gateway voice service test operation. The electronic device is communicatively connected to the first serial port telephone, the first serial port telephone is communicatively connected to the first PON gateway device (such as connected via a telephone line), the first PON gateway device is communicatively connected to the voice server via an optical line terminal (OLT, Optical Line Terminal) (such as the first PON gateway device and the optical line terminal are connected via an optical fiber, and the optical line terminal and the voice server are connected via Ethernet), the voice server is communicatively connected to the second PON gateway device via the optical line terminal (such as the second PON gateway device and the optical line terminal are connected via an optical fiber), the second PON gateway device is communicatively connected to the second serial port telephone (such as connected via a telephone line), the second serial port telephone is communicatively connected to the electronic device, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, that is, a PON gateway device to be tested, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test, such as a PON gateway device where there is no abnormality in the voice service, that is, a PON gateway device to be tested.
[0058] Step S120, after the first serial port phone and the second serial port phone enter the on-hook state, control the first serial port phone and the second serial port phone to perform voice interaction operations through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device.
[0059] In an embodiment of the present application, the electronic device can control the first serial port phone and the second serial port phone after the first serial port phone and the second serial port phone enter the on-hook state, and perform voice interaction operations, such as voice data interaction, through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device.
[0060] Step S130, obtaining interactive process record data formed by the voice interactive operation between the first serial port phone and the second serial port phone.
[0061] In an embodiment of the present application, the electronic device can obtain interaction process record data formed by the voice interaction operation between the first serial port phone and the second serial port phone. The interaction process record data is used to reflect the voice interaction process between the first serial port phone and the second serial port phone, that is, to record the voice interaction process accordingly.
[0062] Step S140: Based on the interaction process record data, perform voice service abnormality analysis on the first PON gateway device to obtain corresponding voice service analysis results.
[0063] In an embodiment of the present application, the electronic device can perform voice service anomaly analysis on the first PON gateway device based on the interaction process record data to obtain a corresponding voice service analysis result, wherein the voice service analysis result is used to reflect whether the voice service of the first PON gateway device is abnormal.
[0064] Based on the above content, since there is this configuration "the electronic device is connected to the first serial port phone in communication, the first serial port phone is connected to the first PON gateway device in communication, the first PON gateway device is connected to the voice server through the optical line terminal, the voice server is connected to the second PON gateway device through the optical line terminal, the second PON gateway device is connected to the second serial port phone in communication, the second serial port phone is connected to the electronic device in communication, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test", the electronic device can rely on the voice service that does not need to be tested. The second PON gateway device that needs to perform a voice service abnormality test will not be interfered by subjective data with the first PON gateway device that needs to perform a voice service abnormality test, so that the problem of reduced reliability due to the presence of more subjective factors in manual testing (especially for voice services) can be avoided. In addition, since the test is performed on the PON gateway device that needs to perform a voice service abnormality test by using a PON gateway device that does not need to perform a voice service abnormality test, the interference of non-related factors in the test process is also reduced. Therefore, the problem of relatively poor reliability of the gateway voice service test in the prior art can be improved, so that the result of the gateway voice service test has higher reliability.
[0065] In the first aspect, it should be noted that for step S110, the specific manner of controlling the first serial port phone and the second serial port phone to enter the on-hook state in response to the received gateway voice service test operation is not limited and can be selected according to actual needs.
[0066] For example, in an alternative implementation, after receiving a gateway voice service test operation (such as a test user's operation, etc.), the first serial port phone and the second serial port phone can be controlled to enter the on-hook state through the class "_start_env". The class "_start_env" is specifically used to initialize the test environment so that the first serial port phone and the second serial port phone enter the on-hook state.
[0067] For example, in a specific application example, two daemon threads, such as "start_read_thread", can be created through the class "_start_env", which are respectively used to manage the first serial port phone and the second serial port phone so that they enter the on-hook state. It should be noted that the daemon thread can have other functions on the basis of controlling the first serial port phone and the second serial port phone to enter the on-hook state. In addition, the class "_start_env" can also be used to close, clear, and other operations on the two daemon threads.
[0068] On the second aspect, it should be noted that for step S120, the specific method of controlling the first serial port telephone and the second serial port telephone to perform voice interaction operation is not limited and can be selected according to actual needs.
[0069] For example, in an alternative implementation, in order to make the voice service test of the first PON gateway device more reliable, the above-mentioned step S120 may further include step S121, step S122 and step S123, and the specific content of each step is described as follows.
[0070] Step S121, after the first serial port phone and the second serial port phone enter the on-hook state, control the first serial port phone to dial the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device.
[0071] In an embodiment of the present application, after the first serial port phone and the second serial port phone enter the on-hook state, the first serial port phone can be controlled to dial the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device, that is, the first serial port phone is controlled to dial the second serial port phone. Wherein, the interactive process record data includes data indicating whether the dialing operation is successful, and when the dialing operation is unsuccessful, the voice service analysis result is used to reflect that the voice service of the first PON gateway device is abnormal, that is, when the dialing operation is unsuccessful, when the voice service abnormality analysis is performed based on the corresponding interactive process record data (such as when executing step S140), the voice service analysis result reflecting that the voice service of the first PON gateway device is abnormal can be obtained. Exemplarily, the corresponding data can be generated for characterization only when the dialing operation is unsuccessful, so that when the corresponding data does not exist, it can be considered that the dialing is successful.
[0072] Step S122: after the dialing operation of the first serial port phone to the second serial port phone is successful, control the second serial port phone to perform an off-hook operation.
[0073] In the embodiment of the present application, after controlling the first serial port phone to dial the second serial port phone, it can be determined whether the dialing operation is successful, wherein after the dialing operation is successful, the second serial port phone can be further controlled to perform an off-hook operation. Exemplarily, the off-hook operation can refer to the action of picking up the handset of a phone from the phone base in a telephone system, and in the embodiment of the present application, the electronic device sends a command to the second serial port phone, so that the second serial port phone performs the off-hook operation.
[0074] Step S123, after the off-hook operation of the second serial port telephone is successful, control the first serial port telephone to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device.
[0075] In an embodiment of the present application, after controlling the second serial port phone to perform an off-hook operation, it can be determined whether the off-hook operation is successful, wherein after the off-hook operation is successful, the first serial port phone can be further controlled to perform a voice data transmission operation to the second serial port phone through the first PON gateway device, the optical line terminal, the voice server, and the second PON gateway device, such as the first serial port phone can sequentially transmit the voice data (message) to the second serial port phone through the first PON gateway device, the optical line terminal, the voice server, the optical line terminal, and the second PON gateway device. Exemplarily, the second serial port phone can also sequentially transmit the voice data (message) to the first serial port phone through the second PON gateway device, the optical line terminal, the voice server, the optical line terminal, and the first PON gateway device, so that the interaction of voice data can be realized. Wherein, the interaction process record data also includes data indicating whether the voice data transmission operation is successful, and when the voice data transmission operation is unsuccessful, the voice service analysis result is used to reflect that the voice service of the first PON gateway device is abnormal. That is to say, when the voice data transmission operation is unsuccessful, when the voice service abnormality analysis is performed based on the corresponding interaction process record data (such as when executing step S140), a voice service analysis result reflecting that the voice service of the first PON gateway device is abnormal can be obtained. Exemplarily, the corresponding data can be generated only when the voice data transmission operation is unsuccessful for characterization, so that when there is no corresponding data, it can be considered that the voice data transmission operation is successful.
[0076] It is understandable that what needs to be explained about step S121 is that the specific method of controlling the first serial port telephone to dial the second serial port telephone is not limited and can be selected according to actual needs.
[0077] For example, in an alternative implementation, in order to enable the electronic device to have higher concurrency performance in the process of controlling the first serial port phone, the above-mentioned step S121 may further include step S121a and step S121b, and the specific content of each step is described as follows.
[0078] Step S121a, after the first serial port phone and the second serial port phone enter the on-hook state, the telephone number of the second serial port phone is determined by using the pre-created data sending thread, and a corresponding dialing instruction is generated based on the telephone number.
[0079] In the embodiment of the present application, a data sending thread, such as "send_dtmf_data", can be created in advance. Based on this, after the first serial port phone and the second serial port phone enter the on-hook state, the pre-created data sending thread can be used to determine the telephone number of the second serial port phone, and generate a corresponding dialing instruction based on the telephone number.
[0080] Step S121b: using the data sending thread, the dialing instruction is sent to the first serial port phone through the target universal serial bus hub.
[0081] In an embodiment of the present application, after the dialing instruction is generated, the data sending thread can be used to send the dialing instruction to the first serial port phone through the target universal serial bus hub (HUB). The target universal serial bus is connected to the electronic device through a first serial port line, and is connected to the first serial port phone through a second serial port line. In this way, a connection can be established between the electronic device and the first serial port phone through the first serial port line, the target universal serial bus and the second serial port line. The first serial port phone is used to perform a dialing operation on the second serial port phone based on the dialing instruction (telephone number) through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after obtaining the dialing instruction.
[0082] It is understandable that what needs to be explained about step S122 is that the specific method of controlling the second serial port telephone to perform the off-hook operation is not limited and can be selected according to actual needs.
[0083] For example, in an alternative implementation, in order to enable the electronic device to have higher concurrency performance in the process of controlling the second serial port telephone, the above-mentioned step S122 may further include step S122a, step S122b, step S122c and step S122d, and the specific content of each step is described as follows.
[0084] Step S122a: After the first serial port phone performs a dialing operation on the second serial port phone, the dialing state information fed back by the first serial port phone based on the dialing operation is obtained by using a pre-created data sending thread.
[0085] In an embodiment of the present application, after controlling the first serial port phone to dial the second serial port phone, a pre-created data sending thread is used to obtain dialing status information fed back by the first serial port phone based on the dialing operation, such as whether the dialing is successful.
[0086] Step S122b: After the dialing status information reflects that the dialing operation is successful, the data sending thread is used to obtain the number of rings of the first serial port phone based on the dialing operation.
[0087] In an embodiment of the present application, after obtaining the dialing status information, it can be determined whether the dialing is successful based on the dialing status information. Wherein, after the dialing status information reflects that the dialing operation is successful, the data sending thread can be used to further obtain the number of rings formed by the first serial port phone based on the dialing operation. Exemplarily, the dialing status information and the number of rings can be stored in a data list, and then the dialing status information and the number of rings can be obtained by performing a data reading operation in the data list. Exemplarily, the "_reading method" can be used so that information can be obtained by continuously reading the output of the serial port, and the output will be decoded into utf-8 format and added to the code list (data list) of the corresponding serial port, such as "code_list". In this way, after controlling the first serial port phone to perform a dialing operation on the second serial port phone, the "code_list" can be polled to obtain data.
[0088] Step S122c: when the number of ringing times is greater than or equal to the pre-configured reference number, a corresponding off-hook signal is generated using a pre-created data receiving thread.
[0089] In the embodiment of the present application, after the number of rings is obtained, the relationship between the number of rings and a pre-configured reference number (such as 5, 8, 12, etc.) can be determined. When the number of rings is greater than or equal to the pre-configured reference number, a pre-created data receiving thread, such as "receive_dtmf_data", can be used to generate a corresponding off-hook signal.
[0090] Step S122d: using the data receiving thread, sending the off-hook signal to the second serial port phone, so that the second serial port phone performs an off-hook operation based on the off-hook signal.
[0091] In an embodiment of the present application, after the off-hook signal is generated, the data receiving thread can be used to send the off-hook signal to the second serial port phone, so that the second serial port phone performs an off-hook operation based on the off-hook signal, wherein after the second serial port phone performs the off-hook operation, the first serial port phone and the second serial port phone enter a call state capable of performing voice data transmission operations, that is, a call connection is established. Exemplarily, in an actual application, when _caller_pickup (a parameter representing whether the dialing operation is successful) and _anwser_pickup (data representing whether the off-hook operation is successful) are both True (successful), it indicates that the caller and the anwser have entered a call state, that is, the first serial port phone and the second serial port phone have established a call connection.
[0092] It is understandable that what needs to be explained about step S123 is that the specific method of controlling the first serial port telephone to perform voice data transmission operation to the second serial port telephone is not limited and can be selected according to actual needs.
[0093] For example, in an alternative implementation, in order to enable the electronic device to have higher concurrency performance in the process of controlling the first serial port telephone and the second serial port telephone, the above-mentioned step S123 may further include step S123a, step S123b and step S123c, and the specific content of each step is described as follows.
[0094] Step S123a, after controlling the second serial port phone to perform an off-hook operation, using a pre-created data receiving thread, obtain off-hook status information of the second serial port phone based on feedback of the off-hook operation.
[0095] In an embodiment of the present application, after controlling the second serial port telephone to perform an off-hook operation, the pre-created data receiving thread (as described above) can be used to obtain the off-hook status information of the second serial port telephone based on the off-hook operation feedback, such as whether the off-hook operation is successful.
[0096] Step S123b, after the off-hook status information reflects that the off-hook operation is successful, the voice data in the pre-created first data list is transmitted to the first serial port phone in sequence by using the pre-created data sending thread, so that the first serial port phone transmits the voice data in the first data list to the second serial port phone in sequence through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device.
[0097] In an embodiment of the present application, after the off-hook status information is obtained, it can be determined whether the off-hook operation is successful based on the off-hook status information. Wherein, after the off-hook status information reflects that the off-hook operation is successful, the pre-created data sending thread (as described above) can be used to transmit the voice data in the pre-created first data list to the first serial port phone in sequence, so that the first serial port phone transmits the voice data in the first data list to the second serial port phone in sequence through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device. In this way, the voice data transmission from the first serial port phone to the second serial port phone can be realized, that is, the voice data transmission operation can be realized. Exemplarily, the first data list can be "my_dtmf_data".
[0098] Step S123c, after the second serial port telephone receives the voice data, using the data receiving thread to obtain the voice data received by the second serial port telephone, and constructing a second data list based on the voice data, and comparing and analyzing the second data list with the first data list to obtain a data list comparison result reflecting whether the voice data in the second data list is consistent with the voice data in the first data list, and generating data based on the data list comparison result to characterize whether the voice data transmission operation is successful.
[0099] In an embodiment of the present application, after transmitting voice data to the second serial port telephone, after the second serial port telephone receives the voice data, the data receiving thread can be used to obtain the voice data received by the second serial port telephone, and a second data list can be constructed based on the voice data, and the second data list and the first data list can be compared and analyzed to obtain a data list comparison result reflecting whether the voice data in the second data list and the first data list are consistent, and data for characterizing whether the voice data transmission operation is successful is generated based on the data list comparison result. Exemplarily, when the voice data in the second data list and the first data list are inconsistent, it indicates that there may be abnormal conditions such as packet loss during the transmission process. Therefore, data for characterizing that the voice data transmission operation is unsuccessful can be generated as the interaction process record data. Exemplarily, the second data list can be "ant_list".
[0100] It is understandable that further explanation is needed for step S123. In some implementations, in order to ensure the reliability of the voice service test results, the above-mentioned step S123 may further include step S123d, step S123e and step S123f. The specific content of each step is described as follows.
[0101] Step S123d: when the comparison result of the data lists shows that the voice data in the first data list and the second data list are inconsistent, a new first data list is regenerated.
[0102] In an embodiment of the present application, after generating data for characterizing whether the voice data transmission operation is successful based on the data list comparison result, and when the data list comparison result reflects that the voice data in the first data list and the second data list are inconsistent, a new first data list can be regenerated, which can be generated randomly or according to certain configured rules.
[0103] Step S123e, using the data sending thread, transmits the voice data in the new first data list to the first serial port phone in sequence, so that the first serial port phone transmits the voice data in the new first data list to the second serial port phone in sequence through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device.
[0104] In the embodiment of the present application, after the new first data list is regenerated, the data transmission thread can be used to sequentially transmit the voice data in the new first data list to the first serial port phone, so that the first serial port phone sequentially transmits the voice data in the new first data list to the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device. In other words, the voice data transmission operation is performed based on the voice data in the new first data list.
[0105] Step S123f, after the second serial port telephone receives the voice data, the data receiving thread is used to obtain the voice data received by the second serial port telephone, and a new second data list is constructed based on the voice data, and the new second data list is compared and analyzed with the new first data list to obtain a new data list comparison result reflecting whether the voice data in the new second data list is consistent with the voice data in the new first data list, and data for characterizing whether the voice data transmission operation is successful is generated based on the new data list comparison result.
[0106] In an embodiment of the present application, after the voice data in the new first data list is transmitted to the second serial port phone, and after the second serial port phone receives the voice data, the data receiving thread is used to obtain the voice data received by the second serial port phone, and a new second data list is constructed based on the voice data, and the new second data list is compared and analyzed with the new first data list to obtain a new data list comparison result reflecting whether the voice data in the new second data list and the new first data list are consistent, and data for indicating whether the voice data transmission operation is successful is generated based on the new data list comparison result. Exemplarily, when the voice data in the new second data list and the new first data list are inconsistent, it indicates that there may be abnormal conditions such as packet loss during the transmission process, so data for indicating that the voice data transmission operation is unsuccessful can be generated as the interactive process record data. Exemplarily, when the new first data list and the new second data list are generated, the first data list and the second data list can also be deleted, or the first data list and the second data list can be retained.
[0107] In the third aspect, it should be noted that for step S130, the specific method of obtaining the interaction process record data of the first serial port phone and the second serial port phone is not limited and can be selected according to actual needs. For example, the interaction process record data can be read through other threads other than the data sending thread and the data receiving thread. In addition, the interaction process record data can be saved in the form of a log file. Specifically, after the corresponding data is formed, the data can be written into the log file through the "write_voice_log" method.
[0108] Fourthly, it should be noted that the specific method of performing voice service anomaly analysis based on the interactive process record data is not limited and can be selected according to actual needs. For example, in an alternative embodiment, as mentioned above, the interactive process record data contains data indicating whether the dialing operation is successful and data indicating whether the voice data transmission operation is successful. In this way, it is possible to directly determine whether the voice service is abnormal based on the data. For example, when the dialing operation or the voice data transmission operation is unsuccessful, a voice service analysis result reflecting that the voice service of the first PON gateway device is abnormal can be obtained. In some practical applications, multiple dialing operations or multiple voice data transmission operations may be performed. Whether the voice service is abnormal can be determined according to the result of the last dialing operation or the last voice data transmission operation. Alternatively, whether the voice service is abnormal can be determined according to whether the proportion of successful dialing operations or data transmission operations exceeds a preset proportion.
[0109] In a fifth aspect, in an alternative implementation, a communication connection is also established between the electronic device and the first PON gateway device based on Ethernet, so that the message of the PON port (Passive Optical Network Port) of the first PON gateway device is mirrored to the LAN port (Local Area Network Port) of the electronic device. Based on this, the PON-based government and enterprise gateway testing method can further include the following steps:
[0110] First, the voice data message passing through the PON port of the first PON gateway device can be acquired through the LAN port to obtain a corresponding voice data message, wherein the voice data message at least includes the voice data transmitted by the first serial port phone and the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device for voice interaction operation; that is, the first PON gateway device can receive the voice data (message) transmitted by the first serial port phone through the corresponding PON port, so that after the voice data is transmitted to the PON port, it can be transmitted to the electronic device through Ethernet and the LAN port of the electronic device;
[0111] Secondly, when the voice service analysis result reflects that there is an abnormality in the voice service of at least one of the first PON gateway device and the second PON gateway device, based on the voice data message, the voice service of the at least one PON gateway device is abnormally located to obtain a corresponding abnormal location result; wherein, the specific process of abnormal location based on the message can refer to the relevant existing technology, and no specific limitation or description is made here. The focus of the embodiment of the present application is that a communication connection is also established between the electronic device and the first PON gateway device based on Ethernet, so that the message of the PON port of the first PON gateway device is mirrored to the LAN port of the electronic device, so that the electronic device can obtain the corresponding voice data message, thereby being able to perform specific location analysis on the service abnormality.
[0112] Combination Figure 3 The embodiment of the present application also provides a PON-based government and enterprise gateway testing device applicable to the above electronic device. The PON-based government and enterprise gateway testing device may include an on-hook state control module, a voice interaction module, a record data acquisition module, and a service anomaly analysis module.
[0113] In detail, the on-hook state control module can be used to control the first serial port phone and the second serial port phone to enter the on-hook state in response to the received gateway voice service test operation, wherein the electronic device is communicatively connected to the first serial port phone, the first serial port phone is communicatively connected to the first PON gateway device, the first PON gateway device is communicatively connected to the voice server via an optical line terminal, the voice server is communicatively connected to the second PON gateway device via the optical line terminal, the second PON gateway device is communicatively connected to the second serial port phone, the second serial port phone is communicatively connected to the electronic device, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test. In an embodiment of the present application, the on-hook state control module can be used to execute Figure 2 As shown in step S110, the relevant contents of the on-hook state control module can refer to the above description of step S110.
[0114] In detail, the voice interaction module can be used to control the first serial port phone and the second serial port phone after the first serial port phone and the second serial port phone enter the on-hook state, and perform voice interaction operations through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device. In the embodiment of the present application, the voice interaction module can be used to perform Figure 2 As shown in step S120, for the relevant content of the voice interaction module, please refer to the description of step S120 in the previous text.
[0115] In detail, the recorded data acquisition module can be used to acquire the interactive process recorded data formed by the voice interactive operation between the first serial port phone and the second serial port phone, wherein the interactive process recorded data is used to reflect the voice interactive process between the first serial port phone and the second serial port phone. Figure 2 As shown in step S130, the relevant contents of the record data acquisition module can refer to the above description of step S130.
[0116] In detail, the service anomaly analysis module can be used to perform voice service anomaly analysis on the first PON gateway device based on the interaction process record data to obtain a corresponding voice service analysis result, wherein the voice service analysis result is used to reflect whether the voice service of the first PON gateway device is abnormal. In the embodiment of the present application, the service anomaly analysis module can be used to perform Figure 2 As shown in step S140, the relevant contents of the business anomaly analysis module can refer to the above description of step S140.
[0117] It should be noted that, in other implementations, a communication connection is also established between the electronic device and the first PON gateway device based on Ethernet, so that the message of the PON port of the first PON gateway device is mirrored to the LAN port of the electronic device. Based on this, the PON-based government and enterprise gateway test device may also include other functional modules for:
[0118] An acquisition operation is performed on the voice data message passing through the PON port of the first PON gateway device through the LAN port to obtain a corresponding voice data message, wherein the voice data message at least includes voice data transmitted by the first serial port phone and the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device for voice interaction operation; and when the voice service analysis result reflects that there is an abnormality in the voice service of at least one of the first PON gateway device and the second PON gateway device, based on the voice data message, abnormal location processing is performed on the voice service of the at least one PON gateway device to obtain a corresponding abnormal location result.
[0119] In an embodiment of the present application, corresponding to the above-mentioned PON-based government and enterprise gateway testing method applied to the electronic device, a computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is run, each step of the PON-based government and enterprise gateway testing method is executed.
[0120] Among them, the steps executed when the aforementioned computer program is running will not be described one by one here, and reference may be made to the previous explanation of the PON-based government and enterprise gateway testing method.
[0121] In summary, the PON-based government and enterprise gateway test method, device, equipment and medium provided in this application relate to the field of network communication technology. In this application, first, in response to the gateway voice service test operation, the first serial port phone and the second serial port phone are controlled to enter the on-hook state; secondly, after the first serial port phone and the second serial port phone enter the on-hook state, the first serial port phone and the second serial port phone are controlled to perform voice interaction operations through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device; then, the interaction process record data formed by the voice interaction operation of the first serial port phone and the second serial port phone is obtained; finally, based on the interaction process record data, the first PON gateway device is analyzed for voice service anomalies to obtain voice service analysis results. Based on the above content, since there is this configuration "the electronic device is connected to the first serial phone in communication, the first serial phone is connected to the first PON gateway device in communication, the first PON gateway device is connected to the voice server via the optical line terminal, the voice server is connected to the second PON gateway device via the optical line terminal, the second PON gateway device is connected to the second serial phone in communication, the second serial phone is connected to the electronic device in communication, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test", the electronic device can rely on the voice service that does not need to be performed. The second PON gateway device for the abnormal test will not be interfered by subjective data for the first PON gateway device that needs to be tested for voice service abnormality, so that the problem of reduced reliability due to the presence of more subjective factors in manual testing (especially for voice services) can be avoided. In addition, since the test is performed on the PON gateway device that needs to be tested for voice service abnormality using the PON gateway device that does not need to be tested for voice service abnormality, the interference of irrelevant factors in the test process is also reduced. Therefore, the problem of relatively poor reliability of gateway voice service testing in the prior art can be improved, so that the result of the gateway voice service test has higher reliability.
[0122] In several embodiments provided in the embodiments of the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device and method embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0123] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0124] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code. It should be noted that in this article, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0125] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A PON-based government and enterprise gateway testing method, characterized in that: Applied to electronic equipment, the PON-based government and enterprise gateway testing method includes: In response to the received gateway voice service test operation, the first serial port telephone and the second serial port telephone are controlled to enter an on-hook state, wherein the electronic device is communicatively connected with the first serial port telephone, the first serial port telephone is communicatively connected with the first PON gateway device, the first PON gateway device is communicatively connected with the voice server through an optical line terminal, the voice server is communicatively connected with the second PON gateway device through the optical line terminal, the second PON gateway device is communicatively connected with the second serial port telephone, the second serial port telephone is communicatively connected with the electronic device, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test; After the first serial port phone and the second serial port phone enter the on-hook state, control the first serial port phone and the second serial port phone to perform voice interaction operation through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device; Acquire interactive process record data formed by voice interactive operation between the first serial port phone and the second serial port phone, wherein the interactive process record data is used to reflect the voice interactive process between the first serial port phone and the second serial port phone; Based on the interaction process record data, performing voice service abnormality analysis on the first PON gateway device to obtain a corresponding voice service analysis result, wherein the voice service analysis result is used to reflect whether there is an abnormality in the voice service of the first PON gateway device; Wherein, a communication connection is also established between the electronic device and the first PON gateway device based on Ethernet, so that the message of the PON port of the first PON gateway device is mirrored to the LAN port of the electronic device, and the PON-based government and enterprise gateway testing method also includes: Performing an acquisition operation on the voice data message passing through the PON port of the first PON gateway device through the LAN port to obtain a corresponding voice data message, wherein the voice data message at least includes voice data transmitted by the first serial port telephone and the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device for voice interaction operation; When the voice service analysis result reflects that there is an abnormality in the voice service of at least one of the first PON gateway device and the second PON gateway device, based on the voice data message, abnormal location processing is performed on the voice service of the at least one PON gateway device to obtain a corresponding abnormal location result.
2. The PON-based government and enterprise gateway testing method according to claim 1, characterized in that: The step of controlling the first serial port telephone and the second serial port telephone to perform voice interaction operation through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after the first serial port telephone and the second serial port telephone enter the on-hook state comprises: After the first serial port phone and the second serial port phone enter the on-hook state, control the first serial port phone to dial the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device, wherein the interaction process record data includes data indicating whether the dialing operation is successful, and when the dialing operation is unsuccessful, the voice service analysis result is used to reflect that the voice service of the first PON gateway device is abnormal; After the dialing operation of the first serial port telephone to the second serial port telephone is successful, controlling the second serial port telephone to perform an off-hook operation; After the off-hook operation performed by the second serial port telephone is successful, the first serial port telephone is controlled to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device, wherein the interaction process record data also includes data indicating whether the voice data transmission operation is successful, and when the voice data transmission operation is unsuccessful, the voice service analysis result is used to reflect that there is an abnormality in the voice service of the first PON gateway device.
3. The PON-based government and enterprise gateway testing method according to claim 2, characterized in that: The step of controlling the first serial port phone to dial the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after the first serial port phone and the second serial port phone enter the on-hook state comprises: After the first serial port phone and the second serial port phone enter the on-hook state, using the pre-created data sending thread, determining the telephone number of the second serial port phone, and generating a corresponding dialing instruction based on the telephone number; The data sending thread is used to send the dialing instruction to the first serial port phone through the target universal serial bus hub, wherein the target universal serial bus is communicatively connected to the electronic device through a first serial port line, and is communicatively connected to the first serial port phone through a second serial port line, and the first serial port phone is used to perform a dialing operation on the second serial port phone based on the dialing instruction through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after obtaining the dialing instruction.
4. The PON-based government and enterprise gateway testing method according to claim 2, characterized in that: The step of controlling the second serial port phone to perform an off-hook operation after the first serial port phone successfully dials the second serial port phone comprises: After the first serial port phone performs a dialing operation on the second serial port phone, using a pre-created data sending thread, obtaining dialing status information fed back by the first serial port phone based on the dialing operation; After the dialing status information reflects that the dialing operation is successful, using the data sending thread, obtaining the number of rings of the first serial port phone formed based on the dialing operation; When the number of ringing times is greater than or equal to a pre-configured reference number, using a pre-created data receiving thread to generate a corresponding off-hook signal; The data receiving thread is used to send the off-hook signal to the second serial port phone, so that the second serial port phone performs an off-hook operation based on the off-hook signal, wherein after the second serial port phone performs the off-hook operation, the first serial port phone and the second serial port phone enter a call state capable of performing voice data transmission operations.
5. The PON-based government and enterprise gateway testing method according to claim 2, characterized in that: After the off-hook operation performed by the second serial port telephone is successful, the step of controlling the first serial port telephone to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device comprises: After controlling the second serial port telephone to perform an off-hook operation, using a pre-created data receiving thread, obtaining off-hook state information of the second serial port telephone based on feedback of the off-hook operation; After the off-hook status information reflects that the off-hook operation is successful, the voice data in the pre-created first data list is transmitted to the first serial port phone in sequence by using a pre-created data transmission thread, so that the first serial port phone transmits the voice data in the first data list to the second serial port phone in sequence through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device; After the second serial port phone receives the voice data, the data receiving thread is used to obtain the voice data received by the second serial port phone, and a second data list is constructed based on the voice data, and the second data list is compared and analyzed with the first data list to obtain a data list comparison result reflecting whether the voice data in the second data list is consistent with the voice data in the first data list, and data for characterizing whether the voice data transmission operation is successful is generated based on the data list comparison result.
6. The PON-based government and enterprise gateway testing method according to claim 5, characterized in that: After the off-hook operation performed by the second serial port telephone is successful, the step of controlling the first serial port telephone to perform a voice data transmission operation to the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device also includes: When the comparison result of the data lists shows that the voice data in the first data list and the second data list are inconsistent, regenerating a new first data list; Using the data sending thread, the voice data in the new first data list is sequentially transmitted to the first serial port phone, so that the first serial port phone sequentially transmits the voice data in the new first data list to the second serial port phone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device; After the second serial port phone receives the voice data, the data receiving thread is used to obtain the voice data received by the second serial port phone, and a new second data list is constructed based on the voice data, and the new second data list is compared and analyzed with the new first data list to obtain a new data list comparison result reflecting whether the voice data in the new second data list is consistent with the voice data in the new first data list, and data for characterizing whether the voice data transmission operation is successful is generated based on the new data list comparison result.
7. A PON-based government and enterprise gateway testing device, characterized in that: Applied to electronic equipment, the PON-based government and enterprise gateway test device comprises: An on-hook state control module is used to control the first serial port telephone and the second serial port telephone to enter an on-hook state in response to a received gateway voice service test operation, wherein the electronic device is communicatively connected to the first serial port telephone, the first serial port telephone is communicatively connected to a first PON gateway device, the first PON gateway device is communicatively connected to a voice server via an optical line terminal, the voice server is communicatively connected to a second PON gateway device via the optical line terminal, the second PON gateway device is communicatively connected to the second serial port telephone, the second serial port telephone is communicatively connected to the electronic device, the first PON gateway device is a PON gateway device that needs to perform a voice service abnormality test, and the second PON gateway device is a PON gateway device that does not need to perform a voice service abnormality test; A voice interaction module, used for controlling the first serial port telephone and the second serial port telephone to perform voice interaction operation through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device after the first serial port telephone and the second serial port telephone enter the on-hook state; a record data acquisition module, used to acquire interactive process record data formed by the voice interactive operation between the first serial port phone and the second serial port phone, wherein the interactive process record data is used to reflect the voice interactive process between the first serial port phone and the second serial port phone; A service anomaly analysis module, configured to perform voice service anomaly analysis on the first PON gateway device based on the interaction process record data, and obtain a corresponding voice service analysis result, wherein the voice service analysis result is used to reflect whether there is an abnormality in the voice service of the first PON gateway device; Wherein, a communication connection is also established between the electronic device and the first PON gateway device based on Ethernet, so that the message of the PON port of the first PON gateway device is mirrored to the LAN port of the electronic device, and the PON-based government and enterprise gateway testing device is also used for: Performing an acquisition operation on the voice data message passing through the PON port of the first PON gateway device through the LAN port to obtain a corresponding voice data message, wherein the voice data message at least includes voice data transmitted by the first serial port telephone and the second serial port telephone through the first PON gateway device, the optical line terminal, the voice server and the second PON gateway device for voice interaction operation; When the voice service analysis result reflects that there is an abnormality in the voice service of at least one of the first PON gateway device and the second PON gateway device, based on the voice data message, abnormal location processing is performed on the voice service of the at least one PON gateway device to obtain a corresponding abnormal location result.
8. An electronic device, characterized in that: include: Memory for storing computer programs; A processor connected to the memory is used to execute the computer program stored in the memory to implement the PON-based government and enterprise gateway testing method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is run, each step of the PON-based government and enterprise gateway testing method described in any one of claims 1-6 is executed.
Citation Information
Patent Citations
System and method for auto-dial testing GSM (global system for mobile communications) voice quality
CN101754259A
Method for carrying out single-device voice production test on single-voice-port PON gateway device
CN113595826A
