Multi-tenant environment distribution method and device based on flow arrangement
By introducing process-based orchestration tenant pools and pre-opening tasks in a multi-tenant environment, the problems of insufficient response delay and flexibility in the existing technology are solved, and efficient and flexible tenant environment allocation is achieved, and complex and dynamic user needs are met.
Patent Information
- Application Number
- CN202411798549.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The prior art has problems of insufficient response delay and flexibility in application environments of multi-tenant, multi-version and dynamic tenant requests, and cannot meet user complex or dynamic tenant environment requests.
Using process orchestration methods, through tenant pools and pre-account opening tasks, we dynamically search and generate tenant environments that meet user needs to ensure rapid search and reuse of resources and achieve accurate allocation of resources.
It significantly improves the efficiency and flexibility of resource allocation, improves resource utilization and real-time user account opening, and ensures resource allocation capabilities in complex needs and dynamic scenarios.
Smart Images

Figure CN119788674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of multi-tenant SaaS platform resource management, and in particular to a method, device, electronic device and computer storage medium for allocating resources in a multi-tenant environment based on process orchestration. Background Art
[0002] In platforms such as SaaS (Software as a Service) that need to provide multiple different configuration environments, users usually need to obtain the corresponding tenant environment according to their own needs when applying for the corresponding services. The tenant environment may include the standard version, professional version and enterprise version corresponding to the customer management system; the merchant version, cross-border e-commerce version, etc. corresponding to the e-commerce platform; the team collaboration version or enterprise version corresponding to the collaborative office platform; the different tenant environment types correspond to different databases, product modules and functional permissions, etc., and the platform needs to allocate and configure the corresponding resources according to the user's tenant environment request to build the tenant environment requested by the user.
[0003] In the traditional tenant environment allocation process, manual configuration is usually required by administrators or staff, such as selecting product versions, module combinations, setting license quantities, setting usage periods, initializing data, etc. This can easily lead to errors due to the cumbersome process, thus affecting efficiency and causing allocation delays, affecting user experience.
[0004] Based on this, the existing technology can automatically allocate corresponding environment configurations according to the tenant environment requests submitted by the user by adopting preset rules and automated scripts to reduce manual intervention, thereby realizing automatic configuration of the user's tenant environment requests. However, when the user needs to expand the tenant environment or perform combined configuration in multiple environments, the preset rules may not meet the needs of all tenant environments, resulting in untimely allocation or inaccurate configuration when complex scenarios or rapidly changing scenario requests appear. Based on this, the existing technology has problems of response delay and insufficient flexibility in the application environment of multi-tenant, multi-version and dynamic tenant requests, resulting in the inability to meet the user's complex or dynamic tenant environment requests. Summary of the invention
[0005] Based on this, an object of the present invention is to provide a method for allocating a multi-tenant environment based on process orchestration.
[0006] A method for allocating a multi-tenant environment based on process orchestration includes the following steps:
[0007] S1. Obtain tenant service application data submitted by the user;
[0008] S2. Perform configuration analysis based on the tenant service application data to obtain key configuration parameters;
[0009] S3. Search the tenant pool according to the key configuration parameters and determine whether there is a matching tenant environment. If so, obtain a fully matching tenant environment and execute step S5. If not, execute step S4. The tenant pool is used to store several different types of tenant environments.
[0010] S4: Perform pre-account opening tasks on the current tenant pool to generate a fully matching tenant environment;
[0011] S5: Generate a unique user binding identifier based on the fully matched tenant environment to complete the allocation of the tenant environment.
[0012] Compared with the prior art, the method for allocating a multi-tenant environment based on process orchestration described in the present invention significantly improves the efficiency and flexibility of resource allocation by introducing a tenant pool and pre-account opening tasks; and by storing various types of tenant environments through the tenant pool, it supports rapid resource search and reuse, greatly improves resource utilization and enhances the real-time nature of user account opening. At the same time, when the tenant pool cannot fully match the user's needs, the pre-account opening task is automatically triggered to dynamically generate a tenant environment that meets the user's needs, thereby ensuring the timeliness of resource allocation. Accordingly, the present invention has the advantages of high resource reuse rate, strong dynamic expansion capability, and timely allocation.
[0013] Furthermore, the step S3 includes the following sub-steps:
[0014] Dynamically query according to key configuration parameters, combine tenant environments that meet the corresponding configurations in the tenant pool, and obtain a set of candidate tenant environments;
[0015] Next, query the status of the candidate tenant environment set and make a judgment based on the following logic:
[0016]
[0017] In the formula, status i Represents the i-th candidate tenant environment env i The allocation status of env i ≡config is a fully matched tenant environment; For differently configured tenant environments; option i Represents the i-th candidate tenant environment env i The matching status with the current key configuration parameters. If it is indicated as allocable, the current tenant environment env i As a fully matched tenant environment, execute step S5; if it is indicated as unassignable, generate a difference configuration item, and execute step S4;
[0018] The step S4 comprises the following sub-steps:
[0019] Generate a pre-account opening task according to the difference configuration items, and at the same time, extract the non-difference configuration items that meet the key configuration parameters in the current tenant environment, and generate the corresponding sub-process for initializing the required resources;
[0020] Then, when the pre-account opening task is completed, a fully matched tenant environment is obtained.
[0021] The present invention implements a full match priority strategy through status query to maximize the use of existing tenant pool resources and effectively reduce resource waste. At the same time, for partially matched tenant environments, by extracting differential configuration items in key configuration parameters, these differential configurations are independently generated and processed, thereby ensuring that the system can quickly respond to users' dynamic needs and avoid allocation delays caused by insufficient resource types. Accordingly, the present invention uses status query and differential configuration item extraction to achieve accurate resource allocation, thereby enhancing the flexible resource allocation capabilities for complex needs and dynamic scenarios, and significantly improving the utilization, response speed and adaptability of multi-tenant resource allocation.
[0022] Furthermore, the tenant pool is dynamically updated through the following steps:
[0023] SA1. Monitor the tenant pool and obtain the status of the current tenant pool;
[0024] SA2. Determine whether the status of the current tenant pool meets a trigger condition: if yes, execute step SA3; if no, execute step SA1;
[0025] The triggering conditions are specifically expressed as follows:
[0026]
[0027] In the formula, the tenant environment margin is represented by the allocable number of tenant environments in the current tenant pool, Th is the tenant environment warning number threshold; the initialization flag indicates whether there is an account opening failure event at present; the sampling timer indicates the dynamic update cycle of the tenant pool;
[0028] When the trigger condition for the update is that the tenant environment margin is lower than a threshold Th or is triggered by a set time, the known tenant environment template is called to generate a corresponding pre-account opening task according to the margin status of the current tenant pool resources;
[0029] When the update trigger condition is triggered by an account opening failure event, the pre-account opening task corresponding to the difference configuration item of the account opening failure is obtained, and the tenant environment template is called to generate a pre-account opening task with a lower balance in the current tenant pool;
[0030] SA3. Divide the pre-account opening task based on the BPMN mechanism to obtain several tenant configuration subtasks;
[0031] SA4. Connect several tenant configuration subtasks according to the sequence flow to obtain several tenant environment-related subprocesses and main processes;
[0032] SA5: Initialize the configuration based on the sub-processes and main processes associated with several tenant environments to complete the update of the tenant pool.
[0033] The present invention ensures that the allocable tenant environment in the tenant pool is always sufficient through dynamic monitoring of the tenant pool status, multi-condition trigger mechanism and BPMN task division. At the same time, when there is insufficient resources, account opening failure or dynamic demand scenario, the resource configuration can be quickly generated and adjusted through BPMN task division, thereby significantly improving the real-time response capability and resource utilization, thereby ensuring the timeliness and efficiency of resource allocation in complex multi-tenant scenarios.
[0034] Furthermore, the tenant pool dynamic update step SA3 includes the following sub-steps:
[0035] Prioritize all tenant environments that need to be updated in the pre-account opening task to obtain sorted tenant environments to be updated; wherein the priority sorting sets the tenant environment that fails to open an account as a priority update, sets the tenant environment with sufficient resources as a secondary update, and sets the tenant environment with insufficient resources as the last update;
[0036] According to the sorted tenant environment to be updated env i , generate several corresponding tenant configuration subtasks, for the i-th tenant environment env i The specific representation of the subtask generation logic is as follows:
[0037] task(env i )={t k |t k =(type k ,state k ,dependency k )}
[0038] In the formula, task(env i ) represents the set of subtasks for the i-th tenant environment to be updated, including several subtasks t k ;t k Indicates the i-th tenant environment env to be updated i The kth subtask of is composed of resource type, resource status and dependency relationship; type k Indicates the resource type of the kth subtask, such as database, storage, or functional module; statek Indicates the resource status of the kth subtask, including allocable, pending allocation, and unavailable; dependency k Represents the dependency relationship of the kth subtask;
[0039] The tenant pool dynamic update step SA4 includes the following sub-steps:
[0040] According to the dependency relationships among several tenant configuration subtasks, sequential flows are used to connect the mutually dependent tenant configuration subtasks to obtain several tenant environment-related subprocesses;
[0041] Integrate sub-processes associated with several tenant environments according to the corresponding tenant environments to obtain the main process;
[0042] The tenant pool dynamic update step SA5 includes the following sub-steps:
[0043] Concurrently initialize the sub-processes associated with the tenant environment according to the main process;
[0044] When all corresponding sub-processes in the main process are initialized, the status of the current tenant environment is updated to pending allocation and uploaded to the tenant pool to complete the update of the tenant pool;
[0045] At the same time, if the tenant environment initialized by the current pre-account opening task is a difference configuration item triggered by an account opening failure, the resources of the tenant environment template are updated according to the corresponding configuration item.
[0046] Accordingly, when dealing with insufficient resources, account opening failures or dynamic demand scenarios, the real-time and utilization of resource allocation is ensured through task priority strategies and concurrent initialization. At the same time, the present invention enriches the resource types of the tenant pool through the update mechanism of the tenant environment template, thereby providing self-optimization and continuous expansion capabilities for complex multi-tenant scenarios, and thus more adaptable to the application environment of multi-tenants, multi-versions and dynamic tenant requests.
[0047] A multi-tenant resource allocation device based on process orchestration, comprising a tenant application data acquisition unit, a configuration parsing unit, a tenant pool search unit, a pre-account opening unit and a tenant environment initialization unit;
[0048] The tenant application data acquisition unit is used to acquire tenant service application data submitted by the user;
[0049] The configuration parsing unit is used to perform configuration parsing according to the tenant service application data to obtain key configuration parameters;
[0050] The tenant pool search unit is used to search the tenant pool according to the key configuration parameters and determine whether there is a matching tenant environment: if so, obtain a fully matching tenant environment and call the tenant environment initialization unit; if not, call the pre-account opening unit; wherein the tenant pool is used to store several different types of tenant environments;
[0051] The pre-account opening unit is used to perform a pre-account opening task on the current tenant pool to generate a fully matching tenant environment;
[0052] The tenant environment initialization unit is used to generate a unique user binding identifier according to a completely matched tenant environment to complete the allocation of the tenant environment.
[0053] Furthermore, the tenant pool search unit is used to perform the following sub-steps:
[0054] Dynamically query according to key configuration parameters, combine tenant environments that meet the corresponding configurations in the tenant pool, and obtain a set of candidate tenant environments;
[0055] Next, query the status of the candidate tenant environment set and make a judgment based on the following logic:
[0056]
[0057] In the formula, status i Represents the i-th candidate tenant environment env i The allocation status of env i ≡config is a fully matched tenant environment; For differently configured tenant environments; option i Represents the i-th candidate tenant environment env i The matching status with the current key configuration parameters. If it is indicated as allocable, the current tenant environment env i as a fully matched tenant environment, and calling the tenant environment initialization unit; if it is indicated as unallocatable, generating a difference configuration item, and calling the pre-account opening unit;
[0058] The pre-account opening unit is used to perform the following sub-steps:
[0059] Generate a pre-account opening task according to the difference configuration items, and at the same time, extract the non-difference configuration items that meet the key configuration parameters in the current tenant environment, and generate the corresponding sub-process for initializing the required resources;
[0060] Then, when the pre-account opening task is completed, a fully matched tenant environment is obtained.
[0061] Furthermore, the tenant pool is dynamically updated through the following steps:
[0062] SA1. Monitor the tenant pool and obtain the status of the current tenant pool;
[0063] SA2. Determine whether the status of the current tenant pool meets a trigger condition: if yes, execute step SA3; if no, execute step SA1;
[0064] The triggering conditions are specifically expressed as follows:
[0065]
[0066] In the formula, the tenant environment margin is represented by the allocable number of tenant environments in the current tenant pool, Th is the tenant environment warning number threshold; the initialization flag indicates whether there is an account opening failure event at present; the sampling timer indicates the dynamic update cycle of the tenant pool;
[0067] When the trigger condition for the update is that the tenant environment margin is lower than a threshold Th or is triggered by a set time, the known tenant environment template is called to generate a corresponding pre-account opening task according to the margin status of the current tenant pool resources;
[0068] When the update trigger condition is triggered by an account opening failure event, the pre-account opening task corresponding to the difference configuration item of the account opening failure is obtained, and the tenant environment template is called to generate a pre-account opening task with a lower balance in the current tenant pool;
[0069] SA3. Divide the pre-account opening task based on the BPMN mechanism to obtain several tenant configuration subtasks;
[0070] SA4. Connect several tenant configuration subtasks according to the sequence flow to obtain several tenant environment-related subprocesses and main processes;
[0071] SA5: Initialize the configuration based on the sub-processes and main processes associated with several tenant environments to complete the update of the tenant pool.
[0072] Furthermore, the tenant pool dynamic update step SA3 includes the following sub-steps:
[0073] Prioritize all tenant environments that need to be updated in the pre-account opening task to obtain sorted tenant environments to be updated; wherein the priority sorting sets the tenant environment that fails to open an account as a priority update, sets the tenant environment with sufficient resources as a secondary update, and sets the tenant environment with insufficient resources as the last update;
[0074] According to the sorted tenant environment to be updated env i , generate several corresponding tenant configuration subtasks, for the i-th tenant environment env i The specific representation of the subtask generation logic is as follows:
[0075] task(env i )={t k |t k =(type k ,state k ,dependency k )}
[0076] In the formula, task(env i ) represents the set of subtasks for the i-th tenant environment to be updated, including several subtasks t k ;t k Indicates the i-th tenant environment env to be updated i The kth subtask of is composed of resource type, resource status and dependency relationship; type k Indicates the resource type of the kth subtask, such as database, storage, or functional module; state k Indicates the resource status of the kth subtask, including allocable, pending allocation, and unavailable; dependency k Represents the dependency relationship of the kth subtask;
[0077] The tenant pool dynamic update step SA4 includes the following sub-steps:
[0078] According to the dependency relationships among several tenant configuration subtasks, sequential flows are used to connect the mutually dependent tenant configuration subtasks to obtain several tenant environment-related subprocesses;
[0079] Integrate sub-processes associated with several tenant environments according to the corresponding tenant environments to obtain the main process;
[0080] The tenant pool dynamic update step SA5 includes the following sub-steps:
[0081] Concurrently initialize the sub-processes associated with the tenant environment according to the main process;
[0082] When all corresponding sub-processes in the main process are initialized, the status of the current tenant environment is updated to pending allocation and uploaded to the tenant pool to complete the update of the tenant pool;
[0083] At the same time, if the tenant environment initialized by the current pre-account opening task is a difference configuration item triggered by an account opening failure, the resources of the tenant environment template are updated according to the corresponding configuration item.
[0084] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1This is a simplified structural diagram of the multi-tenant resource allocation device based on process orchestration according to the present invention;
[0086] Figure 2 A simplified flow chart of the allocation method for a multi-tenant environment based on process orchestration according to the present invention;
[0087] Figure 3 It is a simplified schematic diagram of an example of a simulation process of the allocation method for a multi-tenant environment based on process orchestration described in the present invention. DETAILED DESCRIPTION
[0088] In order to solve the problems of response delay and insufficient flexibility in the application environment of multi-tenant, multi-version and dynamic tenant request in the prior art, the present invention performs configuration analysis on the tenant application data to obtain key configuration parameters, and searches the tenant pool according to the key configuration parameters. If there is a qualified tenant environment in the tenant pool, it is directly allocated; if not, a pre-account opening task is generated according to the key configuration parameters, and the fully matched tenant environment after pre-account opening is allocated to the user, thereby completing the account opening. Among them, the tenant pool is dynamically updated and supplemented through an event-driven mechanism to ensure that the tenant environment is always available; the pre-account opening task is modularized by the process of tenant environment initialization based on BPMN process orchestration, so as to flexibly dynamically combine resources according to user needs. Accordingly, the present invention uses dynamic tenant management, BPMN process orchestration to open an account, and combines the event-driven mechanism to supplement and expand the tenant pool, thereby ensuring that the system can provide real-time, accurate and customized tenant environment allocation under high concurrency and rapid changes in user needs, significantly improving the flexibility and response speed of tenant allocation.
[0089] Based on the above design, the present invention proposes a method for allocating resources in a multi-tenant environment based on process orchestration, and based on this method, proposes a multi-tenant resource allocation device based on process orchestration.
[0090] Please also see Figure 1 , Figure 2 and Figure 3 , Figure 1 is a simplified structural diagram of the multi-tenant resource allocation device based on process orchestration according to the present invention, Figure 2 It is a simplified flow chart of the allocation method of a multi-tenant environment based on process orchestration according to the present invention. Figure 3 It is a simplified schematic diagram of an example of a simulation process of the allocation method for a multi-tenant environment based on process orchestration described in the present invention.
[0091] The multi-tenant resource allocation device based on process orchestration includes a tenant application data acquisition unit 1, a configuration parsing unit 2, a tenant pool search unit 3, a pre-account opening unit 4 and a tenant environment initialization unit 5.
[0092] The tenant application data acquisition unit 1 is used to execute step S1: acquiring tenant service application data submitted by a user.
[0093] Specifically, the tenant service application data may optionally include product modules and subscription information. The product modules include basic modules, secondary modules, and value-added modules, and the subscription information includes license quantity, subscription period, etc. The specific representation of the tenant service application data is as follows:
[0094] Apply = {{d i =get(d i )|i∈[1,n]},{s j =get(s j )|j∈[1,m]}}
[0095] Where, Apply represents the tenant service application data; d i represents the i-th selected product module, n represents the total number of optional product modules; s j represents the jth selected subscription information, m represents the total number of optional subscription information; get(·) means extracting related product modules or subscription information through the data selected by the user on the front-end interface or submitted by the API interface.
[0096] Users can select the corresponding product modules and corresponding subscription information according to their own needs, or choose templates provided by the platform, such as the standard version of AI function modules, the cloud service demo version, etc., which can include different versions of services. For example, the same service can be selected as a demo version, basic version, advanced version or customized version;
[0097] Subscription information has different options according to the marketing methods of different platforms, such as: the number of user sharing licenses, the number of device connection licenses, or the daily, monthly, quarterly or annual subscription period, etc. Accordingly, the present invention does not specifically limit the specific details of its product modules (services) and subscription information.
[0098] The configuration parsing unit 2 is used to execute step S2: perform configuration parsing according to the tenant service application data to obtain key configuration parameters.
[0099] Specifically, the configuration parsing applies the product module d in the tenant service application data Apply i and subscription information j Match and convert into a configuration list for subsequent search to see if there is a tenant environment with corresponding configuration in the tenant pool, so as to obtain key configuration parameters. The specific representation of the key configuration parameter Config is as follows:
[0100] Config = {Cfg d ,Cfgs}
[0101] Where, Cfg d It is a configuration set related to product module d, which is used to define the system requirements and environment dependencies of each product module. The specific options include operating system type, version number, database version, library file version, etc.; Cfg s A configuration collection related to subscription information s, which is used to define the tenant's subscription requirements and resource restrictions. The options include the number of users, number of shared devices, storage capacity, number of API calls, etc.
[0102] Among them, the matching rules are based on the system preset template, or the rule engine processing, which is used to convert the tenant service application data into a standard configuration available to the system. For example: the tenant service application data submitted by the user is "Demo Version-Trial-Single User", then the preset template converts it into "System Type A-Function Limitation B-Resource Requirements C" to obtain key configuration parameters.
[0103] Since different matching rules can be customized according to different services, the present invention does not specifically limit the selection of the matching rules.
[0104] The tenant pool search unit 3 is used to execute step S3: search the tenant pool according to the key configuration parameters, and determine whether there is a matching tenant environment: if so, call the tenant environment initialization unit 5; if not, call the pre-account opening unit 4.
[0105] Specifically, a dynamic query is performed according to the key configuration parameter Config, and tenant environments in the tenant pool that meet the corresponding configuration are combined to obtain a set of candidate tenant environments;
[0106] The dynamic query uses a preset rule template or rule engine to query the tenant pool to quickly filter tenant environments with large configuration differences; the candidate tenant environment set includes a fully matched tenant environment and a tenant environment with different configurations, and the fully matched tenant environment, env i ≡config, indicating that all configuration items of the tenant environment are consistent with the key configuration parameters; the tenant environment with different configurations, Indicates that some configuration items of the tenant environment meet the key difference parameters.
[0107] Next, query the status of the candidate tenant environment set and make a judgment based on the following logic:
[0108]
[0109] In the formula, status i Represents the i-th candidate tenant environment env iAllocation status of option i Represents the i-th candidate tenant environment env i The matching status with the current key configuration parameters. If it is indicated as allocable, the current tenant environment env i As a completely matched tenant environment, the tenant environment initialization unit 5 is called; if it is indicated as unallocatable, a difference configuration item is generated, and the pre-account opening unit 4 is called.
[0110] It should be noted that in the dynamic query and allocation process, in order to ensure that the tenant environment in the tenant pool will not be repeatedly allocated in a high concurrency scenario, the present invention further performs a state locking operation on the tenant environment in the tenant pool to ensure that the tenant pool state follows the ACID principle and ensures the accuracy and consistency of tenant environment allocation.
[0111] Based on this, the present invention can not only quickly find and allocate tenant environments that meet user needs, but also, in the absence of a completely matching tenant environment, further perform pre-account opening tasks through differentially configured tenant environments, thereby maximizing resource utilization and significantly reducing account opening time.
[0112] The pre-account opening unit 4 is used to execute step S4: perform a pre-account opening task on the current tenant pool to generate a completely matching tenant environment.
[0113] Specifically, a pre-account opening task is generated according to the difference configuration item, and in the process of waiting for the pre-account opening, non-difference configuration items that have met the key configuration parameters in the current tenant environment are extracted to generate a sub-process for initializing the corresponding required resources; wherein the pre-account opening task includes operations of resource replenishment and resource initialization corresponding to the difference configuration item;
[0114] When the pre-account opening task is completed, a completely matching tenant environment is generated, and the tenant environment initialization unit 5 is directly called.
[0115] Accordingly, in the execution of the pre-account opening task, the present invention adopts an asynchronous parallel mechanism to achieve efficient coordination of resource replenishment and module initialization tasks, reuses the already configured resource initialization sub-process, and quickly generates a fully matching tenant environment, thereby greatly improving the system response speed and significantly shortening the waiting time for user account opening.
[0116] The tenant environment initialization unit 5 is used to execute step S5: assigning a completely matching tenant environment to a corresponding user to complete account opening.
[0117] Specifically, a unique user binding identifier is generated based on the fully matched tenant environment to ensure the user's exclusive access to and use of the tenant environment, and the corresponding tenant environment allocation status status in the tenant pool is updated to "allocated" to complete the allocation of the tenant environment.
[0118] In order to ensure that the tenant environment in the tenant pool maintains sufficient allocable tenant environment, the present invention adopts an event-driven mechanism to monitor the tenant pool. When the monitored information meets the update triggering condition, the pre-account opening task is executed to dynamically update the tenant pool. The dynamic update of the tenant pool specifically includes the following steps:
[0119] SA1: Monitor the tenant pool and obtain the status of the current tenant pool.
[0120] Among them, the status of the current tenant pool includes the tenant environment margin of each version, the initialization status and the sampling timer, etc. The resource margin is the resource data that can be allocated by the current tenant pool; the initialization status is used to characterize the events of successful account opening and the events of failed account opening; the sampling timer is the update interval of the tenant pool.
[0121] SA2: Determine whether the status of the current tenant pool meets a trigger condition: if so, execute step SA3; if not, execute step SA1.
[0122] The triggering conditions are specifically expressed as follows:
[0123]
[0124] Wherein, the tenant environment margin is represented by the allocatable number of tenant environments in the current tenant pool, Th is the tenant environment warning number threshold, which is used to ensure that the allocatable number of different tenant environments is not less than a certain number; the initialization flag indicates whether there is an account opening failure event at present, and when an account opening failure event occurs, the dynamic update process of the tenant pool is immediately called to ensure that the corresponding tenant environment is allocated to the user as quickly as possible; the sampling timer indicates the dynamic update cycle of the tenant pool;
[0125] When the update trigger condition is that the tenant environment margin is lower than a threshold or is triggered by a set time, the known tenant environment template is called to generate the corresponding pre-account opening task according to the margin status of the current tenant pool resources, thereby ensuring that the configuration of the commonly used tenant environment in the tenant pool is maintained at a reasonable level;
[0126] When the update trigger condition is triggered by an account opening failure event, the pre-account opening task corresponding to the difference configuration item of the account opening failure is obtained, and the tenant environment template is called to generate the pre-account opening task with a lower balance in the current tenant pool, thereby supplementing other common tenant environment types in the tenant pool.
[0127] The tenant environment template has different configuration templates according to different resource types, and different tenant environments can be formed by combining different configuration templates.
[0128] It should be noted that since account opening failure may involve unmatched configuration parameters or missing tenant environment templates, in order to ensure the security and consistency of environment configuration, the present invention will make template supplementary records for the difference configuration items of account opening failure when generating the pre-account opening task. If the current template cannot directly support these configuration items, the failure reason will be recorded through template supplementary records and the operation and maintenance personnel will be notified to intervene in the process. At the same time, logs will be generated for the difference configuration items for subsequent template optimization, so as to ensure timely supplement of the tenant environment types missing due to account opening failure, and then when the pre-account opening task is successful, the tenant environment template resources of the tenant pool will be gradually enriched and improved to meet the diverse user needs.
[0129] SA3: Divide the pre-account opening task based on the BPMN mechanism to obtain several tenant configuration subtasks.
[0130] Specifically, all tenant environments that need to be updated in the pre-account opening task are prioritized to obtain prioritized tenant environments to be updated; wherein, the priority sorting sets the tenant environment that fails to open an account as a priority update, the tenant environment with sufficient resources as a secondary update, and the tenant environment with insufficient resources as the last update.
[0131] Next, according to the sorted tenant environment env to be updated i , generate several corresponding tenant configuration subtasks, for the i-th tenant environment env i The specific representation of the subtask generation logic is as follows:
[0132] task(env i )={t k |t k =(type k ,state k ,dependency k )}
[0133] In the formula, task(env i ) represents the set of subtasks for the i-th tenant environment to be updated, including several subtasks t k ;t k Indicates the i-th tenant environment env to be updated i The kth subtask of is composed of resource type, resource status and dependency relationship;
[0134] type k Indicates the resource type of the kth subtask, such as database, storage, or functional module;
[0135] state k Indicates the resource status of the kth subtask, including allocatable, pending, and unavailable. When the resource status is marked as allocatable, it means that the resources required by the current subtask are sufficient and initialization can be performed directly.
[0136] When the resource status is To be allocated, it means that the resources required for the current subtask are missing and you need to wait for the resources to be replenished;
[0137] When the resource status is unavailable, it means that the resources required by the current subtask are abnormal and the operation and maintenance personnel need to intervene;
[0138] dependency k Indicates the dependency of the kth subtask, which is used to indicate the associated conditions of the resources and execution logic of the current subtask and other subtasks, to ensure that all subtasks can be executed in the correct order, thereby avoiding resource conflicts or task execution errors. For example, if the resources required by the current subtask are provided by other subtasks after completion: the database initialization task depends on the storage resource replenishment task; or, the current subtask depends on the functional modules that have been completed by other tasks: the module deployment task waits for the completion of the basic module initialization. Based on this, the related subtasks can be sequentially associated through the dependency relationship to avoid resource conflicts, repeated resource calls or execution errors, thereby ensuring the efficient processing of the pre-account opening task.
[0139] Since the dependencies of subtasks vary according to the business scenarios, functional modules and resource requirements of different SaaS services, their resource dependencies are also completely different. Therefore, the present invention aggregates the dependencies of all tasks by constructing a resource dependency tree through operation and maintenance personnel, and generates dependencies corresponding to the resources and functions required for different tasks through bracket sorting, thereby ensuring that the resource usage and execution logic of the task will not conflict.
[0140] However, the dependency relationship can be constructed or divided in different ways according to different actual scenarios. Therefore, the present invention does not specifically limit the specific definition and generation rules of its dependency relationship to ensure that diverse SaaS service needs are met, thereby adapting to the complex dependency structure of different SaaS service scenarios.
[0141] It should be noted that for unavailable resource states involved in task generation, the present invention will generate corresponding marking information to notify operation and maintenance personnel to perform resource allocation and authority adjustment, thereby ensuring authority separation and preventing security risks caused by system automation processes, thereby ensuring that all resource allocations comply with the system's security policies.
[0142] SA4: Connect several tenant configuration subtasks according to the sequence flow to obtain several tenant environment-related subprocesses and main processes.
[0143] Specifically, according to the dependencies among several tenant configuration subtasks, sequential flows are used to connect the mutually dependent tenant configuration subtasks to obtain sub-processes associated with several tenant environments; wherein the associated sub-processes are used to represent a local task set, which is used to complete the initialization configuration of resources or modules required for the subtasks.
[0144] Next, several sub-processes associated with the tenant environments are integrated according to the corresponding tenant environments to obtain a main process; the main process is used to represent a complete path for initialization configuration of the current tenant environment.
[0145] Accordingly, the present invention integrates local subtasks into related sub-processes based on dependencies, thereby avoiding problems such as repeated resource calls, invalid waiting or resource competition, thereby improving the efficiency of task execution and the overall visibility of the process. In addition, through the structured design of the main process and sub-processes, it is ensured that the initialization process of each tenant environment completes the initialization according to the established logic, thereby avoiding process anomalies caused by resource conflicts. At the same time, through the independent division of the main process, the present invention effectively solves the resource sharing problem that may exist in a multi-tenant environment, ensures the stability and flexibility of the system in high-concurrency scenarios, and meets the requirements of the multi-tenant SaaS platform for resource isolation, configuration optimization and task execution efficiency, significantly improving the overall performance and user experience of tenant environment initialization.
[0146] SA5: Initialize the configuration based on the sub-processes and main processes associated with several tenant environments to complete the update of the tenant pool.
[0147] Specifically, the sub-processes associated with the tenant environment are initialized concurrently according to the main process, and the sub-processes that have completed the initialization are marked with a status.
[0148] When all corresponding sub-processes in the main process are initialized, the status of the current tenant environment is updated to pending allocation and uploaded to the tenant pool to complete the update of the tenant pool.
[0149] At the same time, if the tenant environment initialized by the current pre-account opening task is a differential configuration item triggered by an account opening failure, the resources of the tenant environment template are updated according to the corresponding configuration item so that other users can directly call it when applying for the same tenant environment configuration.
[0150] Accordingly, for newly added tenant environments or differential configuration tasks generated due to account opening failures, the tenant pool is dynamically updated so that the corresponding preset template components in the tenant pool cover more user demand scenarios, realizing the self-iteration and optimization capabilities of the tenant pool, and enabling the tenant pool to store more tenant environment templates that better meet the needs of platform users.
[0151] Compared with the prior art, the present invention is based on a tenant pool and a priority matching mechanism to ensure real-time response to the account opening request of the tenant environment, and to ensure that the allocation of the tenant environment has significant real-time and accuracy in complex scenarios or rapidly changing dynamic environments, thereby effectively avoiding allocation delays or inaccurate configuration problems, and further improving the adaptability to multi-tenant and multi-version requests.
[0152] In addition, the present invention uses a dynamic update and expansion mechanism of the tenant pool. When dealing with scenarios of insufficient resources or account opening failures, it can dynamically supplement resources by generating differential configuration tasks. At the same time, it can update new types of tenant environment templates to continuously enrich the types of tenant environments, thereby significantly improving the flexibility of tenant environment allocation, thereby meeting the efficient processing of complex and dynamic demand changes in multi-tenant environments.
[0153] Based on the same inventive concept, the present application also provides an electronic device, which may be a terminal device such as a server, a desktop computing device or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). The device includes one or more processors and a memory, wherein the processor is used to execute a program to implement the allocation method of a multi-tenant environment based on process orchestration according to an embodiment of the present invention; and the memory is used to store a computer program executable by the processor.
[0154] Based on the same inventive concept, the present application also provides a computer-readable storage medium, corresponding to the aforementioned embodiment of the allocation method for a multi-tenant environment based on process orchestration, wherein the computer-readable storage medium stores a computer program thereon, and when the program is executed by a processor, the steps of the allocation method for a multi-tenant environment based on process orchestration recorded in any of the above embodiments are implemented.
[0155] The present application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0156] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.
Claims
1. A method for allocating a multi-tenant environment based on process orchestration, characterized in that: The following steps are involved: S1. Obtain tenant service application data submitted by the user; S2. Perform configuration analysis based on the tenant service application data to obtain key configuration parameters; S3. Search the tenant pool according to the key configuration parameters and determine whether there is a matching tenant environment. If so, obtain a fully matching tenant environment and execute step S5. If not, execute step S4. The tenant pool is used to store several different types of tenant environments. S4: Perform pre-account opening tasks on the current tenant pool to generate a fully matching tenant environment; S5: Generate a unique user binding identifier based on the fully matched tenant environment to complete the allocation of the tenant environment.
2. The allocation method for a multi-tenant environment based on process orchestration according to claim 1, characterized in that: The step S3 comprises the following sub-steps: Dynamically query according to key configuration parameters, combine tenant environments in the tenant pool that meet the corresponding configuration, and obtain a set of candidate tenant environments; Next, query the status of the candidate tenant environment set and make a judgment based on the following logic: In the formula, status i Represents the i-th candidate tenant environment env i The allocation status of env i ≡config is a fully matched tenant environment; For differently configured tenant environments; option i Represents the i-th candidate tenant environment env i The matching status with the current key configuration parameters. If it is indicated as allocable, the current tenant environment env i As a fully matched tenant environment, execute step S5; if it is indicated as unassignable, generate a difference configuration item, and execute step S4; The step S4 comprises the following sub-steps: Generate a pre-account opening task according to the difference configuration items, and at the same time, extract the non-difference configuration items that meet the key configuration parameters in the current tenant environment, and generate the corresponding sub-process for initializing the required resources; Then, when the pre-account opening task is completed, a fully matched tenant environment is obtained.
3. The allocation method for a multi-tenant environment based on process orchestration according to claim 2, characterized in that: The tenant pool is dynamically updated by the following steps: SA1. Monitor the tenant pool and obtain the status of the current tenant pool; SA2. Determine whether the status of the current tenant pool meets a trigger condition: if yes, execute step SA3; if no, execute step SA1; The triggering conditions are specifically expressed as follows: In the formula, the tenant environment margin is represented by the allocable number of tenant environments in the current tenant pool, Th is the threshold value of the tenant environment warning number; the initialization flag indicates whether there is an account opening failure event at present; the sampling timer indicates the dynamic update cycle of the tenant pool; When the trigger condition for the update is that the tenant environment margin is lower than a threshold value Th or is triggered by a set time, the known tenant environment template is called to generate a corresponding pre-account opening task according to the margin status of the current tenant pool resources; When the update trigger condition is triggered by an account opening failure event, the pre-account opening task corresponding to the difference configuration item of the account opening failure is obtained, and the tenant environment template is called to generate a pre-account opening task with a lower balance in the current tenant pool; SA3. Divide the pre-account opening task based on the BPMN mechanism to obtain several tenant configuration subtasks; SA4. Connect several tenant configuration subtasks according to the sequence flow to obtain several tenant environment-related subprocesses and main processes; SA5: Initialize the configuration based on the sub-processes and main processes associated with several tenant environments to complete the update of the tenant pool.
4. The allocation method for a multi-tenant environment based on process orchestration according to claim 3, characterized in that: The tenant pool dynamic update step SA3 includes the following sub-steps: Prioritize all tenant environments that need to be updated in the pre-account opening task to obtain sorted tenant environments to be updated; wherein the priority sorting sets the tenant environment that fails to open an account as a priority update, sets the tenant environment with sufficient resources as a secondary update, and sets the tenant environment with insufficient resources as the last update; According to the sorted tenant environment to be updated env i , generate several corresponding tenant configuration subtasks, for the i-th tenant environment env i The specific representation of the subtask generation logic is as follows: task(env i )={t k |t k =(type k ,state k ,dependency k )} In the formula, task(env i ) represents the subtask set of the i-th tenant environment to be updated, including several subtasks t k ;t k Indicates the i-th tenant environment env to be updated i The kth subtask of is composed of resource type, resource status and dependency relationship; type k Indicates the resource type of the kth subtask, such as database, storage, or functional module; state k Indicates the resource status of the kth subtask, including allocable, pending allocation, and unavailable; dependency k Represents the dependency relationship of the kth subtask; The tenant pool dynamic update step SA4 includes the following sub-steps: According to the dependency relationships among several tenant configuration subtasks, sequential flows are used to connect the mutually dependent tenant configuration subtasks to obtain several tenant environment-related subprocesses; Integrate sub-processes associated with several tenant environments according to the corresponding tenant environments to obtain the main process; The tenant pool dynamic update step SA5 includes the following sub-steps: Concurrently initialize the sub-processes associated with the tenant environment according to the main process; When all corresponding sub-processes in the main process are initialized, the status of the current tenant environment is updated to pending allocation and uploaded to the tenant pool to complete the update of the tenant pool; At the same time, if the tenant environment initialized by the current pre-account opening task is a difference configuration item triggered by an account opening failure, the resources of the tenant environment template are updated according to the corresponding configuration item.
5. A multi-tenant resource allocation device based on process orchestration, characterized in that: It includes a tenant application data acquisition unit, a configuration parsing unit, a tenant pool search unit, a pre-account opening unit and a tenant environment initialization unit; The tenant application data acquisition unit is used to acquire tenant service application data submitted by the user; The configuration parsing unit is used to perform configuration parsing according to the tenant service application data to obtain key configuration parameters; The tenant pool search unit is used to search the tenant pool according to the key configuration parameters and determine whether there is a matching tenant environment: if so, obtain a fully matching tenant environment and call the tenant environment initialization unit; if not, call the pre-account opening unit; wherein the tenant pool is used to store several different types of tenant environments; The pre-account opening unit is used to perform a pre-account opening task on the current tenant pool to generate a fully matching tenant environment; The tenant environment initialization unit is used to generate a unique user binding identifier according to a completely matched tenant environment to complete the allocation of the tenant environment.
6. The multi-tenant resource allocation device based on process orchestration according to claim 5, characterized in that: The tenant pool search unit is used to perform the following sub-steps: Dynamically query according to key configuration parameters, combine tenant environments in the tenant pool that meet the corresponding configuration, and obtain a set of candidate tenant environments; Next, query the status of the candidate tenant environment set and make a judgment based on the following logic: In the formula, status i Represents the i-th candidate tenant environment env i The allocation status of env i ≡config is a fully matched tenant environment; For differently configured tenant environments; option i Represents the i-th candidate tenant environment env i The matching status with the current key configuration parameters. If it is indicated as allocable, the current tenant environment env i as a fully matched tenant environment, and calling the tenant environment initialization unit; if it is indicated as unallocatable, generating a difference configuration item, and calling the pre-account opening unit; The pre-account opening unit is used to perform the following sub-steps: Generate a pre-account opening task according to the difference configuration items, and at the same time, extract the non-difference configuration items that meet the key configuration parameters in the current tenant environment, and generate the corresponding sub-process for initializing the required resources; Then, when the pre-account opening task is completed, a fully matched tenant environment is obtained.
7. The multi-tenant resource allocation device based on process orchestration according to claim 6, characterized in that: The tenant pool is dynamically updated by the following steps: SA1. Monitor the tenant pool and obtain the status of the current tenant pool; SA2. Determine whether the status of the current tenant pool meets a trigger condition: if yes, execute step SA3; if no, execute step SA1; The triggering conditions are specifically expressed as follows: In the formula, the tenant environment margin is represented by the allocable number of tenant environments in the current tenant pool, Th is the threshold value of the tenant environment warning number; the initialization flag indicates whether there is an account opening failure event at present; the sampling timer indicates the dynamic update cycle of the tenant pool; When the trigger condition for the update is that the tenant environment margin is lower than a threshold Th or is triggered by a set time, the known tenant environment template is called to generate a corresponding pre-account opening task according to the margin status of the current tenant pool resources; When the update trigger condition is triggered by an account opening failure event, the pre-account opening task corresponding to the difference configuration item of the account opening failure is obtained, and the tenant environment template is called to generate a pre-account opening task with a lower balance in the current tenant pool; SA3. Divide the pre-account opening task based on the BPMN mechanism to obtain several tenant configuration subtasks; SA4. Connect several tenant configuration subtasks according to the sequence flow to obtain several tenant environment-related subprocesses and main processes; SA5: Initialize the configuration based on the sub-processes and main processes associated with several tenant environments to complete the update of the tenant pool.
8. The multi-tenant resource allocation device based on process orchestration according to claim 7, characterized in that: The tenant pool dynamic update step SA3 includes the following sub-steps: Prioritize all tenant environments that need to be updated in the pre-account opening task to obtain sorted tenant environments to be updated; wherein the priority sorting sets the tenant environment that fails to open an account as a priority update, sets the tenant environment with sufficient resources as a secondary update, and sets the tenant environment with insufficient resources as the last update; According to the sorted tenant environment to be updated env i , generate several corresponding tenant configuration subtasks, for the i-th tenant environment env i The specific representation of the subtask generation logic is as follows: task(env i )={t k |t k =(type k ,state k ,dependency k )} In the formula, task(env i ) represents the set of subtasks for the i-th tenant environment to be updated, including several subtasks t k ;t k Indicates the i-th tenant environment env to be updated i The kth subtask of is composed of resource type, resource status and dependency relationship; type k Indicates the resource type of the kth subtask, such as database, storage, or functional module; state k Indicates the resource status of the kth subtask, including allocable, pending, and unavailable; dependency k Represents the dependency relationship of the kth subtask; The tenant pool dynamic update step SA4 includes the following sub-steps: According to the dependency relationships among several tenant configuration subtasks, sequential flows are used to connect the mutually dependent tenant configuration subtasks to obtain several tenant environment-related subprocesses; Integrate sub-processes associated with several tenant environments according to the corresponding tenant environments to obtain the main process; The tenant pool dynamic update step SA5 includes the following sub-steps: Concurrently initialize the sub-processes associated with the tenant environment according to the main process; When all corresponding sub-processes in the main process are initialized, the status of the current tenant environment is updated to pending allocation and uploaded to the tenant pool to complete the update of the tenant pool; At the same time, if the tenant environment initialized by the current pre-account opening task is a difference configuration item triggered by an account opening failure, the resources of the tenant environment template are updated according to the corresponding configuration item.
9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for allocating a multi-tenant environment based on process orchestration as described in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, a method for allocating a multi-tenant environment based on process orchestration as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Multi-tenant performance isolation framework based on virtualization technology
CN104142864A
Cloud resource scheduling method
CN107070705A
Multi-tenant-oriented image cloud service system and method
CN110311973A
Service process dynamic customization system and method based on multi-tenant mode
CN112488655A
Data access method and device in cloud service multi-tenant environment
CN113051038A