Communication link visualization methods, apparatuses, devices, media, and program products
By acquiring and visualizing communication connection data on the server side and generating a communication link diagram, the problems of complex system relationships and poor data quality due to manual sorting in operation and maintenance are solved. This enables accurate display of communication relationships between systems and rapid fault location, thereby improving system stability and operation and maintenance efficiency.
Patent Information
- Application Number
- CN202411283993.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-09-13
AI Technical Summary
In the operation and maintenance of a large system group, the relationships between the various systems are intricate and change in real time. Relying on manual sorting results in poor data quality and low timeliness, making it difficult to accurately grasp the overall picture of the system and analyze the impact of failures.
By obtaining the system correspondence between running nodes and reverse proxy nodes on the server side, collecting communication connection data and combining it with service configuration files, and using graph database components for image visualization, a communication link diagram is generated to show the communication relationship between the system and service nodes.
It enables accurate visualization of communication relationships between systems, timely updates of communication link relationship data, helps operation and maintenance personnel quickly discover faults and optimize resource utilization, and improves system stability and fault location efficiency.
Smart Images

Figure CN119363596B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of computer technology or financial technology, and more specifically to a method, apparatus, device, medium, and program product for visualizing communication links. Background Technology
[0002] When operating and maintaining a large system cluster, the interrelationships between these systems are crucial for analyzing system operational status and the impact of failures. However, these interrelationships are often complex and constantly changing in real time with business needs. Conventional configuration management systems typically only store system-related attribute information. Understanding the interrelationships between systems requires manual sorting, input, and maintenance by operations personnel, resulting in poor data quality and low timeliness. Summary of the Invention
[0003] In view of the above problems, this disclosure provides communication link visualization methods, apparatus, devices, media and program products.
[0004] According to a first aspect of this disclosure, a communication link visualization method is provided. This method is applied to a server, which includes multiple systems, each system including multiple service nodes. Each service node includes a running node and a reverse proxy node. The reverse proxy node forwards requests to the running node. The method includes: obtaining system correspondences between the running node, the reverse proxy node, and the systems; collecting communication connection data of the service nodes based on a preset collection frequency to obtain communication connection data within a preset time period, the communication connection data including the target IP address of the service node corresponding to the data receiving end and the source IP address of the service node corresponding to the data sending end; obtaining the service configuration file of the reverse proxy node, the service configuration file including the proxy mapping relationship between the running node and the reverse proxy node; obtaining communication link relationship data within the preset time period based on the communication connection data, the service configuration file, and the system correspondences, the communication link relationship data including communication link data between multiple systems and communication link data between multiple service nodes; and calling a graph database component to perform image visualization on the communication link relationship data to obtain a communication link graph.
[0005] According to embodiments of this disclosure, obtaining communication link relationship data within a preset time period based on the communication connection data, the service configuration file, and the system correspondence includes: determining the communication connection data as intra-system communication connection data when the target IP address and the source IP address of the communication connection data correspond to IP addresses in the same system in the system correspondence; determining the communication connection data as inter-system communication connection data when the target IP address and the source IP address of the communication connection data correspond to IP addresses in different systems in the system correspondence; obtaining intra-system communication link relationship data within a preset time period based on the intra-system communication connections and the service configuration file; and obtaining inter-system communication link relationship data based on all the inter-system communication connection data.
[0006] According to embodiments of this disclosure, the method further includes: obtaining service registration data, the service registration data including a service identifier, a service instance IP address, and a listening port number; and obtaining second communication link relationship data within a preset time period based on the communication connection data and the service registration data.
[0007] According to embodiments of this disclosure, the second communication link relationship data includes inter-service communication links and inter-service instance communication links. The service identifier and the service instance IP address have a service instance mapping relationship. Obtaining the second communication link relationship data within a preset time period based on the communication connection data and the service registration data includes: obtaining the inter-service instance communication link based on the service registration data and the communication connection data when the service instance IP address of the communication connection data is equal to the target IP address and / or the source IP address of the communication connection data; and obtaining the inter-service communication link based on the inter-service instance communication link and the service instance mapping relationship.
[0008] According to embodiments of this disclosure, the second communication link relationship data includes inter-service communication links and inter-service instance communication links. The service identifier and the service instance IP address have a service instance mapping relationship. Obtaining the second communication link relationship data within a preset time period based on the communication connection data and the service registration data includes: obtaining the inter-service instance communication link based on the service registration data and the communication connection data when the service instance IP address of the communication connection data is equal to the target IP address and / or the source IP address of the communication connection data; and obtaining the inter-service communication link based on the inter-service instance communication link and the service instance mapping relationship.
[0009] According to embodiments of this disclosure, the communication connection data further includes a communication connection status. The method for obtaining the communication link between the service instances based on the service registration data and the communication connection data includes: determining the communication connection data whose communication connection status is not disconnected as candidate communication connection data; and obtaining the communication link between the service instances based on the candidate communication connection data and the service instance mapping relationship.
[0010] The second aspect of this disclosure provides a communication link visualization device, which is mounted on a server. The server includes multiple systems, and each system includes multiple service nodes. Each service node includes a running node and a reverse proxy node. The reverse proxy node is used to forward requests to the running node. The device includes an acquisition module, which is used to acquire the system correspondence between the running node and the reverse proxy node and the system, respectively.
[0011] The data acquisition module is used to collect communication connection data of the aforementioned service nodes based on a preset acquisition frequency, and obtain communication connection data within a preset time period. The communication connection data includes the target IP address of the aforementioned service node corresponding to the data receiving end and the source IP address of the aforementioned service node corresponding to the data sending end. The service configuration file acquisition module is used to obtain the service configuration file of the aforementioned reverse proxy node. The service configuration file includes the proxy mapping relationship between the aforementioned running node and the aforementioned reverse proxy node. The communication link relationship calculation module is used to obtain communication link relationship data within a preset time period based on the aforementioned communication connection data, the aforementioned service configuration file, and the aforementioned system correspondence. The communication link relationship data includes communication link data between multiple aforementioned systems and communication link data between multiple aforementioned service nodes. The visualization module is used to call the graph database component to perform image visualization on the aforementioned communication link relationship data to obtain a communication link graph.
[0012] According to an embodiment of this disclosure, the communication link relationship calculation module includes: an intra-system communication connection data determination submodule, used to determine the communication connection data as intra-system communication connection data when the target IP address and the source IP address of the communication connection data correspond to IP addresses in the same system in the system correspondence; an inter-system communication connection data determination submodule, used to determine the communication connection data as inter-system communication connection data when the target IP address and the source IP address of the communication connection data correspond to IP addresses in different systems in the system correspondence; and an intra-system communication link relationship data calculation submodule, used to obtain intra-system communication link relationship data within a preset time period based on the intra-system communication connection and the service configuration file.
[0013] The inter-system communication link relationship data calculation submodule is used to obtain inter-system communication link relationship data based on all the above-mentioned inter-system communication connection data.
[0014] According to embodiments of this disclosure, the apparatus further includes: a service registration data acquisition module, used to acquire service registration data, the service registration data including a service identifier, a service instance IP address, and a listening port number; and a second communication link relationship data calculation module, used to obtain second communication link relationship data within a preset time period based on the communication connection data and the service registration data.
[0015] According to embodiments of this disclosure, the second communication link relationship data includes inter-service communication links and inter-service instance communication links. The service identifier and the service instance IP address have a service instance mapping relationship. The second communication link relationship data calculation module includes: an inter-service instance communication link calculation submodule, used to obtain the inter-service instance communication link based on the service registration data and the communication connection data when the service instance IP address of the communication connection data is equal to the target IP address and / or the source IP address of the communication connection data; and an inter-service communication link calculation submodule, used to obtain the inter-service communication link based on the inter-service instance communication link and the service instance mapping relationship.
[0016] According to embodiments of this disclosure, the communication connection data further includes a communication connection identifier, and the apparatus further includes an inter-socket communication link calculation module, used to obtain an inter-socket communication link based on the communication connection identifier and the communication link between the IP addresses.
[0017] According to embodiments of this disclosure, the communication connection data further includes a communication connection status, and the service instance inter-communication link calculation submodule includes: a candidate communication connection data determination unit, used to determine the communication connection data whose communication connection status is not disconnected as candidate communication connection data; and a service instance inter-communication link determination unit, used to obtain the service instance inter-communication link based on the candidate communication connection data and the service instance mapping relationship.
[0018] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0019] A fourth aspect of this disclosure also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0020] The fifth aspect of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0021] According to the embodiments of this disclosure, communication connection data of service nodes are collected by a preset collection frequency, and system correspondence and service configuration files between running nodes, reverse proxy nodes and the system are obtained. This results in communication link relationship data that can characterize the communication relationship between systems and communication link relationship data between multiple service nodes. The communication link relationship data is visualized by a graph database component, which can more accurately obtain the communication relationship between the system and the running nodes. The communication link relationship data is updated in a timely manner and displayed in the form of a communication link diagram, which intuitively shows the communication relationship between various systems and service nodes. This can help operation and maintenance personnel quickly discover and handle faults in the system. Attached Figure Description
[0022] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0023] Figure 1 This diagram illustrates an application scenario of a communication link visualization method and apparatus according to embodiments of the present disclosure.
[0024] Figure 2 A flowchart illustrating a communication link visualization method according to an embodiment of the present disclosure is shown schematically;
[0025] Figure 3 A schematic diagram illustrating communication links between systems according to embodiments of the present disclosure is shown.
[0026] Figure 4 The illustration shows a schematic diagram of a visualization of system relationships according to an embodiment of the present disclosure;
[0027] Figure 5 This schematically illustrates a structural block diagram of a communication link visualization device according to an embodiment of the present disclosure;
[0028] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a communication link visualization method according to an embodiment of the present disclosure. Detailed Implementation
[0029] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0030] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0032] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0033] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0034] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.
[0035] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0036] In the operation and maintenance of a large system cluster, the interrelationships between the systems are crucial for analyzing system operational status and the impact of failures. However, these interrelationships are often intricate and change in real time as business develops. In this situation, it is very difficult for operations and maintenance personnel to manually sort out and understand these relationships, making it hard to grasp the overall picture of the system. Furthermore, relying solely on operations and maintenance personnel to manually sort out, input, and maintain data results in poor data quality and low timeliness.
[0037] In view of this, embodiments of the present disclosure provide a communication link visualization method. The method is applied to a server, which includes multiple systems, each system including multiple service nodes, and each service node including a running node and a reverse proxy node. The reverse proxy node is used to forward requests to the running node. The method includes: obtaining the system correspondence between the running node and the reverse proxy node and the system, respectively; collecting communication connection data of the service nodes based on a preset collection frequency to obtain communication connection data within a preset time period, wherein the communication connection data includes the target IP address of the service node corresponding to the data receiving end and the source IP address of the service node corresponding to the data sending end; obtaining the service configuration file of the reverse proxy node, wherein the service configuration file includes the proxy mapping relationship between the running node and the reverse proxy node; obtaining communication link relationship data within a preset time period based on the communication connection data, the service configuration file, and the system correspondence, wherein the communication link relationship data includes communication link data between multiple systems and communication link data between multiple service nodes; and calling a graph database component to perform image visualization on the communication link relationship data to obtain a communication link graph.
[0038] Figure 1 The illustration shows an application scenario of the communication link visualization method and apparatus according to embodiments of the present disclosure.
[0039] like Figure 1As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0040] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0041] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0042] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0043] It should be noted that the communication link visualization method provided in this embodiment can generally be executed by server 105. Correspondingly, the communication link visualization device provided in this embodiment can generally be located in server 105. The communication link visualization method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the communication link visualization device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0044] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0045] The following will be based on Figure 1 The described scene, through Figures 2-4 The communication link visualization method of the present disclosure embodiments will be described in detail.
[0046] Figure 2 A flowchart illustrating a communication link visualization method according to an embodiment of the present disclosure is shown schematically.
[0047] like Figure 2 As shown, the communication link visualization method of this embodiment includes operations S210 to S250.
[0048] According to embodiments of this disclosure, the above method is applied to a server, which includes multiple systems, each system including multiple service nodes, each service node including a running node and a reverse proxy node, and the reverse proxy node being used to forward requests to the running node.
[0049] In operation S210, the system correspondence between the running node and the reverse proxy node and the system is obtained respectively.
[0050] According to embodiments of this disclosure, the aforementioned multiple systems may include a cloud management platform, and the system correspondence may be stored in the cloud management platform.
[0051] For example, the system correspondence could be: running node a1: IP address 10.16.0.1, belonging to system A; reverse proxy node b1: IP address 10.16.0.2, belonging to system B.
[0052] During operation S220, communication connection data of service nodes are collected based on a preset collection frequency to obtain communication connection data within a preset time period.
[0053] The communication connection data includes the target IP address of the service node corresponding to the data receiving end and the source IP address of the service node corresponding to the data sending end.
[0054] According to embodiments of this disclosure, an agent can be installed on each service node to automatically collect communication connection data. The agent can collect network connection data at the operating system level.
[0055] According to embodiments of this disclosure, the preset sampling frequency can be, for example, 1 minute, 1 hour, etc. The preset time period can be, for example, 1 second, 10 seconds, 20 seconds, 1 minute, etc., and this disclosure does not impose any limitations on it.
[0056] For example, the agent on each service node can collect the communication connection data of the service node within 1 second every 1 minute.
[0057] According to embodiments of this disclosure, the aforementioned communication connection data may further include the target port number of the service node corresponding to the data receiving end and the source port number corresponding to the data sending end.
[0058] When operating S230, obtain the service configuration file of the reverse proxy node.
[0059] The service configuration file includes the proxy mapping relationship between the running node and the reverse proxy node.
[0060] According to embodiments of this disclosure, obtaining a service configuration file can be achieved by first scanning the service running location, then scanning the directory where the service configuration file is located, and finally parsing the configuration file to obtain the corresponding service configuration file.
[0061] According to embodiments of this disclosure, the service configuration file may include a listening port number, a service name, and a proxy mapping relationship between the running node and the reverse proxy node. The proxy mapping relationship may be, for example, a partial data of a received request that is forwarded to the corresponding proxy node.
[0062] For example, a request with the suffix " / edu / " can be forwarded to the running node with the IP address "http: / / 10.32.2.161:8080"; a request with the suffix " / vod / " can be forwarded to the running node with the IP address "http: / / 10.32.2.201:80".
[0063] In operation S240, communication link relationship data within a preset time period is obtained based on communication connection data, service configuration files, and system correspondence.
[0064] The communication link relationship data includes communication link data between multiple systems and communication link data between multiple service nodes.
[0065] According to embodiments of this disclosure, data communication link relationships can be obtained by integrating communication connection data, service configuration files, and system correspondences.
[0066] Table 1 below schematically illustrates the data communication link relationship table of a reverse proxy node according to an embodiment of the present disclosure.
[0067] Table 1
[0068]
[0069] Among them, srcSocketID represents the socket corresponding to the communication connection data between the running node and the reverse proxy, tgtSocketID represents the socket corresponding to the communication connection data between the reverse proxy node and the external service node of the system, and relName represents the communication link relationship data belonging to the reverse proxy.
[0070] When operating S250, the graph database component is invoked to visualize the communication link relationship data to obtain a communication link graph.
[0071] According to the embodiments of this disclosure, the graph database described above can be a native graph database or a non-native graph database, and this application does not impose any restrictions on this.
[0072] According to embodiments of this disclosure, communication link relationship data can be stored in a graph database in the form of a graph, and a communication link graph can be generated based on the graph database and displayed to the target user when the user views it.
[0073] According to embodiments of this disclosure, when calling a graph database component for image visualization, different parameters can be passed in to generate communication link diagrams at different levels, such as communication link diagrams between systems and communication link diagrams between service nodes.
[0074] Figure 3 A schematic diagram illustrating communication links between systems according to embodiments of the present disclosure is provided.
[0075] like Figure 3 As shown, system A sends requests to system B, system C, and system D respectively; system B sends a request to system D, and system C and system D send requests to each other.
[0076] According to the embodiments of this disclosure, communication connection data of service nodes are collected by a preset collection frequency, and system correspondence and service configuration files between running nodes, reverse proxy nodes and the system are obtained. This results in communication link relationship data that can characterize the communication relationship between systems and communication link relationship data between multiple service nodes. The communication link relationship data is visualized by a graph database component, which can more accurately obtain the communication relationship between the system and the running nodes. The communication link relationship data is updated in a timely manner and displayed in the form of a communication link diagram, which intuitively shows the communication relationship between various systems and service nodes. This can help operation and maintenance personnel quickly discover and handle faults in the system.
[0077] According to embodiments of this disclosure, obtaining communication link relationship data within a preset time period based on communication connection data, service configuration files, and system correspondence includes: determining the communication connection data as intra-system communication connection data when the target IP address and source IP address of the communication connection data correspond to IP addresses in the same system in the system correspondence; determining the communication connection data as inter-system communication connection data when the target IP address and source IP address of the communication connection data correspond to IP addresses in different systems in the system correspondence; obtaining intra-system communication link relationship data within a preset time period based on intra-system communication connections and service configuration files; and obtaining inter-system communication link relationship data based on all inter-system communication connection data.
[0078] For example, consider the following data, where the system correspondence is as follows: running node a1: IP address is 10.16.0.1, belonging to system A; running node a2: IP address is 10.16.0.2, belonging to system B; reverse proxy node b1: IP address is 10.16.0.3, belonging to system B; in the collected communication connection data s1, the target IP address is 10.16.0.3 and the source IP address is 10.16.0.1; in the collected communication connection data s2, the target IP address is 10.16.0.2 and the source IP address is 10.16.0.3; the service configuration file is for... For requests with the suffix / edu / , reverse proxy node b1 will forward them to the running node with IP address "10.16.0.2". Based on the target IP address, source IP address and system correspondence in the communication connection data, we can determine that the communication connection data s2 between running node a2 and reverse proxy node b1 is intra-system communication connection data, and the communication connection data s1 between running node a1 and reverse proxy node b1 is inter-system communication connection data. Then, based on s2 and the service configuration file, we can determine the intra-system communication link relationship data, and based on all inter-system communication connection data, we can determine the inter-system communication link data.
[0079] According to the embodiments of this disclosure, the intra-system communication connection data and inter-system communication connection data are determined by the target IP address and source IP address of the communication connection data, respectively. Intra-system communication link relationship data is obtained based on the service configuration file, and inter-system communication link relationship data is obtained based on all inter-system communication connection data. This allows for clear tracking of communication connections between various nodes within the system, facilitating fault diagnosis and problem location. Furthermore, it enables monitoring of system operation status and improves system stability.
[0080] According to embodiments of this disclosure, the method further includes: obtaining service registration data, which includes a service identifier, a service instance IP address, and a listening port number; and obtaining second communication link relationship data within a preset time period based on communication connection data and service registration data.
[0081] According to the embodiments of this disclosure, the service registration data can be stored in a registration center. The registration center includes various service registration data. For a service, there can be multiple service nodes running the service, and each service node running the service can be called a service instance.
[0082] According to embodiments of this disclosure, the aforementioned second communication link relationship data includes inter-service communication links and inter-service instance communication links. The service identifier and the service instance IP address have a service instance mapping relationship. Obtaining the second communication link relationship data within a preset time period based on communication connection data and service registration data includes: obtaining inter-service instance communication links based on service registration data and communication connection data when the service instance IP address of the communication connection data is equal to the target IP address and / or source IP address of the communication connection data; and obtaining inter-service communication links based on inter-service instance communication links and service instance mapping relationships.
[0083] According to embodiments of this disclosure, the communication connection data also includes a target port number and a source port number. If the service instance IP address of the communication connection data is determined to be equal to the target IP address and / or source IP address of the communication connection data, it can be determined whether the communication connection data is inter-service communication connection data based on the service listening port number and the target port number and source port number in the communication connection data.
[0084] For example, for a service whose service instance IP is 10.32.2.32 and whose listening port number is 63626 in the service registration data, if the target IP address or source IP address of the communication connection data is equal to the service instance IP address, it can be further determined whether it is a communication link between service instances based on the target port number and the source port number.
[0085] According to embodiments of this disclosure, after determining the communication link between service instances, the communication link between services can be obtained based on the service instance mapping relationship. For example, after determining that service instance c1 serves service node a1, service instance c2 serves service node a2, and service instance c3 serves service node a3, according to the service instance mapping relationship that c1 and c3 belong to service A and c2 belongs to service B, it can be obtained that service A serves service nodes a1 and a3, and service B serves service node a2.
[0086] According to embodiments of this disclosure, by acquiring service registration data and determining communication links between service instances based on communication connection data and service registration data, operation and maintenance personnel can perform intelligent load balancing based on the communication links between service instances to optimize resource utilization. Furthermore, by obtaining the communication links between services through service instance mapping relationships, the overall operational status of the service can be monitored.
[0087] According to embodiments of this disclosure, the aforementioned communication connection data further includes a communication connection identifier, and the method further includes: obtaining an inter-socket communication link based on the communication connection identifier and the communication link between IP addresses.
[0088] Table 2 below schematically illustrates socket communication connection structure data according to an embodiment of the present disclosure.
[0089] Table 2
[0090]
[0091] Among them, socketID is the communication connection identifier. There is a communication connection identifier for each communication connection data. IP is the specific IP address bound to the socket. port is the port bound to the socket. There can be multiple sockets for a service node, and the multiple sockets are bound to different ports of the service node.
[0092] Table 3 schematically illustrates the communication connection data structure data according to an embodiment of the present disclosure.
[0093] Table 3
[0094]
[0095] Wherein, srcSocketID represents the source socket ID, indicating that the request is made by the object corresponding to the source socket ID, tgtSocketID represents the target socket ID, indicating that the request is made to the object corresponding to the target socket ID, and relName represents the communication link relationship data that belongs to the request.
[0096] According to embodiments of this disclosure, the aforementioned communication connection data also includes communication connection status. Obtaining a communication link between service instances based on service registration data and communication connection data includes: determining communication connection data whose communication connection status is not disconnected as candidate communication connection data; and obtaining a communication link between service instances based on the candidate communication connection data and the service instance mapping relationship.
[0097] Table 4 schematically illustrates communication connection data according to embodiments of the present disclosure.
[0098] Table 4
[0099]
[0100] The communication connection status represents the TCP connection status, including the LISTEN (listening) state, ESTABLISHED (established) state, and CLOSED (closed) state. LISTEN indicates that the corresponding service node opens a socket to listen for connection requests from other service node ports; ESTABLISHED indicates an open connection where the two parties can or are already exchanging data; CLOSED indicates that the service node enters the closed state after receiving the ACK (acknowledgment) packet, meaning the connection ends and there is no connection status.
[0101] According to the embodiments of this disclosure, by filtering and determining the communication connection data whose communication connection status is not disconnected as candidate communication connection data, and further obtaining the communication link between service instances based on the candidate communication connection data and the service instance mapping relationship, efficiency can be improved and server-side computing time can be reduced.
[0102] Figure 4 The diagram illustrates a visualization of system relationships according to an embodiment of the present disclosure.
[0103] like Figure 4 As shown, by summarizing communication connection data, service configuration files, service registration data, system correspondence, and other data, the relationship data can be enriched. Table 5 below illustrates the IP host relationship data; Table 6 illustrates the host system relationship data; and Table 7 illustrates the Socket service relationship data.
[0104] Table 5
[0105]
[0106] Table 6
[0107]
[0108] Wherein, IPID is the ID corresponding to the IP address, hostID is the ID corresponding to the host, systemID is the ID corresponding to the system, and relName indicates the relationship between the IP and the host, as well as the relationship between the host and the system.
[0109] Table 7
[0110]
[0111] Among them, socketID represents the ID corresponding to the socket, serviceID represents the ID corresponding to the service, and relName represents the relationship between the socket and the service, that is, the socket is used to provide the service.
[0112] According to the embodiments of this disclosure, the inter-system relationships at the system level, host level, service level, and socket level can be displayed as needed, and the corresponding communication link diagrams can be displayed sequentially according to the data relationships.
[0113] Based on the above-described communication link visualization method, this disclosure also provides a communication link visualization device. The following will be combined with... Figure 5 The device is described in detail.
[0114] Figure 5 A schematic block diagram of a communication link visualization device according to an embodiment of the present disclosure is shown.
[0115] like Figure 5 As shown, the communication link visualization device 500 in this embodiment includes an acquisition module 510, a collection module 520, a service configuration file acquisition module 530, a communication link relationship calculation module 540, and a visualization module 550.
[0116] The acquisition module 510 is used to acquire the system correspondence between the running node and the reverse proxy node and the system, respectively. In one embodiment, the acquisition module 510 can be used to perform the operation S210 described above, which will not be repeated here.
[0117] The acquisition module 520 is used to acquire communication connection data of service nodes based on a preset acquisition frequency, and obtain communication connection data within a preset time period. The communication connection data includes the target IP address of the service node corresponding to the data receiving end and the source IP address of the service node corresponding to the data sending end. In one embodiment, the acquisition module 520 can be used to perform the operation S220 described above, which will not be repeated here.
[0118] The service configuration file acquisition module 530 is used to acquire the service configuration file of the reverse proxy node. The service configuration file includes the proxy mapping relationship between the running node and the reverse proxy node. In one embodiment, the service configuration file acquisition module 530 can be used to perform the operation S230 described above, which will not be repeated here.
[0119] The communication link relationship calculation module 540 is used to obtain communication link relationship data within a preset time period based on communication connection data, service configuration files, and system correspondence. The communication link relationship data includes communication link data between multiple systems and communication link data between multiple service nodes. In one embodiment, the communication link relationship calculation module 540 can be used to perform the operation S240 described above, which will not be repeated here.
[0120] The visualization module 550 is used to call the graph database component to perform image visualization of the communication link relationship data to obtain a communication link diagram. In one embodiment, the visualization module 550 can be used to perform the operation S250 described above, which will not be repeated here.
[0121] According to an embodiment of this disclosure, the communication link relationship calculation module includes: an intra-system communication connection data determination submodule, used to determine the communication connection data as intra-system communication connection data when the target IP address and the source IP address of the communication connection data correspond to IP addresses in the same system in the system correspondence; an inter-system communication connection data determination submodule, used to determine the communication connection data as inter-system communication connection data when the target IP address and the source IP address of the communication connection data correspond to IP addresses in different systems in the system correspondence; and an intra-system communication link relationship data calculation submodule, used to obtain intra-system communication link relationship data within a preset time period based on the intra-system communication connection and the service configuration file.
[0122] The inter-system communication link relationship data calculation submodule is used to obtain inter-system communication link relationship data based on all the above-mentioned inter-system communication connection data.
[0123] According to embodiments of this disclosure, the apparatus further includes: a service registration data acquisition module, used to acquire service registration data, the service registration data including a service identifier, a service instance IP address, and a listening port number; and a second communication link relationship data calculation module, used to obtain second communication link relationship data within a preset time period based on the communication connection data and the service registration data.
[0124] According to embodiments of this disclosure, the second communication link relationship data includes inter-service communication links and inter-service instance communication links. The service identifier and the service instance IP address have a service instance mapping relationship. The second communication link relationship data calculation module includes: an inter-service instance communication link calculation submodule, used to obtain the inter-service instance communication link based on the service registration data and the communication connection data when the service instance IP address of the communication connection data is equal to the target IP address and / or the source IP address of the communication connection data; and an inter-service communication link calculation submodule, used to obtain the inter-service communication link based on the inter-service instance communication link and the service instance mapping relationship.
[0125] According to embodiments of this disclosure, the communication connection data further includes a communication connection identifier, and the apparatus further includes an inter-socket communication link calculation module, used to obtain an inter-socket communication link based on the communication connection identifier and the communication link between the IP addresses.
[0126] According to embodiments of this disclosure, the communication connection data further includes a communication connection status, and the service instance inter-communication link calculation submodule includes: a candidate communication connection data determination unit, used to determine the communication connection data whose communication connection status is not disconnected as candidate communication connection data; and a service instance inter-communication link determination unit, used to obtain the service instance inter-communication link based on the candidate communication connection data and the service instance mapping relationship.
[0127] According to embodiments of this disclosure, any multiple modules among the acquisition module 510, collection module 520, service profile acquisition module 530, communication link relationship calculation module 540, and visualization module 550 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the acquisition module 510, collection module 520, service profile acquisition module 530, communication link relationship calculation module 540, and visualization module 550 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the acquisition module 510, collection module 520, service configuration file acquisition module 530, communication link relationship calculation module 540, and visualization module 550 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0128] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a communication link visualization method according to an embodiment of the present disclosure.
[0129] like Figure 6As shown, an electronic device 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 605 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0130] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0131] According to embodiments of this disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 605 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 605 as needed.
[0132] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0133] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.
[0134] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the communication link visualization method provided in the embodiments of this disclosure.
[0135] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0136] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0137] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0138] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0140] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0141] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for visualizing communication links, characterized in that, The method is applied to a server, which includes multiple systems, each system including multiple service nodes, each service node including a running node and a reverse proxy node. The reverse proxy node is used to forward requests to the running node. The method includes: Obtain the system correspondence between the running node and the reverse proxy node and the system, respectively; Based on a preset collection frequency, the communication connection data of the service node is collected to obtain the communication connection data within a preset time period. The communication connection data includes the target IP address of the service node corresponding to the data receiving end and the source IP address of the service node corresponding to the data sending end. Obtain the service configuration file of the reverse proxy node, the service configuration file including the proxy mapping relationship between the running node and the reverse proxy node; Based on the communication connection data, the service configuration file and the system correspondence, communication link relationship data within a preset time period is obtained. The communication link relationship data includes communication link data between multiple systems and communication link data between multiple service nodes. The graph database component is invoked to visualize the communication link relationship data to obtain a communication link graph.
2. The method according to claim 1, characterized in that, The process of obtaining communication link relationship data within a preset time period based on the communication connection data, the service configuration file, and the system correspondence includes: If the target IP address and the source IP address of the communication connection data correspond to IP addresses in the same system in the system correspondence, the communication connection data is determined to be intra-system communication connection data. When the target IP address and the source IP address of the communication connection data correspond to IP addresses in different systems in the system correspondence, the communication connection data is determined to be inter-system communication connection data; Based on the system communication connections and the service configuration file, obtain the system communication link relationship data within a preset time period; Based on all the aforementioned inter-system communication connection data, inter-system communication link relationship data is obtained.
3. The method according to claim 1, characterized in that, The method further includes: Obtain service registration data, which includes service identifier, service instance IP address, and listening port number; Based on the communication connection data and the service registration data, second communication link relationship data within a preset time period is obtained.
4. The method according to claim 3, characterized in that, The second communication link relationship data includes inter-service communication links and inter-service instance communication links. The service identifier and the service instance IP address have a service instance mapping relationship. Obtaining the second communication link relationship data within a preset time period based on the communication connection data and the service registration data includes: If the service instance IP address in the communication connection data is equal to the target IP address and / or the source IP address in the communication connection data, the communication link between the service instances is obtained based on the service registration data and the communication connection data. The inter-service communication link is obtained based on the inter-service communication link and the service instance mapping relationship.
5. The method according to claim 1, characterized in that, The communication connection data also includes a communication connection identifier, and the method further includes: The inter-socket communication link is obtained based on the communication connection identifier and the communication link between the IP addresses.
6. The method according to claim 4, characterized in that, The communication connection data also includes the communication connection status. The step of obtaining the communication link between the service instances based on the service registration data and the communication connection data includes: The communication connection data whose communication connection status is not disconnected is identified as candidate communication connection data; The communication links between the service instances are obtained based on the candidate communication connection data and the service instance mapping relationship.
7. A communication link visualization device, characterized in that, The device is mounted on a server, which includes multiple systems, each system including multiple service nodes. Each service node includes a running node and a reverse proxy node. The reverse proxy node is used to forward requests to the running node. The device includes: The acquisition module is used to acquire the system correspondence between the running node and the reverse proxy node and the system, respectively; The acquisition module is used to acquire the communication connection data of the service node based on a preset acquisition frequency, and to obtain the communication connection data within a preset time period. The communication connection data includes the target IP address of the service node corresponding to the data receiving end and the source IP address of the service node corresponding to the data sending end. The service configuration file acquisition module is used to acquire the service configuration file of the reverse proxy node, wherein the service configuration file includes the proxy mapping relationship between the running node and the reverse proxy node; The communication link relationship calculation module is used to obtain communication link relationship data within a preset time period based on the communication connection data, the service configuration file and the system correspondence. The communication link relationship data includes communication link data between multiple systems and communication link data between multiple service nodes. The visualization module is used to call the graph database component to perform image visualization on the communication link relationship data to obtain a communication link graph.
8. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Topology-based Nginx log analysis method, system and equipment
CN115333966A
Cloud network topology generation method and device, equipment and medium
CN116866183A