Task execution method based on edge computing framework of building energy system
By employing an edge computing framework and clustering algorithm in building energy systems, and utilizing edge nodes to execute tasks, the problem of high communication costs for device task execution is solved, achieving efficient task processing and improved system stability.
Patent Information
- Application Number
- CN202511730892.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-27
AI Technical Summary
The communication costs for executing equipment tasks in building energy systems are high, and the existing centralized cloud control framework leads to excessive network bandwidth consumption.
By adopting an edge computing framework for building energy systems, tasks and resources are clustered, and tasks are executed using edge nodes, reducing data uploads to the cloud. The initial cluster centers are optimized using particle swarm optimization and fuzzy C-means algorithms, achieving efficient matching of tasks and resources.
It reduces the communication costs of device task execution, improves task processing efficiency, reduces the load on cloud servers, and enhances system stability and efficient operation.
Smart Images

Figure CN121579199A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field, and specifically relates to a task execution method based on an edge computing framework of a building energy system. BACKGROUND
[0002] At present, with the expansion of the scale of buildings, the building energy system tends to be complex, covering various device terminals related to new energy such as photovoltaic, charging piles, energy storage devices and the like.
[0003] In the related art, the building energy system adopts a centralized cloud control framework, and the tasks corresponding to the devices in the building energy system are executed in the cloud. A large number of devices in the building energy system correspond to tasks, and the device data required for the execution of a large number of tasks, such as continuously uploaded sensor readings and device states, need to be uploaded to the cloud, which occupies a large amount of network bandwidth, and the communication cost of the execution of the tasks corresponding to the devices in the building energy system is high. How to reduce the communication cost of the execution of the tasks corresponding to the devices in the building energy system has become a technical problem to be solved. SUMMARY
[0004] The embodiment of the present application provides a task execution method based on an edge computing framework of a building energy system.
[0005] The edge computing framework of the building energy system comprises: an edge node set in the building energy system, the edge node set comprising: a plurality of first-level edge nodes and a plurality of second-level edge nodes; The task execution method based on the edge computing framework of the building energy system provided by the embodiment of the present application comprises: According to the attribute information of each task in the plurality of tasks, the plurality of tasks are clustered to obtain a task clustering result, wherein each task corresponds to a device in the building energy system, each task cluster in the task clustering result corresponds to a different task type in a plurality of task types, and the task cluster comprises tasks of the task type corresponding to the task cluster; According to the attribute information of each resource in the resource set of the edge node set, the resource set is clustered to obtain a resource clustering result, wherein the resource set comprises resources of each edge node in the edge node set, each resource cluster in the resource clustering result corresponds to a different resource type in a plurality of resource types, and the resource cluster comprises resources of the resource type corresponding to the resource cluster; For each of the plurality of primary edge nodes, the primary edge node executes a target task of a target task type that matches a resource type of resources of the primary edge node, which is assigned to the primary edge node, or assigns the target task to a target secondary edge node that has a resource type of resources matching the target task type and is under jurisdiction of the primary edge node, wherein the target secondary edge node executes the target task when the target secondary edge node receives the target task.
[0006] In a possible implementation, the plurality of task types include: a computing demand type, a bandwidth demand type, and a storage demand type, and the plurality of resource types include: a computing type, a bandwidth type, and a storage type, the computing demand type matches the computing type, the bandwidth demand type matches the bandwidth type, and the storage demand type matches the storage type.
[0007] In a possible implementation, the primary edge node is a direct current distribution box, and the secondary edge node is an intelligent power distribution terminal.
[0008] In a possible implementation, before the primary edge node executes a target task of a target task type that matches a resource type of resources of the primary edge node, which is assigned to the primary edge node, or assigns the target task to a target secondary edge node that has a resource type of resources matching the target task type and is under jurisdiction of the primary edge node, the method further includes: The primary edge node acquires resource usage of each secondary edge node under jurisdiction of the primary edge node, and determines, according to the resource usage of the primary edge node and the resource usage of each secondary edge node under jurisdiction of the primary edge node, whether the primary edge node executes the target task or assigns the target task to the target secondary edge node.
[0009] In a possible implementation, the building energy system includes: a medium-voltage distribution area and a low-voltage distribution area, the primary edge node is configured to manage a medium-voltage area task corresponding to the medium-voltage distribution area, and the secondary edge node is configured to manage a low-voltage area task corresponding to the low-voltage distribution area.
[0010] In a possible implementation, the primary edge node communicates with a cloud server, and the cloud server is configured to assign, to the primary edge node, a target task of a target task type that matches a resource type of resources of the primary edge node.
[0011] In a possible implementation, the cloud server is configured to cluster the plurality of tasks and cluster the set of resources.
[0012] In a possible implementation, the plurality of tasks are clustered according to attribute information of each task in the plurality of tasks, and the task clustering result includes: input attribute information of each resource in the resource set into a particle algorithm based on an objective fitness function to obtain a resource cluster center output by the particle algorithm; use the resource cluster center output by the particle algorithm as an initial resource cluster center for an FCM algorithm; perform clustering on the resource set by using the FCM algorithm to obtain a resource clustering result.
[0013] In one possible implementation, the clustering on the resource set according to the attribute information of each resource in the resource set of the edge node set comprises: input the attribute information of each resource into a particle algorithm based on an objective fitness function to obtain a resource cluster center output by the particle algorithm; use the resource cluster center output by the particle algorithm as an initial resource cluster center for an FCM algorithm; perform clustering on the resource set by using the FCM algorithm to obtain a resource clustering result.
[0014] In one possible implementation, the plurality of tasks do not have an execution order, each task in the plurality of tasks can be executed only on one resource in the resource set and the execution process of each task is not interruptible, and each resource in the resource set executes at most one task in the plurality of tasks at any time.
[0015] Advantageous effects: The task execution method provided in the embodiments of the present application uses the edge node in the building energy system that is close to the device corresponding to the task in the building energy system to execute the task corresponding to the device, without uploading the data required for executing the task, such as sensor readings, device states of the device, and the like, to the cloud before executing the task, thereby reducing the communication cost of executing the task corresponding to the device in the building energy system.
[0016] The task execution method provided in the embodiments of the present application takes into account the diversity of the task corresponding to the device in the building energy system, such as the direct current bus state monitoring, photovoltaic output prediction, charging pile scheduling, and energy storage optimization control, and the like, and the required resources for different tasks are significantly different, where the required resources can be understood as resources suitable for executing the task. The task execution method provided in the embodiments of the present application fully considers the characteristics of the task corresponding to the device in the building energy system and the characteristics of the resources of the edge node.
[0017] The task execution method provided in the embodiments of the present application clusters multiple tasks, and multiple task types can be determined. The resource set of the edge node set is clustered, and multiple resource types can be determined. As an example, the multiple task types include: a computing demand type, a bandwidth demand type, and a storage demand type, and the multiple resource types include: a computing type, a bandwidth type, and a storage type. The task of the computing demand type needs to rely on a resource with strong computing capability for efficient execution. The task of the bandwidth type needs to rely on a resource with high-speed communication capability for efficient execution. The task of the storage type needs to rely on a resource with large-capacity storage capability for efficient execution. The computing type resource has strong computing capability, the bandwidth type has high-speed communication capability, and the storage type resource has large-capacity storage capability.
[0018] For a resource type, the resource of the resource type is suitable for executing a task of a task type matched with the resource type. For each task, the task is executed by using a resource of a resource type matched with the task type of the task. Therefore, for each task, the task is executed by using a resource suitable for executing the task. Therefore, each task can be executed more efficiently.
[0019] The task execution method provided in the embodiments of the present application considers the following problem: the FCM algorithm is sensitive to the initial clustering center, and when the initial position is greatly different from the global optimal position, the FCM algorithm is prone to fall into local optimization. The particle swarm algorithm compares the individual historical optimal position and the global optimal position during iteration, which makes the particle swarm algorithm better accelerate the convergence speed and avoid falling into local optimization due to prematureness. The method provided in the embodiments of the present application optimizes the initial clustering center by using the global optimization advantage of the particle swarm, thereby avoiding the local optimization problem. The particle algorithm is iteratively optimized by defining a target fitness function to obtain a globally optimal solution, and then the globally optimal solution is input as the initial value of the FCM algorithm, and finally the optimal solution is obtained through FCM fuzzy clustering, thereby realizing the double clustering of the task and the resource. The accuracy of clustering is improved. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art based on these drawings.
[0021] Figure 1 is a schematic diagram of an example framework including a building energy system and a power distribution system of the building energy system; Figure 2 is a network topology of one example of a building energy system to which the task execution method provided in the embodiments of the present application can be applied. Figure 3 is a schematic diagram of an edge computing framework of a building energy system based on which a task execution method provided by an embodiment of the present application is implemented; Figure 4 is a schematic diagram of a clustering process in the method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in a clear and complete manner with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined, separated, interchanged, and / or rearranged without conflict, if possible. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative effort fall within the scope of the present application.
[0023] In the drawings, the size and relative sizes of parts can be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be carried out in different sequences, a specific process sequence can be carried out in an order different from the described order. For example, two consecutively described processes can be performed substantially simultaneously or in the reverse order of the described order. In addition, the same reference numerals indicate the same parts.
[0024] When a part is referred to as "on" or "above" another part, "connected to" or "combined to" another part, the part can be directly on, directly connected to, or directly combined to the other part, or there can be an intermediate part. However, when a part is referred to as "directly on" another part, "directly connected to" or "directly combined to" another part, there is no intermediate part. For this reason, the term "connected" can refer to a physical connection, an electrical connection, etc., with or without an intermediate part.
[0025] For descriptive purposes, the present disclosure can use spatial relative terms such as "top", "bottom", "under", "below", "lower", "down", "above", "upper", "over", "higher", etc. to describe the relationship of one part to another (other) part as shown in the drawings.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, to the extent that the terms "comprise," "have," "contain," and / or "include" and variations thereof are used herein, such terms are intended to be open-ended terms that also mean "consist of." It is also noted that the terms "substantial," "approximately," and other similar terms, where used herein, are used as terms of approximation and not as terms of degree unless otherwise indicated. It is further noted that the use of "or" herein is meant for a nonexclusive or unless otherwise indicated. It is also noted that the terms "comprise," "comprising," "comprises," "include," "including," "includes," "contain," "containing," "have," "has," "having," or variants thereof are used synonymously with each other herein.
[0027] Reference Figure 1 FIG. 1 shows a schematic diagram illustrating an example framework including a building energy system and a power distribution system of the building energy system.
[0028] The tasks corresponding to the devices in the building energy system mainly come from two types of terminal devices in the building energy system: 1) energy network infrastructure devices, including, for example, power distribution boxes, transformers, DC bus monitoring units, etc.; and 2) user-side devices, including, for example, DC charging piles, intelligent lighting, energy storage battery management systems, etc. The tasks generated by different devices differ significantly in terms of computational scale, real-time requirements, and resource preferences.
[0029] System state estimation and energy flow analysis, user-side energy consumption management and coordinated control, historical data mining and strategy learning are all tasks related to the building energy system.
[0030] Among them, the system state estimation and energy flow analysis task needs to process real-time data of the system quickly to ensure the stable operation of the microgrid, so it has high requirements for computing power and communication bandwidth.
[0031] The user-side energy consumption management and coordinated control task directly faces the user-side devices and needs to respond in real time according to environmental changes and user behavior, so it also emphasizes the calculation speed and transmission reliability; The historical data mining and strategy learning task focuses on extracting value from massive historical data, which usually requires large storage space and offline computing power.
[0032] As an example of system state estimation and energy flow analysis, real-time monitoring of 750V DC bus voltage, current and power, dynamic evaluation of photovoltaic array and energy storage system operating state are all System state estimation and energy flow analysis.
[0033] As an example of the user-side energy management and coordinated control task, the intelligent charging and discharging management of the charging pile, the dimming control of the lighting system, and the load adjustment strategy based on personnel activities are all user-side energy management and coordinated control tasks.
[0034] As an example of the historical data mining and strategy learning task, energy mode identification, fault prediction, and multi-energy complementary scheduling strategy generation are all historical data mining and strategy learning tasks.
[0035] Reference Figure 2 which shows an example of a network topology of a building energy system to which the task execution method provided by the embodiments of the present application can be applied.
[0036] In this example, the building energy system includes an energy management center, a smart distribution box, a distribution terminal, and devices corresponding to tasks such as photovoltaic, energy storage devices, charging piles, and environmental sensors. The devices corresponding to the tasks can generate the tasks.
[0037] The energy management center can include multiple cloud servers. The distribution terminal specifically refers to a smart distribution terminal.
[0038] The energy management center is communicatively connected to each primary edge node such as a smart distribution box.
[0039] Each primary edge node such as a smart distribution box is respectively communicatively connected to a corresponding secondary edge node such as a distribution terminal. Each secondary edge node such as a smart distribution terminal is respectively communicatively connected to a corresponding device that can generate a task such as a photovoltaic, an energy storage device, and a charging pile.
[0040] When the smart distribution box executes a task, it can instruct the secondary edge node such as the distribution terminal that is communicatively connected to the device generating the task to execute the task. The smart distribution terminal obtains data required for executing the task from the device generating the task.
[0041] The tasks mainly come from terminal devices such as the smart distribution box, the charging pile controller of the charging pile, the energy storage management system of the energy storage device, and the environmental sensor.
[0042] It should be noted that the task is generated by the device corresponding to the task. The device corresponding to the task can send device data required for the edge node to execute the task to the edge node executing the task, such as sensor readings, device states of the device, etc.
[0043] After the device corresponding to the task generates the task, the task is sequentially transmitted to the secondary edge node such as the distribution terminal that is communicatively connected to the device corresponding to the task, and the primary edge node that is communicatively connected to the secondary edge node, and the primary edge node transmits the task to the energy management center.
[0044] The energy management center can cluster multiple tasks, and cluster the resource set of the edge node set.
[0045] For each of the plurality of primary edge nodes, the energy management center can issue a target task of a target task type matching a resource type of a resource of the primary edge node to the primary edge node.
[0046] As an example, the energy management center can issue a target task of a target task type matching a resource type of a resource of the primary edge node A to the primary edge node A.
[0047] Wherein, the primary edge node A can be any one of the primary edge nodes.
[0048] Considering that the intelligent power distribution terminal directly has the characteristics of an edge node, it can integrate existing computing resources and provide computing, network and storage services, therefore, a direct current distribution box, for example, a 750 / 375V direct current distribution box, can be used as a primary edge node, and the intelligent power distribution terminal can be used as a secondary edge node in a secondary edge layer.
[0049] The edge node can perform aggregation processing on data uploaded by terminal devices in the device layer. Each intelligent power distribution terminal can be one of a DTU, a TTU, an FTU, and the like, wherein the DTU is a power distribution monitoring terminal for collecting and monitoring data of switch devices; the TTU is a power distribution transformer monitoring terminal for collecting and monitoring data of power distribution transformers; and the FTU is a feeder monitoring terminal installed beside a feeder switch to provide information required for monitoring and control of operation conditions and various parameters of a power distribution system.
[0050] The plurality of primary edge nodes form a primary edge layer, and the plurality of secondary edge nodes form a secondary edge layer. The primary edge layer and the secondary edge layer form a two-level edge layer. The two-level edge layer is a key node in the building energy system, and the edge layer shares part of the tasks of the cloud server layer. The edge layer is closer to the terminal, reduces the communication delay, improves the processing speed of the task, and relieves the load pressure of the cloud server. The terminal device perception layer perceives data, the edge layer makes autonomous decisions, and the cloud server layer aggregates information for global monitoring. Data collaboration, resource collaboration, and intelligent collaboration of cloud-edge-end realize full data collection, full state perception, and full business penetration of the intelligent power distribution network.
[0051] The main function of the edge layer is to provide computing services for the autonomous area and interact with the cloud server, and the excessively large or small definition of the edge node will affect the stable and efficient operation of the smart power distribution system. From the voltage level, the building energy system mainly includes medium voltage distribution and low voltage distribution, and the edge computing has the characteristics of hierarchical deployment, therefore, the edge layer is divided into a first-level edge layer and a second-level edge layer. Different edge layers meet different business requirements, the first-level edge layer manages the medium voltage area tasks and allocates tasks to the second-level edge nodes in the second-level edge layer, and the second-level edge layer manages the low voltage area tasks.
[0052] Reference Figure 3 which shows a schematic diagram of an edge computing framework of a building energy system based on which a task execution method provided by an embodiment of the present application is based.
[0053] After the edge nodes are deployed, they are virtualized, abstracted and pooled into computing resources, i.e. resources in the intelligent power distribution terminal and the direct current distribution box, by virtualization technology.
[0054] Regarding the logical structure of the computing resources in the edge nodes, each edge node is designed to be composed of a computing resource analysis module and a computing module. The first-level edge node communicates with the cloud server upwardly and with the second-level edge nodes downwardly. The first-level edge node counts the resource usage of its own and all the second-level edge nodes in the jurisdiction range through the resource monitoring module, and transmits the result to the resource scheduling module. The resource scheduling module analyzes the information and decides whether to execute the task locally or to issue it to the target second-level edge node according to the scheduling result. When the first-level edge node issues the task to the second-level edge node, the second-level node accepts the assigned task and executes the task through the computing module.
[0055] The following describes a task execution method based on the edge computing framework of the building energy system provided by an embodiment of the present application.
[0056] The edge computing framework of the building energy system comprises: a set of edge nodes in the building energy system, the set of edge nodes comprising: a plurality of first-level edge nodes and a plurality of second-level edge nodes.
[0057] The task execution method based on the edge computing framework of the building energy system provided by an embodiment of the present application comprises: steps S101-S103.
[0058] In step S101, a plurality of tasks are clustered according to attribute information of each task in the plurality of tasks, to obtain a task clustering result, wherein each task corresponds to a device in the building energy system, and each task cluster in the task clustering result corresponds to a different task type in a plurality of task types, and the task cluster comprises tasks of the task type corresponding to the task cluster.
[0059] The task clustering result includes a plurality of task clusters. Each task in the task cluster is a task in the plurality of tasks.
[0060] For the task cluster A, each task in the task cluster A is a task in the plurality of tasks that is clustered into the task cluster A, and the task type of each task in the task cluster A is the task type corresponding to the task cluster A.
[0061] The task cluster A can be any one of the task clusters.
[0062] As an example, the building energy system is an energy system of a park, for example, an industrial park.
[0063] Each task in the plurality of tasks corresponds to a device in the building energy system.
[0064] For the task A, the device corresponding to the task A in the building energy system generates the task A. The task A can be any one of the plurality of tasks.
[0065] In a possible implementation, any existing clustering algorithm can be used to cluster the plurality of tasks according to the attribute information of each task in the plurality of tasks to obtain the task clustering result. The attribute information of each task in the plurality of tasks is input into the existing clustering algorithm to obtain the task clustering result output by the existing clustering algorithm.
[0066] As an example, the plurality of tasks are n tasks, n tasks T = {t1, t2,..., t n}, where the attribute of the task t i is represented as: t i = {id, c i , b i , s i , wc i , wb i , ws i , length, data, deadline}, and the meanings of the items in the attribute of the task t i are as follows: 1) id: task unique identifier 2) c i , b i , s i : respectively represent the demand amount of computing power, the demand amount of bandwidth capacity, and the demand amount of storage capacity of the task, where the demand amount of computing power can refer to how much computing power at least the resource required to efficiently execute the task has, the demand amount of bandwidth capacity can refer to how much bandwidth at least the resource required to efficiently execute the task has, and the demand amount of storage capacity can refer to how much storage space at least the resource required to efficiently execute the task has. 3) wci , wb i , ws i : respectively represent the weight coefficients of the three types of resource requirements of the task 4) length: task length, used to calculate processing time 5) data: data required for task processing, including input and output data 6) deadline: the latest completion time of the task As an example, the plurality of task types includes: a computing demand type, a bandwidth demand type, and a storage demand type, and the computing demand type, the bandwidth demand type, and the storage demand type are respectively taken as a task type.
[0067] The task clustering result includes: a task cluster corresponding to the computing demand type, a task cluster corresponding to the bandwidth demand type, and a task cluster corresponding to the storage demand type. The task cluster corresponding to the computing demand type includes: a task of the computing demand type. The task cluster corresponding to the bandwidth demand type includes: a task of the bandwidth demand type. The task cluster corresponding to the storage demand type includes: a task of the storage demand type.
[0068] In step S102, according to the attribute information of each resource in the resource set of the edge node set, the resource set is clustered to obtain a resource clustering result, wherein the resource set includes the resources of each edge node in the edge node set, each resource cluster in the resource clustering result corresponds to a different resource type in the plurality of resource types, and the resource cluster includes the resources of the resource type corresponding to the resource cluster.
[0069] The resource clustering result includes a plurality of resource clusters. Each resource in the resource cluster is a resource in the resource set of the edge node set.
[0070] For the resource cluster A, each resource in the resource cluster A is a resource in the resource set of the edge node set that is clustered into the resource cluster A, and the resource type of each resource in the resource cluster A is the resource type corresponding to the resource cluster A.
[0071] The resource cluster A can be any one of the resource clusters.
[0072] In one possible implementation, any existing clustering algorithm can be used to cluster the resource set according to the attribute information of each resource in the resource set of the edge node set to obtain the resource clustering result. The attribute information of each resource in the resource set of the edge node set is input into the existing clustering algorithm to obtain the resource clustering result output by the existing clustering algorithm.
[0073] As an example, the edge node set includes m edge nodes, and the resource set of the edge node set includes m resources, m resources include the resources of each edge node.m Each resource is represented as R = {r1, r2, ..., r} n The attributes of resource r can be represented as: r = {id, c, b, s}. The meanings of each item in the attributes of resource r are as follows: 1) id: Unique identifier of the computing resource; 2) c, b, s: Represent the computing power, bandwidth capacity, and storage capacity of the resource, respectively. Among them, the computing power of the resource can refer to the total amount of computing power that the resource can use to execute tasks; the bandwidth capacity of the resource can refer to the total amount of bandwidth that the resource can use to execute tasks; and the storage capacity of the resource can refer to the total amount of storage space that the resource can use for execution.
[0074] As an example, multiple resource types include: compute-intensive, bandwidth-intensive, and storage-intensive. The resource clustering results include: resource clusters corresponding to compute-intensive, bandwidth-intensive, and storage-intensive resources. The compute-intensive resource clusters include compute-intensive resources. The bandwidth-intensive resource clusters include bandwidth-intensive resources. The storage-intensive resource clusters include storage-intensive resources.
[0075] In step S103, for each of the multiple primary edge nodes, the primary edge node executes a target task of a target task type that is issued to the primary edge node and matches the resource type of the primary edge node's resources, or issues the target task to a target secondary edge node under the jurisdiction of the primary edge node whose resource type matches the target task type. When the target secondary edge node receives the target task, the target secondary edge node executes the target task.
[0076] It should be noted that for each of the multiple primary edge nodes, the target task of the target task type that matches the resource type of the primary edge node's resources is the task among the multiple tasks mentioned above.
[0077] Specifically, for a first-level edge node A, the target task type that matches the resource type of the resources allocated to first-level edge node A is task type A. The target task of task type A allocated to first-level edge node A is task A. The task cluster to which task A is clustered corresponds to task type A.
[0078] Among them, the first-level edge node A can be any first-level edge node.
[0079] The resource type of the resources of the first-level edge node A is: the resource type to which the resources of the first-level edge node A are clustered.
[0080] When the primary edge node A assigns the task A to the target secondary edge node, if the number of the secondary edge nodes under the jurisdiction of the primary edge node A and having the resource type matching the task type A is one, the one secondary edge node under the jurisdiction of the primary edge node A and having the resource type matching the task type A is taken as the target secondary edge node under the jurisdiction of the primary edge node A and having the resource type matching the task type A.
[0081] When the primary edge node A assigns the task A to the target secondary edge node, if the number of the secondary edge nodes under the jurisdiction of the primary edge node A and having the resource type matching the task type A is one, the one secondary edge node under the jurisdiction of the primary edge node A and having the resource type matching the task type A is taken as the target secondary edge node under the jurisdiction of the primary edge node A and having the resource type matching the task type A.
[0082] As an example, the plurality of task types include: a computing demand type, a bandwidth demand type, and a storage demand type, and the plurality of resource types include: a computing type, a bandwidth type, and a storage type. The computing demand type matches the computing type. The bandwidth demand type matches the bandwidth type. The storage demand type matches the storage type. The task of the computing demand type needs to rely on the resource with strong computing capability for efficient execution. The task of the bandwidth type needs to rely on the resource with high-speed communication capability for efficient execution. The task of the storage type needs to rely on the resource with large-capacity storage capability for efficient execution. The resource of the computing type has strong computing capability. The resource of the bandwidth type has high-speed communication capability. The resource of the storage type has large-capacity storage capability.
[0083] As an example, for a target task of a target task type matching the resource type of the resource of the primary edge node A received by a primary edge node A, the target task type can be determined according to the resource type of the resource of the primary edge node A. The type of the device generating the target task, the pre-set correspondence between the device type and the edge node type, and the determination of the target task by the primary edge node A or the secondary edge node. Wherein, the primary edge node A can be any one of the primary edge node. Wherein, the correspondence between the device type and the edge node type can be expressed: for each device type in the plurality of device types, the device type of the device generates the task which should be executed by the primary edge node or the secondary edge node. If the device type of the device generating the target task, the pre-set correspondence between the device type and the edge node type, and the determination of the target task by the primary edge node, the device generating the target task can be determined by the primary edge node A, and the target task is executed by the primary edge node A. If the device type of the device generating the target task, the pre-set correspondence between the device type and the edge node type, and the determination of the target task by the secondary edge node, the secondary edge node with the resource type of the resource owned by the primary edge node A and the target task type matching the target task type is executed by the primary edge node A. The primary edge node A sends the target task to the target secondary edge node with the resource type of the resource owned by the primary edge node and the target task type matching the target task type, wherein the target secondary edge node executes the target task when the target secondary edge node receives the target task.
[0084] In one possible implementation, further comprising: before the primary edge node A executes the target task of the target task type matching the resource type of the resource owned by the primary edge node A sent to the primary edge node A, or before the primary edge node A sends the target task to the target secondary edge node with the resource type of the resource owned by the primary edge node A and the target task type matching the target task type, further comprising: the primary edge node A acquires the resource usage of each secondary edge node under the jurisdiction of the primary edge node A, and determines the primary edge node A to execute the target task or sends the target task to the target secondary edge node according to the resource usage of the primary edge node A and the resource usage of each secondary edge node under the jurisdiction of the primary edge node A.
[0085] Wherein, the primary edge node A can be any one of the primary edge node.
[0086] Wherein, the resource usage of the edge node can indicate that the edge node has a total of how many resources of the resource type corresponding to the edge node, and how many resources of the resource type corresponding to the edge node are currently being used.
[0087] Wherein, each edge node corresponds to a resource type respectively. The resource type corresponding to the edge node is: the resource type of the resource of the edge node.
[0088] As an example, a resource occupancy rate of the resource of the primary edge node A can be determined according to the resource usage of the primary edge node A. The resource occupancy rate of the resource of the edge node A is the amount of the resource of the edge node A that is currently being used and corresponds to the resource type of the edge node A divided by the total amount of the resource of the edge node A that corresponds to the resource type of the edge node A. When the resource occupancy rate of the primary edge node A is not greater than a resource occupancy rate threshold, it is determined that a target task of a target task type that matches the resource type of the resource of the primary edge node A is executed by the primary edge node. When the resource occupancy rate of the primary edge node A is greater than the resource occupancy rate threshold, a target secondary edge node that has a resource whose resource type matches the target task type and is governed by the primary edge node A is determined. The target secondary edge node that has a resource whose resource type matches the target task type and is governed by the primary edge node A is the secondary edge node that has the smallest resource occupancy rate of the resource among all the secondary edge nodes that have a resource whose resource type matches the target task type and are governed by the primary edge node A. Thus, it is determined that the primary edge node A assigns the target task to the target secondary edge node that has a resource whose resource type matches the target task type and is governed by the primary edge node A.
[0089] In one possible implementation, the building energy system comprises: a medium-voltage power distribution area, a low-voltage power distribution area, a primary edge node configured to manage a medium-voltage area task corresponding to the medium-voltage power distribution area, and a secondary edge node configured to manage a low-voltage area task corresponding to the low-voltage power distribution area.
[0090] The plurality of tasks comprises: the medium-voltage area task, and the low-voltage area task.
[0091] The primary edge node can receive the medium-voltage area task and upload the medium-voltage area task to a device configured to cluster the plurality of tasks, such as an energy management center. The secondary edge node can receive the low-voltage area task and upload the low-voltage area task to a device configured to cluster the plurality of tasks, such as an energy management center.
[0092] In one possible implementation, the primary edge node communicates with a cloud server configured to assign a target task of a target task type that matches a resource type of a resource of the primary edge node to the primary edge node. The cloud server is configured to cluster the plurality of tasks and to cluster the set of resources.
[0093] In a possible implementation, the clustering of the plurality of tasks according to the attribute information of each task in the plurality of tasks comprises: inputting the attribute of each task in the plurality of tasks into a particle algorithm based on a target fitness function to obtain a task clustering center output by the particle algorithm; taking the task clustering center output by the particle algorithm as an initial task clustering center for a fuzzy C-means (FCM) algorithm; and clustering the plurality of tasks by using the FCM algorithm to obtain a task clustering result.
[0094] Each task can be taken as a particle respectively. The attribute of the task can be taken as the attribute of the particle.
[0095] After the attribute of each task in the plurality of tasks is input into the particle algorithm based on the target fitness function, the particle algorithm based on the target fitness function performs a plurality of iterations for updating the clustering center for the particle algorithm based on the target fitness function.
[0096] The clustering center obtained when the last iteration for updating the clustering center for the particle algorithm based on the target fitness function is completed is taken as the task clustering center output by the particle algorithm based on the target fitness function.
[0097] It should be noted that the number of the task clustering centers output by the particle algorithm based on the target fitness function is a plurality. Each task clustering center output by the particle algorithm based on the target fitness function is taken as an initial task clustering center for the FCM algorithm respectively.
[0098] Taking the task clustering center output by the particle algorithm based on the target fitness function as the initial task clustering center for the FCM algorithm can be understood as: initializing the task clustering center for the FCM algorithm as the task clustering center output by the particle algorithm based on the target fitness function before clustering the plurality of tasks by using the FCM algorithm.
[0099] When the plurality of tasks are clustered by using the FCM algorithm, a plurality of iterations for updating the clustering center are performed. The task clustering result is obtained when the last iteration by using the FCM algorithm is completed.
[0100] In a possible implementation, the clustering of the resource set according to the attribute information of each resource in the resource set of the edge node set comprises: inputting the attribute information of each resource into a particle algorithm based on a target fitness function to obtain a resource clustering center output by the particle algorithm; taking the resource clustering center output by the particle algorithm as an initial resource clustering center for a FCM algorithm; and clustering the resource set by using the FCM algorithm to obtain a resource clustering result.
[0101] Each resource can be a particle respectively. The attribute of a resource can be the attribute of a particle.
[0102] After inputting the attribute information of each resource into the particle algorithm based on the target fitness function, the particle algorithm based on the target fitness function performs multiple iterations for updating the cluster centers. The cluster centers obtained when the last iteration performed by the particle algorithm based on the target fitness function is completed are the resource cluster centers output by the particle algorithm based on the target fitness function.
[0103] It should be noted that the number of the resource cluster centers output by the particle algorithm based on the target fitness function is multiple. Each resource cluster center output by the particle algorithm based on the target fitness function is an initial resource cluster center to which the FCM algorithm is directed respectively.
[0104] The resource cluster centers output by the particle algorithm based on the target fitness function being the initial resource cluster centers to which the FCM algorithm is directed can be understood as follows: before clustering the resource set by using the FCM algorithm, the resource cluster centers to which the FCM algorithm is directed are initialized as the resource cluster centers output by the particle algorithm based on the target fitness function.
[0105] When clustering the resource set by using the FCM algorithm, multiple iterations for updating the cluster centers to which the FCM algorithm is directed are performed. The resource clustering result is obtained when the last iteration for updating the cluster centers to which the FCM algorithm is directed performed by using the FCM algorithm is completed.
[0106] As an example, the target fitness function can be any existing fitness function for calculating the fitness of a particle.
[0107] As another example, the target fitness function is: ; wherein, s j denotes the standard deviation of the distance of the sample points in the cluster j to the cluster center of the cluster x i . j c j
[0108] ; wherein, d ij denotes the distance of the sample points in the cluster j to the cluster center of the cluster x i . j Euclidean distance between the cluster centers of the FCM algorithm, N j representing the number of samples in the cluster j .
[0109] wherein, when the cluster j is a task cluster, the sample point x i representing the attribute of the task in the cluster j . i j when the cluster x i representing the attribute of the resource in the cluster j . i
[0110] The method provided by the embodiment of the application considers the following problems: the FCM algorithm is sensitive to the initial cluster center, and when the initial position is greatly different from the global optimal position, the FCM algorithm is prone to fall into local optimization. The particle swarm algorithm compares the individual historical optimal position and the global optimal position in iteration, which makes the particle swarm algorithm better accelerate the convergence speed and avoid falling into local optimization due to prematurity. The method provided by the embodiment of the application optimizes the initial cluster center by the global optimization advantage of the particle swarm, thereby avoiding the local optimization problem. The global optimal solution is obtained by iterative optimization of the particle algorithm defined by the target fitness function, and then the global optimal solution is input as the initial value of the FCM algorithm, and finally the optimal solution is obtained by FCM fuzzy clustering, thereby realizing the double clustering of the tasks and the resources.
[0111] As an example of clustering by using the particle swarm algorithm and the FCM, the clustering by using the particle swarm algorithm and the FCM includes: Step 1), inputting sample data, sequentially performing standard deviation standardization and dispersion standardization on the sample data; wherein, when clustering the tasks, the sample data includes the attributes of each task, and when clustering the resources, the sample data includes the attributes of each resource; Step 2), initializing algorithm parameters, initializing the cluster classification number k, the fuzzy weighting index m, the maximum iteration number of the algorithm, the particle swarm learning factor and the like; Step 3), initializing the particle swarm, including: randomly setting the initial value of each particle in the particle swarm, the individual historical optimal position (pbest) of each particle and the global historical optimal position (gbest); Step 4), calculating the fitness value of the particle by using formula (2); updating the individual historical optimal position and the global historical optimal position of each particle; and updating the position and the speed of each particle.
[0112] (2) Step 5), if the termination condition is reached, stop the iteration, execute Step 6), otherwise return to Step 4). Step 6), determine the position of the particle when the iteration is stopped as the initial clustering center for the FCM algorithm. Wherein, the initial clustering center for the FCM algorithm is the clustering center for the FCM algorithm when Step 7) is executed for the first time.
[0113] Step 7), update the membership matrix according to the clustering center for the FCM algorithm by using formula (3): (3) Wherein, u ij indicates the data sample after updating the membership matrix i belongs to j the cluster, the membership degree is valued between [0, 1], c j indicates the clustering j center, k represents the number of clustering centers, d ij indicates the Euclidean distance between the data sample and the clustering center, d ij =|c j -x i | , m is the membership weight index, which is used to control the degree of fuzziness.
[0114] Step 8), calculate the objective function value of the FCM algorithm according to formula (4), determine whether the termination condition of the FCM algorithm is met according to the objective function value of the FCM algorithm, if the termination condition of the FCM algorithm is met, stop the iteration of the FCM algorithm, obtain the optimal membership set U , so as to determine the clustering of tasks and computing resources, otherwise execute Step 9).
[0115] (4) Step 9), update the clustering center for the FCM algorithm according to the membership matrix by using formula (5), and then return to Step 7), wherein, c j indicates the clustering center for the FCM algorithm after updating the clustering center for the FCM algorithm.
[0116] (5) In one possible implementation, the plurality of tasks has no execution order, each of the plurality of tasks can only be executed on one of the set of resources and the execution of the each of the plurality of tasks cannot be interrupted, each of the set of resources at any time executes at most one of the plurality of tasks.
[0117] Those skilled in the art should further understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in a general manner. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0118] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be implemented in hardware, software executed by a processor, or a combination of both. The software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0119] The above specific embodiments have further described the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for task execution based on a building energy system edge computing framework, the building energy system edge computing framework comprising: a set of edge nodes in a building energy system, the set of edge nodes comprising: Multiple primary edge nodes and multiple secondary edge nodes; The method includes: Based on the attribute information of each task in multiple tasks, multiple tasks are clustered to obtain task clustering results. Each task corresponds to equipment in the building energy system, and each task cluster in the task clustering results corresponds to different task types among multiple task types. The task clustering includes: the tasks of the task type corresponding to the task clustering. Based on the attribute information of each resource in the resource set of the edge node set, the resource set is clustered to obtain the resource clustering result. The resource set includes the resources of each edge node in the edge node set. Each resource cluster in the resource clustering result corresponds to a different resource type among multiple resource types. The resource cluster includes the resources of the resource type corresponding to the resource cluster. For each of the multiple primary edge nodes, the primary edge node executes a target task of a target task type that is assigned to the primary edge node and matches the resource type of the primary edge node's resources, or assigns the target task to a target secondary edge node that is governed by the primary edge node and whose resource type matches the target task type. When the target secondary edge node receives the target task, the target secondary edge node executes the target task.
2. The method of claim 1, wherein: Multiple task types include: compute requirement, bandwidth requirement, and storage requirement; multiple resource types include: compute, bandwidth, and storage. Compute requirement types are matched with compute type, bandwidth requirement types are matched with bandwidth type, and storage requirement types are matched with storage type.
3. The method of claim 1, wherein: The primary edge node is a DC distribution box, and the secondary edge node is a smart power distribution terminal.
4. The method of claim 1, wherein: Before executing a target task of a target task type that matches the resource type of the resources of the primary edge node and is issued to the primary edge node, or before issuing the target task to a target secondary edge node under the jurisdiction of the primary edge node whose resource type matches the target task type, the method further includes: A primary edge node acquires the resource usage of each secondary edge node under its jurisdiction, and based on the resource usage of the primary edge node and the resource usage of each secondary edge node under its jurisdiction, determines whether the primary edge node will execute the target task or distribute the target task to the target secondary edge node.
5. The method of claim 1, wherein: The building energy system includes: medium-voltage distribution substations and low-voltage distribution substations. Primary edge nodes are used to manage the medium-voltage substation tasks corresponding to the medium-voltage distribution substations, and secondary edge nodes are used to manage the low-voltage substation tasks corresponding to the low-voltage distribution substations.
6. The method of claim 1, wherein: The primary edge node communicates with the cloud server, which then distributes target tasks of the same type as the resources of the primary edge node.
7. The method of claim 6, wherein: The cloud server is used to cluster multiple tasks and resource sets.
8. The method of claim 1, wherein: Based on the attribute information of each task in the multiple tasks, the multiple tasks are clustered to obtain the task clustering results, including: The attributes of each of the multiple tasks are input into a particle algorithm based on a target fitness function to obtain the task clustering centers output by the particle algorithm. The task clustering centers output by the particle algorithm are used as the initial task clustering centers for the fuzzy C-means FCM algorithm. The FCM algorithm is used to cluster multiple tasks to obtain task clustering results.
9. The method of claim 1, wherein: Based on the attribute information of each resource in the resource set of the edge node set, the resource set is clustered to obtain the following resource clustering results: The attribute information of each resource is input into a particle algorithm based on a target fitness function to obtain the resource clustering centers output by the particle algorithm. The resource clustering centers output by the particle algorithm are used as the initial resource clustering centers for the FCM algorithm. The FCM algorithm is used to cluster the resource set to obtain the resource clustering results.
10. The method of claim 1, wherein: The multiple tasks do not have an execution order. Each of the multiple tasks can only be executed on one resource in the resource set, and the execution process of each task cannot be interrupted. Each resource in the resource set can execute at most one of the multiple tasks at any given time.