Multi-tenant resource allocation method and system based on internal bus of application system
By building a multi-tenant technology base and pluggable components within the application system, the problem of low resource allocation efficiency in traditional systems is solved, efficient management and scheduling of multi-tenant resources is achieved, and the flexibility and scalability of the system are improved.
Patent Information
- Application Number
- CN202410507246.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-09-10
AI Technical Summary
The fixed and rigid design of the internal bus of traditional application systems leads to inefficiency and resource waste in multi-tenant resource allocation, and cannot meet the reasonable and efficient sharing and allocation needs of resources among tenants.
By pre-building target application instances and multi-tenant technology bases, including pluggable functional components, it receives deployment instructions from the tenant management side, filters, processes and converts them into application internal bus messages to achieve resource allocation.
It realizes efficient and reasonable resource management and scheduling in multi-tenant systems, solves the problems of resource waste and low efficiency, and improves the flexibility and scalability of the system.
Smart Images

Figure CN118626248A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a multi-tenant resource allocation method and system based on an internal bus of an application system. Background Art
[0002] With the popularization of cloud computing technology and the rise of the SaaS model, multi-tenant technology has become a core component of modern application systems. With the increasing complexity of business needs and the rapid development of technology, the functions of multi-tenant application systems need to be continuously expanded and updated, which requires the internal bus of the application system (usually the key component responsible for handling the communication between the tenant management end and the application system) to have a high degree of flexibility and scalability. However, the fixed and rigid design of the internal bus of the traditional application system makes it unable to meet the needs of reasonable and efficient sharing and allocation of resources between tenants in terms of multi-tenant resource allocation, which leads to technical problems of resource waste and inefficiency in the management and scheduling of tenant resources in the existing technology. Summary of the invention
[0003] The present application provides a multi-tenant resource allocation method and system based on the internal bus of the application system, which effectively solves the technical problems of resource waste and low efficiency in the management and scheduling of tenant resources in the prior art, and achieves the technical effect of efficiently and reasonably managing and scheduling tenant resources by establishing a multi-tenant technology base in the multi-tenant system.
[0004] The present application provides a multi-tenant resource allocation method and system based on an internal bus of an application system, and the technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a multi-tenant resource allocation method based on an internal bus of an application system, the method comprising:
[0006] Pre-building a target application instance, wherein the target application instance is mapped to a target management tenant, and the target application instance is in an application system;
[0007] Building and generating a target multi-tenant technology base based on the target management tenant, wherein the target multi-tenant technology base includes a plurality of pluggable functional components;
[0008] Synchronize the target multi-tenant technology base mapping to the target application instance;
[0009] The target application instance receives a management-end deployment instruction sent by a tenant management end;
[0010] Filtering the management-side deployment instructions based on the target multi-tenant technology base to obtain tenant-related instructions;
[0011] Convert the tenant-related instructions into application internal bus messages;
[0012] The multiple pluggable functional components of the target multi-tenant technology base receive the application internal bus message to perform resource allocation.
[0013] In a second aspect, an embodiment of the present application provides a multi-tenant resource allocation system based on an internal bus of an application system, the system comprising:
[0014] A target application instance pre-construction module, the target application instance pre-construction module is used to pre-construct a target application instance, wherein the target application instance is mapped to a target management tenant, and the target application instance is in an application system;
[0015] A target multi-tenant technology base construction module, wherein the target multi-tenant technology base construction module is used to generate a target multi-tenant technology base based on the target management tenant construction, wherein the target multi-tenant technology base includes a plurality of pluggable functional components;
[0016] A mapping synchronization module, the mapping synchronization module is used to synchronize the target multi-tenant technology base mapping to the target application instance;
[0017] A deployment instruction receiving module, wherein the deployment instruction receiving module is used for the target application instance to receive a management-end deployment instruction sent by a tenant management end;
[0018] A filtering processing module, the filtering processing module is used to filter the management end deployment instructions based on the target multi-tenant technology base to obtain tenant-related instructions;
[0019] An instruction conversion module, the instruction conversion module is used to convert the tenant-related instructions into application internal bus messages;
[0020] A resource allocation module is used for the multiple pluggable functional components of the target multi-tenant technology base to receive the application internal bus message to perform resource allocation.
[0021] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the system executes any one of the methods described in the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which a computer program is stored. When the computer program is run on a computer, the computer executes the steps of any one of the methods described in the first aspect.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0024] The present application first pre-builds a target application instance, wherein the target application instance is mapped to a target management tenant, and the target application instance is in an application system, and then a target multi-tenant technology base is generated based on the target management tenant, wherein the target multi-tenant technology base includes multiple pluggable functional components, and then the target multi-tenant technology base is mapped and synchronized to the target application instance, and then the target application instance receives the management end allocation instruction sent by the tenant management end, and then the management end allocation instruction is filtered and processed based on the target multi-tenant technology base to obtain tenant-related instructions, and then the tenant-related instructions are converted into application internal bus messages, and finally the multiple pluggable functional components of the target multi-tenant technology base receive the application internal bus message for resource allocation. The technical problems of resource waste and inefficiency in the management and scheduling of tenant resources in the prior art are effectively solved, and the technical effect of achieving efficient and reasonable management and scheduling of tenant resources by establishing a multi-tenant technology base in a multi-tenant system is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 A schematic diagram of a multi-tenant resource allocation method based on an internal bus of an application system provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of an application example provided for an embodiment of the present application;
[0028] Figure 3 A schematic diagram of the structure of a multi-tenant resource allocation system based on an internal bus of an application system provided in an embodiment of the present application;
[0029] Figure 4 A structural schematic diagram of an electronic device is provided for the present application.
[0030] Explanation of the accompanying drawings: target application instance pre-construction module 1, target multi-tenant technology base construction module 2, mapping synchronization module 3, deployment instruction receiving module 4, filtering processing module 5, instruction conversion module 6, resource deployment module 7, electronic device 400, memory 401, processor 402, communication interface 403. DETAILED DESCRIPTION
[0031] The present application provides a multi-tenant resource allocation method and system based on an internal bus of an application system, which is used to solve the technical problems of resource waste and low efficiency in the management and scheduling of tenant resources in the prior art.
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0033] It should be noted that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules that are not explicitly listed or are inherent to these processes, methods, products or devices.
[0034] Embodiment 1
[0035] like Figure 1 As shown, the present invention provides a multi-tenant resource allocation method based on an internal bus of an application system, the method is applied to a multi-tenant resource allocation system based on an internal bus of an application system, the system includes a tenant management terminal and an application system, the method is used to achieve efficient and reasonable management and scheduling of tenant resources by establishing a multi-tenant technology base in the multi-tenant system, the method includes:
[0036] Determine the target management tenant. The target management tenant refers to the tenant that is specially designated and managed in the multi-tenant system. These tenants have some specific needs or business goals that need to be met and achieved through the application system. Clarify the needs and characteristics of the target management tenant, and then design the overall architecture of the application system based on the needs of the target management tenant, including determining the core functions of the system, data processing flow, security policies, etc. Based on the designed application architecture, pre-create a new application instance (the target application instance) in the application system. This instance is a complete, independently run system with the required core functions and configurations. While creating the application instance, map it with the data of the target management tenant, that is, create corresponding data storage, configuration, and permission settings for the tenant to ensure that the data of each tenant is isolated.
[0037] Analyze the business requirements, functional expectations and system characteristics of the target management tenants, and design the overall architecture of the target multi-tenant technology base according to the needs of the tenants. The architecture supports the simultaneous use of multiple tenants, and the data and functions of each tenant are isolated. Based on the multi-tenant technology base architecture, develop core components, such as tenant management, data isolation, permission management, etc. The core components are used to support the independent operation and data isolation of multiple tenants. In order to meet the personalized needs of different tenants, create multiple pluggable functional components in the target multi-tenant technology base. The multiple pluggable functional components are used to plug and unplug and configure according to the needs of the tenants to provide customized functions and services. Finally, integrate the core components and pluggable functional components into the multi-tenant technology base to complete the construction of the target multi-tenant technology base.
[0038] like Figure 2 As shown, the target multi-tenant technology base is mapped and synchronized to the target application instance. Specifically, first, the mapping relationship between the target multi-tenant technology base and the target application instance is clarified, and details such as which components need to be synchronized and how to exchange data are determined. Then a mapping interface is developed, and the mapping interface is used to ensure smooth data flow and functional interaction between the two. Then, according to the determined mapping relationship, data synchronization is performed, including data format conversion, data transmission and other operations to ensure data consistency between the technology base and the application instance. Finally, the core components and pluggable functional components in the multi-tenant technology base are integrated into the application instance so that it can work normally and provide services to users.
[0039] A command listening interface is set for the target application instance, and the command listening interface is used to receive the deployment instructions sent by the tenant management end, wherein the tenant management end is a specific management tool used to manage and monitor the activities and resource usage of tenants in the system; the deployment instructions are a series of instructions or operation requirements sent by the tenant management end to the target application instance, which are used to configure the tenant's resources, adjust system parameters or perform specific tasks to meet the tenant's needs, including tenant configuration instructions, resource scheduling instructions, task scheduling instructions, system parameter adjustment instructions, data operation instructions, etc. When the tenant management end sends deployment instructions, the target application instance receives these instructions through the monitoring interface.
[0040] After receiving the deployment instructions, the target multi-tenant technology base analyzes each deployment instruction to determine whether they contain tenant identifiers or information that can be associated with a specific tenant (tenant ID, tenant-specific data tags, or other attributes that can distinguish different tenants). According to the business logic and security policy of the multi-tenant system, the technology base applies predefined filtering rules to filter the management-side deployment instructions. The filtering rules are used to ensure that only instructions related to the current tenant and meeting the permission requirements will be further processed. By applying the filtering rules, the technology base filters out instructions related to a specific tenant and obtains the tenant-related instructions.
[0041] After obtaining tenant-related instructions, the format of the instructions is analyzed, including the structure of the instructions, data fields, and encoding methods. Then, the internal bus message format of the application system is designed. The internal bus of the application system is an architectural pattern for communication and interaction between components within the application program. It is used to connect and coordinate data transmission and message delivery between various components. Through the internal bus, communication between different modules can be carried out by sending and receiving messages, without directly relying on and calling each other's interfaces. According to the internal communication mechanism of the application system, a message format suitable for the internal bus is designed. The message format contains all necessary information, such as operation type, target object, data parameters, etc., and is easy to be recognized and processed by the internal components of the system. Based on the instruction format analysis and the internal bus message format design, the corresponding conversion logic is developed. The logic can map each field in the tenant-related instructions to the corresponding field of the internal bus message, and perform necessary format conversion and data encoding, so as to realize the conversion of tenant-related instructions into application internal bus messages.
[0042] A message monitoring mechanism is set for multiple pluggable functional components of the target multi-tenant technology base, so that they can receive messages on the application's internal bus in real time. After receiving the application's internal bus message, the pluggable functional component parses the instruction content in the message, and performs corresponding resource allocation operations according to the instruction type and target object, including resource scheduling, configuration modification, data processing, etc., to meet the needs of tenants, thereby realizing flexible allocation and management of resources according to the needs of tenants. The embodiment of the present application achieves the goal of establishing a multi-tenant technology base in a multi-tenant system by constructing a target multi-tenant technology base, instruction filtering and processing, message conversion mechanism, dynamic component access technology, etc., and achieves the technical effect of realizing efficient and reasonable management and scheduling of tenant resources.
[0043] In a preferred implementation provided by an embodiment of the present application, the target application instance receives a management-end deployment instruction sent by the tenant management end, and the method further includes:
[0044] According to the requirements and architecture of the application system, the application system is pre-built, and K application instances are created and configured in the application system, each of which corresponds to a management tenant. Based on the requirements of each management tenant, K tenant technology bases are designed and built, and each tenant technology base has tenant isolation, resource management and configuration functions. Each tenant technology base is mapped and synchronized with the corresponding application instance. During the synchronization process, it is ensured that the data and instructions between the multi-tenant technology base and the application instance can be accurately and in real time transmitted. Then the K application instances are integrated to form a complete application system that can ensure the normal operation of the internal communication and coordination mechanism. A communication mechanism is set up, and the K application instances synchronously receive the management-side deployment instructions sent by the tenant management end through the communication mechanism, and each application instance independently receives and processes the management-side deployment instructions from its corresponding tenant. This preferred implementation meets the needs of a multi-tenant system, ensuring that each tenant's application instance can accurately and efficiently receive and process instructions from the tenant management end, and each tenant has an independent application instance that can be personalized and managed according to tenant needs. As the number of tenants increases or decreases, application instances can be easily added or deleted without making extensive changes to the entire system, achieving a technical effect of flexibility and scalability.
[0045] In another preferred implementation provided by the embodiment of the present application, the K application instances of the application system synchronously receive the management-end deployment instruction sent by the tenant management end, and the method further includes:
[0046] The tenant management end generates management deployment instructions as needed, and uses MQ message queue technology to broadcast the instructions to K application instances of the application system. The MQ message queue provides an asynchronous communication mechanism, allowing the tenant management end and the application instance to efficiently transfer information.
[0047] K application instances are set to listen to the MQ message queue and wait for the instruction message from the tenant management end. When a new management end deployment instruction is published to the MQ message queue, the K application instances will receive the instruction at the same time. After each application instance receives the instruction, it will process it synchronously, that is, all application instances will process the same instruction at the same time, ensuring the data consistency and operation synchronization of the entire system. This preferred implementation method achieves decoupling between the tenant management end and the application instance through the MQ message queue, achieving the technical effect of improving the flexibility and maintainability of the system, and through the MQ broadcast mechanism, the instruction is sent to multiple application instances at one time, achieving the technical effect of improving the efficiency of instruction distribution, and through synchronous reception and processing, the technical effect of maintaining data consistency and operation synchronization in a multi-tenant environment is achieved.
[0048] In another preferred implementation provided by an embodiment of the present application, a target multi-tenant technology base is generated based on the target management tenant, wherein the target multi-tenant technology base includes a plurality of pluggable functional components, and the method further includes:
[0049] Interact with the target management tenants and obtain the target demand information of the target management tenants through various methods such as questionnaires, interviews, and demand documents. Analyze the collected target demand information in detail and decompose it into multiple specific functional requirements, which are clear and executable requirements to guide the generation of functional components.
[0050] With the multiple functional requirements as reference, multiple pluggable functional components are designed and generated based on the Java SPI mechanism and in accordance with the modular principle, each component has a clear function and a clear interface. Functional components are loaded using the Java SPI mechanism, and after loading, they can be used through interface calls, thereby enabling applications to use different functional components in a plug-in manner to meet different functional requirements.
[0051] The generated pluggable functional components are integrated to construct a target multi-tenant technology base, in which the functional components in the technology base work in coordination to meet the needs of the target management tenants. This preferred implementation generates pluggable functional components through a Java-based SPI mechanism, and can flexibly add or delete components according to needs, thereby achieving a technical effect of improving system adaptability.
[0052] In another preferred implementation provided by the embodiment of the present application, the management end deployment instruction is filtered based on the target multi-tenant technology base to obtain tenant-related instructions, and the method further includes:
[0053] Obtain management-side deployment instructions, parse the management-side deployment instructions, and split them into management tenant information and specified resource information, wherein the management tenant information refers to information related to the tenant account or tenant administrator, including the tenant's ID, tenant name, tenant administrator's authority level, etc., which is used to identify which tenant or tenant administrator sent the instruction, and which tenant the instruction is related to; the specified resource information refers to information related to a specific resource or resource group, including the resource ID, resource type, resource status, resource configuration parameters, etc., which is used to identify which resource the instruction specifically operates or manages, and how to operate or configure the resource.
[0054] It is determined whether the parsed management tenant information contains the identifier or condition of the target management tenant. If the management tenant information contains the identifier or condition of the target management tenant, it indicates that the instruction is related to the target management tenant.
[0055] If the management tenant information includes the target management tenant, the management end deployment instruction is regarded as a tenant-related instruction; if the management tenant information does not include the target management tenant, the management end deployment instruction is discarded and is not regarded as a tenant-related instruction. Through this filtering process, tenant-related instructions related to the target management tenant are obtained. This preferred implementation ensures that only instructions related to the target management tenant are processed and executed by setting a filtering processing mechanism, thereby achieving the technical effect of improving the efficiency and accuracy of the system.
[0056] In another preferred implementation provided by the embodiment of the present application, before converting the tenant-related instruction into an application internal bus message, the method further includes:
[0057] Use the guava event component to create an internal bus of an application system, which serves as a bridge for communication between components. Through the guava event component, define event publishers and subscribers to implement event distribution and monitoring.
[0058] The filtered tenant-related instructions are sent to the internal bus of the application system. These instructions are transmitted through the bus as the message body of the event. After sending the instructions to the internal bus of the application system, these instructions are converted into internal bus messages of the application. Through the publishing and subscription mechanism of events, the relevant components receive and process these messages. This preferred implementation achieves decoupling and flexibility between components by using the guava event component to create the internal bus of the application system, so that different components can independently process and apply internal bus messages, achieving the technical effect of improving communication efficiency.
[0059] In another preferred implementation provided by an embodiment of the present application, the multiple pluggable functional components of the target multi-tenant technology base receive the application internal bus message to allocate resources, and the method further includes:
[0060] Based on the internal bus of the application system, the application internal bus message is sent to the first pluggable functional component, which is any one of the multiple pluggable functional components. After receiving the message, the first pluggable functional component performs resource type parsing based on the specified resource information therein to obtain the specified resource type. Then, it is determined whether the resource type supported by the first pluggable functional component (the first supported resource type) meets the specified resource type. If the resource type supported by the first pluggable functional component meets the specified resource type, the resource is allocated, including allocation of resources, startup of services, configuration of parameters and other operations, which depends on the function and implementation of the first pluggable functional component; if the resource type supported by the first pluggable functional component does not meet the specified resource type, the application internal bus message is discarded and no further processing is performed. By analogy, for other pluggable functional components in the target multi-tenant technology base, the application internal bus message is also parsed and resource allocation is performed according to the above steps, and each component performs corresponding processing or discarding operations according to the resource types and functions it supports, thereby realizing dynamic resource allocation based on the application internal bus message. This preferred implementation achieves the technical effect of efficient, dynamic and modular resource management in a multi-tenant environment by allocating resources based on application internal bus messages, so that different functional components can be selectively processed according to their own capabilities and resource types.
[0061] Embodiment 2
[0062] Based on the same inventive concept as the multi-tenant resource allocation method based on the internal bus of the application system in the aforementioned embodiment, Figure 3 As shown, the present application provides a multi-tenant resource allocation system based on an internal bus of an application system, and the system and method embodiments in the embodiments of the present application are based on the same inventive concept. The system includes:
[0063] A target application instance pre-construction module 1, wherein the target application instance pre-construction module 1 is used to pre-construct a target application instance, wherein the target application instance is mapped to a target management tenant, and the target application instance is in an application system;
[0064] A target multi-tenant technology base construction module 2, wherein the target multi-tenant technology base construction module 2 is used to generate a target multi-tenant technology base based on the target management tenant construction, wherein the target multi-tenant technology base includes a plurality of pluggable functional components;
[0065] A mapping synchronization module 3, wherein the mapping synchronization module 3 is used to synchronize the target multi-tenant technology base mapping to the target application instance;
[0066] A deployment instruction receiving module 4, wherein the deployment instruction receiving module 4 is used for the target application instance to receive a management-end deployment instruction sent by a tenant management end;
[0067] A filtering processing module 5, the filtering processing module 5 is used to filter the management end deployment instructions based on the target multi-tenant technology base to obtain tenant-related instructions;
[0068] An instruction conversion module 6, the instruction conversion module 6 is used to convert the tenant-related instructions into application internal bus messages;
[0069] The resource allocation module 7 is used for the multiple pluggable functional components of the target multi-tenant technology base to receive the application internal bus message to perform resource allocation.
[0070] Furthermore, the deployment instruction receiving module 4 is used to execute the following method:
[0071] Pre-building the application system, wherein the application system includes K application instances mapped to K management tenants;
[0072] Generate K multi-tenant technology bases based on the K management tenants;
[0073] Synchronize the K multi-tenant technology base mappings to the K application instances;
[0074] Integrating the K application instances to generate the application system;
[0075] The K application instances of the application system synchronously receive the management-end deployment instruction sent by the tenant management end.
[0076] Furthermore, the deployment instruction receiving module 4 is used to execute the following method:
[0077] The tenant management end broadcasts the management end deployment instruction to the K application instances of the application system using MQ messages;
[0078] The K application instances synchronously receive the management-side deployment instruction.
[0079] Furthermore, the target multi-tenant technology base construction module 2 is used to execute the following method:
[0080] Interactively obtain target demand information of the target management tenant;
[0081] Analyzing the target requirement information to obtain multiple functional requirements;
[0082] Based on the multiple functional requirements, the functional components are generated based on the SPI mechanism of Java to obtain the multiple pluggable functional components;
[0083] The target multi-tenant technology base is generated based on the multiple pluggable functional components.
[0084] Furthermore, the filtering processing module 5 is used to perform the following method:
[0085] The management end deployment instruction includes management tenant information and designated resource information;
[0086] Determining whether the management tenant information includes the target management tenant;
[0087] If the management tenant information includes the target management tenant, the management-end deployment instruction is used as the tenant-related instruction;
[0088] If the management tenant information does not include the target management tenant, the management-end deployment instruction is discarded.
[0089] Furthermore, the instruction conversion module 6 is used to execute the following method:
[0090] Use guava event component to create internal bus of application system;
[0091] The tenant related instructions are sent to the internal bus of the application system and converted into the internal bus message of the application.
[0092] Furthermore, the resource allocation module 7 is used to execute the following method:
[0093] Sending the application internal bus message to the first pluggable functional component based on the application system internal bus;
[0094] The first pluggable functional component performs resource type parsing based on the specified resource information to obtain the specified resource type;
[0095] Determining whether a first supported resource type of the first pluggable functional component satisfies the specified resource type;
[0096] If the first supported resource type satisfies the specified resource type, deploying resources of the first pluggable functional component;
[0097] If the first supported resource type does not satisfy the specified resource type, discarding the application internal bus message;
[0098] By analogy, the parsing and resource allocation of the application internal bus message by the multiple pluggable functional components are synchronously executed.
[0099] Embodiment 3
[0100] Based on the same inventive concept as the multi-tenant resource allocation method based on the internal bus of the application system in the aforementioned embodiment, the present application also provides a readable storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer executes the method in embodiment one.
[0101] Through the above detailed description of a multi-tenant resource allocation method based on an internal bus of an application system, those skilled in the art can clearly understand a multi-tenant resource allocation method and system based on an internal bus of an application system in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0102] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0103] Exemplary Electronic Devices
[0104] Reference below Figure 4 To describe the electronic device of the embodiment of the present application.
[0105] Based on the same inventive concept as a multi-tenant resource allocation method based on an internal bus of an application system in the aforementioned embodiment, the present application also provides an electronic device, comprising: a processor, the processor is coupled to a memory, the memory is used to store a program, and when the program is executed by the processor, the system executes the steps of the method described in embodiment one.
[0106] The electronic device 400 includes: a memory 401, a processor 402, and a communication interface 403. The memory 401, the processor 402, and the communication interface 403 can be interconnected via a bus; the bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0107] The memory 401 may be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.
[0108] The memory 401 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 402. The processor 402 is used to execute the computer-executable instructions stored in the memory 401, thereby realizing a multi-tenant resource allocation method based on an internal bus of an application system provided in the above embodiment of the present application.
[0109] The processor 402 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.
[0110] The communication interface 403 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), wired access networks, etc.
[0111] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0112] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of this application. In some cases, the actions or steps recorded in this application can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0113] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0114] This specification and drawings are merely exemplary illustrations of the present application and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application intends to include these modifications and variations.
Claims
1. A multi-tenant resource allocation method based on an internal bus of an application system, characterized in that: The method is applied to a multi-tenant resource allocation system based on an internal bus of an application system, the system comprising a tenant management terminal and an application system, and the method comprises: Pre-building a target application instance, wherein the target application instance is mapped to a target management tenant, and the target application instance is in the application system; Building and generating a target multi-tenant technology base based on the target management tenant, wherein the target multi-tenant technology base includes a plurality of pluggable functional components; Synchronize the target multi-tenant technology base mapping to the target application instance; The target application instance receives a management-end deployment instruction sent by the tenant management end; Filtering the management-side deployment instructions based on the target multi-tenant technology base to obtain tenant-related instructions; Convert the tenant-related instructions into application internal bus messages; The multiple pluggable functional components of the target multi-tenant technology base receive the application internal bus message to perform resource allocation.
2. The method according to claim 1, characterized in that The target application instance receives a management-end deployment instruction sent by the tenant management end, and the method further includes: Pre-building the application system, wherein the application system includes K application instances mapped to K management tenants; Generate K multi-tenant technology bases based on the K management tenants; Synchronize the K multi-tenant technology base mappings to the K application instances; Integrating the K application instances to generate the application system; The K application instances of the application system synchronously receive the management-end deployment instruction sent by the tenant management end.
3. The method according to claim 2, characterized in that The K application instances of the application system synchronously receive the management-end deployment instruction sent by the tenant management end, and the method further includes: The tenant management end broadcasts the management end deployment instruction to the K application instances of the application system using MQ messages; The K application instances synchronously receive the management-side deployment instruction.
4. The method according to claim 1, characterized in that Generating a target multi-tenant technology base based on the target management tenant construction, wherein the target multi-tenant technology base includes a plurality of pluggable functional components, and the method further includes: Interactively obtain target demand information of the target management tenant; Analyzing the target requirement information to obtain multiple functional requirements; Based on the multiple functional requirements, the functional components are generated based on the SPI mechanism of Java to obtain the multiple pluggable functional components; The target multi-tenant technology base is generated based on the multiple pluggable functional components.
5. The method according to claim 1, characterized in that The management end deployment instruction is filtered based on the target multi-tenant technology base to obtain tenant-related instructions, and the method further includes: The management end deployment instruction includes management tenant information and designated resource information; Determining whether the management tenant information includes the target management tenant; If the management tenant information includes the target management tenant, the management-end deployment instruction is used as the tenant-related instruction; If the management tenant information does not include the target management tenant, the management-end deployment instruction is discarded.
6. The method according to claim 5, characterized in that Before converting the tenant-related instruction into an application internal bus message, the method further includes: Use guava event component to create internal bus of application system; The tenant related instructions are sent to the internal bus of the application system and converted into the internal bus message of the application.
7. The method according to claim 6, characterized in that The multiple pluggable functional components of the target multi-tenant technology base receive the application internal bus message to perform resource allocation, and the method further includes: Sending the application internal bus message to the first pluggable functional component based on the application system internal bus; The first pluggable functional component performs resource type parsing based on the specified resource information to obtain the specified resource type; Determining whether a first supported resource type of the first pluggable functional component satisfies the specified resource type; If the first supported resource type satisfies the specified resource type, deploying resources of the first pluggable functional component; If the first supported resource type does not satisfy the specified resource type, discarding the application internal bus message; By analogy, the parsing and resource allocation of the application internal bus message by the multiple pluggable functional components are synchronously executed.
8. A multi-tenant resource allocation system based on an internal bus of an application system, characterized in that: The system comprises: A target application instance pre-construction module, the target application instance pre-construction module is used to pre-construct a target application instance, wherein the target application instance is mapped to a target management tenant, and the target application instance is in an application system; A target multi-tenant technology base construction module, wherein the target multi-tenant technology base construction module is used to generate a target multi-tenant technology base based on the target management tenant construction, wherein the target multi-tenant technology base includes a plurality of pluggable functional components; A mapping synchronization module, the mapping synchronization module is used to synchronize the target multi-tenant technology base mapping to the target application instance; A deployment instruction receiving module, wherein the deployment instruction receiving module is used for the target application instance to receive a management-end deployment instruction sent by a tenant management end; A filtering processing module, the filtering processing module is used to filter the management end deployment instructions based on the target multi-tenant technology base to obtain tenant-related instructions; An instruction conversion module, the instruction conversion module is used to convert the tenant-related instructions into application internal bus messages; A resource allocation module is used for the multiple pluggable functional components of the target multi-tenant technology base to receive the application internal bus message to perform resource allocation.
9. An electronic device, characterized in that: include: A processor is coupled to a memory, wherein the memory is used to store a program, and when the program is executed by the processor, the system executes the steps of the method according to any one of claims 1 to 7.
10. A readable storage medium, wherein: The readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the steps of the method according to any one of claims 1 to 7.
