Shared service isolation method and device based on multiple channels
By calculating the resource requirements of shared services and allocating them to multiple container resource groups, and using random algorithms to balance services, the system stability problems caused by tight server resources in the bank system and multi-channel shared services are solved, multi-channel business isolation and resource integration are realized, and the stability and security of the bank information system are ensured.
Patent Information
- Application Number
- CN202110767945.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-07
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-07-07
AI Technical Summary
Due to the intensive transactions and sharing services through multiple channels, the banking system has shortage of server resources. If there is a problem with a certain channel, it may cause large-scale system paralysis and affect financial stability.
By calculating the historical and future business resources required by shared services, the hash value is used to allocate resources to multiple identification container resource groups, and the shared services within these resource groups are balanced using a random algorithm.
Multi-channel business isolation is achieved to avoid mutual influence, ensure the stability and security of bank information systems, integrate server resources, improve resource utilization, and save operating costs.
Smart Images

Figure CN113487412B_ABST
Abstract
Description
Technical Field
[0001] The present application can be used in the field of distributed technology, and specifically relates to a shared service isolation method and device based on multiple channels. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the invention recited in the claims. No admission is made that the description herein is prior art by inclusion in this section.
[0003] At present, with the continuous advancement of digital banking, banking business systems are gradually transforming into distributed system architectures that can support high transaction concurrency and rapid expansion, using technologies such as microservices and front-end and back-end separation, and gradually a large number of different channel businesses access the same type of services. Such services are gradually formed into shared services, which are provided to various channel business functions, improve service cohesion, reduce coupling between systems, and effectively promote rapid business innovation.
[0004] However, the banking system is a transaction-intensive system with a wide variety of services. Distributed systems require a large number of servers to support them. Many banks have continuously expanded their computer rooms and spent a lot of money to purchase distributed servers. However, with the development of new Internet financial formats, the consumption rate of banking system servers is extremely fast, and server resources are extremely tight. On the other hand, if there is a performance or correlation problem in one of the channels of this multi-channel transaction sharing service, it often affects all channel businesses, and may cause large-scale system paralysis, resulting in the inability to pay customer funds normally, the inability to print transaction receipts, and even the appearance of wrong accounts, which may even affect the country's financial stability. Summary of the invention
[0005] The present invention can be used in the field of distributed technology, and the application field of the multi-channel shared service isolation method and device disclosed in the present invention is not limited. The present invention can achieve multi-channel business isolation, server resource integration, high cohesion and low coupling, safe and efficient shared services. Specifically, on the one hand, the present invention can achieve multi-channel business function isolation, avoid mutual influence, and ensure the stable and safe operation of the bank information system. On the second aspect, the present invention can realize a service rectifier router, integrate server resources, improve resource utilization, and save the operating costs of the bank system.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a shared service isolation method based on multiple channels, comprising:
[0008] Calculating the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service;
[0009] Allocating resources required for processing future services of the shared service to multiple identification container resource groups according to the hash value of the shared service;
[0010] A random algorithm is used to balance the shared services in the plurality of identification container resource groups.
[0011] In one embodiment, the calculating the amount of resources required for processing future services of the shared service according to the amount of resources required for processing historical services of the shared service includes:
[0012] Calculate the amount of resources required for historical processing of the shared service;
[0013] The CPU, memory, bandwidth, disk resources and maximum concurrent transaction volume required for future processing of services of each shared service are calculated based on the amount of resources required for the historical processing of services.
[0014] In one embodiment, according to the hash value of the shared service, the amount of resources required for processing future services of the shared service is allocated to a plurality of identification container resource groups, including:
[0015] Determine each identification container resource group according to the hash value of the shared service;
[0016] By utilizing the shared routing method, the resource amount required for future processing of services is distributed to a plurality of identification container resource groups according to the transaction message information of each identification container resource group.
[0017] In one embodiment, the using of a random algorithm to balance the shared services in the plurality of identification container resource groups includes:
[0018] Generate a target set according to the multiple identification container resource groups;
[0019] Calculate the average distribution value of any element in the target set;
[0020] The shared services in the plurality of identification container resource groups are balanced according to the average distribution value.
[0021] In a second aspect, the present invention provides a shared service isolation device based on multiple channels, the device comprising:
[0022] A resource amount calculation module, used to calculate the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service;
[0023] A resource allocation module, used to allocate the resource amount required for processing future business of the shared service to multiple identification container resource groups according to the hash value of the shared service;
[0024] The shared service balancing module is used to balance the shared services in the plurality of identification container resource groups by using a random algorithm.
[0025] In one embodiment, the resource quantity calculation module includes:
[0026] A historical resource amount calculation unit, used to calculate the amount of resources required for historical processing business of the shared service;
[0027] The future resource amount calculation unit is used to calculate the CPU, memory, bandwidth, disk resources and maximum concurrent transaction volume required for future processing of each shared service based on the resource amount required for the historical processing of the business.
[0028] In one embodiment, the resource allocation module includes:
[0029] A resource group determination unit, configured to determine each identification container resource group according to a hash value of the shared service;
[0030] The resource allocation unit is used to allocate the resource required for future business processing to multiple identification container resource groups according to the transaction message information of each identification container resource group by using a shared routing method.
[0031] In one embodiment, the shared service balancing module includes:
[0032] A target set generating unit, configured to generate a target set according to the plurality of identification container resource groups;
[0033] A distribution value calculation unit, used to calculate the average distribution value of any element in the target set;
[0034] The shared service balancing unit is used to balance the shared services in the multiple identification container resource groups according to the average distribution value.
[0035] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of a multi-channel-based shared service isolation method when executing the program.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a multi-channel-based shared service isolation method.
[0037] From the above description, it can be seen that the embodiment of the present invention provides a shared service isolation method and device based on multiple channels. First, the amount of resources required for processing future services of the shared service is calculated based on the amount of resources required for processing historical services of the shared service; then, according to the hash value of the shared service, the amount of resources required for processing future services is allocated to multiple identification container resource groups; finally, a random algorithm is used to balance the shared services within multiple identification container resource groups. The present invention realizes the isolation of services between different channels and maximizes the utilization of service resources by automatically recording the transaction resource consumption of channel business types, presetting APP service container groups, and designing service routing rectifiers. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 It is a flowchart of a shared service isolation method based on multiple channels in an embodiment of the present invention;
[0040] Figure 2 is a flow chart of step 100 in an embodiment of the present invention;
[0041] Figure 3 is a flow chart of step 200 in an embodiment of the present invention;
[0042] Figure 4 is a flow chart of step 300 in an embodiment of the present invention;
[0043] Figure 5 It is a flowchart of a shared service isolation method based on multiple channels in a specific implementation manner of the present invention;
[0044] Figure 6 It is a block diagram of a multi-channel bank shared service business isolation system in a specific embodiment of the present invention;
[0045] Figure 7 It is a schematic diagram of a process of adjusting a container group in a specific embodiment of the present invention;
[0046] Figure 8 It is a schematic diagram of a method for predicting future resource quantity of a container in a specific embodiment of the present invention;
[0047] Fig. 9 It is a schematic diagram of the container demand of a single container group in a specific embodiment of the present invention;
[0048] Fig.10 It is a schematic diagram of container demand at each time point in the next 24 hours in a specific embodiment of the present invention;
[0049] Fig.11 It is a schematic diagram of dynamic adjustment of channel container group resources in a specific implementation mode of the present invention;
[0050] Fig.12 A block diagram of a shared service isolation device based on multiple channels in an embodiment of the present invention;
[0051] Fig.13 is a block diagram of a resource quantity calculation module 10 in an embodiment of the present invention;
[0052] Fig.14 is a block diagram of a resource allocation module 20 in an embodiment of the present invention;
[0053] Fig.15 is a block diagram of a shared service balancing module 30 in an embodiment of the present invention;
[0054] Fig.16 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0057] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatuses.
[0058] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0059] The embodiment of the present invention provides a specific implementation method of a shared service isolation method based on multiple channels, see Figure 1 , the method specifically includes the following contents:
[0060] Step 100: Calculating the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service;
[0061] Specifically, using a specific algorithm, based on the daily business development trends in the past year, the amount of resources required for each channel business type in each time period in the next day is calculated (such as the number of containers, the CPU, memory, bandwidth, disk resources consumed by each channel business, the maximum concurrent transaction volume in each time period, etc.), so as to flexibly allocate or recycle resources.
[0062] Step 200: allocating the amount of resources required for processing future services of the shared service to a plurality of identification container resource groups according to the hash value of the shared service;
[0063] It is understandable that hash value, also known as hash function, refers to a function that maps the key value of an element in a hash table to the storage location of the element. In a general linear table or tree, the relative position of a record in the structure is random, that is, there is no definite relationship between the record and the keyword. Therefore, a series of comparisons with the keyword are required when searching for records in the structure. This type of search method is based on "comparison", and the efficiency of the search depends on the number of comparisons performed during the search process. The ideal situation is to be able to find the required record directly, so a definite correspondence must be established between the storage location of the record and its keyword, so that each keyword corresponds to a unique storage location in the structure. Intuitively speaking, it is to mix a string of data and output another fixed-length data as the feature (fingerprint) of this data.
[0064] Containers: effectively divide the resources of a single operating system into isolated groups, so as to better balance conflicting resource usage requirements between isolated groups.
[0065] Step 300: Utilize a random algorithm to balance the shared services in the plurality of identification container resource groups.
[0066] A randomized algorithm is a concept called a Turing machine, that is, a random factor is introduced into the algorithm, that is, the next operation of the algorithm is selected by a random number. It uses a certain degree of randomness as part of its logic. The algorithm usually uses uniform random bits as auxiliary inputs to guide its behavior, and the hope of achieving good performance "on average" over all possible choices of random bits is achieved. Formally, the performance of the algorithm will be a random variable, determined by the random bits; therefore, either the running time, or the output (or both) are random variables.
[0067] In common practice, randomization algorithms are implemented using approximate pseudo-random number generators instead of true sources of random bits; such implementations can deviate from expected theoretical behavior.
[0068] Specifically, we first build an efficient shared router, and then calculate (according to channel information such as channel type, transaction code, etc., obtain the container resource group through hash value calculation) and route it to the pre-allocated resource group according to the transaction message information such as channel type and transaction code of each channel. A random algorithm is used within the resource group to provide services in a balanced manner.
[0069] From the above description, it can be seen that the embodiment of the present invention provides a shared service isolation method based on multiple channels. First, the amount of resources required for the shared service to process future services is calculated based on the amount of resources required for the shared service to process historical services; then, based on the hash value of the shared service, the amount of resources required for future services is allocated to multiple identification container resource groups; finally, a random algorithm is used to balance the shared services within multiple identification container resource groups. The present invention realizes the isolation of services between different channels and maximizes the utilization of service resources by automatically recording the transaction resource consumption of channel business types, presetting APP service container groups, and designing service routing rectifiers.
[0070] In summary, the multi-channel shared service isolation method provided by the embodiment of the present invention can achieve multi-channel business isolation, server resource integration, high cohesion and low coupling, safe and efficient shared services. It can achieve multi-channel business function isolation to avoid mutual influence and ensure the stable and safe operation of the bank information system. It can also achieve service rectification router, integrate server resources, improve resource utilization, and save the operating cost of the bank system.
[0071] In one embodiment, see Figure 2 , step 100 further comprises:
[0072] Step 101: Calculate the amount of resources required for the historical processing business of the shared service;
[0073] Step 102: Calculate the CPU, memory, bandwidth, disk resources and maximum concurrent transaction volume required for future processing of each shared service based on the amount of resources required for the historical processing of the services.
[0074] In step 101 to step 102, the provider's service transaction log, container specifications, single transaction CPU consumption, single transaction memory consumption, transaction concurrency and other information are collected after daily cutting, and the container usage of the container group at each time point on the previous day is calculated by batch calculation, and stored for calculating the container usage for the next day.
[0075] In one embodiment, see Figure 3 , step 200 further comprises:
[0076] Step 201: Determine each identification container resource group according to the hash value of the shared service;
[0077] Step 202: using a shared routing method, the amount of resources required for future service processing is allocated to a plurality of identification container resource groups according to the transaction message information of each identification container resource group.
[0078] In one embodiment, see Figure 4 , step 300 further comprises:
[0079] Step 301: Generate a target set according to the multiple identification container resource groups;
[0080] Step 302: Calculate the average distribution value of any element in the target set;
[0081] Step 303: Balancing the shared services in the multiple identification container resource groups according to the average distribution value.
[0082] In a specific implementation, the present invention takes the multi-channel bank shared service business as an example to provide a specific implementation of the multi-channel shared service isolation method. Figure 5 .
[0083] Terminology Introduction:
[0084] Channel refers to the channel for initiating access to banking services, such as corporate online banking, self-service terminals, counters, bank-enterprise interconnection, third-party cooperation platforms, China National Network Payment Corporation, and China UnionPay.
[0085] See also Figure 6 In this specific implementation, a multi-channel bank shared service business isolation system is also provided. After channel 1 initiates a transaction, it first passes through the service rectifier. The service rectifier determines that the transaction is directed to the corresponding channel app container group based on the provider group identifier. The container group provides services, and the container group uses a random algorithm to route access to specific provider services.
[0086] Based on the above-mentioned multi-channel bank shared service business isolation system, the multi-channel shared service isolation method provided in this specific implementation includes:
[0087] S1: Calculate the amount of resources required for future shared service processing based on the amount of resources required for historical shared service processing;
[0088] The shared services of multi-channel banking business are built using a distributed system and deployed on the PaaS cloud platform;
[0089] S2: Allocate the resources required for future business processing to multiple identification container resource groups based on the hash value of the shared service;
[0090] S3: Use a random algorithm to balance shared services within multiple identity container resource groups.
[0091] Specifically, an efficient shared router is built to calculate (obtain container resource groups through hash value calculation based on channel information such as channel type and transaction code) and route to the pre-allocated resource group according to the transaction message information such as channel type and transaction code of each channel. A random algorithm is used within the resource group to provide services in a balanced manner.
[0092] Finally, set the resource threshold for each channel business type. When the transaction concurrency of a certain channel business reaches the resource threshold, based on the preset incremental resources, when the total number of resources is surplus, automatically increase the allocated container resources (incremental resource step, maximum number of times); when the maximum resources are reached, alarm the operation and maintenance personnel and implement service downgrade for non-core services to ensure the transaction resources of core services; isolate services with abnormal resource consumption.
[0093] Figure 7 This is a diagram of the container group adjustment process. The container group adjustment timing background initiates the container group adjustment regularly. The container group demand analysis module is mainly responsible for processing the provider service transaction data into the App container demand data of the container group according to the data model.
[0094] See Table 1 and Figure 8 , after daily cutting, the provider service transaction log, container specifications, single transaction CPU consumption, single transaction memory consumption, number of concurrent transactions and other information are batch calculated to calculate the container usage of the container group at each time point of the previous day, and stored as the calculation of the container usage for the next day.
[0095] Table 1
[0096]
[0097] Fig. 9It is a schematic diagram of container demand for a single container group, which is calculated based on the data model to predict the container demand curve (the broken line is the estimated container demand).
[0098] Fig.10 To aggregate the container group demand, the container demand at each time point in the next 24 hours (the numerical value represents the container demand), as well as the specific time points when additional allocated containers or recycled containers are added.
[0099] Fig.11 This is a diagram of the dynamic adjustment of channel container group resources. When the consumption of real-time transactions in the container group exceeds the threshold (such as CPU usage exceeds 80%, or memory usage exceeds 80%), the dynamic adjustment of the container group is triggered and dynamic adjustment is performed according to the set dynamic adjustment step.
[0100] From the above description, it can be seen that in order to solve the problems in the prior art, the specific implementation of the present invention provides a shared service isolation method based on multiple channels, which has the following beneficial effects: on the one hand, when a failure occurs in a transaction in an individual channel, the normal operation of the business in other channels can still be guaranteed; on the other hand, through business flow regulation, the utilization rate of the server resources of the banking system can be maximized.
[0101] Based on the same inventive concept, the embodiments of the present application also provide a multi-channel-based shared service isolation device, which can be used to implement the methods described in the above embodiments, such as the following embodiments. Since the principle of solving the problem by the multi-channel-based shared service isolation device is similar to that of the multi-channel-based shared service isolation method, the implementation of the multi-channel-based shared service isolation device can refer to the implementation of the multi-channel-based shared service isolation method, and the repeated parts will not be repeated. As used below, the terms "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0102] The embodiment of the present invention provides a specific implementation of a multi-channel based shared service isolation device capable of implementing a multi-channel based shared service isolation method, see Fig.12 The multi-channel shared service isolation device specifically includes the following contents:
[0103] A resource amount calculation module 10, used to calculate the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service;
[0104] A resource allocation module 20, configured to allocate the resource amount required for processing future services of the shared service to a plurality of identification container resource groups according to the hash value of the shared service;
[0105] The shared service balancing module 30 is used to balance the shared services in the plurality of identification container resource groups by using a random algorithm.
[0106] In one embodiment, see Fig.13 , the resource quantity calculation module 10 includes:
[0107] A historical resource amount calculation unit 101 is used to calculate the amount of resources required for historical processing services of the shared service;
[0108] The future resource amount calculation unit 102 is used to calculate the CPU, memory, bandwidth, disk resources and maximum concurrent transaction volume required for future processing of each shared service based on the resource amounts required for the historical processing of the services.
[0109] In one embodiment, see Fig.14 , the resource allocation module 20 includes:
[0110] A resource group determination unit 201, configured to determine each identification container resource group according to a hash value of the shared service;
[0111] The resource allocation unit 202 is used to allocate the resource required for future service processing to multiple identification container resource groups according to the transaction message information of each identification container resource group by using a shared routing method.
[0112] In one embodiment, see Fig.15 The shared service balancing module 30 includes:
[0113] A target set generating unit 301 is configured to generate a target set according to the plurality of identification container resource groups;
[0114] A distribution value calculation unit 302, used to calculate the average distribution value of any element in the target set;
[0115] The shared service balancing unit 303 is configured to balance the shared services in the plurality of identification container resource groups according to the average distribution value.
[0116] From the above description, it can be seen that the embodiment of the present invention provides a shared service isolation device based on multiple channels. First, the amount of resources required for processing future services of the shared service is calculated based on the amount of resources required for processing historical services of the shared service; then, based on the hash value of the shared service, the amount of resources required for processing future services is allocated to multiple identification container resource groups; finally, a random algorithm is used to balance the shared services within multiple identification container resource groups. The present invention realizes the isolation of services between different channels and maximizes the utilization of service resources by automatically recording the transaction resource consumption of channel business types, presetting APP service container groups, and designing service routing rectifiers.
[0117] In summary, the multi-channel shared service isolation device provided in the embodiment of the present invention can realize multi-channel business isolation, server resource integration, high cohesion and low coupling, safe and efficient shared services. It can realize multi-channel business function isolation to avoid mutual influence and ensure the stable and safe operation of the bank information system. It can realize service rectification router, integrate server resources, improve resource utilization, and save the operating cost of the bank system.
[0118] The embodiment of the present application also provides a specific implementation of an electronic device capable of implementing all steps in the multi-channel based shared service isolation method in the above embodiment, see Fig.16 , electronic equipment specifically includes the following:
[0119] Processor (processor) 1201, memory (memory) 1202, communication interface (CommunicationsInterface) 1203 and bus 1204;
[0120] The processor 1201, the memory 1202, and the communication interface 1203 communicate with each other through the bus 1204; the communication interface 1203 is used to realize information transmission between the server device and the client device and other related devices;
[0121] The processor 1201 is used to call the computer program in the memory 1202. When the processor executes the computer program, all the steps in the multi-channel-based shared service isolation method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0122] Step 100: Calculating the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service;
[0123] Step 200: allocating the amount of resources required for processing future services of the shared service to a plurality of identification container resource groups according to the hash value of the shared service;
[0124] Step 300: Utilize a random algorithm to balance the shared services in the plurality of identification container resource groups.
[0125] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the multi-channel-based shared service isolation method in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps in the multi-channel-based shared service isolation method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0126] Step 100: Calculating the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service;
[0127] Step 200: allocating the amount of resources required for processing future services of the shared service to a plurality of identification container resource groups according to the hash value of the shared service;
[0128] Step 300: Utilize a random algorithm to balance the shared services in the plurality of identification container resource groups.
[0129] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0130] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do 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.
[0131] Although the present application provides method operation steps such as embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0132] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0133] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0134] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0135] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0136] The present specification embodiments may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present specification embodiments may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0137] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0138] The above is only an example of the embodiment of the present specification and is not intended to limit the embodiment of the present specification. For those skilled in the art, the embodiment of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of the present specification shall be included in the scope of the claims of the embodiment of the present specification.
Claims
1. A shared service isolation method based on multiple channels, characterized in that: include: Calculating the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service; Allocating resources required for processing future services of the shared service to multiple identification container resource groups according to the hash value of the shared service; Using a random algorithm to balance the shared services in the plurality of identification container resource groups; The calculating the amount of resources required for processing future services of the shared service according to the amount of resources required for processing historical services of the shared service includes: Calculate the amount of resources required for processing historical business of the shared service; The CPU, memory, bandwidth, disk resources and maximum concurrent transaction volume required for each shared service to process future business are calculated based on the amount of resources required to process historical business. Specifically: Based on the service transaction logs, container specifications, CPU consumption per transaction, memory consumption per transaction, and concurrent transaction information of the provider, after daily cuts, the container usage at each time point of the previous day is calculated through batch computing container groups, and stored as the container usage for calculating the next day; According to the hash value of the shared service, the amount of resources required for processing future services of the shared service is allocated to multiple identification container resource groups, including: Determine each identification container resource group according to the hash value of the shared service; Using a shared routing method, the amount of resources required for processing future services is allocated to multiple identification container resource groups according to the transaction message information of each identification container resource group; The method of balancing the shared services in the plurality of identification container resource groups by using a random algorithm includes: Generate a target set according to the multiple identification container resource groups; Calculate the average distribution value of any element in the target set; The shared services in the plurality of identification container resource groups are balanced according to the average distribution value.
2. A shared service isolation device based on multiple channels, characterized in that: include: A resource amount calculation module, used to calculate the amount of resources required for processing future services of the shared service based on the amount of resources required for processing historical services of the shared service; A resource allocation module, used to allocate the resource amount required for processing future business of the shared service to multiple identification container resource groups according to the hash value of the shared service; A shared service balancing module, used to balance the shared services in the plurality of identification container resource groups by using a random algorithm; The resource quantity calculation module includes: A historical resource amount calculation unit, used to calculate the amount of resources required for processing historical business of the shared service; The future resource amount calculation unit is used to calculate the CPU, memory, bandwidth, disk resources and maximum concurrent transaction volume required for processing future business of each shared service according to the resource amount required for processing historical business, specifically: Based on the service transaction logs, container specifications, CPU consumption per transaction, memory consumption per transaction, and concurrent transaction information of the provider, after daily cuts, the container usage at each time point of the previous day is calculated through batch computing container groups, and stored as the container usage for calculating the next day; The resource allocation module includes: A resource group determination unit, configured to determine each identification container resource group according to a hash value of the shared service; A resource allocation unit, configured to allocate the resource required for processing future services to a plurality of identification container resource groups according to the transaction message information of each identification container resource group by using a shared routing method; The shared service balancing module includes: A target set generating unit, configured to generate a target set according to the plurality of identification container resource groups; A distribution value calculation unit, used to calculate the average distribution value of any element in the target set; The shared service balancing unit is used to balance the shared services in the multiple identification container resource groups according to the average distribution value.
3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the multi-channel based shared service isolation method according to claim 1 are implemented.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-channel based shared service isolation method described in claim 1 are implemented.
Citation Information
Patent Citations
Resource load balancing method and device in distributed system
CN106534284A
Resource isolation method and device for distributed database system, and server
CN108829507A