A distributed microservice platform resource configuration method and device
By analyzing historical transaction information and establishing associations, exclusive or shared component resources are configured according to tenant needs, solving the problems of resource configuration and isolation in distributed microservice platforms and achieving more refined, flexible and secure resource management.
Patent Information
- Application Number
- CN202211099059.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-09-07
AI Technical Summary
The resource configuration of distributed microservice platforms in existing technologies fails to effectively solve the resource configuration and isolation problems of different tenants in scenarios where multiple business domains and multiple environments intersect, resulting in a lot of time spent on resource allocation and low enterprise development efficiency.
By analyzing historical tenant transaction information, establishing the association between initial component resources and logical environments and business domains, determining business domains based on tenant needs, and implementing resource isolation and unified management through exclusive or shared component resource configuration.
It achieves resource isolation in scenarios where multiple business domains and multiple environments intersect, optimizes resource allocation, and improves the flexibility and security of enterprise-level distributed architecture. Users can achieve tangible isolation effects through simple operations.
Smart Images

Figure CN115801775B_ABST
Abstract
Description
Technical Field
[0001] This article relates to the field of cloud computing, and in particular to a method and device for resource configuration on a distributed microservices platform. Background Art
[0002] With the rapid development of banking business, applications based on enterprise-level distributed microservice architecture have become diversified, business attributes have gradually emerged, and the isolation capabilities and unified management and control demands of applications, services and resources based on industry dimensions have become increasingly prominent.
[0003] Existing distributed microservices platforms allocate resources based on tenants or environments, but lack the concept of "business domains." This traditional two-dimensional tenant / environment model currently fails to address the resource allocation and isolation challenges faced by different tenants in enterprise-level distributed architectures in complex scenarios involving multiple business domains and environments. Existing technologies also fail to achieve industry-specific isolation and unified management of applications, services, and resources, leading to time-consuming resource allocation and reduced enterprise development efficiency.
[0004] In view of the problems that current technologies cannot realize enterprise-level distributed architecture resource configuration in complex scenarios and are inefficient, a distributed microservice platform resource configuration method and device are needed. Summary of the Invention
[0005] To solve the above-mentioned problems of the prior art, the embodiments of this document provide a method and device for resource configuration of a distributed microservice platform.
[0006] An embodiment of the present invention provides a distributed microservice platform resource configuration method, the method comprising: analyzing historical tenant transaction information to obtain an initial logical environment, an initial business domain, and initial component resources; establishing an association relationship between the initial component resources and the initial logical environment and the initial business domain; determining the business domain required by the tenant based on tenant needs; determining whether the business domain required by the tenant belongs to the initial business domain; and providing different component resources to the tenant based on the determination result and the association relationship.
[0007] According to one aspect of the embodiments of this document, determining the business domain required by the tenant based on the tenant's needs includes: extracting key information from the tenant's demand message; analyzing the key information to obtain a business domain identifier; determining the business domain required by the tenant based on the business domain identifier and a preset business domain table, wherein the preset business domain table records the association relationship between the business domain identifier and the business domain.
[0008] According to one aspect of the embodiments of this document, creating new initial component resources includes: selecting components with the same business functions based on the business functions of the initial business domain; and determining the initial component resources by configuring component modes for the components, wherein the component modes include exclusive mode and shared mode.
[0009] According to one aspect of the embodiments of this document, providing different component resources to the tenant based on the judgment result includes: if the judgment result is that the business domain required by the tenant does not belong to any business domain in the initial business domain, then taking the business domain required by the tenant as a newly added business domain, selecting component resources corresponding to the business functions of the newly added business domain from the initial component resources, and the association relationship of the logical environment, and recording the association relationship between the newly added business domain and the component resources and logical environment; if the judgment result is that the business domain required by the tenant belongs to the initial business domain, then providing the tenant with initial component resources that have an association relationship with the business domain.
[0010] According to one aspect of the embodiments of this document, the method further includes: determining whether the business volume corresponding to the newly added business domain exceeds a preset business volume threshold; if it exceeds the preset business volume threshold, setting the component mode of the component corresponding to the business function of the newly added business domain to an exclusive mode; if it does not exceed the preset business volume threshold, setting the component mode of the component corresponding to the business function of the newly added business domain to a shared mode.
[0011] According to one aspect of the embodiments of this document, the method further includes: determining whether the business volume corresponding to the business domain required by the tenant belonging to the initial business domain exceeds a preset business volume threshold; if it exceeds the preset business volume threshold, modifying the initial component resources pre-matched for the business domain to an exclusive mode; if it does not exceed the preset business volume threshold, modifying the initial component resources pre-matched for the business domain to a shared mode.
[0012] According to one aspect of the embodiments of this document, the component resources include at least one of: a registration center, a configuration center, a gateway, a log service, a monitoring center, a distributed cache, and distributed messaging.
[0013] According to one aspect of the embodiments of this document, a component whose component mode is a shared mode is a shared component, and a component whose component mode is an exclusive mode is an exclusive component. The shared component and the exclusive component are isolated from the tenants who use the shared component through permission control.
[0014] According to one aspect of the embodiments of this document, the shared component uses data logic isolation to achieve isolation of component resources.
[0015] According to one aspect of the embodiments of this document, the exclusive component uses physical isolation to achieve isolation of component resources.
[0016] According to one aspect of the embodiment of this document, the method further includes: judging the tenant's access rights based on the environmental requirements in the tenant's requirements; if the tenant meets the access rights, allowing the tenant's requirements; if the tenant does not meet the access rights, prohibiting the tenant's requirements.
[0017] An embodiment of the present invention provides a distributed microservice platform resource configuration device, which includes: an acquisition unit for analyzing historical tenant transaction information to obtain an initial logical environment, an initial business domain, and initial component resources; an association establishment unit for establishing an association between the initial component resources and the initial logical environment and the initial business domain; a tenant-required business domain determination unit for obtaining tenant requirements and determining the tenant-required business domain; a judgment unit for judging whether the tenant-required business domain belongs to the initial business domain; and a resource configuration unit for providing different component resources to the tenant based on the judgment result and the association.
[0018] The embodiments of this document also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the distributed microservice platform resource configuration method when executing the computer program.
[0019] The embodiments of this document further provide a computer-readable storage medium storing a computer program, which implements the distributed microservice platform resource configuration method when executed by a processor.
[0020] The embodiments of this document also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the distributed microservice platform resource configuration method.
[0021] This solution isolates resources for different tenants in scenarios where multiple business domains and multiple environments intersect. It optimizes resource allocation and isolation, enabling more refined, flexible, and secure enterprise-level distributed architecture resource isolation in complex scenarios where environments intersect. Users can enjoy tangible and observable isolation effects through simple operations. It eliminates configuration issues and implements industry-specific isolation and unified management of applications, services, and resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 The figure shows a flow chart of a distributed microservice platform resource configuration method according to an embodiment of this invention;
[0024] Figure 2 The figure shows a flow chart of a method for determining a business domain required by a tenant according to an embodiment of this invention;
[0025] Figure 3 The figure shows a flow chart of a method for creating a new initial component resource according to an embodiment of this invention;
[0026] Figure 4 FIG2 is a flow chart of a method for providing component resources to tenants according to an embodiment of the present invention;
[0027] Figure 5 Flowchart showing another method for configuring resources on a distributed microservice platform according to an embodiment of this invention;
[0028] Figure 6 The figure shows a flow chart of another method for resource configuration of a distributed microservice platform according to an embodiment of this invention;
[0029] Figure 7 Flowchart showing another distributed microservice platform resource configuration method according to an embodiment of this invention;
[0030] Figure 8 The figure shows a schematic diagram of the structure of a distributed microservice platform resource configuration device according to an embodiment of this invention;
[0031] Figure 9 The figure shows a schematic diagram of the specific structure of the distributed microservice platform resource configuration device according to the embodiment of this article;
[0032] Figure 10 Shown is a structural diagram of a computer device according to an embodiment of this invention.
[0033] Description of the accompanying symbols:
[0034] 801, acquisition unit;
[0035] 8011, component mode configuration module;
[0036] 802. Association relationship establishment unit;
[0037] 803. A tenant's required service domain determination unit;
[0038] 8031, tenant access authority judgment module;
[0039] 804, judgment unit;
[0040] 8041, business volume judgment module;
[0041] 805. Resource allocation unit;
[0042] 1002. Computer equipment;
[0043] 1004, processor;
[0044] 1006. Memory;
[0045] 1008, driving mechanism;
[0046] 1010, input / output module;
[0047] 1012. Input device;
[0048] 1014. Output device;
[0049] 1016. Presentation equipment;
[0050] 1018. Graphical user interface;
[0051] 1020, network interface;
[0052] 1022, communication link;
[0053] 1024. Communication bus. DETAILED DESCRIPTION
[0054] In order to help those skilled in the art better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of this specification.
[0055] It should be noted that the terms "first," "second," and the like in the specification and claims herein and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0056] This specification provides method operation steps as described in the embodiments or flowcharts, but more or fewer operation steps may be included based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the steps among many orderings and does not represent the only execution order. When a system or device product is actually executed, the method can be executed in the order shown in the embodiments or the drawings or in parallel.
[0057] It should be noted that the distributed microservice platform resource configuration method in this article can be used in the field of cloud computing, as well as in the computer or financial fields. This article does not limit the application field of the distributed microservice platform resource configuration method and device.
[0058] Figure 1 The following is a distributed microservice platform resource configuration method according to an embodiment of the present invention, which specifically includes the following steps:
[0059] Step 101 analyzes historical tenant transaction information to obtain an initial logical environment, initial business domain, and initial component resources. Initial component resources include initial component libraries and initial components. Furthermore, each initial component library is composed of one or more initial components. An initial component library is a collection of components in a distributed scenario.
[0060] In this step, the initial logical environment, initial business domain, and initial component resources are pre-configured based on the transaction records of historical tenants. This can also be understood as pre-creating resources for an enterprise-level distributed architecture microservice platform based on the transaction requirements proposed by historical tenants, where resources are composed of environments, business domains, and components. In some embodiments of this specification, the environment can be a logical environment, which is the environment in which services, applications, or applications are run, and can enable tenants to run services, applications, or applications on multiple servers. Among them, logical environments include but are not limited to: test environments, development environments, non-functional test environments, verification environments, etc. In the same physical environment, one or more sets of logical environments can exist. A specific logical environment can cover different types of services and business domains. A business domain is a collection of services with the same business attributes, representing an industry field. A business domain is composed of at least one component that provides specific service functions. The types of services included in different business domains can be configured according to tenant needs. Among them, services are units that can be deployed independently.
[0061] In some embodiments of this specification, component resources include components and component libraries with different service functions. In some embodiments of this specification, component resources include, but are not limited to, at least one of a registration center, a configuration center, a gateway, a log service, a monitoring center, a distributed cache, and distributed messaging. Each component has an independent service function. Furthermore, components with different service functions can be selected to form different component packages, and component libraries can be constructed based on the business functions that can be implemented by different component packages.
[0062] For example, the "Provident Fund" business domain includes four components: Registration Center 1, Configuration Center 1, Service Governance 1, and Distributed Message 1. The "Cloud Payment" business domain includes four components: Registration Center 2, Configuration Center 1, Service Governance 1, and Distributed Message 1. The difference between the Provident Fund business domain and the Cloud Payment business lies in the slightly different capabilities provided by the registration center.
[0063] Step 102: Establish an association relationship between the initial component library, the initial logical environment, and the initial business domain.
[0064] According to the initial component resources obtained in step 101, they are matched with the specific initial logical environment and initial business domain, and an association relationship is established between the initial component resources and the initial logical environment and initial business domain. Specifically, the association relationship represents the configuration relationship between the logical environment and the initial business domain and the initial component resources. Furthermore, a logical environment includes multiple business domains, and a business domain may include multiple component resources with the same business functions or component resources with different business functions. Among them, the component resource can be a component library or a component package composed of multiple components. This step does not limit the form of the component resource and the content it contains.
[0065] In some embodiments of this specification, after obtaining the initial logical environment, initial business domain, and initial component resources, different types of initial business domains and initial component resources with different business functions can be allocated to different initial logical environments based on historical business conditions. For example, the fast-moving consumer goods business domain is matched with initial component resources 1, initial component resource 2, initial component resource 3, and initial component resource 4, and assigned to the initial logical environment; the electronic product business domain is matched with initial component resources 5, initial component resource 6, initial component resource 7, and initial component resource 8, and assigned to the initial logical environment; and the financial product business domain is matched with initial component resources 9, initial component resource 10, initial component resource 11, and initial component resource 12, and assigned to the initial logical environment. This forms an association between the initial logical environment, initial component resources, and initial business domain. In some embodiments of this specification, the initial component resources include at least one of: a registration center, a configuration center, a gateway, a log service, a monitoring center, a distributed cache, and distributed messaging. Distributed messaging, as a component, essentially shares the same capability allocation and usage as component resources such as the registration center, configuration center, and gateway.
[0066] Step 103: Determine the service domain required by the tenant based on the tenant's needs.
[0067] In some embodiments of the present specification, a tenant or service may not belong to any business domain, or may belong to one or more different business domains.
[0068] In some embodiments of this specification, tenant requirements are business-related requirements raised by tenants in real time, including but not limited to: tenant requirements on the environment, tenant requirements on business domains, tenant requirements on services, etc. For details on the method of determining the business domains required by tenants, see Figure 2 Detailed description.
[0069] In some embodiments of this specification, there may be situations where more than one tenant may initiate tenant requirements that include the same business domain. In other words, multiple different tenants may seek the same business domain. In this case, it is necessary to perform business function analysis on the tenant requirements initiated by these tenants and provide different component resources to the tenants.
[0070] Step 104: Determine whether the service domain required by the tenant belongs to the initial service domain.
[0071] The tenant's required service domain, determined in step 103, is compared with the initial service domain obtained in step 101 to determine whether the tenant's required service domain belongs to the initial service domain. A determination result may be obtained, including a determination that the tenant's required service domain belongs to the initial service domain and a determination that the tenant's required service domain does not belong to the initial service domain.
[0072] Step 105: Provide different component resources to the tenant based on the judgment result and the association relationship.
[0073] In this step, if the result of the judgment is that the tenant's required business domain belongs to the initial business domain, then based on the association between the initial business domain, the initial component resources, and the initial logical environment, the component resources corresponding to the tenant's required business domain are identified and provided to the tenant. If the result of the judgment is that the tenant's required business domain does not belong to the initial business domain, then based on the business functions of the tenant's required business domain, component resources with the same business functions as the user's required business domain are further identified from the component resources and provided to the tenant.
[0074] Figure 2 The flowchart of a method for determining a service domain required by a tenant according to an embodiment of this invention is shown, which specifically includes the following steps:
[0075] Step 201: Extract key information from the tenant demand message. In this step, the tenant demand is expressed in the form of a message, which includes fields in a fixed format. Key information related to the business domain is extracted from a field at a specific location in the tenant demand message.
[0076] Step 202: Analyze the key information and obtain the service domain identifier. The service domain identifier can be obtained by extracting key information from a fixed position field in the message.
[0077] Step 203: Determine the tenant's required business domain based on the business domain identifier and the preset business domain table. The preset business domain table records the association between business domain identifiers and business domains. For example, the business domain corresponding to business domain identifier Y1 in the preset business domain table is the fast-moving consumer goods business domain; the business domain corresponding to business domain identifier Y2 is the financial products business domain; and the business domain corresponding to business domain identifier Y3 is the electronic products business domain.
[0078] The business domain required by the tenant can be determined based on the business domain identifier and the association relationship between the business domain identifier and the business domain recorded in the preset business domain table.
[0079] Figure 3 The flowchart of a method for creating a new initial component resource according to an embodiment of this invention is shown, which specifically includes the following steps:
[0080] Step 301: Preconfigure an initial logical environment based on the tenant's historical transaction records. In this step, the tenant's frequently requested logical environments are determined based on their historical transactions. For example, if the tenant's historical transactions involve development environments A, B, and C and verification environments M, K, and N, then the initial logical environments A, B, C, M, K, and N are preconfigured.
[0081] Step 302 determines the initial business domains corresponding to the environmental functions of the initial logical environment based on the environmental functions of the initial logical environment. Specifically, based on the different functions of the initial logical environment, such as development, testing, and verification, business domains related to development services are matched to the initial logical environment with development functions; business domains related to testing services are matched to the initial logical environment with testing functions; and business domains related to verification services are matched to the initial logical environment with verification functions.
[0082] Step 303 selects components with the business functions of the initial business domain based on the business functions of the initial business domain. In this step, components with the same business functions as the initial business domain are selected from all components with different business functions based on the business functions of the different initial business domains. For example, if initial business domain 1 has a registered business function, and components A and B have the same registered business function, then components A and B are selected for initial business domain 1 to correspond to the initial business domain.
[0083] Step 304, the components of the initial business domain with various business functions are used to form the initial component resources of the initial business domain. The components corresponding to the initial business domains with specific different business functions determined in step 303 are used to form different initial component resources. The initial component resources have corresponding relationships with the initial business domain and the initial logical environment. In this step, the initial component resources of the initial business domain include one or more components with the business functions of the initial business domain. Furthermore, a component library can also be formed by components with different business functions. The component library is also a kind of initial component resource.
[0084] Figure 4 The flowchart of a method for providing component resources to tenants according to an embodiment of this invention is shown, which specifically includes the following steps:
[0085] In step 401, if the tenant's required business domain does not belong to any of the initial business domains, the tenant's required business domain is identified as a new business domain. Component resources corresponding to the business functions of the new business domain are selected from the initial components. The tenant's required logical environment is determined based on the tenant's needs, and the association between the new business domain, the component resources, and the logical environment is recorded. For example, if the initial business domains include the FMCG business domain, the electronics business domain, and the financial products business domain, and the tenant's required business domain is the building materials business domain, which does not belong to any of the initial business domains, the initial components are searched for component resources corresponding to the functions of the building materials business domain, and the association between the building materials business domain, the determined component resources, and the logical environment is recorded.
[0086] In step 402, if the tenant's required business domain is determined to be an initial business domain, initial component resources associated with that business domain are provided to the tenant. For example, the initial business domains include the FMCG business domain, the electronics business domain, and the financial products business domain. If the tenant's required business domain is the electronics business domain, which is one of the initial business domains, the tenant is provided with pre-configured initial component resources for the electronics business domain.
[0087] Figure 5 The flowchart of another distributed microservice platform resource configuration method according to an embodiment of this invention is shown, which specifically includes the following steps:
[0088] Step 501: Determine whether the traffic volume corresponding to the newly added service domain exceeds a preset traffic volume threshold. In some embodiments of this specification, the traffic volume of the newly added service domain can be obtained synchronously based on tenant demand. The preset traffic volume threshold is a traffic volume threshold pre-set based on the platform's service capacity and platform security.
[0089] In step 502, if the preset business volume threshold is exceeded, the component mode of the component corresponding to the business function of the newly added business domain is set to exclusive mode. When the business volume of the newly added business domain exceeds the preset business volume threshold, it indicates that the newly added business domain may be in a scenario with a large amount of redis and logs. Therefore, the business domain is physically isolated. Specifically, based on the business function of the newly added business domain, a component that is consistent with the business function of the newly added business domain or that meets the business function of the newly added business domain is selected from the initial component resources, and the component is set to exclusive mode to meet the business security requirements.
[0090] Step 503, if the preset business volume threshold is not exceeded, the component mode of the component corresponding to the business function of the newly added business domain is set to a shared mode. In this step, when the business volume of the newly added business domain does not exceed the preset business volume threshold, it means that the business volume of the business domain is relatively stable, and therefore, data logic isolation is implemented for the business domain. Specifically, according to the business function of the newly added business domain, a component that is consistent with the business function of the newly added business domain is selected from the initial component resources, or a component that meets the business function of the newly added business domain is selected from the initial component resources, and the component is set to a shared mode. When there are multiple tenants with tenant requirements for the same business domain at the same time, the same set of shared components are provided to these tenants, and component resources are isolated for the tenants' metadata.
[0091] In some embodiments of this specification, component modes include exclusive mode and shared mode. A component with an exclusive mode may also be referred to as an exclusive component, and a component with a shared mode may be referred to as a shared component. In some embodiments of this specification, whether component resources are in shared mode or exclusive mode may be defined according to business needs. Shared components can achieve tenant isolation through permission control. Shared components achieve resource isolation by adopting data logical isolation, and shared components can be configured for use by multiple arbitrary tenants or applications at the same time. Exclusive components achieve isolation of component resources through physical isolation. Exclusive components can only be used by designated tenants or applications.
[0092] In some embodiments of this specification, the same set of shared components can be used by different applications, and logical isolation of the data itself is performed between different applications. Specifically, when a tenant generates business domain and application requirements, the tenant can apply for multiple environments for a certain business domain or application to achieve logical isolation in different environments. Shared components and exclusive components achieve isolation of tenants and applications through permission control. Specifically, different permissions are granted to different tenants and / or different applications corresponding to tenants. If a tenant does not have the permission to view other tenants' data or the application corresponding to the tenant does not have the permission to view other applications, the resources of shared components or exclusive components are configured for such tenants to achieve resource isolation.
[0093] Furthermore, when shared resources are configured for multiple tenants, a set of shared resources can be used and provided to multiple tenants at the same time; when exclusive resources are configured for multiple applications, independent exclusive resources are configured for each application. For example, permissions are set for Tenant 1 and Tenant 2 to prevent Tenant 1 and Tenant 2 from querying each other's data. At the same time, roles such as application administrator, application development, and application operation and maintenance are deployed under Tenant 1 and Tenant 2 respectively, and permissions are also set for these roles. Permissions are then deployed separately for Tenant 1, Tenant 2, and their subordinate roles to prevent different roles within the same tenant from querying each other's data. Exclusive components or shared components are provided to Tenant 1, Tenant 2, and their subordinate roles to achieve resource isolation.
[0094] In some embodiments of this specification, each shared component can only be bound to one instance within a component library. In some embodiments of this specification, an exclusive component can only be used by one application, and each exclusive component can have multiple instances within a component library. Furthermore, exclusive components utilize a physical isolation mechanism, making them suitable for business scenarios requiring high security.
[0095] Figure 6 The flowchart of another method for resource configuration of a distributed microservice platform according to an embodiment of this invention is shown, which specifically includes the following steps:
[0096] Step 601 determines whether the service volume corresponding to the service domain required by the tenant belonging to the initial service domain exceeds a preset service volume threshold. The preset service volume threshold in this step is the same as the preset service volume threshold in step 501. The determination method in this step is the same as that in step 501, and this step is not further described here.
[0097] Step 602, if the preset business volume threshold is exceeded and the mode of the initial component resources pre-matched for the business domain is a shared mode, the initial component resources pre-matched for the business domain are modified to an exclusive mode. When the business volume of the business domain required by the tenant exceeds the preset business volume threshold, it means that the business domain required by the tenant may be in a scenario with a large amount of redis and logs. Therefore, it is necessary to physically isolate the business domain. Specifically, the mode of the component in the initial component resources pre-matched for the business domain is set to an exclusive mode. Resource services are provided for a tenant on a separate server. If the mode of the component in the initial component resources pre-matched for the business domain is originally an exclusive mode, there is no need to change the component resources. If the mode of the component in the initial component resources pre-matched for the business domain is a shared mode, the initial component resources are modified to an exclusive mode. The other processing procedures in this step are the same as step 502, and this step will not be repeated here.
[0098] Step 603, if the preset business volume threshold is not exceeded and the mode of the initial component resources pre-matched for the business domain is an exclusive mode, the initial component resources pre-matched for the business domain are modified to a shared mode. When the business volume of the business domain required by the tenant does not exceed the preset business volume threshold, it means that the business volume of the business domain is relatively stable. Therefore, data logic isolation is implemented for the business domain. Specifically, the mode of the component in the initial component resources pre-matched for the business domain is set to a shared mode. If the mode of the component in the initial component resources pre-matched for the business domain is originally a shared mode, there is no need to change the component resources. If the mode of the component in the initial component resources pre-matched for the business domain is an exclusive mode, the initial component resources are modified to a shared mode.
[0099] Figure 7 The flowchart of another distributed microservice platform resource configuration method according to an embodiment of this invention is shown, which specifically includes the following steps:
[0100] Step 701, based on the environmental requirements in the tenant requirements, determine the tenant access rights. In this step, the tenant requirements include environmental requirements, that is, the environment that the user wants to use. In this specification, different environments are divided according to the purposes to be achieved by different environments. The functions of the environment include but are not limited to: functional testing, non-functional testing, function point verification, etc. When tenants select services based on the environment, they need to understand the role of different environments. In some embodiments of this specification, there is usually a one-to-many relationship between the environment and the service. In some embodiments of this specification, the functions of the environment can be defined in advance by the supplier.
[0101] Step 702: If the tenant meets the access permissions, the tenant's request is granted. This step determines whether the tenant's requested environment meets the platform's access permissions. If so, the tenant's request is granted. For example, if the platform's access environment is limited to logical environments for testing, and the environment requested in the tenant's request also has testing capabilities, then the tenant's request meets the platform's access permissions and is granted.
[0102] Step 703: If the tenant does not meet the access permissions, the tenant's request is prohibited. This step determines whether the tenant's requested environment meets the platform's specified access permissions. If not, the tenant's request is prohibited, meaning no resources will be provided to the tenant. For example, if the platform's specified access permissions include a logical environment for function point verification, and the tenant's requested environment is a logical environment for non-functional testing, then the tenant's request does not meet the platform's specified access permissions, and the tenant's request is prohibited.
[0103] like Figure 8 FIG2 is a schematic diagram of the structure of a distributed microservice platform resource configuration device according to an embodiment of the present invention. This figure describes the basic structure of the distributed microservice platform resource configuration device. The functional units and modules therein can be implemented in software, or a general-purpose chip or a specific chip can be used to implement distributed microservice platform resource configuration. The device specifically includes:
[0104] The acquisition unit 801 is used to analyze historical tenant transaction information to obtain the initial logical environment, initial business domain, and initial component resources;
[0105] An association establishing unit 802 is configured to establish an association between the initial component resources, the initial logical environment, and the initial business domain;
[0106] The tenant required service domain determination unit 803 is used to obtain tenant requirements and determine the tenant required service domain;
[0107] A judging unit 804 is configured to judge whether the service domain required by the tenant belongs to the initial service domain;
[0108] The resource configuration unit 805 is configured to provide different component resources to the tenant according to the judgment result and the association relationship.
[0109] This solution implements resource isolation for different tenants in scenarios where multiple business domains and multiple environments intersect. It not only gives tenants business attributes, but also upgrades the traditional tenant-environment two-dimensional model to a tenant-environment-business domain three-dimensional model, optimizing the resource isolation method to make it more refined, flexible, and secure. Users can enjoy tangible and observable isolation effects through simple operations.
[0110] As an embodiment of this article, you can also refer to Figure 9 The figure shows a specific structural diagram of the distributed microservice platform resource configuration device of this embodiment.
[0111] As an embodiment of this invention, the acquisition unit 801 further includes: a component mode configuration module 8011, configured to determine initial component resources by configuring a component mode for the component;
[0112] As an embodiment of this invention, the tenant required service domain unit 803 further includes: a tenant access authority determination module 8031, configured to determine the tenant access authority according to the environmental requirements in the tenant requirements;
[0113] As an embodiment of this document, the judgment unit 804 further includes a service volume judgment module 8041, configured to judge whether the service volume corresponding to the newly added service domain exceeds a preset service volume threshold.
[0114] like Figure 10As shown, a computer device provided in an embodiment of this invention is shown. The distributed microservice platform resource configuration method described herein can be applied to the computer device. The computer device 1002 described herein may include one or more processors 1004, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 1002 may also include any memory 1006 for storing any type of information such as code, settings, data, etc. For example, without limitation, the memory 1006 may include any one or more combinations of the following: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any memory may use any technology to store information. Furthermore, any memory may provide volatile or non-volatile retention of information. Furthermore, any memory may represent a fixed or removable component of the computer device 1002. In one embodiment, when the processor 1004 executes associated instructions stored in any memory or combination of memories, the computer device 1002 may perform any operation of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any storage, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
[0115] The computer device 1002 may also include an input / output module 1010 (I / O) for receiving various inputs (via input devices 1012) and for providing various outputs (via output devices 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface (GUI) 1018. In other embodiments, the input / output module 1010 (I / O), input devices 1012, and output devices 1014 may not be included, and the computer device 1002 may simply be a computer device in a network. The computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.
[0116] The communication link 1022 may be implemented in any manner, for example, via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0117] Corresponding to Figures 1 to 7 The embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which executes the steps of the above method when executed by a processor.
[0118] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program causes the processor to execute the following Figures 1 to 7 The method shown.
[0119] The embodiment of the present invention further provides a computer program product, wherein the computer program product includes a computer program, wherein when the computer program executes the instructions, the computer program is executed by a processor to implement Figures 1 to 7 The method shown.
[0120] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0121] It should also be understood that in the embodiments herein, the term "and / or" merely describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" could represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0122] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.
[0123] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices, or units, or can be an electrical, mechanical, or other form of connection.
[0125] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments herein.
[0126] In addition, the functional units in the various embodiments herein may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0128] This article uses specific embodiments to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for those skilled in the art, based on the ideas of this article, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation to this article.
Claims
1. A distributed microservice platform resource configuration method, characterized in that: The method comprises: Analyze historical tenant transaction information to obtain the initial logical environment, initial business domain, and initial component resources; Establishing an association relationship between the initial component resources, the initial logical environment, and the initial business domain to form a tenant-environment-business domain three-dimensional model; Determine the business domain required by tenants based on their needs; Determine whether the service domain required by the tenant belongs to the initial service domain; According to the judgment result and the association relationship, different component resources are provided to the tenant according to the three-dimensional model.
2. The distributed microservice platform resource configuration method according to claim 1, characterized in that: Determining the business domain required by the tenant based on tenant needs includes: Extract key information from the tenant demand message; Analyze the key information and obtain the business domain identifier; The business domain required by the tenant is determined according to the business domain identifier and the preset business domain table, wherein the preset business domain table records the association relationship between the business domain identifier and the business domain.
3. The distributed microservice platform resource configuration method according to claim 1, characterized in that: Analyze historical tenant transaction information to obtain the initial logical environment, initial business domain, and initial component resources, including: Pre-configure the initial logical environment based on historical tenant transaction records; Determining, based on the environment functions possessed by the initial logical environment, an initial business domain corresponding to the environment functions; Select components with the business functions according to the business functions of the initial business domain; The initial component resources of the initial business domain are composed of components with various business functions in the initial business domain.
4. The distributed microservice platform resource configuration method according to claim 3, characterized in that: Providing different component resources to the tenant according to the judgment result includes: If the result of the judgment is that the business domain required by the tenant does not belong to any of the initial business domains, the business domain required by the tenant is used as a new business domain, component resources corresponding to the business functions of the new business domain are selected from the initial component resources, and the logical environment required by the tenant is determined according to the tenant's needs, and the association relationship between the new business domain, the component resources and the logical environment is recorded; If the judgment result is that the business domain required by the tenant belongs to the initial business domain, the initial component resources associated with the business domain are provided to the tenant.
5. The distributed microservice platform resource configuration method according to claim 4, characterized in that: The method further comprises: Determining whether the business volume corresponding to the newly added business domain exceeds a preset business volume threshold; If the preset business volume threshold is exceeded, the component mode of the component corresponding to the business function of the newly added business domain is set to exclusive mode; If the preset business volume threshold is not exceeded, the component mode of the component corresponding to the business function of the newly added business domain is set to a sharing mode.
6. The distributed microservice platform resource configuration method according to claim 4, characterized in that: The method further comprises: Determine whether the business volume corresponding to the business domain required by the tenant belonging to the initial business domain exceeds a preset business volume threshold; If the business volume exceeds the preset threshold and the mode of the initial component resources pre-matched for the business domain is shared mode, the initial component resources pre-matched for the business domain are changed to exclusive mode; If the preset business volume threshold is not exceeded and the mode of the initial component resources pre-matched for the business domain is the exclusive mode, the initial component resources pre-matched for the business domain are modified to the shared mode.
7. The distributed microservice platform resource configuration method according to claim 6, characterized in that: The component resources include at least one of: a registration center, a configuration center, a gateway, a log service, a monitoring center, a distributed cache, and a distributed message.
8. The distributed microservice platform resource configuration method according to claim 7, characterized in that: A component whose component mode is a shared mode is a shared component, and a component whose component mode is an exclusive mode is an exclusive component. The shared component and the exclusive component are isolated from tenants or applications corresponding to tenants through permission control.
9. The distributed microservice platform resource configuration method according to claim 8, characterized in that: The shared component uses data logic isolation to achieve isolation of component resources.
10. The distributed microservice platform resource configuration method according to claim 8, characterized in that: The exclusive component uses physical isolation to achieve isolation of component resources.
11. The distributed microservice platform resource configuration method according to claim 1, characterized in that: The method further comprises: Determine the tenant's access rights based on the environmental requirements of the tenant's needs; If the tenant meets the access permission, the tenant's request is allowed; If the tenant does not meet the access requirements, the tenant's request is prohibited.
12. A distributed microservice platform resource configuration device, characterized in that: The device comprises: The acquisition unit is used to analyze historical tenant transaction information to obtain the initial logical environment, initial business domain, and initial component resources; An association relationship establishing unit, configured to establish an association relationship between the initial component resources, the initial logical environment, and the initial business domain, to form a tenant-environment-business domain three-dimensional model; A tenant-required business domain determination unit is used to obtain tenant requirements and determine the tenant-required business domain; a judging unit, configured to judge whether the service domain required by the tenant belongs to the initial service domain; A resource configuration unit is configured to provide different component resources to the tenant according to the judgment result and the association relationship and according to the three-dimensional model.
13. A computer 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 according to any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
15. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Data service method and data service device
CN108566412A
SaaS-based multi-tenant data processing method and device
CN112860451A