CN117459373A - Network diagnosis method, device and storage medium - Google Patents

Network diagnosis method, device and storage medium Download PDF

Info

Publication number
CN117459373A
CN117459373A CN202311582381.4A CN202311582381A CN117459373A CN 117459373 A CN117459373 A CN 117459373A CN 202311582381 A CN202311582381 A CN 202311582381A CN 117459373 A CN117459373 A CN 117459373A
Authority
CN
China
Prior art keywords
network
network device
preset
communication link
socket communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311582381.4A
Other languages
Chinese (zh)
Inventor
王妙龄
李慧敏
肖展荣
季嘉辉
吴鸿华
冯锶铟
林颖宇
黄思奇
林建丰
林培桂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Shanwei Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Shanwei Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Power Grid Co Ltd, Shanwei Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202311582381.4A priority Critical patent/CN117459373A/en
Publication of CN117459373A publication Critical patent/CN117459373A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a network diagnosis method, equipment and a storage medium. Wherein the method comprises the following steps: establishing a socket communication link between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected; and under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result. The technical problems of complicated network diagnosis flow and low operation efficiency in the automatic operation and maintenance process of the power information system are solved. The automatic rapid positioning and fault analysis are achieved, operation and maintenance work is simplified, and the automatic operation and maintenance work efficiency is improved.

Description

Network diagnosis method, device and storage medium
Technical Field
The present invention relates to the field of power network systems, and in particular, to a network diagnosis method, apparatus, and storage medium.
Background
The stability and safe operation of the power system in the modern society are increasingly dependent on the safety and stability of the power information system.
With the access of a plurality of terminals in the running process of the electric power information system network, the topology of the electric power system is increasingly complex and the informatization degree is continuously deepened. The need for automated operation and maintenance of power information systems is becoming increasingly evident.
However, in the process of automatic operation and maintenance of the electric power information system, problems of complicated flow, long working time, unsmooth communication with non-professional staff and the like exist, so that the problem processing progress is slow.
Disclosure of Invention
The invention provides a network diagnosis method, equipment and a storage medium, which are used for solving the technical problems of complicated network diagnosis flow and low operation efficiency in the automatic operation and maintenance process of an electric power information system.
According to an aspect of the present invention, there is provided a network diagnosis method, the method comprising:
establishing a socket communication link between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected;
and under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result.
According to another aspect of the present invention, there is provided a network diagnosis apparatus comprising:
the socket communication link module is used for establishing a socket communication link with the target network equipment based on the preset network parameters and the preset service mode;
a connection result determining module, configured to determine a connection result with the target network device based on the preset service mode and a preset connection condition when the socket communication link is successfully established;
and the diagnosis result determining module is used for determining the network diagnosis result of the target network equipment based on the connection result.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the network diagnostic method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a network diagnosis method according to any embodiment of the present invention.
According to the technical scheme, a socket communication link is established between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected. Network diagnostic connections in different modes are quickly simulated through socket communication and selection of service modes. And then, under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result. The technical problems of complicated network diagnosis flow and low operation efficiency in the automatic operation and maintenance process of the power information system are solved. The automatic rapid positioning and fault analysis are achieved, operation and maintenance work is simplified, and the automatic operation and maintenance work efficiency is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a network diagnosis method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a network diagnosis method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network diagnosis device according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a network diagnosis method according to an embodiment of the present invention, where the method may be performed by a network diagnosis device, and the network diagnosis device may be implemented in hardware and/or software, and the network diagnosis device may be configured in an electronic apparatus. As shown in fig. 1, the method includes:
s110, a socket communication link is established between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected.
In this embodiment, the preset service mode may be a mode preset according to an actual situation and related to a communication service type between network devices. For example, the preset service mode may be a communication service relationship between terminals. As another example, the preset service model may also be a communication service relationship between the server and the terminal. The preset network parameter may be a parameter related to network communication, for example, may be an IP address and a port number in a transport layer protocol. The first network device may be a subject network device performing a network diagnostic operation, for example, a terminal or server in a power network system. The second network device may be a network device to be subjected to network diagnosis, i.e., a target network device of the network diagnosis. The Socket communication link may be a network communication link implemented by an application program using a Socket interface, and may be used to transfer data between different computers. The mode of simulating the terminal to connect to the master station may be a communication mode of simulating network diagnostic communication between the first network device and the second network device as the terminal establishing a connection with the master station. The mode of simulating the master station waiting for the terminal connection may be a mode of simulating the network diagnostic communication between the first network device and the second network device as the master station waiting for the terminal connection. The master station may be a server device in the power network system, and the terminal may be a terminal device in the power network system.
Optionally, the establishing a socket communication link between the first network device and the second network device based on the preset service mode and the preset network parameter includes: under the condition that the preset service mode is a mode of simulating a terminal to connect with a master station, simulating first network equipment based on preset terminal simulation parameters, and determining second network equipment corresponding to the first network equipment based on preset network parameters; and establishing a socket communication link between the first network device and the second network device by taking the first network device as a terminal and the second network device as a master station.
In this embodiment, the preset terminal simulation parameter may be a parameter preset according to an actual situation to perform communication simulation on the first network device, and the terminal simulation parameter may perform network setting on the network device and simulate the network device as a terminal. Optionally, the terminal simulation parameters may be selected by the user in a pull-down menu or the like.
Specifically, in the case that the preset service mode is a mode in which the analog terminal is connected to the master station, the first network device may be first simulated as the terminal by using the preset terminal simulation parameter, and then the second network device that performs network communication with the first network device may be determined based on the communication address in the preset network parameter. And finally, the first network equipment is taken as a terminal, the second network equipment is taken as a server, and a socket communication link between the first network equipment and the second network equipment is established.
Optionally, the establishing a socket communication link between the first network device and the second network device based on the preset service mode and the preset network parameter includes: under the condition that a preset service mode is a mode of simulating a master station to wait for terminal connection, simulating first network equipment based on preset master station simulation parameters, and determining second network equipment corresponding to the first network equipment based on preset network parameters; and establishing a socket communication link between the first network device and the second network device by taking the first network device as a master station and the second network device as a terminal.
In this embodiment, the preset master station simulation parameter may be a parameter preset according to an actual situation to perform communication simulation on the first network device, and the master station simulation parameter may perform network setting on the network device and simulate the network device as a master station. Alternatively, the master station simulation parameters may be selected by the user in a drop-down menu or the like.
Specifically, when the preset service mode is a mode of simulating the master station to wait for the terminal to connect, the first network device may be first simulated as the master station by using the preset master station simulation parameter, and then the second network device that performs network communication with the first network device may be determined based on the communication address in the preset network parameter. And finally, the first network equipment is taken as a server end, the second network equipment is taken as a terminal, and a socket communication link between the first network equipment and the second network equipment is established.
Optionally, the establishing a socket communication link between the first network device and the second network device includes: reading a preset configuration file to obtain the device communication address of the target network device; creating a socket object based on the device communication address; establishing a socket communication link between the first network device and the second network device based on the socket object.
In this embodiment, the preset configuration file may be a file preset according to an actual situation and may be used to store a communication address of the network device. The preset configuration file is read, and the acquisition of the detectable address (IP) and the port (port) in the file can be attempted by traversing the preset configuration file. If found, the detected address or port can be output to the list for selection by the user, otherwise, the user can be informed of the undetected detectable address or port by a popup prompt or the like. The target network device may be a second network device that is a network diagnostic target. The device communication address may be a network communication address of the target network device, for example, an IP address, a port number, and the like. Creating the socket object may be creating a socket communication link object based on invoking the socket communication interface and the network parameters to enable socket communication.
Specifically, the preset configuration file may be read first, and the device communication address of the target network device serving as the network diagnosis target device may be obtained. A socket object may then be created based on the network communication parameters in the device communication address. And finally, establishing a socket network communication link between the first network device and the second network device based on the established socket object.
And S120, under the condition that the socket communication link is successfully established, determining a connection result between the first network equipment and the second network equipment, and determining a network diagnosis result corresponding to the second network equipment based on the connection result.
In this embodiment, the case that the socket communication link is successfully established may be the case that the socket object is successfully created and the socket communication link is successfully established. The connection result between the first network device and the second network device may be a connection result determined based on a specific communication condition between the first network device and the second network device in case that the socket communication link is successfully established, and the network diagnosis result corresponding to the second network device may be a connection result determined based on the connection result. For example, in the case where the preset service mode is a mode in which the master station is simulated to wait for the terminal to connect, the connection result between the first network device and the second network device may be determined according to whether or not there is a terminal successfully connected to the master station. The determining the network diagnosis result corresponding to the second network device based on the connection result may be determining, according to the specific content of the connection result, whether the connection with the second network device is successful, the reason of the unsuccessful connection, the error code, and the like, which are more detailed results, as the network diagnosis result corresponding to the second network device.
According to the technical scheme, a socket communication link is established between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected. Network diagnostic connections in different modes can be quickly simulated by socket communication and selection of service modes. And then, under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result. The technical problems of complicated network diagnosis flow and low operation efficiency in the automatic operation and maintenance process of the power information system are solved. The automatic rapid positioning and fault analysis are achieved, operation and maintenance work is simplified, and the automatic operation and maintenance work efficiency is improved.
Example two
Fig. 2 is a flowchart of a network diagnosis method according to a second embodiment of the present invention, and the present embodiment specifically illustrates a method for performing network diagnosis by using a network sniffing and network data analysis method based on the above embodiments. Reference is made to the description of this example for a specific implementation. The technical features that are the same as or similar to those of the foregoing embodiments are not described herein. As shown in fig. 2, the method includes:
s210, performing network sniffing on the second network equipment based on a network exploration command to obtain a network sniffing result corresponding to the second network equipment, wherein the network exploration command comprises at least one of ping, telnet and ssh commands.
In this embodiment, the network discovery command may be a command such as ping to send a network discovery packet (network sniff), and the network connection amount and network connectivity with the second network device are already obtained. The network sniffing is performed on the second network device based on the network exploration command, which may be that a network exploration data packet is sent to the second network device corresponding to the address parameter according to the network address parameter in the network exploration command, and a network sniffing result is obtained according to the analysis of the data content obtained by sniffing feedback. The network discovery command may include a ping, telnet, ssh command, etc. Wherein the ping command may send a data packet to the second network device and then wait to receive a reply data packet from the second network device, and when the second network device receives the data packet, may send the reply data packet to the first network device. the telnet command may be a command based on an application layer protocol to test a telnet service or port open condition of the second network device. The ssh command may be a command based on a transport layer to perform operations such as remote connection, user login, and remote command on the second network device.
Because network equipment in the power network system may occur such as equipment replacement, loose or old network cables, and network parameter setting problems. And adopting the network exploration command to sniff the second network equipment, the network sniffing result corresponding to the second network equipment can be obtained rapidly, and further, the network diagnosis result related to the connectivity of the second network equipment is determined.
S220, under the condition that a plurality of second network devices exist, the network sniffing results corresponding to the second network devices are input into a preset model view frame as model parameters.
In this embodiment, when there are multiple second network devices, network address parameters of the second network devices may be obtained in batches by using a file reading method and the like, and then network sniffing is performed on the multiple second network devices based on the multiple network address parameters and the network exploration command, so as to obtain multiple network sniffing results corresponding to the multiple second network devices. Because the network sniffing results are inconvenient to express and review, the network sniffing results corresponding to the second network devices can be converted into model parameters. The model parameters may then be input into a preset model view framework to perform view presentation on the plurality of network sniffing results. The preset model view frame can be a visual model preset according to actual conditions. For example, it may be qt model view framework.
S230, based on the model view frame, the network sniffing result is visually displayed in a tree structure.
In this embodiment, after the model parameters are input into the preset model view frame, the view control of the model view frame may be adjusted, and the multiple network sniffing results are visually displayed in a tree structure, so that the user can check and understand the results conveniently.
S240, determining a network to be tested based on the first network device and the second network device, acquiring a network data packet of the network to be tested, and determining a target data packet in the network data packet.
In this embodiment, the network to be tested may be the network described by the first network device and the second network device. The network data packet of the network to be tested may be a data packet obtained by grabbing a data packet existing in the network to be tested after the network sniffing in the foregoing embodiments occurs. The determining of the target data packet in the network data packet may be a data packet for further analysis obtained after screening and filtering the network data packet of the network to be tested obtained by grabbing the packet.
S250, carrying out data analysis on the target data packet, and generating an analysis report based on an analysis result, wherein the analysis report is used for indicating the network security state, and the network security state comprises at least one of security operation, potential security threat, fault and abnormal behavior.
In this embodiment, the analysis of the target data packet may be to analyze and classify the information in the data packet, obtain the network communication condition shown by the data in the target data packet, and find the location of the network communication problem. The analysis report may be a result report of the data analysis. Alternatively, the analysis report may be displayed in the form of a display screen generated by calling a visualization function and a configuration file, where the configuration file may be preconfigured with a report format, text information of the report, and the like.
Optionally, the determining the target data packet in the network data packet includes: and acquiring a data packet corresponding to a preset type link in the network data packet as a target data packet, wherein the preset type link comprises at least one of a link which is not established, a link which is established and a link which is not opened by Ping.
In this embodiment, the data packet of the link of the preset type may be a data packet type preset according to an actual situation, which is related to the connection situation of the link. Since the number of data packets captured during the packet capturing process may be very large, filtering is required according to the actual situation. Only the data packets related to the links which are not established in the data packets, the links which are established in the links and the links which are Ping blind are reserved for data analysis according to the purpose of network diagnosis.
And S260, establishing a socket communication link between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected.
And S270, under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result.
According to the technical scheme of the embodiment, the network sniffing result corresponding to the second network equipment is obtained by performing network sniffing on the second network equipment based on the network exploration command. Under the condition that a plurality of second network devices exist, the network sniffing results corresponding to the plurality of second network devices are input into a preset model view frame as model parameters; based on the model view frame, the network sniffing result is visually displayed in a tree structure, so that a user can conveniently review and understand the complex sniffing result. Determining a network to be tested based on the first network equipment and the second network equipment, acquiring a network data packet of the network to be tested, and determining a target data packet in the network data packet; and carrying out data analysis on the target data packet, and generating an analysis report based on an analysis result. The network sniffing and network data packet analysis result support is provided for network diagnosis. And establishing a socket communication link between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating the connection of the terminal to the master station and/or a mode of simulating the waiting of the master station for the connection of the terminal. And under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result. The technical problems of complicated network diagnosis flow and low operation efficiency in the automatic operation and maintenance process of the power information system are solved. The automatic rapid positioning and fault analysis are achieved, operation and maintenance work is simplified, and the automatic operation and maintenance work efficiency is improved.
Example III
Fig. 3 is a schematic structural diagram of a network diagnosis device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a socket communication link module 310, a connection result determination module 320, and a diagnostic result determination module 330.
Wherein, the socket communication link module 310 is configured to establish a socket communication link with the target network device based on the preset network parameter and the preset service mode;
a connection result determining module 320, configured to determine a connection result with the target network device based on the preset service mode and a preset connection condition when the socket communication link is successfully established;
a diagnostic result determining module 330, configured to determine a network diagnostic result of the target network device based on the connection result.
According to the technical scheme, a socket communication link is established between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected. Network diagnostic connections in different modes are quickly simulated through socket communication and selection of service modes. And then, under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result. The technical problems of complicated network diagnosis flow and low operation efficiency in the automatic operation and maintenance process of the power information system are solved. The automatic rapid positioning and fault analysis are achieved, operation and maintenance work is simplified, and the automatic operation and maintenance work efficiency is improved.
On the basis of the above technical solution, optionally, the socket communication link module 310 is configured to simulate a first network device based on a preset terminal simulation parameter and determine a second network device corresponding to the first network device based on a preset network parameter when the preset service mode is a mode in which the simulated terminal is connected to the master station; and establishing a socket communication link between the first network device and the second network device by taking the first network device as a terminal and the second network device as a master station.
On the basis of the above technical solution, optionally, the socket communication link module 310 is further configured to simulate a first network device based on a preset master station simulation parameter and determine a second network device corresponding to the first network device based on a preset network parameter when the preset service mode is a mode of simulating the master station to wait for terminal connection; and establishing a socket communication link between the first network device and the second network device by taking the first network device as a master station and the second network device as a terminal.
Based on the above technical solution, further, the socket communication link module 310 is specifically configured to perform at least one of the following steps:
reading a preset configuration file to obtain the device communication address of the target network device;
creating a socket object based on the device communication address;
establishing a socket communication link between the first network device and the second network device based on the socket object.
On the basis of the technical scheme, the network diagnosis device optionally further comprises a network sniffing module. The network sniffing module is configured to sniff the second network device based on a network exploration command to obtain a network sniffing result corresponding to the second network device, where the network exploration command includes at least one of ping, telnet, and ssh commands.
On the basis of the above technical solution, optionally, the network sniffing module is further configured to, after the obtaining of the network sniffing result, input, in a case where there are a plurality of second network devices, the network sniffing results corresponding to the plurality of second network devices as model parameters into a preset model view frame; and based on the model view frame, visually displaying the network sniffing result in a tree structure.
Based on the above technical solution, optionally, the connection result determining module 320 further includes a data packet analysis unit.
The data packet analysis module unit is used for determining a network to be tested based on the first network equipment and the second network equipment, acquiring a network data packet of the network to be tested, and determining a target data packet in the network data packet; and carrying out data analysis on the target data packet, and generating an analysis report based on an analysis result, wherein the analysis report is used for indicating the network security state, and the network security state comprises at least one of security operation, potential security threat, fault and abnormal behavior.
On the basis of the above technical solution, optionally, the packet analysis unit is further configured to obtain, as the target packet, a packet corresponding to a preset type link from the network packets, where the preset type link includes at least one of a link that is not established, a link that is established, and a link that is Ping blind.
The network diagnosis device provided by the embodiment of the invention can execute the network diagnosis method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as network diagnostic methods.
In some embodiments, the network diagnostic method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the network diagnostic method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the network diagnostic method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A network diagnostic method, comprising:
establishing a socket communication link between the first network device and the second network device based on a preset service mode and preset network parameters, wherein the preset service mode comprises a mode of simulating a terminal to be connected with a master station and/or a mode of simulating the master station to wait for the terminal to be connected;
and under the condition that the socket communication link is successfully established, determining a connection result between the first network device and the second network device, and determining a network diagnosis result corresponding to the second network device based on the connection result.
2. The method of claim 1, wherein establishing a socket communication link between the first network device and the second network device based on the preset service mode and the preset network parameters comprises:
under the condition that the preset service mode is a mode of simulating a terminal to connect with a master station, simulating first network equipment based on preset terminal simulation parameters, and determining second network equipment corresponding to the first network equipment based on preset network parameters;
and establishing a socket communication link between the first network device and the second network device by taking the first network device as a terminal and the second network device as a master station.
3. The method of claim 1, wherein establishing a socket communication link between the first network device and the second network device based on the preset service mode and the preset network parameters comprises:
under the condition that a preset service mode is a mode of simulating a master station to wait for terminal connection, simulating first network equipment based on preset master station simulation parameters, and determining second network equipment corresponding to the first network equipment based on preset network parameters;
and establishing a socket communication link between the first network device and the second network device by taking the first network device as a master station and the second network device as a terminal.
4. The method of claim 1, wherein establishing a socket communication link between the first network device and the second network device comprises:
reading a preset configuration file to obtain the device communication address of the target network device;
creating a socket object based on the device communication address;
establishing a socket communication link between the first network device and the second network device based on the socket object.
5. The method as recited in claim 1, further comprising:
and performing network sniffing on the second network equipment based on a network exploration command to obtain a network sniffing result corresponding to the second network equipment, wherein the network exploration command comprises at least one of ping, telnet and ssh commands.
6. The method of claim 5, further comprising, after the obtaining the network sniff result:
under the condition that a plurality of second network devices exist, the network sniffing results corresponding to the plurality of second network devices are input into a preset model view frame as model parameters;
and based on the model view frame, visually displaying the network sniffing result in a tree structure.
7. The method of claim 1, wherein in the event that the socket communication link establishment is successful, further comprising:
determining a network to be tested based on the first network equipment and the second network equipment, acquiring a network data packet of the network to be tested, and determining a target data packet in the network data packet;
and carrying out data analysis on the target data packet, and generating an analysis report based on an analysis result, wherein the analysis report is used for indicating the network security state, and the network security state comprises at least one of security operation, potential security threat, fault and abnormal behavior.
8. The method of claim 7, wherein said determining a destination packet of said network packets comprises:
and acquiring a data packet corresponding to a preset type link in the network data packet as a target data packet, wherein the preset type link comprises at least one of a link which is not established, a link which is established and a link which is not opened by Ping.
9. A network diagnostic device, comprising:
the socket communication link module is used for establishing a socket communication link with the target network equipment based on the preset network parameters and the preset service mode;
a connection result determining module, configured to determine a connection result with the target network device based on the preset service mode and a preset connection condition when the socket communication link is successfully established;
and the diagnosis result determining module is used for determining the network diagnosis result of the target network equipment based on the connection result.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the network diagnostic method of any one of claims 1-7.
CN202311582381.4A 2023-11-23 2023-11-23 Network diagnosis method, device and storage medium Pending CN117459373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311582381.4A CN117459373A (en) 2023-11-23 2023-11-23 Network diagnosis method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311582381.4A CN117459373A (en) 2023-11-23 2023-11-23 Network diagnosis method, device and storage medium

Publications (1)

Publication Number Publication Date
CN117459373A true CN117459373A (en) 2024-01-26

Family

ID=89589182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311582381.4A Pending CN117459373A (en) 2023-11-23 2023-11-23 Network diagnosis method, device and storage medium

Country Status (1)

Country Link
CN (1) CN117459373A (en)

Similar Documents

Publication Publication Date Title
CN113726607B (en) Network detection method and device, electronic equipment and storage medium
CN115396289B (en) Fault alarm determining method and device, electronic equipment and storage medium
CN114070752B (en) Test method, test device, electronic equipment and computer readable storage medium
CN113656252B (en) Fault positioning method, device, electronic equipment and storage medium
CN114885014A (en) Method, device, equipment and medium for monitoring external field equipment state
CN113347060B (en) Method, device and system for detecting power network fault based on process automation
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN115865734B (en) Fault detection method, data generation method, device, equipment and medium
CN116938953A (en) Block chain-based data processing method and device, electronic equipment and storage medium
CN117459373A (en) Network diagnosis method, device and storage medium
CN114095394B (en) Network node fault detection method and device, electronic equipment and storage medium
CN115904388A (en) Application program protocol analysis method, device, equipment and storage medium
CN115146309A (en) Privacy compliance detection method, device, server, terminal and storage medium
CN114116288A (en) Fault processing method, device and computer program product
CN117251769B (en) Abnormal data identification method, device, equipment and medium based on monitoring component
CN115293096B (en) Line generation method, device, electronic equipment and storage medium
CN117762776A (en) Test script generation method and device, electronic equipment and storage medium
CN117827647A (en) Execution method, device, equipment and medium of test script
CN116192686A (en) BMC stability test method, device, equipment and medium
CN117407300A (en) UI test method, device, equipment and storage medium based on Flutter
CN116109617A (en) Image quality management method, system, equipment and medium
CN117472774A (en) Interface testing method, device, electronic equipment and storage medium
CN118193027A (en) Firmware associated information updating method, device, equipment and medium
CN117319252A (en) Network quality detection result display method, device, equipment and storage medium
CN116107878A (en) Remote debugging method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination