Distribution communication network resource allocation method and device
By classifying power distribution communication network services into command and control and data processing categories, and by employing preemptive priority scheduling and weighted round-robin methods to allocate resources, the problem of unreasonable resource allocation in existing technologies has been solved, achieving priority resource allocation for critical services and improving resource utilization.
Patent Information
- Application Number
- CN202511814584.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-02-24
AI Technical Summary
The existing power distribution communication network resource allocation scheme fails to effectively differentiate between service types, resulting in non-critical tasks with high resource requirements occupying critical resources, lacking a reservation mechanism for critical services, and having unreasonable resource allocation, which affects resource utilization.
Newly connected services are categorized into command and control services and data processing services. Command and control services are assigned to the core assurance layer and allocated resources using a preemptive priority scheduling method, while data processing services are assigned to the data support layer and allocated resources using a weighted round-robin method. This ensures that command and control services have a higher priority than data processing services, thereby enabling dynamic resource scheduling.
It has improved the rational allocation of power distribution communication network resources, ensured the priority allocation of resources for key services, and improved resource utilization.
Smart Images

Figure CN121567660A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network resource allocation technology, and in particular to a method and apparatus for allocating resources in a power distribution communication network. Background Technology
[0002] In the process of increasingly intelligent and modern power systems, distribution communication networks play a crucial role, acting as a central nervous system. They must simultaneously support various services with different real-time and reliability requirements, and their operational stability and efficiency directly affect whether the entire distribution network can safely and reliably supply power to users. With the development of smart grids, the quality of communication network resource allocation and scheduling is a critical factor directly determining whether the distribution communication network can provide safe, stable, and continuous power supply. Faced with the differentiated service demands of distribution communication networks, existing resource allocation schemes include: 1) Using static parameter-driven technology, which pre-divides network resources into fixed bandwidths and time slots according to service types through a static partitioning scheme, completing a one-time differentiated resource allocation at the moment of service access or failure. 2) Using network virtualization technology, employing a two-layer algorithm of primary link optimization and secondary link resource sharing during the virtual network mapping phase, simultaneously considering network real-time reliability and static service priority during the virtual network mapping phase.
[0003] However, the current resource allocation scheme has the following drawbacks: 1. The method of grading services solely based on priority, without classifying services, can lead to non-critical tasks with high resource requirements preempting critical resources. 2. The lack of a mechanism to reserve dedicated resources for critical services can result in delays for critical services during network congestion. 3. The use of a "one-time" approach to calculate the required resource allocation leads to a lag in resource status awareness, making it impossible to dynamically adjust bandwidth and time slots based on real-time network load and service arrival rates. Therefore, current power distribution communication networks are prone to unreasonable resource allocation, affecting the improvement of resource utilization. Summary of the Invention
[0004] This invention provides a method and apparatus for allocating resources in a power distribution communication network, which can solve the problem of low data utilization in existing power distribution communication networks.
[0005] To address the aforementioned technical problems, this invention provides a method for allocating resources in a power distribution communication network, comprising:
[0006] Obtain the business content and target resource requirements of the newly accessed service;
[0007] The service type of the newly accessed service is determined based on the service content; wherein, the service type includes command control type and data processing type; the priority of command control type services is higher than that of data processing type services;
[0008] When the service type of the newly accessed service is command and control type, the newly accessed service is assigned to the core protection layer of the power distribution communication network, and network resources are allocated to the newly accessed service according to the target resource requirements using a preemptive priority scheduling method.
[0009] When the new access service is a data processing service, the new access service is assigned to the data support layer of the power distribution communication network, and a weighted round-robin method is used to allocate network resources to the new access service according to the target resource requirements.
[0010] As a preferred embodiment, when the service type of the newly accessed service is command and control type, the newly accessed service is assigned to the core protection layer of the power distribution communication network, and network resources are allocated to the newly accessed service according to the target resource requirements using a preemptive priority scheduling method, including:
[0011] When the service type of the newly accessed service is command and control type, the target resource requirements are compared with the first remaining resources of the core protection layer of the power distribution communication network; wherein, the target resource requirements include bandwidth requirements and time slot requirements;
[0012] When it is determined that the first remaining resources do not meet the target resource requirements, scheduling resources are obtained from the data support layer of the power distribution communication network, and task resources are allocated to the new access service according to the scheduling resources and the first remaining resources.
[0013] Based on the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network, the task node of the new access service is determined.
[0014] The task resources and the task nodes are identified as the network resources for the new access service.
[0015] As a preferred embodiment, determining the task node for the new access service based on the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network includes:
[0016] The real-time operating status of each node in the power distribution communication network is detected, and the real-time operating status data of each node is obtained; wherein, the real-time operating status data includes bandwidth utilization, time slot occupancy, CPU utilization, and memory utilization.
[0017] Nodes whose real-time operating status data meets the target resource requirements are identified as candidate nodes;
[0018] Calculate the instruction waiting time for each candidate node based on its historical operation data.
[0019] The candidate node with the shortest instruction waiting time is determined as the task node for the newly accessed service.
[0020] As a preferred embodiment, the calculation of the instruction waiting time for each candidate node based on the historical operating data of each candidate node includes:
[0021] For each candidate node, obtain the historical operation data of the candidate node; wherein, the historical operation data includes short task arrival rate, node short task utilization rate, expected value of average service time of long tasks, expected value of squared service time of short tasks, long task arrival rate, expected value of squared service time of long tasks, total node utilization rate and total task arrival rate.
[0022] Based on the short task arrival rate and the node short task utilization rate, calculate the short task waiting time of the candidate node;
[0023] Based on the short task arrival rate, the node short task utilization rate, the expected average service time of the long task, the expected squared service time of the short task, the long task arrival rate, the expected squared service time of the long task, and the total node utilization rate, calculate the long task waiting time of the candidate node.
[0024] Based on the short task arrival rate, the long task arrival rate, the total node utilization rate, the short task waiting time, and the long task waiting time, the instruction waiting time corresponding to the candidate node is calculated.
[0025] As a preferred option, it also includes:
[0026] When there are no nodes whose real-time operating status data meets the target resource requirements, the resources required for the business are determined according to the target resource requirements;
[0027] For each node, the real-time load data of the node is determined based on the bandwidth utilization, CPU utilization, and memory utilization in the real-time operating status data of the node.
[0028] Based on the real-time load data and the preset total available resources of the node, calculate the resources already occupied by the node;
[0029] Calculate the remaining reusable resources of the node based on the preset total available resources and the occupied resources;
[0030] Based on the remaining reusable resources, the resources required by the service, and the preset unit resource cost, calculate the corresponding service cost of the node;
[0031] The node with the lowest business cost is selected as the task node for the newly accessed business.
[0032] As a preferred embodiment, after determining the task node for the newly accessed service, the method further includes:
[0033] Detect the load status of all nodes in the power distribution communication network and determine whether the task node is in an overload state;
[0034] When it is determined that the task node is in an overloaded state, the task node is removed from the power distribution communication network, and a new task node for the new access service is selected in the power distribution communication network.
[0035] As a preferred embodiment, when the service type of the newly accessed service is a data processing service, the newly accessed service is assigned to the data support layer of the power distribution communication network, and network resources are allocated to the newly accessed service according to the target resource requirements using a weighted round-robin method, including:
[0036] When the service type of the newly accessed service is data processing, the priority level of each node is determined according to the node resource data of each node and the target resource requirements; wherein, the node resource data includes configuration attribute data and real-time running status data;
[0037] Nodes of the same priority level are grouped together to form several node groups;
[0038] Based on the priority from high to low, traverse each of the node groups in turn to determine the task node for the newly accessed service;
[0039] Based on the target resource requirements, determine the task resources for the newly accessed service;
[0040] The task node and the task resource are identified as the network resources for the new access service.
[0041] As a preferred embodiment, determining the priority level of each node based on its node resource data and the target resource requirements includes:
[0042] The configuration attribute data in the node resource data of each node is compared with the target resource requirements to determine the degree of configuration matching of each node;
[0043] Based on the real-time operating status data in the node resource data of each node, the operation and maintenance status of each node is calculated; wherein, the operation and maintenance status includes healthy, slightly overloaded, severely overloaded, and faulty.
[0044] The priority level of each node is determined based on the configuration matching degree and operation and maintenance status of each node.
[0045] Accordingly, the present invention provides a power distribution communication network resource allocation device, comprising: a service data acquisition module, a service classification module, a first resource allocation module, and a second resource allocation module;
[0046] The business data acquisition module is used to acquire the business content and target resource requirements of newly accessed services;
[0047] The service classification module is used to determine the service type of the newly accessed service based on the service content; wherein, the service type includes command control type and data processing type; the command control type service has a higher priority than the data processing type service;
[0048] The first resource allocation module is used to allocate the new access service to the core protection layer of the power distribution communication network when the service type of the new access service is command and control type, and to allocate network resources to the new access service according to the target resource requirements using a preemptive priority scheduling method.
[0049] The second resource allocation module is used to allocate the new access service to the data support layer of the power distribution communication network when the service type of the new access service is a data processing service, and to allocate network resources to the new access service according to the target resource requirements using a weighted round-robin method.
[0050] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0051] This invention provides a method for allocating resources in a power distribution communication network. The method involves obtaining the service content and target resource requirements of a newly accessed service; determining the service type of the new access service based on the service content; when the service type is command and control, allocating the new access service to the core protection layer of the power distribution communication network, and using a preemptive priority scheduling method to allocate network resources to the new access service according to the target resource requirements; when the service type is data processing, allocating the new access service to the data support layer of the power distribution communication network, and using a weighted round-robin method to allocate network resources to the new access service according to the target resource requirements. This invention classifies new access services in the power distribution communication network into command and control and data processing types. Command and control services are allocated to the core protection layer for resource allocation, while data processing services are allocated to the data support layer. The method prioritizes command and control services over data processing services and uses a preemptive priority scheduling method to allocate resources to command and control services in the core protection layer, ensuring priority resource allocation for command and control services. This achieves a reasonable allocation of power distribution communication network resources, thereby improving resource utilization. Attached Figure Description
[0052] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0053] Figure 1 A flowchart illustrating an embodiment of the power distribution communication network resource allocation method provided by the present invention;
[0054] Figure 2 A flowchart illustrating an embodiment of the task node determination method provided by the present invention;
[0055] Figure 3 A flowchart illustrating an embodiment of the data support layer business processing method provided by the present invention;
[0056] Figure 4 This is a schematic diagram of one embodiment of the power distribution communication network resource allocation device provided by the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0059] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0060] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0061] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0062] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0063] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0064] See Figure 1 To address the problem of low data transmission efficiency in existing power distribution communication networks, an embodiment of the present invention provides a method for allocating resources in a power distribution communication network. This method includes steps 101 to 104, each step of which is detailed below:
[0065] Step 101: Obtain the service content and target resource requirements of the new access service.
[0066] In this embodiment of the invention, when a new access service exists in the power distribution communication network, the service content and target resource requirements of the new access service are obtained. The service content is used to determine the service type of the new access service so that it can be allocated to the corresponding processing layer. The target resource requirements include the resource requirements needed by the new access service and are used to match the corresponding task node among multiple nodes in the power distribution communication network. Specifically, the target resource requirements include parameters such as network bandwidth (kbps / Mbps), end-to-end latency limit (ms), jitter limit (ms), packet loss rate limit (%), and computing resource quotas such as CPU / memory / FPGA accelerator cards.
[0067] Step 102: Determine the service type of the newly accessed service based on the service content; wherein, the service type includes command control type and data processing type; the command control type service has a higher priority than the data processing type service.
[0068] In this embodiment of the invention, the service type of a newly accessed service can be determined based on its content. Service types include two categories: command and control and data processing. Command and control services include real-time protection and control command transmission for the distribution network, such as rapid fault clearing, reclosing control, and distributed power source access control. Command and control services have strict real-time and reliability requirements (e.g., end-to-end network latency ≤10ms, packet loss rate close to 0%, zero data transmission errors, etc.) and their traffic characteristics are small data volumes that directly affect the stability of the communication network. Data processing services include collecting and uploading distribution network operating status data, such as collecting electrical quantities like voltage, current, and power, as well as equipment status monitoring information like switch status and transformer oil temperature. Data processing services have more flexible real-time and reliability requirements (e.g., end-to-end network latency ≤50ms, packet loss rate <0.1%, relatively complete and timely data transmission, etc.) and their traffic characteristics are large data volumes and obvious periodicity.
[0069] Existing technologies only categorize services by priority, failing to differentiate between real-time and critical needs. Furthermore, priority adjustments rely on manual configuration or static rules, lacking the ability to adaptively upgrade the priority of critical services. When facing real-time operating conditions in power distribution communication networks (such as faults, load surges, and market clearing), high-priority but non-critical tasks may preempt critical resources. This invention, based on real-time data from newly accessed services, categorizes them into command and control services (critical tasks) and data processing services (non-critical tasks), thus refining the granularity of service classification.
[0070] Step 103: When the service type of the new access service is command and control type, the new access service is assigned to the core protection layer of the power distribution communication network, and network resources are allocated to the new access service according to the target resource requirements using a preemptive priority scheduling method.
[0071] As a preferred embodiment, when the service type of the newly accessed service is command and control type, the newly accessed service is assigned to the core protection layer of the power distribution communication network, and a preemptive priority scheduling method is used to allocate network resources to the newly accessed service according to the target resource requirements, including:
[0072] When the service type of the newly accessed service is command and control type, the target resource requirements are compared with the first remaining resources of the core protection layer of the power distribution communication network; wherein, the target resource requirements include bandwidth requirements and time slot requirements;
[0073] When it is determined that the first remaining resources do not meet the target resource requirements, scheduling resources are obtained from the data support layer of the power distribution communication network, and task resources are allocated to the new access service according to the scheduling resources and the first remaining resources.
[0074] Based on the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network, the task node of the new access service is determined.
[0075] The task resources and the task nodes are identified as the network resources for the new access service.
[0076] In this embodiment of the invention, the power distribution communication network is divided into two processing layers: a core protection layer and a data support layer. The core protection layer handles command and control services, while the data support layer handles data processing services. For the core protection layer, two scheduling strategies exist: resource reservation and transmission isolation. Resource reservation refers to pre-allocating a predetermined amount of bandwidth from the total network bandwidth as dedicated bandwidth for the core protection layer; this predetermined bandwidth can be 40%–50%. The core protection layer is also allocated the highest quality time slots to avoid interference from other services. Transmission isolation refers to establishing independent, physically / logically isolated transmission paths through dedicated lines or VPN technology to ensure the independence and reliability of the core protection layer's transmission path.
[0077] Existing technologies lack mechanisms for reserving dedicated resources for critical services, which can lead to delays in critical services during network congestion. While conservative allocation ensures real-time performance, it wastes bandwidth; reducing allocation may trigger timeouts, easily causing resource conflicts and resulting in a dilemma of "high latency and high waste." This invention pre-allocates a preset amount of bandwidth to the core protection layer of processing command control services, effectively preventing non-critical tasks from preempting critical resources.
[0078] In this embodiment of the invention, when a new access service is determined to be a command and control type service, the target resource requirements of the new access service are compared with the first remaining resources of the core protection layer of the power distribution communication network to determine whether the remaining resources in the core protection layer can support the operation of the new access service. The compared resources include bandwidth and requirements; based on the bandwidth and time slot requirements of the new access service, it is determined whether the first remaining resources of the core protection layer can meet the resource requirements of the new access service.
[0079] In this embodiment of the invention, when the first remaining resources of the core protection layer meet the target resource requirements of the new access service, the task resources are directly allocated to the new access service based on the first remaining resources.
[0080] In this embodiment of the invention, when the first remaining resources of the core protection layer do not meet the target resource requirements of the new access service, a preemptive priority scheduling algorithm is triggered to drive the core protection layer to forcibly reclaim bandwidth and time slots from the data support layer and obtain scheduling resources to ensure the normal operation of the new access service.
[0081] Existing technologies generally use a "one-time" approach to calculate the required resource allocation, resulting in a lag in resource status perception and an inability to dynamically adjust bandwidth and time slots based on real-time network load and service arrival rates. This invention, after pre-allocating a preset bandwidth amount for the core protection layer handling command and control services, also allocates sufficient resources for newly accessed services belonging to the command and control category to ensure the operation of control services. This achieves real-time resource scheduling and improves resource utilization.
[0082] As a preferred embodiment, when it is determined that the first remaining resources do not meet the target resource requirements, the scheduling resources are obtained from the data support layer of the power distribution communication network, including:
[0083] Calculate the resource gap based on the target resource requirements and the first remaining resources of the core security layer;
[0084] The resource gap is compared with the second remaining resources of the data support layer of the power distribution communication network;
[0085] When the second remaining resource is greater than or equal to the resource shortage, scheduling resources are generated based on the second remaining resource.
[0086] When the second remaining resource is less than the resource gap, the data support layer identifies the data processing service with the lowest task priority running on the network, and generates scheduling resources based on the allocated resources of the data processing service running on the network and the second remaining resource.
[0087] In this embodiment of the invention, scheduling resources are obtained from the data support layer of the power distribution communication network. Specifically, the difference between the target resource requirements and the first remaining resources of the core guarantee layer is calculated to determine the resource gap required to run the new access service. This resource gap is then compared with the second remaining resources of the data support layer to determine whether the remaining resources in the data support layer can meet the resource gap. If they can, scheduling resources are obtained from the second remaining resources of the data support layer; otherwise, the on-network data processing services in the data support layer are forcibly stopped to allocate sufficient resources to form scheduling resources. The on-network data processing services in the data support layer are all data processing services, and each has a corresponding task priority set in the data support layer. When the second remaining resources are insufficient to generate scheduling resources, the on-network data processing service with the lowest task priority is stopped first, and scheduling resources are generated based on the allocated resources of these stopped services and the second remaining resources.
[0088] In this embodiment of the invention, the task priority of the data processing service running on the network is determined by information such as the real-time requirements (e.g., relay protection instruction requirement <10ms), data packet size and period, reliability level (packet loss rate 0%, 0.1%, 1%), and security level (whether end-to-end encryption and signature are required) in the service content.
[0089] In this embodiment of the invention, after determining the task resources for the new access service, it is also necessary to allocate task nodes to the new access service. Determining task nodes requires comprehensive consideration of the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network.
[0090] As a preferred embodiment, based on the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network, the task node of the new access service is determined, including:
[0091] The real-time operating status of each node in the power distribution communication network is detected, and the real-time operating status data of each node is obtained; wherein, the real-time operating status data includes bandwidth utilization, time slot occupancy, CPU utilization, and memory utilization.
[0092] Nodes whose real-time operating status data meets the target resource requirements are identified as candidate nodes;
[0093] Calculate the instruction waiting time for each candidate node based on its historical operation data.
[0094] The candidate node with the shortest instruction waiting time is determined as the task node for the newly accessed service.
[0095] As a preferred embodiment, it also includes:
[0096] When there are no nodes whose real-time operating status data meets the target resource requirements, the resources required for the business are determined according to the target resource requirements;
[0097] For each node, the real-time load data of the node is determined based on the bandwidth utilization, CPU utilization, and memory utilization in the real-time operating status data of the node.
[0098] Based on the real-time load data and the preset total available resources of the node, calculate the resources already occupied by the node;
[0099] Calculate the remaining reusable resources of the node based on the preset total available resources and the occupied resources;
[0100] Based on the remaining reusable resources, the resources required by the service, and the preset unit resource cost, calculate the corresponding service cost of the node;
[0101] The node with the lowest business cost is selected as the task node for the newly accessed business.
[0102] In an embodiment of the present invention, see Figure 2 This is a flowchart illustrating an embodiment of the task node determination method provided by the present invention. First, the target resource requirements of the newly accessed service are determined in the task scheduling queue according to the scheduling instructions. Then, available nodes are screened in the power distribution communication network. The screening method compares the real-time operating status data of each node in the power distribution communication network with the target resource requirements of the newly accessed service, selecting nodes that meet the target resource requirements and determining them as candidate nodes, thus forming a node set V. P When the node set V P Non-empty, meaning that when candidate nodes exist, in the node set V P The node with the shortest instruction waiting time is selected as the task node. When the node set V... P If the value is empty, it means there are no candidate nodes that meet the target resource requirements. In this case, the ACC (Availability Cost Calculation) algorithm is called to calculate the total set of nodes V of the power distribution communication network. S The system calculates the service costs of each node in the distribution communication network and identifies the node with the lowest service cost as the task node. After determining the task node for the new service access, a load balancing test is performed based on the load status of all nodes in the network to determine if the task node is overloaded. If the task node is not overloaded, the current service instruction (i.e., the new service access) is assigned to that task node; if the task node is overloaded, it is removed from the network, and a new selection of available nodes is conducted to update the task node for the new service access.
[0103] As a preferred embodiment, the instruction waiting time for each candidate node is calculated based on the historical operating data of each candidate node, including:
[0104] For each candidate node, obtain the historical operation data of the candidate node; wherein, the historical operation data includes short task arrival rate, node short task utilization rate, expected value of average service time of long tasks, expected value of squared service time of short tasks, long task arrival rate, expected value of squared service time of long tasks, total node utilization rate and total task arrival rate.
[0105] Based on the short task arrival rate and the node short task utilization rate, calculate the short task waiting time of the candidate node;
[0106] Based on the short task arrival rate, the node short task utilization rate, the expected average service time of the long task, the expected squared service time of the short task, the long task arrival rate, the expected squared service time of the long task, and the total node utilization rate, calculate the long task waiting time of the candidate node.
[0107] Based on the short task arrival rate, the long task arrival rate, the total node utilization rate, the short task waiting time, and the long task waiting time, the instruction waiting time corresponding to the candidate node is calculated.
[0108] In this embodiment of the invention, after identifying multiple candidate nodes in the power distribution communication network, the instruction waiting time corresponding to each candidate node is calculated based on the historical operating data of each candidate node. Specifically, the historical operating data of each candidate node is first obtained to determine the short task arrival rate λ. s Node short task utilization rate ρ s Expected average service time E(S) for long tasks l ), Expected squared service time of short tasks Long task arrival rate λ l Expected value of the squared service time of long tasks The parameters are the total node utilization rate ρ and the total task arrival rate λ.
[0109] The following formulas are used to calculate the short task latency TW of candidate nodes. s Long task waiting time TW l :
[0110]
[0111] The short task latency TW was calculated. s Long task waiting time TW l Then, the instruction wait time TW corresponding to the candidate node is calculated according to the following formula. p :
[0112]
[0113] The instruction wait time TW corresponding to each candidate node was calculated. p Then, by comparison, the candidate node with the shortest instruction waiting time can be selected and used as the task node for the new service.
[0114] In this embodiment of the invention, the service cost for each node can be calculated based on the real-time operating status data of each node and the target resource requirements of the newly accessed service. Specifically, the service cost of a node is calculated according to the following formula:
[0115] Business cost = (Resources required for the task - Remaining reusable resources) × Preset unit resource cost
[0116] The resources required for the service are determined based on the target resource requirements of the newly accessed service, and the remaining reusable resources are calculated using the following formula:
[0117] Remaining reusable resources = Total available resources of nodes - Resources already occupied
[0118] The total available resources of a node are its inherent configuration data, and the occupied resources are calculated according to the following formula:
[0119] Used resources = Total available resources of the node × Real-time load data
[0120] Real-time load data includes bandwidth utilization, CPU utilization, or memory utilization, which can be obtained from the real-time operating status data of the nodes.
[0121] In this embodiment of the invention, after the task resources and task nodes of a new access service are determined, the new access task is run to complete the resource allocation of the power distribution communication network. For new access tasks in the core assurance layer, they are classified as short tasks or long tasks according to the allocated task nodes, and thus cached in the corresponding queue of the task node. For example, by calculating the expected response time of the new access task at the task node and comparing it with a set threshold t, tasks with a response time less than the threshold t are classified as short tasks, and vice versa. Each node in the power distribution communication network maintains two current queues: the FIFO-S queue and the PR-L queue. When the new access task is a short task, it is cached in the FIFO-S queue; when the new access task is a long task, it is cached in the PR-L queue.
[0122] Step 104: When the service type of the new access service is a data processing service, the new access service is assigned to the data support layer of the power distribution communication network, and network resources are allocated to the new access service according to the target resource requirements using a weighted round-robin method.
[0123] As a preferred embodiment, when the new access service is a data processing service, the new access service is assigned to the data support layer of the power distribution communication network, and network resources are allocated to the new access service according to the target resource requirements using a weighted round-robin method, including:
[0124] When the service type of the newly accessed service is data processing, the priority level of each node is determined according to the node resource data of each node and the target resource requirements; wherein, the node resource data includes configuration attribute data and real-time running status data;
[0125] Nodes of the same priority level are grouped together to form several node groups;
[0126] Based on the priority from high to low, traverse each of the node groups in turn to determine the task node for the newly accessed service;
[0127] Based on the target resource requirements, determine the task resources for the newly accessed service;
[0128] The task node and the task resource are identified as the network resources for the new access service.
[0129] In this embodiment of the invention, when a newly accessed service is determined to be a data processing service, it is assigned to the data support layer for processing. The data support layer has a priority after the core assurance layer. Only after the resource requirements of each instruction control service in the core assurance layer are fully met are the remaining bandwidth and time slot resources allocated to the data support layer to run the data processing service. By setting up a core assurance layer and a data support layer, this invention divides communication services into instruction control and data processing services, controlling the core assurance layer to process instruction control services and the data support layer to process data processing services. This ensures that the higher-priority instruction control services have absolute priority and sufficient resources, while also ensuring that data processing services receive stable and predictable network resources.
[0130] In this embodiment of the invention, when it is determined that the service type of the new access service is data processing, the priority level of each node in the power distribution communication network for the new access service is determined, thereby classifying all nodes into multiple node groups with different priority levels, and prioritizing the determination of the task node for the new access service in the node group with the highest priority level, and then running the new access service under that task node.
[0131] As a preferred embodiment, the priority level of each node is determined based on the node resource data of each node and the target resource requirements, including:
[0132] The configuration attribute data in the node resource data of each node is compared with the target resource requirements to determine the degree of configuration matching of each node;
[0133] Based on the real-time operating status data in the node resource data of each node, the operation and maintenance status of each node is calculated; wherein, the operation and maintenance status includes healthy, slightly overloaded, severely overloaded, and faulty.
[0134] The priority level of each node is determined based on the configuration matching degree and operation and maintenance status of each node.
[0135] In this embodiment of the invention, the priority level of each node is determined based on its node resource data and the target resource requirements of the newly accessed service. Specifically, the configuration attribute data of each node is compared with the target resource requirements of the newly accessed service to determine the configuration matching degree of each node; wherein, the configuration matching degree includes high configuration, normal configuration, and low configuration; then, the operation and maintenance status of each node is determined based on its real-time operating status data. Taking into account both the configuration matching degree and the operation and maintenance status of the nodes, the priority level of each node is determined.
[0136] In this embodiment of the invention, each node can be divided into several node groups based on its configuration matching degree and operation and maintenance status. For example, when a node has a high configuration and is healthy, it is assigned to the first node group with the highest priority; when a node has a normal configuration and is healthy, it is assigned to the second node group with the next lower priority; when a node has a low configuration matching degree or its operation and maintenance status is slightly overloaded, it is assigned to the third node group; and when a node's operation and maintenance status is severely overloaded or faulty, it is assigned to the fourth node group.
[0137] See Figure 3 This is a flowchart illustrating an embodiment of the data support layer service processing method provided by the present invention. The data support layer utilizes a weighted round-robin algorithm for resource scheduling. Specifically: upon receiving a new access service belonging to the data processing category, all nodes in the power distribution communication network are first divided into multiple node groups to determine the highest priority node group. The weighted round-robin algorithm is then used for initialization, allocating the request for the new access service, calculating the weight of each node, selecting the optimal node, and determining whether the optimal node is connected. If so, the optimal request is used to process the current new access service; otherwise, the optimal node is down. Then, it is determined whether all other nodes in the current highest priority node group are down. If not, a new optimal node is selected from the current highest priority node group. If all nodes in the current highest priority node group are down, the new access service is transferred to the next priority node group, and a new optimal node is selected to run the new access service on that optimal node.
[0138] Within each priority group, requests are allocated using a weighted round-robin method. A pointer or counter is maintained to record the node position of the last allocated request; when allocating a request again, the next node is selected based on the weights. If all nodes in a priority group are unable to handle the request (e.g., all are overloaded), the request is transferred to the next priority group (if one exists).
[0139] Furthermore, the weighted round-robin algorithm includes three types of weights: Weight, EffectiveWeight, and CurrentWeight. Weight represents the node's weight; EffectiveWeight represents the node's effective weight. In the initial state of the algorithm, EffectiveWeight equals Weight. If a node malfunctions, its EffectiveWeight is decremented by 1. If the node is successfully selected again, EffectiveWeight is incremented by 1 until it returns to Weight. CurrentWeight represents the node's current weight, which is 0 in the initial state of the algorithm. When selecting a node, the weighted round-robin algorithm first polls all nodes, adding EffectiveWeight to their CurrentWeight. The node with the largest EffectiveWeight is selected, and the total EffectiveWeight of all nodes is accumulated as the node's weight, denoted as TotalWeight. The selected node's CurrentWeight is subtracted from TotalWeight.
[0140] In this algorithm, Nginx defines two event states: NGX_OK and NGX_BUSY. NGX_OK indicates that the optimal node has been selected, while NGX_BUSY indicates that the selection failed or communication with the node is abnormal. Backup nodes can be configured in the configuration file; when all nodes in the cluster fail, requests can be distributed to the backup nodes.
[0141] Implementing the above embodiments has the following effects:
[0142] This invention provides a method for allocating resources in a power distribution communication network. The method involves obtaining the service content and target resource requirements of a newly accessed service; determining the service type of the new access service based on the service content; when the service type is command and control, allocating the new access service to the core protection layer of the power distribution communication network, and using a preemptive priority scheduling method to allocate network resources to the new access service according to the target resource requirements; when the service type is data processing, allocating the new access service to the data support layer of the power distribution communication network, and using a weighted round-robin method to allocate network resources to the new access service according to the target resource requirements. This invention classifies new access services in the power distribution communication network into command and control and data processing types. Command and control services are allocated to the core protection layer for resource allocation, while data processing services are allocated to the data support layer. The method prioritizes command and control services over data processing services and uses a preemptive priority scheduling method to allocate resources to command and control services in the core protection layer, ensuring priority resource allocation for command and control services. This achieves a reasonable allocation of power distribution communication network resources, thereby improving resource utilization.
[0143] like Figure 4 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided;
[0144] One embodiment of the present invention provides a power distribution communication network resource allocation device, including: a service data acquisition module, a service classification module, a first resource allocation module, and a second resource allocation module;
[0145] The business data acquisition module is used to acquire the business content and target resource requirements of newly accessed services;
[0146] The service classification module is used to determine the service type of the newly accessed service based on the service content; wherein, the service type includes command control type and data processing type; the command control type service has a higher priority than the data processing type service;
[0147] The first resource allocation module is used to allocate the new access service to the core protection layer of the power distribution communication network when the service type of the new access service is command and control type, and to allocate network resources to the new access service according to the target resource requirements using a preemptive priority scheduling method.
[0148] The second resource allocation module is used to allocate the new access service to the data support layer of the power distribution communication network when the service type of the new access service is a data processing service, and to allocate network resources to the new access service according to the target resource requirements using a weighted round-robin method.
[0149] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement the power distribution communication network resource allocation method provided by any of the above-described method embodiments of the present invention.
[0150] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0151] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for allocating resources in a power distribution communication network, characterized in that, include: Obtain the business content and target resource requirements of the newly accessed service; The service type of the newly accessed service is determined based on the service content; wherein, the service type includes command control type and data processing type; the priority of command control type services is higher than that of data processing type services; When the service type of the newly accessed service is command and control type, the newly accessed service is assigned to the core protection layer of the power distribution communication network, and network resources are allocated to the newly accessed service according to the target resource requirements using a preemptive priority scheduling method. When the new access service is a data processing service, the new access service is assigned to the data support layer of the power distribution communication network, and a weighted round-robin method is used to allocate network resources to the new access service according to the target resource requirements.
2. The power distribution communication network resource allocation method according to claim 1, characterized in that, When the service type of the newly accessed service is command and control type, the new accessed service is assigned to the core protection layer of the power distribution communication network, and network resources are allocated to the new accessed service according to the target resource requirements using a preemptive priority scheduling method, including: When the service type of the newly accessed service is command and control type, the target resource requirements are compared with the first remaining resources of the core protection layer of the power distribution communication network; wherein, the target resource requirements include bandwidth requirements and time slot requirements; When it is determined that the first remaining resources do not meet the target resource requirements, scheduling resources are obtained from the data support layer of the power distribution communication network, and task resources are allocated to the new access service according to the scheduling resources and the first remaining resources. Based on the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network, the task node of the new access service is determined. The task resources and the task nodes are identified as the network resources for the new access service.
3. The power distribution communication network resource allocation method according to claim 2, characterized in that, When it is determined that the first remaining resource does not meet the target resource requirement, the step of obtaining scheduling resources in the data support layer of the power distribution communication network includes: Calculate the resource gap based on the target resource requirements and the first remaining resources of the core security layer; The resource gap is compared with the second remaining resources of the data support layer of the power distribution communication network; When the second remaining resource is greater than or equal to the resource shortage, scheduling resources are generated based on the second remaining resource. When the second remaining resource is less than the resource gap, the data support layer identifies the data processing service with the lowest task priority running on the network, and generates scheduling resources based on the allocated resources of the data processing service running on the network and the second remaining resource.
4. The power distribution communication network resource allocation method according to claim 3, characterized in that, The process of determining the task node for the new access service based on the target resource requirements of the new access service and the real-time operating status of each node in the power distribution communication network includes: The real-time operating status of each node in the power distribution communication network is detected, and the real-time operating status data of each node is obtained; wherein, the real-time operating status data includes bandwidth utilization, time slot occupancy, CPU utilization, and memory utilization. Nodes whose real-time operating status data meets the target resource requirements are identified as candidate nodes; Calculate the instruction waiting time for each candidate node based on its historical operation data. The candidate node with the shortest instruction waiting time is determined as the task node for the newly accessed service.
5. The power distribution communication network resource allocation method according to claim 4, characterized in that, The calculation of the instruction waiting time for each candidate node based on its historical operating data includes: For each candidate node, obtain the historical operation data of the candidate node; wherein, the historical operation data includes short task arrival rate, node short task utilization rate, expected value of average service time of long tasks, expected value of squared service time of short tasks, long task arrival rate, expected value of squared service time of long tasks, total node utilization rate and total task arrival rate. Based on the short task arrival rate and the node short task utilization rate, calculate the short task waiting time of the candidate node; Based on the short task arrival rate, the node short task utilization rate, the expected average service time of the long task, the expected squared service time of the short task, the long task arrival rate, the expected squared service time of the long task, and the total node utilization rate, calculate the long task waiting time of the candidate node. Based on the short task arrival rate, the long task arrival rate, the total node utilization rate, the short task waiting time, and the long task waiting time, the instruction waiting time corresponding to the candidate node is calculated.
6. The power distribution communication network resource allocation method according to claim 5, characterized in that, Also includes: When there are no nodes whose real-time operating status data meets the target resource requirements, the resources required for the business are determined according to the target resource requirements; For each node, the real-time load data of the node is determined based on the bandwidth utilization, CPU utilization, and memory utilization in the real-time operating status data of the node. Based on the real-time load data and the preset total available resources of the node, calculate the resources already occupied by the node; Calculate the remaining reusable resources of the node based on the preset total available resources and the occupied resources; Based on the remaining reusable resources, the resources required by the service, and the preset unit resource cost, calculate the corresponding service cost of the node; The node with the lowest business cost is selected as the task node for the newly accessed business.
7. The power distribution communication network resource allocation method according to claim 6, characterized in that, After determining the task node for the newly accessed service, the process also includes: Detect the load status of all nodes in the power distribution communication network and determine whether the task node is in an overload state; When it is determined that the task node is in an overloaded state, the task node is removed from the power distribution communication network, and a new task node for the new access service is selected in the power distribution communication network.
8. The power distribution communication network resource allocation method according to claim 1, characterized in that, When the new access service is a data processing service, the new access service is assigned to the data support layer of the power distribution communication network, and network resources are allocated to the new access service according to the target resource requirements using a weighted round-robin method, including: When the service type of the newly accessed service is data processing, the priority level of each node is determined according to the node resource data of each node and the target resource requirements; wherein, the node resource data includes configuration attribute data and real-time running status data; Nodes of the same priority level are grouped together to form several node groups; Based on the priority from high to low, traverse each of the node groups in turn to determine the task node for the newly accessed service; Based on the target resource requirements, determine the task resources for the newly accessed service; The task node and the task resource are identified as the network resources for the new access service.
9. The power distribution communication network resource allocation method according to claim 8, characterized in that, The step of determining the priority level of each node based on its node resource data and the target resource requirements includes: The configuration attribute data in the node resource data of each node is compared with the target resource requirements to determine the degree of configuration matching of each node; Based on the real-time operating status data in the node resource data of each node, the operation and maintenance status of each node is calculated; wherein, the operation and maintenance status includes healthy, slightly overloaded, severely overloaded, and faulty. The priority level of each node is determined based on the configuration matching degree and operation and maintenance status of each node.
10. A power distribution communication network resource allocation device, characterized in that, include: Business data acquisition module, business classification module, first resource allocation module, and second resource allocation module; The business data acquisition module is used to acquire the business content and target resource requirements of newly accessed services; The service classification module is used to determine the service type of the newly accessed service based on the service content; wherein, the service type includes command control type and data processing type; the command control type service has a higher priority than the data processing type service; The first resource allocation module is used to allocate the new access service to the core protection layer of the power distribution communication network when the service type of the new access service is command and control type, and to allocate network resources to the new access service according to the target resource requirements using a preemptive priority scheduling method. The second resource allocation module is used to allocate the new access service to the data support layer of the power distribution communication network when the service type of the new access service is a data processing service, and to allocate network resources to the new access service according to the target resource requirements using a weighted round-robin method.