A method and device for automatically and dynamically allocating nodes in a distributed cache access layer

By calculating the correlation coefficients of the average call volume and response time of the access layer nodes, dynamically adjusting the number of cache cluster nodes, solving the problems of resource waste and service quality in the existing technology, and achieving stable access under high concurrency and low peak time Resource optimization.

CN113515524BActive Publication Date: 2024-11-12INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110861866.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2024-11-12
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

In the prior art, the cache system is idle when the business volume is not high, and the number of cache cluster nodes cannot be dynamically managed, resulting in waste of resources and service quality cannot be guaranteed, and the existing monitoring parameters cannot accurately reflect application changes and cannot meet high concurrency. need.

Method used

By obtaining the correlation coefficients of the average call volume and the average call response time of the access layer node, expand or reduce capacity according to the node allocation rules, dynamically adjust the number of nodes to avoid resource waste and improve service quality.

Benefits of technology

It realizes automatic and fast response during high concurrency, maintains high-speed and stable cache services, and automatically reduces capacity during low peaks, avoids resource waste, reduces operation and maintenance pressure, and improves business performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113515524B_ABST
    Figure CN113515524B_ABST
Patent Text Reader

Abstract

This article relates to the field of big data, and is applicable to the financial field, and in particular to a method and device for automatically and dynamically allocating nodes at the access layer of a distributed cache. The method includes obtaining the average call volume per unit time of the currently running nodes at the access layer; obtaining the average call response time per unit time of the currently running nodes at the access layer; determining the correlation coefficient between the average call volume and the average call response time; and performing expansion or reduction operations on the currently running nodes at the access layer according to the correlation coefficient and the node allocation rules. The method and device for automatically and dynamically allocating nodes at the access layer of a distributed cache involved in this article can dynamically manage the number of nodes in each cache cluster, and while meeting high-speed access to cache services, can avoid wasting cache resources when the business volume is low, and can also avoid investing a lot of manpower costs, automatically complete performance capacity detection and adjustment of the number of nodes, and further improve business performance and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to the field of big data and can be used in the financial field, especially a method and device for automatic dynamic allocation of distributed cache access layer nodes. Background Art

[0002] With the development of Internet technology, Internet applications and online businesses have increased, and Internet content, the number of Internet users, and user visits have also increased. The growth of users has led to an increase in business volume, and the demand for Internet applications to support high concurrency has also increased. For example, in a market trading system, when the trading situation suddenly changes, the user visit volume increases sharply and may last for dozens of minutes or an hour, which places high demands on the application system to provide fast, efficient and stable responses in a short period of time.

[0003] In order to cope with unexpected high-concurrency business scenarios, the underlying support platform system in the prior art, especially the cache system, usually prepares a large number of redundant resources to cope with sudden scenarios. When the business volume is not high, the redundant resources of the cache system are idle and the utilization rate is low, which easily leads to resource waste and is not suitable for stable business periods. In addition, the prior art usually uses parameters such as CPU occupancy rate, memory occupancy rate, bandwidth, etc. as indicators for monitoring and managing cache resources. These parameters cannot accurately reflect the changes in application responsibilities, and the accuracy is not high enough when realizing automatic node allocation. It may still be unable to meet the node allocation requirements of a sudden increase in business volume, and the service quality cannot be guaranteed.

[0004] In order to solve the problem that redundant resources prepared by the cache system may be wasted during periods of stable business volume, there is an urgent need to study a distributed cache access layer node automatic dynamic allocation system and method, which can dynamically manage the number of nodes in each cache cluster, so as to meet the demand for high-speed access to cache services and avoid waste of cache resources when the business volume is low. At the same time, it can also avoid the large amount of manpower cost of paying attention to the performance capacity of each tenant's call, automatically complete performance capacity detection and adjustment of the number of nodes, reduce the operation and maintenance pressure of front-line operation and maintenance personnel, and further improve business performance and user experience. Summary of the invention

[0005] To solve the above problems of the prior art, the embodiments of this article provide a method, apparatus, computer equipment and storage medium for automatically and dynamically allocating nodes of a distributed cache access layer, which solves the problem in the prior art that the number of cache cluster nodes cannot be dynamically managed.

[0006] The embodiment of this article provides a method for automatically and dynamically allocating nodes in a distributed cache access layer, including: obtaining the average call volume per unit time of the currently running node in the access layer; obtaining the average call response time per unit time of the currently running node in the access layer; determining the correlation coefficient between the average call volume and the average call response time; and performing expansion or contraction operations on the currently running node in the access layer according to the correlation coefficient and the node allocation rule. According to one aspect of the embodiment of this article, determining the correlation coefficient between the average call volume and the average call response time includes: determining the correlation coefficient between the average call volume and the average call response time according to the correlation coefficient formula, and the correlation coefficient calculation formula is: Where X represents the average call volume per unit time, Y represents the average call response time per unit time; Cov(X,Y) represents the covariance of X and Y; Var[X] represents the variance of X; Var[Y] represents the variance of Y.

[0007] According to one aspect of the embodiments of this document, the node allocation rules include node expansion allocation rules and node reduction allocation rules. According to the correlation coefficient and the node allocation rules, performing expansion or reduction operations on the current operating node of the access layer further includes: when the number of times the correlation coefficient is greater than a first threshold value exceeds the expansion threshold value within a period of time, an expansion operation is performed on the current operating node of the access layer; when the number of times the correlation coefficient is less than a second threshold value exceeds the reduction threshold value within a period of time, a reduction operation is performed on the current operating node of the access layer.

[0008] According to one aspect of the embodiments of this document, the expansion or reduction operation performed on the current operating node of the access layer based on the correlation coefficient and the node allocation rule further includes: when the correlation coefficient is continuously greater than a first threshold value for more than the expansion threshold value, the expansion operation is performed on the current operating node of the access layer; when the correlation coefficient is continuously less than a second threshold value for more than the reduction threshold value, the reduction operation is performed on the current operating node of the access layer.

[0009] According to one aspect of the embodiments of this document, when the correlation coefficient is continuously greater than the first threshold value for more than the expansion threshold value, performing an expansion operation on the current operating node of the access layer further includes, when the correlation coefficient is greater than 0.8 for three consecutive times, performing an expansion operation on the current operating node of the access layer; when the correlation coefficient is continuously less than the second threshold value for more than the reduction threshold value, performing a reduction operation on the current operating node of the access layer further includes, when the correlation coefficient is less than 0.3 for 10 consecutive times, performing a reduction operation on the current operating node of the access layer.

[0010] According to one aspect of the embodiments of this document, performing a capacity expansion operation on the current running node of the access layer according to the correlation coefficient and the node allocation rule includes: when the correlation coefficient meets the node capacity expansion allocation rule, selecting a first number of container copies from the access layer node resource pool to add to the current running node.

[0011] According to one aspect of the embodiments of this document, performing a capacity reduction operation on the access layer node based on the correlation coefficient and the node allocation rule includes: when the correlation coefficient satisfies the node capacity reduction allocation rule, selecting a second number of container copies from the currently running nodes, and isolating the container copies.

[0012] The embodiment of the present invention further provides an automatic dynamic allocation device for distributed cache access layer nodes, including:

[0013] The first acquisition unit is used to acquire the average call volume per unit time of the currently running node of the access layer;

[0014] The second acquisition unit is used to acquire the call response time per unit time of the current running node of the access layer;

[0015] A determination unit, used to determine a correlation coefficient between the average call volume and the average call response time;

[0016] An operation unit is used to perform expansion or reduction operations on access layer nodes according to the correlation coefficient and the node allocation rule.

[0017] The embodiment of this article also provides 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 above-mentioned automatic dynamic allocation method of the distributed cache access layer nodes when executing the computer program.

[0018] The embodiments of the present invention further provide a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the above-mentioned method for automatically and dynamically allocating nodes at the distributed cache access layer is implemented.

[0019] By utilizing the embodiments of this article, by dynamically adjusting the nodes in the cluster, it is possible to automatically and quickly respond when the transaction volume of the business system suddenly increases, complete automatic judgment and automatic expansion, so that the business system's call to the cache system can remain high-speed and stable, and automatically shrink the nodes during the low-peak period of the business system's transaction volume, and add redundant resources to the resource pool for use by the nodes that need to be expanded. This can not only meet the high-speed access requirements of the cache service, but also avoid the waste of cache resources when the business volume is low, and at the same time avoid a lot of manpower costs, automatically complete performance capacity detection and adjustment of the number of nodes, reduce the operation and maintenance pressure of front-line operation and maintenance personnel, and further improve business performance and user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. 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 creative work.

[0021] Figure 1 The figure shows a schematic diagram of a network structure of automatic dynamic allocation of a distributed cache access layer node according to an embodiment of this invention;

[0022] Figure 2 It is a flow chart of a method for automatically and dynamically allocating nodes at a distributed cache access layer according to an embodiment of this invention;

[0023] Figure 3 It is a schematic diagram of the structure of an automatic dynamic allocation device of a distributed cache access layer node according to an embodiment of this invention;

[0024] Figure 4 The figure is a schematic diagram of the specific structure of an automatic dynamic allocation device for a distributed cache access layer node according to an embodiment of this invention;

[0025] Figure 5 It is a flow chart of a method for performing capacity expansion operation on an access layer node according to an embodiment of this invention;

[0026] Figure 6 The flowchart of a method for performing a capacity reduction operation on an access layer node according to an embodiment of the present invention is shown;

[0027] Figure 7 Shown is a schematic diagram of the structure of a computer device according to an embodiment of this invention.

[0028] Description of the accompanying symbols:

[0029] 101. User end;

[0030] 102. Network;

[0031] 103. Cluster;

[0032] 104, node;

[0033] 301. A first acquiring unit;

[0034] 3011, first calculation module;

[0035] 302. A second acquiring unit;

[0036] 3021, second calculation module;

[0037] 303. Determine the unit;

[0038] 3031, cache call module;

[0039] 3032. Statistical analysis module;

[0040] 3033, storage module;

[0041] 304, operating unit;

[0042] 3041, management and scheduling module;

[0043] 3042, storage module;

[0044] 702. Computer equipment;

[0045] 704, processor;

[0046] 706. Memory;

[0047] 708, driving mechanism;

[0048] 710, input / output module;

[0049] 712. Input devices;

[0050] 714. Output devices;

[0051] 716. Presentation equipment;

[0052] 718. Graphical user interface;

[0053] 720, network interface;

[0054] 722. Communication link;

[0055] 724. Communication bus. DETAILED DESCRIPTION

[0056] In order to enable those skilled in the art to 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 described embodiments 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 creative work are within the scope of protection of this specification.

[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes 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 equipment.

[0058] This specification provides method operation steps as described in the embodiments or flow charts, 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 order of many steps and does not represent the only execution order. When the system or device product is executed in practice, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel.

[0059] It should be noted that the visualized on-duty emergency response interaction method and device in this article can be used in the financial field, and can also be used in any field other than the financial field. The application field of the visualized on-duty emergency response interaction method and device in this article is not limited.

[0060] like Figure 1 The figure shows a network structure diagram of an automatic dynamic allocation system of a distributed cache access layer node according to an embodiment of the present invention, and describes an automatic dynamic allocation method of a distributed cache access layer node by combining a user terminal 101, a network 102, a cluster 103, and a node 104. Among them, data can be exchanged between the user terminal 101, the network 102, the cluster 103, and the node 104.

[0061] In some embodiments of the present specification, the user terminal 101 can be an electronic device with network interaction function, or it can be software running in the electronic device to provide business logic for data processing and network interaction. Among them, the user terminal 101 sends a business request during the business operation process, generates business call requirements on multiple nodes in the cluster, and generates business call volume. Multiple user terminals 101 can access one or more nodes in the cluster 103 at the same time. The user terminal 101 can be connected to the cluster 103 through the network, that is, it is connected to multiple node terminals in the cluster 103 through the network 102. The user terminal 101 includes but is not limited to electronic devices such as personal computers, laptops, desktop computers, tablet computers, laptops, smart phones, digital assistants, smart wearable devices, and also includes software such as browsers and applications.

[0062] In some embodiments of the present specification, the network 102 may facilitate the exchange of information and / or data. In some embodiments, at least one component in the cluster 103 (e.g., node 104, capacity replica, etc.) may send information and / or data to other components via the network 102. For example, the cluster 103 may obtain information such as user access volume and service call volume from the user terminal 101 via the network 102.

[0063] In some embodiments, network 102 may be any form of wired or wireless network, or any combination thereof. By way of example only, network 102 may include a cable network, a wired network, a fiber optic network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, a near field communication (NFC) network, etc., or any combination thereof. In some embodiments, network 102 may include at least one network access point. For example, network 102 may include a wired or wireless network access point, such as a base station and / or an Internet exchange point, through which at least one component in cluster 103 may connect to network 102 to exchange data and / or information.

[0064] In some embodiments of the present specification, cluster 103 may be an electronic device with network interaction function, or may be software running in the electronic device to provide business logic for data processing and network interaction. Cluster 103 may include multiple servers, computers or other devices. Cluster 103 includes at least one node 104. The node is connected to cluster 102 via network 103. Cluster 103 may include multiple modules such as cluster registration center, storm statistical analysis module, management scheduling module, etc.

[0065] In some embodiments of this specification, node 104 can be an electronic device with network interaction function.Node 104 includes but is not limited to one or any combination of personal computers, laptops, desktop computers, tablet computers, laptops, smart phones, digital assistants, smart wearable devices, etc. Multiple nodes 104 are connected to cluster 103 via a network. The node 104 is not limited to the above-mentioned electronic device with a certain entity, and it can also be a software running in the above-mentioned electronic device. Node 104 can include a container or multiple related containers, and the container included in a node runs on the same host machine, uses the same network namespace, IP address, port, and can communicate through the local host. In some embodiments of this specification, when a container in a node stops, the cluster will automatically detect the problem and restart this node and all processes in the node. If the node is down, all processes in this node will be rescheduled to other nodes.

[0066] like Figure 2 The flowchart of the method for automatically and dynamically allocating access layer nodes of a distributed cache in an embodiment of the present invention is shown. In this figure, a process method for expanding or reducing the capacity of access layer nodes by using the correlation coefficient of the average call volume per unit time and the call response time and the node call rule is described, which specifically includes the following steps:

[0067] Step 201, average call volume per unit time of the currently running node in the access layer;

[0068] Step 202, obtaining the average call response time per unit time of the currently running node of the access layer;

[0069] Step 203, determining the correlation coefficient between the average call volume and the average call response time;

[0070] Step 204: perform expansion or reduction operations on the currently running nodes of the access layer according to the correlation coefficient and the node allocation rule.

[0071] As an embodiment of this invention, determining the correlation coefficient between the average call volume and the average call response time includes: determining the correlation coefficient between the average call volume and the average call response time according to a correlation coefficient formula, wherein the correlation coefficient calculation formula is: Where X represents the average call volume per unit time, Y represents the average call response time per unit time; Cov(X,Y) represents the covariance of the average call volume and the average call response time per unit time; Var[X] represents the variance of the average call volume per unit time; Var[Y] represents the variance of the average call response time per unit time.

[0072] In this step, the access layer is the business layer in the network that directly faces user connections or user access to the network. The access layer allows users to directly connect to the network. The access layer can implement general business logic processing functions, including but not limited to data encoding, data decoding, user identity verification, user access frequency control, current limiting and degradation, data caching, microservice entry and other functions. The business layer can be implemented in the form of middleware within the business logic layer, and the business functions of the access layer will also be shared by multiple business logic layer services of other systems.

[0073] In this step, the user's access data is generated at the access layer, and one user's access can be regarded as a call to the service. Multiple users can generate calls at the access layer at a certain moment or in a unit time period. In the scenario of the embodiment of the present invention, when the user sends an access request from the user end, the source data of the call volume and call response time is generated in the cluster, and sent to the data statistics analysis module of the cluster for calculation and processing. In this step, the node expansion is described by taking the Kubernetes cluster as an example. Kubernetes (k8s) is a distributed architecture based on container technology, which provides containerized applications with rich and diverse functions such as resource scheduling, deployment and operation, service discovery, and expansion and contraction. K8s allows users to directly participate in applications and development, and can achieve automatic deployment, automatic restart, automatic replication, and automatic scaling / extension.

[0074] Specifically, the service caller (Master) in the Kubernetes cluster starts calling the service, which is pulled down from the cluster registration center to the local cache of the service caller. The service caller selects a service provider from the list of service providers in the local cache according to certain service call rules to initiate the call. After the call is completed, the service caller can determine the call response time of the service. Among them, the Master node of the Kubernetes cluster can also sense the offline situation of a machine or a node in the cluster. The cluster registration center can delete the service provider information of the node from the cluster registration center and notify each node in the cluster so that the service caller no longer calls the node.

[0075] The cluster data statistics analysis module mathematically processes the values ​​of call volume and call response time to obtain the average call volume and average call response time. The covariance and variance calculation formulas are used to calculate the covariance and variance of the average call volume and average call response time, respectively, and then the correlation coefficient is calculated using the correlation coefficient calculation formula. After the average call volume and average call response time are calculated and processed, the calculation results are stored in the cluster registration center in real time in the form of key-value pairs (key and value).

[0076] In this step, the unit time is a period of time, such as 5 seconds, 10 seconds, 1 minute, 10 minutes, one hour, etc. The system can dynamically determine the specific length of the unit time according to the real-time business situation, or according to the test needs.

[0077] In this step, the relationship between the average call volume and the average call response time per unit time is obtained through the correlation coefficient calculation formula. Among them, the correlation coefficient r(x,y) is a constant less than 1. Taking the "commemorative coin purchase event" as an example, in the time period from 23:00 to 23:07 on May 22, the average call volume (unit: thousand) of users in a certain access layer was 30, 37, 95, 390, 270, 170, 78, and the corresponding average call response time (unit: milliseconds) was 1.34, 1.59, 3.15, 28.23, 23.25, 20.13, 2.25. The correlation coefficient between the average call volume and the average call response time is 0.9477 determined by the correlation coefficient calculation formula.

[0078] As an embodiment of this article, the node allocation rules include node expansion allocation rules and node reduction allocation rules. According to the correlation coefficient and the node allocation rules, performing expansion or reduction operations on the access layer node further includes: when the number of times the correlation coefficient is greater than a first threshold value exceeds the expansion threshold value within a period of time, performing an expansion operation on the access layer node; when the number of times the correlation coefficient is less than a second threshold value exceeds the reduction threshold value within a period of time, performing a reduction operation on the access layer node.

[0079] In this step, the node expansion allocation rule applies to the situation when the transaction volume of the business system is at its peak. When the transaction volume of the business system is at its peak, the average call volume is large and the average call response time increases rapidly with the increase in the call volume. The business transaction response time of calling the cache system is long, indicating that the performance of the cache system is not optimistic and is close to the bottleneck. The current cache performance cannot meet the business needs and is likely to affect the business experience. Therefore, consider expanding the nodes of the access layer cache, that is, increasing the number of access layer nodes.

[0080] In this step, the node reduction allocation rule applies to the situation when the transaction volume of the business system is at a low peak. When the transaction volume of the business system is at a low peak, the average call volume is small and the average call response time does not have a significant upward trend with the fluctuation of the call volume. The business transaction response time of calling the cache system does not fluctuate significantly, indicating that the performance of the cache system is acceptable and has not reached a bottleneck. The cache node resources of the cluster are relatively wasteful relative to the current small business volume, so consider reducing the access layer cache nodes, that is, reducing the number of access layer nodes.

[0081] In this step, the node allocation rule can be dynamically adjusted according to the actual business situation, or determined according to past test results. The node allocation rule can be stored in the cluster registration center or in an external memory.

[0082] In some embodiments of this document, according to actual tests, the correlation coefficient between the average call volume per unit time and the service call response time can reflect whether the cluster performance in the business has reached a bottleneck. When the correlation coefficient between the average call volume per unit time and the average call response time is higher than the first threshold value, it is considered that the cluster performance capacity of the business has reached a bottleneck; when the correlation coefficient is less than the second threshold value, it is considered that the cluster performance capacity of the business has not reached a bottleneck; when the correlation coefficient is within the range of the second threshold value and the second threshold value, it is considered that the cluster performance capacity of the business is normal, the cluster resources are adapted to the current business situation, and there is no need to perform cache expansion or reduction operations. Among them, the first threshold value and the second threshold value can be determined by the system based on the performance of the cache system over a period of time in the past.

[0083] In this step, the management and scheduling module in the cluster periodically detects the value of the key of the correlation coefficient stored in the cluster registration center, and then sends a node expansion / reduction instruction to the Master node in the Kubernetes (k8s) cluster where the access layer node in the cluster is located according to the node allocation rule.

[0084] As an embodiment of this article, the expansion or reduction operation of the access layer node according to the correlation coefficient and the node allocation rule further includes: when the correlation coefficient is continuously greater than the first threshold value for more than the expansion threshold value, the access layer node is expanded; when the correlation coefficient is continuously less than the second threshold value for more than the reduction threshold value, the access layer node is reduced.

[0085] In this step, considering the randomness of business behavior and the instability in the actual network and hardware environment, the situation where the correlation coefficient is greater than the first threshold value and exceeds the expansion threshold value here may be sporadic, so considering that the number of times the correlation coefficient is continuously greater than the first threshold value exceeds the expansion threshold value, it can be determined that the current business system transaction volume is at a peak period, and the access layer node is expanded. Similarly, considering that the number of times the correlation coefficient is less than the second threshold value exceeds the reduction threshold value, it may be sporadic, so considering that the number of times the correlation coefficient is continuously less than the second threshold value exceeds the reduction threshold value, it can be determined that the current business system transaction volume is at a low peak period, and the access layer node is reduced.

[0086] In this step, the first threshold value and the second threshold value are two values ​​of the correlation coefficient, and the expansion threshold value and the reduction threshold value indicate the number of times the correlation coefficient exceeds the first threshold value and the second threshold value. For example, the first threshold value is 0.7 and the expansion threshold value is 5 times, which means that the correlation coefficient exceeds 0.7 more than 5 times; for another example, the second threshold value is 0.2 and the reduction threshold value is 8 times, which means that the correlation coefficient is less than 0.2 more than 8 times.

[0087] As an embodiment of this article, when the correlation coefficient is continuously greater than the first threshold value for more than the expansion threshold value, the expansion operation on the access layer node further includes, when the correlation coefficient is greater than 0.8 for three consecutive times, the expansion operation on the access layer node is performed; when the correlation coefficient is continuously less than the second threshold value for more than the reduction threshold value, the reduction operation on the access layer node further includes, when the correlation coefficient is less than 0.3 for 10 consecutive times, the reduction operation on the access layer node is performed.

[0088] In this step, the first threshold value is 0.8, and the expansion threshold value is 3 times. When the correlation coefficient between the average call volume and the average call response time of the access layer node exceeds 0.8 for three consecutive times, the performance of the cache system is relatively tight and close to the bottleneck, so it is necessary to perform expansion operations on the access layer nodes. In this step, the second threshold value is 0.3, and the reduction threshold value is 10 times. When the correlation coefficient between the average call volume and the average call response time of the access layer node is lower than 0.3 for 10 consecutive times, the performance of the cache system is sufficient and some system resources are redundantly limited, so it is necessary to perform reduction operations on the access layer nodes.

[0089] As an embodiment of this article, performing a capacity expansion operation on the access layer node according to the correlation coefficient and the node allocation rule includes: when the correlation coefficient meets the node capacity expansion allocation rule, selecting a first number of container copies from the access layer node resource pool to add to the current running node.

[0090] In some embodiments of this document, a container is a lightweight operating system virtualization technology. The container uses process access control isolation technology and process group management control technology to isolate their respective user spaces, and multiple sets of containers can run in parallel on the same host device. Among them, one node in the cluster corresponds to at least one set of containers. For example, a distributed container-based service is deployed on 15 machines, that is, there are 15 nodes in the cluster, and all 15 nodes have containers running. In a distributed environment, containers are isolated, and once a container is established, its host configuration remains unchanged. For example, the container operating environment of each machine is fixed, and its host configuration remains unchanged.

[0091] In some embodiments of this invention, containerized applications are lightweight, easy to deploy and transplant, and elastically scalable. The container collects and counts the resources of each host and container, and compares them with the set node allocation rules. If the node expansion rules are met, the capacity is expanded, and if the node reduction rules are met, the capacity is reduced.

[0092] In this step, the cache is expanded, that is, the number of currently running nodes is increased. According to the actual business situation, the first number of container copies in the current running nodes are selected from the node resource pool and added to the current running template to complete the current business in the new current running nodes. Among them, the first number is the number of nodes to be expanded, and the first number can be determined as a percentage of the current running nodes, for example, 30% of the current running nodes, 50% of the current running nodes, etc.

[0093] Taking the Kubernetes cluster as an example, the k8s cluster includes a Master node and multiple ordinary nodes, where the Master node is the main node in the kubernetes cluster. The Master node can run on any node in the cluster and make global decisions for the cluster. When the correlation coefficient meets the node expansion allocation rule, the Master node selects the first number of container copies in the current running node from the node resource pool, adds them to the current running template, and completes the current business in the new current running node. Among them, the node resource pool is a node library in the cluster that is independent of the current running node.

[0094] After completing the capacity expansion operation, the cluster management and scheduling module stores the number of nodes in the current running template in the form of a key-value pair (key and value) to the cluster registration center, where the key is the number of current access layer nodes and the value represents the actual value of the access layer nodes, thus completing a closed loop of dynamic allocation of access layer nodes.

[0095] As an embodiment of this article, performing a capacity reduction operation on the access layer node according to the correlation coefficient and the node allocation rule includes: when the correlation coefficient meets the node capacity reduction allocation rule, selecting a second number of container copies from the currently running node and isolating the container copies.

[0096] In this step, the cache is scaled down, that is, the number of currently running nodes is reduced, and the second number of container copies in the currently running nodes are selected and isolated according to the actual business situation, and the current business is completed with the remaining nodes in the currently running nodes. The second number is the number of nodes to be scaled down, and the second number can be determined as a percentage of the currently running nodes, for example, 30% of the currently running nodes, 50% of the currently running nodes, etc.

[0097] In this step, the Kubernetes cluster can scale down the cluster poles. When the correlation coefficient meets the node scaling allocation rule, the Master node isolates a certain number of nodes in the current running template. The isolated nodes are scaled-down nodes, and the scaled-down nodes no longer work in this business. After this call ends, the Master node kicks the scaled-down nodes out of the current running nodes, pulls the image of the current running template from the image repository, reinstalls and verifies the kicked-out scaled-down nodes in the image of the current template, and after verification, labels the container with a distributed cache access layer node and adds it to the distributed cache access layer node resource pool so that it can be provided to other nodes in the cluster that need to be expanded.

[0098] In this step, the container image repository is used to store container images, Kubernetes clusters, application programming interface (API) paths, and access control parameters for container-based application development. In this step, the container contains the files and components that make up the application, and the containers corresponding to the scaled-down nodes can be isolated from each other to ensure the security of the application during operation. Among them, one container image can create multiple containers. After creating a container image, a template will be formed, which can then be used to create new applications or expand existing applications. Run a new container, submit a container copy to make the container copy a new image, and use the new image to create and run a container.

[0099] When the scaling-in operation is completed, the isolated container replicas are labeled. Labeling container replicas can achieve isolation between applications, indicating that the container replicas can be rejoined to the node resource pool. The cluster management and scheduling module stores the currently allocated number of nodes in the form of key and value to the cluster registration center, where the key is the number of current access layer nodes and the value represents the actual number of access layer nodes, thus completing a closed loop of dynamic allocation of access layer nodes.

[0100] like Figure 3 The figure shows a schematic diagram of the structure of an automatic dynamic allocation device for a distributed cache access layer node in an embodiment of the present invention. In this figure, the basic structure of the automatic dynamic allocation device for a distributed cache access layer node is described, wherein the functional units and modules can be implemented in software, or can be implemented in a general chip or a specific chip, and part or all of the functional units and modules can be on the server, or part of them can also be on the node, and the automatic dynamic allocation of the access layer cache node is realized by cooperating with the server. The device specifically includes:

[0101] The first acquisition unit 301 is used to acquire the average call volume per unit time of the current running node of the access layer; the average call volume per unit time of the current node is the mathematical expectation value of the call volume per unit time of the current node.

[0102] The second acquisition unit 302 is used to acquire the average call response time per unit time of the current running node of the access layer, wherein the average call response time per unit time of the current node is the mathematical expectation value of the call response time corresponding to the call volume per unit time of the current node;

[0103] A determination unit 303 is used to determine a correlation coefficient between the average call volume and the average call response time;

[0104] The operating unit 304 is used to perform an expansion or reduction operation on the currently running node of the access layer according to the correlation coefficient and the node allocation rule.

[0105] Through the settings of the embodiments of this article, the distributed cache access layer node automatic dynamic allocation device can dynamically manage the number of nodes in each cache cluster, which can not only meet the high-speed access of the cache service, but also avoid the waste of cache resources when the business volume is low. At the same time, it can also avoid the large amount of manpower costs of paying attention to the performance capacity of each tenant's call, automatically complete performance capacity detection and adjustment of the number of nodes, reduce the operation and maintenance pressure of front-line operation and maintenance personnel, and further improve business performance and user experience.

[0106] As an embodiment of this article, you can also refer to Figure 4 The figure shows a specific structural diagram of the automatic dynamic allocation device of the distributed cache access layer node in this embodiment.

[0107] The first acquisition unit 301 also includes, before acquiring the average call volume per unit time of the current running node, performing mathematical processing on the call volume per unit time of the current running node to obtain the mathematical expectation value and variance of the call volume. As an embodiment of this article, the first acquisition unit 301 further includes:

[0108] The first calculation module 3011 is used to calculate the average call volume and variance of the current running node per unit time.

[0109] The second acquisition unit 302 also includes, before acquiring the average call response time per unit time of the current running node, performing mathematical processing on the call response time per unit time of the current running node to obtain the mathematical expectation value and variance of the call response time. As an embodiment of this article, the second acquisition unit further includes:

[0110] The second calculation module 3021 is used to calculate the average call response time per unit time of the current running node, the variance, the average call volume per unit time, and the covariance of the average call response time.

[0111] The determining unit 303 is also used to send the average call volume and average call response time per unit time to the statistical analysis module in real time for real-time analysis and calculation. As an embodiment of this article, the determining unit 303 further includes:

[0112] The cache calling module 3031 is used to send the average calling amount per unit time and the average calling response time obtained by the first obtaining unit 301 and the second obtaining unit to the statistical analysis module 3032 in real time for data analysis and calculation.

[0113] The statistical analysis module 3032 is used to perform real-time analysis and calculation of the average call volume and average call response time per unit time of the current running node according to the correlation coefficient formula, and obtain the correlation coefficient of the average call volume and average call response time per unit time of the current running node; the statistical analysis module periodically calculates the correlation coefficient, for example, calculates the call volume and call response time once every 5 seconds. The statistical analysis module 3032 is also used to store the results in the cluster registration center.

[0114] The storage module 3033 is used to store the calculation results of the correlation coefficient of the average call volume and the average call response time per unit time of the current running node in the format of key-value pairs (key+value) to the cluster registration center. The key includes the average call volume and the average call response time and the correlation coefficient; the value represents the actual value of the average call volume, the service call response time and the correlation coefficient.

[0115] As an embodiment of this article, the operating unit 304 further includes:

[0116] The management and scheduling module 3041 is used to periodically monitor the value of the key stored in the cluster registration center, and send a node expansion instruction or a node reduction instruction to the k8s cluster Master node where the cluster access layer node is located according to the determined node allocation rule. The management and scheduling module 3041 is also used to register the currently allocated number of nodes in the form of key and value to the cluster registration center after completing the expansion or reduction of a node.

[0117] The storage module 3042 is used to store the currently allocated number of nodes registered by the management and scheduling module 3041 to the cluster registration center.

[0118] like Figure 5 The flowchart of a method for performing capacity expansion operation on an access layer node according to an embodiment of the present invention is shown.

[0119] Step 501, determining whether the number of times that the correlation coefficient is greater than a first threshold value within a period of time exceeds a capacity expansion threshold value, or determining whether the number of times that the correlation coefficient is continuously greater than the first threshold value exceeds the capacity expansion threshold value.

[0120] In this step, when the correlation coefficient between the average call volume and the average call response time per unit time exceeds a certain value, it indicates that the average call volume per unit time is large, while the average call response time is long, and the system performance cannot meet the current service requests from the client. Therefore, it is necessary to perform capacity expansion operations on the access layer nodes.

[0121] In this step, the access layer node can be expanded according to the situation that the number of times the correlation coefficient is greater than the first threshold value within a period of time exceeds the expansion threshold value, and the expansion operation can also be performed according to the number of times the correlation coefficient is continuously greater than the first threshold value within a period of time. In this step, a period of time is a unit time, such as: 5 seconds, 10 seconds, one minute, ten minutes, one hour, etc. In this step, parameters such as the first threshold value and the expansion threshold value are all part of the node allocation rule. The first threshold value is a threshold value related to the correlation coefficient for determining whether to perform the expansion operation on the access layer node. Among them, the first threshold value can be determined by the system through test data, for example, the first threshold value is determined to be 0.8 based on previous test data and service performance. In this step, the expansion threshold value is a threshold value for determining whether the correlation coefficient exceeds a certain range when performing the expansion operation on the access layer node. Among them, the expansion threshold value can be determined by the system through historical test data, for example, the expansion threshold value is 2 times, 3 times or 5 times, etc.

[0122] In some embodiments of this invention, the first threshold value is used as a coefficient threshold value and the expansion threshold value is used as a number threshold value, and the specific numerical values ​​thereof are related to the length of time for the data statistical analysis module in the cluster to detect and calculate the correlation coefficient and the average call volume in the time period. In this step, the specific numerical values ​​of the first threshold value and the expansion threshold value can be determined according to the length of the unit time.

[0123] According to this setting, when the correlation coefficient is greater than 0.8 for more than 3 times in the past minute, it can be considered that the system performance has reached a high value, and the current node capacity may not be able to meet higher service requests in the future. Therefore, it is necessary to expand the capacity of the access layer nodes to prevent the system from being unable to provide sufficient cache space when the average call volume is large, thereby avoiding service equipment downtime.

[0124] In the past 5 seconds, the data statistics analysis module in the cluster calculated 100 correlation coefficients based on the call volume and call response time within 5 seconds. Among them, 95 correlation coefficients were calculated to be lower than 0.8, and the remaining 5 correlation coefficients were greater than 0.8. According to the node expansion rule, it is determined that the correlation coefficient in the past 5 seconds meets the node allocation rule, and the access layer node will be expanded.

[0125] Considering the randomness of actual business behavior and the instability of the actual network and hardware environment of the business, the occasional intermittent satisfaction of the node matching rule by the correlation coefficient (the number of times the correlation coefficient is continuously greater than the first threshold value within a period of time mentioned in step 501 exceeds the expansion threshold value) may have an impact on the system time operation. Therefore, this step further sets a judgment rule, and the expansion operation can also be performed according to the number of times the correlation coefficient is continuously greater than the first threshold value within a period of time.

[0126] Step 502, select a first number of container copies from the access layer node resource pool to add to the current running node. According to the judgment in step 501 that the correlation coefficient of the average call volume and service response time within a period of time meets the capacity expansion operation, the capacity expansion operation is performed on the access layer node. In this step, the specific value of the first number is determined according to the number of current nodes and the current business status. In some embodiments of this invention, the first number corresponding to the container copy can be based on the number of current running nodes as a reference, and a part of the current running nodes can be selected as the first number of capacity copies. Among them, the first number can be 50% of the current number of running nodes, 30% of the current number of running nodes, etc. For example, if the current number of nodes is 10, and 50% of the current running nodes are selected as the first number, then the first number of capacity copies can be 5. For example, if the current number of nodes is 20, and 30% of the current running nodes are selected as the first number, then the first number of capacity copies can be 3.

[0127] In this step, when the number of currently running nodes is an odd number and the first number is an odd number, the first number can be determined by rounding up. For example, if the number of currently running nodes is 15, 50% of the currently running nodes is selected as the first number, then the first number obtained by rounding up is 8.

[0128] In this step, the node resource pool is a resource library for accommodating backup nodes. The node resource pool is independent of the current running node. According to the above description, 8, 10, etc. container copies can be selected from the node resource pool as new nodes, added to the current running node, and provide business services together with the current running node.

[0129] like Figure 6 The flowchart of a method for performing a capacity reduction operation on an access layer node according to an embodiment of the present invention is shown.

[0130] Step 601: When the correlation coefficient is less than the second threshold value for a number of times exceeding the shrinking threshold value within a period of time, shrinking the access layer node. When the correlation coefficient is less than the second threshold value for a number of times exceeding the shrinking threshold value, shrinking the access layer node.

[0131] In this step, when the correlation coefficient between the average call volume per unit time and the average call response time is lower than a certain value, it indicates that the average call volume per unit time is small, while the service call response is fast. In the face of the current service requests from the client, the current resources are relatively redundant, which may cause resource waste. Therefore, it is necessary to perform a capacity reduction operation on the access layer nodes.

[0132] In this step, the access layer node can be shrunk according to the situation that the number of times the correlation coefficient is less than the second threshold value within a period of time exceeds the reduction threshold value, and the reduction operation can also be performed according to the number of times the correlation coefficient is continuously less than the second threshold value within a period of time. In this step, a period of time is a unit time, such as: one minute, ten minutes, one hour, two hours, etc. In this step, parameters such as the second threshold value and the reduction threshold value are all part of the node allocation rule. The second threshold value is a threshold value related to the correlation coefficient for determining whether to perform a reduction operation on the access layer node. Similar to the first threshold value, the second threshold value can be determined by the system through previous test data, for example, the second threshold value is 0.3. In this step, the reduction threshold value is a number threshold value for determining whether the correlation coefficient exceeds a certain range when performing a reduction operation on the access layer node. Similar to the expansion threshold value, the reduction threshold value can be determined by the system through previous test data, for example, the reduction threshold value is 2 times, 3 times or 5 times, etc. According to this setting, when the correlation coefficient is less than 3 times in the past minute, it can be considered that the system resources are relatively idle. In addition to meeting the average call volume of the current small business volume, the current node capacity has other redundant resources that are idle and suspended. Therefore, it is necessary to perform a capacity reduction operation on the access layer nodes to prevent waste of system resources.

[0133] In some embodiments of this invention, the second threshold value is used as a coefficient threshold value and the shrinking threshold value is used as a number threshold value, and the specific numerical values ​​thereof are related to the length of time for the data statistical analysis module in the cluster to detect and calculate the correlation coefficient and the average call volume in the time period. In this step, the specific numerical values ​​of the second threshold value and the shrinking threshold value can be determined according to the length of the unit time.

[0134] When the shrinking threshold value when the unit time in the past is 10 seconds is different from the shrinking threshold value when the unit time is 1 minute or 10 minutes. The average call volume when the unit time is 10 seconds is also different from the average call volume when the unit time is 1 minute or 1 hour. In this step, the shrinking threshold value can be set to 3 times when the unit time is 10 seconds and 100 times when the unit time is 10 minutes based on previous test data, as well as the unit time and the normal average call volume within the unit time. This application does not limit the numerical value of the shrinking threshold value.

[0135] For example, in the past 10 seconds, the cluster calculated the correlation coefficient 100 times, of which 95 times the correlation coefficient was calculated was lower than 0.3, and the remaining 5 times the correlation coefficient was lower than 0.3. For another example, in the past minute, the cluster calculated the correlation coefficient 500 times, of which 490 times the correlation coefficient was calculated was lower than 0.3, and the remaining 10 times the correlation coefficient was lower than 0.3. According to the node expansion rule, it is determined that the correlation coefficient in the past minute meets the node allocation rule, and the access layer node will be scaled down.

[0136] Step 602: When the correlation coefficient satisfies the node reduction allocation rule, a second number of container replicas are selected from the currently running nodes, and the container replicas are isolated.

[0137] According to the judgment in step 601 that the correlation coefficient of the average call volume and service response time within a period of time meets the capacity expansion operation, the capacity expansion operation is performed on the access layer nodes. In this step, the specific value of the first quantity is determined according to the number of current nodes and the current business status. In some embodiments of this document, the first number corresponding to the container copy can be based on the number of currently running nodes. A part of the current running nodes is selected as the first number of capacity copies. Among them, the first number can be 50% of the current number of running nodes, 30% of the current number of running nodes, and so on. For example, the current number of nodes is 10, and 50% of the current running nodes are selected as the first number, then the first number of capacity copies can be 5. For example, the current number of nodes is 20, and 30% of the current running nodes are selected as the first number, then the first number of capacity copies can be 3.

[0138] In this step, when the number of currently running nodes is an odd number and the first number is an odd number, the first number can be determined by rounding up. For example, if the number of currently running nodes is 15, 50% of the currently running nodes is selected as the first number, then the first number obtained by rounding up is 8.

[0139] In this step, the node resource pool is a resource library for accommodating backup nodes. The node resource pool is independent of the current running node. According to the above description, 8, 10, etc. container copies can be selected from the node resource pool as new nodes, added to the current running node, and provide business services together with the current running node.

[0140] like Figure 7As shown, a computer device provided in an embodiment of the present invention, the computer device 702 may include one or more processors 704, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 702 may also include any memory 706, which is used to store any kind of information such as code, settings, data, etc. Non-restrictive, for example, the memory 706 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 702. In one case, when the processor 704 executes an associated instruction stored in any memory or a combination of memories, the computer device 702 may perform any operation of the associated instruction. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0141] The computer device 702 may also include an input / output module 710 (I / O) for receiving various inputs (via input devices 712) and for providing various outputs (via output devices 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface (GUI) 718. In other embodiments, the input / output module 710 (I / O), the input device 712, and the output device 714 may not be included, and the computer device 702 may be used as a computer device in a network. The computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.

[0142] The communication link 722 may be implemented in any manner, for example, through 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 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.

[0143] Corresponds to Figure 1-Figure 2 , Figure 5-Figure 6 In the embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.

[0144] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figure 1-Figure 2 , Figure 5-Figure 6 The content shown.

[0145] 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.

[0146] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0147] Those of ordinary skill 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 composition and steps of each example have been generally described in terms of function in the above description. 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 to be beyond the scope of this article.

[0148] Those skilled in the art can 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.

[0149] 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 only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, 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 electrical, mechanical or other forms of connection.

[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.

[0151] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

[0152] 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 prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0153] Specific embodiments are used in this article 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 general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.

Claims

1. A method for automatically and dynamically allocating nodes in a distributed cache access layer, characterized in that: Executed by at least one server, including: Get the average call volume per unit time of the currently running node in the access layer; Obtain the average call response time per unit time of the currently running node of the access layer; Determining the correlation coefficient between the average call volume and the average call response time includes: determining the correlation coefficient between the average call volume and the average call response time according to a correlation coefficient formula, wherein the correlation coefficient calculation formula is: Where X represents the average call volume per unit time, and Y represents the average call response time per unit time; Cov(X,Y) represents the covariance of X and Y; Var[X] represents the variance of X; Var[Y] represents the variance of Y; According to the correlation coefficient and the node allocation rule, the capacity expansion or contraction operation is performed on the currently running node of the access layer, including: When the number of times that the correlation coefficient is greater than the first threshold value exceeds the capacity expansion threshold value within a period of time, performing a capacity expansion operation on the currently running node of the access layer; When the number of times that the correlation coefficient is less than the second threshold value within a period of time exceeds the capacity reduction threshold value, a capacity reduction operation is performed on the currently running node of the access layer.

2. The method for automatically and dynamically allocating nodes at the distributed cache access layer according to claim 1, characterized in that: The step of performing an expansion or reduction operation on the currently running node of the access layer according to the correlation coefficient and the node allocation rule further includes: When the correlation coefficient is continuously greater than the first threshold value for a number of times exceeding the capacity expansion threshold value, performing a capacity expansion operation on the currently running node of the access layer; When the number of times that the correlation coefficient is continuously smaller than the second threshold value exceeds the capacity reduction threshold value, a capacity reduction operation is performed on the currently running node of the access layer.

3. The method for automatically and dynamically allocating nodes at the distributed cache access layer as claimed in claim 2, characterized in that: When the correlation coefficient is continuously greater than the first threshold value for a number of times exceeding the expansion threshold value, performing the capacity expansion operation on the currently running node of the access layer further includes: When the correlation coefficient is greater than 0.8 for three consecutive times, the capacity of the currently running node of the access layer is expanded; When the correlation coefficient is continuously less than the second threshold value for a number of times exceeding the capacity reduction threshold value, performing a capacity reduction operation on the currently running node of the access layer further includes: When the correlation coefficient is less than 0.3 for 10 consecutive times, a capacity reduction operation is performed on the currently running node of the access layer.

4. The method for automatically and dynamically allocating nodes at the distributed cache access layer according to claim 1, characterized in that: The performing a capacity expansion operation on the access layer node according to the correlation coefficient and the node allocation rule comprises: When the correlation coefficient satisfies the node expansion allocation rule, a first number of container replicas are selected from the access layer node resource pool to be added to the current running node.

5. The method for automatically and dynamically allocating nodes at the distributed cache access layer according to claim 1, characterized in that: The performing a capacity reduction operation on the currently running node of the access layer according to the correlation coefficient and the node allocation rule comprises: When the correlation coefficient satisfies the node reduction allocation rule, a second number of container replicas are selected from the currently running nodes, and the container replicas are isolated.

6. An automatic dynamic allocation device for distributed cache access layer nodes, characterized in that: include: The first acquisition unit is used to acquire the average call volume per unit time of the currently running node of the access layer; The second acquisition unit is used to acquire the call response time per unit time of the current running node of the access layer; A determination unit, configured to determine a correlation coefficient between the average call volume and the average call response time, comprising: determining the correlation coefficient between the average call volume and the average call response time according to a correlation coefficient formula, wherein the correlation coefficient calculation formula is: Where X represents the average call volume per unit time, and Y represents the average call response time per unit time; Cov(X,Y) represents the covariance of X and Y; Var[X] represents the variance of X; Var[Y] represents the variance of Y; An operation unit, configured to perform an expansion or reduction operation on a currently running node of the access layer according to the correlation coefficient and the node allocation rule, comprising: When the number of times that the correlation coefficient is greater than the first threshold value exceeds the capacity expansion threshold value within a period of time, performing a capacity expansion operation on the currently running node of the access layer; When the number of times that the correlation coefficient is less than the second threshold value within a period of time exceeds the capacity reduction threshold value, a capacity reduction operation is performed on the currently running node of the access layer.

7. A computer 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 computer program, the method for automatically and dynamically allocating nodes at the distributed cache access layer of any one of claims 1 to 5 is implemented.

8. 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 for automatically and dynamically allocating nodes at a distributed cache access layer according to any one of claims 1 to 5 is implemented.