A power task allocation and optimization method and system

By acquiring and broadcasting task features and resource state vectors on edge nodes, and combining fuzzy logic and an improved gravity search algorithm, dynamic collaborative allocation of power tasks is achieved, solving the problems of limited resources and unbalanced load on edge computing nodes, and improving the operating efficiency and stability of the power system.

CN121309591BActive Publication Date: 2026-07-14STATE GRID JIBEI ELECTRIC POWER COMPANY LIMITED CHENGDE POWER SUPPLY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID JIBEI ELECTRIC POWER COMPANY LIMITED CHENGDE POWER SUPPLY
Filing Date
2025-10-13
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Traditional centralized power task allocation models are difficult to adapt to the complexity and variability of modern power grids and user-side demands. Limited resources at edge computing nodes lead to unbalanced loads, and cloud computing centers face high pressure, making it difficult to achieve safe, efficient, and economical operation of the power system.

Method used

By acquiring the feature vectors of computing tasks from business terminals, utilizing the periodic broadcasting of resource state vectors from edge nodes, and combining fuzzy logic and an improved gravity search algorithm for dynamic collaborative task allocation, we can achieve rapid and accurate matching of tasks and nodes, and make efficient decisions and coordinate resources based on multi-objective particle swarm optimization.

Benefits of technology

It significantly alleviated the operational pressure on cloud computing centers, enabled efficient offloading of computing tasks from nearby locations, balanced the load on edge nodes, reduced task execution latency, improved resource utilization, and ensured the stable and reliable execution of power Internet of Things (IoT) services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121309591B_ABST
    Figure CN121309591B_ABST
Patent Text Reader

Abstract

The application discloses a power task allocation and optimization method and system, and belongs to the technical field of power Internet of Things. The method comprises the following steps: obtaining a calculation task generated by a business terminal; extracting a feature vector T of the calculation task through an edge access point or an edge node controller; periodically broadcasting a resource state vector S of each edge node, and quickly matching the feature vector T of the task with the resource state vector S of a peripheral available edge node based on a fuzzy logic edge node resource state; modeling the feature vector T of the task and the resource state vector S of the peripheral available edge node as a dynamic system, and performing dynamic collaborative task allocation based on an improved gravity search algorithm; and unloading the task to a target edge node for execution according to the allocation result. The application has the effects of real-time response to network and load changes, accurate satisfaction of multi-dimensional quality requirements of power business, and realization of task allocation and optimization with the globally optimal efficiency of edge clusters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of the Internet of Things for power, and in particular to a method and system for power task allocation and optimization. Background Technology

[0002] With the deepening of the construction of new power systems, the power industry is facing unprecedented technological challenges and opportunities. The large-scale integration of distributed energy resources, the complex and variable nature of power loads, and the refined demands of user-side services make traditional centralized power task allocation models unsuitable for the operational requirements of modern power grids. Against this backdrop, power task allocation and optimization methods and systems have become a focus of industry attention. Their core objective is to achieve safe, efficient, and economical operation of the power system through advanced computing technology, rational resource scheduling, and scientific decision-making mechanisms.

[0003] At present, the growth of the power Internet of Things business has put great pressure on cloud computing centers. Edge computing has been introduced as a supplement. However, due to the limited resources of edge nodes, the power industry faces three major challenges: differentiated business needs, uneven geographical distribution of terminals, and load imbalance caused by sudden traffic. Summary of the Invention

[0004] In order to respond to network and load changes in real time, accurately meet the multi-dimensional quality requirements of power services, and achieve optimal task allocation and optimization for global edge cluster performance, this application provides a power task allocation and optimization method and system.

[0005] The power task allocation and optimization method and system provided in this application adopts the following technical solution:

[0006] In a first aspect, this application provides a method for power task allocation and optimization, comprising the following steps:

[0007] Acquire computing tasks generated by the business terminal;

[0008] Extract the feature vector T of the computing task by the edge access point or edge node controller;

[0009] Each edge node periodically broadcasts its resource state vector S. Based on the fuzzy logic of the edge node resource state, the task's feature vector T is quickly matched with the resource state vector S of the surrounding available edge nodes.

[0010] The feature vector T of the task and the resource state vector S of the surrounding available edge nodes are modeled as a dynamic system, and dynamic cooperative task allocation is performed based on the improved gravity search algorithm.

[0011] The task is unloaded to the target edge node for execution according to the allocation result.

[0012] Furthermore, the feature vector T includes latency sensitivity level, computing resource requirements, data volume, reliability requirements, and task relevance identifier;

[0013] The latency sensitivity levels are divided into emergency, high, medium, and low levels according to the service type;

[0014] The computing resource requirement is used to represent the number of CPU cycles required to complete the task.

[0015] The data size is used to indicate the size of the data packets that the task needs to transmit;

[0016] The reliability requirement is used to represent the minimum required probability of successful task processing;

[0017] The task association identifier is used to identify whether the task has a sequential or data dependency relationship with other tasks.

[0018] Furthermore, the step of periodically broadcasting its resource state vector S at each edge node, and quickly matching the task's feature vector T with the resource state vector S of surrounding available edge nodes based on fuzzy logic edge node resource states, specifically includes:

[0019] Each edge node periodically broadcasts its resource state vector S over the network, with the broadcast period dynamically adjusted according to network load.

[0020] The resource status vector S is collected in real time by the node's local monitoring tools, encapsulated into a vector format and broadcast. Surrounding nodes receive and cache these vectors for subsequent matching.

[0021] Based on the power task received by the local edge node, the task requirements are parsed and the task feature vector T is extracted;

[0022] The precise values ​​in the task feature vector T and resource state vector S are transformed into fuzzy linguistic variables. The fuzzification process is achieved through a predefined membership function, which adopts a triangular or trapezoidal shape to ensure a smooth transition.

[0023] Based on a predefined fuzzy rule base of expert knowledge, the rule form is "IF condition THEN conclusion". The condition part combines the task feature vector T and the resource state vector S, and the conclusion part outputs the matching degree. The fuzzy input is matched with the rule condition, and the Mamdani-type reasoning method is used to aggregate the results of all activated rules.

[0024] The fuzzy conclusions output by rule reasoning are defuzzified into precise matching scores. The defuzzification uses the centroid method or the maximum membership method to calculate a matching score for each candidate edge node.

[0025] Based on the matching score, all candidate edge nodes are sorted, and the 2-3 nodes with the highest scores are selected to form the preferred node set;

[0026] Perform precise optimization calculations on the preferred node set, taking into account additional factors;

[0027] Determine the optimal node and assign tasks to that node.

[0028] Furthermore, the step of modeling the task feature vector T and the resource state vector S of surrounding available edge nodes as a dynamic system, and performing dynamic cooperative task allocation based on the improved gravity search algorithm, also includes:

[0029] Real-time collection of resource status information and pending power task queue information of each edge node;

[0030] Based on the preset resource availability threshold and geographical proximity principle, the preferred node set at the current moment is selected from all edge nodes as the candidate target node set for task allocation.

[0031] The nodes in the preferred node set are mapped to the tasks to be assigned to form a dynamic optimization system;

[0032] Each candidate task allocation scheme is defined as an "individual". The position vector dimension of the individual is equal to the number of tasks to be allocated, and the coordinate value of each dimension represents the node number to which the task is allocated.

[0033] The individual positions of the population are initialized using chaotic sequences. The ergodicity and randomness of chaotic motion are used to generate the initial population, thereby enhancing population diversity and avoiding premature convergence of the algorithm.

[0034] A fitness function is defined as the basis for gravity calculations; the smaller the fitness function value, the better the allocation scheme.

[0035] Improved gravity search algorithm through iterative optimization;

[0036] The iteration terminates when the algorithm reaches the preset maximum number of iterations or when the fitness function value changes less than the threshold over several consecutive generations.

[0037] Output the task-node mapping relationship corresponding to the individual with the best fitness in the current population, and distribute this allocation scheme to the corresponding edge nodes for execution.

[0038] Furthermore, the iterative optimization steps of the improved gravity search algorithm also include:

[0039] The attraction between individuals is calculated based on the fitness function value; individuals with better fitness have a greater attraction to other individuals.

[0040] A node load repulsion mechanism is introduced to apply additional repulsion force to nodes whose current load exceeds the safety threshold, guiding tasks to migrate to idle or lightly loaded nodes and enhancing the load balancing effect.

[0041] Calculate the acceleration of an individual based on the net force acting on it, and update its velocity and position.

[0042] An adaptive inertia weight strategy is adopted. A larger inertia weight is set in the early stage of the algorithm iteration to enhance the global exploration capability. The weight is gradually reduced as the iteration progresses to strengthen the local fine search, thereby accelerating the convergence speed and improving the quality of the solution.

[0043] Correct the positions of individuals that have crossed the boundary after the update to ensure that they fall within the range of valid node numbers;

[0044] Preserve the best individuals of our time for the next generation to prevent the loss of superior genes.

[0045] Furthermore, it also includes:

[0046] The logical global resource coordinator dynamically divides all edge nodes into multiple collaborative domains based on the physical location of the edge nodes, network topology, and real-time load information, and assigns a dominant edge node to each collaborative domain.

[0047] The global resource coordinator maintains a lightweight global resource view, which contains an overall resource overview and dominant node information for each coordinating domain.

[0048] The global resource coordinator issues policy-based meta-rules to the dominant edge nodes of each collaborative domain according to the overall power grid operation strategy.

[0049] The meta-rules include the definition of intra-domain task priorities, permission conditions for inter-domain load balancing, and QoS objectives for specific types of tasks.

[0050] When a new power task arrives at any edge node within a collaborative domain, it triggers a distributed decision-making process within the domain.

[0051] The edge node receiving the task acts as the proposer and broadcasts the QoS requirement information of the task to all participating edge nodes within its cooperative domain.

[0052] Each participating edge node calculates a comprehensive quote based on its current predicted resource status and the QoS requirements of the task; the comprehensive quote is quantified as a function of the cost and potential benefits of processing the task.

[0053] Rapid decision-making and contract signing based on multi-objective particle swarm optimization;

[0054] When multiple cooperating domains compete for scarce global resources or task allocation schemes, causing inter-domain conflicts, the global resource coordinator conducts advanced arbitration based on a pre-set arbitration strategy.

[0055] Furthermore, the steps of rapid decision-making and contract signing based on multi-objective particle swarm optimization also include:

[0056] After the proposer edge node collects the bids from all participants, it uses a multi-objective particle swarm optimization algorithm for rapid evaluation.

[0057] The multi-objective particle swarm optimization algorithm searches for a task allocation scheme that optimizes the fitness function within a preset number of iterations or a convergence threshold, and determines the winning edge nodes.

[0058] The proposer signs a virtual contract with the winning edge node to confirm the task allocation relationship and reports the allocation result to the global resource coordinator to update the global resource view.

[0059] Secondly, this application provides a power task allocation and optimization system, comprising:

[0060] The computation task acquisition module is used to acquire computation tasks generated by the business terminal;

[0061] The feature vector extraction module is used to extract the feature vector T of the computing task through the edge access point or edge node controller;

[0062] The fast matching module is used to periodically broadcast the resource status vector S of each edge node. Based on the edge node resource status of fuzzy logic, the feature vector T of the task is quickly matched with the resource status vector S of the surrounding available edge nodes.

[0063] The collaborative task allocation module is used to model the feature vector T of the task and the resource state vector S of the surrounding available edge nodes as a dynamic system, and to perform dynamic collaborative task allocation based on the improved gravity search algorithm.

[0064] The execution module is used to offload tasks to the target edge nodes for execution according to the allocation results.

[0065] Thirdly, this application provides a smart terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described above for a power task allocation and optimization method.

[0066] Fourthly, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described above for a power task allocation and optimization method.

[0067] In summary, compared with the prior art, the beneficial effects of the above technical solution are:

[0068] The power task allocation and optimization method and system described in this application extracts the feature vector of computing tasks and combines it with the resource status vector periodically broadcast by edge nodes. It uses fuzzy logic to achieve fast and accurate matching of tasks and nodes, and then performs dynamic collaborative task allocation based on an improved gravity search algorithm. This not only significantly alleviates the operating pressure of cloud computing centers and realizes efficient offloading of computing tasks nearby, but also dynamically adjusts the allocation strategy according to the real-time resource status and task characteristics of edge nodes, effectively balancing the load of each edge node, avoiding local node overload problems caused by sudden traffic, ensuring the stable and reliable execution of power Internet of Things services, improving the utilization rate of edge node resources, reducing task execution latency, and providing strong support for the efficient and safe operation of the power system. Attached Figure Description

[0069] Figure 1 This is a flowchart illustrating a power task allocation and optimization method according to an embodiment of this application. Detailed Implementation

[0070] The present application will be further described in detail below with reference to all the accompanying drawings.

[0071] This application discloses a method and system for power task allocation and optimization, referring to... Figure 1 A method for power task allocation and optimization includes:

[0072] S101. Obtain the computing tasks generated by the business terminal.

[0073] Specifically, the system first establishes a terminal task acquisition mechanism, deploying lightweight task acquisition agents for different types of business terminals (such as IoT devices, mobile terminals, and industrial control terminals). These agents must support mainstream communication protocols (such as MQTT, HTTP, and CoAP) to ensure compatibility with various terminal devices. After a terminal generates a computing task, the agent monitors task triggering events in real time (such as sensor data acquisition completion, user operation command generation, and application service request initiation), and performs initial task encapsulation. The encapsulation includes the task initiating terminal identifier, task generation timestamp, and basic task description information (such as task name and task type). Subsequently, the agent transmits the encapsulated task data to the nearest edge access point or edge node controller via a pre-defined communication link. During transmission, a lightweight encryption algorithm (such as AES-128) is used to ensure the security and integrity of the task data, and a task transmission timeout retransmission mechanism is set to prevent task loss.

[0074] S102, Extract the feature vector T of the computation task.

[0075] Specifically, after the system edge access point or edge node controller receives the task data transmitted by the terminal, it initiates the feature vector extraction process. First, it parses the task encapsulation data to extract the core attribute information of the task. This information constitutes the dimensions of the feature vector T, specifically including: latency sensitivity level, computing resource requirements, data volume, reliability requirements, and task correlation identifier. The latency sensitivity level is divided into urgent, high, medium, and low levels based on the service type (e.g., fault indicator upload > electricity information collection). The computing resource requirements represent the number of CPU cycles required to complete the task. The data volume represents the size of the data packets that the task needs to transmit. The reliability requirements represent the minimum probability of successful task processing. The task correlation identifier indicates whether the task has a sequential order or data dependency relationship with other tasks. Next, the extracted dimensional information is standardized, converting parameters with different dimensions into values ​​within a unified range (e.g., 0-1) to eliminate the impact of dimensional differences on subsequent matching. Finally, the standardized values ​​are combined according to a preset dimensional order to form a unique feature vector T for the computing task, and an extraction timestamp and task identifier are added to it for subsequent process tracking.

[0076] S103. Quick matching of task feature vectors and edge node resource status vectors.

[0077] Specifically, the system first configures a resource status broadcasting mechanism for edge nodes. Each edge node deploys a resource status acquisition module, which periodically (e.g., every 500 milliseconds) collects its own real-time resource status, including CPU utilization, remaining memory, network bandwidth utilization, remaining storage space, and the number of currently active tasks. These status parameters are combined to form a resource status vector S, which is then labeled with a node identifier and a collection timestamp. The edge node broadcasts the resource status vector S via its local area network or dedicated communication link to edge access points, controllers, and other edge nodes within a certain radius (e.g., within a 5-kilometer radius) using multicast. The broadcast frequency is consistent with the resource acquisition cycle to ensure the real-time nature of the status information.

[0078] After receiving the resource state vector S from surrounding edge nodes, the edge access point or controller establishes a resource state assessment model based on fuzzy logic. Precise resource parameters such as CPU utilization and remaining memory are converted into fuzzy linguistic variables (e.g., "low CPU load," "sufficient memory," "limited bandwidth"), and a fuzzy rule base is defined (e.g., "if the task has a high latency sensitivity level and the node has low CPU load and sufficient memory, then the node has a high matching degree with the task"). Subsequently, the task's feature vector T is converted into corresponding fuzzy input, and rule reasoning is performed with the fuzzy resource state vector S of each edge node to calculate the matching degree score between each node and the current task. Based on the matching degree score, preliminary screening is performed, retaining edge nodes with scores higher than a preset threshold (e.g., 0.7) as candidate nodes, completing the rapid matching process.

[0079] S104. Dynamic cooperative task allocation based on an improved gravity search algorithm.

[0080] Specifically, the system uses candidate edge nodes selected through rapid matching as "individuals" within the dynamic system, and the task's feature vector T and the resource state vector S of each node as input parameters to construct a dynamic task allocation model. Improvements are made to the traditional gravity search algorithm: First, task priority weights are introduced, assigning different priority weights to different tasks based on their latency sensitivity and business importance, ensuring resource allocation for high-priority tasks during algorithm iteration. Second, a resource load balancing factor is added, using the load difference between nodes as a constraint on the algorithm's fitness function, preventing some nodes from being overloaded while others are idle. Third, the gravity coefficient update strategy is optimized, dynamically adjusting the gravity coefficient based on real-time task allocation to accelerate algorithm convergence.

[0081] First, initialize the "position" (i.e., task allocation ratio) and "quality" (i.e., node resource capability score) of candidate nodes; then calculate the "gravity" and "acceleration" between nodes. The acceleration of a node is jointly determined by the gravitational force exerted on it by other nodes. The magnitude of the gravitational force is directly proportional to the node's quality and inversely proportional to the load difference between nodes; update the node's velocity and position based on the acceleration to simulate the movement of nodes in the "resource space"; after each iteration, calculate the system's fitness value (including indicators such as task completion delay, node load balancing, and resource utilization). When the fitness value reaches the preset optimal threshold or the number of iterations reaches the upper limit, the algorithm stops iterating. At this point, the position of each node is the final task allocation scheme, clarifying the amount of task each candidate node should undertake.

[0082] S105. The task is unloaded and executed on the target edge node.

[0083] Specifically, based on the dynamic collaborative task allocation scheme, the system generates a task unloading instruction from the edge access point or controller. The instruction includes the target edge node identifier, task identifier, task data transmission path, and task execution parameters (such as priority and timeout). Before unloading, a dedicated communication channel is established between the task initiating terminal and the target edge node. The connection stability is confirmed through a TCP three-way handshake, and two-way authentication (using device certificates or key authentication) is performed to prevent unauthorized nodes from accessing the system.

[0084] After the communication channel is established, the task data offloading process is initiated: if the task data volume is small, the complete task data is directly transmitted to the target edge node through the channel; if the task data volume is large, a fragmented transmission method is adopted, dividing the data into multiple data packets, transmitting them sequentially, and reassembling them at the target node. Simultaneously, a data packet verification mechanism (such as CRC32 checksum) is set to ensure the accuracy of data transmission. After receiving the task data and offloading command, the target edge node's task scheduling module adds the task to its local execution queue and arranges the execution order according to task priority and the node's current load.

[0085] During task execution, the target edge node reports its task execution status (e.g., "in progress," "completed," "failed") to the edge access point or controller in real time. If an execution failure occurs, the controller will restart the task allocation process according to a preset fault tolerance strategy, offloading the task to other candidate nodes. After the task is completed, the target edge node returns the execution result to the business terminal through the original communication channel and sends a task completion confirmation message to the controller. The controller updates the task status record, completing the entire task offloading and execution closed loop.

[0086] In another embodiment, the step of periodically broadcasting its resource state vector S at each edge node, and quickly matching the task's feature vector T with the resource state vectors S of surrounding available edge nodes based on fuzzy logic edge node resource states, specifically includes:

[0087] Each edge node (such as a computing node in a power substation) periodically broadcasts its resource status vector S over the network; the broadcast period can be dynamically adjusted according to network load, for example, once per second. The resource status vector S includes: current CPU utilization (percentage), available memory (GB), storage I / O (MB / s), remaining network bandwidth (Mbps), and average latency to the cloud (ms). These parameters are collected in real time by local monitoring tools on the node, encapsulated into vector format, and broadcast. Surrounding nodes receive and cache these vectors for subsequent matching.

[0088] Based on the power task T received by the local edge node (such as the task access point), the task requirements are parsed and a task feature vector T is extracted. Taking a fault detection task as an example, the task feature vector T includes: latency sensitivity (e.g., urgent, general, lenient), computational requirements (e.g., high, medium, low), and storage requirements (e.g., large, medium, small). These features are extracted from task metadata or mapped to numerical values ​​through predefined templates. For example, latency sensitivity can be quantified according to task type: urgent tasks correspond to latency requirements of less than 10ms, general tasks to 10-50ms, and lenient tasks to greater than 50ms.

[0089] The precise values ​​in the task feature vector T and resource state vector S are transformed into fuzzy linguistic variables. These fuzzy linguistic variables are categorized into three levels: "low," "medium," and "high," and can be expanded to more levels (such as "extremely low" and "extremely high"). For example, for task latency sensitivity, precise values ​​(e.g., 10ms) are mapped to fuzzy variables: below 10ms is "urgent," 10-50ms is "moderate," and above 50ms is "relaxed." For node CPU utilization, precise values ​​(e.g., 20%) are mapped to fuzzy variables: 0-30% is "low," 30-70% is "medium," and 70-100% is "high." For network latency, precise values ​​(e.g., 15ms) are mapped to fuzzy variables: 0-20ms is "low," 20-50ms is "medium," and above 50ms is "high." Other parameters such as memory and storage I / O are processed similarly. The fuzzification process is implemented through predefined membership functions, which use triangular or trapezoidal shapes to ensure a smooth transition.

[0090] Based on a predefined fuzzy rule base using expert knowledge, the rules are in the form of "IF condition THEN conclusion". The condition part combines the task feature vector T and the resource state vector S, and the conclusion part outputs the matching degree. Examples of rules are as follows: Rule 1: IF task latency requirement is "urgent" AND node CPU utilization is "low" AND network latency is "low", THEN matching degree is "high". Rule 2: IF task computation requirement is "high" AND node CPU utilization is "medium" AND available memory is "high", THEN matching degree is "medium". The rule base contains dozens of rules, covering common scenarios. During inference, the fuzzy input is matched with the rule conditions, and a Mamdani-type inference method is used to aggregate the results of all activated rules.

[0091] The fuzzy conclusions output by rule-based reasoning (such as "high", "medium", "low") are defuzzified into precise matching scores (0-100). Defuzzification employs the centroid method or the maximum membership method; for example, "high" is mapped to 80-100 scores. Finally, a matching score is calculated for each candidate edge node.

[0092] Based on the matching score, all candidate edge nodes are sorted, and the top 2-3 nodes with the highest scores are selected to form a "preferred node set". This set greatly reduces the search space for subsequent precise optimization and avoids global search. For example, if there are 10 candidate nodes, this step only outputs the top 3 nodes.

[0093] Precise optimization calculations are performed on the preferred set of nodes, such as based on linear programming or greedy algorithms, taking into account additional factors like energy costs or load balancing. The optimal node is then determined, and tasks are assigned to that node. Precise optimization, due to its small search space, can be completed quickly, ensuring overall efficiency.

[0094] In another embodiment, the step of modeling the task feature vector T and the resource state vector S of surrounding available edge nodes as a dynamic system and performing dynamic cooperative task allocation based on the improved gravity search algorithm further includes:

[0095] Real-time data collection of resource status information (including CPU utilization, memory usage, and network bandwidth) and pending power task queue information (including task data volume, computational complexity, and minimum latency requirements) from each edge node is performed. Based on preset resource availability thresholds and geographical proximity principles, a "preferred node set" is selected from all edge nodes at the current moment as the candidate target node set for task allocation.

[0096] The nodes in the preferred node set are mapped to the tasks to be assigned as a dynamic optimization system. Each candidate task assignment scheme is defined as an "individual". The position vector dimension of the individual is equal to the number of tasks to be assigned. The coordinate value of each dimension represents the node number to which the task is assigned (for example, the position vector [node A, node C] means that task 1 is assigned to node A and task 2 is assigned to node C).

[0097] The individual positions of the population are initialized using chaotic sequences. The ergodicity and randomness of chaotic motion are used to generate the initial population, thereby enhancing population diversity and avoiding premature convergence of the algorithm.

[0098] A fitness function is defined as the basis for gravity computation. This function comprehensively considers the following optimization objectives: total task processing latency, including the transmission latency of task data from the source node to the target node and the execution latency on the node; load balancing, measured by the variance of CPU utilization of all candidate nodes, with a smaller variance indicating a more balanced load; and business requirement satisfaction, imposing a penalty term on tasks that do not meet their minimum latency requirements. A smaller fitness function value indicates a better allocation scheme.

[0099] Improve the gravity search algorithm through iterative optimization; calculate the gravitational force between individuals based on the fitness function value, with individuals having a higher fitness level exerting a greater gravitational force on other individuals;

[0100] A node load repulsion mechanism is introduced to apply additional repulsion force to nodes whose current load exceeds the safety threshold, guiding tasks to migrate to idle or lightly loaded nodes and enhancing the load balancing effect.

[0101] Calculate the acceleration of an individual based on the net force acting on it, and update its velocity and position.

[0102] An adaptive inertia weight strategy is adopted. A larger inertia weight is set in the early stage of the algorithm iteration to enhance the global exploration capability. The weight is gradually reduced as the iteration progresses to strengthen the local fine search, thereby accelerating the convergence speed and improving the quality of the solution.

[0103] Correct the positions of individuals that have crossed the boundary after the update to ensure that they fall within the range of valid node numbers;

[0104] Preserve the best individuals of our time for the next generation to prevent the loss of superior genes.

[0105] The algorithm terminates iteration when it reaches the preset maximum number of iterations or when the fitness function value changes less than a threshold over several consecutive generations. It outputs the task-node mapping relationship corresponding to the individual with the best fitness in the current population and distributes this allocation scheme to the corresponding edge nodes for execution.

[0106] In another embodiment, a power task allocation and optimization method further includes:

[0107] The logical global resource coordinator dynamically divides all edge nodes into multiple collaborative domains based on their physical location, network topology, and real-time load information, and assigns a dominant edge node to each collaborative domain. The global resource coordinator maintains a lightweight global resource view, which only contains the overall resource overview and dominant node information of each collaborative domain, rather than the detailed status of each edge node.

[0108] The global resource coordinator issues policy-based meta-rules to the leading edge nodes of each collaborative domain according to the overall power grid operation strategy. The meta-rules include the definition of task priorities within the domain, permission conditions for load migration between domains, and QoS objectives for specific types of tasks.

[0109] When a new power task arrives at any edge node within a collaborative domain, it triggers a distributed decision-making process within the domain.

[0110] The edge node receiving the task acts as the proposer and broadcasts the QoS requirement information of the task to all participating edge nodes within its cooperative domain.

[0111] Each participating edge node calculates a comprehensive quote based on its current predicted resource status (including computing power, memory, bandwidth, and estimated energy consumption) and the QoS requirements of the task; the comprehensive quote is quantified as a function of the cost and potential benefits of processing the task.

[0112] The algorithm enables rapid decision-making and contract signing based on multi-objective particle swarm optimization. After the proposer edge node collects the bids from all participants, it uses a multi-objective particle swarm optimization algorithm for rapid evaluation. Here, the particle position vector represents the candidate task allocation scheme, and the fitness function is defined as the improvement value of the overall utility of the collaborative domain that the allocation scheme can bring. The overall utility improvement value comprehensively considers the processing utility of the new task and the improvement of the load balance within the domain after task allocation.

[0113] The multi-objective particle swarm optimization algorithm searches for a task allocation scheme that optimizes the fitness function within a preset number of iterations or a convergence threshold, and determines the winning edge nodes.

[0114] The proposer signs a virtual contract with the winning edge node to confirm the task allocation relationship and reports the allocation result to the global resource coordinator to update the global resource view.

[0115] When multiple cooperating domains compete for scarce global resources or task allocation schemes, causing inter-domain conflicts, the global resource coordinator conducts advanced arbitration according to a pre-set arbitration strategy to ensure the overall stability of the system operation.

[0116] Based on the above method, this application also discloses a power task allocation and optimization system, including:

[0117] The computation task acquisition module is used to acquire computation tasks generated by the business terminal;

[0118] The feature vector extraction module is used to extract the feature vector T of the computing task through the edge access point or edge node controller;

[0119] The fast matching module is used to periodically broadcast the resource status vector S of each edge node. Based on the edge node resource status of fuzzy logic, the feature vector T of the task is quickly matched with the resource status vector S of the surrounding available edge nodes.

[0120] The collaborative task allocation module is used to model the feature vector T of the task and the resource state vector S of the surrounding available edge nodes as a dynamic system, and to perform dynamic collaborative task allocation based on the improved gravity search algorithm.

[0121] The execution module is used to offload tasks to the target edge nodes for execution according to the allocation results.

[0122] This application also discloses a smart terminal, which includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described above for a power task allocation and optimization method.

[0123] This application also discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program that can be loaded by a processor and executed as described above for a power task allocation and optimization method. The computer-readable storage medium includes, for example, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0124] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on these embodiments, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can still combine, add, delete, or otherwise adjust the features of the various embodiments of the present invention according to the circumstances without conflict or creative effort, thereby obtaining different technical solutions that do not fundamentally depart from the concept of the present invention. These technical solutions also fall within the scope of protection of the present invention.

Claims

1. A method for power task allocation and optimization, characterized in that, Includes the following steps: Acquire computing tasks generated by the business terminal; Extract the feature vector T of the computing task by the edge access point or edge node controller; Each edge node periodically broadcasts its resource state vector S. Based on the fuzzy logic of the edge node resource state, the task's feature vector T is quickly matched with the resource state vector S of the surrounding available edge nodes. The feature vector T of the task and the resource state vector S of the surrounding available edge nodes are modeled as a dynamic system, and dynamic cooperative task allocation is performed based on the improved gravity search algorithm. Specifically, this includes: defining each candidate task allocation scheme as an "individual", where the dimension of the individual's position vector is equal to the number of tasks to be allocated, and the coordinate value of each dimension represents the node number to which the task is allocated; The positions of individuals in the population are initialized using chaotic sequences; A fitness function is defined as the basis for gravity calculations; the smaller the fitness function value, the better the allocation scheme. The improved gravity search algorithm is iteratively optimized, including: calculating the gravitational force between individuals based on the fitness function value; introducing a node load repulsion mechanism to apply additional repulsion force to nodes whose current load exceeds the safety threshold; calculating the acceleration of an individual based on the net force acting on it and updating its velocity and position; adopting an adaptive inertia weight strategy; correcting the positions of individuals that have exceeded the limits after the update; and retaining the current best individual for the next generation. The iteration terminates when the algorithm reaches the preset maximum number of iterations or when the fitness function value changes less than the threshold over several consecutive generations. Output the task-node mapping relationship corresponding to the individual with the best fitness in the current population; The task is unloaded to the target edge node for execution according to the allocation result.

2. The power task allocation and optimization method according to claim 1, characterized in that, The feature vector T includes latency sensitivity level, computing resource requirements, data volume, reliability requirements, and task relevance identifier; The latency sensitivity levels are divided into emergency, high, medium, and low levels according to the service type; The computing resource requirement is used to represent the number of CPU cycles required to complete the task. The data size is used to indicate the size of the data packets that the task needs to transmit; The reliability requirement is used to represent the minimum required probability of successful task processing; The task association identifier is used to identify whether the task has a sequential or data dependency relationship with other tasks.

3. The power task allocation and optimization method according to claim 1, characterized in that, The step of periodically broadcasting its resource state vector S at each edge node, and quickly matching the task's feature vector T with the resource state vector S of surrounding available edge nodes based on fuzzy logic edge node resource states, specifically includes: Each edge node periodically broadcasts its resource state vector S over the network, with the broadcast period dynamically adjusted according to network load. The resource status vector S is collected in real time by the node's local monitoring tools, encapsulated into a vector format and broadcast. Surrounding nodes receive and cache these vectors for subsequent matching. Based on the power task received by the local edge node, the task requirements are parsed and the task feature vector T is extracted; The precise values ​​in the task feature vector T and resource state vector S are transformed into fuzzy linguistic variables. The fuzzification process is achieved through a predefined membership function, which adopts a triangular or trapezoidal shape to ensure a smooth transition. Based on a predefined fuzzy rule base of expert knowledge, the rule form is "IF condition THEN conclusion". The condition part combines the task feature vector T and the resource state vector S, and the conclusion part outputs the matching degree. The fuzzy input is matched with the rule condition, and the Mamdani-type reasoning method is used to aggregate the results of all activated rules. The fuzzy conclusions output by rule reasoning are defuzzified into precise matching scores. The defuzzification uses the centroid method or the maximum membership method to calculate a matching score for each candidate edge node. Based on the matching score, all candidate edge nodes are sorted, and the 2-3 nodes with the highest scores are selected to form the preferred node set; Perform precise optimization calculations on the preferred node set, taking into account additional factors; Determine the optimal node and assign tasks to that node.

4. The power task allocation and optimization method according to claim 1, characterized in that, The step of modeling the task feature vector T and the resource state vector S of surrounding available edge nodes as a dynamic system and performing dynamic cooperative task allocation based on the improved gravity search algorithm further includes: Real-time collection of resource status information and pending power task queue information of each edge node; Based on the preset resource availability threshold and geographical proximity principle, the preferred node set at the current moment is selected from all edge nodes as the candidate target node set for task allocation. The nodes in the preferred node set are mapped to the tasks to be assigned to form a dynamic optimization system; The ergodicity and randomness of chaotic motion are used to generate an initial population, thereby enhancing population diversity and avoiding premature convergence of the algorithm. The step of outputting the task-node mapping relationship corresponding to the individual with the best fitness in the current population is executed, and this allocation scheme is distributed to the corresponding edge nodes for execution.

5. The power task allocation and optimization method according to claim 1, characterized in that, The step of adopting an adaptive inertia weighting strategy also includes: In the early stages of algorithm iteration, a larger inertial weight is set to enhance the global exploration capability. As the iteration progresses, the weight is gradually reduced to strengthen the local fine search, thereby accelerating the convergence speed and improving the quality of the solution.

6. The power task allocation and optimization method according to claim 1, characterized in that, Also includes: The logical global resource coordinator dynamically divides all edge nodes into multiple collaborative domains based on the physical location of the edge nodes, network topology, and real-time load information, and assigns a dominant edge node to each collaborative domain. The global resource coordinator maintains a lightweight global resource view, which contains an overall resource overview and dominant node information for each coordinating domain. The global resource coordinator issues policy-based meta-rules to the dominant edge nodes of each collaborative domain according to the overall power grid operation strategy. The meta-rules include the definition of intra-domain task priorities, permission conditions for inter-domain load balancing, and QoS objectives for specific types of tasks. When a new power task arrives at any edge node within a collaborative domain, it triggers a distributed decision-making process within the domain. The edge node receiving the task acts as the proposer and broadcasts the QoS requirement information of the task to all participating edge nodes within its cooperative domain. Each participating edge node calculates a comprehensive quote based on its current predicted resource status and the QoS requirements of the task; the comprehensive quote is quantified as a function of the cost and potential benefits of processing the task. Rapid decision-making and contract signing based on multi-objective particle swarm optimization; When multiple cooperating domains compete for scarce global resources or task allocation schemes, causing inter-domain conflicts, the global resource coordinator conducts advanced arbitration based on a pre-set arbitration strategy.

7. The power task allocation and optimization method according to claim 6, characterized in that, The steps of rapid decision-making and contract signing based on multi-objective particle swarm optimization also include: After the proposer edge node collects the bids from all participants, it uses a multi-objective particle swarm optimization algorithm for rapid evaluation. The multi-objective particle swarm optimization algorithm searches for a task allocation scheme that optimizes the fitness function within a preset number of iterations or a convergence threshold, and determines the winning edge nodes. The proposer signs a virtual contract with the winning edge node to confirm the task allocation relationship and reports the allocation result to the global resource coordinator to update the global resource view.

8. A power task allocation and optimization system, characterized in that, include: The computation task acquisition module is used to acquire computation tasks generated by the business terminal; The feature vector extraction module is used to extract the feature vector T of the computing task through the edge access point or edge node controller; The fast matching module is used to periodically broadcast the resource status vector S of each edge node. Based on the edge node resource status of fuzzy logic, the feature vector T of the task is quickly matched with the resource status vector S of the surrounding available edge nodes. The collaborative task allocation module is used to model the feature vector T of the task and the resource state vector S of the surrounding available edge nodes as a dynamic system, and to perform dynamic collaborative task allocation based on the improved gravity search algorithm. Specifically, this includes: defining each candidate task allocation scheme as an "individual", where the dimension of the individual's position vector is equal to the number of tasks to be allocated, and the coordinate value of each dimension represents the node number to which the task is allocated; The positions of individuals in the population are initialized using chaotic sequences; A fitness function is defined as the basis for gravity calculations; the smaller the fitness function value, the better the allocation scheme. The improved gravity search algorithm is iteratively optimized, including: calculating the gravitational force between individuals based on the fitness function value; introducing a node load repulsion mechanism to apply additional repulsion force to nodes whose current load exceeds the safety threshold; calculating the acceleration of an individual based on the net force acting on it and updating its velocity and position; adopting an adaptive inertia weight strategy; correcting the positions of individuals that have exceeded the limits after the update; and retaining the current best individual for the next generation. The iteration terminates when the algorithm reaches the preset maximum number of iterations or when the fitness function value changes less than the threshold over several consecutive generations. Output the task-node mapping relationship corresponding to the individual with the best fitness in the current population; The execution module is used to offload tasks to the target edge nodes for execution according to the allocation results.

9. A smart terminal, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described in any one of claims 1 to 7, a method for power task allocation and optimization.

10. A computer-readable storage medium, characterized in that, The computer program is stored and can be loaded by a processor and executed as described in any one of claims 1 to 7, which is a method for power task allocation and optimization.