Method and device for detecting network connection state of equipment and electronic equipment

By allowing devices to send test signals to each other in the local area network and generate a result matrix, the problem of low network connection status efficiency and accuracy of manual detection of equipment is solved, and fast and accurate network status judgment is achieved, and network management efficiency is improved.

CN119316318APending Publication Date: 2025-01-14CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411418298.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In the prior art, the efficiency and accuracy of manually detecting the network connection status of the equipment is low, making it difficult to monitor and deal with network failures or equipment offline in a large-scale network.

Method used

By connecting the devices to be detected to the target LAN and sending test signals to each other, a test result matrix is ​​generated, thereby judging the communication status between the device and the LAN, and improving judgment efficiency and accuracy.

Benefits of technology

It realizes a quick and accurate judgment on whether the device is normally connected to the LAN, improves the efficiency and accuracy of network management, and avoids the time-consuming and misjudgment problems of manual detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316318A_ABST
    Figure CN119316318A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for detecting the network connection state of equipment and electronic equipment. Relates to automation field. The method comprises the steps that M devices to be detected are connected into a target local area network, the M devices to be detected are started, and M is a positive integer; each piece of to-be-detected equipment in the M pieces of to-be-detected equipment is controlled to send a test signal to the M pieces of to-be-detected equipment, a test result of each test signal is obtained, M test result sets are obtained, and each test result set comprises M test results; and generating a test result matrix of the M to-be-detected devices according to the M test result sets, and determining a communication state between each to-be-detected device and the target local area network according to the test result matrix. Through the method and the device, the problem of low efficiency and accuracy of manual detection of the network connection state of the equipment in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automation, and in particular to a method and apparatus for detecting the network connection status of a device, and an electronic device. Background Art

[0002] In the current network management and equipment monitoring field, the detection of whether a device has successfully connected to the LAN mainly relies on traditional manual methods. This method usually requires technicians to go to the site in person to confirm whether the device has been correctly connected and participated in the LAN one by one by observing the flashing status of the indicator light (such as the indicator light) on the device or by logging into the user interface of the device to check the network connection status.

[0003] However, with the increasing scale of networks and the surge in the number of devices, this manual detection method has gradually revealed its limitations: facing hundreds, thousands or even more devices, manual inspection one by one is not only time-consuming and labor-intensive, but also prone to omissions or misjudgments due to human negligence. In addition, manual detection is difficult to achieve real-time monitoring of network status. Sudden network failures or device offline situations are often not discovered and handled in the first time, resulting in the inability of devices to use network services or perform network tasks normally.

[0004] Currently, no effective solution has been proposed to address the problem of low efficiency and accuracy in manually detecting the network connection status of devices in related technologies. Summary of the invention

[0005] The present application provides a method, an apparatus and an electronic device for detecting the network connection status of a device, so as to solve the problem of low efficiency and accuracy in manually detecting the network connection status of a device in the related art.

[0006] According to one aspect of the present application, a method for detecting the network connection status of a device is provided. The method includes: connecting M devices to be detected to a target local area network, and turning on the M devices to be detected, where M is a positive integer; controlling each of the M devices to be detected to send a test signal to the M devices to be detected, and obtaining a test result of each test signal to obtain M test result sets, where each test result set includes M test results; generating a test result matrix of the M devices to be detected according to the M test result sets, and determining the connectivity status between each device to be detected and the target local area network according to the test result matrix.

[0007] Optionally, controlling each of the M devices to be detected to send a test signal to the M devices to be detected, and obtaining a test result of each test signal includes: for the target device to be detected, obtaining the device IDs of the M devices to be detected, and adding the M device IDs to the target queue in sequence; sending a test signal to each device to be detected in sequence according to the device ID order in the target queue by the target device to be detected, determining a feedback signal reception status of the test signal, and judging the test result of each test signal according to the feedback signal reception status of the test signal, wherein the test result is used to characterize whether the test signal is transmitted normally.

[0008] Optionally, a test signal is sent to each device to be detected in sequence according to the device ID in the target queue, and determining the feedback signal reception status of the test signal includes: for any target device ID in the target queue, a test signal is sent to the device to which the target device ID belongs, and determining whether a feedback signal of the test signal is received within a preset time interval; if a feedback signal is received within the preset time interval, determining that the feedback signal reception status is normal; if no feedback signal is received within the preset time interval, determining that the feedback signal reception status is abnormal.

[0009] Optionally, judging the test results of each test signal according to the feedback signal reception status of the test signal includes: when the feedback signal reception status is abnormal, sending N secondary test signals to the device to which the target device ID belongs, and determining the test result of the test signal according to the feedback results of the N secondary test signals, where N is a positive integer; when the feedback signal reception status is normal, determining that the test result of the test signal is normal.

[0010] Optionally, determining the test result of the test signal based on the feedback results of N secondary test signals includes: when the feedback result of at least one secondary test signal is a feedback signal of receiving the secondary test signal, determining that the test result of the test signal is normal; when the feedback results of the N secondary test signals are all feedback signals of not receiving the secondary test signal, determining that the test result of the test signal is abnormal.

[0011] Optionally, generating a test result matrix for M devices to be detected based on M test result sets includes: obtaining each test result in each test result set, and changing the identifier of the device to be detected whose test result is normal to a first identifier, and changing the identifier of the device to be detected whose test result is abnormal to a second identifier, to obtain M identifier sets; arranging the identifier sets corresponding to each device to be detected in the order of the device IDs of the M devices to be detected, to obtain a test result matrix.

[0012] Optionally, determining the connectivity status between each device to be detected and the target local area network based on the test result matrix includes: for the target device to be detected, obtaining the matrix row and matrix column corresponding to the target device to be detected in the test result matrix; obtaining a first number of first identifiers in the matrix row, and obtaining a second number of first identifiers in the matrix column; when the first number or the second number is greater than or equal to the target number, determining that the connectivity status of the target device to be detected is normal; when both the first number and the second number are less than the target number, determining that the connectivity status of the target device to be detected is abnormal.

[0013] According to another aspect of the present application, a device for detecting the network connection status of a device is provided. The device includes: an access unit, which is used to connect M devices to be detected to a target local area network and turn on the M devices to be detected, wherein M is a positive integer; a receiving unit, which is used to control each of the M devices to be detected to send a test signal to the M devices to be detected, and obtain the test result of each test signal to obtain M test result sets, wherein each test result set includes M test results; a determination unit, which is used to generate a test result matrix of the M devices to be detected according to the M test result sets, and determine the connectivity status between each device to be detected and the target local area network according to the test result matrix.

[0014] According to another aspect of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements a method for detecting a network connection status of a device provided in the aforementioned embodiment of the present application.

[0015] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein when the computer-readable instructions are executed, a method for detecting the network connection status of a device provided in the aforementioned embodiment is executed.

[0016] Through this application, the following steps are adopted: M devices to be detected are connected to the target local area network, and M devices to be detected are turned on, where M is a positive integer; each of the M devices to be detected is controlled to send a test signal to the M devices to be detected, and the test result of each test signal is obtained to obtain M test result sets, where each test result set includes M test results; a test result matrix of the M devices to be detected is generated according to the M test result sets, and the connection status between each device to be detected and the target local area network is determined according to the test result matrix. The problem of low efficiency and accuracy of manually detecting the network connection status of devices in the related art is solved. After the M devices to be detected are connected to the target local area network, each device to be detected sends a test signal to the remaining devices to be detected respectively, and a test result matrix is ​​generated according to the test results of multiple test signals sent by each device to be detected, so as to determine the connection status between each device to be detected and the target local area network according to the test result matrix, thereby achieving the technical effect of improving the efficiency and accuracy of judging whether the device is normally connected to the local area network. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 is a flowchart of a method for detecting a network connection status of a device provided in an embodiment of the present application;

[0019] Figure 2 is a flow chart of a method for determining a test result according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a device for detecting a network connection status of a device provided in an embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] It should be noted that the method, device and electronic device for detecting the network connection status of a device determined by the present disclosure can be used in the field of automation, and can also be used in any field other than the field of automation. The application field of the method, device and electronic device for detecting the network connection status of a device determined by the present disclosure is not limited.

[0026] It should be noted that the collected information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) used in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated. Corresponding operation portals are provided for users to choose to authorize or refuse to use. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0027] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0028] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0029] Local Area Network: A network consisting of a group of computers and their peripheral devices connected by transmission media within a smaller geographical area.

[0030] According to an embodiment of the present application, a method for detecting a network connection status of a device is provided.

[0031] Figure 1 1 is a flow chart of a method for detecting the network connection status of a device provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0032] Step S101, connecting M devices to be detected to a target local area network, and turning on the M devices to be detected, where M is a positive integer.

[0033] Specifically, when determining the network connection status of each device to be detected, each device to be detected needs to be connected to the target LAN first, and when each device to be detected is connected to the target LAN, each device to be detected is turned on to complete the startup operation of the device.

[0034] Furthermore, after each device to be detected is turned on, it is necessary to configure a test signal sending program in each device to be detected, so that each device to be detected can send a network test signal to the remaining devices in the local area network, and determine whether the network connection between each device to be detected and other devices is normal based on the test result of the network test signal. Since the M devices to be detected are all connected to the target local area network, theoretically each device to be detected can perform network communication through the target local area network. However, since there may be a device to be detected that cannot be connected to the target local area network normally, the device with abnormal network connection can be determined from the M devices to be detected through the test results of the test signals between the devices to be detected.

[0035] Step S102: Control each of the M devices to be detected to send a test signal to the M devices to be detected, and obtain a test result of each test signal to obtain M test result sets, wherein each test result set includes M test results.

[0036] It should be noted that since the test signals between devices may not be transmitted normally due to non-network factors, the accuracy of judging the test results based on only one device sending a test signal to another device is low. At this time, each device to be detected can be controlled to send a test signal to M devices to be detected (which may include the device sending a test signal to itself), so as to determine the connection status between the device and the target LAN based on the test results of the test signal.

[0037] For example, a local area network contains 5 devices to be detected, namely device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected. When sending a test signal, device 1 to be detected can send a test signal to device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected respectively to obtain 5 test results. At the same time, device 2 to be detected can send a test signal to device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected respectively to obtain 5 test results, thereby obtaining 5 groups of test results, each group of test results contains 5 test results, so that the connection status between each device to be detected and the local area network is determined according to the 5 groups of test results, and then the network status of each device to be detected is determined.

[0038] Step S103, generating a test result matrix of M devices to be detected according to the M test result sets, and determining the connectivity status between each device to be detected and the target local area network according to the test result matrix.

[0039] Specifically, after obtaining M test result sets, since each test result set contains M test results, an M×M test result matrix can be generated based on the M test result sets, wherein rows and columns with the same serial numbers in the matrix correspond to the same device to be tested, so that the network connection status of the device to be tested can be determined based on the test results in the test result matrix, thereby obtaining the connectivity status between each device to be tested and the target local area network.

[0040] For example, a local area network contains 5 devices to be detected, namely device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected. The test result sets that can be obtained for the above 5 devices to be detected are: [1,0,0,1,1], [0,0,0,0,0], [0,0,0,0,0], [1,0,0,0,1], [1,0,0,1,1], wherein 0 in each set indicates that feedback information corresponding to the test signal is not received, that is, the test result cannot communicate with the corresponding device to be detected through the network, and 1 in each set indicates that feedback information corresponding to the test signal is received, that is, the test result can communicate with the corresponding device to be detected through the network, and the order of the results in each set is arranged according to the device serial number, that is, in the order of device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected.

[0041] Furthermore, after obtaining the above five test result sets, they can be sorted in the order of device serial numbers to obtain a test result matrix:

[0042]

[0043] Therefore, the connectivity between each device to be tested and the target local area network can be determined according to the test result matrix, and then the network connection status of each device to be tested can be determined.

[0044] The detection method of the network connection status of the device provided in the embodiment of the present application is by connecting M devices to be detected to the target local area network and turning on the M devices to be detected, wherein M is a positive integer; controlling each device to be detected in the M devices to be detected to send a test signal to the M devices to be detected, and obtaining the test result of each test signal to obtain M test result sets, wherein each test result set includes M test results; generating a test result matrix of the M devices to be detected according to the M test result sets, and determining the connection status between each device to be detected and the target local area network according to the test result matrix. The problem of low efficiency and accuracy of manually detecting the network connection status of the device in the related art is solved. After connecting the M devices to be detected to the target local area network, each device to be detected sends a test signal to the remaining devices to be detected respectively, and generates a test result matrix according to the test results of the multiple test signals sent by each device to be detected, thereby determining the connection status between each device to be detected and the target local area network according to the test result matrix, thereby achieving the technical effect of improving the efficiency and accuracy of judging whether the device is normally connected to the local area network.

[0045] In order to ensure accurate test results, optionally, in the method for detecting the network connection status of a device provided in an embodiment of the present application, each of the M devices to be detected is controlled to send a test signal to the M devices to be detected, and the test result of each test signal is obtained, including: for the target device to be detected, the device IDs of the M devices to be detected are obtained, and the M device IDs are added to the target queue in sequence; the test signal is sent to each device to be detected in sequence by the target device to be detected in the order of the device IDs in the target queue, the feedback signal reception status of the test signal is determined, and the test result of each test signal is judged according to the feedback signal reception status of the test signal, wherein the test result is used to characterize whether the test signal is transmitted normally.

[0046] It should be noted that when controlling each of the M devices to be detected to send a test signal to the M devices to be detected, since the operating procedures of each device to be detected are the same, this embodiment describes any one of the M devices to be detected, that is, the target device to be detected, and the operating procedures of the remaining devices to be detected are the same as the test signal sending process of the target device to be detected.

[0047] Specifically, when sending a test signal to other devices to be detected, the target device to be detected can also send a test signal to itself at the same time. Since the connection status between the device and the local area network is judged, if the device has an abnormality in the connection with the local area network, it will also not be able to receive the test signal sent to itself.

[0048] Furthermore, when sending a test signal, the device ID of each device to be detected can be obtained, such as device 1 to be detected, device 2 to be detected, etc., and the device ID is added to the target queue in ID order, thereby obtaining a sequence for sending the test signal, wherein the sequence of device IDs in the sequence is sorted in the order of device 1 to be detected, device 2 to be detected, ..., device M to be detected.

[0049] Further, after obtaining the target queue, the target device to be detected can send a test signal to each device to be detected in sequence according to the device ID sequence in the target queue, and receive the feedback signal fed back by each device to be detected in response to the test signal, so as to judge the test result of each test signal according to the receiving state. For example, after the target device to be detected sends a test signal to device 3 to be detected, if the feedback signal corresponding to the test signal is not received, it can be determined that the feedback signal receiving state of the test signal is abnormal, and the test result can be determined to be abnormal.

[0050] This embodiment determines the test result of the device to be detected by determining the feedback signal reception state of the test signal sent to the device to be detected, thereby ensuring the accuracy of the test result.

[0051] In order to improve the accuracy of the test results, optionally, in the method for detecting the network connection status of a device provided in an embodiment of the present application, a test signal is sent to each device to be detected in sequence according to the device ID order in the target queue, and determining the feedback signal reception status of the test signal includes: for any target device ID in the target queue, a test signal is sent to the device to which the target device ID belongs, and determining whether a feedback signal of the test signal is received within a preset time interval; if a feedback signal is received within the preset time interval, determining that the feedback signal reception status is normal; if no feedback signal is received within the preset time interval, determining that the feedback signal reception status is abnormal.

[0052] Specifically, when determining the feedback signal reception status, other factors may cause the feedback signal to be unable to be received. Therefore, after the target device to be detected sends a test signal to the device to which the target device ID belongs, if feedback information is received within a preset time interval, then it can be determined that the device to which the target device ID belongs can receive the test signal sent by the target device to be detected through the local area network. Therefore, it can be determined that the feedback signal reception status is normal.

[0053] Furthermore, if no feedback information is received within the preset time interval, it can be determined that the device to which the target device ID belongs cannot receive the test signal sent by the target device to be detected through the local area network. Therefore, it can be determined that the feedback signal reception status is abnormal, thereby judging the network connection status of the device through the reception status of the feedback signal.

[0054] In order to ensure the accuracy of the test results, optionally, in the method for detecting the network connection status of the device provided in the embodiment of the present application, judging the test results of each test signal according to the feedback signal reception status of the test signal includes: when the feedback signal reception status is abnormal, sending N secondary test signals to the device to which the target device ID belongs, and determining the test result of the test signal according to the feedback results of the N secondary test signals, wherein N is a positive integer; when the feedback signal reception status is normal, determining that the test result of the test signal is normal.

[0055] Specifically, after obtaining the feedback signal reception status of the test signal, the test result of the test signal can be determined according to the feedback signal reception status. When the feedback signal reception status is normal, the test result of the test signal is determined to be normal, which means that it can be determined that the target device to be detected can perform network communication with the device to be detected corresponding to the test signal.

[0056] Furthermore, when the feedback signal reception state is abnormal, there may be two situations. One is that the device to which the target device ID belongs cannot connect to the local area network and cannot receive the test signal, so no feedback signal is sent. The other is that due to other problems in the device to which the target device ID belongs, when the test signal is received, the feedback signal cannot be generated or cannot be sent. At this time, the target device to be tested also cannot receive the feedback signal. Therefore, it is necessary to continuously send N secondary test signals to the device to which the target device ID belongs according to a certain sending interval, and determine the true test result of the device according to the reception status of the feedback signal of each secondary test signal, so as to ensure the accuracy of the test result.

[0057] Optionally, in the method for detecting the network connection status of the device provided in an embodiment of the present application, determining the test result of the test signal based on the feedback results of N secondary test signals includes: when the feedback result of at least one secondary test signal is a feedback signal of receiving the secondary test signal, determining that the test result of the test signal is normal; when the feedback results of the N secondary test signals are all feedback signals of not receiving the secondary test signal, determining that the test result of the test signal is abnormal.

[0058] Specifically, after N secondary test signals are continuously sent to the device to which the target device ID belongs according to a certain sending interval, it can be determined whether each secondary test signal receives a feedback signal. If at least one secondary test signal receives a feedback signal, it indicates that the device can still connect to the local area network. At this time, it can be determined that the test result is normal. If all secondary test signals do not receive feedback information, it indicates that the device to which the target device ID belongs cannot establish a network connection with the target device to be detected. At this time, it can be determined that the test result is abnormal, thereby ensuring the accuracy of the test result.

[0059] Figure 2 is a flow chart of a method for determining a test result according to an embodiment of the present application. Figure 2 As shown, first, it is necessary to sort the M devices to be detected according to the device ID to obtain the target queue, and set the initial sequence number to 1. When the target device to be detected sends test information to each device to be detected, it is necessary to first determine whether the current sequence number is greater than the length of the target queue. If it is not greater than the length of the target queue, obtain the device ID corresponding to the current sequence number from the target queue, and send a test signal to the device to be detected corresponding to the device ID through the target device to be detected, and determine whether a feedback signal is received.

[0060] When a feedback signal is received within a preset time interval, the test result is determined to be normal, and the identifier of the device in the target queue is changed to the first identifier, for example 1, and the initial sequence number is increased by 1. The above steps of determining whether the current sequence number is greater than the length of the target queue are repeated until the current sequence number is greater than the length of the target queue, thereby completing the test signal sending operation.

[0061] If no feedback signal is received within the preset time interval, N secondary test signals are sent to the device to which the target device ID belongs, and it is determined whether a feedback signal of the secondary test signal is received. If a feedback signal of the secondary test signal is received, it can be determined that the test result is normal, and the identifier of the device in the target queue is changed to a first identifier, such as 1. If no feedback signal of the secondary test signal is received, it can be determined that the test result is abnormal, and the identifier of the device in the target queue is changed to a second identifier, such as 0, and the initial sequence number is increased by 1. The above steps of determining whether the current sequence number is greater than the length of the target queue are repeated until the current sequence number is greater than the length of the target queue, thereby completing the test signal sending operation.

[0062] Optionally, in the method for detecting the network connection status of a device provided in an embodiment of the present application, generating a test result matrix of M devices to be detected based on M test result sets includes: obtaining each test result in each test result set, and changing the identifier of the device to be detected whose test result is normal to a first identifier, and changing the identifier of the device to be detected whose test result is abnormal to a second identifier, to obtain M identifier sets; arranging the identifier sets corresponding to each device to be detected in the order of the device IDs of the M devices to be detected, to obtain a test result matrix.

[0063] Specifically, after obtaining M test results, since each test result set contains M test results, an M×M test result matrix can be generated based on the M test result sets, wherein rows and columns with the same serial numbers in the matrix correspond to the same device to be tested, so that the network connection status of the device to be tested can be determined based on the test results in the test result matrix, thereby obtaining the connectivity status between each device to be tested and the target local area network.

[0064] Furthermore, when generating the matrix, in each test result set, a first identifier can be added to the device with a normal test result, and a second identifier can be added to the device with an abnormal test result, so as to change each test result set from text to a digital representation. For example, when the target device to be detected is device to be detected 1, after sending test signals to device to be detected 1, device to be detected 2, device to be detected 3, device to be detected 4, and device to be detected 5 respectively, the test results obtained are: normal, abnormal, abnormal, normal, normal. At this time, the first identifier, such as "1", can be added to the normal device, and the second identifier, such as "0", can be added to the normal device, so as to obtain an identifier set composed of data [1, 0, 0, 1, 1].

[0065] Further, after obtaining each identification set, multiple identification sets can be combined to obtain a test result matrix. For example, a local area network contains 5 devices to be detected, namely, device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected. The test result sets that can be obtained for the above 5 devices to be detected are: [1,0,0,1,1], [0,0,0,0,0], [0,0,0,0,0], [1,0,0,0,1], [1,0,0,1,1], wherein 0 in each set indicates that the feedback information corresponding to the test signal is not received, that is, the test result cannot communicate with the corresponding device to be detected through the network, and 1 in each set indicates that the feedback information corresponding to the test signal is received, that is, the test result can communicate with the corresponding device to be detected through the network, and the order of each result in each set is arranged according to the device serial number, that is, arranged in the order of device 1 to be detected, device 2 to be detected, device 3 to be detected, device 4 to be detected, and device 5 to be detected.

[0066] Furthermore, after obtaining the above five test result sets, they can be sorted in the order of device serial numbers to obtain a test result matrix:

[0067]

[0068] Optionally, in the method for detecting the network connection status of a device provided in an embodiment of the present application, determining the connectivity status between each device to be detected and the target local area network according to the test result matrix includes: for the target device to be detected, obtaining the matrix row and matrix column corresponding to the target device to be detected in the test result matrix; obtaining the first number of first identifiers in the matrix row, and obtaining the second number of first identifiers in the matrix column; when the first number or the second number is greater than or equal to the target number, determining that the connectivity status of the target device to be detected is normal; when both the first number and the second number are less than the target number, determining that the connectivity status of the target device to be detected is abnormal.

[0069] Specifically, after obtaining the test result matrix, the connectivity status between the device to be detected and the target local area network can be determined based on the identifiers in the matrix rows and matrix columns corresponding to each device to be detected. Among them, it is necessary to first determine the matrix rows and matrix columns corresponding to the device to be detected, and further, it is necessary to obtain the number of first identifiers in the matrix rows. Since the first identifier represents the successful connection to the local area network, when the number of first identifiers is greater than or equal to the target number, it can be determined that the connectivity status between the target device to be detected and the local area network is normal. Similarly, the number of first identifiers in the matrix columns can also be obtained. When the number of first identifiers is greater than or equal to the target number, it can be determined that the connectivity status between the target device to be detected and the local area network is normal.

[0070] Furthermore, when the number of first identifiers in the matrix rows and matrix columns is less than the target number, that is, the device cannot perform network communication with any device to be detected, it can be determined that the connectivity status of the target device to be detected is abnormal, thereby achieving the technical effect of accurately determining the network connection status of the device to be detected.

[0071] For example, the target number can be 1. In the following test result matrix, it can be determined that the network connection status of device 1 to be detected, device 4 to be detected, and device 5 to be detected are normal, and the network connection status of device 2 to be detected and device 3 to be detected are abnormal, thereby avoiding the phenomenon that the judgment of the network connection status of the device is wrong due to the inaccurate detection result of a certain device.

[0072] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0073] The embodiment of the present application also provides a device for detecting the network connection status of a device. It should be noted that the device for detecting the network connection status of a device in the embodiment of the present application can be used to execute the method for detecting the network connection status of a device provided in the embodiment of the present application. The device for detecting the network connection status of a device provided in the embodiment of the present application is introduced below.

[0074] Figure 3 Schematic diagram of a device for detecting the network connection status of a device according to an embodiment of the present application. Figure 3 As shown, the device includes: an access unit 31, a receiving unit 32, and a determining unit 33.

[0075] The access unit 31 is used to connect M devices to be detected to the target local area network and start the M devices to be detected, where M is a positive integer.

[0076] The receiving unit 32 is used to control each of the M devices to be detected to send a test signal to the M devices to be detected, and obtain a test result of each test signal to obtain M test result sets, wherein each test result set includes M test results.

[0077] The determination unit 33 is used to generate a test result matrix of M devices to be detected according to the M test result sets, and determine the connectivity status between each device to be detected and the target local area network according to the test result matrix.

[0078] The device for detecting the network connection status of a device provided in the embodiment of the present application connects M devices to be detected to a target local area network through an access unit 31, and turns on the M devices to be detected, wherein M is a positive integer; the receiving unit 32 controls each of the M devices to be detected to send a test signal to the M devices to be detected, and obtains the test result of each test signal to obtain M test result sets, wherein each test result set includes M test results; the determining unit 33 generates a test result matrix of the M devices to be detected according to the M test result sets, and determines the connection status between each device to be detected and the target local area network according to the test result matrix. The problem of low efficiency and accuracy of manually detecting the network connection status of devices in the related art is solved. After connecting the M devices to be detected to the target local area network, each device to be detected sends a test signal to the remaining devices to be detected respectively, and generates a test result matrix according to the test results of multiple test signals sent by each device to be detected, thereby determining the connection status between each device to be detected and the target local area network according to the test result matrix, thereby achieving the technical effect of improving the efficiency and accuracy of judging whether the device is normally connected to the local area network.

[0079] Optionally, in the detection device for the network connection status of a device provided in an embodiment of the present application, the receiving unit 32 includes: a first acquisition subunit, used to obtain the device IDs of M devices to be detected for the target device to be detected, and add the M device IDs to the target queue in sequence; a sending subunit, used to send a test signal to each device to be detected in sequence through the target device to be detected in the order of the device ID in the target queue, determine the feedback signal reception status of the test signal, and judge the test results of each test signal according to the feedback signal reception status of the test signal, wherein the test result is used to characterize whether the test signal is transmitted normally.

[0080] Optionally, in the detection device for the network connection status of the device provided in the embodiment of the present application, the sending subunit includes: a first sending module, which is used to send a test signal to the device to which the target device ID belongs for any target device ID in the target queue, and determine whether a feedback signal of the test signal is received within a preset time interval; a first determination module, which is used to determine that the feedback signal reception status is normal when the feedback signal is received within the preset time interval; and a second determination module, which is used to determine that the feedback signal reception status is abnormal when the feedback signal is not received within the preset time interval.

[0081] Optionally, in the detection device for the network connection status of the device provided in the embodiment of the present application, the sending subunit includes: a second sending module, used to send N secondary test signals to the device to which the target device ID belongs when the feedback signal reception status is abnormal, and determine the test result of the test signal based on the feedback results of the N secondary test signals, where N is a positive integer; and a third determination module, used to determine that the test result of the test signal is normal when the feedback signal reception status is normal.

[0082] Optionally, in the detection device for the network connection status of the device provided in the embodiment of the present application, the second sending module includes: a first determination submodule, used to determine that the test result of the test signal is normal when the feedback result of at least one secondary test signal is a feedback signal that the secondary test signal is received; and a second determination submodule, used to determine that the test result of the test signal is abnormal when the feedback results of N secondary test signals are all feedback signals that the secondary test signal is not received.

[0083] Optionally, in the detection device for the network connection status of a device provided in an embodiment of the present application, the determination unit 33 includes: a second acquisition subunit, used to obtain each test result in each test result set, and change the identifier of the device to be detected whose test result is normal to the first identifier, and change the identifier of the device to be detected whose test result is abnormal to the second identifier, to obtain M identifier sets; a sorting subunit, used to arrange the identifier sets corresponding to each device to be detected in the order of the device IDs of the M devices to be detected, to obtain a test result matrix.

[0084] Optionally, in the detection device for the network connection status of a device provided in an embodiment of the present application, the determination unit 33 includes: a third acquisition subunit, used to obtain, for the target device to be detected, the matrix rows and matrix columns corresponding to the target device to be detected in the test result matrix; a fourth acquisition subunit, used to obtain the first number of first identifiers in the matrix rows, and to obtain the second number of first identifiers in the matrix columns; a first determination subunit, used to determine that the connectivity status of the target device to be detected is normal when the first number or the second number is greater than or equal to the target number; and a second determination subunit, used to determine that the connectivity status of the target device to be detected is abnormal when both the first number and the second number are less than the target number.

[0085] The device for detecting the network connection status of the above-mentioned equipment includes a processor and a memory. The above-mentioned access unit 31, receiving unit 32, determination unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0086] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of low efficiency and accuracy of manually detecting the network connection status of the device in the related art is solved by adjusting the kernel parameters.

[0087] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0088] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, a method for detecting a network connection status of the device is implemented.

[0089] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes a method for detecting a network connection status of a device when the program is running.

[0090] Figure 4 is a schematic diagram of an electronic device provided according to an embodiment of the present application, such as Figure 4 As shown, an embodiment of the present invention provides an electronic device, the electronic device 40 includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the steps of the method for detecting the network connection status of the above device when executing the program. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0091] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the method for detecting the network connection status of the above-mentioned device.

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

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

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

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

[0096] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0097] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0098] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0099] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0100] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for detecting a network connection status of a device, characterized in that: include: Connect M devices to be detected to the target local area network, and turn on the M devices to be detected, wherein: M is a positive integer; Control each of the M devices to be detected to send a test signal to the M devices to be detected, and obtain a test result of each test signal to obtain M test result sets, wherein each test result set includes M test results; A test result matrix of the M devices to be detected is generated according to the M test result sets, and a connectivity status between each device to be detected and the target local area network is determined according to the test result matrix.

2. The method according to claim 1, characterized in that Controlling each of the M devices to be detected to send a test signal to the M devices to be detected, and obtaining a test result of each test signal includes: For the target device to be detected, obtain the device IDs of the M devices to be detected, and add the M device IDs to the target queue in order; The test signal is sent to each device to be detected in sequence by the target device to be detected in the order of the device ID in the target queue, the feedback signal reception status of the test signal is determined, and the test result of each test signal is judged according to the feedback signal reception status of the test signal, wherein the test result is used to characterize whether the test signal is transmitted normally.

3. The method according to claim 2, characterized in that Sending the test signal to each device to be detected in sequence according to the device ID sequence in the target queue, and determining the feedback signal reception state of the test signal includes: For any target device ID in the target queue, send the test signal to the device to which the target device ID belongs, and determine whether a feedback signal of the test signal is received within a preset time interval; In the case where the feedback signal is received within the preset time interval, determining that the feedback signal reception state is normal; When the feedback signal is not received within the preset time interval, it is determined that the feedback signal reception state is abnormal.

4. The method according to claim 3, characterized in that Determining the test result of each test signal according to the feedback signal receiving state of the test signal includes: When the feedback signal reception state is abnormal, N secondary test signals are sent to the device to which the target device ID belongs, and a test result of the test signal is determined according to the feedback results of the N secondary test signals, where N is a positive integer; In a case where the feedback signal receiving state is normal, it is determined that the test result of the test signal is normal.

5. The method according to claim 4, characterized in that Determining the test result of the test signal according to the feedback results of the N secondary test signals includes: In a case where the feedback result of at least one secondary test signal is a feedback signal of receiving the secondary test signal, determining that the test result of the test signal is normal; In a case where the feedback results of the N secondary test signals are all feedback signals indicating that the secondary test signal is not received, it is determined that the test result of the test signal is abnormal.

6. The method according to claim 1, characterized in that Generating a test result matrix of the M devices to be tested according to the M test result sets includes: Obtain each test result in each test result set, and change the identification of the device to be detected whose test result is normal to the first identification, and change the identification of the device to be detected whose test result is abnormal to the second identification, to obtain M identification sets; The identification sets corresponding to the devices to be detected are arranged in the order of the device IDs of the M devices to be detected to obtain the test result matrix.

7. The method according to claim 6, characterized in that Determining the connectivity status between each device to be detected and the target local area network according to the test result matrix includes: For a target device to be detected, obtaining a matrix row and a matrix column corresponding to the target device to be detected in the test result matrix; Obtain a first number of the first identifiers in the matrix rows, and obtain a second number of the first identifiers in the matrix columns; When the first number or the second number is greater than or equal to the target number, determining that the connectivity state of the target device to be detected is normal; When both the first number and the second number are smaller than the target number, it is determined that the connectivity state of the target device to be detected is abnormal.

8. A device for detecting the network connection status of a device, characterized in that: include: An access unit, used to connect M devices to be detected to a target local area network and turn on the M devices to be detected, where M is a positive integer; A receiving unit, used to control each of the M devices to be detected to send a test signal to the M devices to be detected, and obtain a test result of each test signal to obtain M test result sets, wherein each test result set includes M test results; A determination unit is used to generate a test result matrix of the M devices to be detected according to the M test result sets, and determine a connectivity status between each device to be detected and the target local area network according to the test result matrix.

9. The device according to claim 8, characterized in that The receiving unit comprises: A first acquisition subunit is used to acquire device IDs of the M devices to be detected for the target devices to be detected, and add the M device IDs to the target queue in order; A sending subunit is used to send the test signal to each device to be detected in sequence through the target device to be detected in the order of the device ID in the target queue, determine the feedback signal reception status of the test signal, and judge the test result of each test signal according to the feedback signal reception status of the test signal, wherein the test result is used to characterize whether the test signal is transmitted normally.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting the network connection status of the device described in any one of claims 1 to 7.