A service deployment method and device, electronic equipment and computer readable medium
By obtaining server affinity and exclusivity lists, the deployment of AI services was optimized, solving the problem of resource dispersion in AI project services and achieving efficient GPU resource utilization and improved business processing capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2026-03-17
AI Technical Summary
In AI project services, there are many AI models and a large number of concurrent requests, but cloud computing resources, GPU resources, and configuration resources are relatively scattered, resulting in a waste of GPU server resources.
By receiving service deployment requests, we identify services with special deployment requirements, obtain lists of server affinity, service affinity, and exclusivity, determine whether the target server has deployed exclusive services, and if not, deploy the service on the target server. We also deploy affinity services based on the affinity list to optimize resource allocation and improve utilization.
It enables high concurrency and high availability of services, improves the utilization of GPU server resources, and enhances business processing capabilities.
Smart Images

Figure CN114237902B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a service deployment method, apparatus, electronic device, and computer-readable medium. Background Technology
[0002] With the development of artificial intelligence (AI) applications, the containerization, orchestration, and deployment of AI services as an AI engineering methodology is facing increasing challenges. Containerizing and orchestrating AI services involves the allocation of various resources, such as GPUs, CPUs, memory, and networks, and also involves business concurrency. Furthermore, it requires time-sharing reuse based on business needs, making development difficult and maintenance challenging. In AI projects, there are many AI models and high concurrent requests, but cloud computing resources, including GPUs and configuration resources, are scattered. Inefficient AI project services lead to wasted GPU server resources.
[0003] In the process of developing this application, the inventors discovered at least the following problems in the prior art:
[0004] In AI project services, there are many AI models and a large number of concurrent requests, but cloud computing resources, GPU resources, and configuration resources are relatively scattered. The unreasonable AI project services lead to a waste of GPU server resources. Summary of the Invention
[0005] In view of this, embodiments of this application provide a service deployment method, apparatus, electronic device, and computer-readable medium, which can solve the problem that in existing AI project services, there are many AI models and a large number of concurrent requests, but cloud computing resources, GPU resources, and configuration resources are relatively scattered, resulting in unreasonable AI project services and wasted GPU server resources.
[0006] To achieve the above objectives, according to one aspect of an embodiment of this application, a service deployment method is provided, comprising:
[0007] Receive service deployment requests, determine the corresponding special deployment requirements services, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list;
[0008] The corresponding exclusive service is determined based on the service exclusivity list, and the target server is determined based on the server affinity list.
[0009] Determine whether an exclusive service is deployed on the target server. If so, return a request failure; otherwise, deploy the special deployment requirement service on the target server. Then, determine the corresponding affinity service based on the service affinity list and deploy the affinity service on the target server.
[0010] Optionally, after deploying the affinity and service on the target server, the method further includes:
[0011] Determine the resource percentage of each regular deployment service required for the service deployment request;
[0012] Based on resource allocation, determine the service priority corresponding to each regular deployment service;
[0013] Determine the remaining resources of each server, and then determine the corresponding server priority based on the remaining resources;
[0014] Based on the priority of each service and each server, deploy the regular deployment services on each server.
[0015] Optionally, based on the priority of each service and the priority of each server, various regular deployment services are deployed on each server, including:
[0016] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0017] Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server corresponding to the highest server priority. If not, deploy the target service on the server corresponding to the highest server priority. If so, determine the priority of the next level server corresponding to the highest server priority as the highest server priority, until the target exclusive service is not deployed on the server corresponding to the highest server priority, and then deploy the target service on the server corresponding to the highest server priority.
[0018] The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0019] Optionally, based on the priority of each service and the priority of each server, various regular deployment services are deployed on each server, including:
[0020] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0021] The target service is deployed on the server with the highest server priority. The next-level server priority corresponding to the highest server priority is set as the highest server priority. The next-level service priority corresponding to the highest service priority is set as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0022] Optionally, based on the priority of each service and the priority of each server, various regular deployment services are deployed on each server, including:
[0023] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0024] Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-lower level server priority as servers to be deployed.
[0025] Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server to be deployed. If not, deploy the target service on each server to be deployed. If so, determine the priority of the next level server corresponding to the highest server priority as the highest server priority, until the target exclusive service is not deployed on the server to be deployed. Then deploy the target service on each server to be deployed.
[0026] The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0027] Optionally, based on the priority of each service and the priority of each server, various regular deployment services are deployed on each server, including:
[0028] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0029] Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-lower level server priority as servers to be deployed.
[0030] The target service is deployed on each server to be deployed. The next-level server priority corresponding to the highest server priority is determined as the highest server priority. The next-level service priority corresponding to the highest service priority is determined as the highest service priority. Then the target service is updated, and the service deployment on each server is iteratively executed until the last service is deployed, and the service deployment ends.
[0031] Optionally, the method further includes:
[0032] Identify the concurrent services in each regular deployment service and deploy each concurrent service on a different server.
[0033] In addition, this application also provides a service deployment apparatus, including:
[0034] The receiving unit is configured to receive service deployment requests, determine the corresponding special deployment requirement services, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list.
[0035] The target server determination unit is configured to determine the corresponding exclusive service based on the service exclusivity list and the target server based on the server affinity list;
[0036] The service deployment unit is configured to determine whether an exclusive service is deployed on the target server. If so, it returns a request failure; otherwise, it deploys the special deployment requirement service on the target server. Then, based on the service affinity list, it determines the corresponding affinity and service and deploys the affinity and service on the target server.
[0037] Optionally, the service deployment unit is further configured to:
[0038] Determine the resource percentage of each regular deployment service required for the service deployment request;
[0039] Based on resource allocation, determine the service priority corresponding to each regular deployment service;
[0040] Determine the remaining resources of each server, and then determine the corresponding server priority based on the remaining resources;
[0041] Based on the priority of each service and each server, deploy the regular deployment services on each server.
[0042] Optionally, the service deployment unit is further configured to:
[0043] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0044] Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server corresponding to the highest server priority. If not, deploy the target service on the server corresponding to the highest server priority. If so, determine the priority of the next level server corresponding to the highest server priority as the highest server priority, until the target exclusive service is not deployed on the server corresponding to the highest server priority, and then deploy the target service on the server corresponding to the highest server priority.
[0045] The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0046] Optionally, the service deployment unit is further configured to:
[0047] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0048] The target service is deployed on the server with the highest server priority. The next-level server priority corresponding to the highest server priority is set as the highest server priority. The next-level service priority corresponding to the highest service priority is set as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0049] Optionally, the service deployment unit is further configured to:
[0050] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0051] Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-lower level server priority as servers to be deployed.
[0052] Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server to be deployed. If not, deploy the target service on each server to be deployed. If so, determine the priority of the next level server corresponding to the highest server priority as the highest server priority, until the target exclusive service is not deployed on the server to be deployed. Then deploy the target service on each server to be deployed.
[0053] The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0054] Optionally, the service deployment unit is further configured to:
[0055] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0056] Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-lower level server priority as servers to be deployed.
[0057] The target service is deployed on each server to be deployed. The next-level server priority corresponding to the highest server priority is determined as the highest server priority. The next-level service priority corresponding to the highest service priority is determined as the highest service priority. Then the target service is updated, and the service deployment on each server is iteratively executed until the last service is deployed, and the service deployment ends.
[0058] Optionally, the service deployment unit is further configured to:
[0059] Identify the concurrent services in each regular deployment service and deploy each concurrent service on a different server.
[0060] In addition, this application also provides a service deployment electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the service deployment method described above.
[0061] In addition, this application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the service deployment method described above.
[0062] To achieve the above objectives, according to another aspect of the embodiments of this application, a computer program product is provided.
[0063] A computer program product according to an embodiment of this application includes a computer program that, when executed by a processor, implements the service deployment method provided in an embodiment of this application.
[0064] One embodiment of the above invention has the following advantages or beneficial effects: This application receives a service deployment request, determines the corresponding special deployment requirement service, and then obtains the corresponding server affinity list, service affinity list, and service exclusivity list; determines the corresponding exclusive service based on the service exclusivity list, and determines the target server based on the server affinity list; determines whether an exclusive service is deployed on the target server; if so, returns a request failure; otherwise, deploys the special deployment requirement service on the target server, and then determines the corresponding affinity and service based on the service affinity list, and deploys the affinity and service on the target server. By deploying services with special deployment requirements on each server according to server affinity, service affinity, and service exclusivity, the high concurrency and high availability of services are guaranteed, ensuring the normal operation of services while improving the utilization rate of GPU server resources.
[0065] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0066] The accompanying drawings are provided to better understand this application and do not constitute an undue limitation thereof. Wherein:
[0067] Figure 1 This is a schematic diagram of the main flow of the service deployment method according to the first embodiment of this application;
[0068] Figure 2 This is a schematic diagram of the main flow of the service deployment method according to the second embodiment of this application;
[0069] Figure 3 This is a schematic diagram illustrating an application scenario of the service deployment method according to the third embodiment of this application;
[0070] Figure 4 This is a schematic diagram illustrating the resource maximum allocation process of the service deployment method according to an embodiment of this application;
[0071] Figure 5 This is a schematic diagram illustrating the bucket group exclusivity processing of the service deployment method according to an embodiment of this application;
[0072] Figure 6 This is a schematic diagram of the main units of a service deployment apparatus according to an embodiment of this application;
[0073] Figure 7 This is an exemplary system architecture diagram to which embodiments of this application can be applied;
[0074] Figure 8 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers in the embodiments of this application. Detailed Implementation
[0075] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with relevant national laws and regulations.
[0076] Figure 1 This is a schematic diagram of the main flow of the service deployment method according to the first embodiment of this application, such as... Figure 1 As shown, the service deployment methods include:
[0077] Step S101: Receive a service deployment request, determine the corresponding special deployment requirement service, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list.
[0078] In this embodiment, the execution entity of the service deployment method (e.g., a server) can receive service deployment requests via wired or wireless connections. The deployed service may be, for example, an AI model service. This embodiment deploys the service on a server, specifically by allocating GPU memory resources on the server: many AI model services require GPU usage, and GPU memory resources need to be allocated uniformly according to the AI model services. GPUs allow for multi-tasking and multi-process parallelism. AI model services using GPU services require a fixed amount of GPU memory for computation; since GPU memory resources are limited, reasonable orchestration and allocation of GPU memory resources are necessary.
[0079] Before resource allocation, AI service configuration information needs to be determined. This includes stress testing or understanding the GPU memory resources required by each AI service (typically a fixed value), the maximum number of CPU top cores, memory consumption, and response time. An example is shown in Table 1 below:
[0080] Table 1
[0081]
[0082] Based on the stress test results of this service, the executing entity can determine the GPU memory required for each service, peak CPU usage, memory usage, QPS (queries per second), response time, and the number of replicas required to ensure high availability. Using this information, along with the business process sequence, the business flow or concurrency can be determined, and corresponding business operations can be responded to and processed promptly. ICR is an asynchronous operation, while NLP services are synchronous concurrent operations. Therefore, all NLP services should be distributed across different machines, with different exclusivity settings to ensure load balancing and high availability. Simultaneously, NLP model training requires multiple GPUs to ensure training speed. Therefore, affinity binding between services and the appropriate servers is necessary. Furthermore, different services may require network access and may need to be deployed on the same machine.
[0083] The embodiments of this application can be applied to scenarios involving the deployment of services with special deployment requirements. Services with special deployment requirements can be services with server affinity requirements, service affinity requirements, or service exclusivity requirements.
[0084] When deploying services, it is necessary to take into account the affinity orchestration of AI services: most AI service algorithms are multi-model structures, and many models have special requirements for networks, number of GPUs, GPU locations, etc., requiring special servers for deployment. Therefore, it is necessary to deploy these AI services in an affinity manner.
[0085] Specifically, AI services have two affinity requirements during deployment: different AI services may have specific server requirements. For example, one AI service might require a server with a V100 graphics card, or another might require a secondary GPU. Different AI services may also need to be deployed on the same machine as other AI services due to network access issues. This is the affinity requirement of AI services.
[0086] To facilitate subsequent algorithm processing, the executing entity can generate two lists (arrays) to store the affinity requirements of each AI service: a server affinity requirement list (e.g., if service 1 needs to be deployed on GPU server 1, GPU server 3, GPU server 4, and GPU server 5, then the list consisting of GPU server 1, GPU server 3, GPU server 4, and GPU server 5 is the server affinity requirement list for service 1) and an AI service affinity list (e.g., if service 1 and service 2 need to be deployed together on the same server, then the list consisting of services 1 and 2 is the AI service affinity list). For example, an AI service deployment might need to be deployed on GPU1, GPU3, and GPU4, and also need to be deployed together with NLP-DRAFT and NLP-INV within the AI service. When the executing entity calls the automated algorithm to uniformly allocate AI resources, the algorithm will traverse the server affinity list (identifying servers with affinity to this service) and deploy services with affinity to this AI service on the same Node node, i.e., on the same server.
[0087] When deploying services, the exclusivity of AI services should be taken into account: When AI services are launched, a certain degree of concurrent services is required. For example, the same AI model service should be kept as concurrent as possible and not placed on the same server to avoid excessive server load during concurrency, which would lead to concentrated resource usage and longer response time.
[0088] Specifically, exclusivity refers to the fact that AI services generally only have the requirement of mutually exclusive deployment during the deployment process: different AI services may have specific deployment requirements for AI service distribution. For example, various NLP services may have high concurrent traffic and need to be distributed across different machines to maintain high availability and load balancing. The execution entity can use a bucket classification method to reasonably distribute different mutually exclusive services across different machines.
[0089] like Figure 5 The diagram illustrates the exclusive processing of bucket groups. In this embodiment, each "bucket" represents a server, and each "bucket group" represents a server cluster. Figure 5 As shown in bucket group 1, there are four different buckets a, b, c, and d, each containing a different AI service (NLP-DRAFT-1, NLP-INV-1, NLP-DRAFT-2, NLP-INV-2). The remaining AI services (e.g., ICR-TEXT, ICR-STAMP, etc.) are not placed in any bucket, indicating no mutual exclusion. Figure 5As shown, due to the concurrent nature of NLP services, NLP-Draft, NLP-INV, NLP-BILL, and NLP-GOODS must belong to four separate buckets and cannot be deployed on the same machine simultaneously. During the subsequent deployment process, the content structure of each bucket will be traversed to ensure all containers can be deployed normally and concurrently. If there are two types of exclusivity, the first "bucket" will be grouped, and a second bucket group will be built, such as bucket group 2 or bucket group 3. Bucket group 2 can include two "buckets," namely two servers e and f, deploying services ICR-STAMP-1 and ICR-STAMP-2 respectively; bucket group 3 can include two "buckets," namely two servers g and h, deploying services ICR-TEXT-1 and ICR-TEXT-2 respectively.
[0090] This application's embodiments address the issue of multi-deployment orchestration of AI service models, taking into account GPU memory allocation, affinity configuration, and exclusive configuration in container orchestration. This ensures the stable and rapid deployment of AI services.
[0091] Step S102: Determine the corresponding exclusive service based on the service exclusivity list, and determine the target server based on the server affinity list.
[0092] Exclusive "bucket groups" also need to be established between similar services. For example... Figure 5 Bucket group 1, bucket group 2, and bucket group 3 are mutually exclusive bucket groups.
[0093] In this embodiment of the application, the service exclusivity list can be obtained from the service configuration information. This embodiment of the application does not limit the source or method of obtaining the service exclusivity list. For example... Figure 5 As shown, in bucket group 1, for example, if the service to be deployed is NLP-DRAFT-1, then... Figure 5 NLP-INV-1, NLP-DRAFT-2, and NLP-INV-2 in bucket group 1, ICR-STAMP-1 and ICR-STAMP-2 in bucket group 2, and ICR-TEXT-1 and ICR-TEXT-2 in bucket group 3 are all exclusive services of the service to be deployed.
[0094] For example, the target server is determined based on the server affinity list. The target server is the server on which the service to be deployed is specified, that is, the server associated with the service to be deployed in the server affinity list. For example, if the server affinity list is service1-server1-server2-server3, then server1, server2, and server3 are the target servers to be deployed for service1.
[0095] Step S103: Determine whether an exclusive service is deployed on the target server.
[0096] Before deploying a service on the target server, the executing entity can determine whether there is an exclusive service on the target server that is mutually exclusive with the service with special deployment requirements to be deployed, in order to ensure high availability of the service.
[0097] Step S104: If yes, return "Request Failed".
[0098] If an exclusive service that is mutually exclusive with the special deployment requirement service to be deployed (e.g., NLP-DRAFT-1) is deployed on the target server, then the special deployment requirement service (e.g., NLP-DRAFT-1) will not be deployed on the target server, and a service deployment request failure message will be returned, such as a failure flag, which can be 0 or 1. This application embodiment does not limit the specific content and form of the returned failure message.
[0099] Step S105: Otherwise, deploy the special deployment requirement service to the target server, and then determine the corresponding affinity and service based on the service affinity list, and deploy the affinity and service to the target server.
[0100] If there is no exclusive service on the target server that is mutually exclusive with the special deployment requirement service to be deployed, the executing entity can deploy the special deployment requirement service (e.g., NLP-DRAFT-1) on the target server, then traverse the affinity list corresponding to the special deployment requirement service (e.g., NLP-DRAFT-1) to obtain the corresponding affinity and service, and then deploy the corresponding affinity and service on the target server to ensure high availability and high concurrency of the services deployed on the target server and improve business processing capabilities.
[0101] This embodiment receives service deployment requests, determines the corresponding special deployment requirement services, and then obtains the corresponding server affinity list, service affinity list, and service exclusivity list. Based on the service exclusivity list, it determines the corresponding exclusive service, and based on the server affinity list, it determines the target server. It then checks whether the exclusive service is deployed on the target server; if so, it returns a request failure; otherwise, it deploys the special deployment requirement service on the target server. Finally, based on the service affinity list, it determines the corresponding affinity and service, and deploys the affinity and service on the target server. By deploying services with special deployment requirements on each server according to server affinity, service affinity, and service exclusivity, it ensures high concurrency and high availability of services, guarantees normal service operation, improves GPU server resource utilization, and enhances business processing capabilities.
[0102] Figure 2 This is a schematic diagram of the main flow of the service deployment method according to the second embodiment of this application, such as... Figure 2 As shown, the service deployment methods include:
[0103] Step S201: Receive a service deployment request, determine the corresponding special deployment requirement service, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list.
[0104] Step S202: Determine the corresponding exclusive service based on the service exclusivity list, and determine the target server based on the server affinity list.
[0105] Step S203: Determine whether an exclusive service is deployed on the target server.
[0106] Step S204: If yes, return "Request Failed".
[0107] The principles of steps S201 to S204 are similar to those of steps S101 to S104, and will not be repeated here.
[0108] Step S205: Otherwise, deploy the service to be deployed on the target server, and then determine the corresponding affinity and service based on the service affinity list, and deploy the affinity and service on the target server.
[0109] For example, when there is only one target server, the executing entity can directly deploy the affinity and service on that single target server; when there are multiple target servers, the executing entity can deploy the affinity and service on each target server to ensure high availability of the service.
[0110] Step S206: Determine the resource proportion of each regular deployment service required by the service deployment request.
[0111] Service deployment requests can include requests to deploy regular services and requests to deploy services with special deployment requirements.
[0112] Services without special deployment requirements are designated as regular services. Specifically, the AI service requiring the most GPU resources can be deployed first. The implementing entity can determine the percentage of GPU resources required on the server for each regular deployment service. For example, if NLP-DRAFT-1, NLP-INV-1, NLP-DRAFT-2, and NLP-INV-2 require 1GB, 2GB, 3GB, and 4GB of GPU resources respectively, then the corresponding resource percentages are 1 / 10, 2 / 10, 3 / 10, and 4 / 10.
[0113] Step S207: Determine the service priority corresponding to each regular deployment service based on resource proportion.
[0114] The executing entity can set the service priority corresponding to the service with the largest resource share to the highest. Based on the resource share, the service priority order corresponding to each regular deployment service is determined as follows: 4 / 10 - corresponding service NLP-INV-2, 3 / 10 - corresponding service NLP-DRAFT-2, 2 / 10 - corresponding service NLP-INV-1, 1 / 10 - corresponding service NLP-DRAFT-1.
[0115] Step S208: Determine the remaining resources of each server, and then determine the corresponding server priority based on the remaining resources. For example... Figure 3 As shown, the initial video memory capacity of each server is as follows: Figure 3 As shown in ①, each server has 12G of resources. After deploying services ICR-STAMP-1 and ICR-STAMP-2, the remaining resources on each server are as follows: Figure 3 As shown in ②, they are 7.6G, 7.6G, 12G, and 12G respectively. Figure 3 Each "rectangle" in the diagram represents a server and its corresponding video memory capacity. Therefore, the priority order of the corresponding servers, determined by the remaining resource availability, is: Server G = Server H > (Server E = Server F).
[0116] For example, Figure 4 In the scenario, after services 1, 2, 3, and 4 are deployed on servers A, B, C, and D respectively, the priority of each server, determined based on the remaining resources, is: Server D = Server C > Server B > Server A.
[0117] Step S209: Based on the priority of each service and the priority of each server, deploy each regular deployment service on each server.
[0118] When considering exclusive services, meaning there might be exclusive services deployed on the server corresponding to the highest server priority, and there is only one server corresponding to the highest server priority, specifically, based on the priorities of each service and each server, each normally deployed service is deployed on each server, including:
[0119] The process iterates through the regular deployment services corresponding to each service priority, identifying the regular deployment service corresponding to the highest service priority as the target service. It then determines the target exclusive service corresponding to the target service, and checks whether the target exclusive service is deployed on the server corresponding to the highest server priority. If not, the target service is deployed on the server corresponding to the highest server priority. If it is, the next-level server priority (in this application, the next-level server priority is determined by sorting server priorities, i.e., the server priority following the current highest server priority) is set as the highest server priority, continuing until the target exclusive service is not deployed on the server corresponding to the highest server priority. Finally, the target service is deployed on the server corresponding to the highest server priority. The target service is a service that is mutually exclusive with the target service and the two cannot be deployed on the same server. The next-level service priority corresponding to the highest service priority (in this application, the next-level service priority corresponding to the highest service priority is the next service priority corresponding to the current highest service priority according to the service priority order) is determined as the highest service priority, and then the target service is updated. Then the service deployment on each server is iteratively executed until the last service is deployed, and the service deployment ends (that is, according to the service priority, the already deployed services are removed, and the next regular deployment service in the order of service priority is determined as the target service, and so on, until the last regular deployment service in the order of service priority is reached, and the service deployment ends after the last regular deployment service is deployed).
[0120] When it is determined that there is no corresponding exclusive list for each regular deployment service and there is only one server corresponding to the highest server priority, specifically, based on the priority of each service and the priority of each server, each regular deployment service is deployed on each server, including:
[0121] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0122] The target service is deployed on the server with the highest server priority. The next-level server priority corresponding to the highest server priority is set as the highest server priority. The next-level service priority corresponding to the highest service priority is set as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0123] When there is a highly available deployment, i.e., a service is deployed in two identical copies on two servers, and there may be corresponding exclusive lists, and there is only one or more servers corresponding to the highest server priority, specifically, based on the priority of each service and the priority of each server, the following regular deployment services are deployed on each server, including:
[0124] Iterate through the regular deployment services corresponding to each service priority and determine the regular deployment service corresponding to the service with the highest service priority as the target service;
[0125] Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-lower level server priority as servers to be deployed.
[0126] Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server to be deployed. If not, deploy the target service on each server to be deployed. If so, determine the priority of the next level server corresponding to the highest server priority as the highest server priority, until the target exclusive service is not deployed on the server to be deployed. Then deploy the target service on each server to be deployed.
[0127] The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
[0128] When there is a highly available deployment, i.e., a service is deployed in two identical copies on two servers, and it is determined that there is no corresponding exclusive list, and there is only one or more servers corresponding to the highest server priority, specifically, based on the service priority and the server priority, each regular deployment service is deployed on each server, including:
[0129] Iterate through the regular deployment services corresponding to each service priority, and determine the regular deployment service corresponding to the highest service priority as the target service; determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed; if the number is equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-level server priority of the highest server priority as servers to be deployed; deploy the target service on each server to be deployed, determine the next-level server priority of the highest server priority as the highest server priority, determine the next-level service priority of the highest service priority as the highest service priority, update the target service, and iteratively execute the service deployment on each server until the last service is deployed, and end the service deployment.
[0130] Specifically, the service deployment method also includes: identifying concurrent services in each regular deployment service and deploying each concurrent service on different servers.
[0131] Figure 3 This is a schematic diagram illustrating an application scenario of the service deployment method according to the third embodiment of this application. The service deployment method of this embodiment can be applied to scenarios where AI project services have many AI models, high concurrent requests, but cloud computing resources, GPU resources, and configuration resources are relatively dispersed. Figure 3 As shown in the example, a group of AI model services need to be deployed. The configuration information is simulated and displayed in Table 2 below:
[0132] Table 2
[0133] <![CDATA[Service Name > <![CDATA[Required GPU resources > <![CDATA[NLP-DRAFT ]]> <![CDATA[4.3G ]]> <![CDATA[NLP-INV ]]> <![CDATA[5.6G ]]> <![CDATA[ICR-STAMP ]]> <![CDATA[4.4G ]]> <![CDATA[ICR-TEXT ]]> <![CDATA[3.2G ]]> <![CDATA[MSG-45 ]]> <![CDATA[2.2G ]]> <![CDATA[MSG-46 ]]> <![CDATA[1.3G ]]>
[0134] For example, there are 4 servers, each with 12GB of video memory. Since NLP services often run concurrently, they need to be deployed separately. Because the amount of data transmitted from ICR-TEXT to NLP-INV is relatively large, it needs to be deployed together. Meanwhile, ICR-STAMP, being a multi-GPU deployment, needs to be deployed on server 1 or 2. There are no other special requirements. To ensure high availability, each service needs to be deployed in duplicate, distinguished by the suffixes -1 and -2. For example, NLP-DRAFT-1 and NLP-DRAFT-2.
[0135] Next, the execution entity can perform affinity processing. Service ICR-STAMP needs to be deployed on server 1 or 2. Therefore, the server affinity list for ICR-STAMP (the format of the list is not limited in this application) is: Service ICR-STAMP - Server E - Server F. Service ICR-TEXT transmits a large amount of data to service NLP-INV, so they need to be deployed together. Therefore, the service affinity list for service ICR-TEXT is: Service ICR-TEXT - Service NLP-INV.
[0136] Next, the execution entity can perform exclusive processing. Since NLP services often run concurrently and need to be deployed separately, an NLP bucket group needs to be established. Additionally, exclusive bucket groups also need to be established between the same services. Exclusive bucket groups are as follows: Figure 5 As shown.
[0137] After the affinity and exclusivity processing described above are completed, the executing entity can proceed with the resource maximization process. Specifically, firstly, the graphics card resources of all four servers are 12GB, such as... Figure 3 As shown in ①, the execution entity can first traverse the server affinity list. If it finds that ICR-STAMP has special server requirements, it will prioritize allocating servers from the server affinity list. Simultaneously, during deployment, exclusivity is checked, such as... Figure 3 As shown in ②, the AI services requiring the most GPU resources are NLP-INV-1 and NLP-INV-2 (and to ensure high availability, each service needs to be deployed in duplicate, currently distinguished by the suffixes -1 and -2), totaling 5.6GB. Therefore, server resources E and F are allocated to NLP-INV-1 and NLP-INV-2, as follows. Figure 3 As shown in ③. After allocation, the executing entity determines the service ICR-TEXT that needs to be deployed based on the affinity list. Then, while simultaneously satisfying exclusivity, ICR-TEXT-1 and ICR-TEXT-2 are allocated respectively, as follows. Figure 3 As shown in ④, after the execution entity allocates server resources, in response to the absence of a detected server affinity list, it reverts to deploying services NLP-DRAFT-1 and NLP-DRAFT-2 based on GPU resource allocation, as follows. Figure 3 As shown in ⑤. Then, in response to the absence of detected affinity lists and exclusive buckets or bucket groups, the executing entity performs a full resource allocation deployment of services MSG-45-1, MSG-45-2, MSG-46-1, and MSG-46-2, ultimately resulting in a service deployment based on the maximum GPU resource allocation, as shown in Figure ⑤. Figure 3 As shown in ⑥. Figure 3 In the middle, the number below each rectangular bar (e.g.) Figure 3In section ②, the 7.6G below the rectangular bar corresponding to server E represents the remaining GPU resources of server E. The meanings of the numbers below the rectangles corresponding to the other servers are similar and will not be repeated here.
[0138] Specifically, when the implementing entity deploys services entirely on a resource-based basis, it shall follow the following: Figure 4 The server resource allocation method shown is an example of an orchestration service consisting of 10 services across 4 servers. Each server's GPU resources are represented by thin rectangular bars, and the GPU resources required by each service are represented by thick rectangular bars. The resources required by each service are ordered from 1 to 10. When the resources on the 4 servers are initially used, they all have the same amount of GPU resources remaining. At this point, services 1, 2, 3, and 4 are deployed on the 4 servers respectively. At the start of the second round, the server containing service 4 has the most remaining GPU resources, so service 5 is deployed on the server containing service 4, and so on. In the third round, the servers containing services 3 and 6 have more remaining GPU resources. Therefore, service 9 is orchestrated on the servers containing services 3 and 6, and finally, service 10 is deployed on the servers containing services 4 and 5. Ultimately, the 10 services are deployed across the 4 AI servers, achieving the most balanced distribution of GPU resources among the AI services and maximizing the overall orchestration efficiency. Achieving a balanced distribution of resources across servers is crucial to maximizing the performance of the AI services, improving efficiency, and reducing response time.
[0139] This application embodiment records a specific method for AI service deployment through affinity and exclusivity configuration information. Affinity is divided into two types: server affinity and service affinity. Server affinity has the highest priority and is traversed before each service deployment to satisfy specific server orchestration. After each orchestration, related service affinity is traversed, with higher priority than GPU memory resource orchestration. Exclusivity is service exclusivity, confirmed before each service orchestration. Affinity and exclusivity methods are combined with resource maximization process handling. Priority for the next orchestrated service is provided by prioritizing each service and sorting the remaining server resources. Affinity, exclusivity, and maximization process orchestration methods are specified by developers at the business layer based on business conditions and concurrency methods. A specific method for AI service deployment is implemented through affinity and exclusivity configuration. Based on business needs and high availability, stress testing and affinity / exclusivity placement are performed on each AI service. The specificity of the orchestration is confirmed, ensuring business concurrency and high availability, and guaranteeing the normal operation of the business. This approach utilizes a resource-maximizing process combined with affinity and exclusivity in its AI service orchestration methodology. This allows for the reallocation of GPU memory resources while meeting specific business needs, ultimately achieving a uniform distribution of GPU memory resources and preventing concurrent blocking or congestion.
[0140] Figure 6 This is a schematic diagram of the main units of a service deployment apparatus according to an embodiment of this application. Figure 6 As shown, the service deployment device includes a receiving unit 601, a target server determination unit 602, and a service deployment unit 603.
[0141] The receiving unit 601 is configured to receive service deployment requests, determine the corresponding special deployment requirement services, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list.
[0142] The target server determination unit 602 is configured to determine the corresponding exclusive service based on the service exclusivity list and to determine the target server based on the server affinity list.
[0143] Service deployment unit 603 is configured to determine whether an exclusive service is deployed on the target server. If so, it returns a request failure; otherwise, it deploys the special deployment requirement service on the target server. Then, based on the service affinity list, it determines the corresponding affinity and service and deploys the affinity and service on the target server.
[0144] In some embodiments, the service deployment unit 603 is further configured to: determine the resource ratio of the server resources required for each regular deployment service corresponding to the service deployment request; determine the service priority of each regular deployment service based on the resource ratio; determine the remaining resource amount of each server, and then determine the corresponding server priority based on the remaining resource amount; and deploy each regular deployment service on each server based on the service priority and the server priority.
[0145] In some embodiments, the service deployment unit 603 is further configured to: traverse the regular deployment services corresponding to each service priority, determine the regular deployment service corresponding to the highest service priority as the target service; determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server corresponding to the highest server priority; if not, deploy the target service on the server corresponding to the highest server priority; if so, determine the next-level server priority corresponding to the highest server priority as the highest server priority, until no target exclusive service is deployed on the server corresponding to the highest server priority, then deploy the target service on the server corresponding to the highest server priority; determine the next-level service priority corresponding to the highest service priority as the highest service priority, then update the target service, and then iteratively execute the service deployment on each server until the last service deployment is completed, and end the service deployment.
[0146] In some embodiments, the service deployment unit 603 is further configured to: traverse the regular deployment services corresponding to each service priority, determine the regular deployment service corresponding to the highest service priority as the target service; deploy the target service on the server corresponding to the highest server priority, determine the next-level server priority corresponding to the highest server priority as the highest server priority, determine the next-level service priority corresponding to the highest service priority as the highest service priority, and then update the target service, iteratively execute the service deployment on each server until the last service deployment is completed, and end the service deployment.
[0147] In some embodiments, the service deployment unit 603 is further configured to: traverse the regular deployment services corresponding to each service priority, and determine the regular deployment service corresponding to the highest service priority as the target service; determine the number of servers corresponding to the highest server priority, and in response to the number being greater than 1, randomly select 2 servers corresponding to the highest server priority as servers to be deployed; in response to the number being equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-level server priority corresponding to the highest server priority as servers to be deployed; determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server to be deployed; if not, deploy the target service on each server to be deployed; if so, determine the next-level server priority corresponding to the highest server priority as the highest server priority, until no target exclusive service is deployed on the server to be deployed, and then deploy the target service on each server to be deployed; determine the next-level service priority corresponding to the highest service priority as the highest service priority, and then update the target service, and then iteratively execute the service deployment on each server until the last service deployment is completed, and end the service deployment.
[0148] In some embodiments, the service deployment unit 603 is further configured to: traverse the regular deployment services corresponding to each service priority, and determine the regular deployment service corresponding to the highest service priority as the target service; determine the number of servers corresponding to the highest server priority, and in response to the number being greater than 1, randomly select 2 servers corresponding to the highest server priority as servers to be deployed; in response to the number being equal to 1, determine the server corresponding to the highest server priority and the server corresponding to the next-level server priority of the highest server priority as servers to be deployed; deploy the target service on each server to be deployed, determine the next-level server priority corresponding to the highest server priority as the highest server priority, determine the next-level service priority corresponding to the highest service priority as the highest service priority, and then update the target service, and then iteratively execute the service deployment on each server until the last service deployment is completed, and end the service deployment.
[0149] In some embodiments, the service deployment unit 603 is further configured to: determine the concurrent services in each conventional deployment service, and deploy each concurrent service on a different server.
[0150] It should be noted that the service deployment method and service deployment device in this application are related in terms of specific implementation content, so repeated content will not be described again.
[0151] Figure 7 An exemplary system architecture 700 is shown that can be applied to the service deployment method or service deployment apparatus of the embodiments of this application.
[0152] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, and 703, a network 704, and a server 705. Network 704 serves as the medium for providing communication links between terminal devices 701, 702, and 703 and server 705. Network 704 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0153] Users can use terminal devices 701, 702, and 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0154] Terminal devices 701, 702, and 703 can be various electronic devices with service deployment and processing screens that support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0155] Server 705 can be a server providing various services, such as a backend management server supporting service deployment requests submitted by users using terminal devices 701, 702, and 703 (this is just an example). The backend management server can receive service deployment requests, determine the corresponding special deployment requirement service, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list. Based on the service exclusivity list, it determines the corresponding exclusive service and the target server based on the server affinity list. It checks whether the exclusive service is deployed on the target server; if so, it returns a request failure; otherwise, it deploys the special deployment requirement service on the target server. Then, based on the service affinity list, it determines the corresponding affinity and service and deploys them on the target server. By deploying services with special deployment requirements on each server according to server affinity, service affinity, and service exclusivity, it ensures high concurrency and availability of services, guarantees normal service operation, and improves the utilization of GPU server resources.
[0156] It should be noted that the service deployment method provided in this application embodiment is generally executed by server 705, and correspondingly, the service deployment device is generally set in server 705.
[0157] It should be understood that Figure 7 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0158] The following is for reference. Figure 8 It shows a schematic diagram of the structure of a computer system 800 suitable for implementing a terminal device according to the embodiments of this application. Figure 8 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0159] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the computer system 800. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0160] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0161] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs the functions defined above in the system of this application.
[0162] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0164] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including a receiving unit, a target server determining unit, and a service deployment unit. The names of these units do not necessarily limit the specific unit itself.
[0165] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device receives a service deployment request, determines the corresponding special deployment requirement service, and then obtains the corresponding server affinity list, service affinity list, and service exclusivity list; determines the corresponding exclusive service based on the service exclusivity list, and determines the target server based on the server affinity list; determines whether an exclusive service is deployed on the target server; if so, returns a request failure; otherwise, deploys the special deployment requirement service on the target server, and then determines the corresponding affinity and service based on the service affinity list, and deploys the affinity and service on the target server.
[0166] The computer program product of this application includes a computer program that, when executed by a processor, implements the service deployment method in the embodiments of this application.
[0167] According to the technical solution of this application embodiment, by deploying services with special deployment requirements on each server based on server affinity, service affinity and service exclusivity, the high concurrency and high availability of services are guaranteed, and the normal operation of services is guaranteed while improving the utilization rate of GPU server resources.
[0168] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A service deployment method, characterized in that, include: Receive service deployment requests, determine the corresponding special deployment requirement services, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list; among them, special deployment requirement services are services that have server affinity requirements, service affinity requirements, and service exclusivity requirements. The corresponding exclusive service is determined based on the service exclusivity list, and the target server is determined based on the server affinity list. Determine whether the exclusive service is deployed on the target server. If so, return a request failure. Otherwise, deploy the special deployment requirement service on the target server. Then, determine the corresponding affinity service based on the service affinity list and deploy the affinity service on the target server. Determine the resource proportion of each regular deployment service required for the service deployment request; wherein, services without special deployment requirements are defined as regular deployment services. Based on the resource proportions, the service priority corresponding to each of the conventional deployment services is determined; Determine the remaining resources of each server, and then determine the corresponding server priority based on the remaining resources; Based on the service priorities and server priorities, the regular deployment services are deployed on each server, including: traversing the regular deployment services corresponding to each service priority, and determining the regular deployment service corresponding to the highest service priority as the target service; determining the target exclusive service corresponding to the target service, and then determining whether the target exclusive service is deployed on the server corresponding to the highest server priority; if not, deploying the target service on the server corresponding to the highest server priority; if so, determining the next-level server priority corresponding to the highest server priority as the highest server priority, until the target exclusive service is not deployed on the server corresponding to the highest server priority, and then deploying the target service on the server corresponding to the highest server priority; determining the next-level service priority corresponding to the highest service priority as the highest service priority, and then updating the target service; and then iteratively executing the service deployment on each server until the last service deployment is completed, and ending the service deployment.
2. The method according to claim 1, characterized in that, The deployment of each of the conventional deployment services on each server based on the service priority and the server priority includes: Iterate through the regular deployment services corresponding to each of the service priorities, and determine the regular deployment service corresponding to the service with the highest service priority as the target service; The target service is deployed on the server corresponding to the highest server priority. The next-level server priority corresponding to the highest server priority is determined as the highest server priority. The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated. The service deployment on each server is iteratively executed until the last service deployment is completed, and the service deployment ends.
3. The method according to claim 1, characterized in that, The deployment of each of the conventional deployment services on each server based on the service priority and the server priority includes: Iterate through the regular deployment services corresponding to each of the service priorities, and determine the regular deployment service corresponding to the service with the highest service priority as the target service; Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the servers corresponding to the highest server priority and the servers corresponding to the next-level server priority of the highest server priority as servers to be deployed. Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server to be deployed. If not, deploy the target service on each of the servers to be deployed. If yes, determine the next level server priority corresponding to the maximum server priority as the maximum server priority, until the target exclusive service is not deployed on the server to be deployed, and then deploy the target service on each of the servers to be deployed. The next-level service priority corresponding to the highest service priority is determined as the highest service priority, and then the target service is updated. Then, the service deployment on each server is iteratively executed until the last service deployment is completed, and the service deployment ends.
4. The method according to claim 1, characterized in that, The deployment of each of the conventional deployment services on each server based on the service priority and the server priority includes: Iterate through the regular deployment services corresponding to each of the service priorities, and determine the regular deployment service corresponding to the service with the highest service priority as the target service; Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the servers corresponding to the highest server priority and the servers corresponding to the next-level server priority of the highest server priority as servers to be deployed. The target service is deployed on each of the servers to be deployed. The next-level server priority corresponding to the highest server priority is determined as the highest server priority. The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated. The service deployment on each server is then iteratively executed until the last service is deployed and the service deployment ends.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Identify the concurrent services in each of the regular deployment services, and deploy each of the concurrent services on different servers.
6. A service deployment apparatus, characterized in that, include: The receiving unit is configured to receive service deployment requests, determine the corresponding special deployment requirement services, and then obtain the corresponding server affinity list, service affinity list, and service exclusivity list; wherein, the special deployment requirement services are services that have server affinity requirements, service affinity requirements, and service exclusivity requirements. The target server determination unit is configured to determine the corresponding exclusive service based on the service exclusivity list and to determine the target server based on the server affinity list. The service deployment unit is configured to determine whether the exclusive service is deployed on the target server. If so, it returns a request failure; otherwise, it deploys the special deployment requirement service on the target server. Then, it determines the corresponding affinity service based on the service affinity list and deploys the affinity service on the target server. The service deployment unit is further configured to: determine the resource proportion of server resources required for each regular deployment service corresponding to the service deployment request; wherein services without special deployment requirements are identified as regular deployment services; determine the service priority of each regular deployment service based on the resource proportion; determine the remaining resource amount of each server, and then determine the corresponding server priority based on the remaining resource amount; deploy each regular deployment service on each server based on each service priority and each server priority, including: traversing the regular deployment services corresponding to each service priority, identifying the regular deployment service corresponding to the highest service priority as the target service; and determining the target exclusive service corresponding to the target service. The system then determines whether the target exclusive service is deployed on the server corresponding to the highest server priority. If not, the target service is deployed on the server corresponding to the highest server priority. If it is, the next-level server priority corresponding to the highest server priority is set as the highest server priority. This process continues until the target exclusive service is not deployed on the server corresponding to the highest server priority. In this case, the target service is deployed on the server corresponding to the highest server priority. The next-level service priority corresponding to the highest service priority is set as the highest service priority. The target service is then updated, and the service deployment on each server is iteratively executed until the last service is deployed, at which point the service deployment ends.
7. The apparatus according to claim 6, characterized in that, The service deployment unit is further configured to: Iterate through the regular deployment services corresponding to each of the service priorities, and determine the regular deployment service corresponding to the service with the highest service priority as the target service; The target service is deployed on the server corresponding to the highest server priority. The next-level server priority corresponding to the highest server priority is determined as the highest server priority. The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated. The service deployment on each server is iteratively executed until the last service deployment is completed, and the service deployment ends.
8. The apparatus according to claim 6, characterized in that, The service deployment unit is further configured to: Iterate through the regular deployment services corresponding to each of the service priorities, and determine the regular deployment service corresponding to the service with the highest service priority as the target service; Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the servers corresponding to the highest server priority and the servers corresponding to the next-level server priority of the highest server priority as servers to be deployed. Determine the target exclusive service corresponding to the target service, and then determine whether the target exclusive service is deployed on the server to be deployed. If not, deploy the target service on each of the servers to be deployed. If yes, determine the next level server priority corresponding to the maximum server priority as the maximum server priority, until the target exclusive service is not deployed on the server to be deployed, and then deploy the target service on each of the servers to be deployed. The next-level service priority corresponding to the highest service priority is determined as the highest service priority, and then the target service is updated. Then, the service deployment on each server is iteratively executed until the last service deployment is completed, and the service deployment ends.
9. The apparatus according to claim 6, characterized in that, The service deployment unit is further configured to: Iterate through the regular deployment services corresponding to each of the service priorities, and determine the regular deployment service corresponding to the service with the highest service priority as the target service; Determine the number of servers corresponding to the highest server priority. If the number is greater than 1, select any 2 servers corresponding to the highest server priority as servers to be deployed. If the number is equal to 1, determine the servers corresponding to the highest server priority and the servers corresponding to the next-level server priority of the highest server priority as servers to be deployed. The target service is deployed on each of the servers to be deployed. The next-level server priority corresponding to the highest server priority is determined as the highest server priority. The next-level service priority corresponding to the highest service priority is determined as the highest service priority. The target service is then updated. The service deployment on each server is then iteratively executed until the last service is deployed and the service deployment ends.
10. A service deployment electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-5.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Balanced deployment method and device for virtual network function
CN108228310A
Application container management method and device, and equipment
CN112379971A