A cluster resource balancing method and device, electronic equipment and storage medium

By grouping user instances based on their relevance and redistributing clusters during high concurrency, the problem of insufficient cloud resources under the limitations of vehicle hardware is solved, achieving load balancing and maximum resource utilization, thus improving the user experience.

CN120045328BActive Publication Date: 2026-06-16ZHEJIANG GEELY HLDG GRP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2025-02-08
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Due to the limited storage capacity and computing resources of the vehicle's infotainment system, a large number of applications cannot be installed simultaneously. When cloud resources are insufficient, the user experience is poor and cannot meet user needs.

Method used

By grouping user instances based on their relevance and assigning an initial cluster to each group, and then regrouping and assigning corresponding clusters under high concurrency conditions, load balancing and maximum resource utilization are ensured.

🎯Benefits of technology

It achieves load balancing under high concurrency, avoids excessive congestion in individual clusters, ensures maximum utilization of resources in each cluster, and improves the user experience of cloud resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045328B_ABST
    Figure CN120045328B_ABST
Patent Text Reader

Abstract

The application provides a cluster resource balancing method and device, electronic equipment and storage medium, and relates to the technical field of cloud computing. The method comprises the following steps: grouping a plurality of user instances according to a correlation degree to determine instance groups, and assigning an initial cluster to each instance group; when the number of instances in any instance group is greater than the maximum concurrency of the initial cluster, grouping the user instances in the instance group again, and assigning a corresponding cluster to each instance group after the grouping. Through the resource balancing scheduling mechanism, the user instances in the instance group before the secondary grouping can be distributed to other clusters in the same machine room as the initial cluster or clusters in different machine rooms from the initial cluster, avoiding high concurrency of instances concentrated in a cluster, ensuring load balancing between different clusters, meeting the user's use demand for cloud resources, and maximizing the use of resource load of each cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud-based vehicle technology, and more specifically, to a cluster resource balancing method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of vehicle networking technology, more and more car companies are beginning to focus on creating in-vehicle infotainment systems, upgrading them from traditional transportation tools to intelligent third spaces. Whether an in-vehicle infotainment system can provide more, richer, and smarter applications has become an important indicator for users to evaluate vehicle performance.

[0003] However, due to the limited storage capacity of in-vehicle infotainment systems, a large number of applications cannot be installed simultaneously. Furthermore, limitations in computing resources make it easy for large games to lag and become choppy on in-vehicle systems. Therefore, migrating services to the cloud has become an inevitable choice. Considering cost control, cloud resources (usually provided by server clusters) cannot be expanded indefinitely, and users will still be affected by insufficient cloud resources, resulting in a poor user experience. Summary of the Invention

[0004] The problem addressed by this invention is how to meet users' needs for cloud resources.

[0005] To address the aforementioned problems, this invention provides a cluster resource balancing method, apparatus, electronic device, and storage medium.

[0006] In a first aspect, the present invention provides a cluster resource balancing method, comprising:

[0007] Multiple user instances are grouped according to relevance to determine instance groups, and an initial cluster is assigned to each instance group.

[0008] When the number of instances in any instance group exceeds the maximum concurrency of the initial cluster, the user instances in the instance group are regrouped, and a corresponding cluster is assigned to each of the regrouped instance groups.

[0009] Optionally, grouping multiple user instances based on relevance to determine instance groups includes:

[0010] The relevance of the user instance is calculated based on the push time corresponding to the user instance, and the relevance between multiple user instances is determined.

[0011] The user instances are grouped according to the maximum concurrency and the relevance to determine the instance grouping.

[0012] Optionally, the step of calculating the relevance of the user instance based on the push time corresponding to the user instance, and determining the relevance among multiple user instances, includes:

[0013] The correlation between multiple user instances is determined based on the co-occurrence frequency of multiple user instances at the same push time within a preset time period.

[0014] Optionally, grouping the user instances based on the maximum concurrency and the relevance includes:

[0015] The maximum number of instances that the initial cluster can handle is determined based on the maximum concurrency.

[0016] The user instances are grouped based on the relevance between them and the maximum number of instances.

[0017] Optionally, grouping the user instances based on the relevance between the user instances and the maximum number of instances includes:

[0018] The user instances are sorted by relevance based on the relevance between them;

[0019] The user instances, after being sorted by relevance, are grouped according to the maximum number of instances.

[0020] Optionally, the step of further grouping user instances within the instance group includes:

[0021] Adjust the relevance threshold to adjust the upper limit of the number of instances in the instance group.

[0022] Optionally, assigning corresponding clusters to each instance group after the regrouping includes:

[0023] The instances obtained after regrouping are assigned to other clusters in the same data center as the initial cluster, or to clusters in different data centers from the initial cluster.

[0024] Secondly, the present invention provides a cluster resource balancing device, comprising:

[0025] The first module is used to group multiple user instances according to relevance to determine instance groups, and to allocate an initial cluster to each instance group.

[0026] The second module is used to regroup the user instances in the instance group when the number of instances in any instance group is greater than the maximum concurrency of the initial cluster, and to assign a corresponding cluster to each instance group after the regrouping.

[0027] Thirdly, the present invention provides an electronic device, including a memory and a processor;

[0028] The memory is used to store computer programs;

[0029] The processor is configured to implement the cluster resource balancing method as described in the first aspect when executing the computer program.

[0030] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the cluster resource balancing method as described in the first aspect.

[0031] The beneficial effects of the cluster resource balancing method of the present invention are as follows: After grouping user instances according to relevance, an initial cluster is assigned to each instance group to ensure that user instances in each group can share similar resources and are scheduled through the resources in the initial cluster. Then, when high concurrency occurs, such as when the number of instances in any instance group exceeds the maximum concurrency of the initial cluster, the cluster resources may become overloaded. At this time, through the resource balancing scheduling mechanism, the user instances in the instance groups are grouped again, and a corresponding cluster is assigned to each instance group after the second grouping. This can disperse the user instances in the instance groups before the second grouping to other clusters in the same data center as the initial cluster, or clusters in different data centers than the initial cluster, to avoid instances being concentrated in a certain cluster with high concurrency, to ensure load balancing between different clusters, to meet the user's demand for cloud resources, and to maximize the utilization of the resource load of each cluster, avoiding excessive congestion of individual clusters and performance degradation. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating the cluster resource balancing method according to an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram of the data center and cluster according to an embodiment of the present invention;

[0034] Figure 3 This is a schematic diagram of the process for grouping user instances according to an embodiment of the present invention. Figure 1 ;

[0035] Figure 4 This is a schematic diagram of the process for grouping user instances according to an embodiment of the present invention. Figure 2 ;

[0036] Figure 5 This is a schematic diagram of the process for grouping user instances according to an embodiment of the present invention. Figure 3 ;

[0037] Figure 6This is a system architecture diagram of the cluster resource balancing device according to an embodiment of the present invention;

[0038] Figure 7 This is a system architecture diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0039] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0040] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0041] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0042] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0043] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0044] like Figure 1 As shown in the figure, an embodiment of the present invention provides a cluster resource balancing method, including:

[0045] S100: Group multiple user instances according to relevance to determine instance groups, and assign an initial cluster to each instance group.

[0046] Specifically, multiple user instances are grouped according to their relevance to each other. For example, the higher the frequency of co-occurrence of push streaming within the same time period, the higher the relevance. This ensures that instances within the same instance group have certain similarities in resource requirements. For example, user instances within each group can share similar resources and be scheduled using resources in the initial cluster to meet the resource requirements of user instances.

[0047] S200: When the number of instances in any instance group is greater than the maximum concurrency of the initial cluster, the user instances in the instance group are regrouped, and a corresponding cluster is assigned to each of the regrouped instance groups.

[0048] Specifically, under high concurrency, cluster resources may become overloaded, especially when a large number of instances are concentrated in a single cluster. This can easily lead to the cluster's resources being saturated, causing performance bottlenecks. Therefore, when the number of instances in any instance group exceeds the maximum concurrency of the initial cluster (resource load is close to full), the user instances in the instance group are regrouped, and each of the regrouped instance groups is assigned a corresponding cluster. For example, the user instances in the initial group before the second grouping can be distributed to other clusters in the same data center as the initial cluster, or clusters in different data centers. In other words, through the resource balancing scheduling mechanism, instances are avoided from being concentrated in a single cluster with high concurrency. The amount of resources occupied by user instances in each group within the cluster load is relatively controllable, ensuring load balancing between different clusters, meeting users' needs for cloud resources, and maximizing the utilization of resources in each cluster, avoiding excessive congestion in individual clusters that could lead to performance degradation.

[0049] Combination Figure 2 As shown, taking the initial cluster as Shenzhen 01-1 cluster as an example, other clusters can be in the same data center, i.e., Shenzhen 01-3 cluster in Zone (01 data center), or in different data centers, i.e., cluster x or cluster y in Zone (xx data center).

[0050] The maximum concurrency setting is based on the capabilities of the resource system, typically including hardware resources (such as network bandwidth, CPU performance, and storage capacity) and software resources (such as load balancing and scheduling strategies). Network bandwidth is a crucial factor affecting the maximum concurrency. Each user instance typically consumes a certain amount of bandwidth (depending on the instance's network activity, such as data transfer and API requests). Therefore, if network bandwidth is limited, the number of concurrent requests the cluster can handle will be restricted. The processing power of each user instance depends on CPU resources. High-concurrency requests require sufficient CPU processing power to ensure response speed and system stability. Each instance consumes a certain amount of storage resources during runtime, including disk space. Storage resource bottlenecks may limit the number of instances that can run concurrently in the cluster, especially in high-data-read / write scenarios, such as database operations and big data analysis, where storage performance and capacity limitations are more significant.

[0051] In this embodiment, after grouping user instances according to relevance, an initial cluster is assigned to each instance group to ensure that user instances within each group can share similar resources and are scheduled using the resources in the initial cluster. Then, when high concurrency occurs, such as when the number of instances in any instance group exceeds the maximum concurrency of the initial cluster, the cluster resources may become overloaded. At this time, through the resource balancing scheduling mechanism, the user instances in the instance groups are grouped again, and a corresponding cluster is assigned to each of the regrouped instance groups. User instances that exceed the carrying capacity of the initial cluster can be allocated to other clusters in the same data center as the initial cluster, or to clusters in different data centers. This avoids instances being concentrated in a single cluster with high concurrency, ensures load balancing between different clusters, meets users' needs for cloud resources, maximizes the utilization of resources in each cluster, and avoids excessive congestion in individual clusters, which could lead to performance degradation.

[0052] Optionally, grouping multiple user instances based on relevance to determine instance groups includes:

[0053] S110: Calculate the relevance of the user instance based on the push time corresponding to the user instance, and determine the relevance between multiple user instances.

[0054] Specifically, in combination Figure 3 As shown, relevance refers to the similarity between different user instances. Similarity is usually based on historical behavior patterns, such as the push time and resource usage patterns of the user instance.

[0055] S120: Group the user instances according to the maximum concurrency and the relevance to determine the instance grouping.

[0056] Specifically, in combination Figure 3As shown, during grouping, user instances can be divided into several groups according to certain rules based on the relevance ranking results. The goal is to ensure that user instances within the same group have similar resource requirements, thereby enabling effective sharing of cluster resources. Taking instances 1 to 5 as an example, the relevance between instance 1 and instance 2 is 0.95, the relevance between instance 1 and instance 3 is 0.90, the relevance between instance 1 and instance 4 is 0.80, and the relevance between instance 1 and instance 5 is 0.75. The order after relevance ranking can be: [Instance 1, Instance 2], [Instance 1, Instance 3], [Instance 1, Instance 4], [Instance 1, Instance 5]. The maximum concurrency can support three instances, so instances 1, 2, and 3 can be divided into the first group (high relevance, similar resource requirements), instance 4 into the second group, and instance 5 into the third group. If the relevance between instances 4 and 5 meets the condition, instances 4 and 5 can also be divided into the same group.

[0057] In this optional embodiment, the relevance of the user instance is calculated based on the push time corresponding to the user instance. User instances with similar resource needs can be found and reasonably allocated to different clusters through a grouping strategy, thereby achieving load balancing and efficient resource utilization.

[0058] Optionally, the step of calculating the relevance of the user instance based on the push time corresponding to the user instance, and determining the relevance among multiple user instances, includes:

[0059] The correlation between multiple user instances is determined based on the co-occurrence frequency of multiple user instances at the same push time within a preset time period.

[0060] Specifically, for example, if instance 1, instance 2, and instance 3 co-occur at time t1, instance 1, instance 3, and instance 5 co-occur at time t2, and instance 1, instance 2, and instance 5 co-occur at time t3, then the co-occurrence frequency of instance 1 and instance 2 is 2 times, the co-occurrence frequency of instance 1 and instance 3 is 2 times, the co-occurrence frequency of instance 1 and instance 5 is 2 times, the co-occurrence frequency of instance 2 and instance 5 is 1 time, and the co-occurrence frequency of instance 3 and instance 5 is 1 time. Thus, the correlation between multiple user instances can be calculated by combining the streaming time and the co-occurrence frequency.

[0061] In this optional embodiment, the correlation between multiple user instances is determined based on the co-occurrence frequency of multiple user instances at the same push time, which can accurately find user instances with similar resource needs.

[0062] Optionally, grouping the user instances based on the maximum concurrency and the relevance includes:

[0063] S121: Determine the maximum number of instances that the initial cluster can handle based on the maximum concurrency.

[0064] Specifically, in combination Figure 4 As shown, the maximum concurrency represents the maximum number of instances that the initial cluster can handle, so the upper limit of the number of instances in a group can be determined based on the maximum concurrency.

[0065] S122: Group the user instances according to the relevance between the user instances and the maximum number of instances.

[0066] Specifically, in combination Figure 4 As shown, the correlation between Instance 1 and Instance 2 is 0.95, which meets the condition for a valid grouping interval, so they are placed in the same group. The correlation between Instance 1 and Instance 3 is 0.90, which also meets the condition for a valid grouping interval, so Instance 3 is also placed in the current group. The current group contains three instances (Instance 1, Instance 2, and Instance 3). The correlation between Instance 1 and Instance 4 is 0.80, and the correlation between Instance 1 and Instance 5 is 0.75. Since the correlation threshold is 0.85, Instance 4 and Instance 5 are placed in different groups.

[0067] In this optional embodiment, after determining the maximum number of instances that the initial cluster can handle based on the maximum concurrency, the user instances are grouped according to the correlation between user instances and the maximum number of instances to ensure that user instances are efficiently and evenly distributed in the cluster.

[0068] Optionally, grouping the user instances based on the relevance between the user instances and the maximum number of instances includes:

[0069] S1221: Sort the user instances according to their relevance.

[0070] Specifically, in combination Figure 5 As shown, the relevance ranking is usually based on the time of streaming. User instances with higher relevance are usually more similar in resource requirements, while lower relevance indicates that the resource requirements of the two user instances are quite different.

[0071] S1222: Group the user instances after relevance sorting according to the maximum number of instances.

[0072] Specifically, in combination Figure 5 As shown, for example, the order after relevance sorting can be: [Instance 1, Instance 2], [Instance 1, Instance 3], [Instance 1, Instance 4], [Instance 1, Instance 5]. The maximum number of instances is 3, so instances 1, 2, and 3 can be divided into the first group, instance 4 into the second group, and instance 5 into the third group.

[0073] In this optional embodiment, user instances with similar resource needs can be found by sorting by relevance, thus enabling rapid grouping.

[0074] Optionally, the step of further grouping user instances within the instance group includes:

[0075] Adjust the relevance threshold to adjust the upper limit of the number of instances in the instance group.

[0076] Specifically, the upper limit of the number of instances in an instance group is adjusted by adjusting the relevance threshold, ensuring that user instances are efficiently and evenly distributed in the cluster.

[0077] In this optional embodiment, by adjusting the relevance threshold to adjust the upper limit of the number of instances in the instance group, the load requirements of different clusters can be flexibly met, while maintaining efficient resource utilization and ensuring stability and scalability under high concurrency.

[0078] Optionally, assigning corresponding clusters to each instance group after the regrouping includes:

[0079] The instances obtained after regrouping are assigned to other clusters in the same data center as the initial cluster, or to clusters in different data centers from the initial cluster.

[0080] Specifically, in combination Figure 2 As shown, taking the initial cluster as Shenzhen 01-1 cluster as an example, other clusters can be in the same data center, i.e., Shenzhen 01-3 cluster in Zone (01 data center), or in different data centers, i.e., x cluster or y cluster in Zone (xx data center). Therefore, instance groups can be assigned to Shenzhen 01-3 cluster, x cluster or y cluster.

[0081] In related technologies, due to the physical limitations of the original data center, it is impossible to meet the data synchronization requirements between different data centers (data information cannot be shared or used). This embodiment can support the simultaneous operation of multiple data centers, ensuring that different data centers can share cloud resources and perform effective data synchronization. User instances can be used normally in different clusters / data centers.

[0082] In this optional embodiment, resources are provided to user instances through other clusters in the same data center or clusters in different data centers. This can flexibly meet the load requirements of different clusters while maintaining efficient resource utilization and ensuring stability and scalability under high concurrency.

[0083] like Figure 6 As shown, an embodiment of the present invention provides a cluster resource balancing device 600, comprising:

[0084] The first module 610 is used to group multiple user instances according to relevance to determine instance groups, and to allocate an initial cluster to each instance group.

[0085] The second module 620 is used to regroup the user instances in the instance group when the number of instances in any instance group is greater than the maximum concurrency of the initial cluster, and to assign a corresponding cluster to each instance group after the regrouping.

[0086] like Figure 7 As shown, an electronic device 700 provided in this embodiment of the invention includes a memory 720 and a processor 710; the memory 720 is used to store a computer program; the processor 710 is used to implement the cluster resource balancing method as described above when the computer program is executed.

[0087] Alternatively, an electronic device 700 includes a memory 720 and a processor 710 coupled to the memory 720; the memory 720 is configured to store a computer program; and the processor 710 is configured to perform the following operations when the computer program is executed:

[0088] Multiple user instances are grouped according to relevance to determine instance groups, and an initial cluster is assigned to each instance group.

[0089] When the number of instances in any instance group exceeds the maximum concurrency of the initial cluster, the user instances in the instance group are regrouped, and a corresponding cluster is assigned to each of the regrouped instance groups.

[0090] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the cluster resource balancing method described above.

[0091] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations:

[0092] Multiple user instances are grouped according to relevance to determine instance groups, and an initial cluster is assigned to each instance group.

[0093] When the number of instances in any instance group exceeds the maximum concurrency of the initial cluster, the user instances in the instance group are regrouped, and a corresponding cluster is assigned to each of the regrouped instance groups.

[0094] The present invention will now be described an electronic device 700 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 700 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 700 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0095] Electronic device 700 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0096] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.

[0097] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.

Claims

1. A cluster resource balancing method, characterized in that, include: Multiple user instances are grouped according to relevance to determine instance groups, and an initial cluster is assigned to each instance group. When the number of instances in any instance group exceeds the maximum concurrency of the initial cluster, the user instances in the instance group are regrouped, and a corresponding cluster is assigned to each of the regrouped instance groups. The step of grouping multiple user instances based on relevance to determine instance groups includes: The relevance of the user instance is calculated based on the push time corresponding to the user instance, and the relevance between multiple user instances is determined. The user instances are grouped according to the maximum concurrency and the relevance to determine the instance groups; The step of calculating the relevance of the user instance based on the push time corresponding to the user instance, and determining the relevance among multiple user instances, includes: The correlation between multiple user instances is determined based on the co-occurrence frequency of multiple user instances at the same push time within a preset time period; The step of grouping the user instances based on the maximum concurrency and the relevance includes: The maximum number of instances that the initial cluster can handle is determined based on the maximum concurrency. The user instances are grouped according to the relevance between the user instances and the maximum number of instances; The step of further grouping user instances within the instance group includes: Adjust the relevance threshold to adjust the upper limit of the number of instances in the instance group.

2. The cluster resource balancing method according to claim 1, characterized in that, The step of grouping the user instances based on the relevance between the user instances and the maximum number of instances includes: The user instances are sorted by relevance based on the relevance between them; The user instances, after being sorted by relevance, are grouped according to the maximum number of instances.

3. The cluster resource balancing method according to claim 1, characterized in that, The step of assigning corresponding clusters to each instance group after the regrouping includes: The instances obtained after regrouping are assigned to other clusters in the same data center as the initial cluster, or to clusters in different data centers from the initial cluster.

4. A cluster resource balancing device, characterized in that, include: The first module is used to group multiple user instances according to relevance to determine instance groups, and to allocate an initial cluster to each instance group. The second module is used to regroup the user instances in the instance group when the number of instances in any instance group is greater than the maximum concurrency of the initial cluster, and to assign a corresponding cluster to each instance group after the regrouping. The step of grouping multiple user instances based on relevance to determine instance groups includes: The relevance of the user instance is calculated based on the push time corresponding to the user instance, and the relevance between multiple user instances is determined. The user instances are grouped according to the maximum concurrency and the relevance to determine the instance groups; The step of calculating the relevance of the user instance based on the push time corresponding to the user instance, and determining the relevance among multiple user instances, includes: The correlation between multiple user instances is determined based on the co-occurrence frequency of multiple user instances at the same push time within a preset time period; The step of grouping the user instances based on the maximum concurrency and the relevance includes: The maximum number of instances that the initial cluster can handle is determined based on the maximum concurrency. The user instances are grouped according to the relevance between the user instances and the maximum number of instances; The step of further grouping user instances within the instance group includes: Adjust the relevance threshold to adjust the upper limit of the number of instances in the instance group.

5. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the cluster resource balancing method as described in any one of claims 1 to 3 when executing the computer program.

6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the cluster resource balancing method as described in any one of claims 1 to 3.