Information processing method and apparatus
Patent Information
- Application Number
- CN202611309199.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-10-27
AI Technical Summary
[0008]在另一种情形下,本文还提供了一种计算机程序产品,包括计算机程序,该计算机程序在被处理器执行时实现如本文中任一所述的信息处理方法。
Smart Images

Figure CN122985277A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer processing technology, and in particular to an information processing method and apparatus. Background Technology
[0002] With the rapid development of large model technology, task processing based on intelligent systems is becoming more and more widespread, and the requirements for task processing security are becoming increasingly stringent. Summary of the Invention
[0003] This invention provides an information processing method and apparatus that enables lifecycle management of a trusted environment when performing tasks within that environment.
[0004] In one scenario, this paper provides an information processing method, which includes: Receive a first request and obtain a first identifier, the first request being from a first tenant, the first request being used to indicate at least a first task to be performed by the intelligent system, and the first identifier indicating the instance type for performing the first task; Based on the first identifier, instance information is obtained, and the instance information indicates the acquisition of a first instance; Based on the instance information and the first request, obtain the first instance; The first task is executed based on the first instance.
[0005] In one instance, this document also provides an information processing apparatus comprising: A first module is configured to receive a first request and obtain a first identifier, the first request being from a first tenant, the first request being used to indicate at least a first task to be performed by an intelligent system, and the first identifier indicating the instance type for performing the first task; The second module is used to obtain instance information based on the first identifier, wherein the instance information indicates the acquisition of the first instance; The third module is used to obtain the first instance based on the instance information and the first request; The fourth module is used to execute the first task based on the first instance.
[0006] In one instance, this document also provides an electronic device comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the information processing method as described herein.
[0007] In one instance, this document also provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform the information processing methods described herein.
[0008] In another instance, this document also provides a computer program product, including a computer program that, when executed by a processor, implements the information processing method as described herein.
[0009] This paper sets different instance information for long-term and short-term processing tasks to match a suitable first instance when a first request is received. Based on this, and using the instance information corresponding to the first instance, the entire lifecycle of the first instance is managed during its execution. This solves the problem of lacking lifecycle management of the trusted environment when executing intelligent system tasks in a trusted environment, achieving the effect of lifecycle management of the trusted environment when executing tasks in a trusted environment. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments described herein will become more apparent when taken in conjunction with the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote 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.
[0011] Figure 1 This is a schematic diagram of the structure of an information processing system under one scenario. Figure 2 This is a flowchart illustrating an information processing method under one specific scenario. Figure 3 This is a schematic diagram of the overall process for processing the first task based on a trusted environment in one scenario; Figure 4 This is a flowchart illustrating an information processing method in another scenario. Figure 5 This is a flowchart illustrating the process of handling short-term processing tasks in a trusted environment under one scenario. Figure 6 This is a diagram illustrating the renewal management of the first instance under one scenario; Figure 7 This is a flowchart illustrating the process of stopping the first instance in one scenario. Figure 8 This is a flowchart illustrating the process of starting or restoring the first instance under one scenario. Figure 9 This is a flowchart illustrating the self-healing and survival process for the first instance of a long-running task in one scenario. Figure 10 This is a flowchart illustrating an information processing method in another scenario. Figure 11 This is a system architecture diagram of an instance pool corresponding to a short-term processing task in one scenario. Figure 12 This is a flowchart illustrating the process of retrieving the first instance corresponding to the first request in one scenario. Figure 13 This is a flowchart illustrating the process of isolating and reusing the first instance in one scenario. Figure 14 This is a flowchart illustrating an information processing method in another scenario. Figure 15 This is a flowchart illustrating the process of water level management for a second instance pool under another scenario. Figure 16 This is a flowchart illustrating the process of performing instance inspection on the second instance pool under another scenario. Figure 17 This is a schematic diagram of the structure of an information processing device under one scenario. Figure 18 This is a schematic diagram of the structure of an electronic device used in one scenario. Detailed Implementation
[0012] The embodiments will now be described in more detail with reference to the accompanying drawings. While some embodiments are shown in the drawings, it should be understood that the technical solutions can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the technical solutions herein. It should be understood that the illustrated drawings and embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the technical solutions.
[0013] It should be understood that the steps described in the method implementation may be performed in different orders and / or in parallel. Furthermore, the method implementation may include additional steps and / or omit the steps shown. The scope of this document is not limited in this respect.
[0014] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one situation" means "at least one situation"; the term "another situation" means "at least one additional situation"; the term "some situations" means "at least some situations". Definitions of other terms will be given in the following description.
[0015] It should be noted that the concepts of "first" and "second" mentioned are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions performed by these devices, modules or units or their interdependencies.
[0016] It should be noted that the terms "one" and "more" used in this document are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0017] The names of messages or information exchanged between multiple devices in this document are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this document, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this document in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as electronic devices, applications, servers, or storage media, that perform the operations described herein, based on the prompt message.
[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understood that the above notification and user authorization process is merely illustrative and does not constitute a limitation on the implementation method described in this article. Other methods that comply with relevant laws and regulations may also be applied to the implementation method described in this article.
[0022] It is understood that the data involved in the technical solutions in this article (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0023] Before introducing the information processing method, we can first illustrate the application scenario. This approach can be applied to any scenario that requires task processing based on a trusted environment. Optionally, in task processing scenarios based on intelligent systems, when processing tasks related to intelligent agents, these tasks can be executed within a trusted environment to ensure the data security and reliability of the tasks.
[0024] In some cases, the provided solution can be applied to Figure 1The information processing system shown may include a client 101 and a server 102. The client 101 may include, but is not limited to, web applications such as browsers, applications (Apps), HyperText Markup Language (HTML) applications, lightweight applications (also known as mini-programs), or cloud applications. The client 101 may be deployed on an electronic device and relies on the operation of that device or certain applications on the device to implement its functions. The electronic device may be, for example, a device with a display screen that supports information browsing, such as a smartphone, tablet, personal computer, or other client terminal. For ease of understanding, Figure 1 The client is primarily represented in the form of a device. Other types of applications can also be configured on the electronic device, such as media content publishing applications, session applications, etc. Server 102 can be one or more servers providing various services. That is, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; furthermore, it can be a server for a distributed system, a server integrating blockchain technology, a cloud server, or an intelligent cloud computing server or intelligent cloud host deployed with machine learning models, etc.
[0025] The information processing method described herein allows interaction between client 101 and server 102, such as receiving or sending messages. For example, server 102 can receive a first request from client 101 based on an information carrier, and obtain a first identifier. The first request originates from a first tenant and at least indicates a first task to be performed by the intelligent system. The first identifier indicates the instance type for performing the first task. Based on the first identifier, server 102 obtains instance information indicating the acquisition of a first instance. Based on the instance information and the first request, server 102 acquires the first instance. Based on the first instance, server 102 executes the first task and sends the information to client 101 for display on the display interface.
[0026] It should be noted that the information processing method can be executed by client 101, or by client 101 and server 102, with different functional parts of the information processing device deployed on client 101 and server 102 respectively. Specifically, the front-end interaction module and local data acquisition module are deployed on client 101, while the back-end data processing module and data storage module are deployed on server 102. Client 101 and server 102 achieve data interaction and functional collaboration through network communication. It should be understood that... Figure 1 The number of clients and servers shown is for illustrative purposes only. Any number of clients and servers can be configured to meet specific implementation requirements.
[0027] Figure 2 This is a flowchart illustrating an information processing method for one scenario. This method is applicable to scenarios involving lifecycle management of a trusted environment when performing tasks within that environment. It is particularly suitable for scenarios involving lifecycle management of a trusted environment when performing intelligent system-related tasks, such as managing the lifecycle of sandbox instances when performing large model inference tasks within a sandbox instance environment. This information processing method can be executed by an information processing device, which can be implemented in software and / or hardware, optionally through electronic devices such as mobile terminals, computer clients, or servers. Figure 2 As shown, the information processing method may specifically include: S210. Receive a first request and obtain a first identifier. The first request comes from a first tenant. The first request is used to indicate at least a first task to be performed by the intelligent system. The first identifier indicates the instance type of the first task.
[0028] The first request instructs the intelligent system to allocate a trusted environment for the first task and execute the first task within that trusted environment. The first request includes at least the task type, task identifier, business domain identifier, and long / short processing type identifier for the first task. The first request can be sent to the intelligent system via a first interface. The first interface can be the interaction interface between the first tenant and the intelligent system. Optionally, the first interface can include at least one of the following: the main interface of an application (e.g., a session interface), a dialog window on a webpage, and a touchscreen of a smart device. For example, the first interface can be the intelligent interaction interface of the intelligent system, through which the first tenant can initiate the first request. The intelligent system parses the first request to obtain the first identifier and the first task contained within it, thereby enabling human-computer interaction between the first tenant and the intelligent system. In this document, the intelligent system can refer to a system capable of autonomous control based on a machine learning model. For example, an intelligent system can make decisions and autonomously execute actions based on a machine learning model to achieve preset goals or complete preset tasks—a virtual object or physical entity. The intelligent system can be an automated program that understands the intentions of the first tenant and can utilize models or invoke tools to complete various types of tasks. In some contexts, examples of intelligent systems may include, but are not limited to: intelligent agents, chatbots, chatbots, digital avatars, intelligent customer service representatives, and digital assistants. Alternatively, intelligent systems can also be intelligent roles implemented based on machine learning models. Intelligent systems can process requests from first-tenants based on generative models (e.g., language models, multimodal models) to perform specified types of tasks. In some cases, intelligent systems may also relate to virtual accounts, which may have corresponding avatars or nicknames.
[0029] The first tenant can be understood as the entity that initiates the first request. Based on actual business needs, tenant permissions can be set for the first tenant. Upon receiving a first request initiated by the first tenant, a corresponding first instance can be allocated based on these tenant permissions. These tenant permissions are used to constrain the data access and resource call scope of the first instance.
[0030] The first identifier can be used to characterize the task type of the first task, so as to determine the instance type required to execute the first task based on the task type carried in the first identifier. Optionally, the long / short processing type identifier in the first request can be used as the first identifier of the first task. The first identifier is used to instruct the intelligent system to allocate the required instance type to the first task according to the first identifier. In this document, the instance type required to execute the first task is different when the task type of the first task is different. Optionally, the instance type is used to characterize the task types that the trusted environment can execute. For example, the instance type can be used to characterize the trusted environment as a trusted environment for executing long-term processing tasks, or the instance type can be used to characterize the trusted environment as a trusted environment for executing short-term processing tasks.
[0031] For example, when the task type is a long-term processing task, the instance type is defined to correspond to a task-bound sandbox instance; when the task type is a short-term processing task, the instance type is defined to correspond to a request-reuse sandbox instance. Optionally, the first identifier may include a task identifier, a business domain identifier, a cluster identifier, and an isolation dimension identifier. The isolation dimension identifier can be used to distinguish the local reuse boundary corresponding to a short-term request. In this document, instance types include Function as a Service and Elastic Compute Cloud Server. The instance type can be used as the first identifier. When the instance type is Function as a Service, the first task is determined to be a short-term processing task; when the instance type is Elastic Compute Cloud Server, the first task is determined to be a long-term processing task. The task identifier and business domain identifier in the first request can be used as the primary key of the task resource mapping cache for the first task. If an instance address corresponding to this cache primary key exists, the instance type can be obtained based on the instance address, and then used as the first identifier to determine the instance type required for the first task.
[0032] The first task can be understood as a task that requires processing within a secure, isolated environment. The first task can be identified, received, and executed by a trusted environment bound to a first identifier. The first task can be carried out in at least one of the following forms: task message, task object, execution instruction package, etc. The first task includes, but is not limited to, execution content, running parameters, and environment control policies, enabling the trusted environment with the first identifier to acquire the task and complete the corresponding processing flow within the isolated environment. Optionally, the first task can be a task containing untrusted execution content. By running the first task in an isolated, trusted environment, the risk of untrusted execution content in the first task spreading to the entire system environment can be prevented. Optionally, the first task can be a confidential task with security isolation requirements. By running the first task in an isolated, trusted environment, the task-related data and execution process data of the first task are ensured not to be leaked. The type of the first task can be a long-term processing task or a short-term processing task. Long-term processing tasks include, for example, continuous interaction in project discussion threads related to the same topic, multi-round continuous reasoning tasks, or long-process data iterative processing tasks. Short-term tasks include, for example, short-term processing tasks that can be executed once. For example, short-term processing tasks can be sandbox testing tasks for a specific code segment, single file risk scanning tasks, one-time script execution tasks, etc.
[0033] The first request is executed in a trusted environment. A trusted environment can be understood as a separate operating domain with security isolation and data protection capabilities. For example, a trusted environment can be a sandbox instance built based on security sandbox technology. The trusted environment is used to protect the runtime model, context data, business data, execution process data, and execution result data of the first task from malicious theft or tampering.
[0034] In one scenario, when the first task presents a potential security risk and needs to be isolated to protect the main system environment, the first tenant can initiate a first request through the first interface. This request is then transmitted to the intelligent system, which parses it. Based on this, the intelligent system obtains a first identifier and determines the task type of the first task to be executed. Subsequently, it matches the corresponding instance type to the first task based on the task type.
[0035] S220. Obtain instance information based on the first identifier.
[0036] Instance information can be understood as a set of scheduling configurations that corresponds one-to-one with each instance type. Instance information defines the acquisition logic and lifecycle management rules for the first instance. Instance information can be obtained through a first identifier index, serving as the basis for the intelligent system to match the first instance. Instance information can exist in any form, such as configuration tables, policy scripts, or structured data.
[0037] The first instance is used to represent either a task-bound sandbox instance or a request-reusable sandbox instance. The intelligent system obtains the task type of the first task based on the first identifier, determines the matching instance type based on the task type, and then obtains the first instance based on the instance information corresponding to that instance type, combined with the first request. Optionally, the instance information corresponding to different instance types differs, and the initialization configuration and resource parameters required during the instance acquisition phase are also different. Furthermore, differentiated lifecycle management of instances is achieved based on scheduling information. For example, when the task type of the first task is a long-term processing task, the task-bound sandbox instance is used as the first instance based on the instance information of the first task; when the task type of the first task is a short-term processing task, the request-reusable sandbox instance is used as the first instance based on the instance information of the first task.
[0038] The instance information includes instance acquisition information, which indicates the acquisition method for the first instance, allowing the first instance to be acquired based on this method. This acquisition method can be understood as the implementation path and resource preparation rules adopted by the intelligent system to obtain the first instance. The acquisition method may include the instance creation logic, resource admission conditions, initialization configurations, and prerequisite dependency data for the first instance. The intelligent system prepares the first instance based on the acquisition method in the instance information and the first request. Optionally, the acquisition methods differ for different instance types. For example, temporary instances for short-term processing tasks can be created quickly on demand, while persistent instances for long-term tasks, in addition to creation, require initialization actions such as loading context cache and persistent session configuration.
[0039] Specifically, the business task access layer can receive the first request and parse it to obtain the first identifier. During this process, only the task identifier of the first task needs to be perceived, without directly accessing the sandbox instance (i.e., the first instance). The task-level runtime instance mapping layer then retrieves the first instance corresponding to the first request based on the first identifier. Furthermore, this paper sets up a dual-detection module (status + access path), a pre-creation reuse check + post-creation verification module, a single-instance recovery module protected by distributed locks, a lifecycle lease module based on resource validity, and an automatic reconstruction + resource reclamation module to manage the lifecycle of the first instance in the first request. It should be noted that this paper also sets up a multi-level resource pool self-management layer, including a local resource pool (i.e., the first instance pool) and a distributed resource pool (i.e., the second instance pool), and performs instance management on the instances in the instance pools (e.g., water level maintenance, instance anomaly removal, automatic instance compensation, instance replenishment within the pool, and instance inspection, etc.) to ensure rapid matching of instances in the instance pools while reducing the probability of invalid instances being matched. Building upon this, a unified management interface is established for heterogeneous geological resources, providing a unified management interface for both long-term and short-term processing tasks, thus shielding the heterogeneous differences in the backend. Elastic computing cloud servers are used to handle long-term processing tasks, while the Function as a Service module is used to handle short-term processing tasks.
[0040] Specifically, the data model includes instance identifier, resource location, region, status, specifications, metadata, creation time, expiration time, and extended information for each first instance. Businesses only need to hold the task identifier or isolation dimension identifier of the first task; they do not need to be aware of the underlying creation method and access address.
[0041] For example, the data model receives the first request through a unified management interface and parses it. Based on the task identifier and business domain identifier in the first request, and using the isolation dimension identifier, it distinguishes the local reuse boundary of short-term requests. Using (business identifier, business domain identifier) as the primary key of the task resource mapping cache, when searching for the existence of an instance address corresponding to this cache primary key, the instance type can be obtained based on the instance address. Then, the instance type is used as the first identifier, and the instance type required for the first task is determined based on the first identifier. If the instance type is a Function as a Service, it indicates that the first task is a short-term processing task; if the instance type is an Elastic Compute Cloud Server, it indicates that the first task is a long-term processing task.
[0042] S230. Based on the instance information and the first request, obtain the first instance.
[0043] The instance acquisition information is used to indicate how to obtain a first instance matching the first request from multiple instances. Optionally, if the first instance corresponding to the first request does not exist, the instance acquisition information is used to indicate how to create a first instance corresponding to the first request. When it is necessary to create a first instance, the instance acquisition information includes at least the instance creation rights, cleanup and site selection, resource creation, location saving, post-creation verification, and instance release information of the first instance. Based on this, by obtaining information from the instance associated with the first request, a first instance matching the first request can be obtained from multiple trusted environments, or a first instance corresponding to the first request can be created.
[0044] S240, Execute the first task based on the first instance.
[0045] After obtaining the first instance, the first task is executed within the first instance. During the execution of the first instance, the entire lifecycle of the first instance is managed based on the instance information to ensure the smooth operation of the first instance.
[0046] In this article, instance information includes instance management information, which is used to manage the first instance.
[0047] Instance management information indicates the management method for the first instance, enabling instance management based on this method. This management method can be understood as a set of control rules that govern the entire lifecycle of the first instance after it is put into operation. The management method may include instance creation, instance query, instance deletion, instance renewal, instance address and status interface, instance runtime constraints, context retention policies, idle time determination criteria, resource reclamation timing, and exception handling rules. The intelligent system continuously manages the lifecycle of the first instance according to this management method while the first instance executes its first task. Optionally, different instance types may have different management methods. For example, the first instance for a short-term processing task can be directly destroyed after completion without retaining any context; the first instance for a long-term processing task is allowed to remain alive after task completion, retaining its context during idle windows and releasing resources after reaching a threshold, or releasing it when an active reclamation command for the first instance is detected.
[0048] In practical applications, after obtaining the first request, the first identifier in the first request is used to match the instance type required for the first task, and then the corresponding first instance is matched for the first task according to the instance type.
[0049] It should be noted that a unified data model was pre-established in this paper, such as... Figure 3As shown, this data model includes at least a request access module, a task lifecycle management module, a sandbox unified management module, a resource pool invocation module, a status and recovery module, and an observation module. The request access module receives and parses the first request to obtain information such as the task identifier, business domain identifier, cluster identifier, isolation key, runtime resource parameters, environment variables, and mount parameters of the first task. The task lifecycle management module manages the task mapping of the first instance and performs reuse checks, creation coordination, verification, renewal, and deletion operations according to the backend. The sandbox unified management module performs instance management operations on the first instance based on the first request, such as creating, querying, deleting, renewing, address generation, and status resolution interfaces, and extends start / stop or service restart capabilities according to the backend. The resource pool invocation module pre-stores the default and forced isolation instance pools required by the system architecture to obtain a matching first instance from the resource pool when the first task is a short-term processing task. The status and recovery module saves the task mapping, pool status, lease period, and distributed lock of the first instance, and performs status checks, liveness detection, and recovery functions according to the business path. The observation module is used to record the entire lifecycle of the first instance after it is obtained. For example, it records the results of operations such as creation, retrieval, return, renewal, liveness detection, execution, recycling, and recovery performed on the first instance.
[0050] Based on this, regardless of whether the first task is a long-term or short-term processing task, the above data model can provide a unified management interface for the first instance corresponding to each instance type to shield the differences between heterogeneous backends, so as to ensure that the first task, whether it corresponds to a task-bound first instance or a request-reusable first instance, can retain a separate scheduling and consistency mechanism.
[0051] This paper sets different instance information for long-term and short-term processing tasks to match a suitable first instance when a first request is received. Based on this, and using the instance information corresponding to the first instance, the entire lifecycle of the first instance is managed during its execution. This solves the problem of lacking lifecycle management of the trusted environment when executing intelligent system tasks in a trusted environment, achieving the effect of lifecycle management of the trusted environment when executing tasks in a trusted environment.
[0052] Figure 4 This is a flowchart illustrating an information processing method under one scenario. The technical solution in this scenario can be combined with implementation methods in other scenarios. For identical or related parts, descriptions of other scenarios can be used, and will not be repeated here. Figure 4 As shown, the method in this case may specifically include: S310. Receive a first request and obtain a first identifier. The first request comes from a first tenant. The first request is used to indicate at least a first task to be performed by the intelligent system. The first identifier indicates the instance type of the first task.
[0053] S320. In response to the first identifier satisfying the first condition, first acquisition information is obtained to obtain a first instance based on the first acquisition information and the first request. The first acquisition information is used to indicate the creation of a first instance for the first request, and the first instance is bound to the first request.
[0054] The first condition is used to characterize the first task as a long-term processing task based on the first identifier. Optionally, depending on the actual business processing needs, the first identifier can be directly used to characterize the task type of the first task, or it can be further deconstructed based on the first identifier, and the task type of the first task can be characterized based on the deconstructed identifier information. For example, if the isolation dimension identifier is used as a short-term identifier to distinguish between long-term and short-term tasks, then the first condition means that the isolation dimension identifier does not exist in the first identifier. For example, if the first identifier does not directly contain the task type identifier of the first task, such as if the first identifier is (business identifier, business domain identifier) as the primary key of the task resource mapping cache, when checking whether there is an instance address corresponding to the cache primary key, the instance type can be obtained based on the instance address, and then the instance type can be used as the first identifier to determine the task type of the first task based on the instance type. Wherein, when the instance type is an elastic computing cloud server, the first task is determined to be a long-term processing task.
[0055] The first acquired information is used to characterize the instance acquisition configuration information corresponding to the long-running processing task. The first acquired information is used to instruct the intelligent system to match a task-bound instance for the long-running processing task. The first acquired information includes at least the complete process information for parsing the first request and creating the first instance for the first request. For example, based on the first acquired information, it can be determined whether the first instance exists; if it exists, the existing first instance is invoked based on the first acquired information. If the first acquired information does not exist, it should include information related to obtaining instance creation rights, cleanup and address selection, resource creation, saving location, post-creation verification, and instance release, to instruct the intelligent system to create the first instance based on the first acquired information.
[0056] In this embodiment, the first instance is a sandbox instance that can support long-running tasks. After creating the first instance for the first request, a binding relationship is established between the first request and the first instance. It should be noted that this binding relationship does not restrict the first instance from being released and recycled at any time. For example, during task execution gaps or when resources are insufficient for long-running tasks, the system can destroy and release the first instance. When the task resumes execution, based on the first identifier carried by the first request, the existing first instance is retrieved first. If the first instance has been released, a new first instance corresponding to the first request is created. The context data generated by the long-running task during task execution can be persistently stored separately. Based on the binding relationship between the first request and the first instance, the newly created first instance can query and retrieve the context data of the processed stage of the long-running task and continue executing the task based on this context data.
[0057] In one scenario, the instance information also includes third acquisition information. Based on the instance information and the first request, the first instance is acquired, including: configuring the first instance for the first request based on the third acquisition information and tenant permissions, wherein the tenant permissions are related to the first tenant; and creating a first binding relationship between the first instance and the first tenant so that when a second request is received, the first instance is acquired based on the first binding relationship to execute the second request, wherein the second request is used to indicate the request sent by the terminal to which the first tenant belongs.
[0058] Tenant permissions are used to restrict the data access and resource access scope of the first instance. Tenant permissions ensure data isolation in multi-tenant scenarios. Tenant permissions are determined by the tenant to which the first instance belongs and are used to define the operational access scope of the first instance. For example, tenant permissions can be used to restrict access to the first instance to tenant A, as well as the accessible data and resources that the first instance can access.
[0059] The first binding relationship is used to represent the mapping relationship between the first instance and its associated tenant. When the first tenant initiates a first request, the first instance associated with the first tenant can be determined based on the first binding relationship. Specifically, the first binding relationship is generated when the first instance is created based on the first request. When the first tenant initiates a second request, the corresponding first instance can be retrieved for the first tenant based on the first binding relationship.
[0060] The second request is used to characterize a non-first request initiated for the same first task in a long-term processing task scenario. During the execution of the first task corresponding to the second request, it may need to use the task execution result or execution process data of the first request. In terms of timing, the second request can be triggered consecutively within the same session period as the first request, or asynchronously across time periods. For example, in a multi-round continuous inference task scenario, a tenant can initiate a second request within the same time period after the first request has been processed and returned a result to continue the task context; or, although the first and second requests are initiated on different dates (e.g., the first day and the second day), they still belong to the same multi-round inference task sequence. From the perspective of instance acquisition, the first instance triggered by the second request can be either the same first instance corresponding to the first request, or different first instances under the same instance type. Preferably, the acquisition strategy follows the instance reuse principle: if the first instance corresponding to the first request is still alive, the second request reuses that first instance; if the first instance has been released, the second request will acquire a new sandbox instance under the same instance type.
[0061] Optionally, based on the third information obtained and the tenant permissions, a first instance is configured for the first request, including: in response to the tenant permission being the first permission, obtaining the first instance, the first instance being associated with the first tenant; in response to the tenant permission being the second permission, obtaining the first instance that is currently not occupied, and releasing the second binding relationship of the first instance, the second binding relationship representing the binding relationship between the first instance and the second tenant.
[0062] The first permission is used to indicate that a tenant is authorized to use the first instance associated with a specified instance type for an extended period of time. For example, when a tenant purchases an instance persistence service, a first instance associated with the instance type selected by the tenant is assigned to them, so that the tenant can execute the first task of a long-term processing task type based on the first instance under that instance type.
[0063] The second tenant refers to the tenant corresponding to the second privilege.
[0064] The second permission indicates that the tenant is not authorized to use the first instance associated with the specified instance type for an extended period. Taking a short-term processing task as an example, when the first task typically has a short processing cycle and usually does not rely on context data, the tenant can be directly assigned a currently unoccupied first instance. In other words, when the first task in the first request is a short-term processing task, an unoccupied first instance can be directly assigned to it.
[0065] The second binding relationship is used to represent old mapping relationships that were not fully cleaned up after the first instance completed processing historical tasks before receiving the first request. The second binding relationship represents the old mapping relationship between the first instance and historical tasks. Optionally, the second binding relationship can be a task forward mapping, resource reverse index, business domain, tenant resource mapping, or runtime policy mapping corresponding to the historical task, etc.
[0066] In practical applications, such as Figure 5 As shown, in response to the personalized needs of different tenants regarding task processing cycles, a persistent service can be provided to tenants, allowing them to choose whether to purchase the service based on their actual task requirements. If the first task a tenant needs to execute is a long-term processing task, they can obtain first-level permissions by purchasing the persistent service, thus applying to the system for long-term use rights to a specific instance type. In this scenario, each time a tenant calls the first instance, the system provides the tenant with a first instance of the corresponding instance type based on the first-level permissions. Since the processing cycle of the first task is relatively long, the first instance may need to be called multiple times during the execution of the first task. If the tenant frequently uses the first instance within the same time period, the first instance can be retained. If the tenant does not call the first instance for a long time, the first instance is automatically released. When the system receives a first request carrying first-level permissions again, a new first instance of the same type is allocated to the first task of the first request. Simultaneously, during the execution of the first instance, the system retrieves the context data from the historical execution process of the first task to ensure the accurate execution of long-term processing tasks.
[0067] In other words, the first instance that a tenant with first-level permissions calls each time can be a reused first instance or another first instance associated with the same instance type. This is because long-running tasks often have long cycles, and tenants may call the first instance multiple times within the same time period or intermittently at different times. If the first instance is continuously retained during the gaps between different time periods, it will not only waste resources but may also affect the instance matching efficiency of other tenants. By automatically releasing first instances that have not been occupied for a long time and recreating a first instance of the same instance type when needed, resource utilization and instance matching efficiency can be improved.
[0068] When a tenant carries a second permission, it indicates that the first task the tenant needs to perform is a short-term processing task. In this case, a first instance is obtained based on the instance type corresponding to the first task. If such a first instance exists, it is directly invoked. If a second binding relationship exists on the first instance, that second binding relationship is released, and the first instance is used as the trusted environment for the first task. To avoid simultaneous triggering by multiple instances, this paper sets up a lock to mutually exclude each instance. That is, when the first request matches one of the instances, that instance is used as the first instance corresponding to the first request, and the old mapping is cleared and a host function is selected for the first instance.
[0069] Optionally, the instance information includes first management information, which manages the first instance based on the instance information, including: the update runtime of the first instance based on the first management information, wherein the first management information is used to indicate the update frequency and renewal duration of the first instance.
[0070] The first management information can be understood as the policy configuration information for keeping the first instance bound to the long-term task alive. The first management information can be in the form of structured configurations, policy templates, etc., and at least indicates the update frequency and renewal duration of the first instance. The intelligent system periodically updates the runtime of the first instance based on the first management information to maintain the instance's continuous availability. Optionally, the first management information applies to the dedicated instance strongly bound to the first request and is only applicable to long-term task scenarios; the system initiates renewal periodically according to the configured update frequency, refreshing the instance's effective lifecycle according to the renewal duration. If the duration cannot be updated continuously, the first instance will be reclaimed and its context data cleaned up after the time limit expires.
[0071] Updating runtime can be understood as extending the effective runtime of the first instance after a renewal operation. Each successful renewal refreshes the instance's available lifespan. Optionally, if the runtime is not updated again upon expiration, the instance will trigger a recycling process, and its context will be destroyed. For the first instance bound to a long-running task, session persistence is achieved by continuously updating the runtime.
[0072] The update frequency can be understood as the timing / periodic rule for initiating instance runtime renewal operations. The update frequency defines how often a renewal request is attempted, proactively refreshing the runtime before the instance's validity period expires. Optionally, the update frequency is usually less than the duration of a single renewal, ensuring that renewal is completed before the previous validity period expires, preventing the instance from being unexpectedly reclaimed; different frequencies can be configured based on business load and task priority.
[0073] Renewal duration can be understood as the maximum possible lifespan of an instance that can be granted during a single renewal, which is the maximum duration that can be set for a single runtime update. Optionally, renewal duration is a time quota for a single renewal; each renewal can only extend the instance's runtime by this maximum amount. When the task remains active, the instance's lifecycle is extended through multiple renewal cycles; once renewal stops, the instance is released after the remaining runtime is exhausted.
[0074] Building upon the above example, for the first task of a long-term processing task type, lifecycle management of the first instance corresponding to the first task is required, such as accessing, renewing, and deleting the first instance. Figure 6 As shown, the task type of the first task and the request type (access, renewal, or deletion) of the first request are determined based on the first identifier in the first request to obtain the first instance corresponding to the first task. When the request type is access, the resource location information corresponding to the first task is obtained, and the instance address of the first instance corresponding to the first task is obtained. An access address for accessing the first instance is generated and returned to the business side. Generally, instance health checks are not triggered at the execution entry point. If the request type is renewal, the backend support capabilities of the first instance are determined based on the resource validity period of the first instance. If the first instance supports the resource validity period for short-term processing tasks, the validity period of the underlying session resources is updated according to the business action of the first task. For processing tasks that do not support resource validity periods, deployment, startup, or keep-alive operations are initiated on the first instance to perform renewal management of the first instance, and the result is returned after the processing of the first instance is completed. If the request type is deletion, during the process of finding the first instance corresponding to the first task, if the first instance is not detected, the instance search result is returned directly. If the first instance exists, the corresponding first instance is deleted, and the relevant addresses and information bound to the first instance are unbound.
[0075] When renewing the first instance, such as Figure 7 As shown, if a stop request corresponding to the first instance is received, the local keep-alive task is stopped. Then, the interface is called to query the instance status of the first instance, and three processing branches are executed based on the instance status. First, if the first instance is already in a stopped state, success is returned directly. Second, if the first instance is currently stopping, the process waits until the first instance changes to a stopped state. Third, if the first instance is in any other running state, a stop operation for the first instance is initiated, and polling continues until the first instance reaches the stopped state. Regardless of which branch is followed, the process will eventually converge and return success, thus achieving idempotency for the stop operation on the first instance.
[0076] During the renewal management of the first instance, such as Figure 8As shown, upon receiving a start or recovery request for the first instance, branching processing occurs based on the instance's status. Firstly, if the first instance is already in a live state (e.g., instance preparation, instance running, or instance restart), the health verification process begins directly. If the first instance is in a stopped or abnormal state, the interface is first called to start the cloud instance and sandbox service, completing the bootstrapping and startup of the first instance and service. Both branches subsequently execute a rewrite of the task mapping, followed by a health probe. Processing is then routed based on the probe results. If the health check passes, a keep-alive task is initiated according to the business identifier and instance type, and the process is marked as successful recovery. If the health check fails, the instance self-healing process enters a closed-loop process.
[0077] In this process, such as Figure 9 As shown, a health probe is triggered after the keep-alive cycle expires. The first health check is performed by calling the data plane. If the check passes, the instance continues to run normally and enters the next keep-alive cycle. If the first health check fails, the system reads the persistent status of the task and compares it with the control plane to determine whether the task still needs to run. If the task has been deleted or not deployed, the keep-alive task of the instance is terminated directly. If the task still needs to run, a first-level self-healing is initiated, restarting the sandbox service or elastic computing cloud server instance (i.e., the first instance corresponding to the long-term processing task), and then a second instance keep-alive probe is initiated. If the second probe restores health, the normal keep-alive cycle is returned. If it is still abnormal, a second-level self-healing is executed, running the pre-configured repair command. After completion, a third probe is initiated. If the third probe restores health, the next keep-alive cycle is entered. If it still cannot restore health, a third-level self-healing is executed, the abnormality is recorded, and the system waits for subsequent recovery or reconstruction. The whole process forms a closed loop of periodic health probes and three-level progressive self-healing.
[0078] S330. Based on the instance information and the first request, obtain the first instance.
[0079] S340, Execute the first task based on the first instance.
[0080] This paper provides corresponding tenant permissions for tenants with long-term processing tasks such as retaining files, processes, and long links. When receiving a task request from a tenant, the paper reuses the first instance that has been called, or recreates a first instance of the same type as the first instance that has been used. The first instance inherits the execution results and / or execution process data in the business processing. By performing lifecycle management on the first instance during the execution of the first task, the paper aims to ensure the accurate and secure execution of long-term processing tasks.
[0081] Figure 10This is a flowchart illustrating an information processing method under one scenario. The technical solution in this scenario can be combined with implementation methods in other scenarios. For identical or related parts, descriptions of other scenarios can be used, and will not be repeated here. Figure 10 As shown, the method in this case may specifically include: S410. Receive a first request and obtain a first identifier. The first request comes from a first tenant. The first request is used to indicate at least a first task to be performed by the intelligent system. The first identifier indicates the instance type of the first task.
[0082] S420. In response to the first identifier satisfying the second condition, obtain second acquisition information to obtain the first instance based on the second acquisition information and the first request. The second acquisition information is used to reflect the reuse of a cached portion of the instance.
[0083] The second condition is used to characterize the determination that the first task is a short-term processing task based on the first identifier. For example, if the isolation dimension identifier is used as a short-term identifier to distinguish between long-term and short-term tasks, then the second condition means that the isolation dimension identifier does not exist in the first identifier.
[0084] The second condition is used to characterize the first task as a long-term processing task based on the first identifier. Optionally, similar to the first condition, depending on actual business processing needs, the first identifier can be directly used to characterize the task type of the first task, or it can be further deconstructed based on the first identifier, and the task type of the first task can be characterized based on the deconstructed identifier information. For example, if an isolation dimension identifier is used as a short-term identifier to distinguish between long-term and short-term tasks, then the first condition means that the first identifier contains an isolation dimension identifier. For example, if the first identifier contains the task type identifier of the first task, such as the first identifier being (business identifier, business domain identifier) used as the primary key of the task resource mapping cache, when searching for the existence of an instance address corresponding to this cache primary key, the instance type can be obtained based on the instance address, and then the instance type can be used as the first identifier to determine the task type of the first task based on the instance type. Where the instance type = function-as-a-service, the first task is determined to be a short-term processing task.
[0085] The second acquired information is used to characterize the instance management configuration information corresponding to the short-processing task. The second acquired information is used to instruct the intelligent system to match a task-bound instance for the short-processing task. The second acquired information includes at least the complete process information for parsing the first request and creating the first instance for the first request. For example, the second acquired information should include information related to obtaining instance creation rights for the first instance, cleanup and site selection, resource creation, saving location, post-creation verification, and instance release, to instruct the intelligent system to create the first instance based on the second acquired information.
[0086] In this embodiment, the first instance is a sandbox instance that can support short-term processing tasks. Since short-term processing tasks do not have context data, the first instance does not need to obtain context data when processing the first task contained in the first request. It can directly process the first task based on the existing first instance or the newly created first instance.
[0087] In one scenario, the instance information includes second acquisition information. Acquiring the first instance based on the instance information and the first request includes: in response to the first instance pool including an instance identifier, acquiring the first instance from the first instance pool, where the first instance pool is a cached instance pool and the instance identifier is associated with the first tenant; or, in response to the first instance pool not including an instance identifier, acquiring the first instance from a second instance pool, where the second instance pool is used to cache instances that can be invoked by multiple tasks.
[0088] The first instance pool can be understood as a local memory instance cache managed within the gateway process. Deployed within a single gateway process, it is visible only to that process and stores already loaded and reusable running instances. The first instance pool relies on in-process memory for data access, eliminating the need for cross-node network interaction. It can prioritize retrieval of resources in response to business requests, reducing latency associated with remote resource acquisition. Optionally, the first instance pool can group resources according to isolation levels, recording status data such as cached instances, initial caching time, and most recent usage time. The lifecycle of the first instance pool is bound to its host gateway process; when the gateway process is destroyed, all cached instances within the first instance pool are released synchronously.
[0089] The second instance pool is a global resource pool shared by multiple gateway nodes, accessible and invoked by multiple gateway processes and tasks within the cluster, breaking the resource isolation limitations of a single process. The second instance pool can be understood as a distributed instance carrier providing shared instance management for the entire gateway cluster. It supports cross-node resource management; when the local first instance pool has no available instances, the gateway process can request reusable instances from the second instance pool via the network. The second instance pool manages a cluster-level resource ledger, including control rules such as target capacity, water level thresholds, instance creation and recycling limits, and inspection cycles, supporting interoperability of idle instances and balancing traffic differences across nodes. Optionally, the second instance pool can group resources based on (instance pool identifier, function identifier) to uniformly manage the overall preheating resources of the cluster, avoiding resource redundancy and waste caused by individual preheating on each gateway node.
[0090] In this article, such as Figure 11As shown, a hierarchical system architecture can be set up for short-term processing tasks, which includes a first-level local pool (i.e., the first instance pool) and a second-level distributed pool (i.e., the second instance pool). The first instance pool is located within a single gateway process and can store reusable instances, their initial cache time, and their most used time according to the isolation dimension. The second instance pool can be shared by multiple gateway nodes and manages the target capacity, water level, creation and reclamation limits, and inspection cycle.
[0091] In a specific example, such as Figure 12 As shown, based on the code execution request (i.e., the first request), an instance pool identifier (instance pool) is selected according to business and runtime. The isolation dimension identifier carried in the first identifier is used to query the first-level local pool (i.e., the first instance pool), and it is determined whether a first instance that can be directly reused exists in the first instance pool. If a first instance corresponding to the isolation dimension identifier exists in the first instance pool, it indicates a local match, and the existing first instance can be directly reused from the first instance pool. If no local match is found, a function identifier is selected, an element is atomically popped from the corresponding list, and a query is performed in the second instance pool to see if a first instance corresponding to the function identifier exists. If the distributed pool matches (i.e., the second instance pool contains a first instance corresponding to the function identifier), a preheating instance (i.e., the first instance) is obtained from the second instance pool.
[0092] It should be noted that the preheating instance refers to the first instance that has completed startup and environment initialization before the first request arrives, and is in a ready state to immediately accept tasks. Its advantage is that the second instance pool is responsible for the unified management of a batch of preheating instances. After the gateway obtains the preheating instance, it caches it in the first instance pool. The preheating instance does not need to be temporarily created and initialized when the first request is triggered, which can shorten the request processing time.
[0093] In one scenario, the method further includes: creating a first instance for the first request in response to not obtaining a first instance from the second instance pool.
[0094] In practical applications, the second instance pool may contain function identifiers but may not contain a first instance that can be directly reused. This may be because the first instance is fully occupied. In this case, a first instance for executing the first task can be directly created in the second instance pool (i.e., a new instance is created directly).
[0095] In one scenario, the method further includes configuring a second identifier for the first instance, the second identifier being used to indicate that the first instance is in an unavailable state.
[0096] The second identifier is used to characterize the occupancy status of the first instance.
[0097] In practical applications, regardless of whether the system reuses the first instance from the first instance pool, obtains a preheated instance from the second instance pool, or creates a new instance from the second instance pool, after obtaining the first instance, the first instance is removed from all available collections, and a second identifier is configured for the obtained first instance.
[0098] The advantage of this setup is that it ensures the first instance is used only to execute the current first task, and that it operates in a securely isolated environment during the task's execution. A second identifier is configured for the first instance to indicate its current occupancy status. When a first instance is subsequently needed from either the first or second instance pool, it can only be obtained from the first instance that did not carry the second identifier, thus ensuring data security during the processing of each first task.
[0099] It should be noted that, to ensure the successful execution of the first task by the first instance, exclusive execution of the instance configuration information within the first instance is required during its execution. During the execution of the first instance, it is also necessary to check for any anomalies. Optionally, the running status of the first instance can be checked based on the response code. For example, "4xx" indicates a client error, such as incorrect caller parameters or insufficient permissions; "5xx" indicates an internal server error, such as service crash or code exception. When using exclusive execution mode for the first instance, if a "4xx" response code is returned, it indicates that the first instance has started and is running normally. The server received the first request but identified the request itself as non-compliant, and proactively returned a client error, rather than indicating a crash or service failure of the first instance. In this case, the first instance will not be returned to the corresponding instance pool, and an attempt will be made to reclaim the first instance corresponding to the first request (generally, the number of reclaim attempts can be set, such as no more than 3 times). If a response code other than "4xx" such as "5xx" is detected, it indicates that the server has crashed or encountered an error. In this case, the system requests whether to allow the first instance to be returned. If yes, the first instance is returned to the corresponding local queue according to the current policy (such as returning the first instance to the first instance pool). If no, the first instance is released after the first instance ends.
[0100] S430. Based on the instance information and the first request, obtain the first instance.
[0101] S440, Execute the first task based on the first instance.
[0102] Optionally, the instance information includes second management information. The first instance is managed based on the instance information, including: receiving first feedback, releasing the first instance and first resource information based on the second management information.
[0103] Specifically, the first feedback is used to characterize an execution exception of the first instance. The first resource information is used to reflect the resources required by the first instance when performing the first task. The second management information is used to instruct on the isolation, reuse, and reclamation of the first instance that has completed the first task. The second management information is used to instruct on caching the first instance to the corresponding instance pool.
[0104] During the execution of the first task on the first instance, it is necessary to handle exceptions and maintain consistency boundaries for the first instance. If the first task is a long-term task, a fixed-term lock needs to be created for coordination, and the snapshot recovery process requires locking before verification. Health checks are performed during instance deployment and continuous keep-alive phases. Mapping reads and pool retrieval scenarios do not require real-time health checks; local mutual exclusion and distributed atomic dequeueing prevent duplicate task retrieval. Simultaneously, differentiated locking is required for instance pool management, such as locking throughout the inspection process, locking during low-water level expansion, and no locking during overcapacity reclamation. Furthermore, the first instance must have idempotency and fault rollback capabilities. Deletion requests should return success directly if the mapping does not exist, and snapshot recovery failures should roll back to a newly created instance. It should support restoring task mappings from persistent records and rely on metric logs to investigate various anomalies in creation, health checks, water level monitoring, and reclamation.
[0105] If the first task is a short-term processing task, then during the execution of the first instance, a coordinated automatic renewal lock needs to be created to support the waiting request cycle reuse check. Health checks are performed during instance creation and reuse, but not in real-time for mapping reads and pool retrieval scenarios. Exclusive task acquisition is achieved using local mutual exclusion and distributed list atomic dequeueing. Short code execution only identifies HTTP 4xx errors as tasks not being returned and retryes them. Idempotent logic is included for supporting operations, and logs and metrics are used to locate anomalies in the creation and health checks stages.
[0106] It should be noted that the above process of releasing the first instance and the first resource information based on the second management information includes multiple management requirements and execution actions at different stages. This solution only uses the above execution actions as an example to illustrate the management of the first instance. In actual applications, the management operations for the first instance can be set according to actual needs.
[0107] In one scenario, the instance information includes second management information. Managing the first instance based on the instance information includes: receiving second feedback, which indicates that the first instance has completed the first task; and caching the first instance based on the instance identifier and the second management information.
[0108] The second management information is used to instruct the isolation, reuse, and reclamation of the first instance that has completed the first task. The second management information is also used to instruct the caching of the first instance into the corresponding instance pool.
[0109] In one scenario, in response to the instance identifier of the first instance corresponding to the first instance pool, the first sub-information in the second management information is obtained. The first sub-information is used to indicate that the first instance is cached in the first instance pool. Based on the first sub-information and the first cache information, the first instance is cached in the first instance pool.
[0110] The first sub-information can be determined based on the isolation dimension identifier in the second management information. For example, the first sub-information can be the default isolation type; or, the first sub-information can be the forced isolation type (i.e., a non-default isolation type). When the first sub-information is the default isolation type, the first instance is cached in the default local queue of the first instance pool first. When the first sub-information is the forced isolation type, the first instance is cached in the dedicated local queue of the first instance pool.
[0111] Based on the above examples, such as Figure 13 As shown, after the first instance completes its first task, the exclusive execution of the first instance ends upon receiving the second feedback. Based on the exclusive execution result, the second management information (i.e., the response code) corresponding to the first instance can be obtained. If the response code is "4xx", the first instance used this time is not returned; if the response code is not "4xx", the system determines whether to allow the return of the first instance based on the request configuration information in the first request. If so, the second management information is obtained based on the "isolation dimension identifier" type in the first request. If the second management information is the default isolation type, it indicates that the first instance has not been custom isolated, and there is no special isolation requirement when reclaiming the first instance. In this case, the system can cache the first instance in the default local queue. Alternatively, the second management information can be the forced isolation type, indicating that the first instance has been custom isolated and there is an instance isolation requirement. In this case, the first instance needs to be cached in a dedicated local queue.
[0112] This paper proposes a system for short-lived processing tasks, comprising a first instance pool and a second instance pool. The first instance pool handles tasks with high latency requirements, while the second instance pool serves as a fallback for tasks that the first pool cannot handle, or it can process tasks with lower latency requirements. By using a tiered instance pool approach, short-lived processing tasks are placed in a trusted environment, making it more suitable for high-frequency concurrent task processing scenarios and improving task processing efficiency.
[0113] Figure 14 This is a flowchart illustrating an information processing method under one scenario. The technical solution in this scenario can be combined with implementation methods in other scenarios. For identical or related parts, descriptions of other scenarios can be used, and will not be repeated here. Figure 14 As shown, the method in this case may specifically include: S510. Manage the second instance in the first instance pool based on the third management information, wherein the third management information includes at least the instance cache duration threshold and the instance idle duration threshold.
[0114] In this paper, instances already cached in the first instance pool are designated as second instances. The second instance's lifecycle is managed based on third management information from the first instance pool. This third management information is used to detect the second instance's cache duration and / or idle time. Based on this cache duration and / or idle time, the third management information is used to perform instance deletion, instance removal, or instance reclamation operations on the second instance. The instance removal operation moves the second instance from the first instance pool to the second instance pool.
[0115] In one scenario, managing a second instance in a first instance pool based on third management information includes: removing at least some of the second instances from the first instance pool in response to at least some of the second instances satisfying the third management information; and caching at least some of the second instances in the second instance pool in response to at least some of the second instances satisfying the third condition.
[0116] Specifically, this paper sets up third management information to manage the lifecycle of second instances in the first instance pool. For the first instance pool, the third management information includes at least the queue capacity corresponding to the first instance pool, the instance cache duration threshold for the second instance, and the instance idle time threshold. For example, the second instances in the first instance pool are scanned every 10 seconds. The instance cache duration threshold can be set to 5 minutes with random jitter, and the instance idle time threshold can be set to 60 minutes. When the number of second instances in the first instance pool reaches the cache limit, the first instance that is about to be cached is asynchronously recycled. When the first instance is already cached in the first instance pool, it is used as the second instance. At this time, the instance cache duration and instance idle time of each second instance need to be checked. If the instance cache duration of the second instance exceeds the instance cache duration threshold, or the instance idle time of the second instance exceeds the instance idle time threshold, the second instance is removed from the first instance pool and cached in the second instance pool. If the second instance is not a default isolated instance, it is removed from the first instance pool and then deleted directly without being recycled back to the second instance pool.
[0117] S520. Manage the third instance in the second instance pool based on the fourth management information, wherein the fourth management information includes at least the pool capacity and minimum water level of the second instance pool.
[0118] Instances already cached in the second instance pool are designated as third instances. The lifecycle of these third instances is managed based on the fourth management information within the second instance pool. This fourth management information is used to detect the pool capacity and / or minimum water level of the second instance pool. The pool capacity represents the maximum capacity of cacheable instances in the second instance pool. The water level of the second instance pool can be understood as the number of currently available idle instances in the second instance pool. Therefore, the minimum water level of the second instance pool represents the minimum number of idle instances that must be retained in the second instance pool.
[0119] In one scenario, managing a third instance in the second instance pool based on fourth management information includes: obtaining an instance replenishment threshold based on pool capacity and minimum water level; obtaining a query rate per second in response to a first number of third instances being less than the instance replenishment threshold; and creating a fourth instance and caching it as the third instance in the second instance pool in response to a query rate per second being less than a first value.
[0120] The instance replenishment threshold represents the maximum number of instances that should be added to the second instance pool. It also limits the number of instances in the second instance pool to the pool capacity. The first quantity represents the number of third instances currently included in the second instance pool. The first value represents the pre-set minimum query rate per second.
[0121] The fourth instance can be understood as an instance used to supplement the second instance pool. The fourth instance can be an instance recreated when the number of instances in the second instance pool falls below the minimum watermark. Alternatively, it can be an instance recreated when the query rate per second falls below the first value.
[0122] In practical applications, such as Figure 15 Therefore, the second instance pool is managed periodically, for example, by periodically refreshing the dynamic pool configuration and updating the water level (i.e., periodically checking the water level of the second instance pool to determine its current level). If the current water level in the second instance pool is lower than the minimum water level, the process proceeds to the second instance replenishment branch, and the size of the gap in the second instance pool is evaluated to determine the instance replenishment threshold. If the number of third instances in the second instance pool is the first, the query rate per second for each third instance in the second instance pool is obtained. If the query rate per second is less than the first value, the function pool management lock for the second instance pool is obtained; otherwise, a fourth instance is created directly and cached as a third instance in the second instance pool. If the current water level of the second instance pool is above the upper limit, no management lock needs to be added to the second instance pool, and the corresponding third instance in the second instance pool is deleted according to the single-round recycling limit. If the current water level in the second instance pool is between the minimum and upper limit, the current water level of the second instance pool is maintained, and no addition or deletion of third instances in the second instance pool is required.
[0123] In one scenario, the fourth management information also includes an inspection cycle. The third instance in the second instance pool is managed based on the fourth management information, including: obtaining the instance status of the third instance based on the inspection cycle; removing the fifth instance from the second instance pool in response to the expiration information reaching the first duration; and feeding back the fourth information.
[0124] The inspection cycle is used to characterize the health status detection of all third instances in the second instance pool. Optionally, the periodic detection of third instances may include whether the instance is alive, whether the process is running normally, whether the instance memory is exceeded, whether the instance has network anomalies, and whether the instance environment files and dependencies are intact. Generally speaking, the shorter the inspection cycle, the more timely the abnormal instances in the second instance pool can be detected. However, an excessively short inspection cycle will consume additional server detection overhead; while an excessively long inspection cycle may fail to detect abnormal instances in the second instance pool in a timely manner, leading to instance task failures and other problems. Therefore, the inspection cycle can be set according to actual business needs, for example, the inspection cycle can be 30 seconds, 1 minute, or 5 minutes, etc. The inspection cycle can be understood as a pre-set periodic period for checking the status of instances in the second instance pool. This instance status includes at least validity period information.
[0125] The first duration can be understood as the preset validity period of the third instance. The first duration can be used to detect whether the third instance has exceeded its validity period.
[0126] The fifth instance reflects the third instance whose validity period has reached the first duration, and the fourth information is used to reflect the description of the removal reason. Optionally, the fourth information may be that the instance is not ready and stops participating in scheduling; the instance lacks an expiration time and needs to have a minimum lease period set; or it may be that the instance is about to expire and needs to be taken offline in advance, and the instance will be deleted when it expires, etc.
[0127] In practical applications, see Figure 16The second instance pool is managed periodically. While managing the pool's water level, instance inspections are performed according to a scheduled inspection cycle. Specifically, a function identifier inspection lock is acquired to check if multiple third instances are being inspected concurrently. If not, the periodic inspection of the second instance pool ends, and an instance inspection is performed again at the start of the next inspection cycle. If so, the instance status of each third instance in the second instance pool is scanned, such as its validity period information. Taking one third instance as an example, if the third instance is ready and its lease period is sufficient (i.e., its validity period has not expired), the third instance is retained in the second instance pool. If the third instance is not ready or has expired, it is designated as the fifth instance and removed from the second instance pool to avoid matching an invalid instance to the first request. Based on this, if the second instance pool contains a fifth instance, the fourth information corresponding to the fifth instance will be fed back to help identify the exception type of the fifth instance. For example, the fourth information may be that the instance is not ready and stops participating in scheduling; the instance lacks an expiration time and needs to set a minimum lease period; or the instance is about to expire and needs to be taken offline in advance and deleted when the instance expires.
[0128] The advantage of this setup is that by periodically inspecting each third instance in the second instance pool, it is possible to promptly detect whether each third instance is ready and whether it has reached its expiration date, as well as to identify and remove abnormal instances in the second instance pool. This increases the probability of hitting an invalid instance in the second instance pool when matching the instance corresponding to the first request from the second instance pool.
[0129] This article also discusses instance management for cached instances in the instance pool, including metrics such as instance cache duration, instance idle time, instance pool level, and periodic instance inspections. This approach ensures timely removal of any abnormal or expired cached instances in the second instance pool, guaranteeing efficient instance matching while reducing the efficiency of matching invalid instances.
[0130] Figure 17 This is a schematic diagram of the structure of an information processing device in one scenario, such as... Figure 17 As shown, the above-mentioned device includes: a first module 610, a second module 620, a third module 630, and a fourth module 640.
[0131] The first module 610 is used to receive a first request and obtain a first identifier. The first request comes from a first tenant. The first request is used to indicate at least a first task to be performed by the intelligent system. The first identifier indicates the instance type for performing the first task. The second module 620 is used to obtain instance information based on the first identifier, wherein the instance information indicates the acquisition of the first instance; The third module 630 is used to obtain the first instance based on the instance information and the first request; The fourth module 640 is used to execute the first task based on the first instance.
[0132] This paper sets different instance information for long-term and short-term processing tasks to match a suitable first instance when a first request is received. Based on this, and using the instance information corresponding to the first instance, the entire lifecycle of the first instance is managed during its execution. This solves the problem of lacking lifecycle management of the trusted environment when executing intelligent system tasks in a trusted environment, achieving the effect of lifecycle management of the trusted environment when executing tasks in a trusted environment.
[0133] In one scenario, the instance information is also used to manage the first instance, and the information processing device is also used to manage the first instance based on the instance information.
[0134] In one scenario, the second module includes: instance information including first acquisition information and second acquisition information; a first response submodule, used to obtain the first acquisition information in response to the first identifier satisfying the first condition; the first acquisition information is used to indicate the creation of a first instance for the first request, and the first instance is bound to the first request. The second response submodule is used to obtain second acquisition information in response to the first identifier satisfying the second condition. The second acquisition information is used to reflect the reuse of cached partial instances.
[0135] In one scenario, the instance information also includes third acquisition information. The second module includes: a first instance configuration submodule, used to configure a first instance for the first request based on the third acquisition information and tenant permissions, wherein the tenant permissions are related to the first tenant. The first binding relationship creation submodule is used to create a first binding relationship between the first instance and the first tenant, so that when a second request is received, the first instance can be scheduled to execute the second request based on the first binding relationship. The second request is used to indicate the request sent by the terminal to which the first tenant belongs.
[0136] In one scenario, the first instance configuration submodule includes: a first response unit, used to obtain the first instance in response to the tenant's permission being the first permission, the first instance being associated with the first tenant; The second response unit is used to respond to the tenant's permission being the second permission, obtain the first instance that is currently not occupied, and release the second binding relationship of the first instance. The second binding relationship represents the binding relationship between the first instance and the second tenant.
[0137] In one scenario, the instance management information includes first management information and a third module, which is used to update the runtime of the first instance based on the first management information. The first management information is used to indicate the update frequency and renewal duration of the first instance.
[0138] In one scenario, the second module includes: instance information including second acquisition information; and a third response submodule, used to retrieve a first instance from a first instance pool, which includes an instance identifier, in response to the first instance pool being a locally cached instance pool, and the instance identifier being associated with a first tenant; or... The fourth response submodule is used to retrieve the first instance from the second instance pool in response to the absence of an instance identifier in the first instance pool. The second instance pool is used to cache instances that can be invoked by multiple tasks.
[0139] In one scenario, the second module is also configured to create a first instance for the first request in response to the failure to obtain a first instance from the second instance pool.
[0140] In one scenario, the second module is also used to configure a second identifier for the first instance, which indicates that the first instance is in an unavailable state.
[0141] In one scenario, the instance information includes second management information and a third module, including: a first feedback receiving submodule, used to receive first feedback, which is used to characterize an execution exception of the first instance; The release submodule is used to release the first instance and the first resource information based on the second management information. The first resource information is used to reflect the resources required by the first instance when it performs the first task.
[0142] In one scenario, the instance management information includes second management information and a third module, including: a second feedback receiving submodule, used to receive second feedback, the second feedback being used to indicate that the first instance has completed the first task; The caching submodule is used to cache the first instance based on the instance identifier and the second management information. The second management information is used to instruct the first instance to be cached in the corresponding instance pool.
[0143] In one scenario, the third module includes: a first sub-information acquisition sub-module, configured to obtain first sub-information from the second management information in response to the instance identifier of the first instance corresponding to the first instance pool, the first sub-information being used to instruct the first instance to be cached in the first instance pool; The first instance cache submodule is used to cache the first instance in the first instance pool based on the first sub-information and the first cache information; In one scenario, the information processing apparatus further includes: a first management module, configured to manage second instances in a first instance pool based on third management information, wherein the third management information includes at least an instance cache duration threshold and an instance idle duration threshold; and / or, The second management module is used to manage the third instance in the second instance pool based on the fourth management information, which includes at least the pool capacity and minimum water level of the second instance pool.
[0144] In one scenario, the second management module includes: a fifth response submodule, configured to remove at least some of the second instances from the first instance pool in response to at least some of the second instances satisfying the third management information; The sixth response submodule is used to cache at least a portion of the second instances in the second instance pool in response to at least a portion of the second instances satisfying the third condition.
[0145] In one scenario, the second management module includes: an acquisition submodule for obtaining an instance replenishment threshold based on the pool capacity and the minimum water level; The query rate acquisition submodule is used to acquire the query rate per second in response to the first number of third instances being less than the instance replenishment threshold. The third instance caching submodule is used to create a fourth instance and cache it as the third instance in the second instance pool when the query rate per second is less than the first value.
[0146] In one scenario, the fourth management information also includes the inspection cycle. The second management module includes: an instance status acquisition submodule, used to acquire the instance status of the third instance based on the inspection cycle, wherein the instance status includes at least validity period information. The fourth information feedback submodule is used to remove the fifth instance from the second instance pool and provide the fourth information in response to the expiration of the validity period information reaching the first duration. The fifth instance reflects the third instance where the validity period information has reached the first duration, and the fourth information is used to reflect the description of the removal reason.
[0147] The aforementioned information processing device can execute the information processing method provided in any of the embodiments described herein, and has the corresponding functional modules and beneficial effects for executing the information processing method.
[0148] It is worth noting that the various units and modules included in the above-mentioned information processing device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments in this article.
[0149] The following is for reference. Figure 18The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device or server) 700 suitable for implementing the above-described methods. The terminal device referred to herein may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants, tablet computers, portable multimedia players, in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital televisions and desktop computers. Figure 18 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments described herein.
[0150] like Figure 18 As shown, the electronic device 700 may include a processing unit (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 702 or a program loaded from a storage device 708 into a random access memory 703. The random access memory 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, the read-only memory 702, and the random access memory 703 are interconnected via a bus 704. An input / output interface 705 is also connected to the bus 704.
[0151] Typically, the following devices can be connected to the input / output interface 705: input devices 706 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 707 including, for example, a liquid crystal display, speaker, vibrator, etc.; storage devices 708 including, for example, magnetic tape, hard disk, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 18 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0152] In particular, according to embodiments of this document, the processes described in the above-referenced flowcharts can be implemented as computer software programs. For example, the technical solutions of this document include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a storage device 708, or installed from a read-only memory 702. When the computer program is executed by a processing device 701, it performs the functions defined in the methods of the embodiments of this document.
[0153] The names of messages or information exchanged between multiple devices in this document are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0154] The electronic device provided in this embodiment and the information processing method provided in the above technical solutions belong to the same inventive concept. Technical details not described in detail herein can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0155] This article provides a computer storage medium on which a computer program is stored, which, when executed by a processor, implements the information processing method provided in the above embodiments.
[0156] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this document, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, radio frequency, etc., or any suitable combination thereof.
[0157] According to one or more scenarios in this article, Example 1 provides an information processing method, including: receiving a first request and obtaining a first identifier, wherein the first request comes from a first tenant, the first request is used at least to indicate a first task performed by an intelligent system, and the first identifier indicates the instance type of performing the first task; Based on the first identifier, obtain instance information, which indicates the acquisition of the first instance; Based on the instance information and the first request, obtain the first instance; Execute the first task based on the first instance.
[0158] Based on one or more scenarios in this article, Example 2 provides the method of Example 1, and also includes: optionally, instance information is also used to manage the first instance, and the first instance is managed based on the instance information.
[0159] According to one or more scenarios in this article, Example 3 provides the method of Example 1, which also includes: Optionally, the instance acquisition information includes first acquisition information and second acquisition information. In response to the first identifier satisfying the first condition, the first acquisition information is obtained. The first acquisition information is used to indicate the creation of a first instance for the first request, and the first instance is bound to the first request. In response to the first identifier satisfying the second condition, second acquisition information is obtained, which is used to reflect the reuse of cached partial instances.
[0160] According to one or more scenarios in this article, Example 4 provides the method of Example 3, and also includes: Optionally, the instance information also includes third acquisition information, and based on the third acquisition information and tenant permissions, a first instance is configured for the first request, and the tenant permissions are related to the first tenant; A first binding relationship is created between the first instance and the first tenant, so that when a second request is received, the first instance is scheduled to execute the second request based on the first binding relationship, and the second request is used to indicate the request sent by the terminal to which the first tenant belongs.
[0161] Based on one or more scenarios in this article, Example 5 provides the method of Example 4, and also includes: optionally, in response to the tenant's permission being the first permission, obtaining the first instance, the first instance being associated with the first tenant; In response to the tenant's permission being the second permission, obtain the first instance that is currently not occupied, and release the second binding relationship of the first instance. The second binding relationship represents the binding relationship between the first instance and the second tenant.
[0162] According to one or more scenarios in this article, Example 6 provides the method of Example 4, and further includes: Optionally, the instance management information includes first management information, the update runtime of the first instance is based on the first management information, and the first management information is used to indicate the update frequency and renewal duration of the first instance.
[0163] Based on one or more scenarios described herein, Example 7 provides the method of Example 3, further including: Optionally, the instance acquisition information includes second acquisition information; in response to the instance identifier included in the first instance pool, a first instance is acquired from the first instance pool, wherein the first instance pool is a locally cached instance pool, and the instance identifier is associated with the first tenant; or, If the first instance pool does not contain an instance identifier, the first instance is retrieved from the second instance pool, which is used to cache instances that can be invoked by multiple tasks.
[0164] Based on one or more scenarios described herein, Example 8 provides the method of Example 7, which also includes: optionally, in response to not obtaining a first instance from the second instance pool, creating a first instance for the first request.
[0165] According to one or more scenarios in this document, Example 9 provides the method of Example 7 or 8, which also includes: optionally, configuring a second identifier for the first instance to indicate that the first instance is in an unavailable state.
[0166] Based on one or more scenarios in this paper, Example 10 provides the method of Example 7, which also includes: optionally, receiving first feedback, the first feedback being used to characterize an execution exception of the first instance; Based on the second management information, the first instance and the first resource information are released. The first resource information is used to reflect the resources required by the first instance when it performs the first task.
[0167] According to one or more scenarios in this article, Example 11 provides the method of Example 7, which also includes: optionally, instance management information includes second management information, receiving second feedback, the second feedback being used to characterize the first instance completing the first task; The first instance is cached based on its instance identifier and the second management information. The second management information is used to instruct the first instance to be cached in the corresponding instance pool.
[0168] Based on one or more scenarios described in this document, Example Twelve provides the method of Example One, further comprising: optionally, managing the second instance in the first instance pool based on third management information, wherein the third management information includes at least an instance cache duration threshold and an instance idle duration threshold; and / or, The third instance in the second instance pool is managed based on the fourth management information, which includes at least the pool capacity and minimum water level of the second instance pool.
[0169] According to one or more scenarios in this article, Example Thirteen provides the method of Example Twelve, which also includes: optionally, in response to at least some of the second instances satisfying the third management information, removing at least some of the second instances from the first instance pool; In response to at least some of the second instances satisfying the third condition, at least some of the second instances are cached in the second instance pool.
[0170] Based on one or more scenarios in this paper, Example Fourteen provides the method of Example Twelve, which also includes: optionally, obtaining an instance replenishment threshold based on pool capacity and minimum water level; In response to the first number of third instances being less than the instance replenishment threshold, the query rate per second is obtained; In response to a query rate per second falling below the first value, a fourth instance is created and cached as the third instance in the second instance pool.
[0171] According to one or more scenarios in this article, Example 15 provides the method of Example 12, which also includes: Optionally, the fourth management information also includes an inspection cycle, and the instance status of the third instance is obtained based on the inspection cycle, wherein the instance status includes at least validity period information; In response to the expiration of the validity period information reaching the first duration, the fifth instance is removed from the second instance pool, and the fourth information is fed back; The fifth instance reflects the third instance where the validity period information has reached the first duration, and the fourth information is used to reflect the description of the removal reason.
[0172] According to one or more scenarios in this article, Example 16 provides the method of Example 12, which further includes: optionally, in response to the instance identifier of the first instance corresponding to the first instance pool, obtaining the first sub-information in the second management information, the first sub-information being used to indicate caching the first instance to the first instance pool; Based on the first sub-information and the first cache information, the first instance is cached in the first instance pool.
[0173] According to one or more scenarios described herein, Example 17 provides an information processing apparatus, comprising: a first module for receiving a first request and obtaining a first identifier, wherein the first request is at least used to indicate a first task to be performed by an intelligent system, and the first identifier is used to reflect the instance type required by the intelligent system to perform the first task in a trusted environment; The second module is used to obtain instance information based on the first identifier, and to obtain the first instance based on the instance information and the first request. The instance information is used to indicate at least the method of obtaining and managing the first instance. The third module is used to execute the first task based on the first instance and to manage the first instance based on the instance information.
[0174] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol, such as Hypertext Transfer Protocol, and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet (e.g., the Internet), and peer-to-peer networks, as well as any currently known or future-developed networks.
[0175] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0176] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: receive a first request and obtain a first identifier, the first request being from a first tenant, the first request being at least used to indicate a first task to be performed by an intelligent system, the first identifier indicating the instance type of the first task; obtain instance information based on the first identifier, the instance information indicating the acquisition of a first instance; acquire the first instance based on the instance information and the first request; and perform the first task based on the first instance.
[0177] Computer program code for performing the operations described herein can 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, and C++, as well as conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can 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 remote computers, the remote computer can be connected to the user's computer via any type of network—including local area networks (LANs) or wide area networks (WANs), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0178] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this document. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0179] The modules or units described herein may be implemented in software or hardware. The names of modules or units do not necessarily constitute a limitation on the module or unit itself; for example, the first unit may also be described as "a unit that acquires at least two Internet Protocol addresses".
[0180] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include at least one of the following: field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products, systems-on-a-chip (SoCs), complex programmable logic devices, and so on.
[0181] In the context of this document, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (flash memory), optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0182] The above description is merely a preferred embodiment and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure herein is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed herein that have similar functions.
[0183] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of this document. Certain features described in the context of individual implementations may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0184] Although the subject matter has been described using a programming language specific to structural features and / or methodological logic, 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. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims.
Claims
1. An information processing method, comprising: Receive a first request and obtain a first identifier, the first request being from a first tenant, the first request being used to indicate at least a first task to be performed by the intelligent system, and the first identifier indicating the instance type for performing the first task; Based on the first identifier, instance information is obtained, and the instance information indicates that a first instance is obtained; Based on the instance information and the first request, obtain the first instance; The first task is executed based on the first instance.
2. The information processing method according to claim 1, wherein the instance information includes first acquisition information and second acquisition information, and the step of obtaining instance information based on the first identifier includes... In response to the first identifier satisfying the first condition, the first acquisition information is obtained, the first acquisition information is used to indicate the creation of a first instance for the first request, and the first instance is bound to the first request; In response to the first identifier satisfying the second condition, the second acquisition information is obtained, which is used to reflect the reuse of cached partial instances.
3. The information processing method according to claim 2, wherein the instance information further includes third acquisition information, and the step of acquiring the first instance based on the instance information and the first request includes: Based on the third acquired information and tenant permissions, a first instance is configured for the first request, wherein the tenant permissions are related to the first tenant; A first binding relationship is created between the first instance and the first tenant, so that when a second request is received, the first instance is obtained based on the first binding relationship to execute the second request, wherein the second request indicates a request sent by the terminal to which the first tenant belongs.
4. The information processing method according to claim 3, wherein configuring a first instance for the first request based on the third obtained information and tenant permissions includes: In response to the tenant having the first permission, the first instance is obtained, and the first instance is associated with the first tenant; In response to the tenant's permission being the second permission, the system obtains the first instance that is currently not occupied and releases the second binding relationship of the first instance, whereby the second binding relationship represents the binding relationship between the first instance and the second tenant.
5. The information processing method according to claim 1 or 3, wherein the instance information includes first management information, and managing the first instance based on the instance information includes: Based on the first management information being the update runtime of the first instance, the first management information is used to indicate the update frequency and renewal duration of the first instance.
6. The information processing method according to claim 2, wherein obtaining the first instance based on the instance information and the first request includes: In response to the inclusion of an instance identifier in the first instance pool, the first instance is retrieved from the first instance pool, where the first instance pool is a locally cached instance pool, and the instance identifier is associated with the first tenant; or, In response to the absence of an instance identifier in the first instance pool, the first instance is obtained from the second instance pool, which is used to cache instances that can be invoked by multiple tasks.
7. The information processing method according to claim 6, further comprising: In response to the failure to obtain the first instance from the second instance pool, a first instance is created for the first request.
8. The information processing method according to claim 6 or 7, further comprising: Configure a second identifier for the first instance, the second identifier being used to indicate that the first instance is in an unavailable state.
9. The information processing method according to claim 1, wherein the instance information includes second management information, and managing the first instance based on the instance information includes: Receive first feedback, which indicates an execution exception of the first instance; Based on the second management information, the first instance and the first resource information are released, wherein the first resource information is used to reflect the resources required by the first instance when performing the first task.
10. The information processing method according to claim 9, wherein managing the first instance based on the instance information comprises: Receive second feedback, which indicates that the first instance has completed the first task; The first instance is cached based on its instance identifier and the second management information. The second management information is used to instruct the first instance to be cached in the corresponding instance pool.
11. The information processing method according to claim 1, further comprising: The second instance in the first instance pool is managed based on third management information, which includes at least an instance cache duration threshold and an instance idle time threshold. And / or, The third instance in the second instance pool is managed based on the fourth management information, which includes at least the pool capacity and minimum water level of the second instance pool.
12. The information processing method according to claim 11, wherein the step of managing the second instance in the first instance pool based on third management information includes: In response to at least some of the second instances satisfying the third management information, the at least some of the second instances are removed from the first instance pool; In response to at least some of the second instances satisfying the third condition, the at least some of the second instances are cached in the second instance pool.
13. The information processing method according to claim 11, wherein the step of managing the third instance in the second instance pool based on the fourth management information includes: Based on the pool capacity and the minimum water level, the instance replenishment threshold is obtained; In response to the first number of the third instance being less than the instance replenishment threshold, the query rate per second is obtained; In response to a query rate per second falling below the first value, a fourth instance is created and cached as the third instance in the second instance pool.
14. The information processing method according to claim 13, wherein the fourth management information further includes an inspection cycle, and the step of managing the third instance in the second instance pool based on the fourth management information includes: The instance status of the third instance is obtained based on the inspection cycle, wherein the instance status includes at least validity period information; In response to the expiration date reaching the first duration, the fifth instance is removed from the second instance pool, and the fourth information is fed back. The fifth instance reflects the third instance where the validity period information has reached the first duration, and the fourth information is used to reflect the description information of the removal reason.
15. An information processing apparatus, comprising: A first module is configured to receive a first request and obtain a first identifier, the first request being from a first tenant, the first request being used to indicate at least a first task to be performed by an intelligent system, and the first identifier indicating the instance type for performing the first task; The second module is used to obtain instance information based on the first identifier, wherein the instance information indicates the acquisition of the first instance; The third module is used to obtain the first instance based on the instance information and the first request; The fourth module is used to execute the first task based on the first instance.