Calculation service method and device, equipment, storage medium and program product
By using empty containers to pre-allocate resources when the computing service starts, the problems of heterogeneous container production failure and data pre-processing computing power waste are solved, realizing closed-loop resource pre-allocation and improving the stability and efficiency of computing services.
Patent Information
- Application Number
- CN202410581142.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2025-11-11
AI Technical Summary
In existing technologies, the business computing processes of artificial intelligence models suffer from problems such as heterogeneous container production failures and wasted computing power in data preprocessing, leading to increased computing costs and low efficiency.
By creating an empty container to pre-allocate resources when the computing service starts, directly calling the empty container to load the computing program after the data preprocessing is completed, and restoring it to an empty container after the computing program finishes execution, a closed-loop pre-allocation of resources is achieved.
It improves the stability and efficiency of business computing, avoids additional computing costs, and ensures container production efficiency and effective resource utilization.
Smart Images

Figure CN120929236A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to a computing service method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the widespread application of artificial intelligence in various fields, artificial intelligence models are applied to various fields. However, the business calculation process of artificial intelligence models is relatively long, and there is data preprocessing before heterogeneous computing power is executed. After the preprocessing is completed, the scheduling and generation of heterogeneous containers, the binning calculation program and the data dependent on the calculation are executed, and finally the heterogeneous computing is executed.
[0003] In related technologies, for the above-mentioned business computing process, there is a tendency for heterogeneous container production failures and wasted computing power in data preprocessing. The traditional approach is to increase the buffer resources of the resource pool to improve the fault tolerance, throughput and scalability of the computing process. When resources such as containers fail to be produced, other resources can be scheduled in a timely manner to continue to execute computing tasks.
[0004] However, the above methods will increase business computing costs, make it difficult to promote the service, and simply increasing buffer resources is still not enough to guarantee the scheduling and generation efficiency of containers. Overall, the computing service has low efficiency and poor promotion. Summary of the Invention
[0005] This application provides a computing service method, apparatus, device, storage medium, and program product capable of computing service performance. The technical solution is as follows.
[0006] On the one hand, a computing service method is provided, the method comprising:
[0007] In response to receiving a computing power service request, an empty load container is created. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service.
[0008] During the execution of the i-th computing power service, the empty load container is obtained as the first container associated with the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer.
[0009] The data processing of the i-th computing power service is performed by running the computing program loaded in the first container;
[0010] In response to the completion of the calculation program, the first container is restored to the empty load container by clearing the calculation program in the first container.
[0011] On the other hand, a computing service apparatus is provided, the apparatus comprising:
[0012] A creation module is used to create an empty load container in response to a received computing power service request. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service.
[0013] The acquisition module is used to acquire the empty load container as a first container associated with the i-th computing power service during the execution of the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer.
[0014] The processing module is used to execute the data processing of the i-th computing power service by running the computing program loaded in the first container;
[0015] The processing module is further configured to, in response to the completion of the calculation program, restore the first container to the empty load container by clearing the calculation program in the first container.
[0016] In some embodiments, the creation module is further configured to:
[0017] Receive the computing power service request;
[0018] Based on the computing power service request, obtain the resource information corresponding to the computing power service, and the resource information is used to indicate the hardware computing resources required to execute the computing power service;
[0019] Based on the resource information, a service device matching the resource information is determined, and the service device is used to perform the computing power service;
[0020] In the service device, an empty load container is created to pre-occupy the hardware computing resources indicated by the resource information.
[0021] In some embodiments, the creation module is further configured to:
[0022] The empty load container is created in the service device based on the resource information;
[0023] The resource status of the occupied hardware computing resources is detected through the empty load container;
[0024] The resource status is used to determine the occupancy of the hardware computing resources by the unloaded container.
[0025] In some embodiments, the creation module is further configured to:
[0026] The matching between the configuration data of the hardware computing resources and the resource information is detected through the empty load container;
[0027] The hardware performance of the hardware computing resources is detected through the empty load container;
[0028] The communication status between multiple hardware computing resources is detected through the empty load container;
[0029] The resource status is determined based on the matching results, the hardware performance, and the communication status.
[0030] In some embodiments, the creation module is further configured to:
[0031] In response to the resource status being in a normal state, it is determined that the empty load container has successfully occupied the hardware computing resources. The normal state is used to indicate that the configuration data matches the resource information, the hardware performance is normal, and the communication status is normal.
[0032] In response to the resource status being in an abnormal state, the empty load container is recreated in the server device based on the resource information. The abnormal state is used to indicate at least one of the following: the configuration data does not match the resource information, the hardware performance is abnormal, and the communication status is abnormal.
[0033] In some embodiments, the processing module is further configured to:
[0034] Obtain the image file, which is a preset container configuration file;
[0035] A computing image of the i-th computing power service is constructed based on the image file, and the computing image is used to receive read and write operations based on the i-th computing power service;
[0036] Based on the computing image, the computing program corresponding to the i-th computing power service is loaded into the first container.
[0037] In some embodiments, the processing module is further configured to:
[0038] The package address corresponding to the computing program is added to the first container by an add operation based on the computing image. The package address is used to instruct the first container to load the computing program.
[0039] In some embodiments, the processing module is further configured to:
[0040] In response to the completion of the computation program, the package address is deleted through a pruning operation based on the computation image, and the first container is updated to the empty load container.
[0041] In some embodiments, the processing module is further configured to:
[0042] The first data corresponding to the i-th computing power service is preprocessed, and the first data is used to participate in the data calculation process corresponding to the i-th computing power service.
[0043] In some embodiments, the processing module is further configured to:
[0044] The first data is adjusted by data cleaning operations to obtain first data that meets the preset data quality requirements;
[0045] The data format of the first data is adjusted by serialization to obtain the first data that conforms to the preset data structure.
[0046] In some embodiments, the processing module is further configured to:
[0047] When the empty load container matches the resource information corresponding to the (i+1)th computing power service, during the execution of the (i+1)th computing power service, the empty load container is reused as a second container associated with the (i+1)th computing power service, and the second container is used to run the computing program corresponding to the (i+1)th computing power service.
[0048] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the computing service method as described in any of the embodiments of this application above.
[0049] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the computing service method as described in any of the embodiments of this application above.
[0050] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the computing service methods described in the above embodiments.
[0051] The beneficial effects of the technical solutions provided in this application include at least the following:
[0052] By pre-allocating resources using an empty container when the computing service starts, and then directly calling the empty container to load the computing program and build the computing container after the data pre-processing is completed, the production efficiency of the container after the data pre-processing is completed can be guaranteed. This avoids the situation where heterogeneous container production fails after the data pre-processing is completed, resulting in wasted computing power in the data pre-processing, thus improving the stability of business computing. After the computing program finishes executing, the computing container is restored to an empty container to continue to implement the resource pre-allocation function, so that the computing service can reuse the empty container in the future. This realizes a closed-loop resource pre-allocation based on the empty container, which not only ensures the stability of business computing, but also avoids additional computing costs and improves the efficiency of computing services. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application;
[0055] Figure 2 This is a flowchart of a computing service method provided in an exemplary embodiment of this application;
[0056] Figure 3 This is a schematic diagram of heterogeneous computing power services provided by an exemplary embodiment of this application;
[0057] Figure 4 This is a flowchart of a container creation method provided in an exemplary embodiment of this application;
[0058] Figure 5 This is a schematic diagram of a computing service architecture provided in an exemplary embodiment of this application;
[0059] Figure 6 This is a schematic diagram of container testing logic provided in an exemplary embodiment of this application;
[0060] Figure 7 This is a flowchart of a program loading method provided in an exemplary embodiment of this application;
[0061] Figure 8 This is a schematic diagram of a container update process provided in an exemplary embodiment of this application;
[0062] Figure 9 This is a flowchart of a preprocessing data method provided in an exemplary embodiment of this application;
[0063] Figure 10 This is a schematic diagram of the closed-loop pre-occupancy process of a heterogeneous computing power container provided in an exemplary embodiment of this application;
[0064] Figure 11 This is a structural block diagram of a computing service apparatus provided in an exemplary embodiment of this application;
[0065] Figure 12 This is a structural block diagram of a terminal provided in an exemplary embodiment of this application. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0067] It should be understood that although the terms first, second, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, a first parameter may also be referred to as a second parameter without departing from the scope of this disclosure, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0068] First, a brief introduction to the terms used in the embodiments of this application will be given.
[0069] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0070] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, pre-trained model technology, operating / interactive systems, and mechatronics. Among these, pre-trained models, also known as large-scale models or foundational models, can be widely applied to downstream tasks across various AI fields after fine-tuning. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0071] Kubernetes (K8s) is a portable, scalable, open-source platform for managing containerized workloads and services, facilitating declarative configuration and automation. K8s deploys applications through containers, each isolated from the others, with its own file system. Processes within containers do not interfere with each other, and computing resources are differentiated. Containers enable rapid deployment, and because they are decoupled from the underlying infrastructure and machine file system, migration between different clouds and operating system versions is possible. K8s provides better management of applications on cloud platforms.
[0072] Pod: A core concept in Kubernetes, it is the basic unit in the Kubernetes object model. A Pod represents a running instance of an application; it is a collection of closely related containers (usually one) that share storage and network resources and run in the same context.
[0073] A node is a computing unit in Kubernetes used to host running Pods and containers. A Node provides the runtime environment for containers, including necessary computing resources such as a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Field-Programmable Gate Array (FPGA), memory, and storage media. A Node is the host for a Pod; the Kubernetes scheduler schedules Pods onto appropriate Nodes based on resource requirements and scheduling policies.
[0074] Heterogeneous computing is a computing paradigm that uses different types of computing resources to work together to solve computational problems. In this paradigm, various dedicated hardware accelerators, such as GPUs, FPGAs, digital signal processors (DSPs), and custom application-specific integrated circuits (ASICs), work together with the CPU to improve computational efficiency and performance.
[0075] For AI model business computation processes, the process is typically lengthy and involves data preprocessing before heterogeneous computing power executes the computation. After preprocessing, the heterogeneous containers are scheduled and generated, the computation program is packed, and the computational dependencies are processed. Finally, heterogeneous computation is performed. This process is prone to heterogeneous container production failures and wasted computing power from data preprocessing. Traditional methods improve fault tolerance, throughput, and scalability by increasing the buffer resources in the resource pool. When container or other resource production fails, other resources can be scheduled to continue the computation task. However, this approach increases business computation costs, hinders service rollout, and simply increasing buffer resources is insufficient to guarantee container scheduling and generation efficiency. Overall, the computational service is inefficient and has poor scalability.
[0076] The computing service method provided in this application embodiment uses an empty container to pre-allocate resources when the computing service starts. This allows the empty container to be directly invoked to load the computing program and build the computing container after the data pre-processing is completed. This ensures the container production efficiency after the data pre-processing is completed and avoids the situation where heterogeneous container production fails after the data pre-processing is completed, resulting in wasted computing power for data pre-processing, thus improving the stability of business computing. After the computing program finishes executing, the computing container is restored to an empty container to continue to implement the resource pre-allocation function, so that the computing service can reuse the empty container in the future. This realizes a closed-loop resource pre-allocation based on the empty container, which avoids additional computing costs while ensuring the stability of business computing and improving the efficiency of computing services.
[0077] First, the implementation environment of this application will be introduced. Please refer to... Figure 1 The diagram illustrates an implementation environment provided by an exemplary embodiment of this application, which includes a terminal 110.
[0078] The terminal 110 is equipped with an artificial intelligence model. Optionally, the artificial intelligence model can be any model required by the business functions of the terminal 110, such as an advertising recommendation model, a video recommendation model, or a game AI model.
[0079] Terminal 110 can provide computing services for the data training and other business computing processes of the above-mentioned artificial intelligence model through the computing service method provided in the embodiments of this application.
[0080] Indicatively, assume that terminal 110 obtains a computing power service request based on the business needs of the artificial intelligence model. This computing power service request is used to start the computing power service. In response to the computing power service request, terminal 110 creates an empty load container. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service. During the execution of the i-th computing power service, the empty load container is obtained as the first container associated with the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer. The data operation process of the i-th computing power service is executed by running the computing program loaded in the first container. In response to the completion of the computing program execution, the first container is restored to an empty load container by clearing the computing program in the first container.
[0081] By pre-allocating resources using an empty container when the computing service starts, the empty container can be directly used as the computing container for the i-th computing service after the data pre-processing for the i-th computing service, loading and running the corresponding computing program. This ensures the efficiency of container invocation after data pre-processing. After the computing program for the i-th computing service finishes execution, the corresponding computing container is restored to an empty container for reuse in subsequent computing services. For example, the empty container can be reused as the computing container during the execution of the (i+1)-th computing service to load and run the corresponding computing program. This achieves closed-loop resource allocation based on the empty container, ensuring the stability of the computing service, avoiding the waste of computing resources in data pre-processing, improving the efficiency of the computing service, and avoiding additional computing costs.
[0082] In some embodiments, the above implementation environment also includes a server 120 and a communication network 130.
[0083] Terminal 110 is the business side requesting computing services, and server 120 is the backend server providing computing services to the business side. Data transmission between terminal 110 and server 120 can be performed through communication network 130.
[0084] In some embodiments, an artificial intelligence model is deployed in the terminal 110, and the server 120 can provide computing services for business processes such as data training of the artificial intelligence model through the computing service method provided in the embodiments of this application.
[0085] Indicatively, in response to receiving a computing power service request from terminal 110, server 120 creates an empty load container. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service. During the execution of the i-th computing power service, the empty load container is obtained as the first container associated with the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer. The data operation process of the i-th computing power service is executed by running the computing program loaded in the first container. In response to the completion of the computing program, the first container is restored to an empty load container by clearing the computing program in the first container.
[0086] The aforementioned terminal is optional and can be a desktop computer, laptop computer, mobile phone, tablet computer, e-book reader, Moving Picture Experts Group Audio Layer III (MP3) player, Moving Picture Experts Group Audio Layer IV (MP4) player, smart TV, smart vehicle, and other types of terminal devices. This application embodiment does not limit the specific terminal device to these types.
[0087] It is worth noting that the aforementioned servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0088] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to achieve data computing, storage, processing, and sharing.
[0089] In some embodiments, the server described above can also be implemented as a node in a blockchain system.
[0090] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant regions. For example, the training data involved in this application was obtained with full authorization.
[0091] To further explain, this application can display a prompt interface, pop-up window, or output voice prompts before and during the collection of user-related data (e.g., training data involved in this application). These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This ensures that the application only begins executing the steps related to acquiring user-related data after receiving confirmation from the user regarding the prompt interface or pop-up window; otherwise (i.e., without receiving confirmation from the user), the steps to acquire user-related data end, meaning no user-related data is acquired. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant regions.
[0092] This is illustrative; please refer to it. Figure 2 This document illustrates a flowchart of a computing service method provided in an exemplary embodiment of this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment uses the execution of the method by a server as an example for illustration. Figure 2 As shown, the method includes the following steps:
[0093] Step 210: In response to receiving a computing power service request, create an empty load container.
[0094] An empty container is used to pre-occupy hardware computing resources, while a computing power service request is used to request the start of a computing power service.
[0095] Computing power services refer to the computing services provided by servers to the business side.
[0096] In some embodiments, a computing power service request is used to request the initiation of at least one computing power service, which may be executed sequentially or synchronously in parallel.
[0097] Computing power service requests can be submitted manually by the user requesting the service, or they can be automatically triggered by the business side based on preset business process requirements.
[0098] The aforementioned pre-defined business process requirements include, but are not limited to, data computing needs for business processes such as model training, big data processing, cloud game rendering, and multimedia processing. Taking model training as an example, computing power service requests can be used to request data computing services for training models such as advertising recommendation models, video recommendation models, and game AI models.
[0099] An empty container is a container instance created in container technology, but the container instance does not run any actual application or carry any load; that is, the application is not loaded or running.
[0100] When an empty container is created, it will still consume some resources even if no application or service is running inside the container. The hardware computing resources pre-occupied by the empty container include, but are not limited to, storage resources, memory resources, network resources, process resources, and kernel resources.
[0101] Specifically, because containers need to store their image files and runtime data, even if the container is empty, it will still occupy some disk space to store these files; containers allocate some memory resources when they start up, and this memory is reserved even if no program is running, so that it is not used by other processes; containers may allocate network ports, and these ports are reserved even if there is no actual network communication, so as to prevent other containers or processes from using them; containers achieve resource isolation through features such as naming controls and control groups in the operating system kernel, and these features consume some kernel resources.
[0102] Optionally, the container used in the embodiments of this application is a heterogeneous container.
[0103] By creating an empty container when the computing service starts, resource isolation and reservation can be achieved. Thus, after the data preprocessing corresponding to the computing service is completed, the empty container can be directly used as the computing container of the computing service to perform data computation. This changes the traditional computing business process and avoids problems such as business process stagnation caused by container creation failure when creating computing containers after data preprocessing. It improves container scheduling efficiency and thus ensures the stability and efficiency of the computing service.
[0104] Step 220: During the execution of the i-th computing power service, an empty load container is obtained as the first container associated with the i-th computing power service.
[0105] The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer.
[0106] The computing power service request can be used to request the start of at least one computing power service. Optionally, the at least one computing power service can be executed in batches synchronously and in parallel, or it can be executed sequentially. This application does not limit this.
[0107] For the execution process of each computing power service, after the data preprocessing corresponding to the computing power service is completed, an empty load container can be directly obtained as the first container associated with the computing power service, that is, as the computing container of the computing power service, used to load and run the computing program corresponding to the computing power service.
[0108] In some embodiments, before obtaining the empty load container as the first container associated with the i-th computing power service, a data preprocessing process for the i-th computing power service is also included.
[0109] This is an illustration of the preprocessing of the first data corresponding to the i-th computing power service, where the first data is used to participate in the data computation process corresponding to the i-th computing power service.
[0110] The aforementioned preprocessing of the first data includes, but is not limited to, at least one of data cleaning and serialization. For example, the first data is adjusted through data cleaning operations to obtain first data that meets preset data quality requirements, and the data format of the first data is adjusted through serialization operations to obtain first data that meets preset data structure.
[0111] In some embodiments, after obtaining the empty load container as the first container associated with the i-th computing power service, the process further includes a loading process of the computing program to update the empty load container into a computing container.
[0112] Indicatively, the loading process includes: obtaining an image file, which is a preset container configuration file; constructing a computing image of the i-th computing service based on the image file; the computing image being used to receive read and write operations based on the i-th computing service; and loading the computing program corresponding to the i-th computing service into the first container based on the computing image.
[0113] Specifically, the package address corresponding to the computing program can be added to the first container through an append operation based on the computing image. This package address is used to instruct the first container to load the computing program.
[0114] Step 230: Execute the data processing of the i-th computing power service by running the computing program loaded in the first container.
[0115] The above data processing procedure is used to perform data calculations corresponding to computing power services, such as model training calculations.
[0116] To illustrate, taking a computing power service request for the computing power service corresponding to the model training of an artificial intelligence model as an example, in response to receiving the computing power service request, an empty load container is created to pre-allocate resources, and the pre-processing process of the i-th computing power service is executed to obtain the first data required by the i-th computing power service in the training calculation. During the execution of the i-th computing power service, the empty load container is obtained as the first container associated with the i-th computing power service, the calculation program corresponding to the i-th computing power service is loaded into the first container, and the calculation program loaded in the first container is run to execute the training calculation process of the i-th computing power service.
[0117] Optionally, after completing the above training calculation process, the first container is restored to an empty load container by clearing the calculation program in the first container so that the subsequent computing power service can reuse the empty load container.
[0118] Step 240: In response to the completion of the computation program, the first container is restored to an empty load container by clearing the computation program in the first container.
[0119] As an illustration, in response to the completion of the computation program, the package address corresponding to the computation program can be deleted through a cut operation based on the computation image, and the first container can be updated to an empty load container.
[0120] After the container is restored to an empty container, the empty container can implement resource pre-emption function so that subsequent computing power services can directly reuse the empty container.
[0121] Schematic, after restoring the first container corresponding to the i-th computing power service to an empty load container, if the empty load container matches the resource information corresponding to the (i+1)-th computing power service, during the execution of the (i+1)-th computing power service, the empty load container is reused as a second container associated with the (i+1)-th computing power service. The second container serves as the computing container for the (i+1)-th computing power service, used to load and run the computing program corresponding to the (i+1)-th computing power service.
[0122] By clearing the computing program and restoring the first container to an empty container, the empty container can continue to reserve resources for subsequent computing services, achieving closed-loop resource reservation. Subsequent computing services can reuse the empty container without adding additional computing resources, thereby saving computing costs while ensuring container scheduling efficiency and computing service stability.
[0123] This is illustrative; please refer to it. Figure 3 , Figure 3 This is a schematic diagram of heterogeneous computing power services provided in an exemplary embodiment of this application, such as... Figure 3As shown, taking the model training computation business process as an example, the product layer 310 deploys artificial intelligence models such as advertising models, video recommendation models, and game AI models, while the service layer 320 deploys computing power containers to provide heterogeneous computing power container services for the product layer 310. In the process of providing services, the service layer 320 implements the heterogeneous computing power closed-loop pre-occupancy process 301. In this process, the service layer 320 starts business computation, creates an empty load container to pre-occupy resources, and performs data pre-processing for business computation. After the data pre-processing is completed, the empty load container is updated to a computing container. This computing container can include multiple pods for running computing programs. After the heterogeneous computation is completed through the computing container, the computing container is restored to an empty load container. For subsequent business computations, the empty load container can be reused to repeat the above business computation process, realizing closed-loop resource pre-occupancy based on heterogeneous containers.
[0124] In summary, the method provided in this application, by using an empty container to pre-allocate resources when the computing service starts, and directly calling the empty container to load the computing program and build the computing container after the data pre-processing is completed, can ensure the container production efficiency after the data pre-processing is completed, avoid the situation where heterogeneous container production fails after the data pre-processing is completed, resulting in the waste of computing power for data pre-processing, and improve the stability of business computing. After the computing program finishes executing, the computing container is restored to an empty container to continue to implement the resource pre-allocation function, so that the computing service can reuse the empty container in the future. This realizes a closed-loop resource pre-allocation based on the empty container, which not only ensures the stability of business computing, but also avoids additional computing costs and improves the efficiency of computing services.
[0125] In some embodiments, it is necessary to create an empty load container based on the resource information corresponding to the computing power service and pre-allocate the corresponding hardware computing resources. Please refer to [reference needed]. Figure 4 This document illustrates a flowchart of a container creation method provided in an exemplary embodiment of this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment uses server execution as an example for illustration. Figure 4 As shown, step 210 above includes the following steps:
[0126] Step 211: Receive computing power service request.
[0127] This computing power service request is used to request the startup of the computing power service.
[0128] Computing power service requests can be submitted manually by the user requesting the service, or they can be automatically triggered by the business side based on preset business process requirements.
[0129] The aforementioned pre-defined business process requirements include, but are not limited to, data computing needs for business processes such as model training, big data processing, cloud game rendering, and multimedia processing. Taking model training as an example, computing power service requests can be used to request data computing services for training models such as advertising recommendation models, video recommendation models, and game AI models.
[0130] Step 212: Obtain resource information corresponding to the computing power service based on the computing power service request. The resource information is used to indicate the hardware computing resources required to execute the computing power service.
[0131] In some embodiments, the computing power service request is used to indicate the resource information corresponding to the computing power service.
[0132] Optionally, the computing power service request may include the aforementioned resource information, or the computing power service request may include a correspondence between computing power services and resource information, thereby determining the resource information corresponding to the computing power service based on the correspondence.
[0133] Resource information can be used to indicate the type, quantity, and configuration of hardware computing resources required for computing power services.
[0134] Indicatively, resource information can be used to indicate resource requirements such as the type, quantity, and specifications of heterogeneous cards needed for computing services. A heterogeneous card is an integrated circuit card that contains various types of computing or processing units that differ in architecture, function, or performance. These units can perform multiple computing tasks on a single hardware platform, fully utilizing the advantages of different processing units to improve overall performance and efficiency, thus achieving heterogeneous computing.
[0135] Step 213: Determine the service device that matches the resource information based on the resource information. The service device is used to perform computing power services.
[0136] In some embodiments, multiple service devices are pre-configured, each with different hardware computing resources. The service device that matches the hardware computing resources required for the computing power service can be determined through resource information, thereby creating an empty load container in the service device to occupy the corresponding hardware computing resources.
[0137] Optionally, the aforementioned multiple service devices may also be configured with the same hardware computing resources. Based on the currently available hardware computing resources of the service devices, a service device matching the resource information can be determined from among the multiple service devices, and the corresponding computing power service can be executed using the hardware computing resources indicated by the resource information in the service device.
[0138] Optionally, the aforementioned service device can be any pre-set device for performing computing services, such as a terminal, server, or computing unit. In this embodiment, the service device is referred to as a node.
[0139] To illustrate, taking heterogeneous computing as an example, a computing power service request carries information about the required number and specifications of heterogeneous cards. Based on this information, corresponding node nodes are scheduled and matched. Placeholder containers are then created on the matched node nodes to achieve open-loop allocation of the heterogeneous cards. An empty container can be a simple container that reads and collects information about the heterogeneous cards. The purpose of executing commands on the heterogeneous cards through this empty container is to pre-detect the status of the heterogeneous cards. If the heterogeneous card status is abnormal, a failure is returned, and a re-scheduling and allocation operation is performed. If the heterogeneous card status is normal, a success is returned.
[0140] Step 214: Create hardware computing resources in the service device that indicate the pre-occupancy resource information of the idle load container.
[0141] In illustrative terms, a computing power service request is used to request the startup of multiple computing power services corresponding to a first quantity. The service device matched according to the computing power service request supports batch synchronous processing of multiple computing power services corresponding to a second quantity. If the first quantity is greater than the second quantity, multiple empty load containers corresponding to the second quantity can be created in batches in the service device, thereby batch synchronously processing multiple computing power services corresponding to the second quantity. This ensures that the number of empty load containers in the service device is not too large, which would lead to excessive idle resources and waste of resources, and also improves the efficiency of parallel processing.
[0142] This is illustrative; please refer to it. Figure 5 , Figure 5 This is a schematic diagram of a computing service architecture provided in an exemplary embodiment of this application, such as... Figure 5As shown, the process sequentially executes the following stages: initial task startup phase 510, open-loop pre-occupancy phase 520, pre-processing phase 530, closed-loop packing phase 540, and container recovery phase 550. In the initial task startup phase 510, the task is started. Specifically, the user's task submission method is either manual or triggered by automated processes; the choice depends on the business scenario's process architecture. After the task starts, this solution executes an open-loop pre-occupancy strategy, creating an empty container in the open-loop pre-occupancy phase 520. The task carries information about the required number and specifications of heterogeneous cards. Based on this information, corresponding node nodes are scheduled and matched, and placeholder containers are produced on the matched node nodes to achieve open-loop occupancy of heterogeneous cards. The empty container can be a simple container that reads and collects heterogeneous card information. The purpose is to pre-detect the status of heterogeneous cards through the execution of heterogeneous card commands via the empty container. If the heterogeneous card status is abnormal, a failure is returned, and a re-scheduling and occupancy operation is performed. If the heterogeneous card status is normal... After the empty container is placed, the business's computation task will execute the training data and perform pre-processing operations before computation. Pre-processing mainly involves cleaning abnormal and erroneous data, and serializing the data format to ensure the training data meets the specifications required for output to the model computation program. The time spent on pre-processing depends on the scale of the data being processed. Typically, in advertising scenarios, since the processed data is primarily incremental, the process can be completed within minutes. After the pre-processing stage 530, the closed-loop binning stage 540 is executed. The model training container is incrementally inserted into the open-loop pre-placed container, for example, inserting a computation container into the empty container (i.e., the placeholder container) to perform training computation. After the training computation of this task is completed, the container is returned to an empty container through the container recovery stage 550. When the task initialization startup stage 510 is executed again to start a new task, the heterogeneous card can be reused to perform training computation operations.
[0143] Optionally, step 214 above includes the following three steps:
[0144] The first step is to create an empty load container in the service device based on the resource information.
[0145] This is illustrative of creating heterogeneous cards that indicate the resource usage information of empty load containers based on resource information.
[0146] The second step is to detect the resource status of the hardware computing resources being used by the empty load container.
[0147] This is an illustrative test to see if the heterogeneous card used by the empty load container is functioning correctly.
[0148] Optionally, detecting the resource status of occupied hardware computing resources through an idle container includes, but is not limited to, detecting the matching between configuration data and resource information of hardware computing resources through an idle container; detecting the hardware performance of hardware computing resources through an idle container; detecting the communication status between multiple hardware computing resources through an idle container; and determining the resource status based on the matching, hardware performance, and communication status.
[0149] As an illustration, when testing the matching between the configuration data and resource information of hardware computing resources through an idle load container, it is possible to test whether the configuration of heterogeneous cards, such as type, quantity, and specifications, matches the heterogeneous card configuration indicated by the resource information; when testing the hardware performance of hardware computing resources through an idle load container, it is possible to test whether the performance of heterogeneous cards is normal; when testing the communication status between multiple hardware computing resources through an idle load container, it is possible to test whether the communication between multiple heterogeneous cards is normal.
[0150] The third step is to determine the hardware computing resource usage of the idle container based on the resource status.
[0151] If the resource status is normal, it is confirmed that the empty load container has successfully reserved the corresponding hardware computing resources.
[0152] Specifically, if the resource status is normal, the empty container is determined to have successfully occupied the hardware computing resources; or, if the resource status is abnormal, the empty container is recreated in the server device based on the resource information.
[0153] The normal status indicates that the configuration data matches the resource information, the hardware performance is normal, and the communication status is normal.
[0154] Abnormal status is used to indicate at least one of the following: mismatch between configuration data and resource information, abnormal hardware performance, or abnormal communication status.
[0155] This is illustrative; please refer to it. Figure 6 , Figure 6 This is a schematic diagram of container testing logic provided in an exemplary embodiment of this application, such as... Figure 6 As shown, after creating the empty load container, heterogeneous card test 610 is executed. If heterogeneous card test 610 returns an exception, the container is re-triggered (i.e., the empty load container is recreated). If heterogeneous card test 610 returns normally, the process continues. In heterogeneous card status test 610, tests 1 to 3 are executed, including testing the basic information of the heterogeneous card, testing the performance of the heterogeneous card, and testing the communication between multiple heterogeneous cards. The test commands present a stepped iteration; subsequent test cases are executed only after a test is successful; otherwise, if an exception is returned, the node is re-triggered, and the empty load container is recreated.
[0156] In summary, the method provided in this application provides a method for creating an empty load container based on a computing service request. This method can directly create an empty load container that conforms to the resource information according to the request when the computing service starts, thereby achieving resource pre-occupancy. Since the hardware computing resources pre-occupied by the empty load container conform to the resource information corresponding to the computing service, the container scheduling success rate can be improved when the computing service uses the empty load container to insert the computing program to execute the data computing process, thus ensuring the stability of the computing service.
[0157] In some embodiments, before running the computation program, it is also necessary to load the corresponding computation program into an empty load container and update the empty load container into a computation container. Please refer to [link to relevant documentation]. Figure 7 This document illustrates a flowchart of a program loading method provided in an exemplary embodiment of this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment uses server execution as an example for illustration. Figure 7 As shown, the following steps are included before step 230 above:
[0158] Step 710: Obtain the image file.
[0159] The image file is a pre-defined container configuration file.
[0160] In container technology, an image is a lightweight, standalone, executable software package that contains everything needed to run an application: code, runtime environment, system tools, system libraries, environment variables, etc.
[0161] An image is a static template that defines the runtime state of a container. A container is a running instance created based on an image. An image can create multiple containers, each of which is an isolated runtime environment.
[0162] Once created, an image's content is immutable. This means the image will not change as the container runs. If updates or modifications to the application are needed, typically a new image must be created or an existing image must be updated.
[0163] Images can be reused in different environments to create multiple containers. This makes application deployment simple and consistent, because as long as the same image is used, the application's runtime environment is guaranteed to be consistent, regardless of the environment.
[0164] Images are typically built using a tiered storage approach, with each tier representing a modification or update to the image. This tiered structure makes image storage and transfer more efficient because only the changed tiers need to be transferred or stored.
[0165] Images typically have a longer lifespan than containers. Containers may be destroyed when the application finishes running or is manually stopped, but images can be stored long-term for the creation of new containers.
[0166] Mirrors enable version control, which helps detect application change history and switch between different versions.
[0167] Step 720: Construct the computing image of the i-th computing power service based on the image file.
[0168] The computing mirror is used to receive read and write operations based on the i-th computing power service.
[0169] Containers run by loading images. By loading a new image, an empty container can be updated into a compute container, for example, by packing an empty container into a business compute image.
[0170] This is an example of adding a computing image for the i-th computing service to the image file.
[0171] Step 730: Load the computing program corresponding to the i-th computing power service into the first container based on the computing image.
[0172] Specifically, the package address corresponding to the computing program can be added to the first container through an append operation based on the computing image. This package address is used to instruct the first container to load the computing program.
[0173] In some embodiments, in response to the completion of the computation program, the package address corresponding to the computation program can be deleted through a cut operation based on the computation image, and the first container can be updated to an empty load container.
[0174] This is illustrative; please refer to it. Figure 8 , Figure 8 This is a schematic diagram of a container update process provided in an exemplary embodiment of this application, such as... Figure 8 As shown, the image update is mainly divided into a closed-loop pre-occupancy process: adding computing container 810 and, after completing the computation, removing computing container 810 and returning it to the empty placeholder container 801 to achieve the reuse of the empty container. This solution recommends using file updates to support image addition (append) and pruning (cut) operations. When performing an append operation, the business training computation file package address is incrementally updated to update the empty container image to a computing image. When performing a cut operation, the training computation link is deleted, and then, based on the new file, the image build operation is performed to update the computing image to an empty container, thus restoring the container to an empty container and achieving closed-loop operation of heterogeneous containers.
[0175] After the container is restored to an empty container, the empty container can implement resource pre-emption function so that subsequent computing power services can directly reuse the empty container.
[0176] Schematic, after restoring the first container corresponding to the i-th computing power service to an empty load container, if the empty load container matches the resource information corresponding to the (i+1)-th computing power service, during the execution of the (i+1)-th computing power service, the empty load container is reused as a second container associated with the (i+1)-th computing power service. The second container serves as the computing container for the (i+1)-th computing power service, used to load and run the computing program corresponding to the (i+1)-th computing power service.
[0177] In summary, the method provided in this application provides a container update method, which provides a basis for resource closed-loop pre-occupancy based on empty load containers. By loading computing programs into empty load containers, quick container calls are realized during computing services. By clearing the computing programs and restoring the container to an empty load container, the empty load container can continue to pre-occupy resources for subsequent computing power services, so as to facilitate the reuse of subsequent computing power services. This enables closed-loop resource pre-occupancy without the need to add other resources, thereby reducing the computing cost of computing power services.
[0178] In some embodiments, before performing data processing, it is necessary to preprocess the data required for the data processing. Please refer to [reference needed]. Figure 9 This document illustrates a flowchart of a preprocessing data processing method provided in an exemplary embodiment of this application. This method can be executed by a terminal, a server, or both simultaneously. This embodiment uses server execution as an example for illustration. Figure 9 As shown, the method includes the following steps:
[0179] Step 910: Perform preprocessing on the first data corresponding to the i-th computing power service.
[0180] The first data is used to participate in the data processing process corresponding to the i-th computing power service.
[0181] The aforementioned preprocessing of the first data includes, but is not limited to, at least one of data cleaning and serialization. For example, the first data is adjusted through data cleaning operations to obtain first data that meets preset data quality requirements, and the data format of the first data is adjusted through serialization operations to obtain first data that meets preset data structure.
[0182] Once the empty load container has been placed, the business's computing tasks will execute training data and perform preprocessing operations before computation.
[0183] The preprocessing operations mainly involve cleaning abnormal and erroneous data, as well as data format serialization operations, with the aim of ensuring that the training data meets the specifications required for output to the model calculation program.
[0184] The time required for preprocessing data depends on the scale of the data being processed. Typically, in advertising scenarios, since the data being processed is mostly incremental, the processing can be completed in minutes.
[0185] Data cleaning refers to checking and processing raw data for errors, inconsistencies, missing values, duplicates, outliers, etc., to ensure data quality and accuracy. This process typically includes: removing duplicates: checking and deleting duplicate records in the dataset to ensure the uniqueness of each data point; handling missing values: processing null or missing values in the data through imputation, deletion, or prediction methods; outlier detection: identifying and processing outliers in the data, possibly through statistical methods or business rules; data type conversion: ensuring that the data type matches the needs of the analysis task, such as converting text to numeric types; and data standardization or normalization: scaling the data to a uniform range to facilitate analysis and model training.
[0186] Serialization is the process of converting data into a storable or transmittable form. It is typically used to transform complex data structures, such as objects, data structures, or arrays, into a stream of bytes. The primary purposes of serialization are: saving data to files, databases, or cloud storage for loading when needed; converting data into a form easily sent and received during network transmission, such as in Application Programming Interface (API) calls, messaging, or distributed systems; and serializing intermediate results or model parameters at a certain stage of the data processing flow for recovery or reuse in subsequent steps.
[0187] Optionally, step 910 can be performed before the empty load container is updated to the computing container corresponding to the computing power service, for example, before step 220, or before step 710.
[0188] In summary, the method provided in this application provides a pre-processing method for data. Through data cleaning and serialization and other data processing operations, it ensures that the data participating in the calculation meets the preset data requirements before the data calculation process is executed, thereby improving the accuracy and efficiency of the calculation and ensuring the computing efficiency of the computing power service.
[0189] Heterogeneous computing is a method that uses different types of processing units (PUs), such as central processing units, graphics processing units, tensor processing units (TPUs), digital signal processors, programmable gate arrays, etc., to solve complex computing tasks.
[0190] In heterogeneous computing systems, there can be one or more different types of processors, such as central processing units, graphics processing units, digital signal processors, floating point units (FPUs), and accelerators. These processors may differ in architecture, instruction set, and computing power, but they can communicate and collaborate in some way to achieve more efficient and faster computing capabilities.
[0191] The advantages of heterogeneous computing include: it can leverage the strengths of different processors to improve the overall computing performance of the system. Different processors have different energy consumption characteristics; heterogeneous computing can distribute tasks to the processor with the lowest energy consumption, thereby saving energy. Using different processors can more effectively utilize system resources, thus reducing the overall cost of the system.
[0192] Applications of heterogeneous computing include, but are not limited to, artificial intelligence and machine learning, graphics and video processing, high-performance computing, the Internet of Things, and edge computing.
[0193] For artificial intelligence and machine learning, heterogeneous computing can distribute computationally intensive tasks across accelerators such as GPUs or TPUs to improve training and inference speed. For graphics and video processing, heterogeneous computing can distribute graphics and video processing tasks across processors such as GPUs or DSPs to improve processing speed and image quality. For high-performance computing, heterogeneous computing can distribute scientific computing tasks across multiple processors to improve computing speed and accuracy. For the Internet of Things (IoT) and edge computing, heterogeneous computing can distribute computing tasks across different edge devices to improve overall system performance and efficiency.
[0194] The computing service method provided in this application embodiment can be applied to heterogeneous computing. Illustratively, in response to receiving a heterogeneous computing service request, an empty load container is created. This empty load container is used to pre-occupy hardware computing resources and pre-process the first data corresponding to the i-th computing service. During the execution of the i-th computing service, the empty load container is acquired as a first heterogeneous container associated with the i-th computing service. This first heterogeneous container is used to load the computing program corresponding to the i-th computing service, where i is a positive integer. The heterogeneous computing process of the i-th computing service is executed by running the computing program loaded in the first heterogeneous container. In response to the completion of the computing program execution, the first heterogeneous container is restored to an empty load container by clearing the computing program in the first heterogeneous container. If the empty load container matches the resource information corresponding to the (i+1)-th computing service, during the execution of the (i+1)-th computing service, the empty load container is reused as a second container associated with the (i+1)-th computing service. This second container serves as the computing container for the (i+1)-th computing service, used to load and run the computing program corresponding to the (i+1)-th computing service.
[0195] This is illustrative; please refer to it. Figure 10 , Figure 10 This is a schematic diagram of a closed-loop pre-occupancy process for a heterogeneous computing power container provided in an exemplary embodiment of this application, as shown below. Figure 10 As shown, when the business triggers the training computation task 1010, when the training task creates a heterogeneous empty load container, it will first execute step 1020 to filter and determine whether the existing empty load container meets the requirements. If the requirements are met and the container status detection is normal, step 1031 can be executed to directly reuse the empty load container; if the requirements are not met, step 1032 is executed to create a new empty load container, and after the creation is completed, step 1040 is executed to determine whether the container status is normal. Once a pre-positioned heterogeneous empty load container is obtained (assuming the container is functioning normally), step 1041 is executed to perform pre-processing of training data. If the container is abnormal, the process returns to step 1032. During the pre-processing of training data, step 1050 is executed repeatedly to determine whether the processing is complete. If the pre-processing is complete, step 1061 is executed to update the content of the image file and build the business computing image. If not, step 1041 is executed continuously. Step 1062 is executed to update the empty load container and insert the computing container. Step 1063 is executed to perform heterogeneous training computing. During the computing process, step 1070 is executed repeatedly to determine the computing status. If the conditions for computing completion are met, step 1080 is executed to destroy and decommission the computing container, and then update it to an empty load container for reuse. Otherwise, the process returns to step 1063.
[0196] In summary, the method provided in this application, by reconstructing the heterogeneous computing power service process, achieves an open-loop pre-allocation of resources for heterogeneous container scheduling to produce idle containers at the start of a computing task, followed by a closed-loop real computing service where the computing program is loaded after data preprocessing, thus ensuring the stability of business computing. This solution does not require additional buffer resources and achieves closed-loop pre-allocation from the perspective of the computing power resource service process, ensuring the stability of long-duration computing services without increasing costs. Closed-loop pre-allocation is a software-locked strategy in the heterogeneous computing power service process. It solves resource shortages caused by non-abnormal issues such as fragmentation through pre-allocation of idle containers, and eliminates the need for cumbersome stability strategies during computing power scheduling. This contributes to architectural simplicity, computing power service stability, and business development efficiency.
[0197] Figure 11 This is a structural block diagram of a computing service apparatus provided in an exemplary embodiment of this application, such as... Figure 11 As shown, the device includes the following parts:
[0198] The creation module 1110 is used to create an empty load container in response to receiving a computing power service request. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service.
[0199] The acquisition module 1120 is used to acquire the empty load container as a first container associated with the i-th computing power service during the execution of the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer.
[0200] Processing module 1130 is used to execute the data processing of the i-th computing power service by running the computing program loaded in the first container;
[0201] The processing module 1130 is further configured to, in response to the completion of the calculation program, restore the first container to the empty load container by clearing the calculation program in the first container.
[0202] In some embodiments, the creation module 1110 is further configured to:
[0203] Receive the computing power service request;
[0204] Based on the computing power service request, obtain the resource information corresponding to the computing power service, and the resource information is used to indicate the hardware computing resources required to execute the computing power service;
[0205] Based on the resource information, a service device matching the resource information is determined, and the service device is used to perform the computing power service;
[0206] In the service device, an empty load container is created to pre-occupy the hardware computing resources indicated by the resource information.
[0207] In some embodiments, the creation module 1110 is further configured to:
[0208] The empty load container is created in the service device based on the resource information;
[0209] The resource status of the occupied hardware computing resources is detected through the empty load container;
[0210] The resource status is used to determine the occupancy of the hardware computing resources by the unloaded container.
[0211] In some embodiments, the creation module 1110 is further configured to:
[0212] The matching between the configuration data of the hardware computing resources and the resource information is detected through the empty load container;
[0213] The hardware performance of the hardware computing resources is detected through the empty load container;
[0214] The communication status between multiple hardware computing resources is detected through the empty load container;
[0215] The resource status is determined based on the matching results, the hardware performance, and the communication status.
[0216] In some embodiments, the creation module 1110 is further configured to:
[0217] In response to the resource status being in a normal state, it is determined that the empty load container has successfully occupied the hardware computing resources. The normal state is used to indicate that the configuration data matches the resource information, the hardware performance is normal, and the communication status is normal.
[0218] In response to the resource status being in an abnormal state, the empty load container is recreated in the server device based on the resource information. The abnormal state is used to indicate at least one of the following: the configuration data does not match the resource information, the hardware performance is abnormal, and the communication status is abnormal.
[0219] In some embodiments, the processing module 1130 is further configured to:
[0220] Obtain the image file, which is a preset container configuration file;
[0221] A computing image of the i-th computing power service is constructed based on the image file, and the computing image is used to receive read and write operations based on the i-th computing power service;
[0222] Based on the computing image, the computing program corresponding to the i-th computing power service is loaded into the first container.
[0223] In some embodiments, the processing module 1130 is further configured to:
[0224] The package address corresponding to the computing program is added to the first container by an add operation based on the computing image. The package address is used to instruct the first container to load the computing program.
[0225] In some embodiments, the processing module 1130 is further configured to:
[0226] In response to the completion of the computation program, the package address is deleted through a pruning operation based on the computation image, and the first container is updated to the empty load container.
[0227] In some embodiments, the processing module 1130 is further configured to:
[0228] The first data corresponding to the i-th computing power service is preprocessed, and the first data is used to participate in the data calculation process corresponding to the i-th computing power service.
[0229] In some embodiments, the processing module 1130 is further configured to:
[0230] The first data is adjusted by data cleaning operations to obtain first data that meets the preset data quality requirements;
[0231] The data format of the first data is adjusted by serialization to obtain the first data that conforms to the preset data structure.
[0232] In some embodiments, the processing module 1130 is further configured to:
[0233] When the empty load container matches the resource information corresponding to the (i+1)th computing power service, during the execution of the (i+1)th computing power service, the empty load container is reused as a second container associated with the (i+1)th computing power service, and the second container is used to run the computing program corresponding to the (i+1)th computing power service.
[0234] In summary, the apparatus provided in this application, by using an empty container to pre-allocate resources when the computing service starts, and directly calling the empty container to load the computing program and construct the computing container after the data pre-processing is completed, can ensure the container production efficiency after the data pre-processing is completed, avoid the situation where heterogeneous container production fails after the data pre-processing is completed, resulting in the waste of computing power for data pre-processing, and improve the stability of business computing. After the computing program finishes executing, the computing container is restored to an empty container to continue to implement the resource pre-allocation function, so that the computing service can reuse the empty container in the future. This realizes a closed-loop resource pre-allocation based on the empty container, which not only ensures the stability of business computing, but also avoids additional computing costs and improves the efficiency of computing services.
[0235] It should be noted that the computing service device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0236] Figure 12 This illustration shows a structural block diagram of a terminal 1200 provided in an exemplary embodiment of this application. The terminal 1200 may be a smartphone, tablet computer, MP3 player, MP4 player, laptop computer, or desktop computer. The terminal 1200 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0237] Typically, terminal 1200 includes a processor 1201 and a memory 1202.
[0238] Processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1201 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). Processor 1201 may also include a main processor and a coprocessor. The main processor, also known as a central processing unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1201 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1201 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.
[0239] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1202 are used to store at least one instruction, which is executed by the processor 1201 to implement the computing service method provided in the method embodiments of this application.
[0240] In some embodiments, the terminal 1200 also includes other components, as those skilled in the art will understand. Figure 12 The structure shown does not constitute a limitation on terminal 1200 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0241] Embodiments of this application also provide a computer device that can be implemented as follows: Figure 1 The terminal or server shown. The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement the computing service methods provided in the above-described method embodiments.
[0242] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the computing service methods provided in the above-described method embodiments.
[0243] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the computing service methods provided in the above-described method embodiments.
[0244] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0245] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0246] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A computing service method, characterized in that, The method includes: In response to receiving a computing power service request, an empty load container is created. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service. During the execution of the i-th computing power service, the empty load container is obtained as the first container associated with the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer. The data processing of the i-th computing power service is performed by running the computing program loaded in the first container; In response to the completion of the calculation program, the first container is restored to the empty load container by clearing the calculation program in the first container.
2. The method according to claim 1, characterized in that, The step of creating an empty load container in response to receiving a computing power service request includes: Receive the computing power service request; Based on the computing power service request, obtain the resource information corresponding to the computing power service, and the resource information is used to indicate the hardware computing resources required to execute the computing power service; Based on the resource information, a service device matching the resource information is determined, and the service device is used to perform the computing power service; In the service device, an empty load container is created to pre-occupy the hardware computing resources indicated by the resource information.
3. The method according to claim 2, characterized in that, The step of creating the empty-load container in the service device to pre-occupy the hardware computing resources indicated by the resource information includes: The empty load container is created in the service device based on the resource information; The resource status of the occupied hardware computing resources is detected through the empty load container; The resource status is used to determine the occupancy of the hardware computing resources by the unloaded container.
4. The method according to claim 3, characterized in that, The step of detecting the resource status of the occupied hardware computing resources through the idle container includes: The matching between the configuration data of the hardware computing resources and the resource information is detected through the empty load container; The hardware performance of the hardware computing resources is detected through the empty load container; The communication status between multiple hardware computing resources is detected through the empty load container; The resource status is determined based on the matching results, the hardware performance, and the communication status.
5. The method according to claim 4, characterized in that, Determining the occupancy of hardware computing resources by the idle container based on the resource status includes: In response to the resource status being in a normal state, it is determined that the empty load container has successfully occupied the hardware computing resources. The normal state is used to indicate that the configuration data matches the resource information, the hardware performance is normal, and the communication status is normal. In response to the resource status being in an abnormal state, the empty load container is recreated in the server device based on the resource information. The abnormal state is used to indicate at least one of the following: the configuration data does not match the resource information, the hardware performance is abnormal, and the communication status is abnormal.
6. The method according to any one of claims 1 to 5, characterized in that, Before the data processing of the i-th computing service is performed by running the computing program loaded in the first container, the process further includes: Obtain the image file, which is a preset container configuration file; A computing image of the i-th computing power service is constructed based on the image file, and the computing image is used to receive read and write operations based on the i-th computing power service; Based on the computing image, the computing program corresponding to the i-th computing power service is loaded into the first container.
7. The method according to claim 6, characterized in that, The step of loading the computing program corresponding to the i-th computing power service into the first container based on the computing image includes: The package address corresponding to the computing program is added to the first container by an add operation based on the computing image. The package address is used to instruct the first container to load the computing program.
8. The method according to claim 7, characterized in that, The step of responding to the completion of the calculation program by clearing the calculation program in the first container to restore the first container to the empty container includes: In response to the completion of the computation program, the package address is deleted through a pruning operation based on the computation image, and the first container is updated to the empty load container.
9. The method according to any one of claims 1 to 5, characterized in that, After receiving a computing power service request and creating an empty load container, the response also includes: The first data corresponding to the i-th computing power service is preprocessed, and the first data is used to participate in the data calculation process corresponding to the i-th computing power service.
10. The method according to claim 9, characterized in that, The preprocessing of the first data corresponding to the i-th computing power service includes: The first data is adjusted by data cleaning operations to obtain first data that meets the preset data quality requirements; The data format of the first data is adjusted by serialization to obtain the first data that conforms to the preset data structure.
11. The method according to any one of claims 1 to 5, characterized in that, After the first container is restored to an empty container by clearing the calculation program from the first container upon completion of the calculation program, the method further includes: When the empty load container matches the resource information corresponding to the (i+1)th computing power service, during the execution of the (i+1)th computing power service, the empty load container is reused as a second container associated with the (i+1)th computing power service, and the second container is used to run the computing program corresponding to the (i+1)th computing power service.
12. A computing service device, characterized in that, The device includes: A creation module is used to create an empty load container in response to a received computing power service request. The empty load container is used to pre-occupy hardware computing resources. The computing power service request is used to request the start of the computing power service. The acquisition module is used to acquire the empty load container as a first container associated with the i-th computing power service during the execution of the i-th computing power service. The first container is used to load the computing program corresponding to the i-th computing power service, where i is a positive integer. The processing module is used to execute the data processing of the i-th computing power service by running the computing program loaded in the first container; The processing module is further configured to, in response to the completion of the calculation program, restore the first container to the empty load container by clearing the calculation program in the first container.
13. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the computing service method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The storage medium stores at least one computer program, which is loaded and executed by a processor to implement the computing service method as described in any one of claims 1 to 11.
15. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the computing service method as described in any one of claims 1 to 11.