Disclosure of Invention
The invention provides a data routing method and a data routing system for an edge network container for distributed equipment aggregation, which aim to solve the problem of high communication cost of the existing distributed equipment coordination control.
In a first aspect, an edge network container data routing method for distributed device aggregation is provided, where the method includes:
s1: the dispatching center generates a linked list of the power control quantity of the distributed equipment according to dispatching requirements and sends the linked list to control containers of all the edge devices;
s2: after each control container receives the linked list, extracting scheduling constraints of the header nodes, wherein the scheduling constraints comprise root node adjusting time, root node adjusting power and a distribution network root node set;
s3: comparing the scheduling constraint of the table header node in the linked list with the distributed equipment data in the control container by the control container; when the equipment adjusting time is longer than the root node adjusting time and the equipment distribution network node number belongs to a distribution network root node set, writing the distributed equipment data in the control container into the linked list nodes, and updating the root node adjusting power of the list node by using the residual adjusting power; otherwise, executing step S5;
s4: when the adjusting power of the root node in the header nodes is more than zero, building a linked list node and executing the step S5; otherwise, when the adjusting power of the root node in the header node is less than or equal to zero, executing the step S7;
s5: the control container obtains the communication cost and the communication link pheromone concentration of all the control containers adjacent to the control container, and the forwarding probability of the linked list in different links is calculated; determining a forwarding link in a roulette mode, writing a destination container address of the forwarding link into a newly-built linked list node, and forwarding the linked list to a next control container;
s6: repeating the steps S2 to S5;
s7: the control container transmits the linked list to a dispatching center, the dispatching center calculates the number of nodes of the linked list after receiving the linked list, and the linked list is inserted into a queue with the smallest number of nodes and with dequeuing priority; forming a node number sequence X (N) by N linked list node numbers inserted into the queue newly, wherein N is less than or equal to N, and calculating the variance D [ X (N) ] of the node number sequence; when the variance satisfies the convergence condition, that is, the variance satisfies D [ X (n) ] < μ, where μ is a preset threshold, performing step S9; otherwise, executing step S8;
s8: extracting container addresses and distributed equipment data of all nodes of a linked list with the minimum number of nodes in the queue, calculating the pheromone concentration of a communication link corresponding to the container addresses, and updating the pheromone concentration of the communication link between the containers; returning to the step S7;
s9: extracting the data of the linked list with the minimum number of nodes in the queue to obtain a control container data transmission routing path which meets the scheduling requirement and has the minimum communication cost
Further, step S1 is preceded by:
s0: the method comprises the steps that a dispatching center issues a distributed equipment aggregation dispatching instruction to an edge device, the edge device starts a controlled container after receiving the instruction, and after the controlled container and the distributed equipment establish unique mapping relation and communication connection, equipment adjusting power, equipment adjusting time, equipment type codes and equipment distribution network node numbers of the distributed equipment are obtained and packaged into distributed equipment data in the controlled container.
Further, the process of comparing the scheduling constraint of the header node with the distributed device data in the control container in step S3 is as follows:
distribution network root node set R for controlling container i to extract head nodes
root And acquiring the equipment distribution network node number R of the distributed equipment i
i And judging the equipment distribution network node number R
i Whether the node belongs to a distribution network root node set R
root (ii) a Obtaining distribution network root node adjusting time T
agg Device throttling time with distributed device i
Comparing root node adjustment times T of header nodes
agg Time adjustment with the apparatus
If it is
Or
Skipping step S4 and executing step S5; if R is
i ∈R
root And is
Controlling a container to obtain device regulated power for distributed devices
The available capacity loss for distributed device power scaling is calculated as:
regulating power of distributed devices
Loss of available capacity
And equipment distribution network node number R
i And writing the linked list nodes.
Further, updating the root node regulation power of the table head node with the residual regulation power comprises:
regulating power according to equipment
Calculating the remaining regulated power of the header node
Wherein, P
agg Adjusting power for the root node, wherein k is the total number of nodes of non-header nodes in the linked list;
regulating power with surplus
And replacing the root node of the header node to adjust the power, and realizing the update of the root node adjusted power.
Further, the forwarding probability of the linked list at different links is calculated by the following method:
the control container where the current linked list is located is taken as a source container, and the container address is recorded as w
i (ii) a The control container which can be reached by linked lists adjacently is taken as a target container, and the container address is recorded as w
j The average bandwidth occupancy of the communication link from the source container to the destination container is
Average time delay of
The link transmits data at a communication cost of
Alpha is parameter weight, and the communication link pheromone concentration of the link is lambda
i,j Obtaining the forwarding probability P (i, j) of the linked list in the link as follows:
wherein, U is the control container address set that the current linked list is adjacent to and can reach, and C is the control container address set that the forwarding path of the current linked list passes through.
Further, the determining of the forwarding link by the roulette method specifically includes:
correspondingly dividing the interval of [0,1] into a plurality of subintervals according to the forwarding probability of the linked list in different links;
according to roulette rules, the control container generates a random number between 0 and 1, and a corresponding forwarding link is determined according to a subinterval to which the random number belongs.
Further, updating the pheromone concentration of the communication link between the control containers specifically includes:
taking the container address of a node in the linked list with the minimum number of nodes in the queue as the container address of the source container i, and extracting the container address of the node of the next linked list of the source container i as the container address of the target container j, wherein the communication link pheromone concentration updating formula is as follows:
wherein λ is
i,j Indicating the pheromone concentration of the communication link between control containers i and j,
the device representing the destination container j adjusts the power,
representing the available capacity loss of a target container j, wherein k is the total number of nodes of non-header nodes in a linked list, sigma is an pheromone volatilization factor, and m is the global pheromone updating frequency;
and updating the concentration of the pheromone of the communication link between all adjacent control containers in the linked list with the minimum node number by adopting the communication link pheromone concentration updating formula.
In a second aspect, an edge network container data routing system for distributed device aggregation is provided, including:
the dispatching center is used for generating a linked list of the power control quantity of the distributed equipment according to dispatching requirements and sending the linked list to the control containers of the edge devices; and realizing the optimal routing path selection, wherein the optimal routing path selection process is as follows:
a1: receiving a linked list returned by a control container, calculating the node number of the linked list, inserting the linked list into a queue with the node number being minimum and dequeuing being preferred, forming a node number sequence by N node numbers of the linked list newly inserted into the queue, and calculating the variance of the node number sequence; when the variance meets the convergence condition, executing the step A3; otherwise, executing the step A2;
a2: extracting container addresses and distributed equipment data of all nodes of a linked list with the minimum number of nodes in the queue, calculating the pheromone concentration of a communication link corresponding to the container addresses, and updating and controlling the pheromone concentration of the communication link between the containers; returning to the step A1;
a3: extracting data of a linked list with the minimum number of nodes in the queue to obtain a control container data transmission routing path which meets the scheduling requirement and has the minimum communication cost;
the system comprises a plurality of control containers, wherein each control container is correspondingly arranged in an edge device and is used for realizing the forwarding of the linked list, and the forwarding process of the linked list comprises the following steps:
b1: after the control container receives the linked list, extracting scheduling constraints of the header nodes, wherein the scheduling constraints comprise root node adjusting time, root node adjusting power and a distribution network root node set;
b2: comparing the scheduling constraints of the header nodes with the distributed equipment data in the control container; when the equipment adjusting time is longer than the root node adjusting time and the equipment distribution network node number belongs to a distribution network root node set, writing the distributed equipment data into the linked list nodes and updating the root node adjusting power of the head nodes with the residual adjusting power; otherwise, executing step B4;
b3: when the adjusting power of the root node in the header nodes is more than zero, building a linked list node and executing the step B4; otherwise, the linked list is forwarded to the dispatching center;
b4: acquiring the communication cost and the pheromone concentration of communication links of all control containers adjacent to the control containers, and calculating the forwarding probability of the linked list in different links; determining a forwarding link in a roulette mode, writing a destination container address of the forwarding link into a newly-built linked list node, and forwarding the linked list to a next control container;
b5: and (5) repeating the steps B1 to B4.
Advantageous effects
The invention has proposed a edge network container data routing method and system used for distributed apparatus to aggregate, including two cycles of running at the same time, one of them is that the control center sends the link table to each control container, each control container searches the route automatically and joins the link table, return the link table to the control center after finishing the route search; and the other is that the dispatching center updates the pheromone concentration of the communication link according to the data of the linked list with the minimum node number received by the dispatching center, realizes the updating of the current optimal link weight, acts on the previous cycle, improves the maximum power of the control container and the selection probability of the optimal link until the variance of the sequence formed by the node numbers of the linked lists received by the dispatching center most recently meets the convergence condition, and finally extracts the data of the linked list with the minimum node number in the queue to obtain the data transmission routing path of the control container, which meets the dispatching requirement and has the minimum communication cost. The distributed device adjustable resource self-heuristic search method can obtain a container data transmission routing path with the minimum communication scheduling cost of the distributed device, reduce the communication overhead of the distributed device control container cooperative interaction in the edge network, and improve the reliability of distributed device aggregation scheduling.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
The invention relates to an information transmission process of distributed resource aggregation of a power distribution system, which is used for determining an optimal transmission path of distributed resource scheduling information so as to reduce communication overhead of distributed coordination control of massive flexible resources. The following detailed description of embodiments of the invention refers to the accompanying drawings.
An embodiment of the present invention provides a method for routing container data of an edge network for aggregation of distributed devices, where as shown in fig. 2, a scheduling center issues a linked list of device power control quantities to an edge device according to a scheduling requirement of a distribution network. The control container of the distributed equipment is deployed on the edge device and is responsible for data acquisition and coordination control of the distributed equipment. In one embodiment, the control container is a collection of micro-service programs, including micro-service programs such as collection, control, analysis, remote interface, etc., and has the capability of acquiring data and analyzing decision independently through networking. The control container is in communication connection with the distributed equipment by using the edge device, directly exchanges data with the communication interface of the distributed equipment to acquire the real-time state of the distributed equipment, and dynamically adjusts the real-time power of the equipment according to the scheduling instruction.
Specifically, in an edge network formed by interconnection of edge devices, the following method is adopted to carry out information interaction coordination of distributed equipment and control data routing self-organization coordination in a container group. As shown in fig. 1, the method specifically comprises the following steps:
s1: the dispatching center issues a distributed equipment aggregation dispatching instruction to the edge device, the edge device initializes the control container after receiving the instruction, the edge device starts the control container of the governed distributed equipment and distributes a unique communication address w of an edge network for the control container i . The edge device binds the data interface of the distributed equipment terminal with the control container, and establishes the unique communication connection and mapping relation between the distributed equipment and the control container. The control container obtains distributed device data, determines device adjustment power, device adjustment time, device distribution network node number, device type and the like of a single device, and stores the device adjustment power, the device adjustment time, the device distribution network node number, the device type and the like in a data mounting volume of the control container.
S2: and the dispatching center determines the adjusting power and the adjusting time of the distributed equipment aggregate dispatching according to the dispatching requirement of the distribution network, and generates a linked list of the distributed equipment power control quantity. And the dispatching center acquires the load of the edge network, sets the maximum sending quantity of the linked lists, and sends the linked lists to a control container of the distribution network edge device.
S3: the control container i receives the linked list, extracts the scheduling constraints of the head nodes, the scheduling constraints including the root node adjustment time T agg Root node adjusts power P agg Distribution network root node set R root . The distribution network root node set comprises distribution network node numbers of all root node subordinate nodes.
S4: controlling container i to obtain distributed device data to adjust time for devices
Plant regulating power
Equipment distribution network node number R
i The control container compares the table head node data in the chain table with the distributed equipment data;
distribution network root node set R for controlling container i to extract head nodes
root And acquiring the equipment distribution network node number R of the distributed equipment i
i And judging the equipment distribution network node number R
i Whether belong to distribution network root node set R
root (ii) a Obtaining root node adjustment time T
agg Device throttling time with distributed device i
Comparing root node adjustment times T of header nodes
agg Time adjustment with the apparatus
If it is
Or
Skipping S5, executing S6, wherein the corresponding node in the linked list still retains the container address of the control container, but the distributed device data is empty; if R is
i ∈R
root And is
Device throttling power to control container to obtain distributed device i
Calculating available capacity loss for distributed device power scaling
Comprises the following steps:
regulating power according to equipment
Calculating the remaining regulated power of the header node
k is the total number of nodes of non-header nodes in the linked list; regulating power to a device
Loss of available capacity
Device distribution network node number R
i Writing to linked list nodes to adjust power with residual
And replacing the root node of the header node to adjust the power, and realizing the update of the root node adjusted power.
S5: the control container reads the root node adjusting power (namely the residual adjusting power) in the head nodes of the table, when the root node adjusting power is larger than zero, a linked list node is newly built at the tail part of the linked list, and the step S6 is executed; otherwise, step S8 is performed.
S6: the edge device traverses the control container addresses of the linked list nodes to obtain a control container address set C passed by the linked list forwarding path; acquiring a control container address set which is adjacent to and reachable by the current linked list as U; the control container i where the current linked list is located is the source container, and the address is recorded as w
i (ii) a The control container j which can be reached by the adjacent linked list is the target container, and the address is recorded as w
j Obtaining the average bandwidth occupancy rate of a communication link between a control container i and a control container j
Average time delay of
Calculating communication cost of data transmitted by link
Alpha is the parameter weight; obtaining the pheromone concentration of a communication link between a control container i and a control container j to be lambda
i,j The link table forwarding probability P (i, j) is calculated as:
correspondingly dividing the interval of [0,1] into a plurality of subintervals according to the forwarding probability of the linked list in different links; according to the roulette rule, the control container generates a random number between 0 and 1, and determines a corresponding forwarding link according to a sub-interval to which the random number belongs. And writing the destination container address of the forwarding link into the newly-built linked list node, and forwarding the linked list data to the next control container.
S7: and repeating the steps S3 to S6.
S8: the control container forwards the linked list to the dispatch center.
S9: the dispatching center receives the linked list data, calculates the node number of the single linked list, and inserts the linked list into the queue with the node number being minimum and dequeuing being prior;
taking the node numbers of the N (10 in this embodiment) linked lists that are newly enqueued to form a node number sequence X (N) = { k = 1 、k 2 、…、k 10 }, calculating the variance D [ X (n) of the node number sequence](ii) a When the variance satisfies the convergence condition D [ X (n)]When the mu is less than or equal to mu, the mu is a preset threshold value, and the step S11 is executed; otherwise, step S10 is executed.
S10: extracting the container address of the link list with the minimum number of nodes in the queue and the distributed equipment data, taking the container address of a node in the link list with the minimum number of nodes in the queue as the container address of a source container i, and extracting the container address of a node of the next link list of the source container i as the container address of a target container j, wherein the communication link pheromone concentration updating formula is as follows:
wherein λ is
i,j Indicating the pheromone concentration of the communication link between control containers i and j,
the device representing the destination container j adjusts the power,
representing the available capacity loss of a target container j, wherein k is the total number of nodes of non-header nodes in a linked list, s is an pheromone volatilization factor, and m is the global pheromone updating frequency;
and updating the communication link pheromone concentration between all adjacent control containers in the linked list with the minimum node number by adopting the communication link pheromone concentration updating formula. After the update is completed, the process returns to step S9.
The process realizes the updating of the current optimal link weight, acts in the step S6, and improves the maximum power of the control container and the selection probability of the optimal link, so that the linked list newly received by the scheduling center is the linked list with the minimum node number.
S11: and extracting the data of the link table with the minimum number of nodes in the queue to obtain a control container data transmission routing path which meets the scheduling requirement and has the minimum communication cost.
As can be seen from the above steps and fig. 1, the method includes two cycles running simultaneously, one of which is that the scheduling center sends a linked list to each control container, each control container automatically searches for a path and adds the linked list, and the linked list is returned to the scheduling center after the path search is completed; and the other is that the dispatching center selects the data of the linked list with the minimum node number according to the received linked list to update the pheromone concentration of the communication link, so as to realize the update of the current optimal link weight, the selection probability of the optimal link and the maximum power of the control container is improved when the selection probability acts on the previous cycle until the variance of a sequence formed by the node numbers of the linked lists received by the dispatching center at the latest meets the convergence condition, and finally, the data of the linked list with the minimum node number in the queue is extracted, so that the data transmission routing path of the control container, which meets the dispatching requirement and has the minimum communication cost, is obtained. The self-heuristic search method for the adjustable resources of the distributed equipment can obtain a container data transmission routing path with the minimum dispatching communication cost of the distributed equipment, reduce the communication overhead of cooperative interaction of the control containers of the distributed equipment in the edge network and improve the reliability of aggregate dispatching of the distributed equipment.
The embodiment of the present invention further provides an edge network container data routing system for distributed device aggregation, including:
the dispatching center is used for generating a linked list of the power control quantity of the distributed equipment according to dispatching requirements and sending the linked list to the control containers of the edge devices; and realizing the optimal routing path selection, wherein the optimal routing path selection process is as follows:
a1: receiving a linked list returned by the control container, calculating the node number of the linked list, inserting the linked list into a queue with the node number being minimum and being dequeued preferentially, forming a node number sequence by N linked list node numbers newly inserted into the queue, and calculating the variance of the node number sequence; when the variance meets the convergence condition, executing the step A3; otherwise, executing the step A2;
a2: extracting container addresses and distributed equipment data of all nodes of a linked list with the minimum number of nodes in the queue, calculating the pheromone concentration of a communication link corresponding to the container addresses, and updating and controlling the pheromone concentration of the communication link between the containers; returning to the step A1;
a3: extracting data of a linked list with the minimum number of nodes in the queue to obtain a control container data transmission routing path which meets the scheduling requirement and has the minimum communication cost;
the system comprises a plurality of control containers, wherein each control container is correspondingly arranged in an edge device and is used for realizing the forwarding of the linked list, and the forwarding process of the linked list comprises the following steps:
b1: after the control container receives the linked list, extracting scheduling constraints of the header nodes, wherein the scheduling constraints comprise root node adjusting time, root node adjusting power and a distribution network root node set;
b2: comparing the scheduling constraints of the header nodes with the distributed equipment data in the control container; when the equipment adjusting time is longer than the root node adjusting time and the equipment distribution network node number belongs to a distribution network root node set, writing the distributed equipment data into the linked list nodes and updating the root node adjusting power of the head nodes with the residual adjusting power; otherwise, executing step B4;
b3: when the adjusting power of the root node in the header nodes is more than zero, building a linked list node and executing the step B4; otherwise, the linked list is forwarded to a dispatching center;
b4: acquiring the communication cost and the pheromone concentration of communication links of all control containers adjacent to the control containers, and calculating the forwarding probability of the linked list in different links; determining a forwarding link in a roulette mode, writing a destination container address of the forwarding link into a newly-built linked list node, and forwarding the linked list to a next control container;
b5: and (5) repeating the steps B1 to B4.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.