A network port automatic detection method, device, system and readable storage medium
By automatically switching the network port connection status through a microcontroller and testing via a direct connection channel, the problem of low network port testing efficiency in existing technologies is solved, enabling fast and efficient network port stability detection and anomaly location.
Patent Information
- Application Number
- CN202310428071.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-04-19
AI Technical Summary
In existing technologies, the testing methods for network ports of electronic devices require manual plugging and unplugging of network cables, resulting in low testing efficiency and long testing time, making it difficult to ensure the stability of network ports in environments with frequent plugging and unplugging.
The microcontroller switches the network port connection status between itself and the device under test, and sends and receives test information through a direct connection channel that is not connected to the network port, thus automating the network port stability test.
It enables fast and efficient network port stability testing, reduces labor costs, improves testing speed and result reliability, can perform a large number of tests in a short time, and can locate the cause of anomalies.
Smart Images

Figure CN118827487B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network device detection, and in particular to a network port automatic detection method, device, system and readable storage medium. BACKGROUND
[0002] Although wireless networks are widely used in life, in some scenarios, electronic devices still need to connect to the network through wired mode. When using wired networks, electronic devices can connect to the network through network cables. For electronic devices that frequently switch network environments, this results in the electronic devices possibly needing to frequently plug and unplug network cables.
[0003] If the network port stability of an electronic device is poor, frequently plugging and unplugging network cables can cause problems such as the inability to identify the IP address of the electronic device, and therefore, the network port of the electronic device needs to be tested to ensure that it can still normally connect to the network when frequently plugging and unplugging network cables.
[0004] The current conventional testing method needs a tester to manually plug and unplug network cables or turn on and off the power supply of the device. When there are many devices to be tested and the number of tests is large, a large amount of manpower is consumed, and the testing efficiency is low. SUMMARY
[0005] To solve the problems of the prior art, the embodiments of the present application provide a network port automatic detection method, device, system and readable storage medium. The technical solution is as follows:
[0006] In a first aspect, a network port automatic detection method is provided, comprising the following steps:
[0007] The microcontroller switches the network connection state of the first connection channel and generates corresponding test information, wherein the first connection channel is a channel connected through a network port between the microcontroller and a device to be tested;
[0008] The microcontroller sends the test information to the device to be tested through a second connection channel, wherein the second connection channel is a channel directly connected between an interface of the microcontroller and an interface of the device to be tested and is not connected through a network port;
[0009] The microcontroller receives a test result fed back by the device to be tested through the second connection channel, wherein the test result is used to represent the stability of the network port of the device to be tested.
[0010] Further, the microcontroller switches the network connection state of the first connection channel and generates corresponding test information, comprising:
[0011] The microcontroller controls the first connection channel to switch from a first state to a second state, wherein the first connection channel is a channel for connecting the microcontroller and the device to be tested through a network port, the first state is a connected state, and the second state is a disconnected state; or the first state is a disconnected state, and the second state is a connected state.
[0012] The microcontroller generates test information corresponding to the second state.
[0013] Further, the method further comprises:
[0014] If the test result is a connection abnormality or a disconnection abnormality, the microcontroller acquires and stores a test start time, which is a time of switching the network connection state of the first connection channel.
[0015] Further, the method further comprises:
[0016] If the test result is a connection abnormality or a disconnection abnormality, the microcontroller issues an alarm information.
[0017] Further, the method further comprises: if the test result is a connection normality or a disconnection normality, the microcontroller re-executes switching the network connection state of the first connection channel between the microcontroller and the device to be tested.
[0018] In a second aspect, a network port automatic detection method is provided, comprising the following steps:
[0019] The device to be tested receives test information sent by the microcontroller through a second connection channel, wherein the second connection channel is a direct connection between an interface of the microcontroller and an interface of the device to be tested, and is not a channel connected through a network port.
[0020] The device to be tested generates a test result according to a current network connection state of a first connection channel and the test information, wherein the first connection channel is a channel for connecting the microcontroller and the device to be tested through a network port, and the test result is used to represent the stability of the network port of the device to be tested.
[0021] The device to be tested feeds back the test result to the microcontroller through the second connection channel.
[0022] Further, the device to be tested generates a test result according to a current network connection state of a first connection channel and the test information, comprising:
[0023] After receiving the test information and reaching a preset detection duration, the device to be tested acquires a local IP address.
[0024] If the to-be-tested device acquires a local IP address, and the test information is connection information, the test result generated by the to-be-tested device is that the connection is normal.
[0025] If the to-be-tested device does not acquire a local IP address, and the test information is connection information, the test result generated by the to-be-tested device is that the connection is abnormal.
[0026] If the to-be-tested device does not acquire a local IP address, and the test information is disconnection information, the test result generated by the to-be-tested device is that the disconnection is normal.
[0027] If the to-be-tested device acquires a local IP address, and the test information is disconnection information, the test result generated by the to-be-tested device is that the disconnection is abnormal.
[0028] In a third aspect, a device for network port automatic detection is provided, and the device is configured to:
[0029] switch a network connection state of a first connection channel between the device and a to-be-tested device, and generate corresponding test information, wherein the first connection channel is a channel connected through a network port between the device and the to-be-tested device;
[0030] send the test information to the to-be-tested device through a second connection channel, wherein the second connection channel is a direct connection channel between an interface of the device and an interface of the to-be-tested device, and is not a channel connected through a network port;
[0031] receive a test result fed back by the to-be-tested device through the second connection channel, wherein the test result is used to represent stability of a network port of the to-be-tested device.
[0032] In a fourth aspect, a device for network port automatic detection is provided, and the device is configured to:
[0033] receive test information sent by a microcontroller through a second connection channel, wherein the second connection channel is a direct connection channel between an interface of the microcontroller and an interface of the device, and is not a channel connected through a network port;
[0034] generate a test result according to a current network connection state of a first connection channel and the test information, wherein the first connection channel is a channel connected through a network port between the microcontroller and the device, and the test result is used to represent stability of a network port of the device;
[0035] feed back the test result to the microcontroller through the second connection channel.
[0036] In a fifth aspect, a network port automatic detection system is provided, which comprises a microcontroller configured to perform the method of the first aspect and a device to be tested configured to perform the method of the second aspect.
[0037] In a sixth aspect, a network port automatic detection device is provided, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of the first aspect or the second aspect.
[0038] In a seventh aspect, a computer readable storage medium is provided, which stores a computer program, wherein the computer program is executable on a processor to implement the method of the first aspect or the second aspect.
[0039] The technical scheme provided by the embodiments of the present application has the beneficial effects that: in the embodiments of the present application, the microcontroller switches the network connection state of the first connection channel and generates corresponding test information, wherein the first connection channel is a channel connected through a network port between the microcontroller and the device to be tested; the microcontroller sends the test information to the device to be tested through the second connection channel, wherein the second connection channel is a direct connection between the interface of the microcontroller and the interface of the device to be tested, and is not a channel connected through a network port; the microcontroller receives the test result fed back by the device to be tested through the second connection channel, wherein the test result is used to represent the stability of the network port of the device to be tested. In this way, the network connection state of the first connection channel connected through the network port between the microcontroller and the device to be tested is automatically switched, and the test result is obtained through the second connection channel which is not connected through the network port, so that the network port stability test can be performed quickly and efficiently, and the labor cost is greatly reduced. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical scheme in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0041] Figure 1 is a system architecture diagram of a network port automatic detection system provided by the embodiments of the present application;
[0042] Figure 2 is a flowchart of a network port automatic detection method provided by the embodiments of the present application;
[0043] Figure 3 is a structural schematic diagram of a network port automatic detection device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0044] To make the object, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings.
[0045] Current various electronic devices usually need to be connected to a network through wired or wireless ways. When connected to a network through a wired way, due to the mobility of the electronic device, the network cable may need to be frequently plugged and unplugged, which puts higher requirements on the stability of the network port of the electronic device. Therefore, it is usually necessary to test the network port of the electronic device to ensure that the network port can work normally and the electronic device can normally access or disconnect from the network in the use environment of frequent plugging and unplugging of the network cable and frequent on-off of the network.
[0046] The existing test method for the network port of the electronic device is usually in a mechanical plugging and unplugging way. For example, the plugging and unplugging of the network cable can be manually performed, and after the network cable is plugged and unplugged, it is tested whether the electronic device can normally recognize the local IP. Alternatively, a mechanical device can be used to replace manual operation, but this way still needs to test through physical plugging and unplugging of the network cable. The above test method wastes a lot of manpower and resources on the one hand, and the time spent for each physical plugging and unplugging test is relatively long, and if a large number of tests are to be performed, a long time is needed to complete the tests. Moreover, when an abnormal situation occurs, it is difficult to locate the cause of the problem through manual test.
[0047] The embodiment of the present application provides a network port automatic detection processing method, which can be applied to a network port automatic detection system as shown in Figure 1 The network port automatic detection system includes a microcontroller 11 and a device to be tested 12. The microcontroller 11 is pre-configured with network connection. The network port of the microcontroller 11 is connected to the network port of the device to be tested 12 through a first connection channel, and the microcontroller 11 and the device to be tested 12 are also connected with a second connection channel. The second connection channel is a direct connection between the interface of the microcontroller 11 and the interface of the device to be tested 12, and is not a channel connected through the network port. When testing, the microcontroller 11 switches the network connection state of the first connection channel, connects or disconnects the network connection of the first connection channel, simulates the effect of plugging and unplugging the network port of the device to be tested 12, changes the network connection state of the device to be tested, and thus realizes the test of the stability of the network port of the device to be tested 12. Since no actual plugging and unplugging operation is needed, both labor and resource costs can be saved, and the test speed can be improved, a large number of tests can be performed in a short time, and the test result is more reliable. Moreover, when an abnormal situation occurs, the microcontroller 11 can be used to locate and determine the cause of the abnormality. The following will be described in detailFigure 2 The processing flow of the network port automatic detection is described in detail as follows.
[0048] In step 201, the microcontroller switches the network connection state of the first connection channel and generates corresponding test information.
[0049] The first connection channel is a channel through which the microcontroller and the device under test are connected via a network port.
[0050] Before testing the device under test, the staff can first connect the microcontroller to the router via a network cable to enable the microcontroller to access the network. Then, the microcontroller and the device under test are connected via a network cable as the first connection channel. The microcontroller controls the network connection of the first connection channel to simulate the plugging and unplugging operation of the device under test. Meanwhile, the microcontroller and the device under test are connected via a USB cable or other serial data cable as the second connection channel. The second connection channel can still transmit data between the microcontroller and the device under test when the network connection of the first connection channel is disconnected, thereby transmitting corresponding test information and test results between the microcontroller and the device under test. In addition, the tester can also edit relevant control instructions on the microcontroller in advance. In this way, the microcontroller can automatically connect or disconnect the network connection between the first connection channel and the device under test according to the preset control instructions, thereby switching the network connection state of the first connection channel and automatically running the test process.
[0051] After the microcontroller and the device under test are configured, the microcontroller can switch the network connection state of the first connection channel and then generate corresponding test information, such as connection information or disconnection information. The test information can include the current network connection state (connection state or disconnection state), the current time, and other information.
[0052] Optionally, the microcontroller can switch the network connection state of the first connection channel to the connection state or the disconnection state, and can generate corresponding test information according to the switched connection state. Therefore, the corresponding processing can be as follows: the microcontroller controls the first connection channel to switch from a first state to a second state, wherein the first connection channel is a channel through which the microcontroller and the device under test are connected via a network port, the first state is a connection state, and the second state is a disconnection state; or the first state is a disconnection state, and the second state is a connection state; and the microcontroller generates test information corresponding to the second state.
[0053] When the microcontroller starts to test the to-be-tested device, the microcontroller can determine the specific switching process according to the current network connection state of the first connection channel. For example, if the current first state of the first connection channel is the connection state, the microcontroller controls the first connection channel to switch to the disconnection state (second state); if the current first state of the first connection channel is the disconnection state, the microcontroller controls the first connection channel to switch to the connection state (second state). After the network connection state of the first connection channel is switched to the second state, the microcontroller generates corresponding test information according to whether the specific second state is the connection state or the disconnection state. For example, if the second state is the connection state, the microcontroller generates connection information; if the second state is the disconnection state, the microcontroller generates disconnection information.
[0054] Step 202: The microcontroller sends test information to the to-be-tested device through the second connection channel.
[0055] Step 203: The to-be-tested device receives the test information sent by the microcontroller through the second connection channel.
[0056] The second connection channel is a direct connection between the interface of the microcontroller and the interface of the to-be-tested device, and is not a channel connected through a network port.
[0057] After the microcontroller switches the network connection state of the first connection channel to the second state and generates corresponding test information, the microcontroller can send the test information to the to-be-tested device through the second connection channel which has been configured. The to-be-tested device can receive the corresponding test information through the second connection channel. In this way, after the to-be-tested device receives the test information sent by the microcontroller through the second connection channel, the to-be-tested device can know that the microcontroller has performed a test, and whether the network connection state of the first connection channel is switched to the connection state or the disconnection state in this test.
[0058] Step 204: The to-be-tested device generates a test result according to the current network connection state of the first connection channel and the test information.
[0059] The first connection channel is a channel connected through a network port between the microcontroller and the to-be-tested device. The test result is used to represent the stability of the network port of the to-be-tested device.
[0060] After the to-be-tested device receives the test information through the second connection channel, the to-be-tested device can identify the current actual network connection state of the first connection channel, and then according to the received test information and the identified network connection state, the to-be-tested device can determine whether the network connection state of the first connection channel is normal, and further generate the corresponding test result. For example, if the received test information is connection information and the current network connection state of the first connection channel is identified as a connection state, the to-be-tested device can determine that the network connection state of the first connection channel is normal; if the received test information is disconnection information and the current network connection state of the first connection channel is identified as a connection state, the to-be-tested device can determine that the network connection state of the first connection channel is abnormal.
[0061] Optionally, the specific processing of generating the test result by the to-be-tested device according to the current actual network connection state of the first connection channel and the test information includes: after receiving the test information and reaching a preset detection time length, the to-be-tested device acquires a local IP address; if the to-be-tested device acquires the local IP address and the test information is connection information, the to-be-tested device generates a test result of connection normal; if the to-be-tested device does not acquire the local IP address and the test information is connection information, the to-be-tested device generates a test result of connection abnormal; if the to-be-tested device does not acquire the local IP address and the test information is disconnection information, the to-be-tested device generates a test result of disconnection normal; if the to-be-tested device acquires the local IP address and the test information is disconnection information, the to-be-tested device generates a test result of disconnection abnormal.
[0062] The worker can pre-set the detection time length in the to-be-tested device. In this way, after receiving the test information and reaching the preset detection time length, the to-be-tested device can acquire the local IP address of the to-be-tested device, so as to determine the current actual network connection state of the first connection channel between the microcontroller and the to-be-tested device. If the to-be-tested device can successfully acquire the local IP address, it indicates that the current actual network connection state of the first connection channel between the microcontroller and the to-be-tested device is in a connection state; if the to-be-tested device cannot acquire the local IP address, it indicates that the current actual network connection state of the first connection channel between the microcontroller and the to-be-tested device is in a disconnection state.
[0063] Further, if the current actual network connection state of the first connection channel is in the connected state, and the test information is the connection information, it indicates that the to-be-tested device accesses the network normally through the first connection channel, and the to-be-tested device generates the test result of the connection normal. If the current actual network connection state of the first connection channel is in the disconnected state, and the test information is the connection information, it indicates that the to-be-tested device does not access the network normally through the first connection channel, and the to-be-tested device generates the test result of the connection abnormal. If the current actual network connection state of the first connection channel is in the connected state, and the test information is the disconnection information, it indicates that the network connection between the microcontroller and the to-be-tested device through the first connection channel is not disconnected normally, and the to-be-tested device generates the test result of the disconnection abnormal. If the current actual network connection state of the first connection channel is in the disconnected state, and the test information is the disconnection information, it indicates that the network connection between the microcontroller and the to-be-tested device through the first connection channel is disconnected normally, and the to-be-tested device generates the test result of the disconnection normal.
[0064] Step 205: The to-be-tested device feeds back the test result to the microcontroller through the second connection channel.
[0065] Step 206: The microcontroller receives the test result fed back by the to-be-tested device through the second connection channel.
[0066] After the to-be-tested device generates the test result, the to-be-tested device feeds back the test result to the microcontroller through the second connection channel. The microcontroller can store the received test result locally for subsequent viewing by the staff.
[0067] Optionally, the start time of each detection can also be recorded, so that the causes of the abnormality can be more comprehensively analyzed when the abnormality occurs. The corresponding processing can be as follows: if the test result is the connection abnormal or the disconnection abnormal, the microcontroller acquires and stores the test start time, and the test start time is the time of switching the network connection state of the first connection channel.
[0068] The microcontroller can record the current time as the test start time of the current test when switching the network connection state of the first connection channel with the device to be tested. After receiving the test result of the current test, the microcontroller can first identify the test result. When the test result is a connection abnormality or a disconnection abnormality, it indicates that the subsequent staff needs to further analyze the abnormality. At this time, the microcontroller can further obtain the test start time of the current test, and store the test start time and the test result in the microcontroller locally. It can be understood that the microcontroller can also record the time when the test result is received as the test end time, and calculate the total time spent in the current test according to the test start time and the test end time, and then store the test end time and the test total time in the microcontroller locally. When the test result is a connection abnormality (or disconnection abnormality), the staff can view the start time of the current connection, the test end time, the test total time and other related information, so as to further analyze the cause of the connection abnormality (or disconnection abnormality).
[0069] It should be noted that the microcontroller can also obtain the generation time of the test result as the test end time. Alternatively, the test start time of the last test and other information can also be recorded, so as to facilitate the analysis of the cause of the abnormality. The present application does not make specific limitations in this regard.
[0070] Optionally, as described above, in order to investigate the stability of the network interface of the device to be tested, the device to be tested often needs to be tested multiple times, and accordingly, the processing can be as follows: if the test result is a connection normality or a disconnection normality, the microcontroller re-executes the switching of the network connection state of the first connection channel with the device to be tested. If the test result is a connection abnormality or a disconnection abnormality, the microcontroller sends an alarm message.
[0071] The staff can make corresponding settings in the microcontroller in advance. When the test result received by the microcontroller is a connection normality or a disconnection normality, it indicates that the test is completed normally, and the next test can be continued. The microcontroller re-executes the processing of switching the network connection state of the first connection channel with the device to be tested (steps 201-206 described above). When the test result received by the microcontroller is a connection abnormality or a disconnection abnormality, it indicates that the switching of the network connection state of the first connection channel is abnormal, and the device to be tested cannot normally connect to the network or disconnect from the network through the first connection channel. The microcontroller can send an alarm message to the staff to remind the staff to troubleshoot the problem.
[0072] It can be understood that the worker can also set the test times in advance, and continue the next test regardless of the test result received by the microcontroller until the preset test times are reached, and then the microcontroller sends all the test results to the worker after statistics. Or set the test exception times in advance, when the total number of test results of connection exception and disconnection exception received reaches the test exception times, stop testing and send alarm information to the worker. The worker can make corresponding settings according to actual needs, and the present application does not make specific limitations.
[0073] In the embodiment of the application, the microcontroller switches the network connection state of the first connection channel and generates corresponding test information, wherein the first connection channel is a channel connected through a network port between the microcontroller and the device to be tested; the microcontroller sends the test information to the device to be tested through a second connection channel, wherein the second connection channel is a direct connection between the interface of the microcontroller and the interface of the device to be tested, and is not a channel connected through a network port; the microcontroller receives the test result fed back by the device to be tested through the second connection channel, wherein the test result is used to represent the stability of the network port of the device to be tested. In this way, the network connection state of the first connection channel connected through the network port between the microcontroller and the device to be tested is automatically switched, and the test result is obtained through the second connection channel which is not connected through the network port, so that the network port stability test can be carried out quickly and efficiently, and the labor cost is greatly reduced.
[0074] Based on the same technical concept, the embodiment of the application also provides a network port automatic detection device, which is used for:
[0075] Switching the network connection state of the first connection channel between the device and the device to be tested and generating corresponding test information, wherein the first connection channel is a channel connected through a network port between the device and the device to be tested;
[0076] Sending the test information to the device to be tested through a second connection channel, wherein the second connection channel is a direct connection between the interface of the device and the interface of the device to be tested, and is not a channel connected through a network port;
[0077] Receiving the test result fed back by the device to be tested through the second connection channel, wherein the test result is used to represent the stability of the network port of the device to be tested.
[0078] Based on the same technical concept, the embodiment of the application also provides another network port automatic detection device, which is used for:
[0079] receive the test information sent by the microcontroller through a second connection channel, wherein the second connection channel is a direct connection between an interface of the microcontroller and an interface of the device, and is not a channel connected through a network port;
[0080] generate a test result according to the current network connection state of the first connection channel and the test information, wherein the first connection channel is a channel connected through a network port between the microcontroller and the device, and the test result is used to represent the stability of the network port of the device;
[0081] feed back the test result to the microcontroller through the second connection channel.
[0082] Based on the same technical concept, the embodiment of the present application also provides a network port automatic detection device, as shown in the following table: Figure 3 The network port automatic detection device 300 can be the microcontroller or the device to be tested. The network port automatic detection device 300 comprises a processor 301 and a memory 302.
[0083] The memory 302 stores computer instructions;
[0084] The processor 301 executes the computer instructions stored in the memory 302, so that the processor 601 executes the network port automatic detection processing method implemented by the microcontroller or the device to be tested.
[0085] The specific implementation process of the processor 301 can refer to the above-mentioned method embodiment, which has similar implementation principles and technical effects, and will not be described here.
[0086] Optionally, the network port automatic detection device 300 further comprises a communication component 303. The processor 301, the memory 302 and the communication component 303 can be connected through a bus 304.
[0087] Based on the same technical concept, the embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the network port automatic detection method implemented by the microcontroller or the device to be tested.
[0088] The above-mentioned is only the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. An automated network port detection method, characterized in that, Includes the following steps: The microcontroller switches the network connection status of the first connection channel and generates corresponding test information, wherein the first connection channel is the channel between the microcontroller and the device under test connected via a network port; The microcontroller sends the test information to the device under test through a second connection channel, wherein the second connection channel is a direct connection between the interface of the microcontroller and the interface of the device under test, and is not a connection through a network port; The microcontroller receives the test results fed back by the device under test through the second connection channel, wherein the test results are used to characterize the stability of the network port of the device under test.
2. The automated network port detection method according to claim 1, characterized in that, The microcontroller switches the network connection status of the first connection channel and generates corresponding test information, including: The microcontroller controls the first connection channel to switch from a first state to a second state, wherein the first connection channel is a channel between the microcontroller and the device under test connected via a network port, the first state is a connected state and the second state is a disconnected state; or, the first state is a disconnected state and the second state is a connected state. The microcontroller generates test information corresponding to the second state.
3. The automated network port detection method according to any one of claims 1 or 2, characterized in that, The method further includes: If the test result is a connection error or a disconnection error, the microcontroller acquires and stores the test start time, which is the time when the network connection status of the first connection channel is switched.
4. The automated network port detection method according to claim 3, characterized in that, The method further includes: If the test result indicates a connection error or disconnection error, the microcontroller will issue an alarm message.
5. The automated network port detection method according to any one of claims 1 or 2, characterized in that, The method further includes: If the test result is normal connection or normal disconnection, the microcontroller will re-execute the switching of the network connection status of the first connection channel with the device under test.
6. An automated network port detection method, characterized in that, Includes the following steps: The device under test receives test information from the microcontroller through a second connection channel, wherein the second connection channel is a direct connection between the microcontroller's interface and the interface of the device under test, and is not a connection through a network port; The device under test generates test results based on the current network connection status of the first connection channel and the test information. The first connection channel is the channel between the microcontroller and the device under test via a network port. The test results are used to characterize the stability of the network port of the device under test. The device under test feeds back the test results to the microcontroller through the second connection channel.
7. The method according to claim 6, characterized in that, The device under test generates test results based on the current network connection status of the first connection channel and the test information, including: Upon receiving the test information and after a preset detection time has elapsed, the device under test obtains its local IP address. If the device under test obtains a local IP address and the test information is connection information, then the test result generated by the device under test is "connection is normal". If the device under test fails to obtain a local IP address, and the test information is connection information, then the test result generated by the device under test is a connection error. If the device under test fails to obtain a local IP address and the test information is disconnection information, then the test result generated by the device under test is "disconnection normal". If the device under test obtains a local IP address and the test information is disconnection information, then the test result generated by the device under test is a disconnection exception.
8. A device for automated network port detection, characterized in that, The device is used for: Switch the network connection status of the first connection channel between the device and the device under test, and generate corresponding test information, wherein the first connection channel is the channel between the device and the device under test connected via a network port; The test information is sent to the device under test through a second connection channel, wherein the second connection channel is a direct connection between the interface of the device and the interface of the device under test, and is not a connection through a network port; The test results fed back by the device under test are received through the second connection channel, wherein the test results are used to characterize the stability of the network port of the device under test.
9. A device for automated network port detection, characterized in that, The device is used for: The device receives test information from the microcontroller through a second connection channel, wherein the second connection channel is a direct connection between the microcontroller's interface and the device's interface, and is not a connection through a network port. Based on the current network connection status of the first connection channel and the test information, test results are generated, wherein the first connection channel is the channel between the microcontroller and the device via a network port, and the test results are used to characterize the stability of the device's network port; The test results are fed back to the microcontroller through the second connection channel.
10. An automated network port detection system, characterized in that, The system includes a microcontroller and a device under test, wherein the microcontroller is used to perform the method according to any one of claims 1-5, and the device under test is used to perform the method according to any one of claims 6-7.
11. An automated network port detection device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the network port automated detection device to implement the method as described in any one of claims 1-5 or 6-7.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-5 or 6-7.
Citation Information
Patent Citations
System and method for automatically testing on-off of memory network
CN109302331A
Network connectivity test method, system and device, medium and test host
CN113660138A