P2P-based device automatic test method, electronic device and storage medium

By introducing automation testing tools in the test of P2P device, the problem of low test efficiency of the existing P2P equipment was solved, and the provision of equipment automation testing and rapid diagnosis was realized, which improved the efficiency of operation and maintenance and the work efficiency of developers.

CN119341943AActive Publication Date: 2025-01-21SHENZHEN XINRUISHI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411494253.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-21
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

The testing methods of existing P2P devices are inefficient, which leads to operation and maintenance work relying on the technical support of developers, increasing the workload and operation and maintenance complexity of developers.

Method used

Put forward a P2P -based equipment automatic test method. Through the automatic testing tool, establish a connection with the device to be tested in the same local area network, send test tasks, receive and analyze the test results, and find the corresponding diagnosis in the preset database based on the test results. It is recommended that the diagnosis is recommended to help operation and maintenance personnel solve the problem.

Benefits of technology

This method can automatically establish and sends test tasks with the device to be tested, receive and analyze the test results of the equipment, reduce the workload of operating and maintenance personnel and dependence on developers, improve testing efficiency, and help operation and maintenance personnel to quickly quickly quickly quickly and help operators quickly. Get suggestions to solve problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341943A_ABST
    Figure CN119341943A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a P2P-based equipment automatic test method, electronic equipment and a computer readable storage medium, and the method comprises the following steps: in response to starting an automatic test tool, establishing a connection with to-be-tested equipment in the same local area network, and starting a test mode of the equipment through the connection; sending a test task to the equipment through an interface of the automatic test tool; and receiving a test result after the equipment executes the test task, searching a corresponding diagnosis suggestion in a preset database according to the test result, and displaying the searched diagnosis suggestion. The equipment automatic test method can automatically establish connection with the to-be-tested equipment, send the test task, receive and analyze the test result of the equipment, and display the diagnosis suggestion according to the test result, so that the workload of operation and maintenance personnel is reduced, the dependency on developers is also reduced, the test efficiency is improved, and the test cost is reduced. And the operation and maintenance work is more efficient and automatic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a P2P-based device automatic testing method, electronic equipment and computer-readable storage medium. Background Art

[0002] With the continuous development of network monitoring technology, people's demand for network monitoring equipment is also growing. Network monitoring equipment still needs long-term operation and maintenance after leaving the factory to ensure the normal operation of the equipment. As the number of monitoring equipment continues to grow, the operation and management of the monitoring system has become more complicated. At present, more and more network monitoring equipment has begun to use P2P protocol for communication, such as IPC (Internet Protocol Camera) and NVR (Network Video Recorder) based on P2P protocol, and this trend has also brought a series of new challenges and problems. For example: With the increasing number of network monitoring equipment based on P2P protocol, the problems encountered in operation and maintenance work have also increased accordingly. However, general operation and maintenance personnel or after-sales personnel have limited understanding of technology and cannot access some confidential information, resulting in poor operation and maintenance results. In this context, operation and maintenance work is heavily dependent on the technical support of developers. The general operation and maintenance workflow is usually: the operation and maintenance personnel respond to the problem, the developer collects the test data of the problem, and directly analyzes the test data to obtain the test results, gives diagnostic suggestions based on the test results, and then the operation and maintenance personnel debug according to the diagnostic suggestions to solve the problem. This analysis and testing method is inefficient and also increases the workload of developers, making it impossible for them to focus on their own research and development work. Summary of the invention

[0003] In view of this, the present invention proposes a P2P-based device automatic testing method, an electronic device and a computer-readable storage medium, aiming to solve the problems of low efficiency and high dependence on developers in existing P2P device testing methods.

[0004] In order to solve the above problems, the present invention adopts the following technical solutions:

[0005] In a first aspect, the present invention proposes a P2P-based device automatic testing method, comprising:

[0006] In response to starting the automatic test tool, a connection is established with the device to be tested in the same local area network, and a test mode of the device is started through the connection; wherein the device includes a P2P-based network camera and a network video recorder;

[0007] Sending a test task to the device through the interface of the automatic testing tool;

[0008] Receive the test result after the device executes the test task, search for corresponding diagnostic suggestions in a preset database according to the test result, and display the found diagnostic suggestions; wherein the preset database includes test results, diagnostic suggestions and the correspondence between the test results and the diagnostic suggestions.

[0009] Further, when it is confirmed to automatically test the network connection problem of the device, the establishing a connection with the device to be tested in the same local area network includes: establishing a connection with the device to be tested in the same local area network through an IP address;

[0010] The test tasks include: sequentially executing device intranet connectivity detection, device-side extranet connectivity detection, device-side domain name resolution detection, device-to-P2P server connectivity detection, and device-to-P2P server connection test detection;

[0011] The preset database includes:

[0012] When the test result is that the device is successfully connected to the external network but the domain name resolution on the device fails, the corresponding diagnostic suggestions include at least one of checking the configuration of the device's DNS server, changing the device's DNS configuration, and resetting the device's DNS cache;

[0013] When the test result is that the domain name resolution on the device side is successful but the device fails to connect to the P2P server, the corresponding diagnostic suggestions include checking the domain name access restrictions of the network where the device is located, checking the startup status and working status of the P2P server, and checking at least one of the ping function of the server corresponding to the domain name;

[0014] When the test result is that the device fails to connect to the external network and the device fails to connect to the P2P server, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the external network and / or checking the network configuration.

[0015] Further, when it is confirmed to conduct an automatic test on the speed of obtaining configuration information of the device, the test task includes: detecting and confirming the P2P connection type of the device, and when the P2P connection type is a P2P direct connection type, conducting a P2P direct connection throughput test; when the P2P connection type is a P2P relay type, conducting a relay server throughput test and / or a relay device throughput test;

[0016] The preset database includes:

[0017] If the test result shows that the P2P direct connection throughput is normal, the corresponding diagnostic suggestion is to check the data processing speed of the application that obtains the device configuration information when receiving and processing data;

[0018] If the test result shows that the relay server throughput is abnormal and / or the relay device throughput is abnormal, the corresponding diagnostic suggestion is to check whether there are bandwidth limitations and network anomalies in the relay network environment.

[0019] Further, when it is confirmed to perform an automatic test on the speed problem of image display of the device, the test task includes: sequentially performing frame type detection, I frame return speed detection, and loop test detection;

[0020] The preset database includes:

[0021] When the test result shows that the P frame is the first frame, the corresponding diagnostic suggestion is to analyze the data stream processing of the device;

[0022] When the test result is that the I frame return speed is abnormal, the corresponding diagnostic suggestion is to check the data processing speed of the device's image display application when receiving and processing data;

[0023] When the test result is that the network fluctuation during the cyclic test is abnormal, the corresponding diagnostic suggestion is to change the network environment and / or adjust the network configuration.

[0024] Further, after the automatic test tool is started, the method further includes:

[0025] Establish a connection with a terminal APP that cannot establish a connection with the device in the same local area network, and enable the debugging mode of the terminal APP through the connection;

[0026] Sending a test task to the terminal APP through the interface of the automatic testing tool;

[0027] Receive the test result after the terminal APP executes the test task, search for corresponding diagnostic suggestions in a preset database according to the test result, and display the found diagnostic suggestions so that the terminal APP and the device can establish a connection according to the diagnostic suggestions.

[0028] Further, when it is confirmed to automatically test the network connection problem of the terminal APP, the test task includes: sequentially executing APP intranet connectivity detection, APP extranet connectivity detection, APP domain name resolution detection, APP and P2P server connectivity detection, and APP and P2P server connection test detection;

[0029] The preset database includes:

[0030] If the test result shows that the APP is successfully connected to the external network but the APP domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the configuration of the device's DNS server, changing the device's DNS configuration, and resetting the device's DNS cache;

[0031] When the test result is that the APP domain name resolution is successful but the APP fails to connect to the P2P server, the corresponding diagnostic suggestions include checking the domain name access restrictions of the network where the device is located, checking the startup status and working status of the P2P server, and checking at least one of the ping function of the server corresponding to the domain name;

[0032] When the test result is that the APP fails to connect to the external network and the APP fails to connect to the P2P server, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the external network and / or checking the network configuration.

[0033] Furthermore, after establishing a connection with the device to be tested in the same local area network and before enabling the test mode of the device through the connection, the method further includes: confirming that the unique identifier of the device passes identity authentication.

[0034] Furthermore, after displaying the found diagnostic suggestions, it also includes: recording the unique identifier of the device, the test results of the device, and the diagnostic suggestions corresponding to the test results, and generating and displaying a diagnostic report in combination with the unique identifier, the test results and the diagnostic suggestions.

[0035] In a second aspect, the present invention further provides an electronic device, comprising:

[0036] a memory for storing program instructions; and

[0037] The processor is used to execute the program instructions to implement the steps of the P2P-based device automatic testing method as described above.

[0038] In a third aspect, the present invention further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the P2P-based device automatic testing method as described above are implemented.

[0039] Compared with the prior art, the beneficial effects of the present invention are: a device automatic testing method based on P2P, an electronic device and a computer-readable storage medium, comprising: in response to starting an automatic testing tool, establishing a connection with a device to be tested in the same local area network, and starting the test mode of the device through the connection; wherein the device includes a network camera and a network video recorder based on P2P; sending a test task to the device through the interface of the automatic testing tool; receiving the test result after the device executes the test task, searching for corresponding diagnostic suggestions in a preset database according to the test result, and displaying the found diagnostic suggestions; wherein the preset database includes test results, diagnostic suggestions and the corresponding relationship between the test results and the diagnostic suggestions. It can be seen that the device automatic testing method based on P2P, the electronic device and the computer-readable storage medium can automatically establish a connection with the device to be tested and send a test task, receive and analyze the test results of the device, which not only reduces the workload of the operation and maintenance personnel, but also reduces the dependence on the developers, and improves the test efficiency. In addition, displaying the corresponding diagnostic suggestions according to the test results can also help the operation and maintenance personnel to obtain suggestions for solving problems more quickly, reduce the direct technical support requirements for developers, and make the operation and maintenance work more efficient and automated. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0041] Figure 1 It is a flowchart of the first embodiment of the automatic testing method of a P2P-based device of the present invention;

[0042] Figure 2 A schematic diagram of a flow chart of a second embodiment of a P2P-based device automatic testing method of the present invention;

[0043] Figure 3 A schematic diagram of a flow chart of a third embodiment of a P2P-based device automatic testing method of the present invention;

[0044] Figure 4 It is a schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0047] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0048] See also Figure 1 As shown, it is a flow chart of the first embodiment of the P2P-based device automatic testing method of the present invention.

[0049] In this embodiment, the P2P-based device automatic testing method includes:

[0050] Step S100: In response to starting the automatic test tool, a connection is established with a device to be tested in the same local area network, and a test mode of the device is started through the connection.

[0051] The devices include P2P-based network cameras and network video recorders.

[0052] Specifically, the automatic testing tool is a software that can send test instructions, control the device under test to automatically perform test tasks, receive and analyze test results, display diagnostic suggestions, and generate diagnostic reports. It can be used to automate the testing process, reduce manual intervention, and improve testing efficiency and accuracy.

[0053] Specifically, a local area network (LAN) refers to a network consisting of multiple computers and devices connected by routers or switches within a relatively small geographical area. Within a LAN, devices can communicate by sharing the same network infrastructure. By establishing a connection with the device to be tested within the same LAN, the automatic test tool can directly transmit data, send and receive instructions with the device without transiting through the Internet or other networks. This can reduce communication delays and improve the stability and reliability of communication. In addition, devices within a LAN are usually in the same network environment and have similar network configurations and protocol support, which helps maintain compatibility and interoperability between the automatic test tool and the device to be tested. Therefore, establishing a connection with the device to be tested within the same LAN can ensure effective communication between the automatic test tool and the device, providing the necessary conditions and basis for subsequent execution of test tasks.

[0054] Specifically, the test mode is a special state set to facilitate communication and control between the automatic test tool and the device. When the device turns on the test mode, the device enters a special state in which it can execute test tasks and send test results to ensure that the device accurately performs the test tasks in the expected manner during the test process.

[0055] Specifically, P2P-based network cameras and network video recorders refer to cameras and video recorder devices that use the P2P (Peer-to-Peer) protocol for communication. The P2P protocol is a communication method that directly connects devices. It does not need to be forwarded through a central server, but transmits data through a direct connection between devices. In P2P-based network cameras and network video recorders, devices can directly establish connections to achieve functions such as video and audio transmission, real-time monitoring and recording. Compared with the traditional central server architecture, P2P-based network cameras and network video recorders can automatically traverse the NAT (Network Address Translation) device in the network, without the need to manually configure port mapping, simplifying the network setting process; it can also avoid the single point of failure of the central server, improve the stability and reliability of the connection; and can directly transmit data between devices, reducing data transmission delays and bandwidth consumption. P2P-based network cameras and network video recorders are widely used in the field of security monitoring. They achieve convenient device connection and efficient data transmission through the P2P protocol, providing a more flexible and reliable monitoring solution.

[0056] Step S200: sending a test task to the device through the interface of the automatic testing tool.

[0057] Specifically, the automatic test tool provides a user-friendly interface for users to select or input test tasks, as well as relevant parameters and configurations of the test tasks. This interface can be a graphical user interface (GUI) or a command line interface (CLI), depending on the design and implementation of the automatic test tool. Through this interface, users can select the type of test task to be performed, set test parameters, specify the address or identification of the device to be tested, etc. Users can interact with the automatic test tool through the interface according to specific test requirements and pass the relevant information of the test task to the automatic test tool. Once the user sets up the test task on the interface and confirms it, the automatic test tool will pass the corresponding test task to the device to be tested so that the device can execute it.

[0058] Step S300: receiving a test result after the device executes the test task, searching a preset database for a corresponding diagnosis suggestion according to the test result, and displaying the found diagnosis suggestion.

[0059] The preset database includes test results, diagnostic suggestions, and a correspondence between the test results and the diagnostic suggestions.

[0060] Specifically, various possible test results and corresponding diagnostic suggestions are stored in the preset database. By matching the test results sent by the device with the diagnostic suggestions stored in the preset database, the automatic test tool can provide corresponding diagnostic suggestions. These diagnostic suggestions are solutions formulated for specific problems or abnormal situations, which can help operation and maintenance personnel understand the test results more quickly, find possible problems, and obtain corresponding diagnostic suggestions, thereby speeding up troubleshooting and problem solving and improving operation and maintenance efficiency.

[0061] Compared with the prior art, the P2P-based device automatic testing method of the embodiment of the present invention can automatically establish a connection with the device to be tested and send a test task, receive and analyze the test results of the device, which not only reduces the workload of the operation and maintenance personnel, but also reduces the dependence on developers and improves the testing efficiency. In addition, the corresponding diagnostic suggestions are displayed according to the test results, which can also help the operation and maintenance personnel to obtain suggestions for solving problems more quickly, reduce the direct technical support requirements for developers, and make the operation and maintenance work more efficient and automated.

[0062] See also Figure 2 As shown, it is a flow chart of the second embodiment of the P2P-based device automatic testing method of the present invention.

[0063] Compared with other embodiments of the P2P-based device automatic testing method, this embodiment describes in detail the step of starting the test mode of the device and adds the step of displaying a diagnostic report.

[0064] In this embodiment, the P2P-based device automatic testing method includes:

[0065] Step S101: in response to starting the automatic test tool, establishing a connection with a device to be tested in the same local area network, confirming that the unique identifier of the device passes the identity authentication, and then starting the test mode of the device through the connection.

[0066] Specifically, the unique identifier of a device is the unique identification of the device, including the MAC address, serial number or other specific identifier of the device. By verifying the unique identifier of the device, it can be ensured that the automatic test tool establishes a connection with the correct device, avoids confusion or misoperation with other devices, and allows the automatic test tool to communicate and operate with the correct device. The specific authentication method can be determined according to the characteristics and requirements of the device. A more common method is that before turning on the test mode of the device, the automatic test tool sends an authentication request to the device, requiring the device to provide its unique identifier. After receiving the request, the device will reply with a response containing its unique identifier. The automatic test tool will verify the received response to ensure that the unique identifier provided by the device matches the expected identifier. If the match is successful, it means that the device has passed the authentication and can continue to establish a connection with the device and turn on the test mode of the device. Confirming that the unique identifier of the device has passed the authentication can improve the security and accuracy of the system, ensure that the automatic test tool interacts with the correct device, and effectively perform the test task.

[0067] Step S200: sending a test task to the device through the interface of the automatic testing tool.

[0068] Specifically, users can select or define corresponding test tasks on the interface of the automatic test tool according to specific problems or needs, which involves selecting different test types, setting different parameters, or specifying different test processes to adapt to different test problems. Therefore, by sending test tasks to the device through the interface of the automatic test tool, it is possible to flexibly adapt to different test problems and customize corresponding test tasks for each specific problem or need. This flexibility and customization can better meet different test needs and improve the accuracy and effectiveness of the test.

[0069] In some embodiments of the present application, when it is confirmed to perform an automatic test of a network connection problem of a device, the establishing a connection with the device to be tested in the same local area network includes: establishing a connection with the device to be tested in the same local area network via an IP address;

[0070] The test tasks include: sequentially executing device intranet connectivity detection, device-side extranet connectivity detection, device-side domain name resolution detection, device-to-P2P server connectivity detection, and device-to-P2P server connection test detection;

[0071] The preset database includes:

[0072] When the test result is that the device is successfully connected to the external network but the domain name resolution on the device fails, the corresponding diagnostic suggestions include at least one of checking the configuration of the device's DNS server, changing the device's DNS configuration, and resetting the device's DNS cache;

[0073] When the test result is that the domain name resolution on the device side is successful but the device fails to connect to the P2P server, the corresponding diagnostic suggestions include checking the domain name access restrictions of the network where the device is located, checking the startup status and working status of the P2P server, and checking at least one of the ping function of the server corresponding to the domain name;

[0074] When the test result is that the device fails to connect to the external network and the device fails to connect to the P2P server, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the external network and / or checking the network configuration.

[0075] Specifically, the device intranet connectivity test is used to detect whether the device can communicate with other devices in the intranet. If the device cannot establish a connection with other devices in the intranet, it may be due to network configuration, firewall settings, or device failure. The device-side external network connectivity test is used to detect whether the device can communicate with the Internet. If the device cannot establish a connection with the external network, it may be due to router configuration, network settings, firewall restrictions, or ISP (Internet Service Provider) problems. The device-side domain name resolution test is used to detect whether the device can correctly resolve the domain name and obtain the corresponding IP address. If the device cannot correctly resolve the domain name, it may be due to DNS configuration errors, domain name server failures, or network settings. The device-P2P server connectivity test is used to detect whether the device can communicate with the P2P server. If the device cannot establish a connection with the P2P server, it may be due to network congestion, port restrictions, P2P server failures, or network configuration problems. The device-P2P server connection test is used to test the connection quality and stability between the device and the P2P server. By performing a connection test, you can evaluate the latency, packet loss rate, and bandwidth between the device and the P2P server to determine the reliability and performance of the connection. By performing the above test tasks in sequence, you can comprehensively evaluate the device's network connection and help locate and solve the device's network connection problems.

[0076] It should be noted that the Ping function is a network tool used to test the connectivity between hosts. It determines whether the target host is reachable by sending an ICMP (Internet Control Message Protocol) echo request message to the target host and waiting for the target host to return an echo reply message. The Ping function is often used to detect whether the network connection is normal, measure network delay and packet loss rate, etc. Simple UDP connection detection is a network connection detection method based on UDP (User Datagram Protocol). UDP is a connectionless transmission protocol that does not guarantee reliable data transmission, but has low latency. In UDP connection detection, the sender sends a UDP data packet to the specified port of the target host. If the target host can receive the data packet and return a response, it means that the UDP connection is normal. This method is often used to quickly detect whether the port of the target host is open and whether the network connection is unobstructed.

[0077] The following is a detailed description of the automatic testing process for the device offline problem (device network connection problem):

[0078] Problem description: The device (IPC or NVR) does not display online status in the network, resulting in failure to connect normally.

[0079] Solution: To analyze this problem, the automatic test tool needs to be in the same LAN as the device and connect to the device via the IP address. After the connection is successful, the automatic test tool sends a problem detection command to the device, and the device performs the following test steps after receiving the command:

[0080] Device intranet connectivity test: ping the LAN gateway.

[0081] External network connectivity check on the device: ping 114.114.114.114 and ping 8.8.8.8.

[0082] Device-side domain name resolution detection: ping baidu.com and ping google.com.

[0083] Connectivity test between the device and the P2P server: ping the IP address and domain name of the P2P server.

[0084] Device and P2P server connection test: simple UDP connection test.

[0085] Test results and diagnostic suggestions:

[0086] 1. Pinging the domain name fails, but pinging the IP succeeds: This indicates that the DNS server configuration of the device may be incorrect. The diagnostic suggestions are as follows:

[0087] 1.1. Check whether the DNS server of the device is configured correctly;

[0088] 1.2. Please change the DNS configuration of your device;

[0089] 1.3. Reset the device's DNS cache.

[0090] 2. Pinging the P2P server domain name fails, but pinging baidu.com succeeds: The network operator may have restricted access to specific domain names, or the P2P server is not started. The diagnostic suggestions are as follows:

[0091] 2.1. Check whether the network operator where the device is located has domain name access restrictions;

[0092] 2.2. Check whether the P2P server is started and working properly;

[0093] 2.3. Check whether the server corresponding to the domain name restricts the ping function.

[0094] 3. Pinging the P2P server IP and 114.114.114.114 fails: This means the device cannot connect to the external network. The diagnostic suggestions are as follows:

[0095] 3.1. The network where the device is located may not be connected to the external network;

[0096] 3.2. Check whether the network configuration is correct.

[0097] Through the above test steps, the automatic test tool can conduct detailed analysis and diagnosis of the device offline problem to determine the specific reasons why the device cannot connect normally, and provide corresponding solutions and suggestions. By gradually troubleshooting and solving the problem, it can help restore the device's online status and ensure that the device is connected and running normally.

[0098] In some embodiments of the present application, when it is confirmed to perform an automatic test on the speed of obtaining configuration information of the device, the test task includes: detecting and confirming the P2P connection type of the device, and when the P2P connection type is a P2P direct connection type, performing a P2P direct connection throughput test; when the P2P connection type is a P2P relay type, performing a relay server throughput test and / or a relay device throughput test;

[0099] The preset database includes:

[0100] If the test result shows that the P2P direct connection throughput is normal (normal P2P direct connection throughput means that the P2P direct connection throughput reaches the expected performance level in the test, the data transmission speed is stable, and there is no obvious delay or packet loss), the corresponding diagnostic suggestion is to check the data processing speed of the application that obtains device configuration information when receiving and processing data;

[0101] When the test result is that the relay server throughput is abnormal (abnormal relay server throughput means that the relay server throughput is lower than the expected performance level in the test, the data transmission speed is unstable, and there is obvious delay or packet loss) and / or the relay device throughput is abnormal (abnormal relay device throughput means that the relay device throughput is lower than the expected performance level in the test, the data transmission speed is unstable, and there is obvious delay or packet loss), the corresponding diagnostic suggestion is to check whether there are bandwidth limitations and network anomalies in the relay network environment.

[0102] Specifically, confirming the P2P connection type can help determine the connection method between the automatic test tool and the device, including direct connection and relay type. Different P2P connection types may result in different network transmission performance and speed. Therefore, it is very important to confirm the P2P connection type of the device. If the P2P connection type of the device is direct connection, performing a P2P direct connection throughput test can evaluate the data transmission speed and stability between the device. This helps to determine the network performance of the device in direct connection mode so as to eliminate throughput problems in direct connection mode. If the P2P connection type of the device is relay type, a relay server throughput test and / or a relay device throughput test are required. These tests can help evaluate the data transmission performance of the device in relay mode, identify throughput problems in relay mode, and identify possible bottlenecks and improvement solutions. By performing the above tests, the network transmission performance of the device under different P2P connection types can be comprehensively evaluated, the problem that causes the slow speed of obtaining device configuration information can be found, and corresponding optimization suggestions and improvement measures can be proposed.

[0103] The following is a detailed description of the automatic test process for the slow acquisition of device configuration information (the speed of obtaining device configuration information):

[0104] Problem description: The device can connect successfully, but the speed of obtaining configuration information is very slow.

[0105] Solution: To analyze the problem, the automatic test tool sets the device to test mode, detects the type of P2P connection (direct connection or through a forwarding server) and performs a data throughput test. The specific test steps are as follows:

[0106] Connection mode detection.

[0107] P2P direct connection throughput test: A direct data throughput test is performed between the automatic test tool and the device, and the test results are fed back to the automatic test tool.

[0108] Forwarding server throughput test: Perform data throughput tests between the automatic test tool and the forwarding server, and between the forwarding server and the device, analyze the transmission speed of each link, and find possible bottlenecks.

[0109] Forwarding device throughput test: Perform data throughput tests between the automatic test tool and the forwarding device, and between forwarding devices, analyze the transmission speed of each link, and find possible bottlenecks.

[0110] Test results and diagnostic suggestions:

[0111] The P2P direct connection throughput is normal but the device configuration information is acquired slowly: This indicates that the problem occurs at the application layer. It is recommended that you check the data processing speed of the application layer.

[0112] A throughput bottleneck occurs at a certain link in the forwarding link: It is recommended to check whether the network environment of the automatic test tool, device, or forwarding server has bandwidth limitations or network instability.

[0113] Through the above test steps, the automatic test tool can conduct detailed analysis and diagnosis on the problem of slow device configuration acquisition, determine the specific reasons for the slow acquisition of device configuration information, and provide corresponding solutions and suggestions. By gradually troubleshooting and solving the problem, it can help improve the speed of device configuration information acquisition and ensure the normal operation of the device.

[0114] In some embodiments of the present application, when it is confirmed to perform an automatic test on the speed problem of image display of a device, the test task includes: sequentially performing frame type detection, I frame return speed detection, and loop test detection;

[0115] The preset database includes:

[0116] When the test result shows that the P frame is the first frame, the corresponding diagnostic suggestion is to analyze the data stream processing of the device;

[0117] If the test result is that the I frame return speed is abnormal (the I frame return speed is abnormal, which means that the I frame return speed is lower than the expected performance level, that is, the time delay of I frame return is high, resulting in obvious freeze, delay or discontinuity in image display), the corresponding diagnostic suggestion is to check the data processing speed of the device's image display application when receiving and processing data;

[0118] When the test result is abnormal network fluctuation during the loop test (abnormal network fluctuation during the loop test means that during the loop test, the network fluctuation exceeds the expected range, which is manifested as drastic fluctuations in data transmission speed, continuous delays or packet loss, and interruption or instability in data transmission), the corresponding diagnostic recommendation is to change the network environment and / or adjust the network configuration.

[0119] Specifically, performing frame type detection can determine whether the frame type of the first frame in the image data is a key frame (I frame) or a predicted frame (P frame). This is very important for the display and transmission of video images, because different types of frames require different amounts of computation and bandwidth during decoding and display. Understanding the frame type can help evaluate the efficiency and performance of image display. I frame is a key frame in a video sequence, which contains complete image information, while other frames are incremental data relative to I frame. Therefore, the return speed of I frame is crucial for the fast display and smoothness of video images. By detecting the return speed of I frame, the response speed and efficiency of the device when displaying video images can be evaluated. By performing cyclic test detection, the situation where the device continuously displays images for a long time can be simulated to evaluate the stability and performance of the device during long-term operation. This is very important for discovering the problem of image display speed degradation that may occur during long-term operation of the device. By performing these test tasks in sequence, the performance and stability of the device when displaying images can be fully evaluated, helping to discover and solve image display speed problems, and ensuring that the device can maintain good performance when processing image data.

[0120] The following is a detailed description of the automatic test process for the problem that the device is connected normally but the image is displayed slowly (the image display speed of the device):

[0121] Problem description: The device connects successfully and obtains configuration information, but the screen loads very slowly.

[0122] Solution: To analyze the problem, the automatic test tool sets the device to test mode and performs an image data stream test to detect the frame return speed. The specific test steps are as follows:

[0123] Frame type detection: The automatic test tool detects the first frame type (I frame or P frame) returned by the device.

[0124] I frame return speed: calculates the time from connection to returning I frame.

[0125] Multiple loop tests: Supports configuring multiple tests to help identify occasional network delay issues.

[0126] Test results and diagnostic suggestions:

[0127] I frame returns too slowly: The problem may be due to the data processing speed at the application layer. It is recommended that you contact the developer for further investigation.

[0128] P frame as the first frame: abnormal (P frame needs to rely on the previous I frame or the previous P frame for decoding. If the P frame as the first frame lacks the corresponding key I frame or the previous P frame, the decoder cannot correctly decode the image data, resulting in abnormal display). It is recommended to further analyze the data stream processing problem of the device.

[0129] Multiple test results show that the network fluctuates greatly: It is recommended to change the network environment or adjust the network configuration to eliminate bandwidth limitations and unstable network environment factors.

[0130] Through the above test steps, the automatic test tool can conduct detailed analysis and diagnosis on the problem of slow device image display, determine the specific reasons for the slow loading speed of the device image, and provide corresponding solutions and suggestions. By gradually troubleshooting and solving the problem, it can help improve the loading speed of the device image display and ensure the normal operation of the device.

[0131] Step S300: receiving a test result after the device executes the test task, searching a preset database for a corresponding diagnosis suggestion according to the test result, and displaying the found diagnosis suggestion.

[0132] The preset database includes test results, diagnostic suggestions, and a correspondence between the test results and the diagnostic suggestions.

[0133] Specifically, the preset database can use a variety of forms to store test results, diagnostic suggestions and the corresponding relationship between them. For example: relational database form and file storage form. Relational databases can use relational database management systems such as MySQL and PostgreSQL to create preset databases. In the database, multiple tables, such as test result tables, diagnostic suggestion tables, and associated tables can be established to store test results and corresponding diagnostic suggestions. Through the association between tables, the correspondence between test results and diagnostic suggestions can be achieved. The preset database can also be stored in the form of files, such as JSON, XML and other formats. Storing data in the form of files can be easily read and modified. Different forms of preset databases are suitable for different scenarios and needs. According to specific application requirements and system architecture, choosing the appropriate preset database form can improve the efficiency and performance of data management.

[0134] Step S400: Record the unique identifier of the device, the test result of the device, and the diagnostic suggestion corresponding to the test result, and generate and display a diagnostic report in combination with the unique identifier, the test result and the diagnostic suggestion.

[0135] Specifically, the diagnostic report can provide operation and maintenance personnel with comprehensive equipment status analysis and problem-solving solutions, helping to quickly locate and resolve equipment problems, improve equipment performance and stability, and enhance the level of operation and maintenance.

[0136] The P2P-based device automatic testing method of the embodiment of the present invention can remotely connect to the device through the network and guide the device to automatically execute the issued test tasks to realize remote automatic testing. The automatic testing tool can also record the test results and diagnostic suggestions after each automatic execution of the test task for reference by the operation and maintenance personnel to realize detailed log records. The automatic testing method can also generate a detailed diagnostic report based on the test results to guide the operation and maintenance personnel to solve the problem, so as to realize problem feedback and guidance.

[0137] The P2P-based device automatic testing method of the embodiment of the present invention relates to the field of automated operation and maintenance problem analysis tools for network cameras and network video recorders in video surveillance systems. The automatic testing method can help operation and maintenance personnel and after-sales personnel automatically identify and analyze common problems of equipment, reduce dependence on developers, and improve operation and maintenance efficiency.

[0138] See also Figure 3 As shown, it is a flow chart of the third embodiment of the P2P-based device automatic testing method of the present invention.

[0139] Compared with other embodiments of the method for automatic testing of a P2P-based device, this embodiment adds a step of performing automatic testing on the terminal APP.

[0140] In this embodiment, the P2P-based device automatic testing method includes:

[0141] Step S110: In response to starting the automatic testing tool, a connection is established with a terminal APP that cannot establish a connection with the device in the same local area network, and a debugging mode of the terminal APP is enabled through the connection.

[0142] Specifically, the debugging mode of the terminal (client) APP is a special operating mode that allows developers to debug and troubleshoot in the application. In debugging mode, the application will provide detailed log output, debugging information, and developer tools to help developers locate and solve problems. This automatic testing method not only has the function of automatically testing the device, but also has the function of automatically testing the terminal APP that cannot establish a connection with the device, which can achieve more comprehensive testing and ensure the normal operation of the device. This comprehensive testing method can help discover network connection problems between the device and the terminal APP, improve the stability and performance of the system, and ensure the normal operation of the entire system and a good user experience.

[0143] Step S500: Sending a test task to the terminal APP through the interface of the automatic testing tool.

[0144] Step S600: receiving the test result after the terminal APP executes the test task, searching for corresponding diagnostic suggestions in a preset database according to the test result, and displaying the found diagnostic suggestions so that the terminal APP and the device can establish a connection according to the diagnostic suggestions.

[0145] Specifically, step S110 solves the network connection problem between the automatic testing tool and the terminal APP, ensuring that the automatic testing tool can communicate and control the terminal APP, and providing the necessary conditions for the subsequent issuance of test tasks. Through step S500, specific test tasks can be configured and sent to the terminal APP, and the test can be performed in an automated manner to verify the functions of the terminal APP in order to discover potential problems and analyze them. In step S600, corresponding diagnostic suggestions are provided based on the test results to help solve the problem and improve the connection between the terminal APP and the device, ensuring the normal operation and stability of the system. These three steps cooperate with each other to achieve comprehensive testing and diagnosis of network connection problems between devices and terminal APPs, help discover problems, provide solutions, and ultimately ensure the normal operation and performance optimization of the system.

[0146] In some embodiments of the present application, when it is confirmed to perform an automatic test of the network connection problem of the terminal APP, the test task includes: sequentially performing APP intranet connectivity detection, APP extranet connectivity detection, APP domain name resolution detection, APP and P2P server connectivity detection, and APP and P2P server connection test detection;

[0147] The preset database includes:

[0148] If the test result shows that the APP is successfully connected to the external network but the APP domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the configuration of the device's DNS server, changing the device's DNS configuration, and resetting the device's DNS cache;

[0149] When the test result is that the APP domain name resolution is successful but the APP fails to connect to the P2P server, the corresponding diagnostic suggestions include checking the domain name access restrictions of the network where the device is located, checking the startup status and working status of the P2P server, and checking at least one of the ping function of the server corresponding to the domain name;

[0150] When the test result is that the APP fails to connect to the external network and the APP fails to connect to the P2P server, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the external network and / or checking the network configuration.

[0151] The following is a detailed description of the automatic test process for the problem that the device is online but the APP cannot connect to the device (the network connection problem of the terminal APP):

[0152] Problem description: The device (IPC or NVR) is online, but the client APP (terminal APP) cannot successfully connect to the device.

[0153] Solution: To analyze the problem, keep the automatic test tool and the terminal APP in the same LAN, turn on the debugging mode of the terminal APP, and connect the automatic test tool to the terminal APP. The automatic test tool triggers the terminal APP to perform the following test steps:

[0154] APP intranet connectivity test: ping the LAN gateway.

[0155] APP external network connectivity test: ping 114.114.114.114 and ping 8.8.8.8.

[0156] APP domain name resolution detection: ping baidu.com and ping google.com.

[0157] Connectivity test between the APP and the P2P server: ping the IP address and domain name of the P2P server.

[0158] APP and P2P server connection test detection: simple udp connection detection.

[0159] Test results and diagnostic suggestions:

[0160] 1. Pinging the domain name fails, but pinging the IP succeeds: This indicates that the DNS server configuration of the device may be incorrect. The diagnostic suggestions are as follows:

[0161] 1.1. Check whether the DNS server of the device is configured correctly;

[0162] 1.2. Please change the DNS configuration of your device;

[0163] 1.3. Reset the device's DNS cache.

[0164] 2. Pinging the P2P server domain name fails, but pinging baidu.com succeeds: The network operator may have restricted access to specific domain names, or the P2P server is not started. The diagnostic suggestions are as follows:

[0165] 2.1. Check whether the network operator where the device is located has domain name access restrictions;

[0166] 2.2. Check whether the P2P server is started and working properly;

[0167] 2.3. Check whether the server corresponding to the domain name restricts the ping function.

[0168] 3. Pinging the P2P server IP and 114.114.114.114 fails: This means the device cannot connect to the external network. The diagnostic suggestions are as follows:

[0169] 3.1. The network where the device is located may not be connected to the external network;

[0170] 3.2. Check whether the network configuration is correct.

[0171] Through the above test steps, the automatic test tool can conduct detailed analysis and diagnosis on the problem that the device is online but the terminal APP cannot successfully connect to the device, so as to determine the specific reasons why the terminal APP cannot successfully connect to the device, and provide corresponding solutions and suggestions. By gradually troubleshooting and solving the problem, it can help restore the connection status between the terminal APP and the device, ensuring that the terminal APP and the device are connected and running normally.

[0172] The P2P-based device automatic testing method of the embodiment of the present invention proposes a P2P-based IPC and NVR device automatic problem testing and analysis tool, which can automatically test the status of the device, identify problems and provide solutions. The process of using the automatic testing tool is as follows:

[0173] Connect the device or terminal APP through DID (Decentralized Identifier) / IP (Internet Protocol) (If the device is offline, you can only use the IP address to connect to the device for testing. If the device is online but the terminal APP cannot be connected, connect to the terminal APP. In other cases, use the debugging server as a relay server to ensure that there is no connectivity problem between the automatic testing tool and the device).

[0174] According to the detailed questions provided by customers, different test tasks are selected for analysis and testing.

[0175] Click the Start Test button on the interface of the automatic testing tool to issue the test task.

[0176] After the automatic test is completed, the diagnostic results of each item will be given, and the final diagnostic conclusion will be output, along with suggestions for troubleshooting the problem.

[0177] If the problem is still not solved, report it to the developer.

[0178] By executing the above automatic testing process, the P2P-based device automatic testing method can automatically identify P2P-based device problems, reduce the involvement of developers, and reduce labor costs. The P2P-based device automatic testing method also provides a unified automatic testing standard to reduce human errors. Through the device automatic testing method, common problems can be quickly located and quickly solved, avoiding long-term equipment failures.

[0179] The following is an embodiment of the electronic device provided by the present invention. The embodiment of the electronic device and the embodiment of the P2P-based device automatic testing method are of the same concept, and the details not described in detail in the embodiment of the electronic device can refer to the embodiment of the P2P-based device automatic testing method.

[0180] See also Figure 4 As shown, it is a schematic diagram of the structure of an electronic device in a hardware operating environment involved in an embodiment of the present invention.

[0181] In this embodiment, an electronic device includes:

[0182] Memory 1005, used to store program instructions; and

[0183] The processor 1001 is configured to execute the program instructions to implement the steps of the P2P-based device automatic testing method as described above.

[0184] The electronic device of the embodiment of the present invention can be a computing device such as a desktop computer, a notebook, a palm computer, and a server. Figure 4 As shown, the electronic device may include: a processor 1001 (e.g., a CPU), a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit, such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0185] Those skilled in the art will understand that Figure 4 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0186] like Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a computer program.

[0187] exist Figure 4 In the electronic device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the computer program stored in the memory 1005. When the computer program is called and executed by the processor 1001, the steps of the above-mentioned P2P-based device automatic testing method are implemented.

[0188] The following is an embodiment of the computer-readable storage medium provided by the present invention. The embodiment of the computer-readable storage medium and the embodiment of the P2P-based device automatic testing method and electronic device described above belong to the same concept, and the details not described in detail in the embodiment of the computer-readable storage medium can refer to the embodiment of the P2P-based device automatic testing method and electronic device described above.

[0189] In this embodiment, a computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the above-mentioned P2P-based device automatic testing method are implemented.

[0190] Since the electronic device and computer-readable storage medium of the present invention can implement the steps of the above-mentioned P2P-based device automatic testing method, they at least have all the beneficial effects brought by the technical solutions of the above-mentioned P2P-based device automatic testing method step embodiments, which are not described one by one here.

[0191] The above description is only a partial or preferred embodiment of the present invention. Neither the text nor the drawings can limit the scope of protection of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the overall concept of the present invention, or direct / indirect application in other related technical fields are included in the scope of protection of the present invention.

[0192] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CDROM, optical storage, etc.) containing computer-usable program codes.

[0193] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A P2P-based device automatic testing method, characterized in that: include: In response to starting the automatic test tool, a connection is established with the device to be tested in the same local area network, and a test mode of the device is started through the connection; wherein the device includes a P2P-based network camera and a network video recorder; Sending a test task to the device through the interface of the automatic testing tool; Receive the test result after the device executes the test task, search for corresponding diagnostic suggestions in a preset database according to the test result, and display the found diagnostic suggestions; wherein the preset database includes test results, diagnostic suggestions and the correspondence between the test results and the diagnostic suggestions.

2. The P2P-based device automatic testing method according to claim 1, characterized in that: When it is confirmed to automatically test the network connection problem of the device, the establishing a connection with the device to be tested in the same local area network includes: establishing a connection with the device to be tested in the same local area network through an IP address; The test tasks include: sequentially executing device intranet connectivity detection, device-side extranet connectivity detection, device-side domain name resolution detection, device-to-P2P server connectivity detection, and device-to-P2P server connection test detection; The preset database includes: When the test result is that the device is successfully connected to the external network but the domain name resolution on the device fails, the corresponding diagnostic suggestions include at least one of checking the configuration of the device's DNS server, changing the device's DNS configuration, and resetting the device's DNS cache; When the test result is that the domain name resolution on the device side is successful but the device fails to connect to the P2P server, the corresponding diagnostic suggestions include checking the domain name access restrictions of the network where the device is located, checking the startup status and working status of the P2P server, and checking at least one of the ping function of the server corresponding to the domain name; When the test result is that the device fails to connect to the external network and the device fails to connect to the P2P server, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the external network and / or checking the network configuration.

3. The P2P-based device automatic testing method according to claim 1, characterized in that: When it is confirmed to perform an automatic test on the speed of obtaining configuration information of the device, the test task includes: detecting and confirming the P2P connection type of the device, and when the P2P connection type is a P2P direct connection type, performing a P2P direct connection throughput test; when the P2P connection type is a P2P relay type, performing a relay server throughput test and / or a relay device throughput test; The preset database includes: If the test result shows that the P2P direct connection throughput is normal, the corresponding diagnostic suggestion is to check the data processing speed of the application that obtains the device configuration information when receiving and processing data; If the test result shows that the relay server throughput is abnormal and / or the relay device throughput is abnormal, the corresponding diagnostic suggestion is to check whether there are bandwidth limitations and network anomalies in the relay network environment.

4. The P2P-based device automatic testing method according to claim 1, characterized in that: When it is confirmed to perform an automatic test on the speed of image display of the device, the test task includes: sequentially performing frame type detection, I frame return speed detection, and loop test detection; The preset database includes: When the test result shows that the P frame is the first frame, the corresponding diagnostic suggestion is to analyze the data stream processing of the device; When the test result is that the I frame return speed is abnormal, the corresponding diagnostic suggestion is to check the data processing speed of the device's image display application when receiving and processing data; When the test result is that the network fluctuation during the cyclic test is abnormal, the corresponding diagnostic suggestion is to change the network environment and / or adjust the network configuration.

5. The P2P-based device automatic testing method according to claim 1, characterized in that: After the automatic test tool is started, the method further includes: Establish a connection with a terminal APP that cannot establish a connection with the device in the same local area network, and enable the debugging mode of the terminal APP through the connection; Sending a test task to the terminal APP through the interface of the automatic testing tool; Receive the test result after the terminal APP executes the test task, search for corresponding diagnostic suggestions in a preset database according to the test result, and display the found diagnostic suggestions so that the terminal APP and the device can establish a connection according to the diagnostic suggestions.

6. The P2P-based device automatic testing method according to claim 5, characterized in that: When it is confirmed to automatically test the network connection problem of the terminal APP, the test task includes: sequentially performing APP intranet connectivity detection, APP extranet connectivity detection, APP domain name resolution detection, APP and P2P server connectivity detection, and APP and P2P server connection test detection; The preset database includes: If the test result shows that the APP is successfully connected to the external network but the APP domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the configuration of the device's DNS server, changing the device's DNS configuration, and resetting the device's DNS cache; When the test result is that the APP domain name resolution is successful but the APP fails to connect to the P2P server, the corresponding diagnostic suggestions include checking the domain name access restrictions of the network where the device is located, checking the startup status and working status of the P2P server, and checking at least one of the ping function of the server corresponding to the domain name; When the test result is that the APP fails to connect to the external network and the APP fails to connect to the P2P server, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the external network and / or checking the network configuration.

7. The P2P-based device automatic testing method according to claim 1, characterized in that: After establishing a connection with the device to be tested in the same local area network and before enabling the test mode of the device through the connection, the method further includes: confirming that the unique identifier of the device passes identity authentication.

8. The P2P-based device automatic testing method according to claim 7, characterized in that: After displaying the found diagnostic suggestions, the method further includes: recording the unique identifier of the device, the test results of the device, and the diagnostic suggestions corresponding to the test results, and generating and displaying a diagnostic report in combination with the unique identifier, the test results and the diagnostic suggestions.

9. An electronic device, characterized in that: include: A memory for storing program instructions; as well as A processor is used to execute the program instructions to implement the steps of the P2P-based device automatic testing method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the steps of the P2P-based device automatic testing method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Monitoring and diagnosing system, and network monitoring and diagnosing method

    CN108124280A

  • Method and device for diagnosing network, electronic equipment and readable medium

    CN112311620A

  • WiFi connection condition diagnosis and restoration method

    CN113079513A

  • Network connection test method and device, repeater and storage medium

    CN115037664A

  • Throughput testing method, system and device based on iperf and medium

    CN117221186A