CN115484170A - Method and device for generating network flow topological graph and electronic equipment - Google Patents

Method and device for generating network flow topological graph and electronic equipment Download PDF

Info

Publication number
CN115484170A
CN115484170A CN202211111170.8A CN202211111170A CN115484170A CN 115484170 A CN115484170 A CN 115484170A CN 202211111170 A CN202211111170 A CN 202211111170A CN 115484170 A CN115484170 A CN 115484170A
Authority
CN
China
Prior art keywords
container node
list
network
communication information
container
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
CN202211111170.8A
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.)
Sunshine Insurance Group Co Ltd
Original Assignee
Sunshine Insurance Group 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 Sunshine Insurance Group Co Ltd filed Critical Sunshine Insurance Group Co Ltd
Priority to CN202211111170.8A priority Critical patent/CN115484170A/en
Publication of CN115484170A publication Critical patent/CN115484170A/en
Pending legal-status Critical Current

Links

Images

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/12Discovery or management of network topologies

Landscapes

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

Abstract

The invention provides a method and a device for generating a network flow topological graph and electronic equipment, wherein a process corresponding to a first container node is scanned according to a preset scanning period, and network communication information corresponding to the first container node is acquired; the network communication information is sent to the server, so that the server generates a container node list based on the network communication information, the container node list is sent to the terminal device to generate a network flow topological graph, the network communication information corresponding to the container nodes can be automatically scanned through agent proxy service arranged on the container nodes and sent to the server, the network flow topological graph is automatically generated through the server and the terminal device, manual combing of the network flow topological graph is not needed, the generation efficiency and accuracy of the network flow topological graph are improved, and the operation and maintenance difficulty is reduced.

Description

Method and device for generating network flow topological graph and electronic equipment
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for generating a network traffic topological graph, and an electronic device.
Background
With the rapid development of containerization technology, the complexity of network request interaction among container nodes is increasing day by day. The monitoring and maintenance requirements for the nodes are also increased day by day, network activities among the nodes can be generally monitored through a network flow topological graph, in the related technology, the container network topology often needs technical personnel to comb the network communication situation among all container nodes, when the number of the container nodes is increased, the workload of the technical personnel is increased suddenly, the manual network topological graph combing mode is poor in timeliness and accuracy, the operation and maintenance difficulty is increased, and when the number of the container nodes is increased to a certain number, the traditional manual combing mode is not feasible.
Disclosure of Invention
The invention aims to provide a method and a device for generating a network flow topological graph and electronic equipment, so as to improve the generation efficiency and accuracy of the network flow topological graph and reduce the operation and maintenance difficulty.
The invention provides a method for generating a network flow topological graph, which is applied to agent proxy service arranged on a first container node, wherein the agent proxy service is in communication connection with a server; the method comprises the following steps: scanning a process corresponding to the first container node according to a preset scanning period to acquire network communication information corresponding to the first container node; and sending the network communication information to the server so that the server generates a container node list based on the network communication information, and sending the container node list to the terminal equipment so as to generate a network flow topological graph.
Further, the network communication information includes: sending address information, a sending port number, a sending process name and a sending information timestamp of a sending container of the communication information to a first container node; and the address information, the receiving port number, the receiving process name and the receiving information timestamp of the receiving container for receiving the communication information sent by the first container node.
The invention provides a method for generating a network flow topological graph, which is applied to a server, wherein agent proxy services are arranged on each container node corresponding to a plurality of container nodes, and the server is in communication connection with each container node through each agent proxy service; the method comprises the following steps: receiving network communication information corresponding to each container node from each agent service; the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service; generating a container node list based on the network communication information corresponding to each container node; the node receiving network information list comprises a node sending network information list and a node receiving network information list, wherein the container node list comprises a container node identifier, a container node address, a node receiving network information list and a node sending network information list of each container node; and if a list acquisition request from the terminal equipment is received, sending the container node list to the terminal equipment so that the terminal equipment can generate a network flow topological graph according to the container node list.
Further, the step of generating a container node list based on the network communication information corresponding to each container node includes: storing the network communication information corresponding to each container node into a preset message list; carrying out duplicate removal processing on the network communication information in the message list to obtain a processed message list; and generating a container node list based on the network communication information in the processed message list.
Further, the method further comprises: if new network communication information is stored in the message list, after the network communication information in the message list is subjected to duplication elimination processing, whether updated network communication information exists in the processed message list or not is judged; and if the updated network communication information exists, reading the updated network communication information, and updating the container node list based on the updated network communication information.
Further, the step of sending the container node list to the terminal device so that the terminal device generates the network traffic topology map according to the container node list includes: sending the container node list to the terminal equipment so that the terminal equipment can draw corresponding container nodes in a preset initial topological graph according to the container node identifications; and generating a network flow topological graph according to the network information list received by the node corresponding to each container node and the network information list sent by the node.
The invention provides a generating device of a network flow topological graph, which is arranged on agent proxy service arranged on a first container node, wherein the agent proxy service is in communication connection with a server; the device comprises: the acquisition module is used for scanning a process corresponding to the first container node according to a preset scanning period and acquiring network communication information corresponding to the first container node; the first generation module is used for sending the network communication information to the server so that the server generates a container node list based on the network communication information, and the container node list is sent to the terminal equipment so as to generate a network flow topological graph.
The device is arranged at a server side, agent proxy services are arranged on each container corresponding to a plurality of container nodes, and the server side is in communication connection with each container node through each agent proxy service; the device comprises: the receiving module is used for receiving network communication information corresponding to each container node from each agent service; the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service; the second generation module is used for generating a container node list based on the network communication information corresponding to each container node; the node receiving network information list comprises a node sending network information list and a node receiving network information list, wherein the container node list comprises a container node identifier, a container node address, a node receiving network information list and a node sending network information list of each container node; and the third generation module is used for sending the container node list to the terminal equipment if receiving the list acquisition request from the terminal equipment so as to enable the terminal equipment to generate a network flow topological graph according to the container node list.
The electronic device provided by the invention is characterized by comprising a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to realize the generation method of the network traffic topological graph.
The invention provides a machine-readable storage medium, which is characterized by storing machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to realize the generation method of the network traffic topological graph.
According to the method, the device and the electronic equipment for generating the network flow topological graph, provided by the invention, the process corresponding to the first container node is scanned according to the preset scanning period, and the network communication information corresponding to the first container node is obtained; the network communication information is sent to the server side, so that the server side generates a container node list based on the network communication information, the container node list is sent to the terminal equipment to generate a network flow topological graph, network communication information corresponding to the container nodes can be automatically scanned through agent proxy service arranged on the container nodes and sent to the server side, the network flow topological graph is automatically generated through the server side and the terminal equipment, the network flow topological graph does not need to be manually sorted, the generation efficiency and accuracy of the network flow topological graph are improved, and the operation and maintenance difficulty is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for generating a network traffic topological graph according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for generating a network traffic topology graph according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a system for generating a network traffic topological graph according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for generating a network traffic topology map according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for generating a network traffic topology diagram according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a device for generating a network traffic topology diagram according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the rapid development of containerization technology, the complexity of network request interaction among container nodes is increased day by day, and the number of nodes and clusters is increased more and more. The monitoring and maintenance requirements on the nodes are also increasing. As service dependencies become increasingly complex today, monitoring network activity between container nodes presents a significant challenge.
In the process of generating the network traffic topological graph, traffic needs to be calibrated according to a sending node, a receiving node, a network protocol and the like of the traffic. For example, the traffic issues physical information of the node, such as whether it is a host, whether it is a pod, whether it is located in a kubernets cluster, etc., the ip address of the node, the port through which the traffic passes, etc.
In the related art, a network flow topological graph of a container usually needs a technician to comb network communication conditions among container nodes, when the number of the container nodes is increased, the workload of the technician is increased suddenly, the timeliness and the accuracy of the traditional network topological graph combed manually are often greatly influenced, and the difficulty of operation and maintenance is increased. When the number of container nodes increases to a certain number, the traditional manual carding-based approach becomes infeasible. Based on this, the embodiment of the invention provides a method and a device for generating a network traffic topological graph and electronic equipment.
In order to facilitate understanding of the embodiment, a method for generating a network traffic topological graph disclosed in the embodiment of the present invention is first described, where the method is applied to agent proxy services arranged on a first container node, and the agent proxy services are in communication connection with a server; as shown in fig. 1, the method comprises the steps of:
step S102, scanning a process corresponding to the first container node according to a preset scanning period, and acquiring network communication information corresponding to the first container node.
The preset scanning period can be set according to actual requirements, for example, scanning once every 10 minutes or 15 minutes, and the like; the network communication information includes: sending address information, an issuing port number, an issuing process name and an information sending timestamp of a sending container of communication information to a first container node, wherein the number of the issuing ports may be one or more; receiving address information, a receiving port number, a receiving process name and a receiving information timestamp of a receiving container of communication information sent by a first container node; wherein, the number of the receiving ports can be one or more; the address information is typically the ip address of the container; in actual implementation, the agent service may be installed on the first container node, and the agent service may scan the current lower/proc directory of the first container node and scan process information therein to obtain the network communication information of the process.
And step S104, sending the network communication information to the server, so that the server generates a container node list based on the network communication information, and sending the container node list to the terminal equipment to generate a network flow topological graph.
The container Node list can be understood as a Node type list, and a server side can provide the Node type list; the Anget agent service can upload the scanned network communication information to the server, a corresponding container node list can be generated through the server, after a request sent by the terminal equipment is received, the container node list can be sent to the terminal equipment, and a network flow topological graph is generated through the terminal equipment.
According to the method for generating the network traffic topological graph, a process corresponding to a first container node is scanned according to a preset scanning period, and network communication information corresponding to the first container node is obtained; the network communication information is sent to the server side, so that the server side generates a container node list based on the network communication information, the container node list is sent to the terminal equipment to generate a network flow topological graph, network communication information corresponding to the container nodes can be automatically scanned through agent proxy service arranged on the container nodes and sent to the server side, the network flow topological graph is automatically generated through the server side and the terminal equipment, the network flow topological graph does not need to be manually sorted, the generation efficiency and accuracy of the network flow topological graph are improved, and the operation and maintenance difficulty is reduced.
The embodiment of the invention also provides another method for generating the network flow topological graph, which is applied to a server, wherein agent proxy services are arranged on each container node corresponding to the plurality of container nodes, and the server is in communication connection with each container node through each agent proxy service; as shown in fig. 2, the method comprises the steps of:
step S202, receiving network communication information corresponding to each container node from each agent service; and the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service.
In actual implementation, the agent service in each container node may scan the processes of the respective corresponding container nodes according to the preset scanning period in the manner in the foregoing embodiment, so as to obtain the network communication information corresponding to each container node, and send the network communication information to the server.
Step S204, a container node list is generated based on the network communication information corresponding to each container node; the container node list comprises a container node identifier, a container node address, a node receiving network information list and a node sending network information list of each container node.
For each container node, the node receiving network information list may be understood as a list of receiving containers for receiving communication information sent by the current container node, and the list usually maintains information such as address information, receiving port number, receiving process name, and receiving information timestamp of the receiving container; the node sending network information list can be understood as a list of sending containers for sending communication information to the current container node, and the list usually maintains the address information, the sending port number, the sending process name, the sending information timestamp and other information of the sending containers; the container node list also comprises container node identifiers and container node addresses of all the container nodes, the container node identifiers are unique identifiers, and the container node addresses are ip addresses of the container nodes generally; in actual implementation, after receiving the network communication information corresponding to each container node, the server may maintain the received network communication information and generate a container node list.
Step S206, if receiving the list acquisition request from the terminal equipment, sending the container node list to the terminal equipment so that the terminal equipment can generate a network flow topological graph according to the container node list.
The terminal device can send a list acquisition request to the server periodically according to a preset time interval, after receiving the request, the server can send the generated container node list to the terminal device, and the terminal device can further automatically generate a corresponding network flow topological graph according to the container node list.
The method for generating the network traffic topological graph receives network communication information corresponding to each container node from each agent service; generating a container node list based on the network communication information corresponding to each container node; and if a list acquisition request from the terminal equipment is received, sending the container node list to the terminal equipment so that the terminal equipment generates a network flow topological graph according to the container node list. According to the method, the network communication information corresponding to the container nodes can be automatically scanned through agent proxy service arranged on the container nodes and sent to the server, the network flow topological graph is automatically generated through the server and the terminal equipment, and the network flow topological graph does not need to be manually combed, so that the generation efficiency and accuracy of the network flow topological graph are improved, and the operation and maintenance difficulty is reduced.
The embodiment of the invention also provides another method for generating the network flow topological graph, which is realized on the basis of the method of the embodiment, and comprises the following steps:
step one, receiving network communication information corresponding to each container node from each agent service; and the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service.
And step two, storing the network communication information corresponding to each container node into a preset message list.
The server generally provides a message list to receive the network communication information corresponding to each container node uploaded by each agent proxy service, and stores the received network communication information.
And step three, carrying out duplication elimination processing on the network communication information in the message list to obtain a processed message list.
For each container node, because the corresponding agent service scans the process corresponding to the container node according to the preset scanning period to obtain the network communication information, if the network communication information of the container node is not changed, the network communication information obtained by the current scanning is repeated with the network communication information obtained by the last scanning, so that the network communication information in the message list needs to be deduplicated to obtain the processed message list.
Fourthly, a container node list is generated based on the network communication information in the processed message list; the container node list comprises a container node identifier, a container node address, a node receiving network information list and a node sending network information list of each container node.
And step five, if new network communication information is stored in the message list, after the network communication information in the message list is subjected to duplication elimination, judging whether the updated network communication information exists in the processed message list.
Because each agent service scans the process corresponding to the corresponding container node according to the preset scanning period to acquire the corresponding network communication information and uploads the corresponding network communication information to the message list of the server, the message list can receive the network communication information of the information at regular time, and after the duplicate removal processing, whether the updated network communication information exists in the processed message list needs to be judged.
And step six, if the updated network communication information exists, reading the updated network communication information, and updating the container node list based on the updated network communication information.
If the server detects that the updated network communication information exists in the processed message list, namely unconsumed network communication information exists, the updated network communication information is read to update the container node list.
Step seven, if a list acquisition request from the terminal equipment is received, the container node list is sent to the terminal equipment, so that the terminal equipment can draw corresponding container nodes in a preset initial topological graph according to container node identifications; and generating a network flow topological graph according to the network information list received by the node corresponding to each container node and the network information list sent by the node.
If the server receives a list acquisition request sent by the terminal equipment, the server can send a container node list to the terminal equipment, and after the terminal equipment receives the container node list, if a certain container node does not exist in the current network traffic topological graph, the container node can be drawn according to a container node identifier of the container node; if a certain container node exists in the current network flow topological graph, repeated description is not needed, and the terminal equipment draws the network communication among the container nodes which are communicated with each other in the network into the network flow topological graph according to the network information list received by the nodes in the container node list and the network information list sent by the nodes.
The method for generating the network traffic topological graph receives network communication information corresponding to each container node from each agent service; and storing the network communication information corresponding to each container node into a preset message list. And carrying out duplication elimination processing on the network communication information in the message list to obtain a processed message list. Generating a container node list based on the network communication information in the processed message list; and if the new network communication information is stored in the message list, after the network communication information in the message list is subjected to duplication elimination, judging whether the updated network communication information exists in the processed message list. And if the updated network communication information exists, reading the updated network communication information, and updating the container node list based on the updated network communication information. If a list acquisition request from the terminal equipment is received, sending the container node list to the terminal equipment so that the terminal equipment can draw a corresponding container node in a preset initial topological graph according to the container node identification; and generating a network flow topological graph according to the network information list received by the node corresponding to each container node and the network information list sent by the node. The method can automatically scan the network communication information corresponding to the container node through agent agency service arranged on the container node, and send the network communication information to the server, and automatically generate the network flow topological graph through the server and the terminal device, and the network flow topological graph does not need to be manually combed, so that the generation efficiency and accuracy of the network flow topological graph are improved, the operation and maintenance difficulty is reduced, in addition, the message list is subjected to deduplication processing, repeated drawing of the network flow topological graph can be avoided, the calculated amount is effectively reduced, in addition, the network flow topological graph can be timely updated according to the updated container node list, and the timeliness of the network flow topological graph is improved.
To further understand the foregoing embodiments, a schematic structural diagram of a system for generating a network traffic topology map as shown in fig. 3 is provided below, where the system includes a container agent (corresponding to the agent service), a server (corresponding to the server), and a front end (corresponding to the terminal device), where the server (corresponding to the server) includes a message list and a Node list (corresponding to the container Node list). And configuring a container end agent for periodically scanning and uploading container node information and network communication information of the container to a message list, wherein the network communication information at least comprises a network communication sending ip address, a network communication receiving ip address, a port number, a sending process name, a receiving process name and a timestamp.
The message list is used for receiving the information uploaded by the container agent. The Node list is used for storing various container Node information. The stored information is unique identifier of the container node, node address information, a node receiving network information list and a node sending network information list. The server end processes the information in the message list and judges whether the Node list needs to be updated according to the received information; and if so, updating the Node list. And receiving a front-end request and returning the Node list to the front end. The front end is a user operation end, and sends a request to the server end and receives returned Node list information. And drawing the nodes in the page according to the unique marks of the nodes in the list. And then according to the network information list sent by the nodes and the network information list received by the corresponding nodes, drawing the network communication among the container nodes which are communicated with each other in the network into a topological graph.
Referring to the flowchart of another method for generating a network traffic topological graph shown in fig. 4, agent is installed in a container node first; agent scans the network communication information of the container and uploads the information to the server; receiving a message by a server end message list, providing a Node list by the server end, reading the message list by the server end, and generating the Node list; the front end sends a request to the server end, receives the Node list, draws the nodes and generates a network topological graph; usually, a time interval is set, after the time interval is reached, the agent scans and uploads again, and collects the container network communication information of new time, and at the moment, a step of reading a message list by a server end is triggered, namely the server end detects that unconsumed messages exist in the message list to judge whether the Node list needs to be updated or not; and if necessary, updating the changed network communication condition to the Node list. When the front end sends the request again, the latest container network topological graph can be drawn.
The method for generating the network traffic topological graph can automatically generate the network traffic topological graph among the container nodes aiming at real-time traffic interaction change of each node. The container network flow topological graph is updated by updating the communication condition of the container network flow through the program scanning container process information, the accurate, efficient and real-time generation can be carried out, and the accuracy and timeliness of the generation of the network topological graph are improved. The method can adapt to the future requirements of container development, and can continuously monitor the network communication of the containers with increasing complexity completely, accurately and in real time.
Referring to the generation apparatus of a network traffic topological graph shown in fig. 5, the apparatus is configured to an agent proxy service that is disposed on a first container node, and the agent proxy service is in communication connection with a server; as shown in fig. 5, the apparatus includes:
an obtaining module 50, configured to scan a process corresponding to the first container node according to a preset scanning period, and obtain network communication information corresponding to the first container node;
the first generating module 51 is configured to send the network communication information to the server, so that the server generates a container node list based on the network communication information, and sends the container node list to the terminal device, so as to generate a network traffic topology map.
The generating device of the network flow topological graph scans the process corresponding to the first container node according to a preset scanning period to obtain the network communication information corresponding to the first container node; the device can automatically scan the network communication information corresponding to the container node through agent proxy service arranged on the container node and send the network communication information to the server, and the network flow topological graph is automatically generated through the server and the terminal equipment without manually combing the network flow topological graph, so that the generation efficiency and accuracy of the network flow topological graph are improved, and the operation and maintenance difficulty is reduced.
Further, the network communication information includes: sending address information, an issuing port number, an issuing process name and an information sending timestamp of a sending container of the communication information to a first container node; and the address information, the receiving port number, the receiving process name and the receiving information timestamp of the receiving container for receiving the communication information sent by the first container node.
The implementation principle and the generated technical effect of the generation device of the network traffic topological graph provided by the embodiment of the invention are the same as those of the generation method embodiment of the network traffic topological graph, and for the sake of brief description, corresponding contents in the generation method embodiment of the network traffic topological graph can be referred to where the embodiment of the generation device of the network traffic topological graph is not mentioned.
Referring to the apparatus for generating a network traffic topological graph shown in fig. 6, the apparatus is disposed at a server, each container corresponding to a plurality of container nodes is provided with an agent proxy service, and the server is in communication connection with each container node through each agent proxy service; the device comprises:
a receiving module 60, configured to receive network communication information corresponding to each container node from each agent service; the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service;
a second generating module 61, configured to generate a container node list based on the network communication information corresponding to each container node; the node receiving network information list comprises a node sending network information list and a node receiving network information list, wherein the container node list comprises a container node identifier, a container node address, the node receiving network information list and the node sending network information list of each container node;
a third generating module 62, configured to send the container node list to the terminal device if a list obtaining request from the terminal device is received, so that the terminal device generates a network traffic topology map according to the container node list.
The generation device of the network flow topological graph receives network communication information corresponding to each container node from each agent proxy service; generating a container node list based on the network communication information corresponding to each container node; and if a list acquisition request from the terminal equipment is received, sending the container node list to the terminal equipment so that the terminal equipment generates a network flow topological graph according to the container node list. The device can automatically scan the network communication information corresponding to the container nodes through agent agency service arranged on the container nodes, and send the network communication information to the server, and automatically generate the network flow topological graph through the server and the terminal equipment without manually combing the network flow topological graph, so that the generation efficiency and accuracy of the network flow topological graph are improved, and the operation and maintenance difficulty is reduced.
Further, the second generating module is further configured to: storing the network communication information corresponding to each container node into a preset message list; carrying out duplicate removal processing on the network communication information in the message list to obtain a processed message list; and generating a container node list based on the network communication information in the processed message list.
Further, the second generating module is further configured to: if new network communication information is stored in the message list, after the network communication information in the message list is subjected to duplication elimination processing, whether updated network communication information exists in the processed message list or not is judged; and if the updated network communication information exists, reading the updated network communication information, and updating the container node list based on the updated network communication information.
Further, the third generating module is further configured to: sending the container node list to the terminal equipment so that the terminal equipment can draw corresponding container nodes in a preset initial topological graph according to the container node identifications; and generating a network flow topological graph according to the network information list received by the node corresponding to each container node and the network information list sent by the node.
The implementation principle and the generated technical effect of the generating device of the network traffic topological graph provided in the embodiment of the present invention are the same as those of the generating method embodiment of the network traffic topological graph, and for brief description, corresponding contents in the generating method embodiment of the network traffic topological graph may be referred to where no mention is made in part of the generating device embodiment of the network traffic topological graph.
An embodiment of the present invention further provides an electronic device, which is shown in fig. 7 and includes a processor 100 and a memory 101, where the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the method for generating the network traffic topology map.
Further, the electronic device shown in fig. 7 further includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.
The Memory 101 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
Processor 100 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 100. The Processor 100 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the present invention further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method for generating the network traffic topology map.
The method and apparatus for generating a network traffic topological graph and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The method for generating the network flow topological graph is characterized by being applied to agent proxy services arranged on a first container node, wherein the agent proxy services are in communication connection with a server; the method comprises the following steps:
scanning a process corresponding to the first container node according to a preset scanning period to acquire network communication information corresponding to the first container node;
and sending the network communication information to a server so that the server generates a container node list based on the network communication information, and sending the container node list to terminal equipment so as to generate a network flow topological graph.
2. The method of claim 1, wherein the network communication information comprises: sending address information, an issuing port number, an issuing process name and an information sending timestamp of a sending container of communication information to the first container node; and receiving the address information, the receiving port number, the receiving process name and the receiving information timestamp of the receiving container of the communication information sent by the first container node.
3. The method for generating the network flow topological graph is characterized in that the method is applied to a server, agent proxy services are arranged on each container node corresponding to a plurality of container nodes, and the server is in communication connection with each container node through each agent proxy service; the method comprises the following steps:
receiving network communication information corresponding to each container node from each agent proxy service; the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service;
generating a container node list based on the network communication information corresponding to each container node; the container node list comprises a container node identifier, a container node address, a node receiving network information list and a node sending network information list of each container node;
and if a list acquisition request from the terminal equipment is received, sending the container node list to the terminal equipment so that the terminal equipment can generate a network flow topological graph according to the container node list.
4. The method of claim 3, wherein the step of generating a container node list based on the network communication information corresponding to each container node comprises:
storing the network communication information corresponding to each container node into a preset message list;
carrying out duplicate removal processing on the network communication information in the message list to obtain a processed message list;
and generating a container node list based on the network communication information in the processed message list.
5. The method of claim 4, further comprising:
if new network communication information is stored in the message list, after the network communication information in the message list is subjected to duplicate removal processing, judging whether the updated network communication information exists in the processed message list;
if the updated network communication information exists, reading the updated network communication information and updating the container node list based on the updated network communication information.
6. The method according to claim 3, wherein the step of sending the container node list to the terminal device to enable the terminal device to generate a network traffic topology map according to the container node list comprises:
sending the container node list to the terminal equipment so that the terminal equipment can draw corresponding container nodes in a preset initial topological graph according to the container node identification; and generating a network flow topological graph according to the node receiving network information list and the node sending network information list corresponding to each container node.
7. The device for generating the network flow topological graph is characterized by being arranged on agent service arranged on a first container node, wherein the agent service is in communication connection with a server; the device comprises:
the acquisition module is used for scanning a process corresponding to the first container node according to a preset scanning period and acquiring network communication information corresponding to the first container node;
the first generation module is used for sending the network communication information to a server, so that the server generates a container node list based on the network communication information, and sends the container node list to terminal equipment to generate a network flow topological graph.
8. The device for generating the network flow topological graph is characterized by being arranged at a server side, wherein agent proxy services are arranged on containers corresponding to a plurality of container nodes, and the server side is in communication connection with each container node through each agent proxy service; the device comprises:
the receiving module is used for receiving network communication information corresponding to each container node from each agent service; the network communication information corresponding to each container node is obtained by scanning the process corresponding to the corresponding container node according to a preset scanning period through the corresponding agent service;
the second generation module is used for generating a container node list based on the network communication information corresponding to each container node; the container node list comprises a container node identifier, a container node address, a node receiving network information list and a node sending network information list of each container node;
and the third generation module is used for sending the container node list to the terminal equipment if a list acquisition request from the terminal equipment is received, so that the terminal equipment generates a network flow topological graph according to the container node list.
9. An electronic device comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the method of generating a network traffic topology map of any of claims 1-6.
10. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform a method of generating a network traffic topology map as recited in any of claims 1-6.
CN202211111170.8A 2022-09-13 2022-09-13 Method and device for generating network flow topological graph and electronic equipment Pending CN115484170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211111170.8A CN115484170A (en) 2022-09-13 2022-09-13 Method and device for generating network flow topological graph and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211111170.8A CN115484170A (en) 2022-09-13 2022-09-13 Method and device for generating network flow topological graph and electronic equipment

Publications (1)

Publication Number Publication Date
CN115484170A true CN115484170A (en) 2022-12-16

Family

ID=84392857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211111170.8A Pending CN115484170A (en) 2022-09-13 2022-09-13 Method and device for generating network flow topological graph and electronic equipment

Country Status (1)

Country Link
CN (1) CN115484170A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000005594A1 (en) * 1998-07-21 2000-02-03 Conduct Ltd. Automatic network traffic analysis
CN109992474A (en) * 2019-03-08 2019-07-09 江苏达科云数据科技有限公司 System topological detects generation method under a kind of cloud environment
CN112291213A (en) * 2020-10-16 2021-01-29 北京方研矩行科技有限公司 Abnormal flow analysis method and device based on intelligent terminal
CN114553709A (en) * 2022-04-28 2022-05-27 恒生电子股份有限公司 Topological relation display method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000005594A1 (en) * 1998-07-21 2000-02-03 Conduct Ltd. Automatic network traffic analysis
CN109992474A (en) * 2019-03-08 2019-07-09 江苏达科云数据科技有限公司 System topological detects generation method under a kind of cloud environment
CN112291213A (en) * 2020-10-16 2021-01-29 北京方研矩行科技有限公司 Abnormal flow analysis method and device based on intelligent terminal
CN114553709A (en) * 2022-04-28 2022-05-27 恒生电子股份有限公司 Topological relation display method and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邓勇等: "基于移动代理的网络拓扑发现技术的研究", 计算机科学, no. 10, 28 October 2008 (2008-10-28), pages 76 - 80 *

Similar Documents

Publication Publication Date Title
CN110417901B (en) Data processing method and device and gateway server
CN112434039A (en) Data storage method, device, storage medium and electronic device
CN112311617A (en) Configured data monitoring and alarming method and system
CN111966289B (en) Partition optimization method and system based on Kafka cluster
CN111538563A (en) Event analysis method and device for Kubernetes
CN106789166B (en) Method and device for network element batch configuration
CN108063685B (en) Log analysis method and device
CN112286757A (en) Data synchronization monitoring method and device, electronic equipment and storage medium
CN111198804A (en) Gateway-based industrial internet platform third-party micro-service monitoring and early warning method
CN114070563B (en) Data processing method, device, terminal and storage medium
CN113727348B (en) Method, device, system and storage medium for detecting user data of User Equipment (UE)
CN113407555A (en) Operation data updating method and system of equipment handheld terminal
CN115484170A (en) Method and device for generating network flow topological graph and electronic equipment
CN105893150B (en) Interface calling frequency control method and device and interface calling request processing method and device
CN108717438B (en) Chained data state acquisition system and method
CN114844821B (en) Network automatic discovery method, device, equipment and storage medium
CN111200578A (en) Communication method, client device and server device
CN115705259A (en) Fault processing method, related device and storage medium
CN113849135A (en) Log access method and device and server
CN107147694B (en) Information processing method and device
CN110430093B (en) Data processing method and device and computer readable storage medium
CN114826867B (en) Method, device, system and storage medium for processing data
CN115580546B (en) Data subscription method and device, electronic equipment and readable storage medium
CN117076257B (en) Management method, management server and management system based on server cluster
CN112769889B (en) Service data pushing method and device, storage medium and electronic device

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