Service flow scheduling method, device and equipment of power physical bearer network, medium and product
Through the delay color-producing Petri network model and the weighted fair queueing scheduling algorithm, the deterministic delay requirements and data frame fairness in the power physical bearing network are solved, and the deterministic delay and network fairness of power services are realized.
Patent Information
- Application Number
- CN202510284966.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-03
AI Technical Summary
The prior art is difficult to meet the deterministic delay requirements of power business scenarios in power physical bearing networks, and it has failed to effectively solve the fairness problem between high-priority and low-priority data frames.
The delay color-producing Petri network model is used to model the service flow forwarding process in the power physical bearer network as a Petri network, and the weighted fair queueing scheduling algorithm is used to calculate the sequence number of Token, and the difference between the actual sending waiting time and the expected sending waiting time of the target Token is reduced through the insertion operation.
It realizes the deterministic delay requirements of power services in the power physical bearer network, improves the fairness between high-priority and low-priority data frames, and ensures the certainty and reliability of the network.
Smart Images

Figure CN120090988A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power automation, and particularly to a service flow scheduling method, device, equipment, medium and product for a power physical bearer network. Background Art
[0002] In the context of network function virtualization, for the infrastructure layer (i.e., the physical bearer network), related technologies are difficult to characterize the concurrency, priority differences, and node delay characteristics of multi-service flows when modeling and conducting service flow analysis of physical bearer network nodes. In addition, in order to reduce bursts and ensure the priority of deterministic service flows, related technologies have proposed a Credit-Based Shaper (CBS) scheduling algorithm; in order to avoid the delay uncertainty of high-priority data frames caused by low-priority data frames pre-empting transmission, a frame pre-emption mechanism has been proposed; in order to ensure scheduling fairness, a gating mechanism based on the idea of TDMA (Time Division Multiple Access) has been proposed, etc. However, related technologies do not consider the fairness issue between high-priority and low-priority data frames, and usually aim at delay optimization, and there is a problem that the deterministic delay requirements existing in the power service scenario cannot be met. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a service flow scheduling method, device, computer equipment, computer-readable storage medium and computer program product for a power physical bearer network that can meet the deterministic delay requirements of power service production and operation.
[0004] In a first aspect, the present application provides a service flow scheduling method for a power physical bearer network, including:
[0005] Obtain a delay-colored Petri net corresponding to the power physical bearer network; in the delay-colored Petri net, network nodes of the power physical bearer network are used as places, events for completing service flow forwarding are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as a delay parameter associated with the corresponding transition, physical links between each network node are used as directed arcs connecting the places and the transitions, the service flow is used as a token, and the token is dyed with different colors based on different time demand categories of the service flow; the time demand categories at least include a deterministic time demand category;
[0006] Determine, from the delay-colored Petri net, a target token corresponding to the service flow to be scheduled, a place into which the target token flows, and a plurality of token queues corresponding to the place where the target token is located; the service flow to be scheduled corresponds to a deterministic time demand category;
[0007] Calculate the serial number of each of the said tokens based on the weighted fair queuing scheduling algorithm principle;
[0008] With the goal of narrowing the difference between the actual transmission waiting time and the expected transmission waiting time of the said target token, perform an insertion operation on the target token according to the serial number of each token in multiple said token queues, a preset congestion discard threshold, and a preset hold queue threshold.
[0009] In one embodiment, the above-mentioned service flow scheduling method for the power physical bearer network further includes:
[0010] Divide all the said service flows according to the different time demand categories to obtain deterministic demand service flows and non-real-time demand service flows;
[0011] Respectively color the tokens corresponding to the deterministic demand service flows and the non-real-time demand service flows to obtain a delay-colored Petri net for the power physical bearer network.
[0012] In one embodiment, before calculating the serial number of each of the said tokens based on the weighted fair queuing scheduling algorithm principle, it further includes:
[0013] Determine the token length and forwarding rate in each of the said places according to the delay-colored Petri net;
[0014] Calculate the actual transmission waiting time of each of the said tokens according to the token length and the forwarding rate;
[0015] Take the token corresponding to the minimum value of the difference between the actual transmission waiting time and the expected transmission waiting time of the target token as the reference token; the reference token is used to determine the serial number of the target token.
[0016] In one embodiment, calculating the serial number of each of the said tokens based on the weighted fair queuing scheduling algorithm principle includes:
[0017] Calculate the serial number of each of the said tokens except the target token based on the weighted fair queuing scheduling algorithm principle;
[0018] Take the difference between the serial number of the reference token and 1 as the serial number of the target token.
[0019] In one embodiment, the step of performing an insertion operation on the target token with the goal of narrowing the difference between the actual transmission waiting time and the expected transmission waiting time of the target token according to the serial number of each token, a preset congestion discard threshold, and a preset hold queue threshold includes:
[0020] Obtain the first data packet length of the token queue corresponding to the reference token and the second data packet length of the place corresponding to the reference token; the first data packet length represents the sum of the data packet lengths of all the tokens included in the token queue corresponding to the reference token; the second data packet length represents the sum of the data packet lengths of all the tokens included in the place corresponding to the reference token;
[0021] Aim to reduce the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, and perform an insertion operation on the target token according to the first data packet length, the second data packet length, the sequence number of each token, the sequence number of the target token, a preset congestion discard threshold, and a preset holding queue threshold.
[0022] In one embodiment, the performing an insertion operation on the target token according to the first data packet length, the second data packet length, the sequence number of each token, the sequence number of the target token, a preset congestion discard threshold, and a preset holding queue threshold includes:
[0023] When the sum of the first data packet length and the data packet length of the target token is less than the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset holding queue threshold, insert the target token to the position of the reference token according to the sequence number of the target token and the sequence numbers of the respective tokens in the token sequence corresponding to the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward;
[0024] When the sum of the first data packet length and the data packet length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset holding queue threshold, insert the target token to the position of the reference token according to the sequence number of the target token and the sequence numbers of the respective tokens in the token sequence corresponding to the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward, use the token at the end of the token queue corresponding to the reference token as a transfer token, and insert the transfer token into other token queues according to the sequence number of the transfer token;
[0025] When the sum of the length of the first data packet and the length of the data packet of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the length of the second data packet and the length of the data packet of the target token is greater than or equal to the preset hold queue threshold, discard the token with the largest sequence number in the place, then insert the target token into the position of the reference token, move the positions of the reference token and the tokens following the reference token backward, use the token at the end of the token queue corresponding to the reference token as the transfer token, and insert the transfer token into other token queues according to the sequence number of the transfer token.
[0026] In a second aspect, the present application further provides a service flow scheduling device for a power physical bearing network, including:
[0027] A model determination module, configured to obtain a delay-colored Petri net corresponding to the power physical bearing network; in the delay-colored Petri net, network nodes of the power physical bearing network are used as places, events for completing service flow forwarding are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as the delay parameter associated with the corresponding transition, physical links between each network node are used as directed arcs connecting the places and the transitions, and the service flow is used as a token, and the token is colored differently based on different time demand categories of the service flow; the time demand categories at least include a deterministic time demand category;
[0028] A token determination module, configured to determine a target token corresponding to a service flow to be scheduled, the place where the target token flows in, and a plurality of token queues corresponding to the place where the target token is located from the delay-colored Petri net; the service flow to be scheduled corresponds to a deterministic time demand category;
[0029] A sequence number calculation module, configured to calculate the sequence number of each token based on the principle of the weighted fair queuing scheduling algorithm;
[0030] A token scheduling module, configured to aim at reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, and perform an insertion operation on the target token according to the sequence number of each token in a plurality of token queues, a preset congestion discard threshold, and a preset hold queue threshold.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] Obtain the timed colored Petri net corresponding to the power physical bearing network; in the timed colored Petri net, use the network nodes of the power physical bearing network as places, use the event of completing the service flow forwarding as transitions, use the forwarding delay of the service flow transmitted to each network node as the delay parameter associated with the corresponding transition, use the physical links between each network node as the directed arcs connecting the places and the transitions, and use the service flow as tokens, and the tokens are dyed with different colors based on different time demand categories of the service flow; the time demand categories at least include deterministic time demand categories;
[0033] Determine, from the timed colored Petri net, the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and the multiple token queues corresponding to the place where the target token is located; the service flow to be scheduled corresponds to the deterministic time demand category;
[0034] Calculate the sequence number of each token based on the weighted fair queuing scheduling algorithm principle;
[0035] Aim at reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, and perform an insertion operation on the target token according to the sequence number of each token in the multiple token queues, the preset congestion discard threshold, and the preset holding queue threshold.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Obtain the timed colored Petri net corresponding to the power physical bearing network; in the timed colored Petri net, use the network nodes of the power physical bearing network as places, use the event of completing the service flow forwarding as transitions, use the forwarding delay of the service flow transmitted to each network node as the delay parameter associated with the corresponding transition, use the physical links between each network node as the directed arcs connecting the places and the transitions, and use the service flow as tokens, and the tokens are dyed with different colors based on different time demand categories of the service flow; the time demand categories at least include deterministic time demand categories;
[0038] Determine, from the timed colored Petri net, the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and the multiple token queues corresponding to the place where the target token is located; the service flow to be scheduled corresponds to the deterministic time demand category;
[0039] Calculate the sequence number of each token based on the weighted fair queuing scheduling algorithm principle;
[0040] With the goal of reducing the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, an insertion operation is performed on the target token according to the sequence number of each token in multiple token queues, a preset congestion discard threshold, and a preset hold queue threshold.
[0041] In a fifth aspect, the present application also provides a computer program product, including a computer program, which when executed by a processor implements the following steps:
[0042] Obtain the delay-colored Petri net corresponding to the power physical bearer network; in the delay-colored Petri net, network nodes of the power physical bearer network are used as places, events of completing service flow forwarding are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as the delay parameter associated with the corresponding transition, physical links between each network node are used as directed arcs connecting the places and the transitions, the service flow is used as a token, and the token is colored differently based on different time demand categories of the service flow; the time demand categories at least include a deterministic time demand category;
[0043] Determine, from the delay-colored Petri net, the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and multiple token queues corresponding to the place where the target token is located; the service flow to be scheduled corresponds to the deterministic time demand category;
[0044] Based on the principle of the weighted fair queuing scheduling algorithm, calculate the sequence number of each token;
[0045] With the goal of reducing the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, an insertion operation is performed on the target token according to the sequence number of each token in multiple token queues, a preset congestion discard threshold, and a preset hold queue threshold.
[0046] The above-mentioned service flow scheduling method, device, computer equipment, computer-readable storage medium and computer program product for the power physical bearing network. The method obtains a timed colored Petri net corresponding to the power physical bearing network. In the timed colored Petri net, the network nodes of the power physical bearing network are used as places, the events of completing service flow forwarding are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as the delay parameter associated with the corresponding transition, the physical links between each network node are used as directed arcs connecting places and transitions, and the service flow is used as a token, and the token is colored differently based on different time demand categories of the service flow. The time demand categories at least include the deterministic time demand category. The constructed timed colored Petri net graphically represents the asynchronous concurrent behavior and priority difference characteristics of the power service flow. In addition, the mathematical analysis method of the timed colored Petri net can be used to analyze problems such as the reachability of multi-service flow concurrency and deadlocks caused by resource conflicts, so as to improve service planning and optimize resource allocation. Further, from the timed colored Petri net, the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and the multiple token queues corresponding to the place where the target token is located are determined. The service flow to be scheduled corresponds to the deterministic time demand category. Then, based on the principle of the weighted fair queuing scheduling algorithm, the sequence number of each token is calculated. With the goal of reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, according to the sequence number of each token in the multiple token queues, the preset congestion discard threshold, and the preset holding queue threshold, an insertion operation is performed on the target token, so that the target token obtains a deterministic sending waiting time, thereby meeting the deterministic delay requirement of the power service. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0048] Figure 1 It is a schematic flowchart of the service flow scheduling method for the power physical bearing network in an embodiment;
[0049] Figure 2 It is a schematic diagram of token queue scheduling in a place in an embodiment;
[0050] Figure 3 It is a schematic structural diagram of the timed colored Petri net of the power physical bearing network in an embodiment;
[0051] Figure 4Schematic diagram of the target token scheduling steps in an embodiment;
[0052] Figure 5 Schematic diagram of inserting the target token position in the first case in an embodiment;
[0053] Figure 6 Schematic diagram of inserting the target token position in the second case in an embodiment;
[0054] Figure 7 Schematic diagram of inserting the target token position in the third case in an embodiment;
[0055] Figure 8 Block diagram of the service flow scheduling device for the power physical bearer network in an embodiment;
[0056] Figure 9 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0057] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] For the above reasons, the present application provides a service flow scheduling method for a power physical bearer network, aiming to meet the deterministic delay requirements existing in the power service scenario.
[0059] In one embodiment, as Figure 1 shown, a service flow scheduling method for a power physical bearer network is provided. In this embodiment, it is exemplified that the method is applied to the system of a server. It can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is realized through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S102 to step S108. Among them:
[0060] Step S102, obtain the delay-colored Petri net corresponding to the power physical bearer network.
[0061] Among them, Petri Nets is an effective modeling and analysis tool for distributed systems. Compared with other modeling tools, the appropriate description of logical relationships and the support of strict mathematical theories are the unique advantages of Petri Nets. Petri Nets consists of four basic elements: places, transitions, directed arcs, and tokens. Places are usually used to model components that store or use resources, represented by circles; transitions are usually used to model operations. By the occurrence (Fire) of transitions, the resources in places are used to change the system state, represented by rectangles; directed arcs connect tokens and places, representing the flow relationship of the net; tokens represent the resources in places, represented by solid black dots or numbers.
[0062] Among them, in the time-delay colored Petri net, the network nodes of the power physical carrier network are used as places, the events of completing the forwarding of service flows are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as the time-delay parameter associated with the corresponding transition, the physical links between each network node are used as the directed arcs connecting places and transitions, and the service flow is used as a token, and the token is colored differently based on different time-demand categories of the service flow. Among them, the time-demand categories at least include the deterministic time-demand category. Among them, the power physical carrier network refers to the infrastructure that supports power services and information transmission in the power system, mainly used to transmit power-related data and signals to ensure the safe, reliable, and efficient operation of the power system. Among them, in the power physical carrier network, network nodes usually refer to devices and systems that connect and forward power service flows, such as substations, measurement devices, and communication devices. Among them, the power service flow refers to the information flow transmitted between each node in the power system, which can include real-time monitoring data, control instructions, alarms, and event information of the power system. Among them, the service flow message refers to the specific data packet transmitted in the power physical carrier network.
[0063] Among them, the colored Petri net (CPN, Colored Petri Net) colors the tokens on the basis of the prototype Petri Nets. Its essence is to classify the tokens to achieve the folding of the net system. Usually, the way to classify the tokens is to distinguish them by different colors. Similarly, it can also be used a dimensional vector to represent a Petri Nets with types of colors. The elements in the vector represent the number of tokens of each color.
[0064] Optionally, the system obtains the timed colored Petri net corresponding to the pre-constructed power physical bearing network of the system. According to the advantage that the timed colored Petri net supports the description and mathematical analysis of concurrent behaviors, the asynchronous concurrent behaviors and priority difference characteristics of power service flows transmitted at power physical bearing network nodes are modeled as a timed colored Petri net. The priorities of service flows are distinguished by token coloring, providing a basis for subsequent service flow scheduling.
[0065] Step 104: From the timed colored Petri net, determine the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and the multiple token queues corresponding to the place where the target token is located.
[0066] Among them, the service flow to be scheduled corresponds to a deterministic time demand category. The deterministic time demand category may refer to a service flow with deterministic requirements, which in the power system is real-time data and control flow information with strict requirements for events. Such service flows usually involve information that needs to be transmitted and processed within a specific time to ensure the safety and reliability of the system. Among them, the target token may be the token corresponding to the service flow of the deterministic time demand category, and the target token is determined before the service flow of the deterministic demand category flows into the place.
[0067] Optionally, the system determines the service flow to be scheduled from the timed colored Petri net through the color attributes corresponding to each service flow category introduced when constructing the timed colored Petri net, determines the target token that needs to be scheduled currently from the service flow to be scheduled, further determines the place where the target token flows in, and the multiple token queues corresponding to this place. It can be understood that each place corresponds to multiple token queues for processing. Generally speaking, a token queue includes service flow packets of the same type, that is, the tokens are arranged in the order of the inflow of service flows.
[0068] Step 106: Calculate the sequence number of each token based on the principle of the weighted fair queuing scheduling algorithm.
[0069] Among them, the Weighted Fair Queueing (WFQ) scheduling algorithm principle is a network traffic control algorithm aimed at fairly allocating network bandwidth to different data streams while considering the weights of each stream. It is widely used in routers and switches to optimize network performance and user experience, especially in multi-service environments such as video streaming and general data transmission. Among them, the sequence number can be the SN value (Sequence Number) in the WFQ rule. The SN value represents the virtual finish time of the data packet in WFQ, or is called the Finish Number. It is used to determine the sending order of data packets in the scheduler to ensure that different queues fairly allocate bandwidth according to their weights.
[0070] Optionally, the system calculates the sequence number of each token based on the weighted fair queueing scheduling algorithm principle. It should be noted that the sequence numbers of tokens other than the target token are calculated according to the traditional weighted fair queueing scheduling algorithm principle, and the sequence number of the target token is determined based on the sequence numbers of the remaining tokens and the sending waiting times of each token.
[0071] Step S108 aims to narrow the difference between the actual sending waiting time and the expected sending waiting time of the target token. According to the sequence number of each token in multiple token queues, the preset congestion discard threshold, and the preset hold queue threshold, an insertion operation is performed on the target token.
[0072] Among them, the actual sending waiting time can be the actual sending waiting time of the target token on the place node, while the expected sending waiting time can be the sending waiting time required for the target token on the place node to meet the end-to-end transmission delay of the power service flow being determined. Among them, the calculation method of the expected sending time can be: Assume the end-to-end propagation path delay of the target token is , is the expected sending waiting time of the target token at the physical place node i, is the inherent transmission delay of the channel, then and satisfy:
[0073]
[0074] is usually fixed. Therefore, to meet the end-to-end transmission delay of the power service flow being determined, it is necessary to fix the sending waiting time of the token at each physical place node.
[0075] Among them, the preset congestion discard threshold can be the sum of the packet lengths of the maximum number of tokens that each token queue can bear; among them, the preset holding queue threshold can be the sum of the packet lengths of the maximum number of tokens that each place node can bear.
[0076] Among them, the insertion operation can be an operation of inserting the target token into the appropriate position of the token queue determined after considering multi-dimensional factors.
[0077] It can be understood that there are usually transmissions of multiple service flows in a network node. In the network node, different service flows with different priorities are assigned to different queues through a classifier. In the time-delay coloring Petri net model, the network node is the place, and multiple tokens in the place are classified into multiple token queues. The token at the head of the queue can be scheduled and forwarded by the forwarder as Figure 2 shown, a schematic diagram of the token queue scheduling in the place is provided. Tokens that are not at the head of the queue need to wait for a certain sending waiting time before they can be scheduled. Figure 2 The one determined as the target token in
[0078] Optionally, the system aims to reduce the difference between the actual sending waiting time and the expected sending waiting time of the target token. According to the sequence number of each token in multiple token queues, the preset congestion discard threshold, and the preset holding queue threshold, an insertion operation is performed on the target token. It should be noted that after the insertion operation of the target token in the current place where it is located, if there is still a difference between its sending waiting time and the expected sending waiting time, when the target token is sent to the next place, the expected sending waiting time of the target token in the next place is corrected according to the difference for compensation until the target token is processed completely on the power physical bearing network.
[0079] In the above service flow scheduling method for the power physical bearer network, the method obtains a delay-colored Petri net corresponding to the power physical bearer network; in the delay-colored Petri net, the network nodes of the power physical bearer network are used as places, the events of completing service flow forwarding are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as the delay parameter associated with the corresponding transition, and the physical links between each network node are used as directed arcs connecting places and transitions, and the service flow is used as a token, and the token is colored in different colors based on different time demand categories of the service flow; the time demand categories at least include the deterministic time demand category; the constructed delay-colored Petri net graphically shows the asynchronous concurrent behavior and priority difference characteristics of the power service flow, and in addition, the mathematical analysis method of the delay-colored Petri net can be used to analyze problems such as the reachability of multi-service flow concurrency and deadlocks caused by resource conflicts, so as to improve service planning and optimize resource allocation; further, from the delay-colored Petri net, the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and the multiple token queues corresponding to the place where the target token is located are determined, and the service flow to be scheduled corresponds to the deterministic time demand category; then, based on the principle of the weighted fair queuing scheduling algorithm, the sequence number of each token is calculated; with the goal of reducing the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, according to the sequence number of each token in the multiple token queues, the preset congestion discard threshold, and the preset holding queue threshold, an insertion operation is performed on the target token, so that the target token obtains a deterministic transmission waiting time, thus meeting the deterministic delay requirement of the power service.
[0080] In an exemplary embodiment, the service flow scheduling method for the power physical bearer network described in the above embodiment further includes:
[0081] All service flows are divided according to different time demand categories to obtain deterministic demand service flows and non-real-time demand service flows; the tokens corresponding to the deterministic demand service flows and non-real-time demand service flows are respectively colored to obtain a delay-colored Petri net for the power physical bearer network.
[0082] Among them, the non-real-time demand service flow may refer to data and information flows with relatively loose time requirements in the power system or other types of networks. Such service flows do not need to be transmitted or processed within strict time limits and usually allow a certain delay or buffer time, such as historical data, information management type service flows.
[0083] Optionally, the system divides all service flows processed by the power physical bearer network into different time-demand categories, obtaining deterministic-demand service flows and non-real-time-demand service flows; respectively colors the tokens corresponding to the deterministic-demand service flows and the tokens corresponding to the non-real-time-demand service flows, obtaining a delay-colored Petri net for the power physical bearer network. For example, colors the tokens corresponding to the deterministic-demand service flows red and colors the non-real-time-demand service flows black, as Figure 3 shown, providing a schematic diagram of the structure of the delay-colored Petri net of the power physical bearer network.
[0084] In this embodiment, a color attribute is introduced to color the tokens corresponding to the deterministic-demand service flows and the non-real-time-demand service flows respectively, that is, the delay Petri net is extended to a delay-colored Petri net, providing differentiated bearer network services and resources for different power service types. For services such as data acquisition and monitoring, protection control, metering and billing, etc., the demand for time determinacy is relatively high. Therefore, the present invention uses the method of coloring tokens to achieve the effect of service flow classification and differentiation.
[0085] In an exemplary embodiment, before calculating the sequence number of each token based on the weighted fair queuing scheduling algorithm principle in step S106, it further includes:
[0086] According to the delay-colored Petri net, determine the length and forwarding rate of each token in each place; according to the token length and forwarding rate, calculate the actual sending waiting time of each token; use the token corresponding to the minimum value of the difference between the actual sending waiting time and the expected sending waiting time of the target token as the reference token.
[0087] Among them, the length of each token can be the data packet length of all tokens in the i-th place node.
[0088] Among them, the forwarding rate can be the data packet length of the tokens that can be processed and sent within unit time by the i-th physical place node.
[0089] Among them, the reference token is used to determine the sequence number of the target token.
[0090] Optionally, the system determines the length and forwarding rate of each token in each place according to the delay-colored Petri net, and calculates the actual sending waiting time of each token according to the length and forwarding rate of each token. The corresponding calculation formula is:
[0091]
[0092] Among them, represents the token length in the i-th place, represents the forwarding rate of the i-th physical place node, Indicates the token P in the i-th place K The actual sending waiting time of
[0093] Further, the system takes the token corresponding to the minimum value of the difference between the calculated actual sending waiting time and the expected sending waiting time of the target token as the reference token, providing a basis for subsequent target token scheduling.
[0094] In this embodiment, by calculating the actual sending waiting time of each token, a reference token with an actual sending waiting time approximately equal to the expected sending waiting time of the target token is determined from all tokens, facilitating the execution of an insertion operation on the target token based on the reference token, so as to reduce the difference between the actual sending waiting time and the expected sending waiting time of the target token, thereby meeting the need for deterministic delay of the service flow corresponding to the target token.
[0095] In an exemplary embodiment, step S106 calculates the sequence number of each token based on the principle of the weighted fair queuing scheduling algorithm, including:
[0096] Based on the principle of the weighted fair queuing scheduling algorithm, calculate the sequence number of each token except the target token; take the difference between the sequence number of the reference token and 1 as the sequence number of the target token.
[0097] Optionally, the system calculates the sequence number of each token except the target token based on the principle of the weighted fair queuing scheduling algorithm, and the corresponding calculation method is:
[0098]
[0099] Among them, is the sequence number of the token to be calculated, is the sequence number of the previous token of the token to be calculated, is the weight, is the packet length of the token to be calculated. Among them, the weight can be obtained by dividing the actual packet size by the sum of the IP priority and 1.
[0100] Further, take the difference between the sequence number of the reference token and 1 as the sequence number of the target token, and the corresponding calculation method is:
[0101]
[0102] Among them, is the sequence number of the target token, is the sequence number of the reference token.
[0103] In this embodiment, after determining the reference token with the smallest difference between the actual transmission waiting time and the expected transmission waiting time of the target token, the sequence number of the reference token is decremented by 1 to obtain the sequence number of the target token, which facilitates subsequent scheduling of the target token according to the sequence number, thereby improving the accuracy of scheduling.
[0104] In an exemplary embodiment, step S108 aims to reduce the difference between the actual transmission waiting time and the expected transmission waiting time of the target token. An insertion operation is performed on the target token according to the sequence number of each token, a preset congestion discard threshold, and a preset hold queue threshold, including:
[0105] Obtain the first packet length of the token queue corresponding to the reference token and the second packet length of the place corresponding to the reference token; aiming to reduce the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, perform an insertion operation on the target token according to the first packet length, the second packet length, the sequence number of each token, the sequence number of the target token, the preset congestion discard threshold, and the preset hold queue threshold.
[0106] Wherein, the first packet length may be the sum of the packet lengths of all tokens included in the token queue corresponding to the reference token, and the second packet length may be the sum of the packet lengths of all tokens included in the place corresponding to the reference token.
[0107] Optionally, the system obtains the first packet length of the token queue corresponding to the reference token and the second packet length of the place corresponding to the reference token. Aiming to reduce the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, and on the premise of ensuring the normal operation of each network node in the power-carrying physical network during the scheduling process, perform an insertion operation on the target token with the sequence number as the priority in the token queue according to the first packet length, the second packet length, the sequence number of each token, the sequence number of the target token, the preset congestion discard threshold, and the preset hold queue threshold.
[0108] In this embodiment, aiming to reduce the difference between the actual transmission waiting time and the expected transmission waiting time of the target token, an insertion operation is performed on the target token according to the first packet length, the second packet length, the sequence number of each token, the sequence number of the target token, the preset congestion discard threshold, and the preset hold queue threshold. This not only meets the deterministic delay requirement of the target token, but also actively discards some tokens when the system is overloaded (to avoid the avalanche effect), while maintaining the minimum queue length to ensure service continuity. It prevents network nodes from being paralyzed due to instantaneous overload and ensures the transmission priority of critical power control signals.
[0109] In an exemplary embodiment, such asFigure 4 As shown, the content of performing an insertion operation on the target token according to the first data packet length, the second data packet length, the serial number of each token, the serial number of the target token, the preset congestion discard threshold, and the preset hold queue threshold in the above embodiment includes steps S402 to S406. Among them:
[0110] Step S402, when the sum of the first data packet length and the data packet length of the target token is less than the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset hold queue threshold, insert the target token to the position of the reference token according to the serial number of the target token and the serial numbers of each token in the token sequence corresponding to the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward.
[0111] Among them, the position of the token can be the position where the token is located in the token queue.
[0112] Optionally, as Figure 5 shown, a schematic diagram of inserting the target token in the first case is provided. When the sum of the first data packet length and the data packet length of the target token is less than the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset hold queue threshold, it indicates that after scheduling the target token to the token queue where the reference token is located, the network node is still operating normally. Therefore, the system inserts the target token to the position of the reference token according to the serial number of the target token and the serial numbers of each token in the token sequence corresponding to the reference token, and moves the positions of the reference token and the tokens subsequent to the reference token backward.
[0113] Step S404, when the sum of the first data packet length and the data packet length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset hold queue threshold, insert the target token to the position of the reference token according to the serial number of the target token and the serial numbers of each token in the token sequence corresponding to the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward. Take the token at the end of the token queue corresponding to the reference token as the transfer token, and schedule the transfer token to other token queues according to the serial number of the transfer token.
[0114] Optionally, as Figure 6As shown in the figure, a schematic diagram of inserting the target token in the second case is provided. When the sum of the length of the first data packet and the length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the length of the second data packet and the length of the target token is less than the preset holding queue threshold, it indicates that after inserting the target token into the token queue where the reference token is located, it will cause the token queue to be too long and trigger the tail-drop mechanism. Therefore, in order to minimize token discarding within the range of tokens that the place can handle, the system inserts the target token to the position of the reference token according to the serial number of the target token and the serial numbers of each token in the token sequence corresponding to the reference token, moves the positions of the reference token and the tokens following the reference token backward, uses the token at the tail of the token queue corresponding to the reference token as the transfer token, and inserts the transfer token into other token queues according to the serial number of the transfer token.
[0115] Step S406, when the sum of the length of the first data packet and the length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the length of the second data packet and the length of the target token is greater than or equal to the preset holding queue threshold, discard the token with the largest serial number in the place, then insert the target token to the position of the reference token, move the positions of the reference token and the tokens following the reference token backward, use the token at the tail of the token queue corresponding to the reference token as the transfer token, and insert the transfer token into other token queues according to the serial number of the transfer token.
[0116] Optionally, as Figure 7 shown in the figure, a schematic diagram of inserting the target token in the third case is provided. When the sum of the length of the first data packet and the length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the length of the second data packet and the length of the target token is greater than or equal to the preset holding queue threshold, it indicates that after inserting the target token into the token queue where the reference token is located, it will not only cause the token queue to be too long and trigger the tail-drop mechanism, but also exceed the range of tokens that the place can handle. Therefore, the system discards the token with the largest serial number in the place, then inserts the target token to the position of the reference token, moves the positions of the reference token and the tokens following the reference token backward, uses the token at the tail of the token queue corresponding to the reference token as the transfer token, and inserts the transfer token into other token queues according to the serial number of the transfer token.
[0117] In this embodiment, different processing methods are set according to the queue situation and place situation after inserting the target token into the token queue where the reference token is located, including direct insertion, transferring the tail token of the queue, or discarding the token, which can avoid the problem of scheduling fairness as much as possible, ensure the normal operation of the power physical bearer network, improve the token scheduling efficiency, and achieve resource optimization, etc.
[0118] In an exemplary embodiment, another service flow scheduling method for a power physical bearer network is provided, including:
[0119] Step 1, model the power physical bearer network through a Timed Colored Petri Net (TCPN) that can express asynchronous delay parameters and distinguish token attributes, so as to describe the asynchronous concurrent behavior and priority difference characteristics of power service flows during transmission in physical network nodes. First, model the power physical bearer network as a Timed Petri Net (TdPN), and the modeling rule is: model the power physical bearer network nodes (power network infrastructure resources) as places, model the event "complete service flow forwarding" as a transition, model the physical links between physical bearer network nodes as directed arcs connecting places and transitions, model the service flow packets as tokens, and model the forwarding delay of service flows at each node as a delay parameter associated with the transition, that is, it means that the token forwarding is completed after time units in the model. Further, introduce a color attribute to dye the tokens, that is, extend the Timed Petri Net to a Timed Colored Petri Net. In order to provide differentiated bearer network services and resources for different power service types, such as services like data acquisition and monitoring, protection control, metering and billing have high requirements for time determinacy. Therefore, the present invention uses the method of dyeing tokens to achieve the effect of service flow classification and differentiation.
[0120] Among them, a quadruple meeting the following conditions is called a Petri Nets: and are finite sets and satisfy: , ; is a set of directed arcs and satisfies: . Among them, and represent the sets of places and transitions respectively, describes the flow relationship of the net , represents the set of directed arc weights.
[0121] Among them, the Timed Petri Nets (TdPN) is another branch of Petri Nets containing time factors, first proposed by C. Ramchandani and used to analyze the performance of asynchronous concurrent systems. For example, TdPN is a six-tuple , where is a prototype Petri Nets, is a set of delay elements defined on the transition set , and , for , It means that it takes x time units to complete passing through place p. The marking is a binary tuple , where (p-marking) is the marking of the prototype Petri Nets, , (t-marking) is the marking regarding the transition delay parameter, and for , .
[0122] Among them, the colored Petri net dyes the tokens on the basis of the prototype Petri Nets. Its essence is to classify the tokens to achieve the folding of the net system. Usually, the way to classify the tokens is to distinguish them by different colors. Similarly, it can also be represented by a d-dimensional vector to represent a Petri Nets with d kinds of colors. The elements in the vector represent the number of tokens of each color. A colored Petri net is a five-tuple , where:
[0123]
[0124]
[0125] In the formula, k represents that there are k kinds of token colors.
[0126] Step 2, establish a deterministic place queue scheduling model. Based on the delay-colored Petri net model constructed by the physical bearer network, the deterministic place queue scheduling model is established below. Usually, there are multiple service flows transmitted in the network nodes. In the nodes, the classifier will allocate service flows with different priorities to different queues. In the Petri net model, the nodes are places. The multiple tokens in the places are classified into multiple token queues. The token at the head of the queue can be scheduled and forwarded by the forwarder, and the tokens not at the head of the queue need to wait for a certain transmission waiting time before being scheduled. Assume that the end-to-end propagation path delay of token is , is the transmission waiting time of token at the physical place node i, is the inherent transmission delay of the channel, then and satisfy: , is usually fixed. Therefore, to satisfy that the end-to-end transmission delay of the power service flow is determined, it is necessary to fix token The transmission waiting time at each physical place node. Assume that the token The desired and determined transmission waiting time at the physical place node i is , if Waiting in the token queue n Just reaches the head of the queue and is forwarded, then the demand is exactly met. However, usually there may be Arrive at the head of the token queue early, but in order to ensure the determined transmission waiting time Do not forward, which affects the scheduling of other tokens in the queue, resulting in head-of-line blocking (HOLB). The larger the value, the more serious the HOLB. Therefore, in order to eliminate HOLB, based on the WFQ scheduling algorithm, for tokens with deterministic requirements (red tokens) A dedicated sequence number Calculation method is designed as follows: According to the WFQ scheduling principle, record the scheduling order of all tokens in the physical place node through the set P, and calculate the SN value of each token through the following formula. By calculating the transmission waiting time of all tokens in P , denoted as the set ; find the token in the set with the smallest difference from , record the difference , if it is , then specify The SN value of is: , according to Insert into the appropriate position in the token queue. There are three cases for the insertion method: Case 1: The length of the token queue where is inserted is less than the congestion discard threshold preset for the token queue , and the sum of the packet lengths of all token queues in the place is less than the preset hold queue threshold, then the token and subsequent tokens are shifted backward in turn, and the token is inserted into the original position of the token . Case 2: The length of the token queue where is inserted is greater than or equal to the congestion discard threshold of the token queue , and the sum of the packet lengths of all token queues in the place is less than the preset hold queue threshold, then the token and subsequent tokens are shifted backward in turn, and the token is inserted into the token to its original position, and the token at the end of the queue is used as a transfer token and inserted into other token queues according to its serial number. Case 3: the token queue where it is located insert after that, the length is greater than or equal to the congestion discard threshold of the token queue preset, and the sum of the packet lengths of all token queues in the place is greater than or equal to the preset holding queue threshold, then execute the tail discard policy, discard the current largest token, and then execute the insertion method of Case 2. Finish After the insertion, the transmission waiting time at the current physical place node i can be approximately equal to , if there is still an error , the next place node i + 1 will adjust the transmission waiting time according to the error waiting time error correction until it is processed on the power physical bearing network.
[0127] In this embodiment, Petri Nets, as a network modeling tool with a rigorous mathematical theory and multi-level analysis capabilities, can effectively model distributed systems and concurrent dynamic characteristics, depict the concurrency, priority differences, and node delay characteristics of multi-service flows in the power physical bearing network, and can further analyze its dynamic and static properties using mathematical analysis methods. This embodiment provides a method for analyzing and modeling the service flow of nodes in a power physical bearing network. Based on the timed colored Petri net, the concurrent behavior and priority difference characteristics of the service flow during transmission in physical network nodes are modeled as a timed colored Petri net. The token coloring is used to distinguish the service flow priorities, and on this basis, a deterministic place queue scheduling model is established. By specially calculating the serial numbers of the deterministic demand tokens, the token queue sorting is adjusted to enable the token to obtain a deterministic transmission waiting delay at each physical place node, thereby providing end-to-end deterministic delay for power services.
[0128] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0129] Based on the same inventive concept, an embodiment of the present application further provides a service flow scheduling device for a power physical bearer network for implementing the service flow scheduling method for the power physical bearer network described above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the service flow scheduling device for the power physical bearer network provided below can refer to the limitations on the service flow scheduling method for the power physical bearer network in the above text, and will not be repeated here.
[0130] In an exemplary embodiment, as Figure 8 shown, a service flow scheduling device 800 for a power physical bearer network is provided, including: a model determination module 802, a token determination module 804, a sequence number calculation module 806, and a token scheduling module 808, where:
[0131] The model determination module 802 is configured to obtain a timed colored Petri net corresponding to the power physical bearer network; in the timed colored Petri net, the network nodes of the power physical bearer network are used as places, the events of completing service flow forwarding are used as transitions, the forwarding delay of the service flow transmitted to each network node is used as the delay parameter associated with the corresponding transition, and the physical links between each network node are used as directed arcs connecting the places and transitions, and the service flow is used as a token, and the token is colored differently based on different time demand categories of the service flow; the time demand categories at least include deterministic time demand categories.
[0132] The token determination module 804 is configured to determine, from the timed colored Petri net, the target token corresponding to the service flow to be scheduled, the place where the target token flows in, and the multiple token queues corresponding to the place where the target token is located; the service flow to be scheduled corresponds to the deterministic time demand category.
[0133] The sequence number calculation module 806 is configured to calculate the sequence number of each token based on the principle of the weighted fair queuing scheduling algorithm.
[0134] The token scheduling module 808 is used to aim at reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, and perform an insertion operation on the target token according to the serial number of each token in multiple token queues, a preset congestion discard threshold, and a preset holding queue threshold.
[0135] Further, in one embodiment, the model determination module 802 is further used to divide all service flows into different time demand categories to obtain deterministic demand service flows and non-real-time demand service flows; respectively color the tokens corresponding to the deterministic demand service flows and the non-real-time demand service flows to obtain a delay-colored Petri net for the power physical bearing network.
[0136] Further, in one embodiment, the token determination module 804 is further used to determine the token length and forwarding rate in each place according to the delay-colored Petri net; calculate the actual sending waiting time of each token except the target token according to the token length and the forwarding rate; use the token corresponding to the minimum value of the difference between the actual sending waiting time and the expected sending waiting time of the target token as the reference token; the reference token is used to determine the serial number of the target token.
[0137] Further, in one embodiment, the serial number calculation module 806 is further used to calculate the serial number of each token except the target token based on the principle of the weighted fair queuing scheduling algorithm; use the difference between the serial number of the reference token and 1 as the serial number of the target token.
[0138] Further, in one embodiment, the token scheduling module 808 is further used to obtain the first packet length of the token queue corresponding to the reference token and the second packet length of the place corresponding to the reference token; aim at reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, and perform an insertion operation on the target token according to the first packet length, the second packet length, the serial number of each token, the serial number of the target token, a preset congestion discard threshold, and a preset holding queue threshold.
[0139] Further, in one embodiment, the token scheduling module 808 is further configured to, when the sum of the first data packet length and the data packet length of the target token is less than a preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than a preset hold queue threshold, insert the target token into the position of the reference token according to the sequence number of the target token and the sequence numbers of the tokens in the token sequence corresponding to the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward; when the sum of the first data packet length and the data packet length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset hold queue threshold, insert the target token into the position of the reference token according to the sequence number of the target token and the sequence numbers of the tokens in the token sequence corresponding to the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward, take the token at the end of the token queue corresponding to the reference token as the transfer token, and insert the transfer token into other token queues according to the sequence number of the transfer token; when the sum of the first data packet length and the data packet length of the target token is greater than or equal to the preset congestion discard threshold, and the sum of the second data packet length and the data packet length of the target token is greater than or equal to the preset hold queue threshold, discard the token with the largest sequence number in the place, then insert the target token into the position of the reference token, and move the positions of the reference token and the tokens subsequent to the reference token backward, take the token at the end of the token queue corresponding to the reference token as the transfer token, and insert the transfer token into other token queues according to the sequence number of the transfer token.
[0140] Each module in the above service flow scheduling device 800 of the power physical bearer network can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory in the computer device in software form so that the processor can call and execute the operations corresponding to the above modules.
[0141] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 9As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as power service flows and data related to time-delay colored Petri nets. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it realizes a method for scheduling service flows in a power physical bearing network.
[0142] Those skilled in the art can understand that Figure 9 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0143] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are realized.
[0144] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are realized.
[0145] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are realized.
[0146] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.
[0147] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in this application.
[0148] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for scheduling service flows in a power physical bearer network, characterized in that: The method comprises: Obtain a delay-colored Petri net corresponding to the electric power physical bearer network; in the delay-colored Petri net, the network nodes of the electric power physical bearer network are used as places, the event of completing the forwarding of the service flow is used as a transition, the forwarding delay of the service flow to each of the network nodes is used as a delay parameter associated with the corresponding transition, and the physical links between each of the network nodes are used as directed arcs connecting the places and the transitions, and the service flow is used as a token, and the token is colored with different colors based on different time demand categories of the service flow; the time demand category at least includes a deterministic time demand category; Determine from the delay colored Petri net the target token corresponding to the service flow to be scheduled, the location where the target token flows, and multiple token queues corresponding to the location where the target token is located; the service flow to be scheduled corresponds to a deterministic time requirement category; Based on the principle of weighted fair queuing scheduling algorithm, calculating the sequence number of each token; With the goal of reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, the target token is inserted according to the sequence number of each token in the multiple token queues, the preset congestion drop threshold and the preset retention queue threshold.
2. The method according to claim 1, characterized in that The method further comprises: Dividing all the business flows according to the different time demand categories to obtain deterministic demand business flows and non-real-time demand business flows; The tokens corresponding to the deterministic demand service flow and the non-real-time demand service flow are colored respectively to obtain a delay colored Petri net for the power physical bearer network.
3. The method according to claim 1, characterized in that The method based on the weighted fair queuing scheduling algorithm principle, before calculating the sequence number of each token, further includes: Determining the length and forwarding rate of each token in each of the places according to the time-delay colored Petri net; Calculating the actual sending waiting time of each of the tokens except the target token according to the token length and the forwarding rate; A token corresponding to the minimum value of the difference between the actual sending waiting time and the expected sending waiting time of the target token is used as a reference token; the reference token is used to determine the sequence number of the target token.
4. The method according to claim 3, characterized in that The step of calculating the sequence number of each token based on the weighted fair queuing scheduling algorithm principle includes: Based on the weighted fair queuing scheduling algorithm principle, calculating the sequence number of each of the tokens except the target token; The difference between the serial number of the reference token and 1 is used as the serial number of the target token.
5. The method according to claim 3, characterized in that: The method aims to reduce the difference between the actual sending waiting time and the expected sending waiting time of the target token, and performs an insertion operation on the target token according to the sequence number of each token, a preset congestion drop threshold and a preset retention queue threshold, including: Obtaining a first data packet length of the token queue corresponding to the reference token and a second data packet length of the library corresponding to the reference token; the first data packet length represents the sum of the data packet lengths of all the tokens included in the token queue corresponding to the reference token; the second data packet length represents the sum of the data packet lengths of all the tokens included in the library corresponding to the reference token; With the goal of reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token, an insertion operation is performed on the target token according to the first data packet length, the second data packet length, the sequence number of each of the tokens, the sequence number of the target token, a preset congestion drop threshold, and a preset retention queue threshold.
6. The method according to claim 5, characterized in that The inserting operation on the target token is performed according to the first data packet length, the second data packet length, the sequence number of each of the tokens, the sequence number of the target token, a preset congestion drop threshold, and a preset retention queue threshold, including: When the sum of the first data packet length and the data packet length of the target token is less than the preset congestion drop threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset retention queue threshold, inserting the target token into the position of the reference token according to the sequence number of the target token and the sequence number of each token in the token sequence corresponding to the reference token, and shifting the positions of the reference token and the token subsequent to the reference token backward; In the case where the sum of the first data packet length and the data packet length of the target token is greater than or equal to the preset congestion drop threshold, and the sum of the second data packet length and the data packet length of the target token is less than the preset retention queue threshold, according to the sequence number of the target token and the sequence number of each token in the token sequence corresponding to the reference token, the target token is inserted into the position of the reference token, the reference token and the token subsequent to the reference token are moved backward, the token at the end of the token queue corresponding to the reference token is used as a transfer token, and the transfer token is inserted into other token queues according to the sequence number of the transfer token; When the sum of the first data packet length and the data packet length of the target token is greater than or equal to the preset congestion drop threshold, and the sum of the second data packet length and the data packet length of the target token is greater than or equal to the preset retention queue threshold, the token with the largest sequence number in the library is discarded, and then the target token is inserted into the position of the reference token, and the positions of the reference token and the token subsequent to the reference token are moved backward, the token at the end of the token queue corresponding to the reference token is used as a transfer token, and the transfer token is inserted into other token queues according to the sequence number of the transfer token.
7. A service flow scheduling device for a power physical bearer network, characterized in that: The device comprises: A model determination module is used to obtain a delay-colored Petri net corresponding to the electric power physical bearer network; in the delay-colored Petri net, the network nodes of the electric power physical bearer network are used as places, the events of completing the forwarding of service flows are used as transitions, the forwarding delay of the service flows transmitted to each of the network nodes is used as a delay parameter associated with the corresponding transition, and the physical links between the network nodes are used as directed arcs connecting the places and the transitions, and the service flows are used as tokens, and the tokens are colored with different colors based on different time demand categories of the service flows; the time demand categories at least include deterministic time demand categories; A token determination module, used to determine, from the delay colored Petri net, a target token corresponding to a service flow to be scheduled, a location where the target token flows, and a plurality of token queues corresponding to the location where the target token is located; the service flow to be scheduled corresponds to a deterministic time requirement category; A sequence number calculation module, used for calculating the sequence number of each token based on the weighted fair queuing scheduling algorithm principle; The token scheduling module is used to perform an insertion operation on the target token according to the sequence number of each token in the multiple token queues, a preset congestion drop threshold and a preset retention queue threshold, with the goal of reducing the difference between the actual sending waiting time and the expected sending waiting time of the target token.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.