Deterministic Network Time-Triggered Flow Scheduling Optimization Method, Device, Equipment and Medium
By using breadth-first search and Gray Wolf algorithm to optimize time-triggered flow scheduling in deterministic networks, the problems of high computational complexity and dynamic reconfiguration are solved, efficient TT flow scheduling is achieved, and network performance and real-time are improved.
Patent Information
- Application Number
- CN202510412256.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-03
AI Technical Summary
Existing deterministic networks have high computational complexity in TT flow scheduling, difficult to adapt to dynamic network reconfiguration, and difficult to meet real-time application requirements.
The breadth-first search algorithm is used to generate a directed network graph, and the population is initialized using the gray wolf algorithm, and the optimal time trigger flow scheduling method is found through iterative optimization, which simulates the hunting behavior of gray wolf to update the scheduling plan.
It reduces the computational complexity, improves scheduling efficiency, optimizes network resource utilization, reduces transmission delay, and meets real-time application needs.
Smart Images

Figure CN119922118B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technologies, and particularly relates to a method, apparatus, device, and medium for optimizing the scheduling of deterministic network time-triggered flows. Background Art
[0002] Deterministic networking is an emerging communication technology that operates at the data link layer and aims to ensure deterministic low-latency communication by implementing a series of standards. IEEE 802.1Qbv specifies a Time-Aware Shaper (TAS) for scheduling Time-Triggered (TT) flows and other traffic. This standard allows up to 8 transmission queues to be supported on each egress port of a switch and uses a Gating Control List (GCL) to control the traffic transmission time of each queue. The core of its implementation of deterministic communication lies in its scheduling ability for TT traffic. TT traffic is a type of hard real-time traffic that needs to be transmitted with deterministic low latency and jitter.
[0003] Currently, the research and use of deterministic network for TT flow scheduling focus on Satisfiability Modulo Theories (SMT), Integer Linear Programming (ILP), or Constraint Programming (CP). SMT, CP, and ILP generally have high computational complexity, rely on the performance of solvers, are difficult to handle large-scale problems, and have low scalability. As the network scale increases, the efficiency of their solutions will drop sharply. In addition, there are problems of high computational complexity, long scheduling time, and difficulty in adapting to dynamic network reconfiguration. Summary of the Invention
[0004] Embodiments of this application provide a method, apparatus, device, and medium for optimizing the scheduling of deterministic network time-triggered flows.
[0005] In a first aspect, embodiments of this application provide a method for optimizing the scheduling of deterministic network time-triggered flows, including:
[0006] Generating a network directed graph corresponding to the deterministic network topology according to the topology of the deterministic network;
[0007] Using the breadth-first search algorithm to find the shortest path from the source node to the destination node corresponding to each time-triggered flow in the network directed graph;
[0008] Initializing a gray wolf population based on the shortest path of the time-triggered flow and pre-set gray wolf algorithm parameters, where the gray wolf population includes multiple gray wolf individuals, and the multiple gray wolf individuals respectively represent various different time-triggered flow scheduling methods, and the gray wolf algorithm parameters at least include population size, constraint conditions, and objective function;
[0009] Iteratively execute the following steps A to C until a preset termination condition is met, to obtain an updated final gray wolf population:
[0010] Step A: Calculate the fitness of each grey wolf individual in the grey wolf population by using a pre-constructed fitness function, where the fitness function is constructed based on the average end-to-end delay of the time-triggered flow;
[0011] Step B: Determine the top three grey wolf individuals sorted in descending order of fitness values in the grey wolf population as the alpha wolves according to the fitness values of each grey wolf individual;
[0012] Step C: For each grey wolf individual other than the alpha wolves in the grey wolf population, update its own position according to the distance between itself and the positions of the alpha wolves, so as to obtain the corresponding updated time-triggered flow scheduling method;
[0013] Determine the time-triggered flow scheduling method corresponding to the grey wolf individual with the largest fitness value in the finally updated grey wolf population as the optimal scheduling method.
[0014] In a second aspect, an embodiment of the present application provides a deterministic network time-triggered flow scheduling optimization device, where the device includes:
[0015] A generation module, configured to generate a network directed graph corresponding to the deterministic network topology according to the topology of the deterministic network;
[0016] A search module, configured to use the breadth-first search algorithm to search for the shortest path from the source node to the destination node corresponding to each time-triggered flow in the network directed graph;
[0017] An initialization module, configured to initialize the grey wolf population based on the shortest path of the time-triggered flow and pre-set grey wolf algorithm parameters, where the grey wolf population includes multiple grey wolf individuals, and the multiple grey wolf individuals respectively represent various different time-triggered flow scheduling methods, and the grey wolf algorithm parameters at least include population size, constraint conditions, and objective function;
[0018] An iteration module, configured to iteratively execute the following steps A to C until a preset termination condition is met, so as to obtain the finally updated grey wolf population:
[0019] Step A: Calculate the fitness of each grey wolf individual in the grey wolf population by using a pre-constructed fitness function, where the fitness function is constructed based on the average end-to-end delay of the time-triggered flow;
[0020] Step B: Determine the top three grey wolf individuals sorted in descending order of fitness values in the grey wolf population as the alpha wolves according to the fitness values of each grey wolf individual;
[0021] Step C: For each grey wolf individual other than the alpha wolves in the grey wolf population, update its own position according to the distance between itself and the positions of the alpha wolves, so as to obtain the corresponding updated time-triggered flow scheduling method;
[0022] A determination module, configured to determine the time-triggered flow scheduling method corresponding to the gray wolf individual with the largest fitness value in the updated final gray wolf population as the optimal scheduling method.
[0023] In a third aspect, an embodiment of the present application provides an electronic device, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the deterministic network time-triggered flow scheduling optimization method described in any embodiment of the first aspect are implemented.
[0024] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of the deterministic network time-triggered flow scheduling optimization method described in any embodiment of the first aspect are implemented.
[0025] In a fifth aspect, an embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the deterministic network time-triggered flow scheduling optimization method provided in the first aspect of the embodiments of the present application.
[0026] The deterministic network time-triggered flow scheduling optimization method, device, equipment and medium of the embodiments of the present application simulate the hunting behavior of gray wolves, have strong global search ability, can effectively explore the solution space and find the optimal solution; can adapt to different types of optimization problems, including continuous and discrete problems, and have broad application potential; have low computational complexity, can find better solutions within a reasonable time, and are suitable for large-scale problems. Thus, the traffic scheduling mechanism of the deterministic network can ensure the priority and transmission time of time-triggered flows in the network, thereby optimizing the utilization rate of network resources, reducing transmission delays, and improving the overall network performance to meet the needs of real-time applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0028] Figure 1 is a flowchart of a deterministic network time-triggered flow scheduling optimization method provided by an embodiment of the present application;
[0029] Figure 2 is a flowchart of a method for finding all possible paths of a time-triggered flow provided by an embodiment of the present application;
[0030] Figure 3 It is a flowchart showing another method for optimizing deterministic network time-triggered flow scheduling provided by an embodiment of the present application;
[0031] Figure 4 It is a structural diagram of a deterministic network time-triggered flow scheduling optimization device provided by an embodiment of the present application;
[0032] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present application.
[0033] Reference numerals:
[0034] Deterministic network time-triggered flow scheduling optimization device 400, generation module 401, search module 402, initialization module 403, iteration module 404, determination module 405,
[0035] Electronic device 500, processor 501, memory 502, communication interface 503, bus 510. Detailed implementation manners
[0036] The features and exemplary embodiments of various aspects of the present application will be described in detail below. To make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only intended to provide a better understanding of the present application by showing examples of the present application.
[0037] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, elements defined by the statement "including..." do not exclude the presence of additional identical elements in the process, method, article or device including the said elements.
[0038] Deterministic services exhibit characteristics such as large bandwidth, high reliability, and low latency, and reliable communication methods need to be introduced to solve service access. Traditional network technologies (such as Ethernet and industrial fieldbuses) have many deficiencies in providing deterministic communication services. Unpredictable delays may occur under high load, unable to meet the requirements of real-time applications. There is a lack of interoperability between different industrial fieldbus standards, restricting the integration of devices and systems. Existing network technologies have not provided a unified deterministic communication solution for deterministic services.
[0039] A deterministic network is a network technology that emphasizes the predictability and reliability of communication, ensuring that the delay and fluctuation of data transmission in the network are controllable, and can achieve deterministic delay, jitter, packet loss rate, and bandwidth in information transmission. In order to vigorously promote the development of new automation systems, the key technologies of deterministic networks are introduced into automation systems to achieve the high-reliability, low-latency, and intelligent development of automation systems.
[0040] A deterministic network is a new emerging communication technology that works at the data link layer, aiming to ensure deterministic low-latency communication by implementing a series of standards. IEEE 802.1 Qbv specifies a Time-Aware Shaper (TAS) for scheduling Time-Triggered (TT) flows and other traffic. This standard allows up to 8 transmission queues to be supported on each egress port of the switch, and uses a Gate Control List (GCL) to control the traffic transmission time of each queue. The core of its implementation of deterministic communication lies in its scheduling ability for TT traffic. TT traffic is a hard real-time traffic that needs to be transmitted with deterministic low latency and jitter.
[0041] Currently, the research and use of deterministic network for TT flow scheduling focus on Satisfiability Modulo Theories (SMT), Integer Linear Programming (ILP), or Constraint Programming (CP). SMT, CP, and ILP generally have high computational complexity, rely on the performance of solvers, are difficult to handle large-scale problems, and have low scalability. As the network scale increases, the efficiency of their solutions will drop sharply. In addition, there are problems of high computational complexity, long scheduling time, and difficulty in adapting to dynamic network reconfiguration.
[0042] To solve the problems of related technologies, the embodiments of the present application provide an optimization method, device, equipment, and medium for deterministic network time-triggered flow scheduling.
[0043] The following combines the accompanying drawings to elaborate in detail on the optimization method for deterministic network time-triggered flow scheduling provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0044] Figure 1 Shows a schematic flowchart of an optimization method for deterministic network time-triggered flow scheduling according to an embodiment of the present application. As Figure 1As shown in the figure, the method for optimizing the deterministic network time-triggered flow scheduling may specifically include the following steps:
[0045] S101. Generate a network directed graph corresponding to the deterministic network topology according to the topology of the deterministic network;
[0046] S102. Use the breadth-first search algorithm to find the shortest path from the source node to the destination node corresponding to each time-triggered flow in the network directed graph;
[0047] S103. Initialize the gray wolf population based on the shortest path of the time-triggered flow and the preset gray wolf algorithm parameters. The gray wolf population includes multiple gray wolf individuals, and the multiple gray wolf individuals respectively represent various different time-triggered flow scheduling methods. The gray wolf algorithm parameters at least include the population size, constraint conditions, and objective function;
[0048] S104. Iteratively execute the following steps A to C until the preset termination condition is met to obtain the updated final gray wolf population:
[0049] Step A: Calculate the fitness of each gray wolf individual in the gray wolf population using the pre-constructed fitness function, and the fitness function is constructed based on the average end-to-end delay of the time-triggered flow;
[0050] Step B: According to the fitness values of each gray wolf individual, determine the top three gray wolf individuals sorted in descending order of fitness values in the gray wolf population as the alpha wolves;
[0051] Step C: For each gray wolf individual other than the alpha wolves in the gray wolf population, update its own position according to the distance from its own position to the alpha wolves' positions to obtain the corresponding updated time-triggered flow scheduling method;
[0052] S105. Determine the time-triggered flow scheduling method corresponding to the gray wolf individual with the largest fitness value in the updated final gray wolf population as the optimal scheduling method.
[0053] Thus, according to the transmission path and start transmission time of each flow in the network, a queuing delay-free calculation method is adopted to ensure that the transmission time slots of each flow do not conflict on each link and within each supercycle. This mechanism effectively realizes the flow scheduling, optimizes the utilization rate of network resources, reduces the transmission delay, and improves the overall network performance. Moreover, by simulating the hunting behavior of gray wolves, it has strong global search ability, can effectively explore the solution space and find the optimal solution; it can adapt to different types of optimization problems, including continuous and discrete problems, and has broad application potential; its computational complexity is relatively low, it can find a better solution within a reasonable time, is suitable for large-scale problems, and is suitable for the rapid application of various optimization problems.
[0054] As shown in Table 1 below, the meanings of the parameters in the following formula are shown.
[0055] Table 1
[0056]
[0057] It should be noted that in this embodiment, each time-triggered flow is defined as a nine-tuple, including its period , length or window size required for the transmission frame , deadline , frame priority , source node , destination node , fitness of the frame , number of links in the route and a set containing the route and scheduling information of each link in the route nine elements. That is: .
[0058] It should be noted that for each scheduling , it includes three parameters, described as a triple . Among them, s.z represents the routing link allocated in the reverse order, that is is the destination link, is the source link; represents the number of instances of the frame in the link; represents the offset of each instance starting from the period of the instance.
[0059] The following introduces the specific implementation methods of the above steps.
[0060] In some embodiments, in S101, obtain the topological structure information of the deterministic network, the basic information of all time-triggered flows in the deterministic network, and the set of all links, so as to abstract the deterministic network topology into a network directed graph according to the obtained information using the graph representation method in graph theory . Specifically, the network directed graph includes a vertex set and an edge set : The vertex set represents the union of the set of deterministic network terminal devices and the set of deterministic network switches , that is, it can be expressed as , where the symbol represents the union of sets, meaning that V contains ES and SW all elements in, but does not include duplicates; the edge set Characterize several links in a deterministic network .
[0061] Among them, each link is a unidirectional link, and the link corresponds to a predefined identifier one by one, that is, it is defined by its unique identifier. It should also be understood that since the transmission links in a deterministic network are full-duplex, for any communication between two nodes in a deterministic network, there are two independent links in opposite directions, which are respectively used for data transmission in opposite directions.
[0062] In some embodiments, in S102, the breadth-first search algorithm (BFS, Breadth-First Search) is used to find all transmission paths from the source node to the destination node corresponding to each time-triggered flow in the network digraph; calculate the cost function values of all transmission paths of the time-triggered flow, and minimize the cost function to obtain the shortest path of the time-triggered flow.
[0063] Reference Figure 2 , is a specific step flowchart for finding all possible paths of the time-triggered flow. As Figure 2 shown, for each source node in the set F, a queue Q and a set visited are constructed; the source node is inserted into the queue and marked as visited; when the queue Q is not empty, a node is taken out of the queue and processed (recording the path); traverse all neighbor nodes of the current node: if the neighbor node has not been visited, add it to the queue and mark it as visited; when the queue is empty, store the path; thus, return all possible paths of the nodes in the set F.
[0064] Optionally, as shown in Table 2 below, the specific algorithm logic for the above steps of finding all possible paths of the time-triggered flow may include:[[]]
[0065] Table 2
[0066]
[0067] In this way, through the breadth-first search algorithm, start traversing the graph from the source node , use the queue to store the nodes to be visited, use the set visited to mark the visited nodes to avoid repeated visits, and add the traversed nodes to the paths list in order, and finally return the list. That is, for each source node in the set F, calling the bfs function can find all possible paths starting from this source node, add the paths of each source node to the all_paths list, and finally return the list.
[0068] Further, as an optional embodiment, the cost function values of all transmission paths of the time-triggered flow can be calculated according to the following formulas (1) and (2), and the cost function is minimized to obtain the shortest path of the time-triggered flow:
[0069] ; (1)
[0070] ; (2)
[0071] Wherein, represents the th time-triggered flow; represents the set of all time-triggered flows; represents the i th time-triggered flow source node; represents the i th time-triggered flow destination node; represents the existence of a link, 1 for existence and 0 for non-existence; represents the cost function of the path of each flow.
[0072] In this way, based on the cost function of the shortest path of each TT flow in formulas (1) and (2), the paths passed by the flow are summed up, expressed by the cost function, the cost function values of all possible paths of the flow are obtained and minimized, so as to find the shortest path passed by the traffic.
[0073] Further, in some embodiments, the corresponding objective function and constraint conditions are set according to the network topology, TT flow parameters and scheduling requirements.
[0074] Optionally, the objective function is: ; (3)
[0075] Wherein, represents the i th time-triggered flow end-to-end delay; n represents the number of time-triggered flows. That is, the objective function is to minimize the end-to-end delay of the TT flow.
[0076] Optionally, the constraint conditions include delay constraint, time slot occupancy constraint and maximum transmission offset constraint;
[0077] The delay constraint is: ; (4)
[0078] Wherein, represents the i th time-triggered flow period;
[0079] The time slot occupancy constraint is as follows: ; (5)
[0080] Wherein, represents the number of links passed by the i th time-triggered flow ; represents the i th time-triggered flow length or the window size required for transmission;
[0081] The maximum transmission offset constraint is as follows: ; (6)
[0082] Wherein, represents the offset of any time-triggered flow F in the set of all time-triggered flows.
[0083] That is: the delay constraint is that the TT flow must complete transmission within its period; the time slot occupancy constraint is to judge whether the TT flow can be optimized; the maximum transmission offset constraint is that there must be a maximum offset for each flow . In this embodiment, the period of the flow is used to define the maximum transmission offset allowed for each flow. Then, for any flow belonging to the set F of flows, the offset of this flow is less than or equal to the period of this flow.
[0084] Therefore, according to the shortest paths of all TT flows, the grey wolf population and population parameters can be initialized by the objective function and constraint conditions, that is, S103 is executed.
[0085] It should be noted that in this embodiment, multiple grey wolf individuals in the grey wolf population respectively represent various different time-triggered flow scheduling methods.
[0086] Furthermore, in some embodiments, a fitness function is designed according to the average end-to-end delay and link utilization rate of TT flows to evaluate the scheduling priority of TT flows, thereby defining the status of each TT flow scheduling scheme in the scheduling scheme, that is, initializing the alpha, beta, and delta wolves (the leading wolves) in the grey wolf population, which are used to guide the movement (i.e., position update) of other wolves in the subsequent iteration process. Thus, the TT flow scheduling with low fitness obeys the TT flow scheduling with high fitness for optimization and improvement.
[0087] Specifically in implementation, the fitness function can be constructed according to the following formula (7):
[0088] ; (7)
[0089] Among them, represents the fitness of the i th time-triggered flow ; represents the average end-to-end delay; represents the number of cycles of the existing time slots; represents the cumulative sum of all unused time slots; represents the i th time-triggered flow period; 、 is the adjustment coefficient.
[0090] It can be understood that the role of the adjustment coefficient 、 is to balance the influence of time delay and time slots during the fitness evaluation process. Specifically, the selection of this coefficient is based on the numerical ranges of time delay and time slots, with the aim of ensuring that these two factors can be fairly compared in the fitness evaluation.
[0091] Furthermore, in some embodiments, in S104, after initializing α, β, and δ wolves according to the fitness function, by calculating the fitness value, it is evaluated whether each population individual can be optimized, that is, it is traversed and judged whether each flow scheduling scheme can be optimized. If it can be optimized, the optimizable scheduling scheme is updated; the scheduling scheme is iteratively adjusted, that is, after traversing each TT flow, the fitness value evaluation is returned, and α, β, and δ wolves are selected, and each flow scheduling scheme is traversed and optimized. This is repeated until the preset scheduling end condition is met, and the iterative adjustment of the scheduling scheme ends. Finally, all solutions in the solution space are traversed, and the scheduling solution with the minimum cost value of the scheduling objective function is output, and the scheduling result is output.
[0092] Optionally, according to the following formula (8), for each gray wolf individual in the gray wolf population except the leading wolf, its position is updated according to the distance from its own position to the leading wolf's position, so as to obtain the corresponding updated time-triggered flow scheduling method, so as to update the optimizable scheduling scheme:
[0093] ; (8)
[0094] Among them, represents the position of the i th time-triggered flow in the next generation after optimization; , , respectively represent the positions of the three time-triggered flow scheduling time slots corresponding to the leading wolf α, β, and δ wolves during the iteration process; A coefficient that varies with the number of iterations, used to control the search range; and and respectively represent the distances between the i th time-triggered flow scheduling time slot and the three time-triggered flows corresponding to α, β, and δ wolves.
[0095] Optionally, as shown in Table 3 below, the specific algorithm logic for determining the optimal scheduling method may include:
[0096] Table 3
[0097]
[0098] It can be seen that obtaining network topology information, TT flow information, and possible paths for each TT flow; traversing each TT flow, calculating the cost of each flow, sorting the TT flows according to the cost to determine the shortest path for each TT flow; initializing the population and performing optimization; traversing all TT flows, accumulating the delay of each flow to obtain the total end-to-end delay of all TT flows; defining constraint conditions, including delay constraints, time slot occupancy constraints, and maximum offset constraints; defining the objective function as minimizing the end-to-end delay; when the preset termination condition is not met, iteratively adjusting the scheduling scheme: traversing each individual in the population, calculating its fitness, and selecting the optimal three wolves (α, β, δ), determining whether the individual can be optimized, if it can be optimized, then updating its scheduling scheme, that is, after selecting the optimal three wolves, updating the positions of all individuals in the population, specifically by calculating the position of the next generation of the TT flow and updating the position of the flow, so as to update the optimizable scheduling scheme; when the termination condition is met, outputting the optimal scheduling scheme. This method has strong global search ability and fast convergence speed.
[0099] In this way, through initializing the population, selecting the leading wolves, fitness evaluation and update, and position (scheduling scheme) update, after determining that the termination condition is met, the optimal traffic scheduling scheme can finally be determined, realizing the optimization of the scheduling scheme for TT flows, thereby being able to reduce the end-to-end delay, ensure the real-time performance and reliability of communication between industrial devices, and further improve the production efficiency and stability of the entire industrial automation system.
[0100] In addition, Figure 3 shows another deterministic network time-triggered flow scheduling optimization method provided by the embodiments of the present application. As Figure 3As shown in the figure, another method for optimizing deterministic network time-triggered flow scheduling specifically includes the following steps: First, initialize the network topology, abstract the deterministic network topology into a network directed graph, and find the shortest path from the source node to the destination node for each traffic flow; initialize the population and parameters, determine the parameters of the Grey Wolf algorithm, including the population size, constraint conditions, maximum number of iterations, and exploration factor, and randomly generate a group of Grey Wolf individuals to represent the scheduling of different traffic flows; then, according to the defined fitness function, evaluate the fitness of each Grey Wolf individual. The fitness value reflects whether the scheduling scheme can be optimized, and save the three best fitness values as α, β, and δ (leaders); according to the positions of the leaders and the positions of other individuals, adjust the positions of each individual to explore a better scheduling scheme; repeat the fitness evaluation and position update to gradually optimize the traffic flow scheduling scheme, and stop the algorithm when the scheduling end condition is met (for example, reaching the maximum number of iterations or the fitness change is less than the set threshold); select the individual with the highest fitness from the final Grey Wolf population as the optimal traffic flow scheduling scheme and output the scheduling result.
[0101] Thus, the algorithm adopts a bionic optimization strategy, analyzes the entire network topology from the perspective of the overall network, and identifies the key links that have the greatest impact on network performance. These links may be links with limited bandwidth, latency sensitivity, or high data traffic. Analyze the set of scheduling frames, which usually contains multiple time-sensitive (Time-Triggered, TT) frames that need to be transmitted within strict time constraints. For these TT frames and key links, the algorithm formulates a globally optimized scheduling strategy. The algorithm ensures the time-sensitivity requirements of the frames and the scheduling decisions between different links to avoid network congestion and conflicts, and finally achieves a globally optimal scheduling result.
[0102] It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0103] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a deterministic network time-triggered flow scheduling optimization device 400.
[0104] As Figure 4 shown, the deterministic network time-triggered flow scheduling optimization device 400 may include:
[0105] A generating module 401, configured to generate a network directed graph corresponding to the deterministic network topology according to the topology of the deterministic network;
[0106] A searching module 402, configured to use the breadth - first search algorithm to find the shortest path from the source node to the destination node corresponding to each time - triggered flow in the network directed graph;
[0107] An initializing module 403, configured to initialize a gray - wolf population based on the shortest path of the time - triggered flow and pre - set gray - wolf algorithm parameters, where the gray - wolf population includes multiple gray - wolf individuals, and the multiple gray - wolf individuals respectively represent various different time - triggered flow scheduling methods, and the gray - wolf algorithm parameters at least include population size, constraint conditions, and objective function;
[0108] An iterative module 404, configured to iteratively execute the following steps A to C until a preset termination condition is met, to obtain an updated final gray - wolf population:
[0109] Step A: Calculate the fitness of each gray - wolf individual in the gray - wolf population by using a pre - constructed fitness function, where the fitness function is constructed according to the average end - to - end delay of the time - triggered flow;
[0110] Step B: According to the fitness values of each gray - wolf individual, determine the top three gray - wolf individuals sorted in descending order of fitness values in the gray - wolf population as the lead wolves;
[0111] Step C: For each gray - wolf individual other than the lead wolves in the gray - wolf population, update its own position according to the distance between itself and the positions of the lead wolves, so as to obtain a corresponding updated time - triggered flow scheduling method;
[0112] A determining module 405, configured to determine the time - triggered flow scheduling method corresponding to the gray - wolf individual with the largest fitness value in the updated final gray - wolf population as the optimal scheduling method.
[0113] Optionally, the network directed graph includes a vertex set and an edge set, the vertex set represents the union of the deterministic network terminal device set and the deterministic network switch set, and the edge set represents several links in the deterministic network;
[0114] Wherein, each of the links is a unidirectional link, and the link corresponds to a pre - defined identifier one by one; for communication between any two nodes in the deterministic network, there are two independent links in opposite directions, respectively used for data transmission in opposite directions.
[0115] In some embodiments, the lookup module 402 is specifically configured to use the breadth-first search algorithm to find all transmission paths from the source node to the destination node corresponding to each time-triggered flow in the network directed graph; calculate the cost function values of all transmission paths of the time-triggered flow according to the following formula, and minimize the cost function to obtain the shortest path of the time-triggered flow:
[0116]
[0117] ;
[0118] Wherein, represents the th time-triggered flow; represents the set of all time-triggered flows; represents the i th time-triggered flow 's source node; represents the i th time-triggered flow 's destination node; represents that the link exists (1 for existence, 0 for non-existence); represents the cost function of the path of each flow.
[0119] Optionally, the objective function is: ;
[0120] Wherein, represents the i th time-triggered flow 's end-to-end delay; n represents the number of time-triggered flows;
[0121] The constraint conditions include delay constraint, time slot occupancy constraint, and maximum transmission offset constraint;
[0122] The delay constraint is: ;
[0123] Wherein, represents the i th time-triggered flow 's period;
[0124] The time slot occupancy constraint is: ;
[0125] Wherein, represents the i th time-triggered flow 's number of links passed through; represents the i th time-triggered flow The length or the window size required for transmission;
[0126] The maximum transmission offset constraint is: ;
[0127] Wherein, represents the set of all time-triggered flows F any time-triggered flow in , and the offset of each time-triggered flow.
[0128] In some embodiments, the deterministic network time-triggered flow scheduling optimization device 400 further includes a construction module ( Figure 4 not shown in
[0129] ;
[0130] Wherein, represents the i th time-triggered flow fitness; represents the average end-to-end delay; represents the number of cycles of the existing time slots; represents the cumulative sum of all unused time slots; represents the i th time-triggered flow period; , are adjustment coefficients.
[0131] As an optional embodiment, the iteration module 404 is specifically configured to update according to the following formula:
[0132] ;
[0133] Wherein, represents the position of the i th time-triggered flow in the next generation after optimization; , , respectively represent the positions of the three time-triggered flow scheduling time slots corresponding to the alpha, beta, and delta wolves during the iteration process; represents a coefficient that changes with the number of iterations and is used to control the search range; , , respectively represent the distances between the i th time-triggered flow scheduling time slot and the three time-triggered flows corresponding to the alpha, beta, and delta wolves.
[0134] It should be noted that for the convenience of description, when describing the above device, various modules are described separately according to their functions. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0135] The device of the above embodiment is used to implement the corresponding deterministic network time-triggered flow scheduling optimization method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0136] Based on the same technical concept, corresponding to the method of any of the above embodiments, the present application also provides an electronic device.
[0137] Figure 5 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment.
[0138] In the electronic device 500, it may include a processor 501 and a memory 502 storing computer program instructions.
[0139] Specifically, the above processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0140] The memory 502 may include a mass storage for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 502 may include a removable or non-removable (or fixed) medium. In a suitable case, the memory 502 may be internal or external to the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0141] In a specific embodiment, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described in reference to the method according to one aspect of the present application.
[0142] The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement any one of the deterministic network time-triggered flow scheduling optimization methods in the above embodiments.
[0143] In some examples, the electronic device 500 may further include a communication interface 503 and a bus 510. Among them, as Figure 5 shown, the processor 501, the memory 502, and the communication interface 503 are connected through the bus 510 to complete communication with each other.
[0144] The communication interface 503 is mainly used to implement communication between various modules, devices, units, and / or devices in the embodiments of the present application.
[0145] The bus 510 includes hardware, software, or both, and couples the components of the online data flow charging device to each other. By way of example and not limitation, the bus 510 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. In suitable cases, the bus 510 may include one or more buses. Although the embodiments of the present application describe and illustrate specific buses, the present application contemplates any suitable bus or interconnect.
[0146] Exemplarily, the electronic device 500 may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc.
[0147] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides a non-transitory computer-readable storage medium. Computer program instructions are stored on the computer-readable storage medium; when the computer program instructions are executed by a processor, any one of the deterministic network time-triggered flow scheduling optimization methods in the above embodiments is implemented. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, etc.
[0148] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor execute the deterministic network time-triggered flow scheduling optimization method. Corresponding to the execution subject of each step in each embodiment of the deterministic network time-triggered flow scheduling optimization method, the processor executing the corresponding step can belong to the corresponding execution subject.
[0149] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present application.
[0150] The functional blocks shown in the above structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical discs, hard disks, fiber optic media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0151] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. That is to say, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0152] As described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems) and computer program products according to embodiments of the present application. It should be understood that each block in the flowchart and / or block diagram, and the combination of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to generate a machine, such that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It should also be understood that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can also be implemented by dedicated hardware that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0153] As mentioned above, the above is only the specific implementation manner of this application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, modules, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A deterministic network time-triggered flow scheduling optimization method, characterized in that Including: Generate a network directed graph corresponding to the deterministic network topology according to the topology of the deterministic network; Use the breadth-first search algorithm to find the shortest path from the source node to the destination node corresponding to each time-triggered flow in the network directed graph; Initialize the gray wolf population based on the shortest path of the time-triggered flow and the preset gray wolf algorithm parameters. The gray wolf population includes multiple gray wolf individuals, and the multiple gray wolf individuals respectively represent various different time-triggered flow scheduling methods. The gray wolf algorithm parameters at least include population size, constraint conditions, and objective function; Construct a fitness function according to the following formula: ; Among them, represents the i fitness of the nth time-triggered flow; represents the average end-to-end delay; represents the number of cycles of the existing time slots; represents the cumulative sum of all unused time slots; represents the i nth time-triggered flow period; 、 is the adjustment coefficient; Iteratively execute the following steps A to C until the preset termination condition is met to obtain the updated final gray wolf population: Step A: Calculate the fitness of each gray wolf individual in the gray wolf population using the pre-constructed fitness function. The fitness function is constructed based on the average end-to-end delay of the time-triggered flow; Step B: According to the fitness values of each gray wolf individual, determine the top three gray wolf individuals sorted in descending order of fitness value in the gray wolf population as the lead wolves; Step C: For each gray wolf individual in the gray wolf population except the lead wolves, update its own position according to the distance from its own position to the lead wolf position to obtain the corresponding updated time-triggered flow scheduling method; Determine the time-triggered flow scheduling method corresponding to the gray wolf individual with the largest fitness value in the updated final gray wolf population as the optimal scheduling method.
2. The method according to claim 1, wherein The using the breadth-first search algorithm to find the shortest path from the source node to the destination node corresponding to each time-triggered flow in the network directed graph includes: Use the breadth-first search algorithm to find all transmission paths from the source node to the destination node corresponding to each time-triggered flow in the network directed graph; Calculate the cost function values of all transmission paths of the time-triggered flow according to the following formula, and minimize the cost function to obtain the shortest path of the time-triggered flow: ; ; Among them, represents the th time-triggered flow; represents the set of all time-triggered flows; represents the i th time-triggered flow 's source node; represents the i th time-triggered flow 's destination node; represents the existence of a link, where existence is 1 and non-existence is 0; represents the cost function of the path of each flow.
3. The method according to claim 1, wherein The objective function is as follows: ; Among them, represents the i end-to-end delay of the th time-triggered flow; n represents the number of time-triggered flows; The constraint conditions include delay constraint, time slot occupancy constraint, and maximum transmission offset constraint; The time delay constraint is as follows: ; Among them, represents the i period of the n-th time-triggered flow; The time slot occupancy constraint is as follows: ; Among them, represents the i number of links passed by the nth time-triggered flow; represents the i length of the nth time-triggered flow or the window size required for transmission; The maximum transmission offset constraint is as follows: ; Among them, represents the set of all time-triggered flows F any time-triggered flow in , and the offset of each time-triggered flow.
4. The method according to claim 1, wherein The for each gray wolf individual in the gray wolf population except the lead wolves, updating its own position according to the distance from its own position to the lead wolf position to obtain the corresponding updated time-triggered flow scheduling method includes: Update according to the following formula: ; Among them, represents the position of the i th time-triggered flow in the optimized next generation; , , respectively represent the positions of the three time-triggered flow scheduling time slots corresponding to the alpha, beta, and delta wolves during the iteration process; represents a coefficient that changes with the number of iterations and is used to control the search range; , , respectively represent the distances between the i th time-triggered flow scheduling time slot and the three time-triggered flows corresponding to the alpha, beta, and delta wolves.
5. The method according to claim 1, wherein The network directed graph includes a vertex set and an edge set. The vertex set represents the union of the deterministic network terminal device set and the deterministic network switch set, and the edge set represents several links in the deterministic network; Wherein, each of the links is a unidirectional link, and the link corresponds to a pre-defined identifier one by one; for communication between any two nodes in the deterministic network, there are two independent links in opposite directions, respectively used for data transmission in opposite directions.
6. A deterministic network time-triggered flow scheduling optimization device, characterized in that, The device includes: A generation module, configured to generate a network directed graph corresponding to the deterministic network topology according to the topology of the deterministic network; A search module, configured to use the breadth-first search algorithm to find the shortest path from the source node to the destination node corresponding to each time-triggered flow in the network directed graph; An initialization module, configured to initialize a gray wolf population based on the shortest path of a time-triggered flow and preset gray wolf algorithm parameters, where the gray wolf population includes multiple gray wolf individuals, and the multiple gray wolf individuals respectively represent various different time-triggered flow scheduling methods, and the gray wolf algorithm parameters at least include population size, constraint conditions, and objective functions; A construction module, configured to construct a fitness function according to the following formula: ; Among them, represents the i fitness of the th time-triggered flow; represents the average end-to-end delay; represents the number of cycles of the existing time slots; represents the cumulative sum of all unused time slots; represents the i th time-triggered flow period; 、 is the adjustment coefficient; An iteration module, configured to iteratively execute the following steps A to C until a preset termination condition is met, to obtain an updated final gray wolf population: Step A: Calculate the fitness of each gray wolf individual in the gray wolf population by using the pre-constructed fitness function, where the fitness function is constructed based on the average end-to-end delay of the time-triggered flow; Step B: According to the fitness values of each gray wolf individual, determine the top three gray wolf individuals sorted in descending order of fitness values in the gray wolf population as the lead wolves; Step C: For each gray wolf individual other than the lead wolves in the gray wolf population, update its own position according to the distance between itself and the positions of the lead wolves, so as to obtain a corresponding updated time-triggered flow scheduling method; A determination module, configured to determine the time-triggered flow scheduling method corresponding to the gray wolf individual with the largest fitness value in the updated final gray wolf population as the optimal scheduling method.
7. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; when the processor calls the computer program instructions, the deterministic network time-triggered flow scheduling optimization method according to any one of claims 1-5 is implemented.
8. A computer-readable storage medium, characterized in that, Computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are called by a processor, the deterministic network time-triggered flow scheduling optimization method according to any one of claims 1-5 is implemented.
9. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device is caused to execute the deterministic network time-triggered flow scheduling optimization method according to any one of claims 1-5.
Citation Information
Patent Citations
Routing method and device of wireless sensor network applied to integrated energy system
CN114158105A
Traffic scheduling method and device for time-sensitive network, and computer equipment
CN117201412A