Resource configuration method and device of edge computing terminal, equipment and medium

By acquiring and analyzing daily operational data samples in edge computing terminals, and utilizing clustering algorithms and resource demand optimization, the redundancy and waste of resource allocation in low-voltage distribution network control systems are solved, enabling effective control of microgrids and efficient utilization of resources.

CN114691368BActive Publication Date: 2026-03-27GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

When faced with the increasing concurrency of control and trading applications in microgrids, existing low-voltage distribution network control systems suffer from redundancy and waste in resource allocation, and the uncertainty of the computing load time distribution of edge computing terminals leads to insufficient precision in resource allocation.

Method used

By acquiring daily operational data sample sets, clustering algorithms are used to divide them into multiple groups of sample data. The CPU and RAM resource requirements corresponding to each group of sample data are calculated, and the sample data with the highest demand is obtained for resource allocation. Resource allocation is optimized to cope with uncertainties.

Benefits of technology

It enables edge computing terminals to provide sufficient computing power for applications at all times, effectively cope with uncertainties in the operating environment, avoid resource waste, and improve the accuracy and efficiency of resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691368B_ABST
    Figure CN114691368B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a resource configuration method and device of an edge computing terminal, electronic equipment and a storage medium. The resource configuration method of the edge computing terminal comprises: obtaining a daily operation data sample set; dividing the daily operation data sample set into g family sample data according to a clustering algorithm; calculating the central processing unit (CPU) resource requirement and the random access memory (RAM) resource requirement corresponding to each family sample data respectively; obtaining first sample data and second sample data, and performing resource configuration according to the first sample data and the second sample data, wherein the first sample data is sample data corresponding to the maximum CPU resource requirement in the g family sample data, and the second sample data is sample data corresponding to the maximum RAM resource requirement in the g family sample data. The present application can determine the CPU and RAM resource configuration for each application, so that the terminal can provide sufficient computing power for the application at each time period, effectively cope with the uncertainty in the running environment, and realize effective control of the micro-grid.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to power control technology, and particularly relate to a resource configuration method and device of an edge computing terminal, an apparatus, and a medium. BACKGROUND

[0002] Nowadays, people pay more and more attention to energy saving, and more renewable energy will be connected to the low-voltage distribution network in the form of distributed power supply, which will promote part of the low-voltage distribution network to change into a micro-grid. The original low-voltage distribution network control system cannot cope with the increasing pressure of concurrent applications such as control and transaction. At present, micro-service technology and container technology have been applied in the fields of cloud computing, edge computing, and power system automation. Micro-service technology can split each application into micro-services to avoid repeated development and deployment of the same function element, and has the characteristics of flexible deployment, high elasticity, and easy expansion. Container technology provides support for the implementation of micro-services. The micro-grid operating environment is complex, and the application amount of each part of the control system has time and space uncertainty and imbalance.

[0003] In order to ensure the reliable operation of the control system, the existing control system adopts a redundant configuration strategy for each part, or even blindly configures, and then makes up for the investment when the configured resource amount cannot meet the requirements, resulting in resource loss and waste. Moreover, in the micro-grid control system constructed by edge computing, the uncertainty of each application causes the time distribution of the computing load of the edge computing terminal to be uncertain. SUMMARY

[0004] Embodiments of the present application provide a resource configuration method and device of an edge computing terminal, an apparatus, and a medium. The resource configuration method and device of the edge computing terminal are configured according to the resource configuration of a central processing unit (CPU) and a random access memory (RAM), and sufficient computing power is provided for a micro-grid edge computing terminal in each period.

[0005] In a first aspect, embodiments of the present application provide a resource configuration method of an edge computing terminal, comprising:

[0006] obtaining a daily operation data sample set;

[0007] dividing the daily operation data sample set into g family sample data according to a clustering algorithm, wherein g is an integer greater than or equal to 2;

[0008] respectively calculating the central processing unit (CPU) resource demand and the random access memory (RAM) resource demand corresponding to each family sample data;

[0009] The first sample data and the second sample data are acquired, and resource configuration is performed according to the first sample data and the second sample data, wherein the first sample data is sample data corresponding to a maximum CPU resource requirement in the g-group sample data, and the second sample data is sample data corresponding to a maximum RAM resource requirement in the g-group sample data.

[0010] In a second aspect, an embodiment of the present application provides a resource configuration device of an edge computing terminal, and the device comprises:

[0011] A first acquisition module is configured to acquire a daily operation data sample set.

[0012] A data classification module is configured to divide the daily operation data sample set into g-group sample data according to a clustering algorithm, wherein g is an integer greater than or equal to 2.

[0013] A resource requirement calculation module is configured to calculate CPU resource requirements and RAM resource requirements corresponding to each group of sample data, respectively.

[0014] A second acquisition module is configured to acquire first sample data and second sample data, and perform resource configuration according to the first sample data and the second sample data, wherein the first sample data is sample data corresponding to a maximum CPU resource requirement in the g-group sample data, and the second sample data is sample data corresponding to a maximum RAM resource requirement in the g-group sample data.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the resource configuration method of the edge computing terminal according to any of the embodiments of the present application when executing the program.

[0016] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the resource configuration method of the edge computing terminal according to any of the embodiments of the present application.

[0017] In the embodiment of the present application, a daily operation data sample set is obtained; the daily operation data sample set is divided into g family sample data according to a clustering algorithm, wherein g is an integer greater than or equal to 2; the CPU resource demand and the RAM resource demand corresponding to each family sample data are calculated respectively; first sample data and second sample data are obtained, and resource configuration is performed according to the first sample data and the second sample data, wherein the first sample data is sample data corresponding to the maximum CPU resource demand in the g family sample data, and the second sample data is sample data corresponding to the maximum RAM resource demand in the g family sample data. That is, in the embodiment of the present application, the resource configuration of CPU and RAM for each application can be determined by using the resource demand of CPU and RAM of each application, so that the terminal can provide sufficient computing power for the application in each period, effectively cope with the uncertainty in the edge computing terminal running environment, and realize effective control of the microgrid. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0019] Figure 1 A flowchart of the resource configuration method of the edge computing terminal provided by the embodiment of the present application;

[0020] Figure 2 A resource configuration flowchart of CPU and RAM provided by the embodiment of the present application;

[0021] Figure 3 Another flowchart of the resource configuration method of the edge computing terminal provided by the embodiment of the present application;

[0022] Figure 4 A structure diagram of the resource configuration terminal of the edge computing terminal provided by the embodiment of the present application;

[0023] Figure 5 A structure diagram of the resource configuration device of the edge computing terminal provided by the embodiment of the present application;

[0024] Figure 6 A structure diagram of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0025] The application will be described in further detail below with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not to be used to limit the scope of the application. In addition, it should also be pointed out that, for the sake of description, only the parts related to the application are shown in the drawings and not all the structures.

[0026] Figure 1 A flowchart of a resource configuration method of an edge computing terminal provided by an embodiment of the application is shown in FIG. 1. The method of the embodiment of the application can be used to select a device according to the resource configuration of CPU and RAM, and provide sufficient computing power for the micro-grid edge computing terminal at each time period. The method can be executed by a resource configuration device of an edge computing terminal provided by the embodiment of the application, and the device can be realized in the form of software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. Referring to FIG. 1, the method can specifically include the following steps: Figure 1

[0027] Step 101, obtaining a daily operation data sample set.

[0028] The sample data is the data generated by each application deployed on the micro-grid edge computing terminal when triggered on the operation day. The micro-grid is a small-scale power generation and distribution system composed of distributed power sources, energy storage devices, energy conversion devices, loads, monitoring and protection devices, etc. The micro-grid can realize flexible and efficient application of distributed power sources and solve the grid connection problem of a large number of distributed power sources with various forms. The edge computing is an open platform that integrates network, computing, storage and application core capabilities on the side close to the object or data source, and provides the nearest service on the spot to meet the basic needs of real-time application, application intelligence, security and privacy protection, etc. The daily operation data sample set is a collection of data samples generated by each application deployed on the micro-grid edge computing terminal when triggered on the operation day. In the embodiment of the application, one operation day is divided into 96 time periods. It is assumed that there are n applications (A1, A2,...A n ) T , where A i represents the i-th application, and k represents the time period. f i represents the triggering frequency of the application A i in the 96 time periods of the operation day, i.e., f i =(f i,1 ,f i,2 ,...,f i,k ,...,f i,96 ). Further, f=(f1,f2,...,f n ) T ​The day operation data is represented. The day operation data f of each application is collected to obtain a day operation data sample set F of each application. The data sample set F is composed of f and has the same structure as f.

[0029] Step 102, according to the clustering algorithm, the day operation data sample set is divided into g family sample data, wherein g is an integer greater than or equal to 2.

[0030] Wherein, the trigger frequency of each application in the running day will be affected by seasonal change, small probability event, etc., resulting in the data generated by the triggering of each application showing a certain volatility. For example, a load prediction microservice is deployed on a microgrid terminal. Generally, the resident electricity consumption in summer is more than in winter, so the data generated by the load prediction microservice in different seasons may be different. Therefore, it is necessary to perform clustering analysis on the day operation sample data of each application, and divide the day operation sample data of each application into g families. The clustering analysis is an analysis process of grouping physical or abstract objects, and dividing data into multiple classes composed of similar objects. In the embodiment of the present scheme, the clustering analysis can be used to preprocess the day operation sample data of each application, so as to avoid the influence of seasonal change, small probability event, etc. on the day operation sample data of each application. In an embodiment, the value of g can be set according to actual needs or the computing capacity of the resource configuration device, such as g = 10, 50 or 100. Specifically, a clustering algorithm such as k-means can be used to divide the day operation data sample set into g family sample data. The k-means algorithm can judge the proximity relationship between different samples by calculating the distance between them, and similar samples will be placed in the same category. Through the clustering analysis algorithm, the day operation data of each application can be preprocessed once to reduce the influence of small probability burst time, etc. on the day operation data of each application. Specifically, the day operation data sample set F of each application is divided into g families. The i-th family is Wherein, F j (i) Represents the j-th day operation data in the i-th family.

[0031] Step 103, respectively calculating the CPU resource demand and RAM resource demand corresponding to each family sample data.

[0032] Specifically, after obtaining the g-family sample data, the daily operation data sample of a certain family is obtained. Assuming that the daily operation data sample of the i-th family is taken, further, the average value of the daily operation data sample of the family is calculated. The average value of the daily operation data sample of the family is used to estimate the overall expectation value of the family. Among them, the expectation value is the probability of each possible result in the test multiplied by the sum of its results, which can reflect the average value of the random variable. Further, the expectation of the trigger frequency of each application at each period on a typical day corresponding to the i-th daily operation data sample is obtained from the overall expectation value. Among them, by determining the typical day in the power system, the line loss of each node in the system, the peak and valley period of each day, and the distribution of the load in the system can be calculated. Under the condition that the microgrid structure is determined, the resources occupied by each application in the edge computing terminal are known. Assuming that there are n applications deployed on the edge computing terminal, the resources occupied by each application in the edge computing terminal can be represented by a 2×n matrix. By multiplying the 2×n matrix by the trigger frequency expectation of each period in the above, the expected calculation load matrix of each application can be obtained. Among them, the expected calculation conforms to the CPU resource demand amount corresponding to each family sample data in the first row of the matrix, and the RAM resource demand amount corresponding to each family sample data in the second row.

[0033] Step 104, obtaining first sample data and second sample data, and performing resource configuration according to the first sample data and the second sample data, wherein the first sample data is sample data corresponding to the maximum CPU resource demand amount in the g-family sample data, and the second sample data is sample data corresponding to the maximum RAM resource demand amount in the g-family sample data.

[0034] Specifically, after obtaining the calculation load matrix of each application, the time period in which the maximum value in the first row and the second row of the matrix appears is obtained. Assuming that the time period in which the maximum value in the first row of the matrix appears is k1, and the time period in which the maximum value in the second row of the matrix appears is k2. Then it is indicated that each application has the maximum demand for CPU resources in the k1 period and the maximum demand for RAM resources in the k2 period. Further, the resource demand status of each application for CPU and RAM in the k1 period and the k2 period is analyzed to obtain the CPU and RAM resource demand curve of each application when the applications are concurrent in the k1 period and the k2 period. Further, all subsets of the concurrent application set of each application in the k1 period and the k2 period are obtained. Assuming that all subsets of the concurrent application set in the k1 period are n θ1 , and all subsets of the concurrent application set in the k2 period are n θ2 . Further, n θ1 and n θ2 are analyzed for the resource demand status of CPU and RAM to obtain the resource demand curve component of CPU in the k1 period of n θ1 , and the resource demand curve component of RAM in the k2 period of n θ2 . After obtaining nθ1 and n θ2 After optimizing the resource demand curve components for CPU and RAM in time periods k1 and k2 respectively, constraints are added to these two curve components for further optimization. The constraints can be that, in actual operation, the maximum resource demand for CPU and RAM for each application does not exceed n. θ1 and n θ2 The probability of requiring CPU and RAM resources is 99.99%. Assume that for n... θ1 and n θ2 After optimization, the result is and but and These are the resource configurations for the CPU, R. CPU and RAM resource configuration R RAM Furthermore, the sample data for each family is traversed. Figure 2 This is a flowchart illustrating the resource configuration of CPU and RAM provided in an embodiment of the present invention. Figure 2 As shown, m represents the sample data of the m-th family. When m is greater than or equal to g, it means that the sample data of each family has been traversed. Specifically, the CPU resource allocation and RAM resource allocation for the sample data of each family are obtained. Further, the R corresponding to each family is taken. CPU and R RAM The maximum value in the range. Wherein, R corresponds to each family. CPU The sample data with the maximum value in the range is the first sample data, and the corresponding R for each family is... RAM The sample data with the maximum value in the first sample data is the second sample data. Further, resource allocation is performed based on the first and second sample data.

[0035] The technical solution of this embodiment involves acquiring a daily operational data sample set; dividing the daily operational data sample set into g groups of sample data according to a clustering algorithm, where g is an integer greater than or equal to 2; calculating the CPU resource requirements and RAM resource requirements corresponding to each group of sample data; acquiring first sample data and second sample data; and configuring resources based on the first and second sample data, wherein the first sample data is the sample data corresponding to the maximum CPU resource requirement in the g group of sample data, and the second sample data is the sample data corresponding to the maximum RAM resource requirement in the g group of sample data. Through the technical solution of this embodiment, the CPU and RAM resource configuration for each application can be determined by utilizing the CPU and RAM resource requirements of each application. This ensures that the terminal can provide sufficient computing power for applications at all times, effectively cope with uncertainties in the operating environment, and achieve effective control of the microgrid.

[0036] Figure 3Another flowchart of the resource configuration method of the edge computing terminal is provided for the embodiment of the application, and the embodiment is refined on the basis of the above-mentioned embodiment. The specific method can be as shown in the figure, and the method can include the following steps: Figure 3

[0037] Step 201: Obtain a daily operation data sample set.

[0038] Step 202: According to a clustering algorithm, divide the daily operation data sample set into g family sample data.

[0039] Step 203: Obtain the application trigger frequency matrix expectation P (i) of the i-th family sample data, the expected calculation load matrix L (i) of the i-th family sample data, the application set n θ1 , the CPU demand curve component in the time period k1 , and the application set n θ2 , the RAM demand curve component in the time period k2 , wherein 1≤i≤g.

[0040] The expected value is the sum of the probability of each possible result in the test multiplied by its result, which can reflect the average value of the random variable. The calculation load matrix can represent the CPU resource demand and the RAM resource demand corresponding to each family sample data.

[0041] In the embodiment of the scheme, the application trigger frequency matrix expectation P of the i-th family sample data is optional. j (i) is the j-th daily operation data in the i-th family, and l i is the number of samples contained in the i-th family sample data.

[0042] Specifically, after obtaining the i-th family daily operation data sample F (i) , the mean value of F (i) is obtained. Further, E represents the overall expectation of the daily operation data sample, that is:

[0043]

[0044] After obtaining the overall expectation E(F (i) ) of the daily operation data sample, the application trigger frequency matrix expectation P (i) of the i-th family sample data is calculated from E(F (i) ). P (i) is a matrix composed of n×96 dimensions, that is:

[0045] P (i) =E(F (i) )​

[0046] Use l i Let P represent the number of samples contained in the i-th family of sample data. (i) for:

[0047]

[0048] Given a fixed microgrid structure, the resources occupied by each application in the edge computing terminal are known. Resource occupancy is represented by a 2×n matrix C. Furthermore, based on matrix C, the expected load matrix L for the i-th family of sample data is defined. (i) ,Right now:

[0049] L (i) =CP (i)

[0050] Among them, the expected calculation of the load matrix L (i) This can represent the CPU and RAM resource requirements corresponding to each family of sample data. Specifically, the first row of the matrix is ​​expected to represent the CPU resource requirements for each family of sample data, and the second row is expected to represent the RAM resource requirements for each family of sample data.

[0051] In this embodiment of the solution, optionally, the application set n θ1 Components of the CPU demand curve for time period k1:

[0052]

[0053] Application set n θ2 The RAM demand curve components for time period k2:

[0054]

[0055] Where i = 1, 2, ..., n represents n applications deployed on the edge computing terminal, and j = 1, 2, ..., m i This represents the i-th application containing m. i A microservice, c i,j,CPU c i,j,RAM These represent the CPU and RAM resources used by the j-th microservice of the i-th application, respectively, and ε(t) is the step function, t i,j,start Let d be the start execution time of the j-th microservice of the i-th application. i,j β i,j These represent the data volume and computational complexity coefficient of the j-th microservice in the i-th application, respectively.

[0056] Specifically, after obtaining the desired calculation load matrix L (i) Then, matrix L (i)The time period when the maximum value in the first row appears is recorded as k1, and the time period when the maximum value in the second row appears is recorded as k2. Wherein, L (i) The CPU and RAM computing resource demand curves of each application can be obtained. Specifically, the CPU and RAM computing resource demand curves of each application during the k1 and k2 time periods are obtained. Wherein, the CPU resource demand curve component of each application during the k1 time period is:

[0057]

[0058] The RAM resource demand curve component of each application during the k2 time period is:

[0059]

[0060] Wherein, i=1, 2,..., n represents that n applications are deployed on the edge computing terminal, j=1, 2,..., m i represents that the ithapplication contains m i microservices, c i,j,CPU , c i,j,RAM respectively represent the CPU and RAM resources occupied by the jthmicroservice of the ithapplication, ε(t) is a step function, t i,j,start is the starting execution time of the jthmicroservice of the ithapplication, d i,j , β i,j are respectively the data size and the computing complexity coefficient of the jthmicroservice of the ithapplication. Wherein, the step function is a special continuous time function, and signal processing, integral transformation and the like can be performed by using the step function. Further, it is assumed that all subsets of the concurrent application set during the time period k1 are n θ1 , and all subsets of the concurrent application set during the time period k2 are n θ2 . Then, the CPU demand curve component of the application set n θ1 during the time period k1 is:

[0061]

[0062] The RAM demand curve component of the application set n θ2 during the time period k2 is:

[0063]

[0064] Directly using and to configure resources for CPU and RAM causes some extremely small probability events to excessively increase the resource configuration amount, resulting in resource waste. In the embodiment of the application, the above method is used to calculate and , and then the resources of CPU and RAM are configured, which avoids resource waste.

[0065] Step 204, according to P (i) , (i) , and Calculate the first reference application set and the second reference application set Wherein the first reference application set corresponds to the CPU resource requirement R CPU,i , the second reference application set corresponds to the RAM resource requirement R RAM,i .

[0066] Specifically, after obtaining the CPU demand curve component of the application set n θ1 at the time period k1 and the RAM demand curve component of the application set n θ2 at the time period k2, the two demand curve components are optimized by adding constraint conditions to obtain the first reference application set and the second reference application set

[0067] In the embodiment of the scheme, optionally, the first reference application set satisfies:

[0068]

[0069] The second reference application set satisfies:

[0070]

[0071] Wherein min max represents the maximum-minimum criterion decision method, which is one of the decision criteria for uncertain decision-making. It can be shown that the decision maker should select the worst possible result in each scheme, and then choose the best one that provides the worst possible result. By min max, the minimum possible result can be maximized. The constraint condition in s.t. is that the maximum resource requirement of CPU and RAM of each application in actual operation does not exceed n θ1 and n θ2 The probability of resource requirement of CPU and RAM is 99.99%.

[0072] The first reference application set and the second reference application set are calculated by the above method, and and are constrained and optimized, which improves the accuracy of resource allocation and enables the edge computing terminal to provide sufficient computing power for each application at each time period.

[0073] Step 205, according to the first reference application set Calculate the CPU resource requirement R corresponding to the ith sample data CPU , and according to the second reference application set Calculate the RAM resource requirement R corresponding to the ith sample data RAM .

[0074] Specifically, the first reference application set corresponds to the CPU resource requirement R CPU,i , and the second reference application set corresponds to the RAM resource requirement R RAM,i . By using and , R CPU,i and R RAM,i can be calculated respectively.

[0075] In the embodiment of the scheme, the CPU resource requirement corresponding to the ith sample data is:

[0076]

[0077] The RAM resource requirement corresponding to the ith sample data is:

[0078]

[0079] Wherein, α1 and α2 are the CPU configuration margin coefficient and the RAM configuration margin coefficient respectively.

[0080] In the power system, the margin coefficient can be used to measure the stability of the negative feedback system and can be used to predict the overshoot of the step response of the closed-loop system. In the development process of microgrid, new applications may appear that need to be deployed on edge computing terminals. Therefore, before equipment selection, the corresponding CPU and RAM resource requirements of and are multiplied by the corresponding configuration margin coefficients to obtain the CPU resource requirement R CPU and the RAM resource requirement R RAM corresponding to the ith sample data. Wherein, R CPU and R RAM correspond to the computing resource configuration amount of the edge computing terminal defined by the microgrid. Further, compare R CPU and R RAM obtained from each family of daily operation data, and take the maximum value as the computing resource configuration result. The resource configuration result is used as a reference for equipment selection.

[0081] By calculating R CPU and R RAMAnd take the maximum value as a reference for equipment selection, can avoid the resource loss and waste caused by blind configuration, improve the efficiency of resource configuration.

[0082] In the embodiment of the application, a daily operation data sample set is obtained; the daily operation data sample set is divided into g family sample data according to a clustering algorithm; an application trigger frequency matrix expectation P of the i-th family sample data is obtained (i) , an expected calculation load matrix L of the i-th family sample data (i) , an application set n θ1 A CPU demand curve component in time period k1 and an application set n θ2 A RAM demand curve component in time period k2 According to P (i) , L (i) , and Calculate the first reference application set and the second reference application set , wherein the first reference application set corresponds to the CPU resource demand R CPU,i , and the second reference application set corresponds to the RAM resource demand R RAM,i ; wherein, 1≤i≤g; according to the first reference application set , the CPU resource demand R CPU corresponding to the i-th family sample data is calculated, and according to the second reference application set , the RAM resource demand R RAM corresponding to the i-th family sample data is calculated. Through the technical scheme of the embodiment, the resource waste caused by excessive increase of resource configuration amount due to some small probability events is avoided, the accuracy of resource configuration is improved, and the edge computing terminal can provide sufficient computing power for each application in each time period. It can effectively cope with the uncertainty in the computing terminal running environment and realize effective control of the microgrid.

[0083] Figure 4 The structure diagram of the resource configuration terminal of the edge computing terminal provided by the embodiment of the application is shown in Figure 4 The resource configuration terminal of the edge computing terminal comprises:

[0084] A container for providing a running environment for a functional microservice, wherein the functional microservice supports the implementation of each application;

[0085] A data interaction interface for realizing data interaction between each application;

[0086] A bridge for providing a channel for data interaction of different containers.

[0087] The function class microservice includes a message analysis microservice, a photovoltaic control microservice, a wind power control microservice, an energy storage control microservice, a circuit breaker control microservice, a power flow calculation microservice, a topology analysis microservice, a harmonic analysis microservice, a load prediction microservice, and a state estimation microservice, as shown in the message analysis microservice. Figure 4

[0088] Figure 5 A structural diagram of a resource configuration device of an edge computing terminal is provided for an embodiment of the present application, and the device is suitable for executing a resource configuration method of an edge computing terminal provided by the embodiment of the present application. As shown in the structural diagram of the device, Figure 5 the device can specifically include:

[0089] A first acquisition module 501 is configured to acquire a daily operation data sample set.

[0090] A data classification module 502 is configured to divide the daily operation data sample set into g family sample data according to a clustering algorithm, where g is an integer greater than or equal to 2.

[0091] A resource demand quantity calculation module 503 is configured to calculate a central processing unit (CPU) resource demand quantity and a random access memory (RAM) resource demand quantity corresponding to each family sample data, respectively.

[0092] A second acquisition module 504 is configured to acquire first sample data and second sample data, and perform resource configuration according to the first sample data and the second sample data, where the first sample data is sample data corresponding to a maximum CPU resource demand quantity in the g family sample data, and the second sample data is sample data corresponding to a maximum RAM resource demand quantity in the g family sample data.

[0093] Optionally, the second acquisition module 503 is specifically configured to:

[0094] For the i-th family sample data, 1≤i≤g.

[0095] The calculation of the CPU resource demand quantity R CPU and the RAM resource demand quantity R RAM of the i-th family sample data includes:

[0096] An application set calculation unit: calculating a first reference application set and a second reference application set of the i-th family sample data, where the first reference application set corresponds to the CPU resource demand quantity R CPU,i , and the second reference application set corresponds to the RAM resource demand quantity R RAM,i . ​

[0097] According to the first reference application set Calculate the CPU resource requirement R corresponding to the i-th family of sample data. CPU and according to the second reference application set Calculate the RAM resource requirement R corresponding to the i-th family of sample data. RAM .

[0098] Optionally, the application set computing unit is specifically used for:

[0099] The expected value P of the application trigger frequency matrix for obtaining the i-th family of sample data (i) The expected calculation of the loading matrix L for the i-th family of sample data (i) Application set n θ1 CPU demand curve components in time period k1 and application set n θ2 The RAM demand curve component in time period k2

[0100] According to P (i) L (i) , and Calculate the first reference application set and the second reference application set

[0101] Optionally, the application set computing unit is further configured to:

[0102] The expected frequency matrix of application triggering for the i-th family of sample data F j (i) For the running data of the j-th day in the i-th family, l i Let be the number of samples contained in the i-th family of sample data;

[0103] The expected computational load matrix L of the i-th family of sample data (i) =CP (i) C is the application resource usage matrix;

[0104] Application set n θ1 CPU demand curve components in time period k1 Application set n θ2 The RAM demand curve component in time period k2 Where i = 1, 2, ..., n represents n applications deployed on the edge computing terminal, and j = 1, 2, ..., m i This represents the i-th application containing m. i A microservice, c i,j,CPU c i,j,RAMCPU, RAM resources occupied by the jth microservice of the ith application respectively, ε(t) is a step function, t i,j,start is the starting execution time of the jth microservice of the ith application, d i,j , β i,j are the data size and the calculation complexity coefficient of the jth microservice of the ith application respectively.

[0105] Optionally, the application set calculation unit is further configured to:

[0106] The first reference application set satisfies:

[0107]

[0108] The second reference application set satisfies:

[0109]

[0110] Optionally, the second acquisition module 503 is further configured to:

[0111] The CPU resource requirement amount corresponding to the ith group of sample data The RAM resource requirement amount corresponding to the ith group of sample data Wherein, α1 and α2 are the CPU configuration margin coefficient and the RAM configuration margin coefficient respectively.

[0112] The resource configuration device of the edge computing terminal provided in the embodiment of the application can execute the resource configuration method of the edge computing terminal provided in any embodiment of the application, and has the corresponding function modules and beneficial effects of the execution method. The contents not described in detail in the embodiment can be referred to the description in any method embodiment of the application.

[0113] Figure 6 is a structural schematic diagram of an electronic device provided in the embodiment of the application, which shows a structural schematic diagram of a computer system 12 of an electronic device suitable for implementing the embodiment of the application. Figure 6 , which shows a structural schematic diagram of a computer system 12 of an electronic device suitable for implementing the embodiment of the application. Figure 6 The electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiment of the application. The components of the electronic device 12 can include but are not limited to one or more processors or processing units 16, system memory 28, bus 18 connecting different system components including the system memory 28 and the processing unit 16.

[0114] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0115] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that is accessible by electronic device 12 and includes both volatile and non-volatile media, removable and non-removable media.

[0116] System memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a "hard drive"). Figure 6 Although not shown, a magnetic disk drive can also be utilized in some embodiments for reading from and writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive can be utilized in some embodiments for reading from and writing to a removable, non-volatile optical disk (e.g., a CD-ROM, DVD-ROM or other optical media). In these instances, each can be connected to bus 18 by one or more data media interfaces. As will be further depicted and described below, memory 28 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application. Figure 6 Program / utility 40 having a set (at least one) of program modules 42 can be stored in memory 28 by way of example, such as an operating system, one or more application programs, other program modules, and program data, each of which implements at least a portion of a network environment. Program modules 42 generally carry out the functions and / or methodologies of embodiments of the application as described herein.

[0117]

[0118] ​Electronic device 12 can also communicate with one or more external devices 14 such as a keyboard or a pointing device, displays 24, etc.; other devices that enable a user to interact with electronic device 12; and / or any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication can occur via input / output (I / O) interface(s) 22. Still yet, electronic device 12 in embodiments can not be present as a stand-alone individual device, but rather can be embedded in a mirror, such that the display surface of display 24 is visually integrated with the mirror surface when the display surface of display 24 is not displaying. Also, electronic device 12 can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the Internet) via network adapter 20. As depicted, network adapter 20 communicates with the other components of electronic device 12 via bus 18. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with electronic device 12. Such modules include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0119] Processing unit 16, through running programs stored in system memory 28, executes various functional applications and resource configurations, such as the resource configuration method of the edge computing terminal provided by embodiments of the present application: obtaining a daily operation data sample set; according to a clustering algorithm, dividing the daily operation data sample set into g family sample data, where g is an integer greater than or equal to 2; respectively calculating the central processing unit (CPU) resource demand and random access memory (RAM) resource demand corresponding to each family sample data; obtaining first sample data and second sample data, and performing resource configuration according to the first sample data and the second sample data, where the first sample data is the sample data corresponding to the maximum CPU resource demand in the g family sample data, and the second sample data is the sample data corresponding to the maximum RAM resource demand in the g family sample data.

[0120] The embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the resource configuration method of the edge computing terminal provided by all the embodiments of the present application: obtaining a daily operation data sample set; according to a clustering algorithm, the daily operation data sample set is divided into g family sample data, wherein g is an integer greater than or equal to 2; CPU resource demand and RAM resource demand corresponding to each family sample data are calculated respectively; first sample data and second sample data are obtained, and resource configuration is performed according to the first sample data and the second sample data, wherein the first sample data is sample data corresponding to the maximum CPU resource demand in the g family sample data, and the second sample data is sample data corresponding to the maximum RAM resource demand in the g family sample data. Any combination of one or more computer readable media can be used. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, device or apparatus.

[0121] The computer readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which a computer readable program code is borne. Such propagated data signal can take various forms, including but not limited to electromagnetic signal, optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in connection with an instruction execution system, device or apparatus.

[0122] The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0123] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0124] It is to be understood that the above description is directed to the preferred embodiments and that those skilled in the art will be able to devise various modifications which, although not specifically described herein, embody the principles of the application and are included within the spirit and scope of the application. Accordingly, while the preferred embodiments have been described above, those skilled in the art will understand that they are not to be limited to the preferred embodiments, but are to include all such embodiments falling within the scope of the application as defined by the appended claims.

Claims

1. A resource allocation method for an edge computing terminal, characterized in that, include: Obtain a sample set of daily operational data; According to the clustering algorithm, the daily operation data sample set is divided into g groups of sample data, where g is an integer greater than or equal to 2; Calculate the CPU resource requirements and RAM resource requirements for each group of sample data respectively; Acquire first sample data and second sample data, and configure resources based on the first sample data and the second sample data, wherein the first sample data is the sample data corresponding to the maximum CPU resource requirement in the g-family sample data, and the second sample data is the sample data corresponding to the maximum RAM resource requirement in the g-family sample data; Among them, for the first Sample data, ; Calculate the first CPU resource requirements corresponding to family sample data RAM resource requirements ,include: Calculate the first The first reference application set corresponding to the family sample data Second Reference Application Set The first reference application set CPU resource requirements Correspondingly, the second reference application set RAM resource requirements correspond; According to the first reference application set Calculate the first CPU resource requirements corresponding to family sample data and according to the second reference application set Calculate the first RAM resource requirements corresponding to family sample data .

2. The resource allocation method for an edge computing terminal according to claim 1, characterized in that, The calculation of the first The first reference application set corresponding to the family sample data Second Reference Application Set ,include: Get the Expected frequency matrix of application of family sample data , No. Expected computational load matrix of family sample data Application Collection During the period CPU demand curve components and application collection During the period RAM demand curve components ; according to , , and Calculate the first reference application set and the second reference application set .

3. The resource allocation method for an edge computing terminal according to claim 2, characterized in that, The acquisition of the first Expected frequency matrix of application of family sample data , No. Expected computational load matrix of family sample data Application Collection During the period CPU demand curve components and application collection During the period RAM demand curve components ,include: Get the Expected frequency matrix of application of family sample data , For the first No. 1 in the clan Daily operational data, For the first The number of samples contained in the family sample data, to obtain the number of samples. Expected computational load matrix of family sample data , To obtain the application resource usage matrix, retrieve the application set. During the period CPU demand curve components and obtaining application collections During the period RAM demand curve components ;in, This represents the deployment of edge computing terminals. One application, Representing the The application includes Microservices , Representing the first The first application The CPU and RAM resources consumed by each microservice It is a step function. For the first The first application The start execution time of each microservice , The first The first application The data volume and computational complexity of each microservice.

4. The resource allocation method for an edge computing terminal according to claim 3, characterized in that, According to and Calculate the first reference application set and the second reference application set ,include: according to and Calculate the first reference application set The first reference application set satisfy: ; according to and Calculate the second reference application set The second reference application set satisfy: 。 5. The resource allocation method for an edge computing terminal according to claim 4, characterized in that, According to the first reference application set Calculate the first CPU resource requirements corresponding to family sample data and according to the second reference application set Calculate the first RAM resource requirements corresponding to family sample data ,include: According to the first reference application set Calculate the first CPU resource requirements corresponding to family sample data and according to the second reference application set Calculate the first RAM resource requirements corresponding to family sample data ; in, These are the CPU configuration margin coefficient and the RAM configuration margin coefficient, respectively.

6. A resource allocation device for an edge computing terminal, characterized in that, include: The first acquisition module is used to acquire a daily operational data sample set; The data classification module is used to divide the daily operation data sample set into g-family sample data according to the clustering algorithm, where g is an integer greater than or equal to 2; The resource requirement calculation module is used to calculate the CPU resource requirement and RAM resource requirement corresponding to each family of sample data respectively. The second acquisition module is used for the first sample data and the second sample data, and performs resource configuration based on the first sample data and the second sample data, wherein the first sample data is the sample data corresponding to the maximum CPU resource requirement in the g-family sample data, and the second sample data is the sample data corresponding to the maximum RAM resource requirement in the g-family sample data. Wherein, the second mold body is used for: For the Family sample data, ; Calculate the first CPU resource requirements corresponding to family sample data RAM resource requirements ,include: Application set computation unit: Calculate the first The first reference application set corresponding to the family sample data Second Reference Application Set The first reference application set CPU resource requirements Correspondingly, the second reference application set RAM resource requirements correspond; According to the first reference application set Calculate the first CPU resource requirements corresponding to family sample data and according to the second reference application set Calculate the first RAM resource requirements corresponding to family sample data .

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the resource configuration method for the edge computing terminal as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the resource configuration method for the edge computing terminal as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intelligent management system

    CN109905423A

  • Edge data processing method and system for Internet of Things communication

    CN112835691A