Application service affinity hidden danger determination method and device, electronic equipment and storage medium

By obtaining the deployment method and related parameters of the target application service, the hidden hidden dangers of affinity are determined, the problems that determine the unsightly identification in the existing technology have been solved, and the potential faults are achieved in advance and improved business continuity.

CN119383108AActive Publication Date: 2025-01-28BEIJING MATARNET TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411287155.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-01-28
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

In the prior art, the affinity risks of target application services are usually discovered after a business failure, resulting in the determination that they are not intelligent and the potential high-availability risks cannot be discovered and dealt with in advance.

Method used

By obtaining the deployment of target application services, if it is a virtual machine deployment, the number of cluster nodes and the number of virtual machines of single physical mechanisms based on single virtual machine deployment is deployed. The number of containers and the number of single host deployment platforms automatically determines the hidden hidden dangers of the application service.

Benefits of technology

The automatic judgment of the hidden hidden dangers of affinity under the deployment of virtual machines and containers is realized. Potential failures are found early, reducing application service failures, increasing user perception, and effectively solving business interruptions caused by irregular application service deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383108A_ABST
    Figure CN119383108A_ABST
Patent Text Reader

Abstract

The invention provides an affinity hidden danger determination method and device of an application service, electronic equipment and a storage medium, relates to the technical field of communication, realizes different affinity hidden danger grade judgment through different deployment modes, and improves the accuracy of determining the affinity hidden danger grade. According to the method and the device, automatic advanced judgment of the affinity hidden danger level under the condition of virtual machine deployment is realized, the affinity hidden danger under the condition of virtual machine deployment can be found in advance, the fault of application service is reduced, and the user perception is improved. According to the method and the device, automatic advanced judgment of the affinity hidden danger level under the container deployment condition is realized, the affinity hidden danger under the container deployment condition can be found in advance, the fault of application service is reduced, and the user perception is improved. According to the method, the problem of business interruption caused by non-standard application service deployment can be effectively solved, a visual analysis tool is provided for operation and maintenance work, hidden dangers of application service deployment can be analyzed in advance, and then business continuity is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for determining affinity risks of an application service. Background Art

[0002] The perception and processing of service failures by operators has gone through a long development process. At present, while quickly perceiving failures, operators will also rely on the existing network management system service architecture for analysis and processing. Discovering the high availability risks of target application services in advance can reduce service failures and improve user perception.

[0003] The affinity risks of existing target application services are usually discovered only after a service failure occurs. It can be seen that the determination of the affinity risks of existing target application services is not intelligent. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for determining affinity risks of application services, so as to solve the defect that the determination of affinity risks of target application services in the prior art is not intelligent, and realize automatic and advance acquisition of affinity risks of target application services.

[0005] The present invention provides a method for determining affinity risks of an application service, comprising: when the number of cluster nodes of a target application service is greater than 1, obtaining a deployment mode of the target application service; if the deployment mode is virtual machine deployment, determining an affinity risk level of the target application service based on the number of cluster nodes of a single virtual machine deployment corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service; if the deployment mode is container deployment, determining an affinity risk level based on the number of cluster nodes of a single container deployment corresponding to the target application service, the number of containers of a single platform deployment corresponding to the target application service and / or the number of platforms of a single host deployment corresponding to the target application service.

[0006] According to the method for determining affinity risks of application services provided by the present invention, the affinity risk level of the target application service is determined based on the number of nodes in the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service, including: when the number of nodes in the single virtual machine deployment cluster is greater than 1, determining the affinity risk level as a first-level affinity risk; when the number of nodes in the single virtual machine deployment cluster is equal to 1 and the number of virtual machines associated with a single physical machine is greater than 1, determining the affinity risk level as a second-level affinity risk, and the affinity risk level represents the order of the deployment risks of the target application service in which the first-level affinity risk is greater than the second-level affinity risk.

[0007] According to the method for determining affinity risks of application services provided by the present invention, the affinity risk level is determined based on the number of single-container deployment cluster nodes corresponding to the target application service, the number of single-platform deployment containers corresponding to the target application service and / or the number of single-host deployment platforms corresponding to the target application service, including: when the number of single-container deployment cluster nodes is greater than 1, determining the affinity risk level as a first-level affinity risk; when the number of single-container deployment cluster nodes is equal to 1, determining the affinity risk level based on the number of single-platform deployment containers and / or the number of single-host deployment platforms.

[0008] According to the method for determining affinity risks of application services provided by the present invention, the affinity risk level is determined based on the number of containers deployed on a single platform and / or the number of platforms deployed on a single host, including: when the number of containers deployed on a single platform is greater than 1, the affinity risk level is determined to be a second-level affinity risk; when the number of containers deployed on a single platform is equal to 1 and the number of platforms deployed on a single host is greater than 1, the affinity risk level is determined to be a third-level affinity risk, and the affinity risk level represents the existence of deployment risks in the target application service in the order of first-level affinity risks being greater than second-level affinity risks, and second-level affinity risks being greater than third-level affinity risks.

[0009] According to the method for determining affinity risks of application services provided by the present invention, the number of cluster nodes deployed on a single virtual machine is determined based on the following steps: obtaining a service deployment server list, the service deployment server list includes virtual machines and cluster nodes deployed on each virtual machine; obtaining the number of cluster nodes deployed on a single virtual machine based on the service deployment server list.

[0010] According to the method for determining affinity risks of application services provided by the present invention, the number of cluster nodes deployed in a single container is determined based on the following steps: obtaining a service deployment container list, the service deployment container list including containers and cluster nodes deployed on each container; and obtaining the number of cluster nodes deployed in a single container based on the service deployment container list.

[0011] According to the method for determining affinity risks of application services provided by the present invention, the number of containers deployed on a single platform is determined based on the following steps: obtaining a list of platforms to which the containers belong, the list of platforms to which the containers belong includes the containers and the platforms to which each container belongs; and obtaining the number of containers deployed on a single platform based on the list of platforms to which the containers belong.

[0012] The present invention also provides an affinity risk determination device for an application service, comprising: a deployment mode determination module, used to obtain the deployment mode of a target application service when the number of cluster nodes of the target application service is greater than 1; a first affinity risk level determination module, used to determine the affinity risk level of the target application service based on the number of single virtual machine deployment cluster nodes corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service if the deployment mode is virtual machine deployment; a second affinity risk level determination module, used to determine the affinity risk level based on the number of single container deployment cluster nodes corresponding to the target application service, the number of single platform deployment containers corresponding to the target application service and / or the number of single host deployment platforms corresponding to the target application service if the deployment mode is container deployment.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a method for determining affinity risks of any of the above-mentioned application services is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for determining affinity risks of any of the above-mentioned application services is implemented.

[0015] The affinity risk determination method, device, electronic device and storage medium of the application service provided by the present invention realize different affinity risk level determination through different deployment modes, thereby improving the accuracy of determining the affinity risk level. The affinity risk level is determined according to the number of cluster nodes deployed by a single virtual machine and / or the number of virtual machines associated with a single physical machine, thereby realizing automatic early determination of the affinity risk level under virtual machine deployment, which is conducive to early discovery of affinity risks under virtual machine deployment, reduces application service failures, and improves user perception. The affinity risk level is determined by the number of cluster nodes deployed by a single container, the number of containers deployed by a single platform and / or the number of platforms deployed by a single host, thereby realizing automatic early determination of the affinity risk level under container deployment, which is conducive to early discovery of affinity risks under container deployment, reduces application service failures, and improves user perception. The present invention can effectively solve the problem of business interruption caused by irregular application service deployment, provides a visual analysis tool for operation and maintenance work, and can analyze application service deployment risks in advance, thereby improving business continuity. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 This is one of the flow charts of the method for determining affinity risks of application services provided by the present invention.

[0018] Figure 2 It is a structural diagram of the virtual machine deployment provided by the present invention.

[0019] Figure 3 It is a structural schematic diagram of container deployment provided by the present invention.

[0020] Figure 4 This is the second flow chart of the method for determining affinity risks of application services provided by the present invention.

[0021] Figure 5 It is a structural schematic diagram of the device for determining affinity risk of application services provided by the present invention.

[0022] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0024] Combine the following Figure 1-Figure 6 The invention describes a method, a device and an electronic device for determining affinity risks of an application service.

[0025] Figure 1 FIG. 1 is one of the flow charts of the method for determining affinity risks of application services provided by the present invention. Figure 1 As shown, the method for determining affinity risks of application services includes steps S100 to S300, and each step is specifically as follows.

[0026] S100: When the number of cluster nodes of the target application service is greater than 1, the deployment mode of the target application service is obtained.

[0027] Application services refer to computing resources and supporting systems that provide specific functions, applications or services in information technology and computing environments. Application services are usually provided in the form of network services, allowing users or other systems to access and use these functions. The target application service is an application service with a cluster node number greater than 1. The affinity of application services refers to the relative relationship and scheduling strategy between application services in a computing environment, especially in a cluster or virtualized environment.

[0028] The deployment script of the target application service is obtained through the resource data of the target application service to obtain the number of cluster nodes of the target application service.

[0029] When the number of cluster nodes of the target application service is greater than 1, it means that the target application service is running in a distributed manner. At this time, the target application service may have affinity risks, such as resource competition, network delay, data consistency, load balancing, fault recovery, configuration management, and scheduling strategy. If the number of cluster nodes of the target application service is equal to 1, it means that the target application service does not have affinity risks. Exit the affinity risk analysis of the target application service.

[0030] When the number of cluster nodes of the target application service is greater than 1, the deployment mode of the target application service is obtained according to the resource data of the target application service. The deployment mode of the target application service of the present invention includes a traditional deployment mode and a container deployment mode.

[0031] like Figure 2 As shown in the figure, the traditional deployment method is virtual machine deployment, which uses virtualization technology to create and manage virtual machines, and install target application services (or application services) on these virtual machines. Each virtual machine has its own operating system and resources, and different target application services are isolated from each other. Virtual machines are deployed on physical machines, such as real hardware servers.

[0032] like Figure 3 As shown in the figure, container deployment packages the target application service and its dependencies through containers, providing an isolated environment for the target application service. Containerization enables the target application service to run consistently in any environment, simplifying deployment and expansion.

[0033] Match the deployment mode of the target application service, and analyze the affinity risk level of the target application service according to the deployment mode of the target application service.

[0034] S200: If the deployment mode is virtual machine deployment, determine the affinity risk level of the target application service based on the number of nodes of the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service.

[0035] The number of cluster nodes deployed on a single virtual machine is determined based on the following steps: obtaining a service deployment server list, the service deployment server list includes virtual machines and cluster nodes deployed on each virtual machine; and obtaining the number of cluster nodes deployed on a single virtual machine based on the service deployment server list.

[0036] like Figure 4 As shown, when the number of cluster nodes of the target application service is greater than 1 and the deployment mode of the target application service is virtual machine deployment, the service deployment server list is obtained. The service deployment server list includes virtual machines and the number of all cluster nodes deployed on each virtual machine (including the cluster nodes of the target application service and the cluster nodes of other application services). Through the service deployment server list, the number of cluster nodes for single virtual machine deployment corresponding to the target application service can be obtained.

[0037] The present invention records the number of cluster nodes deployed on each virtual machine through a service deployment server list, thereby achieving comprehensive recording of virtual machine information and facilitating improving the efficiency of obtaining the number of cluster nodes deployed on a single virtual machine.

[0038] Determine whether the target application service has affinity risks and the affinity risk level based on the number of cluster nodes deployed by a single virtual machine. If it is determined that the target application service does not have affinity risks based on the number of cluster nodes deployed by a single virtual machine, obtain the list of physical machines to which the virtual machine belongs. The list of physical machines to which the virtual machine belongs records the mapping relationship between virtual machines and physical machines. Obtain the number of virtual machines associated with a single physical machine corresponding to the target application service based on the list of physical machines to which the virtual machine belongs. Determine whether the target application service has affinity risks and the affinity risk level based on the number of virtual machines associated with a single physical machine.

[0039] S300: If the deployment mode is container deployment, the affinity risk level is determined based on the number of single container deployment cluster nodes corresponding to the target application service, the number of single platform deployment containers corresponding to the target application service, and / or the number of single host deployment platforms corresponding to the target application service.

[0040] The number of cluster nodes deployed in a single container is determined based on the following steps: obtaining a service deployment container list, the service deployment container list includes containers and cluster nodes deployed on each container; and obtaining the number of cluster nodes deployed in a single container based on the service deployment container list.

[0041] When the number of cluster nodes of the target application service is greater than 1 and the deployment mode of the target application service is container deployment, obtain the service deployment container list. The service deployment container list includes the mapping relationship between containers and cluster nodes (including the cluster nodes of the target application service and the cluster nodes of other application services). According to the service deployment container list, obtain the number of cluster nodes for single container deployment.

[0042] The present invention records the mapping relationship between containers and cluster node numbers according to the service deployment container list, thereby achieving comprehensive recording of container information and facilitating improving the efficiency of obtaining the number of cluster nodes deployed by a single container.

[0043] Determine whether the target application service has affinity risks and the affinity risk level based on the number of nodes in the single-container deployment cluster. If the target application service is determined to have no affinity risks based on the number of nodes in the single-container deployment cluster, obtain the number of single-platform deployment containers corresponding to the target application service. Determine whether the target application service has affinity risks and the affinity risk level based on the number of single-platform deployment containers.

[0044] The number of containers deployed on a single platform is determined based on the following steps: obtaining a list of platforms to which the containers belong, the list of platforms to which the containers belong includes the containers and the platform to which each container belongs; and obtaining the number of containers deployed on a single platform based on the list of platforms to which the containers belong.

[0045] The present invention records the mapping relationship between containers and platforms according to the platform list to which the containers belong, thereby improving the comprehensiveness of the container information record and facilitating improving the accuracy of obtaining the number of containers deployed on a single platform.

[0046] If the target application service is determined to have no affinity risks based on the number of cluster nodes deployed by a single container and the number of containers deployed by a single platform, then the number of platforms deployed by a single host corresponding to the target application service is obtained. The host list to which the platform belongs is obtained, which records the mapping relationship between the platform and the host. The number of platforms deployed by a single host is obtained based on the host list to which the platform belongs. Determine whether the target application service has affinity risks and the affinity risk level based on the number of platforms deployed by a single host.

[0047] The method for determining affinity hidden dangers of application services provided by the present invention realizes different affinity hidden danger level determinations through different deployment methods, thereby improving the accuracy of determining affinity hidden danger levels. The affinity hidden danger level is determined according to the number of cluster nodes deployed by a single virtual machine and / or the number of virtual machines associated with a single physical machine, thereby realizing automatic early determination of affinity hidden danger levels under virtual machine deployment, which is conducive to early discovery of affinity hidden dangers under virtual machine deployment, reducing application service failures and improving user perception. The affinity hidden danger level is determined by the number of cluster nodes deployed by a single container, the number of containers deployed by a single platform and / or the number of platforms deployed by a single host, thereby realizing automatic early determination of affinity hidden danger levels under container deployment, which is conducive to early discovery of affinity hidden dangers under container deployment, reducing application service failures and improving user perception. The present invention can effectively solve the problem of business interruption caused by irregular application service deployment, provide a visual analysis tool for operation and maintenance work, and can analyze application service deployment hidden dangers in advance, thereby improving business continuity.

[0048] Starting from the resource topology of the operator, the present invention combines the current status of the application services of the existing operator network management system, associates the isolated fault system with the resource system, and thus proposes an intelligent analysis method for the affinity hidden dangers of the application service. And based on the characteristics of the network management system, resource system and network, it proposes automatic processing of high-availability hidden dangers of the application service. In order to avoid repeated and tedious business process modeling work, the present invention reorganizes all analysis processes and provides a general business process.

[0049] Based on the above embodiment, the affinity risk level of the target application service is determined based on the number of nodes in the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service, including steps S210 to S220, and each step is specifically as follows.

[0050] S210: When the number of nodes in the single virtual machine deployment cluster is greater than 1, determine that the affinity risk level is a first-level affinity risk.

[0051] S210: When the number of nodes in a single virtual machine deployment cluster is equal to 1 and the number of virtual machines associated with a single physical machine is greater than 1, the affinity risk level is determined to be a level 2 affinity risk, and the affinity risk level represents the order in which the target application service has deployment risks: level 1 affinity risk is greater than level 2 affinity risk.

[0052] like Figure 4 As shown, when the number of cluster nodes deployed in a single virtual machine is greater than 1, it indicates that the target application service has a high availability risk, and the target application service is determined to be a first-level affinity risk, indicating that the target application service has the highest affinity risk.

[0053] For the target application service deployed by a virtual machine, when the number of nodes in a single virtual machine deployment cluster is equal to 1 and the number of virtual machines associated with a single physical machine is greater than 1, it indicates that the target application service may have high availability risks, and the affinity risk level of the target application service is determined to be a level 2 affinity risk, indicating that the target application service may have an affinity risk. The higher the affinity risk level, the lower the possibility that the application service has an affinity risk. For example, the probability of affinity risks is in the following order from high to low: level 1 affinity risk > level 2 affinity risk > level 3 affinity risk.

[0054] When the number of nodes in a single virtual machine deployment cluster is equal to 1 and the number of virtual machines associated with a single physical machine is equal to 1, it indicates that there is no risk for the target application service, and the risk analysis of the target application service is exited (exit analysis).

[0055] The present invention determines the affinity risk level according to the number of cluster nodes deployed by a single virtual machine and / or the number of virtual machines associated with a single physical machine, thereby realizing automatic early determination of the affinity risk level under virtual machine deployment, which is conducive to early discovery of affinity risks under virtual machine deployment, reduces application service failures, and improves user perception.

[0056] Based on the above embodiment, the affinity risk level is determined based on the number of single-container deployment cluster nodes corresponding to the target application service, the number of single-platform deployment containers corresponding to the target application service, and / or the number of single-host deployment platforms corresponding to the target application service, including steps S310 to S320, and each step is specifically as follows.

[0057] S310: When the number of nodes in the single-container deployment cluster is greater than 1, the affinity risk level is determined to be a first-level affinity risk.

[0058] S320: When the number of nodes in the single-container deployment cluster is equal to 1, determine the affinity risk level based on the number of containers deployed on a single platform and / or the number of platforms deployed on a single host.

[0059] The affinity risk level is determined based on the number of containers deployed on a single platform and / or the number of platforms deployed on a single host. Specifically, when the number of containers deployed on a single platform is greater than 1, the affinity risk level is determined to be a level 2 affinity risk; when the number of containers deployed on a single platform is equal to 1 and the number of platforms deployed on a single host is greater than 1, the affinity risk level is determined to be a level 3 affinity risk. The order of deployment risks of target application services represented by the affinity risk levels is that level 1 affinity risks are greater than level 2 affinity risks, and level 2 affinity risks are greater than level 3 affinity risks.

[0060] For the target application service deployed in a container, when the number of nodes in a single container deployment cluster is greater than 1, it indicates that the target application service has a high availability risk, and the target application service is determined to be a first-level affinity risk.

[0061] If the number of nodes in a single-container deployment cluster is equal to 1 and the number of containers deployed on a single platform is greater than 1, it indicates that the target application service may have high availability risks, and the affinity risk level of the target application service is determined to be a level 2 affinity risk.

[0062] If the number of cluster nodes deployed by a single container is equal to 1, the number of containers deployed by a single platform is equal to 1, and the number of platforms deployed by a single host is greater than 1, it means that there may be risks in the target application service, but the impact of the risk is small. The affinity risk level of the target application service is determined to be a level 3 affinity risk.

[0063] When the number of cluster nodes deployed by a single container is equal to 1, the number of containers deployed by a single platform is equal to 1, and the number of platforms deployed by a single host is equal to 1, it indicates that there is no risk for the target application service, and the risk analysis of the target application service is exited.

[0064] The present invention determines the affinity risk level by the number of cluster nodes deployed by a single container, the number of containers deployed by a single platform and / or the number of platforms deployed by a single host, thereby realizing automatic early determination of the affinity risk level under container deployment, which is conducive to early discovery of affinity risks under container deployment, reduces application service failures and improves user perception.

[0065] The device for determining affinity risk of application services provided by the present invention is described below. The device for determining affinity risk of application services described below and the method for determining affinity risk of application services described above can be referred to each other.

[0066] like Figure 5 As shown, a device for determining affinity risks of an application service includes: a deployment mode determination module 501, which is used to obtain the deployment mode of the target application service when the number of cluster nodes of the target application service is greater than 1.

[0067] The first affinity risk level determination module 502 is used to determine the affinity risk level of the target application service based on the number of nodes in the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service if the deployment mode is virtual machine deployment.

[0068] The second affinity risk level determination module 503 is used to determine the affinity risk level based on the number of single-container deployment cluster nodes corresponding to the target application service, the number of single-platform deployment containers corresponding to the target application service, and / or the number of single-host deployment platforms corresponding to the target application service if the deployment mode is container deployment.

[0069] The affinity hidden danger determination device for application services provided by the present invention realizes different affinity hidden danger level determinations through different deployment methods, thereby improving the accuracy of determining the affinity hidden danger level. The affinity hidden danger level is determined according to the number of cluster nodes deployed by a single virtual machine and / or the number of virtual machines associated with a single physical machine, thereby realizing automatic early determination of the affinity hidden danger level under virtual machine deployment, which is conducive to early discovery of affinity hidden dangers under virtual machine deployment, reducing application service failures and improving user perception. The affinity hidden danger level is determined by the number of cluster nodes deployed by a single container, the number of containers deployed by a single platform and / or the number of platforms deployed by a single host, thereby realizing automatic early determination of the affinity hidden danger level under container deployment, which is conducive to early discovery of affinity hidden dangers under container deployment, reducing application service failures and improving user perception. The present invention can effectively solve the problem of business interruption caused by irregular application service deployment, provide a visual analysis tool for operation and maintenance work, and can analyze application service deployment risks in advance, thereby improving business continuity.

[0070] In one embodiment, the first affinity risk level determination module 502 is used to: when the number of cluster nodes deployed by a single virtual machine is greater than 1, determine the affinity risk level as a first-level affinity risk; when the number of cluster nodes deployed by a single virtual machine is equal to 1 and the number of virtual machines associated with a single physical machine is greater than 1, determine the affinity risk level as a second-level affinity risk, and the order of the deployment risks of the target application service represented by the affinity risk level is that the first-level affinity risk is greater than the second-level affinity risk.

[0071] In one embodiment, the second affinity risk level determination module 503 is used to: when the number of nodes in a single container deployment cluster is greater than 1, determine the affinity risk level as a first-level affinity risk; when the number of nodes in a single container deployment cluster is equal to 1, determine the affinity risk level based on the number of containers deployed on a single platform and / or the number of platforms deployed on a single host.

[0072] In one embodiment, the second affinity risk level determination module 503 is used to: when the number of containers deployed on a single platform is greater than 1, determine the affinity risk level as a second-level affinity risk; when the number of containers deployed on a single platform is equal to 1 and the number of platforms deployed on a single host is greater than 1, determine the affinity risk level as a third-level affinity risk, and the affinity risk level represents the presence of deployment risks in the target application service in the order of first-level affinity risk being greater than second-level affinity risk, and second-level affinity risk being greater than third-level affinity risk.

[0073] In one embodiment, the first affinity risk level determination module 502 is further used to: obtain a service deployment server list, the service deployment server list includes virtual machines and cluster nodes deployed on each virtual machine; and obtain the number of cluster nodes deployed on a single virtual machine based on the service deployment server list.

[0074] In one embodiment, the second affinity risk level determination module 503 is further used to: obtain a service deployment container list, the service deployment container list includes containers and cluster nodes deployed on each container; and obtain the number of cluster nodes deployed in a single container based on the service deployment container list.

[0075] In one embodiment, the second affinity risk level determination module 503 is further used to: obtain a list of platforms to which containers belong, the list of platforms to which containers belong includes containers and the platform to which each container belongs; and obtain the number of containers deployed on a single platform based on the list of platforms to which containers belong.

[0076] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the affinity risk determination method of the application service, the method comprising: when the number of cluster nodes of the target application service is greater than 1, obtaining the deployment mode of the target application service; if the deployment mode is virtual machine deployment, determining the affinity risk level of the target application service based on the number of cluster nodes of the single virtual machine deployment corresponding to the target application service and / or the number of virtual machines associated with the single physical machine corresponding to the target application service; if the deployment mode is container deployment, determining the affinity risk level based on the number of cluster nodes of the single container deployment corresponding to the target application service, the number of containers of the single platform deployment corresponding to the target application service and / or the number of platforms of the single host deployment corresponding to the target application service.

[0077] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0078] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for determining affinity risks of application services provided by the above-mentioned methods, the method comprising: when the number of cluster nodes of the target application service is greater than 1, obtaining the deployment mode of the target application service; if the deployment mode is virtual machine deployment, determining the affinity risk level of the target application service based on the number of cluster nodes of a single virtual machine deployment corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service; if the deployment mode is container deployment, determining the affinity risk level based on the number of cluster nodes of a single container deployment corresponding to the target application service, the number of containers of a single platform deployment corresponding to the target application service and / or the number of platforms of a single host deployment corresponding to the target application service.

[0079] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0080] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining affinity risks of application services, characterized in that: include: When the number of cluster nodes of the target application service is greater than 1, obtaining the deployment mode of the target application service; If the deployment mode is virtual machine deployment, the affinity risk level of the target application service is determined based on the number of nodes of the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service; If the deployment mode is container deployment, the affinity risk level is determined based on the number of single-container deployment cluster nodes corresponding to the target application service, the number of single-platform deployment containers corresponding to the target application service, and / or the number of single-host deployment platforms corresponding to the target application service.

2. The method for determining affinity risk of application services according to claim 1, characterized in that: The determining the affinity risk level of the target application service based on the number of nodes of the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service includes: When the number of nodes in the single virtual machine deployment cluster is greater than 1, determining the affinity risk level to be a first-level affinity risk; When the number of nodes in the single virtual machine deployment cluster is equal to 1 and the number of virtual machines associated with the single physical machine is greater than 1, the affinity risk level is determined to be a secondary affinity risk, and the order of the deployment risks of the target application service represented by the affinity risk level is that the first affinity risk is greater than the second affinity risk.

3. The method for determining affinity risk of application services according to claim 1, characterized in that: The determining the affinity risk level based on the number of single-container deployment cluster nodes corresponding to the target application service, the number of single-platform deployment containers corresponding to the target application service, and / or the number of single-host deployment platforms corresponding to the target application service includes: When the number of nodes in the single container deployment cluster is greater than 1, determining the affinity risk level to be a first-level affinity risk; When the number of nodes in the single-container deployment cluster is equal to 1, the affinity risk level is determined based on the number of containers deployed on a single platform and / or the number of platforms deployed on a single host.

4. The method for determining affinity risk of application services according to claim 3, characterized in that: The determining the affinity risk level based on the number of containers deployed on a single platform and / or the number of platforms deployed on a single host includes: When the number of containers deployed on the single platform is greater than 1, determining the affinity risk level to be a level 2 affinity risk; When the number of containers deployed on a single platform is equal to 1 and the number of platforms deployed on a single host is greater than 1, the affinity risk level is determined to be a third-level affinity risk, and the order of the deployment risks of the target application service represented by the affinity risk level is that the first-level affinity risk is greater than the second-level affinity risk, and the second-level affinity risk is greater than the third-level affinity risk.

5. The method for determining affinity risk of application services according to claim 1, characterized in that: The number of nodes in the single virtual machine deployment cluster is determined based on the following steps: Obtain a service deployment server list, the service deployment server list including virtual machines and cluster nodes deployed on each of the virtual machines; The number of nodes in the single virtual machine deployment cluster is obtained based on the service deployment server list.

6. The method for determining affinity risk of application services according to claim 1, characterized in that: The number of nodes in the single container deployment cluster is determined based on the following steps: Obtain a service deployment container list, the service deployment container list including containers and cluster nodes deployed on each container; The number of nodes in the single container deployment cluster is obtained based on the service deployment container list.

7. The method for determining affinity risk of application services according to claim 1, characterized in that: The number of containers deployed on a single platform is determined based on the following steps: Obtain a list of platforms to which containers belong, where the list of platforms to which containers belong includes containers and the platform to which each container belongs; The number of containers deployed on the single platform is obtained based on the platform list to which the container belongs.

8. A device for determining affinity risk of application services, characterized in that: include: A deployment mode determination module, used to obtain the deployment mode of the target application service when the number of cluster nodes of the target application service is greater than 1; A first affinity risk level determination module is used to determine the affinity risk level of the target application service based on the number of nodes of the single virtual machine deployment cluster corresponding to the target application service and / or the number of virtual machines associated with a single physical machine corresponding to the target application service if the deployment mode is virtual machine deployment; The second affinity risk level determination module is used to determine the affinity risk level based on the number of single-container deployment cluster nodes corresponding to the target application service, the number of single-platform deployment containers corresponding to the target application service, and / or the number of single-host deployment platforms corresponding to the target application service if the deployment mode is container deployment.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for determining affinity risks of the application service according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining affinity risks of an application service according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Virtual machine affinity strategy visualization method and device

    CN106502760A

  • Virtual network function (VNF) migration method, management and orchestration (MANO), and VNF system

    CN106506201A

  • Cloud server anti-affinity processing method, device, storage medium and system

    CN117834635A

  • Affinity of microservice containers

    US20180136931A1

  • Affinity based hierarchical container scheduling

    US20180203736A1