Model task processing method and device, equipment and medium
By dividing the model task phases in the cloud computing scenario and scheduling them to different virtual machines for processing, the trusted execution environment based on trusted hardware is used to improve the security of task processing, and the security problem of cloud service providers obtaining user data is solved.
Patent Information
- Application Number
- CN202411959462.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-27
AI Technical Summary
In cloud computing scenarios, the user's model task processing is low, and relevant personnel from cloud service providers may obtain the runtime data of the user's container group without authorization, resulting in a threat to security.
By obtaining target model tasks and reinforcement configuration information, the task phase is divided and the task phase to be reinforced is scheduled to a virtual machine in a trusted execution environment based on trusted hardware for processing, and the non-reinforcement task phase is scheduled to other virtual machines for processing, thereby improving the security of task processing.
It effectively improves the security of model task processing, prevents internal attacks from relevant personnel from cloud service providers, and improves the security level of data isolation during operation while ensuring performance.
Smart Images

Figure CN119883512A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a model task processing method, device, equipment and medium. Background Art
[0002] In cloud computing scenarios, cloud service providers of Model as a Service (MaaS) can provide models as services to users. Users hope that the container groups (pods) of their model-related tasks are isolated in the network, computing, and storage dimensions to ensure security. Relevant personnel of the cloud service provider may obtain some runtime data of the Elastic Compute Service Virtual Machine (ECSVM) where the user's container group is located without authorization, thereby obtaining some data for user reasoning or fine-tuning, resulting in low security in the user's model task processing. Related technologies use device-level or process-level trusted execution environments or password obfuscation technologies to solve the above problems, but the effect is not good and needs to be improved. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a model task processing method, device, equipment and medium.
[0004] The present disclosure provides a model task processing method, the method comprising:
[0005] Acquire a target model task and reinforcement configuration information, wherein the target model task includes a plurality of task stages for the target model;
[0006] Determine, according to the reinforcement configuration information, a task stage to be reinforced and a non-reinforced task stage among the multiple task stages;
[0007] Scheduling the task phase to be reinforced to the corresponding first virtual machine for processing, and scheduling the non-reinforced task phase to the corresponding second virtual machine for processing;
[0008] Wherein, the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
[0009] The present disclosure also provides a model task processing device, the device comprising:
[0010] An acquisition module, used for acquiring a target model task and reinforcement configuration information, wherein the target model task includes a plurality of task stages for the target model;
[0011] A determination module, configured to determine a task stage to be reinforced and a task stage not to be reinforced among the multiple task stages according to the reinforcement configuration information;
[0012] A processing module, used for scheduling the task phase to be reinforced to the corresponding first virtual machine for processing, and scheduling the non-reinforced task phase to the corresponding second virtual machine for processing;
[0013] Wherein, the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
[0014] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the model task processing method provided by the embodiment of the present disclosure.
[0015] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the model task processing method provided by the embodiment of the present disclosure.
[0016] Compared with the prior art, the technical solution provided by the embodiment of the present disclosure has the following advantages: the model task processing solution provided by the embodiment of the present disclosure obtains the target model task and the reinforcement configuration information, wherein the target model task includes multiple task stages for the target model, determines the task stage to be reinforced and the non-reinforced task stage in the multiple task stages according to the reinforcement configuration information, schedules the task stage to be reinforced to the corresponding first virtual machine for processing, and schedules the non-reinforced task stage to the corresponding second virtual machine for processing, wherein the first virtual machine is deployed in a trusted execution environment based on trusted hardware. With the above technical solution, the cloud service provider can divide the target model task into multiple task stages, and schedule different task stages to different virtual machines for reinforcement according to the reinforcement configuration information. Since the first virtual machine is deployed in a trusted execution environment based on trusted hardware, the model task processed by the first virtual machine can obtain higher security, effectively improve the security of model task processing, prevent internal attacks by relevant personnel of the cloud service provider, and improve the safety level of data isolation at runtime under the premise of ensuring the impact on performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0018] Figure 1 A flowchart of a model task processing method provided in some embodiments of the present disclosure;
[0019] Figure 2 A flowchart of another model task processing method provided in some embodiments of the present disclosure;
[0020] Figure 3 A schematic diagram of the architecture of a virtual machine deployed based on an executable environment provided in some embodiments of the present disclosure;
[0021] Figure 4 A flowchart of another model task processing method provided in some embodiments of the present disclosure;
[0022] Figure 5 A schematic diagram of the control plane architecture provided for some embodiments of the present disclosure;
[0023] Figure 6 A schematic diagram of the structure of a model task processing device provided in some embodiments of the present disclosure;
[0024] Figure 7 A schematic diagram of the structure of an electronic device provided for some embodiments of the present disclosure. DETAILED DESCRIPTION
[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0027] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0028] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0029] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0030] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0031] In cloud computing scenarios, users can run tasks related to large language models by renting Infrastructure as a Service (IaaS) or Platform as a Service (PaaS). When users obtain Model as a Service from cloud service providers, they hope that the container groups of their model-related tasks are isolated in the network, computing and storage dimensions to ensure security. However, relevant personnel of cloud service providers can enter the container groups of service users to steal data without online authorization. For example, relevant personnel of cloud service providers can use Infrastructure as a Service technology to manipulate the operating system or virtual machine hypervisor to dump some runtime memory of the virtual machines where the container groups of some users are located, and then perform offline analysis to obtain some information about the user's reasoning or fine-tuning of the container group, resulting in low security in the processing of user model tasks.
[0032] In the related technology, one implementation method is to directly place the model task into the device of the trusted execution environment, which is completely dependent on the characteristics of the device. If there is no available device, the workload cannot be placed in it. Another implementation method is to use a process-level trusted execution environment to improve the security of model task processing, which requires the use of an application for porting, is costly, and is not suitable for model task processing. Yet another implementation method is to use cryptographic obfuscation technology to improve the security of model task processing. Specifically, cryptographic methods are used to make it impossible for users of the cloud service provider to identify data running on the Infrastructure as a Service platform, but this method requires users to perform some data conversion on the client, and is not very practical. In summary, the above methods are not effective in improving the security of model task processing and need to be improved.
[0033] In order to solve the above problems, the embodiments of the present disclosure provide a model task processing method, which is introduced below in conjunction with specific embodiments.
[0034] Figure 1 The following is a flow chart of a model task processing method provided by some embodiments of the present disclosure. The method can be executed by a model task processing device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1As shown, the method includes:
[0035] Step 101: Obtain target model tasks and reinforcement configuration information, wherein the target model tasks include multiple task stages for the target model.
[0036] The model task processing method provided in the embodiments of the present disclosure can be applied to a cloud service provider (Cloud Service Provider, CSP). A cloud service provider refers to an entity used to provide cloud services (such as infrastructure as a service or platform as a service) to serve different model suppliers (Vendor). For example, a cloud service provider can undertake the large model of the model supplier and provide reasoning, fine-tuning and other services based on the large model. The large model is also called the Large Language Model (LLM). The large model is a processing model based on natural language. Through the large model, the rules and structure of the language can be automatically learned, the meaning of the language can be understood, and text with correct grammar and semantic coherence can be generated based on the understood meaning. The large model can also generate images based on text, generate videos based on text, and so on. A model supplier refers to an entity that owns a large model and uses a cloud service provider to build its own reasoning-related services.
[0037] A model task refers to a task related to any model issued by a user, such as one or more of a model reasoning task and a model fine-tuning task for a certain model. In the embodiment of the present disclosure, a target model task refers to a task related to a target model, and the target model may be a model that the user needs to perform task processing. A user (client) refers to an entity that runs applications provided by a cloud service provider and a model supplier, has some requirements for the cloud service provider and the model supplier, and can be considered a common customer of the cloud service provider and the model supplier. A model reasoning task refers to the process of using a trained model to predict or classify data. A model fine-tuning task refers to fine-tuning a model using training data to improve its performance on specific tasks.
[0038] Specifically, the target model task includes multiple task stages for the target model, and the specific number is not limited. The task stage refers to different links or tasks that can be split and processed in the life cycle of the model task determined by the cloud service provider through analysis of multiple model tasks.
[0039] Exemplarily, when the target model task is a model training task for the target model, the target model task may include multiple task stages such as a preprocessing stage, an intermediate stage, and a post-processing stage. Among them, the pre-processing stage refers to the preliminary processing and preparation of the input data, such as data cleaning, format conversion, feature extraction, and preprocessing tasks. The intermediate stage mainly performs computing tasks, which are usually the core computing part of the model. The post-processing stage is to further process and integrate the data output by the model, and convert the results into a form that can be finally used or displayed. Specifically, the pre-processing stage is usually performed by a central processing unit (CPU), the intermediate processing stage is usually performed by a graphics processing unit (GPU), and the post-processing stage is usually performed by a central processing unit. Taking the target model task as a model training task as an example, the model training task can be divided into a pre-processing stage of the data set, a training stage of the data set after pre-processing, and an integration stage of the model output data.
[0040] Reinforcement configuration information refers to information configured in advance by the model supplier for the task of the target model based on the reinforcement requirements. Specifically, the cloud service provider can provide a visualization page to the model supplier so that the model supplier can quickly configure. Specifically, the reinforcement configuration information is used to specify the task stage to be reinforced of the target model task using the target configuration dimension. The target configuration dimension refers to a set of key parameters used to describe and define the model task. Specifically, the target configuration dimension can include at least one of the reinforcement level, task stage, model and user.
[0041] Among them, the reinforcement level refers to the protection level pre-configured by the model supplier for the tasks of the target model from the reinforcement level dimension. Different levels correspond to different numbers of task stages to be reinforced. For example, if the reinforcement level is the first level, then none of the task stages of the target model will be reinforced. If the reinforcement level is the second level, then 1 / 3 of the task stages of the target model will be reinforced, and 2 / 3 of the task stages of the target model will not be reinforced. Task stage refers to the reinforcement configuration information that the model supplier specifies from the task stage dimension which task stage needs to be reinforced. For example, if the model supplier specifies task stage A in the target configuration dimension, then task stage A is determined to need to be reinforced. Model refers to the reinforcement configuration information specified by the model supplier from the model dimension. If the model specified by the model supplier in the target configuration dimension is model B, then all model tasks corresponding to model B need to be reinforced. User refers to the reinforcement configuration information specified by the model supplier from the user dimension. If the user specified by the model supplier in the target configuration dimension is user C, then all task stages of the model tasks involved in all models corresponding to user C need to be reinforced. The task stage to be reinforced refers to the task stage in the model task that needs to be reinforced.
[0042] In the disclosed embodiment, the cloud service provider can obtain the target model task issued by the user and the reinforcement configuration information pre-set by the model supplier, and the reinforcement configuration information can be set according to actual business needs.
[0043] Step 102: Determine a task stage to be reinforced and a task stage not to be reinforced among multiple task stages according to the reinforcement configuration information.
[0044] Among them, the task stage to be reinforced refers to the task stage in the model task that needs to be reinforced. Here, reinforcement refers to data isolation at the network, computing, storage and other levels to prevent potential attacks on information in the virtual machine by the host operating system or virtual machine hypervisor. The non-reinforcement stage refers to the task stage in the model task that does not require reinforcement.
[0045] In the disclosed embodiment, the cloud service provider parses the reinforcement configuration information to determine the task phase to be reinforced and the task phase not to be reinforced among the multiple task phases of the target model task.
[0046] For example, Figure 2 A flowchart of another model task processing method provided in some embodiments of the present disclosure is shown as follows: Figure 2 As shown, the above step 102 may include step 201, step 202, and step 203, which specifically include:
[0047] In step 201, when the target configuration dimension is the reinforcement level, the task stages to be reinforced are determined based on the target quantity corresponding to the reinforcement level, and the task stages other than the task stages to be reinforced are determined as non-reinforcement task stages.
[0048] The target number refers to the number of task stages that need to be reinforced in each task stage of the target model task determined based on the reinforcement level.
[0049] In an embodiment of the present disclosure, when the target configuration dimension is the reinforcement level, the cloud service provider can determine the target number based on the reinforcement level, extract the target number of task stages from multiple task stages according to a preset extraction strategy as task stages to be reinforced, and determine the task stages other than the task stages to be reinforced as non-reinforced task stages. The preset extraction strategy here can, for example, be random extraction or extraction in order of the amount of data of the task stages from large to small, etc., and there is no specific limitation. For example, the preset extraction strategy is random extraction. When the target number is half, half of the multiple randomly extracted task stages can be determined as task stages to be reinforced, and the task stages other than the task stages to be reinforced can be determined as non-reinforced task stages.
[0050] In step 202, when the target configuration dimension is a model or a user, when the target model task matches the model or the user, all task stages in the multiple task stages are determined as task stages to be reinforced.
[0051] Specifically, when the target configuration dimension is model, the cloud service provider matches the target model task with the model. If the match is successful, all task stages of the target model task are determined as task stages to be reinforced. When the target configuration dimension is user, the cloud service provider matches the target model task with the user. If the match is successful, all task stages of the target model task are determined as task stages to be reinforced.
[0052] In step 203, when the target configuration dimension is a task stage, the task stage corresponding to the target configuration dimension among the multiple task stages is determined as the task stage to be reinforced, and the task stages other than the task stage to be reinforced are determined as non-reinforced task stages.
[0053] In an embodiment of the present disclosure, when the target configuration dimension is a task stage, the cloud service provider may determine, among multiple task stages of the target model task, the task stage in which the target model pre-configured by the model supplier needs to be reinforced as the task stage to be reinforced, and determine the task stages other than the task stage to be reinforced as the task stage not to be reinforced.
[0054] Step 103: Schedule the task phase to be reinforced to the corresponding first virtual machine for processing, and schedule the non-reinforced task phase to the corresponding second virtual machine for processing; wherein the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
[0055] A virtual machine (VM) can provide an independent operating environment for managing user container groups (User Pod) and service container groups (Service Pod). The above container groups share the same virtual hardware resources in the virtual machine, but maintain their own independence and isolation. The first virtual machine refers to a virtual machine deployed in a trusted execution environment based on trusted hardware, and the specific number is not limited. The second virtual machine refers to a virtual machine not deployed in a trusted execution environment based on trusted hardware, and the specific number is not limited.
[0056] Trusted Execution Environment (TEE) is a secure area of device hardware or software, isolated from the main operating system, providing a trusted environment to execute sensitive or critical code and data. The security in TEE mainly comes from its isolation from the main operating system and hardware protection measures. The first virtual machine is deployed in a trusted execution environment based on trusted hardware. TEE provides a secure execution environment in which the code and data stored and executed are protected. TEE itself is composed of special hardware in the processor, and some security protection mechanisms are used to prevent the outside world from tampering with or stealing the code and data in TEE. In addition, TEE does not allow ordinary applications to access the code and data therein, thereby improving the security of the system. In an embodiment of the present disclosure, the first virtual machine is completely encapsulated in the executable environment, thereby realizing the integration of the first virtual machine and the executable environment, isolating the relevant data in the executable environment, and ensuring the security of the data.
[0057] The trusted execution environment based on trusted hardware provides a secure computing environment through hardware protection mechanisms to prevent potential attacks on information in the virtual machine by the host operating system or virtual machine hypervisor. Specifically, through hardware protection, unauthorized access to the virtual machine memory and page table is restricted to build a secure sandbox environment. For cloud service providers, this technology helps to enhance the security of user data. Figure 3 A schematic diagram of the architecture of a virtual machine deployed based on an executable environment provided in some embodiments of the present disclosure, such as Figure 3 As shown, a hardened virtual machine deployed using a trusted execution environment can be an example of the first virtual machine mentioned above, which protects memory security through strict hardware access control. Only authenticated hardware can access the memory, and the data exists in plain text only when the central processor accesses it. In other cases, it is encrypted, which limits the permissions of the host operating system and the virtual machine hypervisor, so that even if the memory data is exported, its content cannot be read.
[0058] In the disclosed embodiment, after the cloud service provider determines the task stage to be reinforced and the non-reinforced task stage among multiple task stages based on the reinforcement configuration information, the task stage to be reinforced is scheduled to the corresponding first virtual machine for processing, and the non-reinforced task stage is scheduled to the corresponding second virtual machine for processing.
[0059] In an optional implementation, the task stage to be reinforced is scheduled to the corresponding first virtual machine for processing, including: scheduling the first task stage corresponding to the central processor in the task stage to be reinforced to the central processing virtual machine in the first virtual machine for processing, and scheduling the second task stage corresponding to the graphics processor to the graphics processing virtual machine in the first virtual machine for processing.
[0060] The first task stage refers to any task stage in the task stage to be reinforced that needs to be processed using the capabilities of the central processing unit. The central processing virtual machine refers to a virtual machine that has the function of simulating a central processing unit, which is used to provide capabilities similar to those of an actual computer central processing unit. The second task stage refers to any task stage in the task stage to be reinforced that needs to be processed using the capabilities of a graphics processor. The graphics processing virtual machine refers to a virtual machine that has the function of simulating a graphics processor, which is used to provide capabilities similar to those of an actual computer graphics processor.
[0061] The central processing virtual machine in the first virtual machine can achieve hardware isolation by directly deploying the central processing virtual machine in a trusted execution environment based on trusted hardware. The graphics processing virtual machine in the first virtual machine can achieve hardware isolation by directly deploying the graphics processing virtual machine in a trusted execution environment based on trusted hardware. The hardware isolation can also be achieved by connecting the central processing virtual machine in the first virtual machine to the graphics processor. Specifically, the central processing virtual machine in the first virtual machine can not only perform hardware isolation on the central processor and memory, but also isolate peripheral devices such as the graphics processor to ensure that the content entering the graphics processor peripherals is encrypted, which can prevent attacks from peripheral devices. In addition, only authorized or verified graphics processors can be trusted by the graphics processor-based trusted execution environment virtual machine. At this time, the virtual machine that achieves hardware isolation by connecting the central processing virtual machine in the first virtual machine to the graphics processor is no longer a simple central processor-based trusted execution environment virtual machine, but a graphics processor-based trusted execution environment virtual machine.
[0062] In the disclosed embodiment, after the cloud service provider determines the task stage to be reinforced and the non-reinforced task stage among multiple task stages based on the reinforcement configuration information, it determines whether the task stage to be reinforced needs to be processed using the capabilities of the central processing unit or the capabilities of the graphics processing unit, and schedules the first task stage in the task stage to be reinforced that needs to be processed using the capabilities of the central processing unit to the central processing virtual machine in the first virtual machine for processing, and schedules the second task stage in the task stage to be reinforced that needs to be processed using the capabilities of the graphics processor to the graphics processing virtual machine in the first virtual machine for processing.
[0063] Exemplarily, the cloud service provider uses a trusted execution environment based on trusted hardware to schedule multiple task stages of the target model task on demand to different virtual machines deployed in a trusted execution environment based on trusted hardware. For example, taking the target model task as a training task, the training task includes a data preprocessing task stage and a data fine-tuning task stage of the training task. Specifically, the cloud service provider can put the data preprocessing task stage of the training task into the central processing virtual machine in the first virtual machine for processing, and put the data fine-tuning task stage into the graphics processing virtual machine in the first virtual machine for processing. Thus, the cloud service provider can make full use of the advantages of different virtual machines deployed in a trusted execution environment based on trusted hardware, thereby protecting the load of different stages of the target model. It can be seen that the embodiment of the present disclosure can effectively manage different virtual machine resources deployed in a trusted execution environment based on trusted hardware, and can divide the target model task into different task stages according to the needs of the target model task, and then put different task stages into different types of virtual machines deployed in a trusted execution environment based on trusted hardware, thereby improving the data isolation of a certain task stage in the model task at runtime, and then resisting attacks from the infrastructure as a service level.
[0064] In an optional implementation, the non-reinforced task stage is scheduled to the corresponding second virtual machine for processing, including: scheduling the third task stage corresponding to the central processor in the non-reinforced task stage to the central processing virtual machine in the second virtual machine for processing, and scheduling the fourth task stage corresponding to the graphics processor to the graphics processing virtual machine in the second virtual machine for processing.
[0065] Among them, the third task stage refers to any task stage in the non-reinforcement task stage that needs to use the capabilities of the central processing unit for processing, and the fourth task stage refers to any task stage in the non-reinforcement task stage that needs to use the capabilities of the graphics processing unit for processing.
[0066] In the disclosed embodiment, after the cloud service provider determines the task stage to be reinforced and the non-reinforced task stage among multiple task stages based on the reinforcement configuration information, it determines whether the non-reinforced task stage needs to be processed using the capabilities of the central processing unit or the graphics processing unit, and schedules the third task stage in the non-reinforced task stage that needs to be processed using the capabilities of the central processing unit to the central processing virtual machine in the second virtual machine for processing, and schedules the fourth task stage in the non-reinforced task stage that needs to be processed using the capabilities of the graphics processor to the graphics processing virtual machine in the second virtual machine for processing.
[0067] In addition, the task phase to be reinforced and the task phase not to be reinforced are also scheduled according to the virtual machine parameters or virtual machine tags set in the reinforcement configuration information.
[0068] The virtual machine parameters may be configuration parameters of the virtual machine, such as 8 cores, 16 cores, where core refers to the number of cores of the central processing unit, and may also be memory size of the virtual machine, such as 8GB, 16GB, and different virtual machine hypervisors. The virtual machine tag may include the source of the virtual machine, the model of the virtual machine, etc.
[0069] In the disclosed embodiment, the task stage to be reinforced and the non-reinforced task stage are also scheduled according to the virtual machine parameters set in the reinforcement configuration information. Specifically, if the virtual machine parameters set in the reinforcement configuration information are 8GB, the virtual machine corresponding to 8GB is used to process at least one of the multiple task stages of the target model task.
[0070] In another embodiment of the present disclosure, the task stage to be reinforced and the non-reinforced task stage are also scheduled according to the virtual machine label set in the reinforcement configuration information. Specifically, if the virtual machine label set in the reinforcement configuration information is virtual machine D, the virtual machine corresponding to virtual machine D is used to process at least one of the multiple task stages of the target model task.
[0071] In order to prove to the user that the corresponding load is indeed running in a hardware-protected environment, in an optional implementation, the cloud service provider may output a corresponding data processing report through a container component added in the first virtual machine and the second virtual machine, wherein the data processing report carries a corresponding authentication certificate for the content of the first virtual machine.
[0072] Among them, the container component is used to read the task execution record of the task stage in the virtual machine. The data processing report refers to a comprehensive description and record of the data processing process. Specifically, the data processing report includes the task execution records of each task stage of the target model, which can include the various stages of the target model task division, as well as the operations performed in each stage and the access to the service. The authentication certificate refers to a certificate issued by an authoritative organization, which is used to prove that the content of the first virtual machine has a certain qualification credential. The authentication certificate cannot be tampered with and can be verified later. Specifically, the authentication certificate can be decrypted and verified by standard methods to ensure the authenticity of the content of the first virtual machine. Each log in the data processing report can be traced back to a specific hardware device. For example, when using a virtual machine, the number of a specific device can be tracked through the log to verify the source and accuracy of the log. The content of the first virtual machine refers to the execution record of the model task processing process, such as the execution log of the model task processing process.
[0073] In the disclosed embodiment, the cloud service provider can output the corresponding data processing report by adding a container component to the container group in the first virtual machine and the second virtual machine. Specifically, when the container group is started, the container component preferentially reads the data processing result on the virtual machine, and inputs the data processing report, the container group identifier, and the virtual machine identifier into the log service, so that the corresponding data processing report can be queried from the log service based on the container group identifier and the virtual machine identifier to determine whether it is in a trusted execution environment based on trusted hardware.
[0074] The model task processing scheme provided by the embodiment of the present disclosure obtains the target model task and reinforcement configuration information, wherein the target model task includes multiple task stages for the target model, determines the task stage to be reinforced and the non-reinforced task stage in the multiple task stages according to the reinforcement configuration information, schedules the task stage to be reinforced to the corresponding first virtual machine for processing, and schedules the non-reinforced task stage to the corresponding second virtual machine for processing, wherein the first virtual machine is deployed in a trusted execution environment based on trusted hardware. With the above technical scheme, the cloud service provider can divide the target model task into multiple task stages, and schedule different task stages to different virtual machines for reinforcement according to the reinforcement configuration information. Since the first virtual machine is deployed in a trusted execution environment based on trusted hardware, the model task processed by the first virtual machine can obtain higher security, effectively improve the security of model task processing, prevent internal attacks by relevant personnel of the cloud service provider, and improve the safety level of data isolation at runtime while ensuring the impact on performance.
[0075] Figure 4 A flowchart of another model task processing method provided in some embodiments of the present disclosure is as follows: Figure 4 As shown, the method includes:
[0076] First, the user submits the target model task. After the back-end scheduling module receives the target model task, it can perceive the needs of the model supplier, use different dimensions, and specify different parameters to inform the scheduling module of the virtual machines that need to be scheduled at each task stage of the target model task. For example, if the target model task is a training or fine-tuning task, the target configuration dimension can be used to specify which task stage of the target model task needs to be reinforced. For example, at least one of the reinforcement level, task stage, model, and user dimensions can be used to specify which task stage of the target model task needs to be reinforced, so as to select appropriate resources for scheduling.
[0077] According to the selection of the scheduling period, tasks of different task stages can be placed in different virtual machines, such as the reinforced central processing virtual machine, the central processing virtual machine (i.e., the central processing virtual machine of the second virtual machine), the graphics processing virtual machine (i.e., the graphics processing virtual machine of the second virtual machine), and other types of virtual machines, that is, flexible scheduling can be performed for each task stage, and it is not required that multiple task stages of the target model task are placed in the same virtual machine. For example, tasks related to the central processing unit are processed using the reinforced central processing virtual machine, and tasks related to the graphics processor are processed using the graphics processing virtual machine, making the scheduling more fine-grained and reducing costs.
[0078] After the scheduling is completed, the corresponding task stage will be scheduled to the corresponding virtual machine. After the task is completed, a data processing report will be generated for the corresponding task stage. Specifically, for the tasks running in each virtual machine, the data analysis report will provide information to the user, such as which task stages of the target model task are placed in the reinforced central processing virtual machine. The data processing report can be used to carry the corresponding authentication certificate for the content of the reinforced central processing virtual machine to inform the user, further making the user believe in the security of model task processing.
[0079] Figure 5 A schematic diagram of the architecture of a control plane provided in some embodiments of the present disclosure, Figure 5 The hardware in the system includes a central processing unit, a network interface card (NIC), and an accelerator (Accelerated Devices). The network interface card may include a data processing unit (DPU). The accelerator may include a graphics processing unit, a tensor processing unit (TPU), a field programmable gate array (FPGA), and an application specific integrated circuit (ASIC). Figure 5 The storage service in the example may be a cloud storage service implemented based on a cloud server. This embodiment does not limit the specific hardware device for implementing the storage service. The storage service may include one or more databases. Figure 5 As shown, in this embodiment, the control plane model can be used as a model-as-a-service to accept large models from various model suppliers, and then use these large models to provide external services such as reasoning services and fine-tuning services. In essence, model-as-a-service is platform-as-a-service.
[0080] The data plane relies on Infrastructure as a Service. The data plane can have a corresponding software stack, which can be scheduled and deployed as a service container group on the governed cloud server (Elastic Compute Service, ECS) node. In response to the user's scheduling, it will be scheduled accordingly according to the scheduler. Figure 5 There are multiple user container groups and service container groups in the cloud server virtual machine.
[0081] Usually, the tasks related to Model as a Service can be divided into reasoning tasks and training tasks (for example, dynamic fine-tuning tasks), etc. And there are three types of roles in this task: cloud service provider, model provider, and user.
[0082] Specifically, cloud service providers provide cloud services (e.g., infrastructure as a service or platform as a service) to serve entities of different model suppliers. Model suppliers own large models and use cloud service providers to build their own inference tasks and other services. Users are entities that run applications provided by cloud service providers and model suppliers. Users have corresponding isolation requirements for model suppliers and cloud service providers. Specifically, when users obtain models as services from cloud service providers, users hope that the container groups of their model-related tasks are isolated in the network, computing, and storage dimensions to ensure security.
[0083] Figure 6 This is a schematic diagram of the structure of a model task processing device provided in some embodiments of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device. Figure 6 As shown, the device is arranged in a first base station and includes:
[0084] An acquisition module 601 is used to acquire a target model task and reinforcement configuration information, wherein the target model task includes multiple task stages for the target model;
[0085] A determination module 602 is used to determine a task stage to be reinforced and a task stage not to be reinforced among the multiple task stages according to the reinforcement configuration information;
[0086] A processing module 603 is used to schedule the task phase to be reinforced to the corresponding first virtual machine for processing, and schedule the task phase not to be reinforced to the corresponding second virtual machine for processing;
[0087] Wherein, the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
[0088] In an optional implementation, the reinforcement configuration information is used to specify the task stage to be reinforced of the target model task using a target configuration dimension, and the target configuration dimension includes at least one of a reinforcement level, a task stage, a model, and a user.
[0089] In an optional implementation manner, the determination module 602 includes:
[0090] A first determination submodule is used for determining, when the target configuration dimension is a reinforcement level, a task stage to be reinforced based on the target quantity corresponding to the reinforcement level, and determining the task stages other than the task stage to be reinforced as non-reinforcement task stages;
[0091] A second determination submodule is configured to, when the target configuration dimension is a model or a user, determine all of the multiple task stages as task stages to be reinforced when the target model task matches the model or the user;
[0092] The third determination submodule is used to determine the task stage corresponding to the target configuration dimension among the multiple task stages as the task stage to be reinforced when the target configuration dimension is the task stage, and determine the task stages other than the task stage to be reinforced as non-reinforced task stages.
[0093] In an optional implementation, the processing module 603 includes a first scheduling submodule and a second scheduling submodule;
[0094] The first scheduling submodule is used to schedule the task stage to be reinforced to the corresponding first virtual machine for processing;
[0095] The second scheduling submodule is used to schedule the non-hardening task stage to the corresponding second virtual machine for processing.
[0096] In an optional implementation manner, the first scheduling submodule is specifically used to:
[0097] The first task stage corresponding to the central processor in the task stage to be reinforced is scheduled to the central processing virtual machine in the first virtual machine for processing, and the second task stage corresponding to the graphics processor is scheduled to the graphics processing virtual machine in the first virtual machine for processing.
[0098] In an optional implementation manner, the second scheduling submodule is specifically used to:
[0099] The third task stage corresponding to the central processor in the non-reinforced task stage is scheduled to the central processing virtual machine in the second virtual machine for processing, and the fourth task stage corresponding to the graphics processor is scheduled to the graphics processing virtual machine in the second virtual machine for processing.
[0100] In an optional implementation, the task phase to be reinforced and the non-reinforced task phase are also scheduled according to virtual machine parameters or virtual machine tags set in the reinforcement configuration information.
[0101] In an optional implementation, the device further includes:
[0102] The output module is used to output a corresponding data processing report through the container components added in the first virtual machine and the second virtual machine, wherein the data processing report carries a corresponding authentication certificate for the content of the first virtual machine.
[0103] The model task processing device provided in the embodiments of the present disclosure can execute the model task processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0104] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the model task processing method provided by any embodiment of the present disclosure.
[0105] Figure 7 A schematic diagram of the structure of an electronic device provided for some embodiments of the present disclosure.
[0106] The following specific reference Figure 7 , which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure. The electronic device 700 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0107] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0108] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0109] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the model task processing method of the embodiment of the present disclosure are executed.
[0110] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0111] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0112] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0113] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a target model task and reinforcement configuration information, wherein the target model task includes multiple task stages for the target model; determines a task stage to be reinforced and a non-reinforced task stage among the multiple task stages according to the reinforcement configuration information; schedules the task stage to be reinforced to a corresponding first virtual machine for processing, and schedules the non-reinforced task stage to a corresponding second virtual machine for processing; wherein the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
[0114] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0117] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0118] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0120] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0121] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0122] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A model task processing method, characterized in that: include: Acquire a target model task and reinforcement configuration information, wherein the target model task includes a plurality of task stages for the target model; Determine, according to the reinforcement configuration information, a task stage to be reinforced and a non-reinforced task stage among the multiple task stages; Scheduling the task phase to be reinforced to the corresponding first virtual machine for processing, and scheduling the non-reinforced task phase to the corresponding second virtual machine for processing; Wherein, the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
2. The method according to claim 1, characterized in that The reinforcement configuration information is used to specify the task stage to be reinforced of the target model task by adopting a target configuration dimension, and the target configuration dimension includes at least one of a reinforcement level, a task stage, a model, and a user.
3. The method according to claim 2, characterized in that Determining the task phase to be reinforced and the task phase not to be reinforced among the multiple task phases according to the reinforcement configuration information includes: When the target configuration dimension is a reinforcement level, determining a task stage to be reinforced based on the target quantity corresponding to the reinforcement level, and determining the task stages other than the task stage to be reinforced as non-reinforcement task stages; When the target configuration dimension is a model or a user, when the target model task matches the model or the user, all task stages in the multiple task stages are determined as task stages to be reinforced; When the target configuration dimension is a task stage, the task stage corresponding to the target configuration dimension among the multiple task stages is determined as the task stage to be reinforced, and the task stages other than the task stage to be reinforced are determined as non-reinforced task stages.
4. The method according to claim 1, characterized in that Scheduling the task phase to be reinforced to the corresponding first virtual machine for processing includes: The first task stage corresponding to the central processor in the task stage to be reinforced is scheduled to the central processing virtual machine in the first virtual machine for processing, and the second task stage corresponding to the graphics processor is scheduled to the graphics processing virtual machine in the first virtual machine for processing.
5. The method according to claim 1, characterized in that Scheduling the non-reinforcement task phase to a corresponding second virtual machine for processing includes: The third task stage corresponding to the central processor in the non-reinforced task stage is scheduled to the central processing virtual machine in the second virtual machine for processing, and the fourth task stage corresponding to the graphics processor is scheduled to the graphics processing virtual machine in the second virtual machine for processing.
6. The method according to claim 1, characterized in that The task phase to be reinforced and the non-reinforced task phase are also scheduled according to the virtual machine parameters or virtual machine tags set in the reinforcement configuration information.
7. The method according to claim 1, characterized in that The method further comprises: The corresponding data processing report is outputted through the container components added in the first virtual machine and the second virtual machine, wherein the data processing report carries the corresponding authentication certificate for the content of the first virtual machine.
8. A model task processing device, characterized in that: include: An acquisition module, used for acquiring a target model task and reinforcement configuration information, wherein the target model task includes a plurality of task stages for the target model; A determination module, configured to determine a task stage to be reinforced and a task stage not to be reinforced among the multiple task stages according to the reinforcement configuration information; A processing module, used for scheduling the task phase to be reinforced to the corresponding first virtual machine for processing, and scheduling the non-reinforced task phase to the corresponding second virtual machine for processing; Wherein, the first virtual machine is deployed in a trusted execution environment based on trusted hardware.
9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the model task processing method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the model task processing method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method, device and equipment and computer readable storage medium
CN113761513A
Secure execution of multiple processor devices using trusted execution environment
CN115859269A
Model protection method and related product
CN116305090A
Programmable data processing method and system based on trusted execution environment
CN116992458A
Data processing method and device, readable medium and electronic equipment
CN117061105A
Cited By
Deployment methods, devices, media, equipment, and program products for large model services
CN122569965A