Free service detection method, apparatus, device, and medium

By acquiring and analyzing the task, container, and service list information of the node cluster, combined with information from the Mesos interface, accurate detection of the status of detached services is achieved, solving the problem of poor detection performance in existing technologies and improving the efficiency and reliability of handling detached nodes.

CN116846785BActive Publication Date: 2026-03-31CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing methods for detecting detached services are ineffective at detecting nodes in a detached service state, preventing users from addressing detached node issues in a timely manner.

Method used

By obtaining cluster task list information, container list information, and service list information of the node cluster, and using the Mesos Slave interface to obtain node task information, combined with the identification tags of node containers and tasks, the container nodes in the detached service state are identified, and the cluster container tags and tenant information are obtained through the Mesos Master interface to realize the detection of detached services.

Benefits of technology

It can promptly detect and handle nodes in a detached service state, improving the reliability and efficiency of detection, making it easier for operations and maintenance personnel to troubleshoot abnormal detached services, and ensuring the healthy operation of the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116846785B_ABST
    Figure CN116846785B_ABST
Patent Text Reader

Abstract

The application provides a free service detection method, device, equipment and medium. The method comprises the following steps: obtaining cluster task list information of a node cluster, and container list information and service list information of a target node in the node cluster; determining free service list information of a target container node in a node container based on an identification tag of the node container and a tag of a node task; and determining a target cluster container tag in cluster container tags and target tenant information corresponding to the target cluster container tag based on the target container tag and the cluster task list information. Through the method of the application, the state and resource usage of the node can be monitored, the free service state problem of the node can be found in time and handled, and the normal work of the cluster is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of detecting free services, and in particular to a free service detection method, device, equipment and medium. BACKGROUND

[0002] The importance of cloud platforms to technological development is self-evident. When a cloud platform loses connection with a node and a management service due to a network or other reasons, some services that should have been deleted may still exist, that is, the node is out of service management, which leads to the coexistence of new and old services when a new version is released.

[0003] It is very important for users to quickly understand whether there are services in a free service state on a cloud platform. However, there is no reliable and available free service detection method for a data center operating system (Dcos). In addition, a command for solving an abnormal state is generated based on heartbeat information and configuration information to troubleshoot free services.

[0004] However, the existing free service detection method has poor detection effect on nodes in a free service state, which leads to the problem that users cannot handle free nodes in time. SUMMARY

[0005] The present application provides a free service detection method, device, equipment and medium to solve the problem that the existing method has poor detection effect on nodes in a free service state, which leads to the problem that users cannot handle free nodes in time.

[0006] In a first aspect, the present application provides a free service detection method, which comprises:

[0007] Obtaining cluster task list information of a node cluster, and container list information and service list information of a target node in the node cluster, wherein the cluster task list information comprises cluster container labels of cluster containers in the node cluster and tenant information corresponding to the cluster container labels, the container list information comprises node containers in the target node and container labels and identification labels of the node containers, and the service list information is information obtained through a Mesos Slave interface and comprises node tasks in the target node and labels of the node tasks;

[0008] Based on the identification labels of the node containers and the labels of the node tasks, determining free service list information of a target container node in the node containers, the target container node being a container node in a free service state, and the free service list information comprising a target container label of the target container node;

[0009] Based on the target container label and the cluster task list information, a target cluster container label in the cluster container labels is determined, and target tenant information corresponding to the target cluster container label is determined.

[0010] In the embodiments of the present application, the cluster task list information of the node cluster, and the container list information and the service list information of the target node in the node cluster are obtained, and the method comprises the following steps:

[0011] Obtaining a target node list in the node cluster;

[0012] Based on the target node list, a target node in the target node list is determined;

[0013] Obtaining the container list information and the service list information of the target node.

[0014] In the embodiments of the present application, the free service detection system further comprises a docker interface, and the cluster task list information of the node cluster, and the container list information and the service list information of the target node in the node cluster are obtained, and the method comprises the following steps:

[0015] Based on the docker interface, a node container information record of the target node is obtained;

[0016] Based on the node container information record, the container list information of the target node is determined;

[0017] Based on the Mesos Slave interface, a node task information record of the target node is obtained;

[0018] Based on the node task information record, the service list information of the target node is determined.

[0019] In the embodiments of the present application, the free service detection system further comprises a Mesos Master interface, and the cluster task list information of the node cluster, and the container list information and the service list information of the target node in the node cluster are obtained, and the method comprises the following steps:

[0020] Based on the Mesos Master interface, a node cluster task information record of the node cluster is obtained;

[0021] Based on the node cluster task information record, the cluster task list information of the node cluster is determined.

[0022] In the embodiments of the present application, based on the identification label of the node container and the label of the node task, the free service list information of the target container node in the node container is determined, and the method comprises the following steps:

[0023] Comparing the identification label of the node container and the label of the node task, a target identification label is determined, and the target identification label is the identification label of the node container which does not satisfy the first preset comparison requirement with the label of the node task;

[0024] Based on the target identifier tag, determine the target container node in the node container, as well as the detached service list information of the target container node.

[0025] In this embodiment of the application, based on the target container label and the cluster task list information, the target cluster container label in the cluster container label and the target tenant information corresponding to the target cluster container label are determined, including:

[0026] Compare the target container label with the cluster container label in the cluster task list information to determine the target cluster container label that meets the second preset comparison requirement with the target container label.

[0027] Based on the target cluster container label and cluster task list information, determine the target tenant information corresponding to the target cluster container label.

[0028] In this embodiment of the application, the target tenant information corresponding to the target cluster container label is determined based on the target cluster container label and the cluster task list information, including:

[0029] Based on the cluster task list information, determine the association between cluster container tags and tenant information;

[0030] Based on the target cluster container label and its association, determine the target tenant information corresponding to the target cluster container label.

[0031] Secondly, this application provides a free service detection device, the device comprising:

[0032] The information acquisition module is used to acquire cluster task list information of the node cluster, container list information and service list information of the target node in the node cluster. The cluster task list information includes the cluster container label of the cluster container in the node cluster and the tenant information corresponding to the cluster container label. The container list information includes the node container in the target node, as well as the container label and identifier label of the node container. The service list information is obtained through the Mesos Slave interface, including the node task in the target node and the label of the node task.

[0033] The information determination module is used to determine the detached service list information of the target container node in the node container based on the identification label of the node container and the label of the node task. The target container node is a container node in a detached service state, and the detached service list information includes the target container label of the target container node.

[0034] The tag and information determination module is used to determine the target cluster container tag in the cluster container tag and the target tenant information corresponding to the target cluster container tag based on the target container tag and the cluster task list information.

[0035] Thirdly, this application provides a free service detection device, including: a processor, and a memory communicatively connected to the processor;

[0036] The memory stores the instructions that the computer executes;

[0037] The processor executes computer execution instructions stored in memory to implement the method of this application.

[0038] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method of this application.

[0039] The detached service detection method, apparatus, device, and medium provided in this application obtain cluster task list information of a node cluster, as well as container list information and service list information of a target node in the node cluster. The cluster task list information includes cluster container tags for cluster containers within the node cluster and tenant information corresponding to the cluster container tags. The container list information includes node containers in the target node, as well as container tags and identifier tags for the node containers. The service list information is obtained through the Mesos Slave interface and includes node tasks in the target node and tags for the node tasks. Based on the identifier tags and node task tags of the node containers, the detached service list information of the target container node in the node container is determined. The target container node is a container node in a detached service state, and the detached service list information includes the target container tag of the target container node. Based on the target container tag and the cluster task list information, the target cluster container tag in the cluster container tag and the target tenant information corresponding to the target cluster container tag are determined.

[0040] In this way, the cluster task list information of the node cluster can be obtained through the Mesos Master interface, the container list information of the target node can be obtained through the Docker interface, and the service list information of the target node can be obtained through the Mesos Slave interface. The MesosSlave interface can determine the task information of the Mesos Slave node, including running tasks and completed tasks, for task management and scheduling. Based on the node container identification tags and node task tags in the above list information, the container nodes in the detached service state and the target container tags can be determined. The cluster task list information can be used to determine the corresponding target cluster container tags and target tenant information. The framework information of the detached services in the cluster can be obtained, which makes it easier for operation and maintenance personnel and users to troubleshoot abnormal detached services and is beneficial to the health of the cluster. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0042] Figure 1 A flowchart illustrating a method for detecting detached services provided in an embodiment of this application;

[0043] Figure 2 A flowchart illustrating another detached service detection method provided in an embodiment of this application;

[0044] Figure 3 This is a schematic diagram of the structure of a free service detection device provided in an embodiment of this application;

[0045] Figure 4 This is a structural block diagram of an apparatus for performing a free service detection method according to an embodiment of this application.

[0046] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0047] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0048] In existing technologies, when a cloud platform loses connection with the management service due to network or other reasons, some services that should be deleted may still exist, resulting in detached services that have escaped the management of the Mesos-master service. This situation can lead to a real-world scenario where old and new services coexist when a new version is released. Therefore, quickly understanding the status of services in a detached state on the cloud platform is crucial for users. However, currently, there is no reliable and usable method for detecting detached services in the DCOS system. When a DCOS compute node experiences a detached service due to an anomaly, the current system cannot detect the service in a detached state.

[0049] To address the aforementioned issues, this application provides a method for detecting detached services. This method obtains the service list of a compute node through the Docker interface and the task list of the node through the MesosSlave interface. After matching and filtering, the detached service list of the node is obtained. The framework tenant information of all tasks within the cluster is obtained through the MesosMaster interface, and after matching with the aforementioned detached services, the framework information of the detached services in the cluster can be obtained. Based on the data obtained through the MesosSlave interface, the status and resource usage of the Mesos Slave node can be monitored, allowing for timely detection and handling of problems. Furthermore, the task information of the Mesos Slave node, including running and completed tasks, is obtained, facilitating task management and scheduling. This makes it easier for operations personnel and users to troubleshoot abnormal detached services, contributing to the health of the cluster.

[0050] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0051] The detached service detection method provided in this embodiment can be executed by a server. The server can be a mobile phone, tablet, computer, or other device. This embodiment does not impose any particular restrictions on the implementation method of the execution entity, as long as the execution entity can obtain the cluster task list information of the node cluster, as well as the container list information and service list information of the target node in the node cluster. The cluster task list information includes the cluster container label of the cluster container within the node cluster, and the tenant information corresponding to the cluster container label. The container list information includes the node container in the target node, and the container label and identifier label of the node container. The service list information is obtained through the Mesos Slave interface, including the node task in the target node, and the label of the node task. Based on the identifier label of the node container and the label of the node task, the detached service list information of the target container node in the node container is determined. The target container node is a container node in a detached service state, and the detached service list information includes the target container label of the target container node. Based on the target container label and the cluster task list information, the target cluster container label in the cluster container label and the target tenant information corresponding to the target cluster container label are determined.

[0052] Among them, the detached service detection system is a system used to monitor detached services in a network. It can identify detached services by scanning ports and services in the network, and classify and manage them.

[0053] Figure 1 This is a flowchart illustrating a detached service detection method provided in an embodiment of this application. The execution entity of this method can be a detached service detection system. Figure 1 As shown, the detached service detection method may include the following steps:

[0054] S110. Obtain the cluster task list information of the node cluster, as well as the container list information and service list information of the target node in the node cluster. The cluster task list information includes the cluster container label of the cluster container in the node cluster and the tenant information corresponding to the cluster container label. The container list information includes the node container in the target node, as well as the container label and identifier label of the node container. The service list information is obtained through the Mesos Slave interface, including the node task in the target node and the label of the node task.

[0055] The cluster task list information includes cluster task information, such as cluster task application framework identifier (Frame ID) and cluster tenant information.

[0056] The target node is the node whose status needs to be checked to determine whether it is in a detached service state.

[0057] The container list information represents all the detailed information about the container, including the host address (Internet Protocol, host IP), container ID (Identity document, container ID), tag ID (Mesos ID), application frame ID (Frame ID), container status, and other container information.

[0058] The service list information represents the service information of a node, including the node's tag identifier (Mesos ID), node status, and other information.

[0059] Tags can hold other tags or data. They can be understood as identifiers for containers or node tasks, used for comparison and matching information to determine the state of a node.

[0060] The Mesos Slave interface can retrieve a list of all tasks on the local machine, including the service list information of the target node; by calling the MesosSlave interface to obtain data, it is possible to monitor the status and resource usage of the Mesos Slave node, promptly identify and handle problems; and obtain the task information of the Mesos Slave node, including running and completed tasks, to facilitate task management and scheduling.

[0061] Based on this, by obtaining cluster task list information, target node container list information and service list information, as well as the corresponding cluster container tags, node container container container tags and identifier tags, and node task tags in the information, it is possible to subsequently detect whether the target node is in a detached service state based on the above information.

[0062] In some implementations, obtaining cluster task list information of the node cluster, as well as container list information and service list information of the target nodes in the node cluster, includes:

[0063] Get the list of target nodes in the node cluster;

[0064] Based on the target node list, determine the target nodes in the target node list;

[0065] Obtain the container list and service list information of the target node.

[0066] The list of target nodes can be obtained through configuration, thereby determining the list of nodes in the node cluster that need to be checked for detached service status. The target nodes can be determined by the user through configuration.

[0067] Based on this, the target node of the node cluster is determined by writing the configuration, so as to obtain the container list information and service list information of the target node.

[0068] In other implementations, the detached service detection system also includes a Docker interface to obtain cluster task list information of the node cluster, as well as container list information and service list information of the target nodes in the node cluster, including:

[0069] Based on the Docker interface, obtain the node container information record of the target node;

[0070] Based on the node container information record, determine the container list information of the target node;

[0071] Based on the Mesos Slave interface, obtain the node task information record of the target node;

[0072] Based on the node task information records, determine the service list information of the target node.

[0073] The Docker interface can obtain a list of all containers on the host, thereby determining the node container information record.

[0074] The node container information record is a detailed record of the container information corresponding to the target node. It can be used to determine container information such as container label, identifier label, and container status, so as to determine the container list information of the target node.

[0075] The node task information record is a detailed record of the task information of the target node. It can be used to identify node information such as node tasks and node task tags, so as to determine the service list information of the target node.

[0076] Based on this, the node container information of the target node is obtained through the Docker interface, and the node task information of the target node is obtained through the Mesos Slave interface, so as to determine the container list information and service list information of the target node, so as to detect whether the target node is in a detached service state based on this information.

[0077] In other implementations, the detached service detection system also includes a Mesos Master interface to obtain cluster task list information of the node cluster, as well as container list information and service list information of the target node in the node cluster, including:

[0078] Based on the Mesos Master interface, obtain the node cluster task information records of the node cluster;

[0079] Based on the node cluster task information records, determine the cluster task list information of the node cluster.

[0080] The Mesos Master interface can obtain information about the Mesos Master node, thereby acquiring cluster information, operating cluster resources, and determining the node cluster task information records of the node cluster.

[0081] Based on this, the node cluster task information records of the node cluster are obtained through the Mesos Master interface in order to determine the cluster task list information.

[0082] S120. Based on the identifier label of the node container and the label of the node task, determine the detached service list information of the target container node in the node container. The target container node is a container node in a detached service state. The detached service list information includes the target container label of the target container node.

[0083] The detached service list information can be understood as a list of container nodes in a detached service state, including the target container label of the container node.

[0084] Based on this, the detached service list information of the target container node is determined by using the node container identification tags included in the container list information and the node task tags included in the service list information obtained through the Mesos Slave interface. In other words, the list information of nodes in the detached service state is determined.

[0085] In some implementations, the detached service list information of the target container node in the node container is determined based on the identifier tag of the node container and the tag of the node task, including:

[0086] Compare the identifier labels of the node containers with the labels of the node tasks to determine the target identifier label. The target identifier label is the identifier label of the node container that does not meet the first preset comparison requirement with the label of the node task.

[0087] Based on the target identifier tag, determine the target container node in the node container, as well as the detached service list information of the target container node.

[0088] The target identifier label represents the identifier label of the node container in the detached service state.

[0089] The first preset comparison requirement is a preset requirement for comparing the identification tags of node containers and the tags of node tasks, so as to determine the target identification tag from the identification tags of node containers.

[0090] The first preset comparison requirement can be to traverse the identification tags of the node container and the tags of the node task. If there is a tag in the identification tags of the node container that is not included in the tags of the node task, that tag is the target identification tag, which is the identification tag of the node container in the detached service state. The first preset comparison requirement can also be other comparison requirements, as long as the target identification tag is determined by comparing the identification tags of the node container and the tags of the node task. This embodiment does not limit this.

[0091] Based on this, the identification tags of the node container and the tags of the node task are compared to determine the target identification tags of the node container whose identification tags do not meet the first preset comparison requirements with the tags of the node task. These are the identification tags of the node containers that are in a free service state.

[0092] S130. Based on the target container label and cluster task list information, determine the target cluster container label in the cluster container label, and the target tenant information corresponding to the target cluster container label.

[0093] The target cluster container label for determining the cluster container label can be obtained by using the target identifier label of the concurrent processing node container.

[0094] Based on this, by using the cluster container label of the cluster container within the node cluster and the tenant information corresponding to the cluster container label in the cluster task list information, the target cluster container label is obtained from the cluster container label based on concurrent processing, and the task information corresponding to the target cluster container label is determined.

[0095] In some implementations, based on the target container label and cluster task list information, the target cluster container label in the cluster container labels and the target tenant information corresponding to the target cluster container label are determined, including:

[0096] Compare the target container label with the cluster container label in the cluster task list information to determine the target cluster container label that meets the second preset comparison requirement with the target container label.

[0097] Based on the target cluster container label and cluster task list information, determine the target tenant information corresponding to the target cluster container label.

[0098] The target cluster container label is the container label corresponding to the container in the cluster container that is in a detached service state.

[0099] The second preset comparison requirement is a preset requirement for comparing the target container label and the cluster container label in order to determine the target cluster container label from the cluster container label.

[0100] The second preset comparison requirement can be to traverse the cluster container label and the target container label. If there is a label included on the target container label in the cluster container label, the label is the target cluster container label, which is the label corresponding to the node container in the cluster node container that is in a free service state. The second preset comparison requirement can also be other comparison requirements, and this embodiment does not limit them.

[0101] Based on this, the target cluster container label is determined by comparing the target container label and the cluster container label. Then, the target tenant information is determined based on the target cluster container label and the cluster task list information. This enables the acquisition of tenant information, allowing operations and maintenance personnel to troubleshoot abnormal detached services, which is beneficial to the health of the cluster.

[0102] In this implementation, based on the target cluster container label and cluster task list information, the target tenant information corresponding to the target cluster container label is determined, including:

[0103] Based on the cluster task list information, determine the association between cluster container tags and tenant information;

[0104] Based on the target cluster container label and its association, determine the target tenant information corresponding to the target cluster container label.

[0105] The association relationship can be understood as a correspondence between cluster container labels and tenant information. This allows us to determine the tenant information corresponding to the cluster container label based on this association relationship, so that operations and maintenance personnel can investigate abnormal detached services and reduce the pressure on management services.

[0106] Based on this, the cluster task list information obtained through the Mesos Master interface is used to determine the association between cluster container tags and tenant information, and the target tenant information is determined according to the target cluster container tags and the association.

[0107] In this embodiment, the cluster task list information of the node cluster is obtained through the Mesos Master interface; the container list information of the target node is obtained based on the Docker interface; and the service list information of the target node is obtained based on the Mesos Slave interface. By calling the MesosSlave interface to obtain information, the status and resource usage of the MesosSlave node can be monitored, problems can be detected and handled in a timely manner, and the task information of the Mesos Slave node, including running tasks and completed tasks, can be obtained, which facilitates task management and scheduling. In order to identify container nodes in a detached service state and target container tags based on the node container identification tags and node task tags, and to determine the corresponding target cluster container tags and target tenant information based on the cluster task list information, the framework information of detached services in the cluster can be obtained, which makes it easier for operation and maintenance personnel and users to troubleshoot abnormal detached services and is beneficial to the health of the cluster.

[0108] Figure 2 This is a flowchart illustrating a detached service detection method provided in an embodiment of this application. The execution entity of this method can be a detached service detection system. Figure 2 As shown, the detached service detection method may include the following steps:

[0109] S210, a list of all tasks within the cluster, can obtain information such as task Frame ID and tenant through the Mesos Master interface, and establish a cluster task data model record set.

[0110] Based on this, information such as task Frame ID and tenant is obtained through the Mesos Master interface, and a corresponding cluster task data model record set is established to determine the task list of the cluster.

[0111] S220. Obtain a list of IP addresses of all compute nodes in the cluster that require detached service collection. This can be written via configuration.

[0112] Based on this, the list of IPs of nodes that need to collect detached services is determined through configuration.

[0113] S230. Obtain the list of compute node container services. The container list information can be obtained through the Docker interface, and a set of node service data model records can be established for the host IP, container ID, Mesos ID, and container status (initialized to normal).

[0114] Based on this, container list information can be obtained through the Docker interface, and a node service data model record set can be established to determine the list of container services corresponding to the compute nodes that need to collect detached services.

[0115] S240, the task service list on the compute node can be obtained through the mesos-Mesos Slave interface, and a set of task data model records for the node with Mesos ID and status (initialized to normal) can be established.

[0116] Based on this, the task list information of the node can be obtained through the Mesos Slave interface, and a set of task data model records for the node can be established to determine the task list information corresponding to the node.

[0117] S250. Match the information of the detached service of the computing node, traverse the node service data model record set, and determine whether the node exists in the task data model record set based on the Mesos ID. If it does not exist, modify the status of the node service data to detached.

[0118] Based on this, by using the Mesos ID, we can determine whether a node in the node service data model record set exists in the task data model record set by traversing the data. If it does not exist, we determine that the node is in a detached service state and modify the state of the node service data to detached state. This gives us a node in a detached state on the device. Based on this, we can determine the nodes in a detached state on the device cluster in a concurrent manner.

[0119] S260. Extend the frame tenant information of all detached services in the cluster. The above can obtain the list of services in the detached state in the cluster. By traversing the service list, the tenant name of each service can be obtained by matching the Frame ID.

[0120] Based on this, using the list of detached node services within the cluster, the frame tenant information corresponding to each node in the cluster task data model record set is determined by traversing the frame ID, so that operations and maintenance personnel can troubleshoot problems.

[0121] In this embodiment, the service list of the compute node is obtained through the Docker interface, and the task list of the node is obtained through the MesosSlave interface. After matching and filtering, the list of detached services of the node is obtained. The framework tenant information of all tasks in the cluster is obtained through the MesosMaster interface. After matching with the above-mentioned detached services, the framework information of the detached services in the cluster can be obtained. This makes it easier for operation and maintenance personnel and users to troubleshoot abnormal detached services, which is beneficial to the health of the cluster.

[0122] Figure 3 This is a schematic diagram of the structure of a free service detection device 300 provided in an embodiment of this application, as shown below. Figure 3 As shown, the free service detection device 300 includes: an information acquisition module 310, an information determination module 320, and a tag and information determination module 330.

[0123] The information acquisition module 310 is used to acquire cluster task list information of the node cluster, container list information and service list information of the target node in the node cluster. The cluster task list information includes the cluster container label of the cluster container in the node cluster and the tenant information corresponding to the cluster container label. The container list information includes the node container in the target node, as well as the container label and identifier label of the node container. The service list information is obtained through the Mesos Slave interface, including the node task in the target node and the label of the node task.

[0124] The information determination module 320 is used to determine the detached service list information of the target container node in the node container based on the identification label of the node container and the label of the node task. The target container node is a container node in a detached service state. The detached service list information includes the target container label of the target container node.

[0125] The tag and information determination module 330 is used to determine the target cluster container tag in the cluster container tag and the target tenant information corresponding to the target cluster container tag based on the target container tag and the cluster task list information.

[0126] In this embodiment of the application, the information acquisition module 310 can also be specifically used for:

[0127] Get the list of target nodes in the node cluster;

[0128] Based on the target node list, determine the target nodes in the target node list;

[0129] Obtain the container list and service list information of the target node.

[0130] In this embodiment, the detached service detection system also includes a Docker interface, and the information acquisition module 310 can also be specifically used for:

[0131] Based on the Docker interface, obtain the node container information record of the target node;

[0132] Based on the node container information record, determine the container list information of the target node;

[0133] Based on the Mesos Slave interface, obtain the node task information record of the target node;

[0134] Based on the node task information records, determine the service list information of the target node.

[0135] In this embodiment of the application, the detached service detection system also includes a Mesos Master interface, and the information acquisition module 310 can also be specifically used for:

[0136] Based on the Mesos Master interface, obtain the node cluster task information records of the node cluster;

[0137] Based on the node cluster task information records, determine the cluster task list information of the node cluster.

[0138] In this embodiment of the application, the information determination module 320 can also be specifically used for:

[0139] Compare the identifier labels of the node containers with the labels of the node tasks to determine the target identifier label. The target identifier label is the identifier label of the node container that does not meet the first preset comparison requirement with the label of the node task.

[0140] Based on the target identifier tag, determine the target container node in the node container, as well as the detached service list information of the target container node.

[0141] In this embodiment of the application, the tag and information determination module 330 can also be specifically used for:

[0142] Compare the target container label with the cluster container label in the cluster task list information to determine the target cluster container label that meets the second preset comparison requirement with the target container label.

[0143] Based on the target cluster container label and cluster task list information, determine the target tenant information corresponding to the target cluster container label.

[0144] In this embodiment of the application, the tag and information determination module 330 can also be specifically used for:

[0145] Based on the cluster task list information, determine the association between cluster container tags and tenant information;

[0146] Based on the target cluster container label and its association, determine the target tenant information corresponding to the target cluster container label.

[0147] Figure 4 This is a schematic diagram of the structure of the ionized service detection device provided in an embodiment of this application. Figure 4 As shown, the device 400 includes:

[0148] The device 400 may include a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a communication component 403, and other components. The processor 401, memory 402, and communication component 403 are connected via a bus 404.

[0149] In the specific implementation process, at least one processor 401 executes computer execution instructions stored in memory 402, causing at least one processor 401 to execute the above-mentioned detached service detection method.

[0150] The specific implementation process of processor 401 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0151] In the above Figure 4 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0152] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0153] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0154] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the steps in any of the above-described detached service detection methods.

[0155] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0156] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0157] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps in any of the detached service detection methods provided in embodiments of this application.

[0158] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0159] According to one aspect of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium.

[0160] Since the instructions stored in the storage medium can execute the steps of any of the detached service detection methods provided in the embodiments of this application, the beneficial effects that any of the detached service detection methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0161] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0162] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A free service detection method, characterized by, The method is applied to a free service detection system, the free service detection system comprises a Mesos Slave interface, and the method comprises the following steps: obtaining cluster task list information of a node cluster, container list information and service list information of a target node in the node cluster, wherein the cluster task list information comprises cluster container labels of cluster containers in the node cluster and tenant information corresponding to the cluster container labels, the container list information comprises node containers in the target node and container labels and identification labels of the node containers, and the service list information is information obtained through the Mesos Slave interface and comprises node tasks in the target node and labels of the node tasks; based on the identification labels of the node containers and the labels of the node tasks, determining free service list information of a target container node in the node containers, the target container node being a container node in a free service state, and the free service list information comprising a target container label of the target container node; based on the target container label and the cluster task list information, determining a target cluster container label in the cluster container labels and target tenant information corresponding to the target cluster container label.

2. The method of claim 1, wherein, The step of obtaining the cluster task list information of the node cluster, the container list information and the service list information of the target node in the node cluster comprises the following steps: obtaining a target node list in the node cluster; based on the target node list, determining a target node in the target node list; obtaining container list information and service list information of the target node.

3. The method of claim 1, wherein, The free service detection system further comprises a docker interface, and the step of obtaining the cluster task list information of the node cluster, the container list information and the service list information of the target node in the node cluster comprises the following steps: based on the docker interface, obtaining node container information records of the target node; based on the node container information records, determining container list information of the target node; based on the Mesos Slave interface, obtaining node task information records of the target node; based on the node task information records, determining service list information of the target node.

4. The method of claim 1, wherein, The free service detection system further comprises a Mesos Master interface, and the step of obtaining the cluster task list information of the node cluster, the container list information and the service list information of the target node in the node cluster comprises the following steps: based on the Mesos Master interface, obtaining node cluster task information records of the node cluster; based on the node cluster task information records, determining cluster task list information of the node cluster.

5. The method of claim 1, wherein, The step of determining the free service list information of the target container node in the node containers based on the identification labels of the node containers and the labels of the node tasks comprises the following steps: comparing the identification labels of the node containers and the labels of the node tasks to determine a target identification label, the target identification label being an identification label of the node containers that does not meet a first preset comparison requirement with the labels of the node tasks; Determine a target container node in the node container and free service list information of the target container node based on the target identification tag.

6. The method of claim 1, wherein, The determining the target cluster container tag in the cluster container tags and the target tenant information corresponding to the target cluster container tag based on the target container tag and the cluster task list information comprises: Comparing the target container tag and the cluster container tags in the cluster task list information to determine a target cluster container tag in the cluster container tags that meets a second preset comparison requirement with the target container tag; Determine the target tenant information corresponding to the target cluster container tag based on the target cluster container tag and the cluster task list information.

7. The method of claim 6, wherein, The determining the target cluster container tag in the cluster container tags and the target tenant information corresponding to the target cluster container tag based on the target container tag and the cluster task list information comprises: Determine the association relationship between the cluster container tags and the tenant information based on the cluster task list information; Determine the target tenant information corresponding to the target cluster container tag based on the target cluster container tag and the association relationship.

8. A free service detecting apparatus characterized by comprising: The device is applied to a free service detection system, and the free service detection system comprises a Mesos Slave interface. An information acquisition module is configured to acquire cluster task list information of a node cluster, container list information and service list information of a target node in the node cluster, wherein the cluster task list information comprises cluster container tags of cluster containers in the node cluster and tenant information corresponding to the cluster container tags, the container list information comprises node containers in the target node and container tags and identification tags of the node containers, and the service list information is information acquired through the Mesos Slave interface and comprises node tasks in the target node and tags of the node tasks. An information determination module is configured to determine free service list information of a target container node in the node containers based on the identification tags of the node containers and the tags of the node tasks, the target container node is a container node in a free service state, and the free service list information comprises a target container tag of the target container node. A tag and information determination module is configured to determine a target cluster container tag in the cluster container tags and target tenant information corresponding to the target cluster container tag based on the target container tag and the cluster task list information.

9. A free service detecting apparatus characterized by comprising: One or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method in any one of claims 1 to 7. The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to execute the method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Cloud computing resource management method, device and equipment and computer readable storage medium

    CN109669762A

  • Distributed data integration job scheduling method and device

    CN110362390A