Resource allocation method and device for energy storage cluster, electronic equipment, storage medium and program product

By using a pre-trained terminal clustering and resource allocation model, a terminal partitioning and resource allocation scheme for the energy storage cluster is dynamically generated, which solves the problem of reduced resource allocation efficiency in distributed energy storage clusters and improves resource utilization and business latency management.

CN120996480APending Publication Date: 2025-11-21HUIZHOU POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511128608.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, the fixed clustering strategy of distributed energy storage clusters cannot adapt to the real-time changes in the request characteristics of terminal devices, resulting in a reduction in the effectiveness of computing resource allocation.

Method used

By employing a pre-trained terminal clustering model and resource allocation model, and by acquiring terminal information and edge node location information of the energy storage cluster, terminal partitioning information and resource allocation schemes are dynamically generated, and resource allocation is optimized using a two-layer model.

Benefits of technology

It improves the effectiveness of computing resource allocation, avoids the degradation caused by fixed resource allocation strategies, and enhances resource utilization and business latency management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996480A_ABST
    Figure CN120996480A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource allocation method and device for an energy storage cluster, electronic equipment, a storage medium and a program product. The method comprises the steps that terminal information of the energy storage cluster is acquired; inputting the terminal information of the energy storage cluster into a pre-trained terminal clustering model, and outputting terminal division information of the energy storage cluster; acquiring position information and resource information of edge nodes; the terminal division information of the energy storage cluster and the position information and the resource information of the edge nodes are input into the pre-trained resource allocation model, and the resource allocation scheme of the energy storage cluster is output, so that compared with the prior art, the problem that the computing resource allocation effect is reduced due to a fixed resource allocation strategy is avoided, and the computing resource allocation effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy storage distribution technology, and in particular to a resource allocation method, apparatus, electronic device, storage medium and program product for an energy storage cluster. Background Technology

[0002] With the increasing demand for flexible regulation in new power systems, distributed energy storage clusters, as a carrier to support the stable operation of the power grid, are seeing an exponential increase in their terminal equipment.

[0003] In the field of intelligent terminal management and resource allocation of distributed energy storage clusters, existing technical solutions generally adopt a centralized architecture or a static clustering strategy based on fixed rules. The unified scheduling center processes the access requests of all terminal devices sequentially and allocates computing resources according to preset priorities or physical topology proximity.

[0004] However, in existing technologies, fixed clustering strategies cannot adapt to real-time changes in the characteristics of terminal device requests, resulting in reduced efficiency in the allocation of computing resources. Summary of the Invention

[0005] This application provides a resource allocation method, apparatus, electronic device, storage medium, and program product for an energy storage cluster, in order to solve the problem of reduced computing resource allocation efficiency.

[0006] In a first aspect, embodiments of this application provide a resource allocation method for an energy storage cluster, comprising:

[0007] Obtain terminal information of the energy storage cluster;

[0008] The terminal information of the energy storage cluster is input into the pre-trained terminal clustering model, and the terminal partitioning information of the energy storage cluster is output.

[0009] Obtain the location and resource information of edge nodes;

[0010] The terminal partitioning information of the energy storage cluster, along with the location and resource information of the edge nodes, are input into a pre-trained resource allocation model to output a resource allocation scheme for the energy storage cluster.

[0011] In one possible implementation, the terminal information of the energy storage cluster is input into a pre-trained terminal clustering model, and the terminal partitioning information of the energy storage cluster is output. This includes: obtaining the terminal location information and service request information of the energy storage cluster from the terminal information; parsing the terminal location information and service request information of the energy storage cluster to obtain the terminal request features and terminal distribution features of the energy storage cluster; inputting the terminal request features and terminal distribution features of the energy storage cluster into the pre-trained terminal clustering model, and outputting the terminal partitioning information of the energy storage cluster according to a clustering algorithm.

[0012] In one possible implementation, before inputting the terminal partitioning information of the energy storage cluster and the location and resource information of the edge nodes into a pre-trained resource allocation model and outputting the resource allocation scheme of the energy storage cluster, the method further includes: obtaining a training set of terminal partitioning information for the energy storage cluster; generating a resource allocation scheme corresponding to the training set of terminal partitioning information based on the location and resource information of the edge nodes and the training set of terminal partitioning information for the energy storage cluster; and determining the resource allocation model based on the objective function of the upper-level resource allocation model if the objective function of the resource allocation scheme corresponding to the training set of terminal partitioning information conforms to the objective function of the upper-level resource allocation model.

[0013] In one possible implementation, the objective function of the resource allocation upper-level model is:

[0014]

[0015] In the formula, This indicates the resource utilization rate of the edge nodes; Indicates the number of edge nodes; Represents edge nodes Configured computing resources; Represents edge nodes Configured communication resources; Indicates terminal cluster The amount of computing resources allocated; Indicates terminal cluster The amount of communication resources allocated.

[0016] In one possible implementation, after determining the resource allocation model based on the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set if the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set conforms to the objective function of the upper-level resource allocation model, the method further includes: calculating the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set; if the objective function of the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set does not exceed the objective function limit of the lower-level resource allocation model, then optimizing the terminal partitioning information of the energy storage cluster obtained by the pre-trained resource allocation model based on the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set.

[0017] In one possible implementation, the objective function of the resource allocation lower-level model is:

[0018]

[0019] In the formula, Indicates the average delay; Indicates the number of terminal clusters; Represents a set of business items The number of business transactions; Indicates terminal cluster The requested set of services; This represents the average latency for each service. Indicates business The maximum allowable delay.

[0020] Secondly, embodiments of this application provide a resource allocation device for an energy storage cluster, comprising:

[0021] The first acquisition module is used to acquire terminal information of the energy storage cluster;

[0022] The first output module is used to input the terminal information of the energy storage cluster into the pre-trained terminal clustering model and output the terminal partitioning information of the energy storage cluster.

[0023] The second acquisition module is used to acquire the location information and resource information of the edge nodes;

[0024] The second output module is used to input the terminal partitioning information of the energy storage cluster, the location information and resource information of the edge nodes into a pre-trained resource allocation model, and output the resource allocation scheme of the energy storage cluster.

[0025] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0026] The memory stores computer-executed instructions;

[0027] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0028] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0029] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0030] The resource allocation method, apparatus, electronic device, storage medium, and program product for energy storage clusters provided in this application obtain terminal information of the energy storage cluster, dynamically generate terminal partitioning information of the energy storage cluster through a pre-trained terminal clustering model, and generate a corresponding resource allocation scheme based on the location information and resource information of edge nodes, using the pre-trained resource allocation model and the terminal partitioning information of the energy storage cluster. Compared with the prior art, this avoids the problem of reduced computing resource allocation effect caused by fixed resource allocation strategy and improves the computing resource allocation effect. Attached Figure Description

[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0032] Figure 1 This is a schematic diagram of the system structure of a computer device provided in an embodiment of this application;

[0033] Figure 2 A flowchart illustrating the resource allocation method for the energy storage cluster provided in this application;

[0034] Figure 3 This is a schematic diagram of the structure of the resource allocation model provided in the embodiments of this application;

[0035] Figure 4 A schematic diagram of the resource allocation device for the energy storage cluster provided in this application;

[0036] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.

[0037] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0038] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0039] With the increasing demand for flexible regulation in new power systems, distributed energy storage clusters, as a carrier supporting the stable operation of the power grid, are experiencing an exponential increase in terminal devices. In the field of intelligent terminal management and resource allocation for distributed energy storage clusters, existing technologies generally adopt a centralized architecture or a static clustering strategy based on fixed rules. This involves a unified dispatch center processing access requests from all terminal devices sequentially and allocating computing resources according to preset priorities or physical topological proximity. However, in existing technologies, the fixed clustering strategy cannot adapt to the real-time changes in the characteristics of terminal device requests, leading to a reduction in the effectiveness of computing resource allocation.

[0040] To address the aforementioned technical problems, this application proposes the following technical concept: The inventors considered designing a terminal clustering model. By acquiring the terminal information of the energy storage cluster, the terminal partitioning information of the energy storage cluster is generated using the terminal clustering model. A resource allocation model is also designed. By acquiring the location information and resource information of the edge nodes, the location information, resource information, and terminal partitioning information of the energy storage cluster are input into the resource allocation model to generate a resource allocation scheme for the energy storage cluster. Detailed embodiments are described below.

[0041] Figure 1 This is a schematic diagram of the system architecture of the computer device provided in an embodiment of this application. Figure 1 As shown, the computer device includes: a receiving device 101, a processing device 102, and a display device 103.

[0042] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the resource allocation method of energy storage clusters. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of both.

[0043] In the specific implementation process, the receiving device 101 can be an input / output interface or a communication interface, which can obtain the terminal information of the energy storage cluster.

[0044] The processing unit 102 can generate a resource allocation scheme for the energy storage cluster.

[0045] The display device 103 can be used to display the resource allocation scheme of the above-mentioned energy storage cluster.

[0046] The display device can also be a touch screen, used to receive user commands while displaying the above content, so as to realize the operation interaction with the user.

[0047] It should be understood that the above-mentioned processing device can be implemented by a processor reading instructions from memory and executing those instructions, or it can be implemented by a chip circuit.

[0048] Furthermore, the network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0049] Figure 2 A flowchart illustrating the resource allocation method for the energy storage cluster provided in this application is shown below. Figure 2 As shown, the method includes:

[0050] S201: Obtain terminal information of the energy storage cluster.

[0051] In this embodiment, the terminal information of the energy storage cluster includes, but is not limited to, service request information, terminal location information, and terminal type.

[0052] S202: Input the terminal information of the energy storage cluster into the pre-trained terminal clustering model, and output the terminal partitioning information of the energy storage cluster.

[0053] Specifically, the terminal location information and service request information of the energy storage cluster are obtained from the terminal information, the terminal request characteristics and terminal distribution characteristics are parsed and generated, and the energy storage cluster is clustered by a clustering algorithm through a terminal clustering model to generate terminal partitioning information of the energy storage cluster.

[0054] S203: Obtain the location and resource information of the edge nodes.

[0055] Specifically, based on the location information and resource information of the edge nodes and the terminal cluster partitioning scheme of the energy storage cluster, a resource allocation scheme for the edge nodes of the energy storage cluster is generated through a resource allocation model.

[0056] S204: Input the terminal partitioning information of the energy storage cluster, along with the location and resource information of the edge nodes, into the pre-trained resource allocation model, and output the resource allocation scheme of the energy storage cluster.

[0057] In this embodiment, the resource allocation model is a two-layer model, including an upper-layer model and a lower-layer model.

[0058] The upper-level model of the resource allocation model takes terminal clusters and edge nodes as inputs. Under the constraints of uniqueness of terminal cluster p and node q, the total amount of resources allocated to each terminal cluster does not exceed the total resources of the edge nodes, and the distance constraint between the terminal cluster and the edge nodes, the scheme for each cluster to access the edge nodes is obtained. The resource allocation scheme is determined with the goal of maximizing the comprehensive resource amount of different edge nodes.

[0059] The lower-level model of the resource allocation model takes the attributes of the terminal request service and the location of the terminal as input parameters. By calculating the access characteristics of the terminal, it divides the terminal into clusters, and calculates the average latency of the service set within the terminal cluster based on the amount of resources allocated to the terminal cluster by the edge nodes and the resource capacity constraints.

[0060] Figure 3 This is a schematic diagram of the resource allocation model provided in an embodiment of this application.

[0061] like Figure 3 As shown, the lower-level model, which aims to solve for the terminal cluster partitioning scheme, and the upper-level model, which obtains resource allocation by accessing edge nodes at the cluster level, constitute a two-layer collaborative optimization process. The upper-level model solves for the optimal terminal cluster access and resource allocation scheme based on the terminal cluster partitioning scheme of the lower-level model, while the lower-level model determines the optimal terminal cluster partitioning scheme based on the resource allocation scheme of the upper-level model. In other words, the lower-level results provide the decision-making basis for the upper-level model, while the upper-level conditions, in turn, guide the lower-level structural adjustments. The two are closely linked through a closed-loop feedback mechanism.

[0062] In the lower-level model, terminal clustering is fundamental to the management of distributed energy storage cluster terminals. Due to the spatiotemporal uncertainty of power services, access requests from terminal devices exhibit dynamic changes in both time and space. Based on this characteristic and the distribution of terminals, terminal devices with similar service characteristics and access modes are divided into several initial clusters using a clustering algorithm, forming relatively independent cluster units to simplify network management complexity. The entire lower-level model aims to minimize the average service latency of all clusters. While ensuring that each service is completed within the maximum allowable latency and that resource allocation within a cluster does not exceed the upper limit, the terminal clustering scheme is further optimized.

[0063] In the upper-layer model, edge nodes, based on the terminal cluster partitioning scheme provided by the lower-layer model, comprehensively consider the service requirements of different terminal clusters and the resource capacity of the edge nodes to determine the share of each terminal cluster in resource allocation. By rationally matching the needs of each terminal cluster, edge nodes can more fully leverage their resource advantages and improve overall resource utilization. The goal of the entire upper-layer model is to maximize resource utilization efficiency while meeting the service needs of each terminal cluster, ultimately obtaining a resource allocation scheme for different clusters.

[0064] As can be seen from the above embodiments, by obtaining the terminal information of the energy storage cluster, the terminal partitioning information of the energy storage cluster is dynamically generated through the pre-trained terminal clustering model. Based on the location information and resource information of the edge nodes, the pre-trained resource allocation model is used in conjunction with the terminal partitioning information of the energy storage cluster to generate a corresponding resource allocation scheme. Compared with the existing technology, this avoids the problem of reduced computing resource allocation effect caused by fixed resource allocation strategy and improves the computing resource allocation effect.

[0065] In one embodiment of this application, step S202 includes:

[0066] S2021: Obtain the terminal location information and service request information of the energy storage cluster from the terminal information.

[0067] In this embodiment, the service request information includes, but is not limited to, service type, service data volume, and service latency.

[0068] In this embodiment, the terminal location information includes, but is not limited to, terminal distribution density, terminal service coordination, and distance between terminals.

[0069] S2022: Analyze the terminal location information and service request information of the energy storage cluster to obtain the terminal request characteristics and terminal distribution characteristics of the energy storage cluster.

[0070] In this embodiment, the terminal request feature is denoted as .

[0071] Specifically, terminal k will request For various power services, the request characteristics of the terminal are related to the data volume and latency of the power service, and the impact of data volume is defined. Delay impact .

[0072] In this embodiment, the data volume impact reflects the intensity of service usage in actual operation, and the latency impact reflects the frequency of service occurrence in actual operation.

[0073] In this embodiment, different services have different request frequencies, which reflect the intensity and frequency of use of the services in actual operation.

[0074] In this embodiment, the impact of data volume The calculation method is as follows:

[0075]

[0076] In the formula, Indicates the bandwidth reference value; This represents the amount of data generated by terminal k in a single transaction for the i-th type of power service. This represents the request frequency of terminal k for the i-th type of power service.

[0077] In this embodiment, the impact of latency The calculation method is as follows:

[0078]

[0079] In the formula, This represents the average execution delay of terminal k for the i-th type of power service; The standard deviation of system-wide latency; This represents the total request frequency of terminal k in the power service; This represents the standard delay of terminal k in the i-th type of power service.

[0080] In this embodiment, the factors affecting latency impact include the proportion of the frequency of various service requests in the total requests and the latency dispersion of service requests. The latency fluctuations caused by services with a high request frequency proportion will have a greater impact on terminal access. The latency dispersion reflects the fluctuation of the service response time. The greater the fluctuation, the more obvious the instability of the terminal.

[0081] Specifically, the entropy weight method is used to calculate the terminal request features. :

[0082]

[0083] In the formula, Weights that indicate the degree of influence of data volume; The weights represent the degree of impact of latency.

[0084] Among them, using Information entropy represents the degree of influence of data volume; used Information entropy represents the degree of impact of time delay.

[0085] In this embodiment, the terminal distribution characteristics are denoted as... .

[0086] In this embodiment, the terminal distribution characteristics are related to the distribution density of terminal devices in different regions and the degree of synergy of terminal services.

[0087] In this embodiment, the distribution density is the spatial clustering intensity of terminal devices in a specific area, reflecting the concentration or coefficient of the number of terminals per unit area. The higher the terminal density, the denser the construction between terminals, and the more communication resources are needed to support it.

[0088] In this embodiment, the distribution density of the terminals The calculation is as follows:

[0089]

[0090] In the formula, This represents the bandwidth coefficient in a distributed scenario; in a wide-area scenario, it takes a value of 2. Indicates the spatial location of terminal k; represents the spatial location of terminal a; K represents the Gaussian kernel function.

[0091] In this embodiment, the terminal service coordination degree is denoted as... .

[0092] In this embodiment, when the data source for the power service requested by a terminal comes from power services involving data collaboration among multiple terminals, different terminals form a tightly integrated functional cluster during operation. The terminal service collaboration degree is used to describe the impact of the logical relationships between terminals on the terminal distribution characteristics. When the terminal service collaboration degree is high, it indicates that the relationships between terminals are more complex, requiring more data support for the collaborative execution of power services.

[0093] In this embodiment, terminal service coordination The calculation is as follows:

[0094]

[0095] In the formula, This indicates the number of services requested by terminal k that require coordination; This represents the data contribution of terminal k to the power service i that it needs to coordinate; This represents the data contribution of terminal a to the power service i, which works in conjunction with terminal k. This represents the distance attenuation coefficient.

[0096] Specifically, the entropy weight method is used to calculate the terminal distribution characteristics. :

[0097]

[0098] In the formula, This represents the weight of the terminal distribution density on the terminal distribution characteristics; This indicates the weight of terminal service synergy on terminal distribution characteristics.

[0099] S2023: Input the terminal request characteristics and terminal distribution characteristics of the energy storage cluster into the pre-trained terminal clustering model, and output the terminal partitioning information of the energy storage cluster according to the clustering algorithm.

[0100] In this embodiment, the terminals of the energy storage cluster are in clusters, and different clusters contain different numbers of terminal units.

[0101] In this embodiment, the importance of different types of terminals is defined as follows: This is to quantify the priority of terminals in resource usage.

[0102] In this embodiment, the types of terminals include, but are not limited to, security protection, monitoring and data collection, control and management, and user interaction.

[0103] The sum of the total importance of different types of terminals must not exceed a preset threshold. , is represented as:

[0104]

[0105] In the formula, CL represents the terminal cluster to which terminal k belongs; This indicates the total importance of the terminal cluster CL.

[0106] In this embodiment, a high overall importance of terminals within a cluster indicates that the cluster has a high demand for resources.

[0107] Specifically, regarding terminal request characteristics and terminal distribution characteristics Standardization is performed to eliminate the units of measurement between different features, resulting in standardized terminal request features. and standardized terminal distribution characteristics .

[0108] In this embodiment, the similarity between different terminals k and a is defined as the sum of the feature distances between the terminal request features and the terminal distribution features. .

[0109] In this embodiment, the location distance between terminals is expressed as... .

[0110] Specifically, based on the location distance between terminals The division of terminal clusters is based on the overall distance between terminals. That is, feature distance and location distance The weighted sum.

[0111] In this embodiment, the terminal clustering model is represented as follows:

[0112]

[0113] In the formula, This represents the weight of the terminal request features between terminal k and terminal a. The weights represent the terminal distribution characteristics between terminal k and terminal a. This represents the sum of the combined distances of all terminal clusters; ACL represents the set of terminal clusters. This represents the sum of the overall distances between all pairs of terminals in the terminal cluster CL; Indicates the feature distance weight; Indicates the location distance weight; This represents the standardized terminal request characteristics of terminal k. This represents the standardized terminal request characteristics of terminal a. This represents the terminal distribution characteristics of the standardized terminal k; This represents the terminal distribution characteristics of the standardized terminal a.

[0114] In this embodiment, .

[0115] Specifically, with the objective of minimizing the sum of the comprehensive distances among all terminal clusters, the k-means distance method is used to obtain the distances for different terminal units. There are 10 terminal clusters, among which the initial cluster centers are selected from those ranked by importance. The terminals are used as the starting points of clusters. By calculating the comprehensive distance between different terminals and these initial cluster centers, each terminal is assigned to the nearest cluster to minimize the comprehensive distance within the cluster, ensuring that terminals within each cluster are physically close while being as logically similar as possible. In each round of partitioning, each terminal cluster, based on the current cluster composition, obtains the terminal with the smallest sum of comprehensive distances to other terminals in the cluster, updates the center of each terminal cluster, and updates the relationships between terminals. This process continues iterating until the cluster centers stabilize.

[0116] As can be seen from the above embodiments, by obtaining the terminal location information and service request information of the energy storage cluster, parsing the terminal location information and service request information to obtain terminal request characteristics and terminal distribution characteristics, and dividing the terminals of the energy storage cluster by the clustering algorithm of the terminal clustering model, the terminal division information is generated, which improves the accuracy of terminal division and facilitates the allocation of resources to the energy storage cluster.

[0117] In one embodiment of this application, before step S204, the method further includes:

[0118] S301: Obtain the training set of terminal partitioning information for the energy storage cluster.

[0119] In this embodiment, the terminal partitioning information training set of the energy storage cluster records, but is not limited to, the location of edge nodes and the amount of resources of edge nodes.

[0120] S302: Generate a resource allocation scheme corresponding to the terminal partitioning information training set based on the location and resource information of the edge nodes and the terminal partitioning information training set of the energy storage cluster.

[0121] Specifically, the location and resource information of edge nodes are obtained through the upper-level resource allocation model. The access scheme of the terminal cluster to the edge node is solved according to the terminal cluster partitioning scheme. The resource allocation scheme of the edge node to the terminal cluster is solved according to the terminal cluster access scheme. With the goal of maximizing the resource utilization of multiple edge nodes, the model is iteratively trained to generate the target resource allocation upper-level model.

[0122] In this embodiment, the upper-level resource allocation model aims to maximize the resource utilization of multiple edge nodes.

[0123] In this embodiment, the set of edge nodes is represented as:

[0124]

[0125] In the formula, This represents the number of edge nodes.

[0126] S303: If the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set conforms to the objective function of the upper-level resource allocation model, then the resource allocation model is determined according to the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set.

[0127] In this embodiment, the objective function of the resource allocation upper-level model is:

[0128]

[0129] In the formula, This indicates the resource utilization rate of the edge nodes; Indicates the number of edge nodes; Represents edge nodes Configured computing resources; Represents edge nodes Configured communication resources; Indicates terminal cluster The amount of computing resources allocated; Indicates terminal cluster The amount of communication resources allocated.

[0130] In this embodiment, the resource allocation of edge nodes to terminal clusters must meet the latency constraints of services. That is, resources should not be over-supplied to avoid resource waste, but should also be prevented from being insufficient to avoid latency exceeding the standard. From the perspective of the weighted average completion time of services, robust constraints on the upper and lower limits of resource allocation are established.

[0131] For example, taking the terminal cluster p connected to the edge node q as an example, the robustness constraint of resource provision is expressed as follows:

[0132]

[0133] In the formula, This represents the service-weighted average completion time of terminal cluster p; This represents the average completion time of service i in terminal cluster p; This represents the maximum allowed latency of service i in terminal cluster p; This represents the amount of data for service i within terminal cluster p; A coefficient representing the fluctuation range of algorithm resource allocation; A coefficient representing the fluctuation range of communication resource allocation; This represents the computing power required for all services in terminal p to complete within the maximum allowable latency. This indicates that all services in terminal p are completed within the maximum allowed latency communication resource requirements.

[0134] In this embodiment, the upper-layer model ensures that after the terminal clusters are connected to the edge nodes, the resources allocated by the edge nodes not only fully meet the overall data transmission needs of each terminal cluster, but also ensure that the transmission distance is within a reasonable range.

[0135] Specifically, introducing variables This represents the connection relationship between the terminal cluster p and the edge node q.

[0136] This indicates that edge node q allocates resources to terminal cluster p.

[0137] This indicates that there is no connection between the edge node q and the terminal p.

[0138] Specifically, each terminal cluster can only access one edge node, and the uniqueness constraint between terminal cluster p and node q is expressed as:

[0139]

[0140] In this embodiment, the constraint that the total resources allocated to each terminal cluster do not exceed the total resources of the edge nodes is expressed as follows:

[0141]

[0142] In the formula, Indicates terminal cluster The amount of computing resources allocated; Indicates terminal cluster The amount of communication resources allocated; Represents edge nodes Total computing power resources; Represents edge nodes Total communication resources.

[0143] In this embodiment, the distance constraint between the terminal cluster and the edge node is expressed as:

[0144]

[0145] In the formula, Indicates the position of terminal cluster p; Indicates the position of the edge node q; This represents the maximum tolerable distance between terminal cluster p and edge node q.

[0146] In this embodiment, in the upper-layer model, terminal clusters and edge nodes are taken as inputs. Under the constraints of uniqueness of terminal cluster p and node q, the total amount of resources allocated to each terminal cluster does not exceed the total resources of the edge nodes, and the distance constraint between the terminal cluster and the edge nodes, the scheme for each cluster to access the edge nodes is obtained. The resource allocation scheme is determined with the goal of maximizing the comprehensive resource amount of different edge nodes.

[0147] As can be seen from the above embodiments, by obtaining the terminal partitioning information training set of the energy storage cluster, generating a resource allocation scheme corresponding to the terminal partitioning information training set based on the location information and resource information of the edge nodes, determining whether the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set conforms to the objective function of the upper-level resource allocation model, and determining the resource allocation model based on the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set, the utilization rate of edge node resources by the resource allocation model is improved.

[0148] In one embodiment of this application, after step S303, the method further includes:

[0149] S304: Intra-cluster service latency of the resource allocation scheme corresponding to the training set of computing terminal partitioning information.

[0150] In this embodiment, the lower-level resource allocation model modifies the terminal cluster partitioning scheme based on the resource allocation scheme output by the upper-level resource allocation model, thereby improving the average latency of the service set requested by the terminal cluster. Shortest.

[0151] S305: If the objective function of the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set does not exceed the objective function limit of the lower-level resource allocation model, then the terminal partitioning information of the energy storage cluster obtained by optimizing the intra-cluster service latency of the pre-trained resource allocation model according to the resource allocation scheme corresponding to the terminal partitioning information training set is used.

[0152] In this embodiment, the objective function of the resource allocation lower-level model is:

[0153]

[0154] In the formula, Indicates the average delay; Indicates the number of terminal clusters; Represents a set of business items The number of business transactions; Indicates terminal cluster The requested set of services; This represents the average latency for each service. Indicates business The maximum allowable delay.

[0155] In this embodiment, the average latency of each service The calculation method is as follows:

[0156]

[0157] In the formula, Indicates the processing latency of computing power; It represents the communication transmission latency, which is the total time required for data to be transmitted from the terminal to the edge node; Indicates the amount of data processed in a business request; This represents the computational complexity of the computing resources required per unit of data. This indicates the amount of computing resources available for the business. This indicates the amount of communication resources required for the service.

[0158] In this embodiment, the lower-level model needs to ensure the real-time performance of power services and the availability of resources. Therefore, the constraints of the lower-level model are: the total resource requirements of all services within the terminal cluster are within the resource range that the edge nodes can provide, and the total resource amount of all services under the entire terminal cluster is less than the resource amount allocated to the cluster.

[0159] In this embodiment, the constraints of the lower-level model are represented as follows:

[0160]

[0161] In the formula, This represents the maximum allowed latency of service i in terminal cluster p; This represents the amount of computing resources allocated to terminal cluster p; This represents the amount of communication resources allocated to terminal cluster p.

[0162] In this embodiment, the lower-level model uses the attributes of the terminal's requested service and the terminal's location as input parameters. By calculating the terminal's access characteristics, terminal clusters are divided. Based on the amount of resources allocated to each terminal cluster by the edge nodes and combined with resource capacity constraints, the average latency of the service set within each terminal cluster is calculated.

[0163] As can be seen from the above embodiments, by calculating the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set, the corresponding objective function is compared with the objective function of the lower-level resource allocation model. If the objective function limit is not exceeded, the terminal partitioning information obtained by the resource allocation model is optimized according to the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set, thereby reducing the service latency within the terminal partitioning information cluster.

[0164] Figure 4 A schematic diagram of the resource allocation device for the energy storage cluster provided in this application is shown below. Figure 4 As shown, the resource allocation device 40 for the energy storage cluster provided in this embodiment includes: a first acquisition module 401, a first output module 402, a second acquisition module 403, and a second output module 404.

[0165] The first acquisition module 401 is used to acquire terminal information of the energy storage cluster.

[0166] The first output module 402 is used to input the terminal information of the energy storage cluster into the pre-trained terminal clustering model and output the terminal partitioning information of the energy storage cluster.

[0167] The second acquisition module 403 is used to acquire the location information and resource information of the edge nodes.

[0168] The second output module 404 is used to input the terminal partitioning information of the energy storage cluster, the location information and resource information of the edge nodes into the pre-trained resource allocation model, and output the resource allocation scheme of the energy storage cluster.

[0169] In one embodiment of this application, the first output module 402 includes:

[0170] The acquisition unit is used to acquire the terminal location information and service request information of the energy storage cluster from the terminal information.

[0171] The parsing unit is used to parse the terminal location information and service request information of the energy storage cluster to obtain the terminal request characteristics and terminal distribution characteristics of the energy storage cluster.

[0172] The output unit is used to input the terminal request characteristics and terminal distribution characteristics of the energy storage cluster into the pre-trained terminal clustering model, and output the terminal partitioning information of the energy storage cluster according to the clustering algorithm.

[0173] In one embodiment of this application, the resource allocation device 40 of the energy storage cluster further includes:

[0174] The third acquisition module is used to acquire the training set of terminal partitioning information for the energy storage cluster.

[0175] The generation module is used to generate a resource allocation scheme corresponding to the terminal partitioning information training set based on the location and resource information of the edge nodes and the terminal partitioning information training set of the energy storage cluster.

[0176] The determination module is used to determine the resource allocation model based on the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set if the objective function of the scheme conforms to the objective function of the upper-level resource allocation model.

[0177] In one embodiment of this application, the resource allocation device 40 of the energy storage cluster further includes:

[0178] The computing module is used to calculate the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set.

[0179] The optimization module is used to optimize the terminal partitioning information of the energy storage cluster obtained by the pre-trained resource allocation model based on the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set, if the objective function of the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set does not exceed the objective function limit of the lower-level resource allocation model.

[0180] The resource allocation device for the energy storage cluster provided in this embodiment can execute the resource allocation method for the energy storage cluster provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0181] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus.

[0182] In the specific implementation process, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to execute the above-mentioned resource allocation method for the energy storage cluster.

[0183] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0184] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0185] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0186] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0187] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described resource allocation method for energy storage clusters.

[0188] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the resource allocation method for the energy storage cluster described above.

[0189] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0190] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0191] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0192] 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 this embodiment according to actual needs.

[0193] In addition, 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.

[0194] If a function is implemented as 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 invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0195] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0196] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A resource allocation method for an energy storage cluster, characterized in that, include: Obtain terminal information of the energy storage cluster; The terminal information of the energy storage cluster is input into the pre-trained terminal clustering model, and the terminal partitioning information of the energy storage cluster is output. Obtain the location and resource information of edge nodes; The terminal partitioning information of the energy storage cluster, along with the location and resource information of the edge nodes, are input into a pre-trained resource allocation model to output a resource allocation scheme for the energy storage cluster.

2. The method according to claim 1, characterized in that, The step of inputting the terminal information of the energy storage cluster into a pre-trained terminal clustering model and outputting the terminal partitioning information of the energy storage cluster includes: Obtain the terminal location information and service request information of the energy storage cluster from the terminal information; The terminal location information and service request information of the energy storage cluster are analyzed to obtain the terminal request characteristics and terminal distribution characteristics of the energy storage cluster. The terminal request characteristics and terminal distribution characteristics of the energy storage cluster are input into a pre-trained terminal clustering model, and the terminal partitioning information of the energy storage cluster is output according to the clustering algorithm.

3. The method according to claim 1, characterized in that, Before inputting the terminal partitioning information of the energy storage cluster, along with the location and resource information of the edge nodes, into the pre-trained resource allocation model and outputting the resource allocation scheme of the energy storage cluster, the method further includes: Obtain the training set of terminal partitioning information for the energy storage cluster; Based on the location and resource information of the edge nodes and the terminal partitioning information training set of the energy storage cluster, a resource allocation scheme corresponding to the terminal partitioning information training set is generated. If the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set conforms to the objective function of the upper-level resource allocation model, then the resource allocation model is determined based on the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set.

4. The method according to claim 3, characterized in that, The objective function of the upper-level model for resource allocation is: In the formula, This indicates the resource utilization rate of the edge nodes; Indicates the number of edge nodes; Represents edge nodes Configured computing resources; Represents edge nodes Configured communication resources; Indicates terminal cluster The amount of computing resources allocated; Indicates terminal cluster The amount of communication resources allocated.

5. The method according to claim 3, characterized in that, If the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set conforms to the objective function of the upper-level resource allocation model, then after determining the resource allocation model based on the objective function of the resource allocation scheme corresponding to the terminal partitioning information training set, the method further includes: Intra-cluster service latency of the resource allocation scheme corresponding to the training set of computing terminal partitioning information; If the objective function of the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set does not exceed the objective function limit of the lower-level resource allocation model, then the terminal partitioning information of the energy storage cluster obtained by optimizing the pre-trained resource allocation model based on the intra-cluster service latency of the resource allocation scheme corresponding to the terminal partitioning information training set is used.

6. The method according to claim 5, characterized in that, The objective function of the lower-level resource allocation model is: In the formula, Indicates the average delay; Indicates the number of terminal clusters; Represents a set of business items The number of business transactions; Indicates terminal cluster The requested set of services; This represents the average latency for each service. Indicates business The maximum allowable delay.

7. A resource allocation device for an energy storage cluster, characterized in that, include: The first acquisition module is used to acquire terminal information of the energy storage cluster; The first output module is used to input the terminal information of the energy storage cluster into the pre-trained terminal clustering model and output the terminal partitioning information of the energy storage cluster. The second acquisition module is used to acquire the location information and resource information of the edge nodes; The second output module is used to input the terminal partitioning information of the energy storage cluster, the location information and resource information of the edge nodes into a pre-trained resource allocation model, and output the resource allocation scheme of the energy storage cluster.

8. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the resource allocation method for the energy storage cluster as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the resource allocation method for the energy storage cluster as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the resource allocation method for the energy storage cluster as described in any one of claims 1 to 6.