Generation method and device for topological structure of cluster, equipment and storage medium

By obtaining and building a container cluster topology containing process information, the problem of difficult to track the container cluster business process in the existing technology is solved. The generated topology structure is more detailed and readable, and can identify business associations and avoid service mesh. dependency.

CN118890281APending Publication Date: 2024-11-01JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410969869.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The prior art is difficult to generate a detailed container cluster topology, which makes it difficult to track and observe business processes, especially for microservice call relationships that do not access the service mesh.

Method used

By obtaining the target information in the target node cluster, including source IP port information, destination IP port information and process information, the connection relationship between nodes is determined, and the topology structure of the target node cluster is constructed based on this information to generate a more complete and capable Read topology.

Benefits of technology

The topological structure generation without relying on service mesh access is realized, and the topological information is richer, which can better identify the relationship between services and will not invade the business process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890281A_ABST
    Figure CN118890281A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a generation method and device for a topological structure of a cluster, equipment and a storage medium. The method comprises the steps that target information reported by each target node in a target node cluster is obtained, the target information comprises source internet protocol IP port information and destination IP port information which have an association relationship, and process information corresponding to the association relationship, and the process information is used for assisting in describing the association relationship; determining a connection relationship between a source node corresponding to the source IP port information in each piece of target information and a destination node corresponding to the destination IP port information; and constructing a target topological structure corresponding to the target node cluster based on the process information in each piece of target information and the connection relationship between the corresponding source node and the destination node. In the process of generating the target topological structure, the business is not invaded, the topological information in the constructed topological structure is more complete and has better readability, and the association relationship between the businesses is easier to identify.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly to a method, apparatus, device, and computer-readable storage medium for generating a topology structure of a cluster. Background Art

[0002] With the development of cloud technology, container management platforms have become the de facto standard in the field of container orchestration due to their strong scalability and high availability. A common container management platform is Kubernetes.

[0003] The container management platform can support the stable operation of a large number of containers. However, due to the small granularity of containers, which can be scheduled at any time, the business process is difficult to track. How to generate the target topology structure corresponding to the target node cluster to track and observe the business is an urgent problem to be solved. Summary of the invention

[0004] In a first aspect of the present disclosure, a method for generating a topology structure for a cluster is provided. The method comprises: obtaining target information reported by each target node in a target node cluster, wherein the target information comprises source Internet Protocol (IP) port information and destination IP port information having an associated relationship, and process information corresponding to the associated relationship, wherein the process information is used to assist in describing the associated relationship; determining a connection relationship between a source node corresponding to the source IP port information in each target information and a destination node corresponding to the destination IP port information; and constructing a target topology structure corresponding to the target node cluster based on the process information in each target information and the connection relationship between the corresponding source node and the destination node.

[0005] In the second aspect of the present disclosure, a device for generating a topological structure of a cluster is provided. The device includes: an acquisition module, configured to obtain target information reported by each target node in the target node cluster, wherein the target information includes source Internet Protocol IP port information and destination IP port information with an associated relationship, and process information corresponding to the associated relationship, and the process information is used to assist in describing the associated relationship; a determination module, configured to determine the connection relationship between the source node corresponding to the source IP port information in each target information and the destination node corresponding to the destination IP port information; and a construction module, configured to construct a target topological structure corresponding to the target node cluster based on the process information in each target information and the connection relationship between the corresponding source node and the destination node.

[0006] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.

[0007] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

[0008] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A flowchart showing a process for generating a topology structure for a cluster according to some embodiments of the present disclosure is shown;

[0012] Figure 3 An example diagram showing a target topology according to some embodiments of the present disclosure;

[0013] Figure 4 A schematic structural block diagram of an apparatus for generating a topological structure of a cluster according to some embodiments of the present disclosure is shown;

[0014] Figure 5 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0017] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0018] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.

[0019] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.

[0020] Example Environment

[0021] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, the example environment 100 may include a target node cluster 110. The target node cluster 110 mainly includes two parts, namely a node end and a service end. The node end includes multiple target nodes 120. There are business interactions between each target node 120. For example, a target node 120 can send a "login request" to another target node 120 to implement an account login business.

[0022] The target node 120 can be an individual computer or a server, specifically including a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a PDA, a portable game terminal, a VR / AR device, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a game device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof.

[0023] The server mainly includes a management node 130, a front end 150 and a target database 140. In the example environment 100, each target node 120 can report the collected target information to the management node 130 of the server. The management node 130 can be any device with computing capabilities, such as a server and the like.

[0024] In some embodiments, each target node 120 may directly upload the target information to the management node 130. In other embodiments, each target node 120 may upload the target information to other nodes in the target node cluster 110, and the other nodes may upload the target information reported by each target node 120 to the management node 130 ( Figure 1 The other node may be any node in the target node cluster except the management node 130 and the target node 120, and has the ability to transmit data with the target node 120 and the management node 130.

[0025] For the convenience of management, after receiving the target information reported by each target node 120, the management node 130 may save the target information corresponding to each target node 120 in the target database 140. The management node 130 may obtain a topology query request. For example, the front end 150 may be installed with a container management platform, and the user may input a topology query request based on the container management platform of the front end 150. After receiving the topology query request, the management node 130 may read the target information of each target node 120 in the target database 140, and generate a target topology corresponding to the target node cluster 110 based on the target information of each target node 120.

[0026] It should be noted that the target database 140 may be a database in the management node 130 or a database in another node. It only needs to ensure that the management node 130 can access the database.

[0027] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0028] Traditional topology generation technologies are mainly divided into two categories: one is the 7-layer topology identification solution represented by service mesh, and the other is the IP topology identification technology developed from traditional micro-isolation. The topology generation technology based on service mesh depends on the access of microservices, which means that this topology generation technology can only identify the call relationship between microservices connected to the service mesh. It is impossible to obtain calls between microservices that are not connected to the service mesh, and naturally it is impossible to identify the relationship between microservices that are not connected to the service mesh.

[0029] IP topology identification technology obtains too little information based on IP traffic and can only identify the source IP port information and the destination IP port information. The subsequent topology structure only contains the relationship between the source node corresponding to the source IP port information and the destination node corresponding to the destination IP port information. The business topology structure constructed based on this identification technology is too rough. Although it can be further refined through IP tagging and grouping technology, the entire process cannot be automated and is difficult to implement in practice.

[0030] The embodiment of the present disclosure proposes an improved topology generation scheme for a cluster. Obtain target information reported by each target node 120 in the target node cluster 110, wherein the target information includes source Internet Protocol IP port information and destination IP port information with an associated relationship, and process information corresponding to the associated relationship, and the process information is used to assist in describing the associated relationship; determine the connection relationship between the source node corresponding to the source IP port information in each target information and the destination node corresponding to the destination IP port information; and construct a target topology structure corresponding to the target node cluster 110 based on the process information in each target information and the connection relationship between the corresponding source node and the destination node.

[0031] According to the embodiment of the present disclosure, the business will not be invaded during the process of generating the target topology structure, and the topology information in the constructed topology structure is more complete, more readable, and easier to identify the association relationship between the businesses.

[0032] Specifically, the topology structure generated by the present disclosure does not rely on the access of the service grid and will not intrude into the business. In addition, the target topology structure not only contains information at the IP level, that is, it not only contains the connection relationship between the nodes corresponding to each IP port information, but also includes other topology information based on the process information to describe the connection relationship. The topology information in the target topology structure generated by the present disclosure is richer and can better reflect the association relationship between the businesses.

[0033] Hereinafter, example embodiments of the present disclosure will be discussed in detail with reference to the accompanying drawings.

[0034] Example Process

[0035] Figure 2 FIG. 2 is a flow chart of a process 200 for generating a topology structure of a cluster according to some embodiments of the present disclosure. The process 200 may be implemented at the management node 130. Figure 1 Process 200 is described.

[0036] In block 210 , the management node 130 obtains target information reported by each target node 120 in the target node cluster 110 .

[0037] In order to enrich the topology information of the target topology structure corresponding to the generated target node cluster 110 and make the target topology information more readable, in some embodiments, the target information uploaded by each target node 120 obtained by the management node 130 may include process information corresponding to the association in addition to the source IP port information and the destination IP port information uploaded by each target node 120, wherein the process information is used to assist in describing the association. The process information may include at least one of the following: identification information of the process, the name of the process, and identification information of the container group (POD) to which the process belongs.

[0038] In order to obtain the target information of each target node 120, in some embodiments, a node agent (Node-Agent) may be deployed on each target node 120 in the target node cluster 110, and the node agent is used to collect the target information corresponding to the target node 120 and report it to the management node 130. The Node-Agent can be deployed on the target node 120 in the form of a daemon set (Daemonset).

[0039] It should be noted that the target information reported by the target node 120 is obtained based on the traffic request corresponding to the target node 120, and this traffic request can be a request received by the target node 120, or a request sent by the target node 120. In some embodiments, if the traffic request is a request received by the target node 120, the node corresponding to the source IP port is the target node 120 that sends the traffic request, and the node corresponding to the destination IP port is the target node 120. If the traffic request is a request sent by the target node 120, the node corresponding to the source IP port is the target node 120, and the node corresponding to the destination IP port is the node that receives the traffic request.

[0040] For ease of description, the following embodiment describes the process of the management node 130 processing target information uploaded by a target node 120. It should be noted that the process of other target nodes 120 is the same as that of this target node 120, and will not be described in detail.

[0041] In some embodiments, the management node 130 may determine the source node corresponding to the source IP port information and the destination node corresponding to the destination IP port information based on the associated source IP port information and the destination IP port information in the target information corresponding to the target node 120, and the IP port information corresponding to each node in the target node cluster 110. Specifically, the management node 130 may match the source IP port information and the destination IP port information with the IP port information corresponding to each node in the target node cluster 110, respectively. The management node may determine the node that successfully matches the source IP port information as the source node, and determine the node that successfully matches the destination IP port information as the destination node.

[0042] It should be noted that the IP port information corresponding to each node in the target node cluster 110 can be pre-stored in the management node 130, and of course can also be stored in other nodes except the management node 130. It only needs to ensure that the management node 130 can access other nodes to obtain the IP port information corresponding to each node.

[0043] In block 220 , the management node 130 determines a connection relationship between a source node corresponding to the source IP port information in each target information and a destination node corresponding to the destination IP port information.

[0044] In some embodiments, the management node 130 may identify the connection relationship between the source node corresponding to the source IP port information in the target information and the destination node corresponding to the destination IP port information in any appropriate manner. The existence of a connection relationship between two nodes also indicates that there is a business interaction between the two nodes. For example, the management node 130 may set the connection identifier corresponding to the source node and the connection identifier corresponding to the destination node to the same identifier, and the management node 130 may subsequently determine whether there is a connection relationship between the two nodes based on whether the connection identifiers of the two nodes are consistent.

[0045] In block 230 , the management node 130 constructs a target topology structure corresponding to the target node cluster 110 based on the process information in each target information and the connection relationship between the corresponding source node and the destination node.

[0046] In order to display whether there is business interaction between any two nodes in the target topology structure corresponding to the target node cluster 110, in some embodiments, the management node 130 can display the connection relationship between the source node corresponding to the source IP port information and the destination node corresponding to the destination IP port information in the target topology structure in a predetermined display form when constructing the target topology structure corresponding to the target node cluster 110. This predetermined form can be any appropriate display form, for example, each node can be represented by a "circle" in the target topology structure, and the "circles" corresponding to two nodes with a connection relationship can be connected by a "straight line" for display, etc.

[0047] In some embodiments, when determining that a predetermined topology generation condition is met, the management node 130 may construct a target topology structure corresponding to the target node cluster 110 based on process information in each target information and a connection relationship between a corresponding source node and a destination node.

[0048] In some embodiments, the predetermined topology structure generation condition is that the current time is the predetermined topology structure generation time, and may also be that the duration of receiving the target information is greater than a predetermined duration threshold, and so on.

[0049] In order to increase the flexibility of topology generation, in some embodiments, the predetermined topology generation condition can also be that the management node 130 receives a topology query request. This topology query request can be input into the management node 130 by the user based on the front end 150. Specifically, for the convenience of management, after obtaining the target information uploaded by the target node 120, the management node 130 can save the target information uploaded by each target node 120 in the target database 140. When the management node 130 receives the topology query request, it reads the target information corresponding to each target node 120 from the target database 140, that is, reads the process information, source IP port information and destination IP port information, so as to generate the target topology corresponding to the target node cluster 110 based on the target information corresponding to each target node 120.

[0050] In order to assist in describing the connection relationship between the source node and the destination node based on the process information, in some embodiments, the management node 130 can determine the first information corresponding to the source node and the second information corresponding to the destination node when the service interaction between the source node and the destination node is performed based on the process information. The first information and the second information are information that can describe the connection relationship between the source node and the destination node in more detail than the IP description level.

[0051] The following describes a process in which the management node 130 determines the first information of the source node based on the identification information of the POD in the target information.

[0052] In some embodiments, the management node 130 may determine the first POD of the source node corresponding to the source IP port in the target information based on the identification information of the POD in the target information. Among them, the first POD uniquely corresponding to the POD identifier may be determined based on a POD identifier. In order to further determine the connection relationship between the auxiliary description source node and the destination node, the management node 130 may also determine the first namespace (namespace) and the first service (service) corresponding to the source node corresponding to the source IP port in the target information based on the attribute information of the first POD. The management node 130 may determine the first namespace, the first service and the first POD as the first information of the source node.

[0053] The following describes a process of determining the second information of the destination node based on the destination IP address and port information in the target information.

[0054] In some embodiments, the management node 130 can determine whether there is a second POD of the destination node corresponding to the destination IP port based on the destination IP port information in the target information. It should be noted that the POD found based on the destination IP port information may be a POD, or a server or an application. When the destination IP port information corresponds to the IP port information of the server or the IP port information of the application, the second POD of the destination node corresponding to the destination IP port cannot be found.

[0055] In some embodiments, if there is a second POD, the management node 130 may determine that the destination IP port in the target information corresponds to the second namespace and the second service based on the attribute information of the second POD. The management node 130 may determine the second POD, the second namespace and the second service as the second information of the destination node.

[0056] In some other embodiments, if the second POD does not exist, the management node 130 may determine that the destination IP port in the target information corresponds to the third namespace and the third service based on the destination IP port information. The management node 130 may determine the third namespace and the third service as the second information of the destination node.

[0057] In some embodiments, the management node 130 may construct a target topology structure corresponding to the target node cluster 110 based on the first information of the source node corresponding to each target node 120, the second information of the corresponding destination node, and the connection relationship between the corresponding source node and the destination node.

[0058] In some embodiments, the management node 130 may display the first information of the source node, the second information of the corresponding destination node, and the connection relationship between the corresponding source node and the destination node in the target topology structure based on any predetermined appropriate rule.

[0059] Figure 3 An example diagram of a target topology structure 300 according to some embodiments of the present disclosure is shown. Figure 3 For explanation. Figure 3 In the example, the target node cluster 110 includes node 1 (310), node 2, node 3 (320), node 4 (330), and node 5.

[0060] Each node in the target topology structure corresponding to the constructed target node cluster 110 is displayed in the form of a "circle". Two nodes that have a connection relationship can be connected by a "straight line", such as Figure 3 In the example, node 1 (310) and node 3 (320) are connected by a "straight line", node 3 (320) and node 4 (330) are connected by a "straight line", and so on. In order to further identify the business relationship, the business relationship between each node can also be represented by a "directed straight line". For example, if node 1 sends a traffic request to node 3, the connection relationship between node 1 and node 3 is displayed by a "directed straight line from node 1 to node 3".

[0061] In addition, the description information of the connection relationship between the two nodes, that is, the first information and the second information, can also be displayed in the target topology structure in a predetermined display form. As an example, the first information and the second information can be displayed at the preset positions of the source node corresponding to the source IP port information and the destination node corresponding to the destination IP port information, respectively. Figure 3 As shown, the first information corresponding to node 1 is namespace 1, service 1 and container group 1, and the first information corresponding to node 3 is namespace 3, service 3 and container group 3. Namespace 1, service 1 and container group 1 can be displayed at the location of box 340 and correspond to node 1, and namespace 3, service 3 and container group 3 can be displayed at the location of box 350 and correspond to node 3.

[0062] It should be noted that Figure 3 What is shown is just an example of the target topology structure determined based on the first information corresponding to each target node 120, the corresponding second information and the connection relationship between the corresponding source node and the destination node. Of course, there may be other forms of examples of target topology structures, which do not limit the present disclosure.

[0063] According to the embodiments of the present disclosure, the business will not be invaded during the process of generating the target topology structure, and the topology information in the constructed topology structure is more complete, more readable, and easier to identify the association relationship between the businesses.

[0064] Specifically, the topology structure generated by the present disclosure does not rely on the access of the service grid and will not intrude into the business. In addition, the target topology structure not only contains information at the IP level, that is, not only contains the connection relationship between the nodes corresponding to each IP port information, but also includes other topology information based on the process information to describe the connection relationship. The topology information is richer and can better reflect the association relationship between the businesses.

[0065] Example devices and equipment

[0066] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 4 A schematic structural block diagram of an apparatus 400 for generating a topology structure of a cluster according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in the management node 130 as discussed above. Each module / component in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.

[0067] like Figure 4 As shown, the device 400 includes an acquisition module 410, which is configured to obtain target information reported by each target node in the target node cluster, wherein the target information includes source Internet Protocol IP port information and destination IP port information that have an associated relationship, and process information corresponding to the associated relationship, and the process information is used to assist in describing the associated relationship; a determination module 420, which is configured to determine the connection relationship between the source node corresponding to the source IP port information in each target information and the destination node corresponding to the destination IP port information; and a construction module 430, which is configured to construct a target topology structure corresponding to the target node cluster based on the process information in each target information and the connection relationship between the corresponding source node and the destination node.

[0068] In some embodiments, the process information includes at least one of the following: identification information of the process, a name of the process, and identification information of a container group POD to which the process belongs.

[0069] In some embodiments, the construction module 430 is specifically configured as follows: for the target information reported by each target node, based on the identification information of the POD in the target information, determine the first information of the source node corresponding to the source IP port in the target information; based on the destination IP port information in the target information, determine the second information of the destination node corresponding to the destination IP port in the target information; based on the first information corresponding to each target node, the corresponding second information and the connection relationship between the corresponding source node and the destination node, construct the target topology structure corresponding to the target node cluster.

[0070] In some embodiments, the construction module 430 is specifically configured to: determine the first POD corresponding to the source node corresponding to the source IP port in the target information based on the identification information of the POD in the target information; determine the first namespace and the first service corresponding to the source node corresponding to the source IP port in the target information based on the attribute information of the first POD; determine the first POD, the first namespace and the first service as the first information of the source node corresponding to the source IP port in the target information.

[0071] In some embodiments, the construction module 430 is specifically configured to: determine whether there is a second POD corresponding to the destination node corresponding to the destination IP port based on a comparison between the destination IP port information in the target information and the candidate port information corresponding to each IP port contained in the target node cluster; if there is a second POD corresponding to the destination node, determine the second namespace and the second service corresponding to the destination node corresponding to the destination IP port in the target information based on the attribute information of the second POD; and determine the second POD, the second namespace and the second service as the second information of the destination node corresponding to the destination IP port in the target information.

[0072] In some embodiments, the construction module 430 is specifically configured as follows: if there is no second POD corresponding to the destination node, then based on the destination IP port information in the target information, determine the third namespace and the third service corresponding to the destination node corresponding to the destination IP port in the target information; and determine the third namespace and the third service as the second information of the destination node corresponding to the destination IP port in the target information.

[0073] In some embodiments, the target information is collected by a node agent deployed on the target node.

[0074] In some embodiments, the node agent is deployed on the target node by way of a daemon set.

[0075] In some embodiments, the device 400 also includes: a saving module, configured to save the target information reported by each target node in a target database; a construction module 430, specifically configured to: in response to receiving a topology query request, read process information, source IP port information and destination IP port information from the target database; and construct a target topology structure based on the read process information, source IP port information and destination.

[0076] In some embodiments, the determination module 420 is specifically configured to: match the source IP port information and the destination IP port information with the IP port information corresponding to each node in the target node cluster respectively; determine the node that successfully matches the source IP port information as the source node; determine the node that successfully matches the destination IP port information as the destination node; and identify the connection relationship between the source node and the destination node.

[0077] The units included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0078] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to implement Figure 1 A management node 130 is shown.

[0079] like Figure 5As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.

[0080] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the electronic device 500.

[0081] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0082] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0083] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0084] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0085] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0086] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0087] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0088] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0089] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for generating a topological structure of a cluster, comprising: Obtaining target information reported by each target node in the target node cluster, wherein the target information includes source Internet Protocol IP port information and destination IP port information that have an associated relationship, and process information corresponding to the associated relationship, wherein the process information is used to assist in describing the associated relationship; Determine a connection relationship between a source node corresponding to the source IP port information in each target information and a destination node corresponding to the destination IP port information; as well as Based on the process information in each target information and the connection relationship between the corresponding source node and the destination node, a target topology structure corresponding to the target node cluster is constructed.

2. The method according to claim 1, wherein the process information includes at least one of the following: identification information of the process, the name of the process, and identification information of the container group POD to which the process belongs.

3. The method according to claim 2, wherein constructing a target topology structure corresponding to the target node cluster comprises: For the target information reported by each target node, Based on the identification information of the POD in the target information, determine first information of a source node corresponding to the source IP port in the target information; Based on the destination IP port information in the target information, determine second information of a destination node corresponding to the destination IP port in the target information; Based on the first information corresponding to each target node, the corresponding second information, and the corresponding connection relationship between the source node and the destination node, a target topology structure corresponding to the target node cluster is constructed.

4. The method according to claim 3, wherein based on the identification information of the POD in the target information, determining the first information of the source node corresponding to the source IP port in the target information comprises: Determine, based on the identification information of the POD in the target information, a first POD corresponding to the source node corresponding to the source IP port in the target information; Based on the attribute information of the first POD, determine a first namespace and a first service corresponding to a source node corresponding to the source IP port in the target information; The first POD, the first namespace, and the first service are determined as the first information of the source node corresponding to the source IP port in the target information.

5. The method according to claim 3, wherein based on the destination IP port information in the target information, determining the second information of the destination node corresponding to the destination IP port in the target information comprises: Based on the comparison between the destination IP port information in the target information and the candidate port information corresponding to each IP port included in the target node cluster, determining whether there is a second POD corresponding to the destination node corresponding to the destination IP port; If there is a second POD corresponding to the destination node, determining the second namespace and the second service corresponding to the destination node corresponding to the destination IP port in the target information based on the attribute information of the second POD; The second POD, the second namespace and the second service are determined as the second information of the destination node corresponding to the destination IP port in the target information.

6. The method according to claim 5, wherein based on the destination IP port information in the target information, determining the second information of the destination node corresponding to the destination IP port in the target information further comprises: If there is no second POD corresponding to the destination node, determining a third namespace and a third service corresponding to the destination node corresponding to the destination IP port in the target information based on the destination IP port information in the target information; The third namespace and the third service are determined as the second information of the destination node corresponding to the destination IP port in the target information.

7. The method according to claim 1, wherein the target information is collected by a node agent deployed on the target node.

8. The method according to claim 7, wherein the node agent is deployed on the target node in the form of a daemon process set.

9. The method according to claim 1, further comprising: The target information reported by each target node is stored in a target database; Wherein building the target topology structure corresponding to the target node cluster includes: In response to receiving a topology query request, reading the process information, the source IP port information, and the destination IP port information from the target database; as well as The target topology structure is constructed based on the read process information, the source IP port information and the destination.

10. The method of claim 1, wherein determining a connection relationship between the source node and the destination node comprises: Matching the source IP port information and the destination IP port information with the IP port information corresponding to each node in the target node cluster; Determine the node that successfully matches the source IP port information as the source node; Determine a node that successfully matches the destination IP port information as the destination node; as well as A connection relationship between the source node and the destination node is identified.

11. A device for generating a topological structure of a cluster, comprising: an acquisition module configured to obtain target information reported by each target node in the target node cluster, wherein the target information includes source Internet Protocol IP port information and destination IP port information having an associated relationship, and process information corresponding to the associated relationship, wherein the process information is used to assist in describing the associated relationship; A determination module configured to determine a connection relationship between a source node corresponding to the source IP port information in each target information and a destination node corresponding to the destination IP port information; as well as The construction module is configured to construct a target topology structure corresponding to the target node cluster based on the process information in each target information and the connection relationship between the corresponding source node and the destination node.

12. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 10 when executed by the at least one processing unit.

13. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 10 when executed by a processor.