P2P-Based Automatic Device Testing Method, Electronic Device, and Storage Medium

By establishing a connection with P2P devices within the LAN and sending test tasks, receiving and analyzing test results, and providing automated diagnostic suggestions, the problem of inefficient testing of P2P devices is solved, and efficient operation and maintenance and automated testing are achieved.

CN119341943BActive Publication Date: 2025-07-08SHENZHEN XINRUISHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The testing methods of existing P2P devices are inefficient, have too high dependence on developers, and their operation and maintenance work is complex and inefficient.

Method used

Through automatic testing tools, establish connections with devices within the LAN, send test tasks, receive test results, and find diagnostic suggestions in preset databases, and provide automated testing methods for devices.

Benefits of technology

It reduces the workload of operation and maintenance personnel, reduces the dependence on developers, improves testing efficiency, and helps operation and maintenance personnel to quickly obtain suggestions for solving problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341943B_ABST
    Figure CN119341943B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and in particular, to a device automatic testing method, an electronic device, and a computer-readable storage medium based on P2P, including: in response to starting an automatic testing tool, establishing a connection with a device to be tested within the same local area network, and enabling a testing mode of the device through the connection; sending a testing task to the device through an interface of the automatic testing tool; receiving a test result after the device executes the testing task, searching for a corresponding diagnostic suggestion in a preset database according to the test result, and displaying the found diagnostic suggestion. This device automatic testing method can automatically establish a connection with a device to be tested, send a testing task, receive and analyze the test result of the device, and display a diagnostic suggestion according to the test result, which not only reduces the workload of operation and maintenance personnel, but also reduces the dependence on developers, improves the testing efficiency, and makes the operation and maintenance work more efficient and automated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the continuous development of network monitoring technologies, people's demand for network monitoring devices has also been increasing. After the network monitoring devices leave the factory, long-term operation and maintenance work still need to be carried out to ensure the normal operation of the devices. With the continuous increase in the number of monitoring devices, the operation and maintenance and management of the monitoring system have become more complex. Currently, more and more network monitoring devices begin to use the P2P protocol for communication, such as IPC (Internet Protocol Camera) and NVR (Network Video Recorder) based on the P2P protocol, and this trend has also brought a series of new challenges and problems. For example: As the number of network monitoring devices based on the P2P protocol continues to increase, the problems encountered in the operation and maintenance work also increase accordingly. However, general operation and maintenance personnel or after-sales personnel have limited understanding of technologies and cannot access some confidential information, resulting in poor operation and maintenance effects. In this context, the operation and maintenance work heavily rely on the technical support of developers. The general operation and maintenance work process is usually: the operation and maintenance personnel report problems, the developers collect the test data of the problems, and directly perform manual analysis on the test data to obtain test results, give diagnostic suggestions according to the test results, and then the operation and maintenance personnel perform debugging according to the diagnostic suggestions to solve the problems. This way of analyzing and testing is inefficient, and at the same time, it also greatly increases the workload of developers and makes them unable to focus on their own R & D work. Summary of the Invention

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

[0004] To solve the above problems, the present invention adopts the following technical solutions:

[0005] In a first aspect, the present invention provides an automatic device testing method based on P2P, including:

[0006] In response to starting the automatic testing tool, establish a connection with the device to be tested within the same local area network, and start the testing mode of the device through the connection; wherein, the device includes a network camera and a network video recorder based on P2P;

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

[0008] Receive the test results after the device executes the test task, search for corresponding diagnostic suggestions in a preset database according to the test results, and display 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.

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

[0010] The test task includes: sequentially performing device internal network connectivity detection, device external network connectivity detection, device domain name resolution detection, device connectivity detection with the P2P server, and device connection test detection with the P2P server;

[0011] The preset database includes:

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

[0013] When the test result is that the device domain name resolution is successful but the device connectivity with the P2P server fails, the corresponding diagnostic suggestions include at least one of checking the domain name access restrictions of the network where the device is located, checking the power-on state and working state of the P2P server, and checking the ping function of the domain name corresponding server;

[0014] When the test result is that the device external network connectivity fails and the device connectivity with the P2P server fails, the corresponding diagnostic suggestions include detecting the connection state 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 perform an automatic test on the speed problem 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 P2P direct connection type, performing P2P direct connection throughput test; when the P2P connection type is P2P relay type, performing relay server throughput test and / or relay device throughput test;

[0016] The preset database includes:

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

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

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

[0020] The preset database includes:

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

[0022] When the test result shows abnormal I-frame return speed, 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 shows abnormal network fluctuations during the loop test, the corresponding diagnostic suggestion is to change the network environment and / or adjust the network configuration.

[0024] Further, after starting the automatic test tool, it also includes:

[0025] Establish a connection with a terminal APP that cannot establish a connection with the device within the same local area network, and turn on the debug mode of the terminal APP through this connection;

[0026] Send test tasks to the terminal APP through the interface of the automatic test tool;

[0027] Receive the test results after the terminal APP executes the test tasks, search for the corresponding diagnostic suggestions in the preset database according to the test results, and display the found diagnostic suggestions, so as to establish a connection between the terminal APP and the device according to the diagnostic suggestions.

[0028] Further, when it is confirmed to perform an automatic test on the network connection problem of the terminal APP, the test tasks include: sequentially performing APP intranet connectivity detection, APP extranet connectivity detection, APP domain name resolution detection, APP connectivity detection with the P2P server, and APP connection test detection with the P2P server;

[0029] The preset database includes:

[0030] When the test result is that the APP extranet connectivity is successful but the APP domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the DNS server configuration of the device, changing the DNS configuration of the device, and resetting the DNS cache of the device;

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

[0032] When the test result shows that the APP fails to connect to the external network and the connection between the APP and the P2P server fails, 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] Further, after establishing a connection with the device to be tested within the same local area network and before enabling the test mode of the device through the connection, it further includes: confirming that the unique identifier of the device passes authentication.

[0034] Further, after displaying the found diagnostic suggestions, it further includes: recording the unique identifier of the device, the test result of the device, and the diagnostic suggestions corresponding to the test result, and generating and displaying a diagnostic report by combining the unique identifier, the test result, and the diagnostic suggestions.

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

[0036] A memory for storing program instructions; and

[0037] A processor for executing the program instructions to implement the steps of the P2P-based device automatic test method as described above.

[0038] In a third aspect, the present invention further provides a computer-readable storage medium, where 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 test method as described above are implemented.

[0039] Compared with the prior art, the beneficial effects of the present invention are as follows: A P2P-based device automatic testing method, an electronic device, and a computer-readable storage medium, including: in response to starting an automatic testing tool, establishing a connection with a device to be tested within the same local area network, and enabling the testing mode of the device 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; receiving the test result after the device executes the test task, searching for a corresponding diagnostic suggestion in a preset database according to the test result, and displaying the found diagnostic suggestion; 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 this P2P-based device automatic testing method, electronic device, and 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 operation and maintenance personnel but also reduces the dependence on developers and improves the testing efficiency. In addition, displaying the corresponding diagnostic suggestion according to the test result can also help operation and maintenance personnel 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] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

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

[0042] Figure 2 It is a schematic flowchart of the second embodiment of the P2P-based device automatic testing method of the present invention;

[0043] Figure 3 It is a schematic flowchart of the third embodiment of the P2P-based device automatic testing method of the present invention;

[0044] Figure 4 It is a schematic structural diagram of an electronic device in the hardware operating environment related to the embodiment solution of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] Next, the solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

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

[0047] In addition, if there are descriptions such as "first", "second", etc. involved in the embodiments of the present invention, then such descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0048] Please refer to Figure 1 as shown, which is a schematic flowchart of the first embodiment of the P2P-based device automatic test method of the present invention.

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

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

[0051] Among them, the device includes a P2P-based network camera and a network video recorder.

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

[0053] Specifically, a Local Area Network (LAN) refers to a network composed 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 under test within the same LAN, the automatic test tool can directly transmit data, send commands, and receive data from the device without going through the Internet or other network relays. This can reduce communication latency and improve the stability and reliability of communication. In addition, devices within a LAN usually operate in the same network environment and have similar network configurations and protocol support, which helps maintain the compatibility and interoperability between the automatic test tool and the device under test. Therefore, establishing a connection with the device under test within the same LAN can ensure effective communication between the automatic test tool and the device, providing the necessary conditions and foundation for subsequent 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 enables the test mode, it enters a special state where it can execute test tasks and send test results to ensure that the device accurately executes test tasks as expected during the test process.

[0055] Specifically, P2P-based network cameras and network video recorders refer to camera and 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 require forwarding through a central server but instead transmits data through direct connections 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 traditional central server architectures, P2P-based network cameras and network video recorders can automatically traverse Network Address Translation (NAT) devices in the network, eliminating the need for manual port mapping, simplifying the network setup process; they can also avoid the single point of failure of the central server, improving the stability and reliability of connections; and they can directly transmit data between devices, reducing data transmission latency and bandwidth consumption. P2P-based network cameras and network video recorders have extensive applications 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: Send a test task to the device through the interface of the automatic test tool.

[0057] Specifically, the automatic test tool provides a user-friendly interface for users to select or input test tasks, as well as related 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 executed, set test parameters, specify the address or identifier of the device under test, etc. Users can interact with the automatic test tool through the interface according to specific test requirements and transfer 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 transfer the corresponding test task to the device under test for the device to execute.

[0058] Step S300: Receive the test result after the device executes the test task, search for the corresponding diagnostic suggestion in the preset database according to the test result, and display the found diagnostic suggestion.

[0059] Among them, the preset database includes test results, diagnostic suggestions, and the corresponding relationship between the test results and the diagnostic suggestions.

[0060] Specifically, in the preset database, various possible test results and the corresponding diagnostic suggestions are stored. By matching the test result 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 accelerating the speed of fault troubleshooting and problem solving and improving operation and maintenance efficiency.

[0061] Compared with the prior art, the P2P-based device automatic test method according to the embodiments of the present invention can automatically establish a connection with the device under test and send a test task, receive and analyze the test result of the device, which not only reduces the workload of operation and maintenance personnel but also reduces the dependence on developers and improves the test efficiency. In addition, displaying the corresponding diagnostic suggestion according to the test result can also help operation and maintenance personnel 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] Please refer to Figure 2 shown, which is a schematic flowchart of the second embodiment of the P2P-based device automatic test method of the present invention.

[0063] Compared with other embodiments of the P2P-based device automatic test method, this embodiment details the step of enabling 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 testing tool, establish a connection with the device to be tested within the same local area network. If it is confirmed that the unique identifier of the device passes authentication, then open the testing mode of the device through the connection.

[0066] Specifically, the unique identifier of the device is the unique identity certificate of the device, including the MAC address, serial number or other specific identifiers of the device. By verifying the unique identifier of the device, it can be ensured that the automatic testing tool establishes a connection with the correct device, avoiding confusion or misoperation with other devices, and enabling communication and operation between the automatic testing tool and the correct device. The specific authentication method can be determined according to the characteristics and requirements of the device. A relatively common method is that before opening the testing mode of the device, the automatic testing tool sends an authentication request to the device, asking the device to provide its unique identifier. After receiving the request, the device will reply with a response containing its unique identifier. The automatic testing 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 authentication and can continue to establish a connection with the device and open the testing mode of the device. Confirming that the unique identifier of the device passes authentication can improve the security and accuracy of the system, ensure that the automatic testing tool interacts with the correct device, and thus effectively execute the testing task.

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

[0068] Specifically, the user can select or define the corresponding testing task on the interface of the automatic testing tool according to specific problems or requirements. This involves selecting different testing types, setting different parameters or specifying different testing processes to adapt to different testing problems. Therefore, sending a testing task to the device through the interface of the automatic testing tool can flexibly adapt to different testing problems and customize the corresponding testing task for each specific problem or requirement. This flexibility and customization can better meet different testing needs and improve the accuracy and effectiveness of the testing.

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

[0070] The described test tasks include: sequentially performing device internal network connectivity detection, device external network connectivity detection, device domain name resolution detection, device and P2P server connectivity detection, and device and P2P server connection test detection;

[0071] The described preset database includes:

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

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

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

[0075] Specifically, the device internal network connectivity detection is used to detect whether the device can communicate with other devices in the internal network. If the device cannot establish a connection with other devices in the internal network, it may be caused by reasons such as network configuration, firewall settings, or device failures. The device external network connectivity detection 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 caused by reasons such as router configuration, network settings, firewall restrictions, or ISP (Internet Service Provider) problems. The device domain name resolution detection 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 caused by reasons such as DNS configuration errors, domain name server failures, or network setting problems. The device and P2P server connectivity detection 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 caused by reasons such as network congestion, port restrictions, P2P server failures, or network configuration problems. The device and P2P server connection test detection is used to test the connection quality and stability between the device and the P2P server. By performing the connection test, indicators such as latency, packet loss rate, and bandwidth between the device and the P2P server can be evaluated to determine the reliability and performance of the connection. By sequentially performing the above test tasks, the network connection status of the device can be comprehensively evaluated to help locate and solve the network connection problems of the device.

[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 ICMP (Internet Control Message Protocol) echo request messages to the target host and waiting for the target host to return echo reply messages. The Ping function is often used to detect whether the network connection is normal, measure network latency 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 transport protocol that does not guarantee the reliable transmission of data but has low latency. In UDP connection detection, the sending end 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 indicates 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 details the automatic test process for the device not being online (the network connection problem of the device):

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

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

[0080] Device internal network connectivity detection: Ping the local area network gateway.

[0081] Device external network connectivity detection: Ping 114.114.114.114 and Ping 8.8.8.8.

[0082] Device domain name resolution detection: Ping baidu.com and Ping google.com.

[0083] Device connectivity detection with the P2P server: Ping the IP of the P2P server and the domain name of the P2P server.

[0084] Device connection test detection with the P2P server: Simple UDP connection detection.

[0085] Test results and diagnostic suggestions:

[0086] 1. Failure to ping the domain name but success in pinging the IP: It 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 correctly configured;

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

[0089] 1.3. Reset the DNS cache of the device.

[0090] 2. The ping of the P2P server domain name fails, but the ping of baidu.com is successful: It may be that the network operator has restricted access to specific domain names, or the P2P server has not been 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 has been started and is working properly;

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

[0094] 3. Neither the ping of the P2P server IP nor the ping of 114.114.114.114 is successful: It means that 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 a detailed analysis and diagnosis of the problem of the device being offline, determine the specific reasons for the device's inability to connect normally, and provide corresponding solutions and suggestions. By gradually troubleshooting and solving problems, it can help restore the online state of the device and ensure the normal connection and operation of the device.

[0098] In some embodiments of the present application, when it is confirmed to conduct an automatic test on the speed problem of obtaining configuration information of the device, the test tasks include: detecting and confirming the P2P connection type of the device. When the P2P connection type is the P2P direct connection type, a P2P direct connection throughput test is conducted; when the P2P connection type is the P2P relay type, a relay server throughput test and / or a relay device throughput test is conducted;

[0099] The preset database includes:

[0100] When the test result shows that the P2P direct connection throughput is normal (P2P direct connection throughput being normal means that the P2P direct connection throughput has reached the expected performance level during the test, the data transmission speed is stable, and there are no obvious delays or packet loss phenomena), the corresponding diagnostic suggestion is to check the data processing speed of the application program that obtains the device configuration information when receiving and processing data;

[0101] When the test result shows that the relay server throughput is abnormal (relay server throughput being abnormal means that the relay server throughput is lower than the expected performance level during the test, the data transmission speed is unstable, and there are obvious delays or packet loss phenomena) and / or the relay device throughput is abnormal (relay device throughput being abnormal means that the relay device throughput is lower than the expected performance level during the test, the data transmission speed is unstable, and there are obvious delays or packet loss phenomena), the corresponding diagnostic suggestion is to check whether there are bandwidth restrictions 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 type and relay type. Different P2P connection types may result in different network transmission performances and speeds. Therefore, it is very important to confirm the P2P connection type of the device. If the P2P connection type of the device is the direct connection type, conducting the P2P direct connection throughput test can evaluate the data transmission speed and stability with the device. This helps determine the network performance of the device in the direct connection mode to rule out throughput problems in the direct connection mode. If the P2P connection type of the device is the relay type, then the relay server throughput test and / or the relay device throughput test need to be conducted. These tests can help evaluate the data transmission performance of the device in the relay mode, determine the throughput problems in the relay mode, and find possible bottlenecks and improvement solutions. By conducting the above tests, the network transmission performance of the device under different P2P connection types can be comprehensively evaluated, the problems causing the slow speed of obtaining the device configuration information can be identified, and corresponding optimization suggestions and improvement measures can be proposed.

[0103] The following details the automatic test process for the problem of slow acquisition of device configuration information (the speed problem of the device in obtaining configuration information):

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

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

[0106] Connection mode detection.

[0107] P2P direct connection throughput test: Conduct a direct data throughput test between the automated test tool and the device, and feedback the test results to the automated test tool.

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

[0109] Forwarding device throughput test: Conduct data throughput tests between the automated test tool and the forwarding device, and between the forwarding device and the device, analyze the transmission speed of each link, and identify possible bottlenecks.

[0110] Test results and diagnostic suggestions:

[0111] The P2P direct connection throughput is normal but the acquisition of device configuration information is slow: This indicates that the problem lies in the application layer. It is recommended to check the data processing speed of the application layer.

[0112] There is a throughput bottleneck in a certain link of the forwarding link: It is recommended to check whether there are bandwidth limitations or network instability in the network environment of the automated test tool, the device, or the forwarding server respectively.

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

[0114] In some embodiments of the present application, when it is confirmed to conduct an automated test on the speed problem of image display of the device, the test tasks include: sequentially performing frame type detection, I-frame return speed detection, and loop test detection;

[0115] The preset database includes:

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

[0117] When the test result is that the I-frame return speed is abnormal (the I-frame return speed being abnormal 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 stuttering, delay, or discontinuity in image display), the corresponding diagnostic suggestion is to check the data processing speed of the application program for image display of the device when receiving and processing data;

[0118] When the test result shows abnormal network fluctuations during loop testing (abnormal network fluctuations during loop testing refer to the situation where, during the loop testing process, the network fluctuations exceed the expected range, manifested as drastic fluctuations in data transmission speed, persistent delays or packet loss, as well as data transmission interruptions or instability), the corresponding diagnostic suggestion 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. Knowing the frame type can help evaluate the efficiency and performance of image display. An I-frame is a key frame in the video sequence that contains complete image information, while other frames are incremental data relative to the I-frame. Therefore, the return speed of the I-frame is crucial for the fast display and smoothness of video images. By detecting the I-frame return speed, the response speed and efficiency of the device when displaying video images can be evaluated. By conducting loop testing, 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 problems such as a decrease in image display speed that may occur during long-term operation of the device. By sequentially performing these test tasks, the performance and stability of the device when displaying images can be comprehensively 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 details the automatic test process for the problem of slow image display when the device is normally connected (the speed problem of the device's image display):

[0121] Problem description: The device is successfully connected and configuration information is obtained, but the screen loading speed is very slow.

[0122] Solution: To analyze this problem, the automatic test tool sets the device to test mode and conducts 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 type of the first frame (I-frame or P-frame) returned by the device.

[0124] I-frame return speed: Calculate the time taken from connection to the return of the I-frame.

[0125] Multiple loop tests: Support configuring multiple detections to help identify occasional network latency problems.

[0126] Test results and diagnostic suggestions:

[0127] The I-frame returns too slowly: The problem may lie in the application layer data processing speed. It is recommended to contact the developer for further investigation.

[0128] P-frame as the first frame: Abnormal (P-frames need 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 large network fluctuations: It is recommended to change the network environment or adjust the network configuration to rule out bandwidth limitations and unstable network environment factors.

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

[0131] Step S300: Receive the test results after the device executes the test task, search for the corresponding diagnostic suggestions in the preset database according to the test results, and display the found diagnostic suggestions.

[0132] Among them, the preset database includes test results, diagnostic suggestions, and the corresponding relationship between the test results and the diagnostic suggestions.

[0133] Specifically, the preset database can store test results, diagnostic suggestions, and their corresponding relationships in various forms. For example: relational database form and file storage form. A relational database can use relational database management systems such as MySQL and PostgreSQL to create the preset database. In the database, multiple tables can be established, such as a test results table, a diagnostic suggestions table, and an association table to store test results and corresponding diagnostic suggestions. Through the association between tables, the corresponding relationship between test results and diagnostic suggestions can be realized. The preset database can also be stored in the form of files, such as JSON, XML, etc. Storing data in files can facilitate reading and modification. Different forms of preset databases are suitable for different scenarios and requirements. According to specific application requirements and system architectures, choosing the appropriate form of preset database can improve the efficiency and performance of data management.

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

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

[0136] The P2P-based device automatic testing method according to the embodiments 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 achieve remote automated testing. The automatic testing tool therein can also record the test results and diagnostic suggestions after each automatic execution of the test task for the reference of the operation and maintenance personnel to achieve detailed log recording. The automatic testing method can also generate a detailed diagnostic report according to the test results to guide the operation and maintenance personnel to solve problems to achieve problem feedback and guidance.

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

[0138] Please refer to Figure 3 as shown, which is a schematic flowchart of the third embodiment of the P2P-based device automatic testing method of the present invention.

[0139] Compared with other embodiments of the P2P-based device automatic testing method, this embodiment adds the 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, establish a connection with the terminal APP that cannot establish a connection with the device within the same local area network, and turn on the debugging mode of the terminal APP through the connection.

[0142] Specifically, the debugging mode of the terminal (client) APP is a special operating mode that allows developers to perform debugging and troubleshooting in the application. In the debugging mode, the application will provide detailed log outputs, debugging information, and developer tools to help developers locate and solve problems. The 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: Send a test task to the terminal APP through the interface of the automatic test tool.

[0144] Step S600: Receive the test result after the terminal APP executes the test task, search for the corresponding diagnostic suggestion in the preset database according to the test result, and display the found diagnostic suggestion, so as to establish a connection between the terminal APP and the device according to the diagnostic suggestion.

[0145] Specifically, step S110 solves the network connection problem between the automatic test tool and the terminal APP, ensures that the automatic test tool can communicate and control with the terminal APP, and provides 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 is executed in an automated manner to test the functions of the terminal APP, so as to discover potential problems and conduct analysis. In step S600, corresponding diagnostic suggestions are provided according to the test results to help solve problems 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 a comprehensive test and diagnosis of the network connection problems of the device and the terminal APP, 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 on 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 connectivity detection with the P2P server, and APP connection test detection with the P2P server;

[0147] The preset database includes:

[0148] When the test result is that the APP extranet connectivity is successful but the APP domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the DNS server configuration of the device, changing the DNS configuration of the device, and resetting the DNS cache of the device;

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

[0150] When the test result is that the APP extranet connectivity fails and the APP connectivity with the P2P server fails, the corresponding diagnostic suggestions include detecting the connection status between the network where the device is located and the extranet 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 (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 this problem, keep the automatic test tool and the terminal APP in the same local area network, enable the debug mode of the terminal APP, let the automatic test tool connect to the terminal APP, and the automatic test tool triggers the terminal APP to execute the following test steps:

[0154] APP internal network connectivity detection: Ping the local area network gateway.

[0155] APP external network connectivity detection: 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] APP connectivity detection with the P2P server: Ping the IP of the P2P server and the domain name of the P2P server.

[0158] APP connection test detection with the P2P server: Simple UDP connection detection.

[0159] Test results and diagnostic suggestions:

[0160] 1. Failure to ping the domain name but success in pinging the IP: It 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 the device;

[0163] 1.3. Reset the DNS cache of the device.

[0164] 2. Failure to ping the P2P server domain name but success in pinging baidu.com: It may be that the network operator has restricted access to specific domain names, or the P2P server has not been started. The diagnostic suggestions are as follows:

[0165] 2.1. Check whether there is a domain name access restriction by the network operator where the device is located;

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

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

[0168] 3. If both the P2P server IP and 114.114.114.114 cannot be pinged: It indicates that 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 a 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 for the failure of the terminal APP to successfully connect to the device, and provide corresponding solutions and suggestions. By gradually troubleshooting and solving problems, it can help restore the connection status between the terminal APP and the device, and ensure the normal connection and operation of the terminal APP and the device.

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

[0173] Connect to the device or the terminal APP through DID (Decentralized Identifier, device unique identifier) / IP (Internet Protocol, Internet protocol) (when the device is not online, only the IP address can be used to connect to the device for testing; when the device is online but the terminal APP cannot connect, connect to the terminal APP; in other cases, use the debug server as the relay server to ensure that there is no problem with the connectivity between the automatic test tool and the device).

[0174] According to the detailed problems fed back by the customer, select different test tasks for analysis and testing.

[0175] Click the start test button on the interface of the automatic test tool to issue a 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, and suggestions for troubleshooting problems will be given.

[0177] If the problem is still not solved, it will be fed back to the developers.

[0178] By executing the above automatic test process, the P2P-based device automatic test method can automatically identify P2P-based device problems, reduce the intervention of developers, and lower labor costs. The P2P-based device automatic test method also provides a unified automatic test standard, reducing human errors. Through this device automatic test method, common problems can be quickly located and resolved, avoiding long-term device failures.

[0179] The following are embodiments of the electronic device provided by the present invention. The embodiments of the electronic device and the embodiments of the above P2P-based device automatic test method belong to the same concept. For the details not described in detail in the embodiments of the electronic device, reference can be made to the embodiments of the above P2P-based device automatic test method.

[0180] Please refer to Figure 4 as shown, which is a schematic structural diagram of an electronic device in the hardware operating environment involved in the embodiment solution of the present invention.

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

[0182] A memory 1005 for storing program instructions; and

[0183] A processor 1001 for executing the program instructions to implement the steps of the P2P-based device automatic test 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. As Figure 4 shown, the electronic device may include: a processor 1001 (such as 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 implement connection communication between these components. The user interface 1003 may include a display screen (Display) and an input unit, such as a keyboard (Keyboard). Optionally, the user interface 1003 may further 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. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0185] Those skilled in the art can understand that Figure 4 the structure of the electronic device shown in does not constitute a limitation on the electronic device, and it may include more or fewer components than shown, or combine some components, or have different component arrangements.

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

[0187] In Figure 4 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 side) 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 test 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 embodiments of the above-mentioned P2P-based device automatic test method and electronic device belong to the same concept. For the details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiments of the above-mentioned P2P-based device automatic test method and electronic device.

[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 test method are implemented.

[0190] For the electronic device and computer-readable storage medium of the present invention, since they can both implement the steps of the above-mentioned P2P-based device automatic test method, they at least have all the beneficial effects brought by the technical solutions of the embodiments of the steps of the above-mentioned P2P-based device automatic test method, which will not be elaborated here one by one.

[0191] The above are only partial or preferred embodiments of the present invention. Neither the text nor the drawings can limit the scope of protection of the present invention. Any equivalent structural transformation made using the content of the specification and drawings of the present invention under the concept of a whole of the present invention, or any direct / indirect application in other related technical fields, is included in the scope of protection of the present invention.

[0192] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0193] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of flows and / or blocks in the flowcharts and / or block diagrams. These computer program instructions can be provided to the 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 for implementing in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.

[0194] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the process Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide for implementing the process Figure 1 one process or multiple processes and / or blocks Figure 1 the steps of the functions specified in one block or multiple blocks.

[0196] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the specific implementation manners of the present invention can still be modified or equivalently replaced, and any modification or equivalent replacement without departing from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.

Claims

1. An automatic device testing method based on P2P, characterized in that, Including: In response to starting the automatic test tool, establish a connection with the device to be tested within the same local area network, and enable the test mode of the device through the connection; wherein, the device includes a P2P-based network camera and a network video recorder. Send a test task to the device through the interface of the automatic test tool. Receive the test result after the device executes the test task, search for the corresponding diagnostic suggestion in the preset database according to the test result, and display the found diagnostic suggestion; wherein, the preset database includes test results, diagnostic suggestions, and the corresponding relationship between the test results and the diagnostic suggestions. When it is confirmed to perform an automatic test on the speed problem of obtaining configuration information of the device, the test task includes: detecting and confirming the P2P connection type of the device. When the P2P connection type is P2P direct connection type, perform P2P direct connection throughput test; when the P2P connection type is P2P relay type, perform relay server throughput test and / or relay device throughput test. The preset database includes: When the test result is that the P2P direct connection throughput is normal, the corresponding diagnostic suggestion is to check the data processing speed of the application program for obtaining the device configuration information when receiving and processing data. When the test result is that the relay server throughput is abnormal and / or the relay device throughput is abnormal, the corresponding diagnostic suggestion is to check whether there is bandwidth limitation and network abnormality in the relay network environment.

2. The P2P-based device automatic test method according to claim 1, wherein: When it is confirmed to perform an automatic test on the network connection problem of the device, the establishing a connection with the device to be tested within the same local area network includes: establishing a connection with the device to be tested through the IP address within the same local area network. The test task includes: sequentially performing device internal network connectivity detection, device external network connectivity detection at the device end, device end domain name resolution detection, device and P2P server connectivity detection, and device and P2P server connection test detection. The preset database includes: When the test result is that the device external network connectivity at the device end is successful but the device end domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the DNS server configuration of the device, changing the DNS configuration of the device, and resetting the DNS cache of the device. When the test result is that the device end domain name resolution is successful but the device and P2P server connectivity fails, the corresponding diagnostic suggestions include at least one of checking the domain name access restriction of the network where the device is located, checking the power-on state and working state of the P2P server, and checking the ping function of the server corresponding to the domain name. When the test result is that the device external network connectivity at the device end fails and the device and P2P server connectivity fails, the corresponding diagnostic suggestions include detecting the connection state between the network where the device is located and the external network and / or checking the network configuration.

3. The P2P-based device automatic test method according to claim 1, wherein: 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. The preset database includes: When the test result is that a P-frame is the first frame, the corresponding diagnostic suggestion is to analyze the data stream processing situation of the device; When the test result is that the return speed of an I-frame is abnormal, the corresponding diagnostic suggestion is to check the data processing speed of the image display application of the device when receiving and processing data; When the test result is abnormal network fluctuation during loop testing, the corresponding diagnostic suggestion is to change the network environment and / or adjust the network configuration.

4. The P2P-based device automatic testing method according to claim 1, wherein After starting the automatic test tool, it further includes: Establish a connection with a terminal APP that cannot establish a connection with the device within the same local area network, and enable the debugging mode of the terminal APP through the connection; Send a test task to the terminal APP through the interface of the automatic test tool; Receive the test result after the terminal APP executes the test task, search for the corresponding diagnostic suggestion in the preset database according to the test result, and display the found diagnostic suggestion, so as to establish a connection between the terminal APP and the device according to the diagnostic suggestion.

5. The P2P-based device automatic test method according to claim 4, wherein: When it is confirmed to perform an automatic test on 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 connectivity detection with the P2P server, and APP connection test detection with the P2P server; The preset database includes: When the test result is that the APP extranet connectivity is successful but the APP domain name resolution fails, the corresponding diagnostic suggestions include at least one of checking the DNS server configuration of the device, changing the DNS configuration of the device, and resetting the DNS cache of the device; When the test result is that the APP domain name resolution is successful but the APP connectivity with the P2P server fails, the corresponding diagnostic suggestions include at least one of checking the domain name access restriction of the network where the device is located, checking the power-on state and working state of the P2P server, and checking the ping function of the server corresponding to the domain name; When the test result is that the APP extranet connectivity fails and the APP connectivity with the P2P server fails, the corresponding diagnostic suggestions include detecting the connection state between the network where the device is located and the extranet and / or checking the network configuration.

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

7. The P2P-based automatic device testing method according to claim 6, wherein After displaying the found diagnostic suggestion, it further includes: recording the unique identifier of the device, the test result of the device, and the diagnostic suggestion corresponding to the test result, and generating and displaying a diagnostic report in combination with the unique identifier, the test result, and the diagnostic suggestion.

8. An electronic device, characterized in that, It includes: A memory for storing program instructions; And A processor for executing the program instructions to implement the steps of the P2P-based device automatic test method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, implement the steps of the P2P-based device automatic testing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

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

    CN108124280A

  • WiFi connection condition diagnosis and restoration method

    CN113079513A