Power grid edge terminal service resource dynamic reservation and distribution method and device
By determining the trigger confidence level and resource demand ratio of downlink related services at the power grid edge terminal and dynamically allocating resources, the problem of imperfect resource reservation in power grid edge computing is solved, and the reliability and resource utilization efficiency of the system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
- Filing Date
- 2026-04-03
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies lack the ability to perceive the logical connections and dynamic triggering relationships between services in grid edge computing, resulting in an imperfect resource reservation mechanism that cannot adapt to the dynamic environment of the power grid. The resource allocation strategy is simple and crude, which can easily lead to service interruptions and resource fragmentation.
By identifying the downlink related services and their trigger confidence levels of the power grid edge terminal services, we divide the resource registration queues into strong real-time and weak real-time categories, dynamically allocate core resources based on historical resource demand ratios, adjust the importance level using scaling factors, and reserve and allocate resources to adapt to power grid load fluctuations and network topology changes.
It improves the reliability and resource utilization efficiency of the power grid edge computing system in complex scenarios, ensuring that critical business operations obtain the necessary resources at the trigger moment and adapt to changes in the dynamic environment of the power grid.
Smart Images

Figure CN121967346A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power distribution network control technology, specifically to a method for dynamic reservation and allocation of power grid edge terminal service resources, a device for dynamic reservation and allocation of power grid edge terminal service resources, a machine-readable storage medium, and a terminal device. Background Technology
[0002] Currently, to address the challenges of massive heterogeneous device access and the emergence of diverse services in power distribution networks, edge computing technology has been introduced into the power grid field, aiming to achieve rapid local processing of services by decentralizing computing power. Currently, resource allocation for power grid service needs typically employs the following methods: resource allocation for differentiated service needs, attempting to allocate resources based on latency and reliability differences in static or offline environments by constructing optimization models or designing utility functions; resource isolation and scheduling based on containers and microservices, utilizing lightweight virtualization technology to achieve service decoupling and flexible deployment, but failing to fully consider the timing constraints between microservices; a cloud-edge-collaborative computing offloading model, researching task allocation strategies among cloud, edge, and endpoint, optimizing the macro-allocation of communication and computing resources; and dynamic optimization by introducing intelligent algorithms, exploring online decision-making capabilities using methods such as deep reinforcement learning, however, its black-box nature and training resource requirements face challenges in implementation on resource-constrained edge devices.
[0003] While existing technologies offer various approaches to power grid edge resource management, the following issues remain: a lack of awareness of logical connections and dynamic triggering relationships between services; existing scheduling strategies mostly treat services or microservices as independent entities, ignoring the execution order and conditional triggering relationships present in actual business scenarios; the absence and inadequacy of resource reservation mechanisms; for highly real-time services composed of interconnected business chains, the lack of a forward-looking dynamic resource reservation mechanism fails to ensure that critical services can immediately obtain the necessary computing resources at the triggering moment; mismatch between static configuration and the dynamic environment of the power grid; many resource allocation schemes rely on static parameters or offline optimization, making it difficult to adapt to real-time dynamic characteristics such as power grid load fluctuations, the randomness of new energy output, and network topology changes; and simplistic and crude resource contention resolution strategies; existing preemption mechanisms are often poorly designed, easily leading to service interruptions, resource fragmentation, or the "starvation" of low-priority services. These shortcomings collectively constrain the reliability and resource utilization efficiency of power grid edge computing systems in complex scenarios. Summary of the Invention
[0004] The purpose of this application is to provide a method for dynamically reserving and allocating service resources for power grid edge terminals, a device for dynamically reserving and allocating service resources for power grid edge terminals, a machine-readable storage medium, and a terminal device to solve the above-mentioned problems.
[0005] To achieve the above objectives, the first aspect of this application provides a method for dynamic reservation and allocation of service resources for power grid edge terminals, including: In response to a service request from a power grid edge terminal, identify at least one downlink associated service of the current service, and determine the real-time type and trigger confidence level of each downlink associated service; Based on the real-time type and trigger confidence level of each downlink associated service, downlink associated services that meet the preset conditions are registered to the corresponding resource registration queue; Based on the historical resource demand ratios of different real-time types of services of the power grid edge terminal in a preset historical period, each unit monitoring cycle is divided into multiple core resource dynamic allocation cycles. At the end of each core resource dynamic allocation cycle, the first resource demand ratio of different real-time types of services in the resource registration queue corresponding to different real-time types of services in the next core resource dynamic allocation cycle is determined. Based on the historical resource demand ratio and the first resource demand ratio, the resource allocation ratio for different real-time type services in the next core resource dynamic allocation cycle is determined, and the allocatable core resources are allocated to different real-time type services according to the resource allocation ratio.
[0006] Optionally, the trigger confidence level of each downlink related service is determined, including: The importance value of each downlink associated service is determined, and the posterior probability between the current service request and each downlink associated service is determined based on the historical triggering data of each downlink associated service. The posterior probability represents the triggering probability of each downlink associated service under the current service triggering condition. Determine the scaling factor, which is used to adjust the weight of the impact of the importance value of each downlink related service on the trigger confidence level; The trigger confidence level of the corresponding downlink associated service is determined by the larger of the posterior probability of each downlink associated service and the importance value adjusted by the scaling factor.
[0007] Optionally, the real-time type includes strong real-time and weak real-time, and the resource registration queue includes a strong real-time resource registration queue and a weak real-time resource registration queue; The preset conditions include: When the trigger confidence level of the current downlink associated service is greater than a preset first trigger confidence level threshold, or the trigger confidence level of the current downlink associated service is greater than a preset second trigger confidence level threshold but less than or equal to the first trigger confidence level threshold, and the current downlink associated service is a highly real-time service: If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, no resource registration or core resource reservation will be performed. If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, the start time of the subsequent core resource dynamic allocation cycle shall be used as the estimated arrival time of the remaining services of the current downlink associated service, and the remaining services of the current downlink associated service shall be inserted into the strong real-time resource registration queue. If the estimated arrival time and estimated completion time of the current downlink related service are both within the subsequent period of the current core resource dynamic allocation cycle, insert the current downlink related service into the strong real-time resource registration queue according to its estimated arrival time. If the trigger confidence level of the current downlink related business is less than the second trigger confidence level threshold, no resource registration or core resource reservation will be performed; Wherein, the first trigger confidence threshold is greater than the second trigger confidence threshold.
[0008] Optionally, the preset conditions further include: If the trigger confidence level of the current downlink associated service is greater than the first trigger confidence level threshold, and the current downlink associated service is a weakly time-sensitive service: If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, reserve the corresponding core resources for all businesses of the current downlink related business; If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, the corresponding core resources are reserved for the services that the current downlink associated service can complete within the current core resource dynamic allocation cycle, and the start time of the subsequent core resource dynamic allocation cycle is used as the estimated arrival time of the remaining services of the current downlink associated service, and the remaining services of the current downlink associated service are inserted into the weak real-time resource registration queue. If the estimated arrival time and estimated completion time of the current downlink related service are both within the subsequent period of the current core resource dynamic allocation cycle, then insert the current downlink related service into the weak real-time resource registration queue according to its estimated arrival time.
[0009] Optionally, the preset conditions further include: If the trigger confidence level of the current downlink associated service is greater than the second trigger confidence level threshold and less than or equal to the first trigger confidence level threshold, and the current downlink associated service is a weakly time-sensitive service: If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, no resource registration or core resource reservation will be performed. If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, the start time of the subsequent core resource dynamic allocation cycle shall be used as the estimated arrival time of the remaining services of the current downlink associated service, and the remaining services of the current downlink associated service shall be inserted into the weak real-time resource registration queue. If the estimated arrival time and estimated completion time of the current downlink related service are both within the subsequent period of the current core resource dynamic allocation cycle, then insert the current downlink related service into the weak real-time resource registration queue according to its estimated arrival time.
[0010] Optionally, based on the historical resource demand ratios of different real-time types of services of the power grid edge terminal within a preset historical time period, each monitoring cycle is divided into multiple core resource dynamic allocation cycles, including: Within the preset historical time period, the historical resource demand ratio of strong real-time services and weak real-time services corresponding to each sampling moment in each unit monitoring cycle is obtained, thus obtaining the historical resource demand ratio sequence for each unit monitoring cycle. The preset historical time period is divided into multiple sub-time periods, each sub-time period includes multiple unit monitoring cycles. The historical resource demand ratio sequence corresponding to all unit monitoring cycles in each sub-time period is clustered, and the historical resource demand ratio sequence corresponding to the cluster center is used as the representative sequence of the corresponding sub-time period. Based on the historical resource demand ratio at each sampling time in each representative sequence, change points are detected in the representative sequences of each sub-period to determine at least one change point in each representative sequence. Based on the sampling time corresponding to the change point of each representative sequence, the unit monitoring period corresponding to each representative sequence is divided into multiple core resource dynamic allocation periods, thus obtaining the core resource dynamic allocation period division strategy for each sub-period.
[0011] Optionally, clustering is performed on the historical resource demand ratio sequences corresponding to all unit monitoring cycles within each sub-period, including: Based on the K-center point algorithm, the historical resource demand ratio sequences corresponding to all unit monitoring cycles in each sub-period are clustered, and the dynamic time warping distance between each historical resource demand ratio sequence and every other historical resource demand ratio sequence is calculated by the dynamic time warping algorithm. Calculate the sum of the dynamic time-warped distances of each historical resource demand ratio sequence, and determine the historical resource demand ratio sequence with the smallest sum of dynamic time-warped distances as the historical resource demand ratio sequence corresponding to the cluster center.
[0012] Optionally, after responding to a service request from a power grid edge terminal, the method further includes: Among the sub-time periods of the preset historical time period, the sub-time period corresponding to the current unit monitoring cycle is determined as the target sub-time period; Based on the core resource dynamic allocation cycle division strategy corresponding to the target sub-period, the current unit monitoring cycle is divided into multiple core resource dynamic allocation cycles.
[0013] Optionally, determine the proportion of the first resource demand for different real-time types of services in the resource registration queue that is within the next core resource dynamic allocation cycle, including: Identify the services in the high real-time resource registration queue whose expected arrival time is within the next core resource dynamic allocation cycle, and count the first peak resource demand of the high real-time services at each sampling time within the next core resource dynamic allocation cycle. Identify the services in the weak real-time resource registration queue whose expected arrival time is within the next core resource dynamic allocation cycle, and count the second peak resource demand of the weak real-time services at each sampling time within the next core resource dynamic allocation cycle. Based on the ratio of the first peak resource demand and the second peak resource demand at each sampling moment within the next core resource dynamic allocation cycle, a vector of the first peak resource demand ratio for the next core resource dynamic allocation cycle is constructed, and the vector of the first peak resource demand ratio is used as the first resource demand ratio.
[0014] Optionally, determining the resource allocation ratio for different real-time service types within the next core resource dynamic allocation cycle based on the historical resource demand ratio and the first resource demand ratio includes: Determine the third peak resource requirement for strong real-time services and the fourth peak resource requirement for weak real-time services at each sampling moment in the next core resource dynamic allocation cycle corresponding to the representative sequence of the target sub-period. Based on the ratio of the third peak resource demand to the fourth peak resource demand at each sampling moment in the next core resource dynamic allocation cycle, construct the second peak resource demand ratio vector for the next core resource dynamic allocation cycle. Determine the mean value of the ratio vector of the first peak resource demand ratio vector and the mean value of the ratio vector of the second peak resource demand ratio vector. Then, perform a weighted summation on the mean value of the ratio vector of the first peak resource demand ratio vector and the mean value of the ratio vector of the second peak resource demand ratio vector to obtain the resource allocation ratio of strong real-time services and weak real-time services in the next core resource dynamic allocation cycle.
[0015] A second aspect of this application provides a device for dynamically reserving and allocating service resources for power grid edge terminals, comprising: The service request processing module is configured to respond to service requests from the power grid edge terminal, determine at least one downlink associated service of the current service, and determine the real-time type and trigger confidence level of each downlink associated service; The resource registration module is configured to register downlink related services that meet preset conditions to the corresponding resource registration queue based on the real-time type and trigger confidence level of each downlink related service. The resource demand calculation module is configured to divide each monitoring cycle into multiple core resource dynamic allocation cycles based on the historical resource demand ratio of different real-time type services of the power grid edge terminal in a preset historical period. At the end of each core resource dynamic allocation cycle, the first resource demand ratio of different real-time type services in the resource registration queue corresponding to different real-time type services in the next core resource dynamic allocation cycle is determined. The resource allocation module is configured to determine the resource allocation ratio for different real-time type services in the next core resource dynamic allocation cycle based on the historical resource demand ratio and the first resource demand ratio, and to allocate the allocatable core resources to different real-time type services according to the resource allocation ratio.
[0016] In a third aspect, this application provides a machine-readable storage medium storing instructions that, when executed by a processor, configure the processor to perform the above-described method for dynamic reservation and allocation of power grid edge terminal service resources.
[0017] In a fourth aspect, this application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for dynamic reservation and allocation of power grid edge terminal service resources.
[0018] This application predicts the probability of downlink services being triggered by calculating the trigger confidence of downlink related services of the current service. Different registration and reservation strategies are configured according to the real-time nature of downlink related services and the probability of downlink services being triggered, thereby providing continuous resource guarantees for the related service chain. At the same time, based on the registration and reservation status and the historical time-series resource requirements of terminal services, different core resources are dynamically allocated to different services in different periods. This can effectively alleviate the pressure on power edge terminals caused by the massive heterogeneous device access and multiple concurrent services in the distribution network, thereby enabling them to adapt to complex situations such as grid load fluctuations, randomness of new energy output, and network topology changes.
[0019] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 A flowchart illustrating the method for dynamically reserving and allocating service resources for power grid edge terminals provided in a preferred embodiment of this application; Figure 2 A directed acyclic graph of the business chain is provided for a preferred embodiment of this application; Figure 3 A schematic diagram of the device for dynamically reserving and allocating service resources for power grid edge terminals provided in a preferred embodiment of this application; Figure 4 A schematic diagram of a terminal device provided for a preferred embodiment of this application.
[0021] Explanation of reference numerals in the attached figures 10 - Terminal device, 100 - Processor, 101 - Memory, 102 - Computer program. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0023] It should be noted that the technical solutions of the various embodiments of this application can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by this application.
[0024] To solve the above problems, such as Figure 1 As shown, the first aspect of this application provides a method for dynamic reservation and allocation of service resources for power grid edge terminals, including: S100, In response to the service request from the power grid edge terminal, determine at least one downlink associated service of the current service, and determine the real-time type and trigger confidence level of each downlink associated service; S200. Based on the real-time type and trigger confidence level of each downlink associated service, register downlink associated services that meet the preset conditions to the corresponding resource registration queue. S300: Based on the historical resource demand ratio of different real-time type services of the power grid edge terminal in a preset historical period, each unit monitoring cycle is divided into multiple core resource dynamic allocation cycles. At the end of each core resource dynamic allocation cycle, the first resource demand ratio of different real-time type services in the resource registration queue corresponding to different real-time type services in the next core resource dynamic allocation cycle is determined. S400. Based on the historical resource demand ratio and the first resource demand ratio, determine the resource allocation ratio for different real-time types of services in the next core resource dynamic allocation cycle, and allocate the allocatable core resources to different real-time types of services according to the resource allocation ratio.
[0025] Thus, this application predicts the probability of downlink services being triggered by calculating the trigger confidence of downlink related services of the current service. Different registration and reservation strategies are configured according to the real-time nature of downlink related services and the probability of downlink services being triggered, thereby providing continuous resource guarantees for the related service chain. At the same time, based on the registration and reservation status and the historical time-series resource requirements of terminal services, different core resources are dynamically allocated to different services in different periods. This can effectively alleviate the pressure on power edge terminals caused by the massive access of heterogeneous devices and the concurrent operation of multiple services in the distribution network, thereby enabling them to adapt to complex situations such as grid load fluctuations, randomness of new energy output, and network topology changes.
[0026] Understandably, grid edge terminal services are business functions completed collaboratively by a set of microservices. For example, the fault isolation control service may consist of four microservices: topology analysis, security verification, instruction generation, and GOOSE distribution. In this application, the downlink related services of the current service refer to services that may be directly triggered during / after the execution of the current service. Figure 2 As shown, if the service chain of a service is a directed acyclic graph, then the downstream related services of a service are its child node services. Services D and E are the downstream related services of service B, and services B and C are the downstream related services of service A. For example, service A is fault detection, which determines whether a short circuit has occurred by collecting real-time data such as current and voltage; service D is fault location, which starts immediately upon fault detection and analyzes the location of the fault point; service E is alarm reporting, which reports the fault event to the main station or maintenance platform; service F is isolation operation, which controls the switch to disconnect the faulty section after fault location is completed; service G is power restoration, which attempts to close the tie switch after isolation to restore power to the non-faulty area. Therefore, services D and E are the downstream related services of service A, service F is the downstream related service of service D, and service G is the downstream related service of service F.
[0027] In step S100, the trigger confidence level of each downlink related service is determined, including: S110. Determine the importance value of each downlink associated service, and determine the posterior probability between the current service request and each downlink associated service based on the historical triggering data of each downlink associated service. The posterior probability represents the triggering probability of each downlink associated service under the current service triggering condition.
[0028] In this application, the triggering confidence of downlink related services is determined based on the posterior probability and the importance of the downlink related services. Let the i-th service request be... The set of downstream related services for this business is ,in, For business requests The number of downstream related transactions, Let j represent the downlink associated service of the i-th service. Suppose the service request... Downstream related business The importance of Its value can be preset. For example, the importance value for relay protection services can be preset to 0.95, and the importance value for log reporting services can be preset to 0.2. No specific limit is imposed here. Service Request Downstream related business The posterior probability is The posterior probability can be calculated using Bayes' theorem based on the historical triggering frequency of each downlink associated service of the current service, which will not be elaborated upon here. Service Request Downstream related business The trigger confidence level is .
[0029] S120. Determine the scaling factor. The scaling factor is used to adjust the weight of the impact of the importance value of each downlink related service on the trigger confidence level, that is, to adjust the correlation between the importance factor of the service and the trigger confidence level. The scaling factor is... Its value can be preset; for example, in a security-first scenario, it can be set to... In efficiency-first scenarios, settings can be configured This is not a limitation.
[0030] S130. Determine the larger of the posterior probability of each downlink associated service and the importance value adjusted by the scaling factor as the trigger confidence level of the corresponding downlink associated service.
[0031] Specifically, the trigger confidence level is calculated using the following formula:
[0032]
[0033] in, This is the lower limit of the posterior probability, used to compensate for statistical calculation errors in the posterior probability; its value can be preset. For business requests Downstream related business The likelihood probability represents the probability that the downstream business... If this happens, then the upstream business... The probability of being observed can be obtained through Bayesian networks or historical causal modeling; For business requests Downstream related business The prior probability, which can be based on downlink related business. Historical operational data statistics show that, for example, in the past 1000 fault detections, fault location was triggered in 850 cases. ; For business requests The probability of evidence can be obtained by summing over all possible downstream causes, for example... Or through direct statistics The frequency of occurrence is obtained, but no limit is made here.
[0034] In this application, real-time types include strong real-time and weak real-time, and resource registration queues include strong real-time resource registration queues and weak real-time resource registration queues. In the power grid edge terminal, real-time refers to the sensitivity of a service to response delays and execution time limits, determining whether the service must be completed within a specific time window; otherwise, it may lead to system security risks or functional failures. For example, strong real-time services include relay protection actions (such as short-circuit tripping), fault isolation control, and emergency voltage over-limit adjustments; weak real-time services include load data reporting, equipment status inspection, and log synchronization. The real-time type of each service can be pre-determined based on power grid operation procedures, IEC 61850 standards, or dispatch instructions.
[0035] In this application, the trigger confidence level of each downlink associated service is determined by a preset first trigger confidence threshold and a second trigger confidence threshold, wherein the first trigger confidence threshold is greater than the second trigger confidence threshold. For example, the first trigger confidence threshold is 0.8, and the second trigger confidence threshold is 0.5. Then, when When this occurs, it indicates a high confidence level in triggering the downstream related service; when When, it indicates that the trigger confidence level of the downlink related service is within the range; when This indicates that the trigger confidence of the downlink related business is low.
[0036] In step S200, the preset conditions include: When the trigger confidence level of the current downlink associated service is greater than the preset first trigger confidence level threshold (i.e., the trigger confidence level of the downlink associated service is high), or the trigger confidence level of the current downlink associated service is greater than the preset second trigger confidence level threshold and less than or equal to the first trigger confidence level threshold (i.e., the trigger confidence level of the downlink associated service is medium), and the current downlink associated service is a highly real-time service: S210. If the estimated arrival time and estimated completion time of the current downlink related service are both within the current core resource dynamic allocation cycle, no resource registration or core resource reservation will be performed. The estimated arrival time refers to the expected start time of the downlink related service after it is triggered. This can be estimated from the completion time of the upstream service and network / scheduling latency. For example, if fault detection service A completes at t=100ms, its downlink related service D (fault location) is expected to arrive at t=102ms (including 2ms scheduling overhead). The estimated completion time refers to the total time required for the service to complete from the start of execution to the completion of all microservices plus the estimated arrival time. For example, if service D requires 8ms to execute, then the estimated completion time = 102ms + 8ms = 110ms.
[0037] The core resource dynamic allocation cycle can be a fixed time period set by the edge terminal operating system or resource scheduler (such as every 10ms, 20ms or 50ms) to uniformly plan the allocation of core resources such as CPU, memory, and network bandwidth. For example, if the current cycle is [100ms, 120ms) and the next cycle is [120ms, 140ms), and if the current downlink associated service is a highly real-time service such as fault isolation control, with an execution time of 12ms and an estimated arrival time of 105ms, then its estimated completion time is 117ms. That is, the estimated arrival time and estimated completion time of the downlink associated service are both within the current cycle.
[0038] S211. If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within a subsequent core resource dynamic allocation cycle, the start time of the subsequent core resource dynamic allocation cycle shall be used as the estimated arrival time of the remaining service of the current downlink associated service, and the remaining service of the current downlink associated service shall be inserted into the strong real-time resource registration queue. For example, if the execution time of the current downlink associated service is 12ms, the estimated arrival time is 115ms (within the current cycle), and its estimated completion time is 127ms (within the next cycle), meaning that the current cycle is insufficient to complete the remaining service (7ms of work cannot be executed in the current cycle), then according to the estimated start time of its remaining part (i.e., the start time of the next cycle, 120ms), it shall be inserted into the strong real-time service resource registration queue. The scheduler will reserve at least 7ms of core resources for it in the next cycle, i.e., cycle [120, 140), thereby avoiding the strong real-time task timeout failure due to insufficient resources.
[0039] S212. If the estimated arrival and completion times of the current downlink related service both fall within the subsequent cycles of the current core resource dynamic allocation cycle, insert it into the high real-time resource registration queue according to its estimated arrival time. If the estimated arrival and completion times of the current downlink related service are 130ms and 142ms respectively, and fall within the next cycle (cycle [120, 140)) and the cycle after that (cycle [140, 160)) respectively, then insert it into the high real-time service resource registration queue according to its estimated arrival time of 130ms. Simultaneously, the scheduler will reserve 10ms (130~140) before the start of the [120, 140) cycle and 2ms in [140, 160) to ensure end-to-end completion. By planning resource allocation in advance, the high real-time performance of the service is guaranteed, and resource contention during service operation is avoided.
[0040] S213. If the trigger confidence level of the current downlink related business is less than the second trigger confidence level threshold, i.e., the trigger confidence level is low, no resource registration or core resource reservation shall be performed.
[0041] In this application, the pre-defined conditions also include: If the trigger confidence level of the current downlink related service is greater than the first trigger confidence level threshold (i.e., the trigger confidence level is high), and the current downlink related service is a weakly time-sensitive service: S220. If the estimated arrival time and estimated completion time of the current downlink related service are both within the current core resource dynamic allocation cycle, reserve corresponding core resources for all services of the current downlink related service. For example, reserve corresponding container resources for all microservices in this service. It is understood that core resources can be all the cores of a computer, or they can be divided into a secure area (reserving a fixed dedicated kernel for strong real-time tasks, never allocated to containers), a dynamic area (designating a portion of the kernel as an elastic area), and a container fixed area (container resources, reserving a fixed container kernel for weak real-time tasks, not participating in real-time tasks).
[0042] S221. If the estimated arrival time of the current downlink related service is within the current core resource dynamic allocation period, and its estimated completion time is within the subsequent core resource dynamic allocation period, then reserve the corresponding core resources for the services that the current downlink related service can complete within the current core resource dynamic allocation period. For example, reserve the corresponding container resources for the microservices in the service that can be executed within the current core resource dynamic allocation period, and use the start time of the subsequent core resource dynamic allocation period as the estimated arrival time of the remaining services of the current downlink related service, and insert the remaining services of the current downlink related service into the weak real-time resource registration queue according to the estimated arrival time.
[0043] S222. If the estimated arrival time and estimated completion time of the current downlink related service are both in the subsequent period of the current core resource dynamic allocation cycle, insert the current downlink related service into the weak real-time resource registration queue according to its estimated arrival time.
[0044] In this application, the pre-defined conditions also include: When the trigger confidence level of the current downlink associated service is greater than the second trigger confidence level threshold and less than or equal to the first trigger confidence level threshold, i.e., the trigger confidence level of the current downlink associated service is medium, and the current downlink associated service is a weakly time-sensitive service: S230. If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, no resource registration or core resource reservation will be performed.
[0045] S231. If the estimated arrival time of the current downlink related service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, then the start time of the subsequent core resource dynamic allocation cycle shall be used as the estimated arrival time of the remaining services of the current downlink related service, and the remaining services of the current downlink related service shall be inserted into the weak real-time resource registration queue.
[0046] S232. If the estimated arrival time and estimated completion time of the current downlink related service are both in the subsequent period of the current core resource dynamic allocation cycle, then insert the current downlink related service into the weak real-time resource registration queue according to its estimated arrival time.
[0047] The aforementioned strong / weak real-time service resource registration queue is a list arranged in chronological order of the expected arrival time of services. It records all information for each service, including the microservice timing logic, service computational load, latency, and trigger confidence level. The service computational load is formed by superimposing the computational loads of multiple microservices on the timeline. The microservice computational load can be calculated using existing methods, which are not limited here.
[0048] Understandably, when applications run on virtualized computing devices, the computational overhead of virtualizing some functional components can introduce additional processing latency. Due to the complexity of program processing, it is difficult to quantify virtualization latency using analytical methods. Therefore, in this application, for services requiring strong real-time capabilities, directly allocating a dedicated kernel can be prioritized to avoid virtualization latency. For services requiring weak real-time capabilities, containerization technology can be utilized to achieve agile deployment and efficient management by allocating a dedicated kernel for containers. That is, services requiring strong real-time capabilities run directly on a dedicated kernel, while tasks requiring weak real-time capabilities are deployed and executed on a dedicated kernel for containers using containerization technology.
[0049] Specifically, when a business request is a high-real-time request, the microservices within that request are entered into a high-real-time resource registration queue, also known as a high-real-time microservice waiting queue, according to their time-series logic. A microservice in the waiting queue is allowed to enter the ready queue if its preceding microservice has completed and meets its startup conditions. The scheduling methods for microservices in the ready queue can employ commonly used operating system methods, including deadline-first algorithms, round-robin algorithms, first-come-first-served algorithms, and priority-based methods.
[0050] When a business request is a weakly real-time request, the microservices within that request are entered into a weakly real-time resource registration queue, also known as a weakly real-time microservice waiting queue, according to their time-series logic. A microservice in the waiting queue is added to the ready queue if its preceding microservice has completed and meets its startup conditions. The scheduling methods for microservices in the ready queue can employ commonly used operating system methods, including deadline-first algorithms, round-robin algorithms, first-come-first-served algorithms, and priority-based methods.
[0051] This application dynamically allocates dedicated kernel resources for high real-time services and container-specific kernel resources for low real-time services on a periodic basis. In step S300, based on the historical resource demand ratios of different real-time service types within a preset historical time period of the power grid edge terminal, each monitoring cycle is divided into multiple core resource dynamic allocation cycles, including: S310. Obtain the historical resource demand ratio of strong real-time services and weak real-time services at each sampling time within each monitoring unit within a preset historical time period, thus obtaining the historical resource demand ratio sequence for each monitoring unit. For example, using hours as the step size, record the peak resource demand ratio of strong real-time services and weak real-time services in the power edge terminal every day of the past year. Let the whole year's data be denoted as... , ,in, This represents the ratio of peak resource requirements for high-real-time services to low-real-time services within hour q of day k.
[0052] S320. Divide the preset historical time period into multiple sub-time periods. Each sub-time period includes multiple unit monitoring cycles. Perform clustering processing on the historical resource demand ratio sequence corresponding to all unit monitoring cycles in each sub-time period. Use the historical resource demand ratio sequence corresponding to the cluster center as the representative sequence of the corresponding sub-time period.
[0053] For example, divide the data of the past year into four quarters, cluster the data of each quarter, and generate a representative day for that quarter. Let the time series data of the representative day of the m-th quarter be denoted as . ,in, This represents the peak resource demand ratio between strong real-time and weak real-time services within hour q on day m of the quarter. The representative day is a typical or cluster center of resource demand for all days within a quarter; that is, a 24-dimensional time-series sequence (one value per hour) summarizes the overall resource demand behavior for the quarter.
[0054] Specifically, the historical resource demand ratio sequences corresponding to all monitoring periods within each sub-period are clustered, including: S321. Based on the K-Medoids clustering algorithm, the historical resource demand ratio sequences corresponding to all unit monitoring cycles within each sub-period are clustered, and the dynamic time warping distance (DTW) between each historical resource demand ratio sequence and every other historical resource demand ratio sequence is calculated using the dynamic time warping algorithm.
[0055] For example, all days in a quarter (e.g., Q1 has 90 days) can be considered as 90 time series of length 24. These 90 series can be clustered, and the number of clusters is usually set to K=1 or K=3. If K=1, the cluster center is the representative day. If K>1, the center of the cluster with the highest average profile coefficient can be selected as the representative day.
[0056] S322. Calculate the sum of the dynamic time-warped distances (DTWs) of each historical resource demand ratio sequence, and determine the historical resource demand ratio sequence with the smallest sum of DTWs as the historical resource demand ratio sequence corresponding to the cluster center. For example, if K-Medoids (K=1) is used, first calculate the DTW distance of each sequence to the other 89 sequences, find the day with the smallest total DTW distance as the representative day of Q1, and the historical resource demand ratio sequence corresponding to the representative day is the representative sequence of Q1.
[0057] S330. Based on the historical resource demand ratio of each sampling time in each representative sequence, change point detection is performed on the representative sequence of each sub-period to determine at least one change point of each representative sequence. Based on the sampling time corresponding to the change point of each representative sequence, the unit monitoring period corresponding to each representative sequence is divided into multiple core resource dynamic allocation periods to obtain the core resource dynamic allocation period division strategy corresponding to each sub-period.
[0058] Specifically, existing time series change point detection methods can be used to detect change points in the time series data representing days of each quarter. Let the set of detected change points for the m-th quarter be denoted as... The m-th quarter represents the u-th change point of the day. It is an interval Integers within, Let m be the number of change points representing days in the m-th quarter. In this application, a change point can be a time point in the 24-hour resource demand ratio sequence representing a day where the resource demand pattern undergoes a statistically significant change. Common methods for change point detection include CUSUM (cumulative sum, cumulative deviation; when the cumulative sum exceeds a threshold, it is determined to be a change point) and Bayesian online change point detection (based on a probabilistic model, calculating the posterior probability that each time point is a change point), etc., which are not limited here.
[0059] Based on the changing points representing days in each quarter, a dynamic allocation cycle for core resources is generated for each quarter. The m-th quarter has a total of [number] representative days. The core resource dynamic allocation cycle for the m-th quarter is [number]. In this application, core resources are not dynamically allocated within each period; the dynamic allocation of core resources occurs at the end of each period.
[0060] Therefore, in response to a service request from a power grid edge terminal, the method of this application further includes: determining, among the sub-time periods of a preset historical time period, the sub-time period corresponding to the current unit monitoring cycle as the target sub-time period; and dividing the current unit monitoring cycle into multiple core resource dynamic allocation cycles based on the core resource dynamic allocation cycle division strategy corresponding to the target sub-time period. For example, if the day the service request is received is within the first quarter, then the day is divided into multiple core resource dynamic allocation cycles using the core resource dynamic allocation cycle division strategy corresponding to Q1.
[0061] In this application, when the time for dynamic allocation of core resources is reached, core resources are dynamically allocated according to the dynamic allocation cycle. Specifically, in step S300, the proportion of the first resource demand for different real-time type services in the resource registration queue corresponding to different real-time type services within the next dynamic allocation cycle of core resources is determined, including: S340. Identify the services in the high-real-time resource registration queue whose expected arrival time falls within the next core resource dynamic allocation cycle, and calculate the first peak resource demand of the high-real-time services at each sampling moment within the next core resource dynamic allocation cycle. For example, if the services in the current high-real-time resource registration queue whose expected arrival time falls within the next core resource dynamic allocation cycle include services A1, A2, A3, and A4, then calculate the peak resource demand for each hour based on the execution status of services A1, A2, A3, and A4 within each hour.
[0062] Peak resource demand refers to the maximum value of the average computing load of a service within a certain time period. This peak demand is calculated by assigning a weighted average of the computing loads of all services to the average computing load of each service, with each service's weight being its trigger confidence level. This time period can be one hour or set according to demand. For example, if services A1 and A2 execute simultaneously within a certain hour, the peak resource demand for that hour is obtained by weighting the computing loads of services A1 and A2 according to their trigger confidence levels.
[0063] S350 Similarly, identify the services in the weak real-time resource registration queue whose expected arrival time is within the next core resource dynamic allocation cycle, and count the second peak resource demand of weak real-time services at each sampling time within the next core resource dynamic allocation cycle.
[0064] S360. Based on the ratio of the first peak resource demand to the second peak resource demand at each sampling moment within the next core resource dynamic allocation cycle, construct a vector of the first peak resource demand ratio for the next core resource dynamic allocation cycle, and use this vector as the first resource demand ratio. For example, the vector of the first peak resource demand ratio is the set of the ratios of the first peak resource demand to the second peak resource demand at each sampling moment within the next core resource dynamic allocation cycle.
[0065] In step S400, the resource allocation ratios for different real-time service types within the next core resource dynamic allocation cycle are determined based on historical resource demand ratios and the first resource demand ratio, including: S410. Determine the third peak resource demand for strong real-time services and the fourth peak resource demand for weak real-time services at each sampling moment within the next core resource dynamic allocation cycle, corresponding to the representative sequence of the target sub-period. For example, extract the peak resource demands for strong real-time services and weak real-time services for the representative day of the quarter in which the next core resource dynamic allocation cycle falls within the next core resource dynamic allocation cycle.
[0066] S420. Based on the ratio of the third peak resource demand to the fourth peak resource demand at each sampling moment in the next core resource dynamic allocation cycle, construct the second peak resource demand ratio vector for the next core resource dynamic allocation cycle.
[0067] Calculate the peak resource demand ratio between high real-time and low real-time services on a representative day of the quarter in which the next core resource dynamic allocation cycle is located. Combine the peak resource demand ratios of all hours in the next core resource dynamic allocation cycle into a vector, which is the second peak resource demand ratio vector.
[0068] S430. Determine the mean value of the ratio vector of the first peak resource demand ratio vector and the mean value of the ratio vector of the second peak resource demand ratio vector. Perform a weighted summation on the mean value of the ratio vector of the first peak resource demand ratio vector and the mean value of the ratio vector of the second peak resource demand ratio vector to obtain the resource allocation ratio of strong real-time services and weak real-time services in the next core resource dynamic allocation cycle.
[0069] The weights of the first peak resource demand ratio vector and the second peak resource demand ratio vector can be predetermined or dynamically adjusted. For example, the weight of the first peak resource demand ratio vector can be set to be greater than the weight of the second peak resource demand ratio vector, indicating that the real-time prediction results of the current registration queue are more trusted. If the weight of the first peak resource demand ratio vector is set to be less than the weight of the second peak resource demand ratio vector, it indicates that the historical data is more trusted.
[0070] Assuming that the allocatable core resources in the next cycle include all core resources in the dynamic zone, for example, if the total resources in the dynamic zone are 4 cores, and the calculated resource allocation ratio between strong real-time services and weak real-time services in the next core resource dynamic allocation cycle is 3 / 1, then in the next core resource dynamic allocation cycle, 3 cores in the dynamic zone will be allocated to strong real-time services, and 1 core in the dynamic zone will be allocated to weak real-time services.
[0071] like Figure 3 As shown, in a second aspect, this application provides a device for dynamically reserving and allocating service resources for power grid edge terminals, comprising: The service request processing module is configured to respond to service requests from the power grid edge terminal, determine at least one downlink associated service of the current service, and determine the real-time type and trigger confidence level of each downlink associated service; The resource registration module is configured to register downlink related services that meet preset conditions to the corresponding resource registration queue based on the real-time type and trigger confidence level of each downlink related service. The resource demand calculation module is configured to pre-divide each monitoring cycle into multiple core resource dynamic allocation cycles based on the historical resource demand ratios of different real-time types of services in a preset historical period of the power grid edge terminal. At the end of each core resource dynamic allocation cycle, the module determines the first resource demand ratio of different real-time types of services in the resource registration queue corresponding to different real-time types of services in the next core resource dynamic allocation cycle. The resource allocation module is configured to determine the resource allocation ratio for different real-time types of services within the next core resource dynamic allocation cycle based on the historical resource demand ratio and the first resource demand ratio, and to allocate the allocatable core resources to different real-time types of services according to the resource allocation ratio.
[0072] It is understood that those skilled in the art will clearly recognize that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0073] In a third aspect, this application provides a machine-readable storage medium storing instructions that, when executed by a processor, cause the processor to be configured to perform the above-described method for dynamic reservation and allocation of power grid edge terminal service resources.
[0074] In a fourth aspect, this application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above-described method for dynamically reserving and allocating power grid edge terminal service resources.
[0075] like Figure 4 The diagram shown is a schematic representation of a terminal device provided in an embodiment of this application. Figure 4 As shown, the terminal device 10 of this embodiment includes a processor 100, a memory 101, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, it implements the steps in the above method embodiments. Alternatively, when the processor 100 executes the computer program 102, it implements the functions of each module / unit in the above device embodiments.
[0076] For example, computer program 102 may be divided into one or more modules / units, one or more of which are stored in memory 101 and executed by processor 100 to complete this application. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 102 in terminal device 10.
[0077] Terminal device 10 may be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. Terminal device 10 may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will understand that... Figure 4 This is merely an example of terminal device 10 and does not constitute a limitation on terminal device 10. It may include more or fewer components than shown, or combine certain components, or different components. For example, terminal device may also include input / output devices, network access devices, buses, etc.
[0078] Processor 100 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0079] The memory 101 can be an internal storage unit of the terminal device 10, such as a hard disk or RAM of the terminal device 10. The memory 101 can also be an external storage device of the terminal device 10, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or FlashCard equipped on the terminal device 10. Furthermore, the memory 101 can include both internal and external storage units of the terminal device 10. The memory 101 is used to store computer programs and other programs and data required by the terminal device 10. The memory 101 can also be used to temporarily store data that has been output or will be output.
[0080] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0082] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for dynamic reservation and allocation of service resources for power grid edge terminals, characterized in that, include: In response to a service request from a power grid edge terminal, identify at least one downlink associated service of the current service, and determine the real-time type and trigger confidence level of each downlink associated service; Based on the real-time type and trigger confidence level of each downlink associated service, downlink associated services that meet the preset conditions are registered to the corresponding resource registration queue; Based on the historical resource demand ratios of different real-time types of services of the power grid edge terminal in a preset historical period, each unit monitoring cycle is divided into multiple core resource dynamic allocation cycles. At the end of each core resource dynamic allocation cycle, the first resource demand ratio of different real-time types of services in the resource registration queue corresponding to different real-time types of services in the next core resource dynamic allocation cycle is determined. Based on the historical resource demand ratio and the first resource demand ratio, the resource allocation ratio for different real-time type services in the next core resource dynamic allocation cycle is determined, and the allocatable core resources are allocated to different real-time type services according to the resource allocation ratio.
2. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 1, characterized in that, Determine the trigger confidence level for each downstream related service, including: The importance value of each downlink associated service is determined, and the posterior probability between the current service request and each downlink associated service is determined based on the historical triggering data of each downlink associated service. The posterior probability represents the triggering probability of each downlink associated service under the current service triggering condition. Determine the scaling factor, which is used to adjust the weight of the impact of the importance value of each downlink related service on the trigger confidence level; The trigger confidence level of the corresponding downlink associated service is determined by the larger of the posterior probability of each downlink associated service and the importance value adjusted by the scaling factor.
3. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 1, characterized in that, The real-time type includes strong real-time and weak real-time, and the resource registration queue includes strong real-time resource registration queue and weak real-time resource registration queue; The preset conditions include: When the trigger confidence level of the current downlink associated service is greater than a preset first trigger confidence level threshold, or the trigger confidence level of the current downlink associated service is greater than a preset second trigger confidence level threshold but less than or equal to the first trigger confidence level threshold, and the current downlink associated service is a highly real-time service: If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, no resource registration or core resource reservation will be performed. If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, the start time of the subsequent core resource dynamic allocation cycle shall be used as the estimated arrival time of the remaining services of the current downlink associated service, and the remaining services of the current downlink associated service shall be inserted into the strong real-time resource registration queue. If the estimated arrival time and estimated completion time of the current downlink related service are both within the subsequent period of the current core resource dynamic allocation cycle, insert the current downlink related service into the strong real-time resource registration queue according to its estimated arrival time. If the trigger confidence level of the current downlink related business is less than the second trigger confidence level threshold, no resource registration or core resource reservation will be performed; Wherein, the first trigger confidence threshold is greater than the second trigger confidence threshold.
4. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 3, characterized in that, The preset conditions also include: If the trigger confidence level of the current downlink associated service is greater than the first trigger confidence level threshold, and the current downlink associated service is a weakly time-sensitive service: If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, reserve the corresponding core resources for all businesses of the current downlink related business; If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, the corresponding core resources are reserved for the services that the current downlink associated service can complete within the current core resource dynamic allocation cycle, and the start time of the subsequent core resource dynamic allocation cycle is used as the estimated arrival time of the remaining services of the current downlink associated service, and the remaining services of the current downlink associated service are inserted into the weak real-time resource registration queue. If the estimated arrival time and estimated completion time of the current downlink related service are both within the subsequent period of the current core resource dynamic allocation cycle, then insert the current downlink related service into the weak real-time resource registration queue according to its estimated arrival time.
5. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 3, characterized in that, The preset conditions also include: If the trigger confidence level of the current downlink associated service is greater than the second trigger confidence level threshold and less than or equal to the first trigger confidence level threshold, and the current downlink associated service is a weakly time-sensitive service: If the estimated arrival time and estimated completion time of the current downlink related business are both within the current core resource dynamic allocation cycle, no resource registration or core resource reservation will be performed. If the estimated arrival time of the current downlink associated service is within the current core resource dynamic allocation cycle, and its estimated completion time is within the subsequent core resource dynamic allocation cycle, the start time of the subsequent core resource dynamic allocation cycle shall be used as the estimated arrival time of the remaining services of the current downlink associated service, and the remaining services of the current downlink associated service shall be inserted into the weak real-time resource registration queue. If the estimated arrival time and estimated completion time of the current downlink related service are both within the subsequent period of the current core resource dynamic allocation cycle, then insert the current downlink related service into the weak real-time resource registration queue according to its estimated arrival time.
6. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 3, characterized in that, Based on the historical resource demand ratios of different real-time service types within a preset historical time period of the power grid edge terminal, each monitoring cycle is divided into multiple core resource dynamic allocation cycles, including: Within the preset historical time period, the historical resource demand ratio of strong real-time services and weak real-time services corresponding to each sampling moment in each unit monitoring cycle is obtained, thus obtaining the historical resource demand ratio sequence for each unit monitoring cycle. The preset historical time period is divided into multiple sub-time periods, each sub-time period includes multiple unit monitoring cycles. The historical resource demand ratio sequence corresponding to all unit monitoring cycles in each sub-time period is clustered, and the historical resource demand ratio sequence corresponding to the cluster center is used as the representative sequence of the corresponding sub-time period. Based on the historical resource demand ratio at each sampling time in each representative sequence, change points are detected in the representative sequences of each sub-period to determine at least one change point in each representative sequence. Based on the sampling time corresponding to the change point of each representative sequence, the unit monitoring period corresponding to each representative sequence is divided into multiple core resource dynamic allocation periods, thus obtaining the core resource dynamic allocation period division strategy for each sub-period.
7. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 6, characterized in that, Clustering is performed on the historical resource demand ratio sequences corresponding to all monitoring periods within each sub-period, including: Based on the K-center point algorithm, the historical resource demand ratio sequences corresponding to all unit monitoring cycles in each sub-period are clustered, and the dynamic time warping distance between each historical resource demand ratio sequence and every other historical resource demand ratio sequence is calculated by the dynamic time warping algorithm. Calculate the sum of the dynamic time-warped distances of each historical resource demand ratio sequence, and determine the historical resource demand ratio sequence with the smallest sum of dynamic time-warped distances as the historical resource demand ratio sequence corresponding to the cluster center.
8. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 6, characterized in that, After responding to a service request from a power grid edge terminal, the method further includes: Among the sub-time periods of the preset historical time period, the sub-time period corresponding to the current unit monitoring cycle is determined as the target sub-time period; Based on the core resource dynamic allocation cycle division strategy corresponding to the target sub-period, the current unit monitoring cycle is divided into multiple core resource dynamic allocation cycles.
9. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 8, characterized in that, Determine the proportion of the first resource demand for different real-time service types in the resource registration queue within the next core resource dynamic allocation cycle, including: Identify the services in the high real-time resource registration queue whose expected arrival time is within the next core resource dynamic allocation cycle, and count the first peak resource demand of the high real-time services at each sampling time within the next core resource dynamic allocation cycle. Identify the services in the weak real-time resource registration queue whose expected arrival time is within the next core resource dynamic allocation cycle, and count the second peak resource demand of the weak real-time services at each sampling time within the next core resource dynamic allocation cycle. Based on the ratio of the first peak resource demand and the second peak resource demand at each sampling moment within the next core resource dynamic allocation cycle, a vector of the first peak resource demand ratio for the next core resource dynamic allocation cycle is constructed, and the vector of the first peak resource demand ratio is used as the first resource demand ratio.
10. The method for dynamic reservation and allocation of power grid edge terminal service resources according to claim 9, characterized in that, Based on the historical resource demand ratio and the first resource demand ratio, the resource allocation ratio for different real-time service types within the next core resource dynamic allocation cycle is determined, including: Determine the third peak resource requirement for strong real-time services and the fourth peak resource requirement for weak real-time services at each sampling moment in the next core resource dynamic allocation cycle corresponding to the representative sequence of the target sub-period. Based on the ratio of the third peak resource demand to the fourth peak resource demand at each sampling moment in the next core resource dynamic allocation cycle, construct the second peak resource demand ratio vector for the next core resource dynamic allocation cycle. Determine the mean value of the ratio vector of the first peak resource demand ratio vector and the mean value of the ratio vector of the second peak resource demand ratio vector. Then, perform a weighted summation on the mean value of the ratio vector of the first peak resource demand ratio vector and the mean value of the ratio vector of the second peak resource demand ratio vector to obtain the resource allocation ratio of strong real-time services and weak real-time services in the next core resource dynamic allocation cycle.
11. A device for dynamically reserving and allocating service resources for power grid edge terminals, characterized in that, include: The service request processing module is configured to respond to service requests from the power grid edge terminal, determine at least one downlink associated service of the current service, and determine the real-time type and trigger confidence level of each downlink associated service; The resource registration module is configured to register downlink related services that meet preset conditions to the corresponding resource registration queue based on the real-time type and trigger confidence level of each downlink related service. The resource demand calculation module is configured to divide each monitoring cycle into multiple core resource dynamic allocation cycles based on the historical resource demand ratio of different real-time type services of the power grid edge terminal in a preset historical period. At the end of each core resource dynamic allocation cycle, the first resource demand ratio of different real-time type services in the resource registration queue corresponding to different real-time type services in the next core resource dynamic allocation cycle is determined. The resource allocation module is configured to determine the resource allocation ratio for different real-time type services in the next core resource dynamic allocation cycle based on the historical resource demand ratio and the first resource demand ratio, and to allocate the allocatable core resources to different real-time type services according to the resource allocation ratio.
12. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by the processor, this instruction causes the processor to be configured to perform the method for dynamic reservation and allocation of power grid edge terminal service resources as described in any one of claims 1-10.
13. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for dynamic reservation and allocation of power grid edge terminal service resources as described in any one of claims 1-10.
Citation Information
Patent Citations
Edge computing terminal resource scheduling method and device
CN112491742A
Edge-end cooperative computing power distribution method, device, equipment, medium and program product
CN119854300A
Dynamic configuration computing resource management method and system based on power wireless terminal
CN120602992A
Power equipment edge gateway computing power dynamic distribution method
CN120670135A
Power communication resource dynamic allocation method
CN121509360A