Scheduling method, device and equipment of time-sensitive network based on interval-free window, medium and product
By introducing the design and improved gray wolf algorithm in the time -sensitive network, the problem of high delay and slow solution in the existing technology has been solved, and the worst end -delay and higher end -to -end delay and higher Schedule efficiency.
Patent Information
- Application Number
- CN202411515123.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-29
AI Technical Summary
Existing window-based time-sensitive network scheduling methods are difficult to effectively reduce the worst end-to-end delay and improve the solution speed, especially in scenarios such as autonomous driving that require high real-time information transmission.
The time -sensitive network scheduling method based on the interval window is adopted, the candidate solution of multiple interval windows randomly generates the candidate solution of multiple interval windows, and the improved gray wolf algorithm is used to optimize the candidate solution to reduce the worst end -to -end delay.
Effectively reduce the worst end -to -end delay, improve the efficiency and accuracy of scheduling, and enhance the safety of autonomous driving scenes.
Smart Images

Figure CN119383141A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a scheduling method, device, equipment, medium and product based on a time-sensitive network without interval windows. Background Art
[0002] With the rapid development of industrial automation and intelligent transportation systems, more and more intelligent sensors, actuators and controllers are deployed in high-level autonomous vehicles. Their complex computing environment has continuously improved the real-time and deterministic requirements for information transmission. Ensuring that data is transmitted accurately and efficiently within a specified time has become a key challenge. Time-sensitive networking (TSN), also known as time-sensitive networking, can provide predictable data transmission delays for traditional Ethernet through a series of standardized extensions and improvements, ensuring real-time and high reliability. TSN is considered to be a key solution to the above problems. Reasonable gated list (GCL) design is the key to the implementation of the time-aware shaping (TAS) mechanism. The process of generating GCL is called TSN scheduling. TSN scheduling is a hot research topic in the field of TSN. Scheduling can be divided into frame-based scheduling and window-based scheduling according to the different scheduling objects. Frame-based scheduling usually schedules the sending time of each flow and maps the sending time to a window of the gated list. Window-based scheduling decouples scheduling from the sending time of the flow and completes scheduling through direct gated list design. This method usually uses network calculus to analyze the worst delay based on the gated list to measure the transmission effect. It can measure scheduling constraints from a pessimistic perspective. As long as the analysis results meet the deadline requirements, the scheduling effect is easier to guarantee in actual deployment. Especially in scenarios such as autonomous driving, the scheduling results based on the worst-case delay can greatly improve its safety. However, with the increasing requirements for real-time information transmission, new methods are still needed to further reduce scheduling delays and speed up the solution from window-based scheduling. Summary of the invention
[0003] The purpose of the present application is to provide a scheduling method, device, equipment, medium and product based on a time-sensitive network without interval windows, which can effectively reduce the worst end-to-end delay.
[0004] To achieve the above objectives, this application provides the following solutions:
[0005] In a first aspect, the present application provides a scheduling method for a time-sensitive network based on an interval-free window, comprising:
[0006] Obtaining parameters of flows in a time-sensitive network;
[0007] Based on the parameters of the flow in the time-sensitive network, a plurality of candidate solutions of gapless windows for scheduling the time-sensitive network are randomly generated; each candidate solution is generated by decoding each solution vector, each solution vector includes a plurality of continuous value intervals, each value interval represents an output port, each value interval is divided into a plurality of segments, and the length value of each segment maps the window length of the flow of the same priority;
[0008] The accumulated upper bound of the delay of each output port is used as fitness, and the candidate solution is optimized by the improved gray wolf algorithm, and the optimized optimal solution is used as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after the crossover operator and the mutation operator are introduced.
[0009] Optionally, the parameters of the flow include priority, period, and size;
[0010] When randomly generating multiple candidate solutions for scheduling time-sensitive networks without gap windows based on the parameters of the flow in the time-sensitive network, the constraints on the window length are:
[0011] in, is the window length of the mth priority flow at the hth output port, It represents the set of flows of the mth priority transmitted by the hth output port. HP is the super period, and the value of the super period is The least common multiple of the periods of all flows in , f i is the i-th flow, f i .size is f i The size of f i .T is f i The period, T GCL is the gate list period, BW is the bandwidth, is the guard band length;
[0012] The solution vector is expressed as:
[0013] Where D is the length of the solution vector, H is the number of output ports in the time-sensitive network, |P h | is the priority number of the hth output port;
[0014] The formula for mapping the length value of each fragment to the window length of a priority stream is:
[0015]
[0016] in, is the fragment length corresponding to the i-th priority of the h-th output port, is the length of the fragment corresponding to the mth priority of the hth output port, T GCLis the gate list period;
[0017] The constraints include
[0018] for The corresponding window opening time is offset from the start time of the gate list period, is the window length of the jth priority flow of the hth output port, P m is the mth priority, P j is the jth priority, The opening time of the first window is offset from the start time of the gate list period.
[0019] Optionally, the fitness is expressed as:
[0020]
[0021] Among them, O is the cumulative upper bound of the delay of each output port, F is the set of flows, and f i is the i-th stream, represents f i The maximum end-to-end delay of
[0022]
[0023] in, The priority is P m The upper bound of the queuing and transmission delay of the flow at the hth output port, R(f i ) is f i The set of all output ports on the routing path, des represents the last output port, t prop is the propagation delay, t proc To process delay.
[0024] Optionally, the accumulated upper bound of the delay of each output port is used as fitness, and the candidate solution is optimized by the improved grey wolf algorithm, and the optimized optimal solution is used as the scheduling scheme of the time-sensitive network, which specifically includes:
[0025] Initialize the first iteration number;
[0026] Taking each candidate solution as a gray wolf, calculating the fitness of each gray wolf;
[0027] Update the position of the gray wolf according to each fitness to obtain the current first wolf pack;
[0028] The crossover operator is used to optimize the current first wolf pack to obtain the current second wolf pack;
[0029] The mutation operator is used to optimize the current second wolf pack, and the taboo search algorithm is introduced in the mutation process to obtain the current third wolf pack;
[0030] Determine whether the first iteration number reaches a first set iteration number;
[0031] If so, the solution corresponding to the current optimal gray wolf position is used as the scheduling solution for the time-sensitive network;
[0032] If not, the first iteration number is increased by 1, the current third wolf pack is used as the current first wolf pack, the fitness of each gray wolves in the current first wolf pack is calculated, and the step of using the crossover operator to optimize the current first wolf pack to obtain the current second wolf pack is returned.
[0033] Optionally, a crossover operator is used to optimize the current first wolf pack to obtain the current second wolf pack, specifically including:
[0034] Traverse the current first wolf pack and randomly select whether to use the crossover operator for optimization of the currently traversed gray wolf;
[0035] If yes, randomly select another gray wolf from the current first wolf pack except the currently traversed gray wolf, use the currently traversed gray wolf and the other gray wolf as the parent generation to cross over, and obtain two offspring gray wolves. The gray wolf with the smallest fitness among the two parent gray wolves and the two offspring gray wolves is used as the gray wolf after crossover optimization.
[0036] After the traversal of the current first wolf pack is completed, the gray wolves after crossover optimization and the wolf packs in the current first wolf pack that are not optimized by using the crossover operator constitute the current second wolf pack.
[0037] Optionally, a mutation operator is used to optimize the current second wolf pack, and a taboo search algorithm is introduced in the mutation process to obtain the current third wolf pack, specifically including:
[0038] Traverse each gray wolf in the current second wolf pack. If the gray wolf currently traversed is the alpha wolf, use the gray wolf as the gray wolf to be mutated; if the gray wolf currently traversed is not the alpha wolf, randomly select whether to use the mutation operator for optimization. If the random selection is yes, use the gray wolf as the gray wolf to be mutated. If the random selection is no, the gray wolf does not participate in the mutation.
[0039] If the currently traversed gray wolf is the gray wolf to be mutated, the second iteration number is initialized;
[0040] The mutation operator is used to mutate the currently traversed gray wolves, and the current wolf group to be mutated is obtained, which is composed of multiple optimized gray wolves;
[0041] The gray wolf with the smallest fitness among the current wolf pack to be mutated is taken as the temporary optimal solution;
[0042] Determine whether the fitness of the temporary optimal solution is lower than the fitness of the historical optimal solution;
[0043] If yes, the temporary optimal solution is stored in the taboo table, and the historical optimal solution is updated to the temporary optimal solution;
[0044] If not, it is determined whether the temporary optimal solution is stored in the taboo table. If it is stored in the taboo table, the gray wolf corresponding to the temporary optimal solution is removed from the current wolf group to be mutated, and the step of returning to the step of taking the gray wolf with the smallest fitness in the current wolf group to be mutated as the temporary optimal solution is returned; if it is not stored in the taboo table, the temporary optimal solution is stored in the taboo table;
[0045] Determine whether the second iteration number reaches the second set iteration number;
[0046] If not, the second iteration number is increased by 1, and the temporary optimal solution is mutated using a mutation operator to obtain a current wolf pack to be mutated consisting of multiple mutated optimized gray wolves, and the step of taking the gray wolf with the smallest fitness in the current wolf pack to be mutated as the temporary optimal solution is returned;
[0047] If so, initialize the second iteration number, traverse the gray wolves in the current second wolf pack, until the traversal of the gray wolves in the current second wolf pack is completed, and the current third wolf pack is obtained.
[0048] In a second aspect, the present application provides a scheduling device for a time-sensitive network based on an interval-free window, wherein the scheduling device for a time-sensitive network based on an interval-free window includes:
[0049] A parameter acquisition module for a flow in a time-sensitive network, used to obtain parameters of a flow in a time-sensitive network;
[0050] A candidate set generation module is used to randomly generate multiple candidate solutions of gapless windows for scheduling time-sensitive networks; each candidate solution is generated by decoding each solution vector, each solution vector includes multiple continuous value intervals, each value interval represents an output port, each value interval is divided into multiple segments, and the length value of each segment maps the window length of the flow of the same priority;
[0051] The candidate set optimization module is used to use the accumulated delay upper bounds of each output port as fitness, optimize the candidate solutions through the improved gray wolf algorithm, and use the optimized optimal solution as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after introducing the crossover operator and the mutation operator.
[0052] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned scheduling methods for time-sensitive networks based on intervalless windows.
[0053] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for scheduling a time-sensitive network based on an intervalless window.
[0054] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned scheduling methods for a time-sensitive network based on an intervalless window.
[0055] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0056] The present application provides a scheduling method, apparatus, device, medium and product for a time-sensitive network based on gapless windows. Based on the parameters of the flow in the time-sensitive network, a plurality of candidate solutions for gapless windows for scheduling the time-sensitive network are randomly generated; the number of window switching times of the gated list is compressed by gapless design to reduce the deployment difficulty; the accumulated upper bound of the delay of each output port is used as the fitness; the candidate solutions are optimized by the improved gray wolf algorithm; the optimized optimal solution is used as the scheduling scheme for the time-sensitive network, delay optimization is achieved, and the worst end-to-end delay is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 This is an application environment diagram of a scheduling method based on a time-sensitive network without interval windows in an embodiment of the present application;
[0059] Figure 2 A flowchart of a scheduling method for a time-sensitive network based on a non-interval window provided in an embodiment of the present application;
[0060] Figure 3 A scheduling method framework for a time-sensitive network based on an interval-free window provided in an embodiment of the present application;
[0061] Figure 4 A schematic diagram of a gating list with interval windows provided in an embodiment of the present application;
[0062] Figure 5 A schematic diagram of a non-interval window gating list provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of the encoding and decoding process provided in an embodiment of the present application;
[0064] Figure 7 A schematic diagram of the improved grey wolf algorithm flow chart provided in one embodiment of the present application;
[0065] Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0067] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0068] The scheduling method based on time-sensitive network without interval window provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the parameters of the flow in the time-sensitive network to the server 104. After the server 104 receives the parameters of the flow in the time-sensitive network, the server 104 obtains the parameters of the flow in the time-sensitive network; based on the parameters of the flow in the time-sensitive network, a plurality of candidate solutions for scheduling the time-sensitive network without interval windows are randomly generated; each candidate solution is generated by decoding each solution vector, each solution vector includes a plurality of continuous value intervals, each value interval represents an output port, each value interval is divided into a plurality of segments, and the length value of each segment maps the window length of the flow of the same priority; the accumulated delay upper bound of each output port is used as the fitness, and the candidate solution is optimized by the improved gray wolf algorithm, and the optimized optimal solution is used as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after introducing the crossover operator and the mutation operator. The server 104 may feed back the obtained scheduling scheme of the time-sensitive network to the terminal 102. In addition, in some embodiments, the scheduling method of the time-sensitive network based on the interval-free window may also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 may directly perform the scheduling of the time-sensitive network based on the interval-free window for the parameters of the flow in the time-sensitive network, or the server 104 may obtain the parameters of the flow in the time-sensitive network from the data storage system, and perform the scheduling of the time-sensitive network based on the interval-free window for the parameters of the flow in the time-sensitive network.
[0069] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.
[0070] In an exemplary embodiment, Figure 2 As shown, a scheduling method based on a time-sensitive network without an interval window is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 201 to 208. Among them:
[0071] Step 201: Obtain parameters of a flow in a time-sensitive network.
[0072] Step 202: Based on the parameters of the flow in the time-sensitive network, randomly generate multiple candidate solutions of gapless windows for scheduling the time-sensitive network; each candidate solution is generated by decoding each solution vector, each solution vector includes multiple continuous value intervals, each value interval represents an output port, each value interval is divided into multiple segments, and the length value of each segment maps the window length of the flow of the same priority.
[0073] Step 203: taking the accumulated upper bound of the delay of each output port as fitness, optimizing the candidate solutions through the improved gray wolf algorithm, and taking the optimized optimal solution as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after introducing the crossover operator and the mutation operator.
[0074] This application randomly generates multiple candidate solutions of gapless windows for scheduling the time-sensitive network based on the parameters of the flow in the time-sensitive network; the number of window switching times of the gating list is compressed by gapless design to reduce the deployment difficulty, the accumulated upper bound of the delay of each output port is used as the fitness, the candidate solutions are optimized by the improved gray wolf algorithm, and the optimized optimal solution is used as the scheduling scheme for the time-sensitive network to achieve delay optimization and effectively reduce the worst end-to-end delay.
[0075] In an exemplary embodiment, the time-sensitive network is a vehicle-mounted time-sensitive network, such as Figure 3 As shown in the figure, the scheduling method based on the time-sensitive network without interval windows specifically includes five parts: the first part is the scheduling environment input by the vehicle-mounted time-sensitive network environment; the second part is the encoding and decoding method based on the interval-free window, which is used to generate candidate solutions and is the basis for combining the delay analysis theory with the scheduling method; the third part solves the worst delay according to the decoded gating list parameters, and the method involved is the worst delay analysis theory based on the network delay; the fourth part searches for the improved grey wolf algorithm with the worst delay as the fitness, and repeatedly iterates the encoded solution based on the fitness to find a better solution; finally, the fifth part outputs the optimal solution as the scheduling result after the algorithm converges.
[0076] The present application does not limit the network environment of a specific time-sensitive network, but requires clear flow parameters, namely, the routing path, priority, period, and size of the flow.
[0077] The present application is based on encoding and decoding of gapless windows, and the encoding and decoding process is a process of randomly generating multiple candidate solutions for gapless windows for scheduling time-sensitive networks. According to the worst-case delay analysis theory based on network calculation, in the same gating list cycle, the worst end-to-end delay limit is affected by the window opening time of each priority level and the relative position of the windows. Longer windows and smaller maximum waiting times help reduce the worst end-to-end delay and improve the transmission performance of the network. Therefore, it is necessary to optimize the window size and position of the gating list, and the encoding of the solution used for the gray wolf algorithm optimization needs to be able to reflect the window size and position.
[0078] In determining the gating list period T GCL Finally, the window design mainly includes the window length of each priority window on each port. and window opening time The window length must be long enough to ensure that all flows of this priority can be transmitted within the super period. The constraints on the window length are:
[0079] in, is the window length of the mth priority flow at the hth output port, It represents the set of flows of the mth priority transmitted by the hth output port. HP is the super period, and the value of the super period is The least common multiple of the periods of all flows in , f i is the i-th flow, f i .size is f i The size of f i .T is f i The period, T GCL is the gate list period, BW is the bandwidth, is the guard band length, YesP m The maximum length of the stream.
[0080] Window opening time That is, the offset of the window opening time relative to the cycle start time, and the value range is expressed as:
[0081] The non-overlapping of windows of different priorities on the same output port can not only reduce the design complexity, but also reduce the mutual interference between windows and improve the bandwidth utilization. Under this premise, a GCL design method with gaps is to and At the same time, as design variables, such as Figure 4 The number of design variables for each port is 2×|P h|. At the same time, since there is no guarantee that the previous window is closed when the next window is opened, the maximum number of GCLs per output port is also 2×|P h |. In theory, this design allows windows to be arranged arbitrarily. However, its large variable space makes searching difficult, and the gap between two adjacent windows causes bandwidth waste. In order to solve the above problems, this application proposes a gapless design method, such as Figure 5 As shown. When designing GCL, it is defined that no gaps are allowed between adjacent windows, that is, the next window opens when the previous window closes, and the windows are arranged in order of priority. The design variables of this gap-free method are only The number of design variables is only |P h |, effectively compressing the search space. The number of GCLs per output port is fixed to |P h |,The smaller number of GCLs simplifies the deployment process.,Compared to the gapped design, although the gapless design may limit some,window bias freedom, it can fully utilize network resources and often,guarantee a larger window opening time.
[0082] The essence of the encoding and decoding process of the gapless GCL design of this application is to map the optimization variable solution set to the window length combination of GCL. The Gray Wolf Algorithm uses the network calculation theory to calculate the optimization target value represented by the solution based on the GCL mapped by the solution, and finally obtains the optimal solution of the search through iteration.
[0083] Figure 6 An example of encoding and decoding process is given, h1, h2, and h3 are three output ports respectively. is the priority number of h1, is the priority number of h2, and after decoding, a gating cycle list is generated, T 00 、T 01 、T 02 、T 03 are the window opening times of each window. The solution consists of a solution vector, which is encoded with real numbers. Maps the length of a window (window length), That is, the value interval in step 202. This application defines the value range of each window encoding as 1 to 1000. Therefore, for H output ports, the priority number of each output port is |P h |network.
[0084] The solution vector is expressed as: Where D is the length of the solution vector, H is the number of output ports in the time-sensitive network, |P h | is the priority number of the hth output port.
[0085] The solutions belonging to the window of the same output port are considered as a group of solutions used together for decoding. Decoded and
[0086] The formula for mapping the length value of each fragment to the window length of a priority stream is:
[0087]
[0088] in, is the fragment length corresponding to the i-th priority of the h-th output port, is the length of the fragment corresponding to the mth priority of the hth output port, T GCL is the gate list period;
[0089] The constraints include and The constraint condition ensures that all windows on a port can cover the entire cycle. This decoding and encoding method is only related to the value of each bit in the solution vector and is not affected by the iteration process of the Gray Wolf algorithm.
[0090] for The corresponding window opening time is offset from the start time of the gate list period, is the window length of the jth priority flow of the hth output port, P m is the mth priority, P j is the jth priority, The opening time of the first window is offset from the start time of the gate list period.
[0091] The worst delay analysis method of this application adopts network calculation theory. After constructing the arrival curve and service curve based on the gated list, the priority is P m The upper bound of the queuing and transmission delay of the flow at the output port h is expressed as: in, and are the arrival curve and service curve of the flow at output port h, respectively, and h(·) is the maximum horizontal distance between the two curves.
[0092] By accumulating the upper bound of the delay of each output port on the routing path, we can obtain the flow f i The worst end-to-end delay is expressed as:
[0093] in, The priority is P mThe upper bound of the queuing and transmission delay of the flow at the hth output port, des represents the last output port, t prop is the propagation delay, t proc is the processing delay. |R(f i )|Indicates the number of output ports in the collection.
[0094] Since the propagation and processing delays can be considered as constants, this application only focuses on the queuing and transmission delays related to the gated list when optimizing the design. Therefore, for the gated list solution of the entire solution, the smaller the fitness, the smaller the delay of the entire scheduling solution and the better the scheduling effect.
[0095] The fitness is expressed as:
[0096] Among them, O is the cumulative upper bound of the delay of each output port, F is the set of flows, and f i is the i-th flow, R(f i ) is f i The set of all output ports on the routing path, D fi represents f i The maximum end-to-end delay.
[0097] Through the above decoding and encoding methods, each candidate solution can be mapped to a gating list scheme and obtain its worst delay through network calculation. The worst delay can be further calculated as the fitness of the solution. The Gray Wolf Algorithm can change the value of each bit of the solution through its unique search mechanism to generate different gating list schemes, thereby achieving a search for a more schedulable solution. As the scale of the network expands, the dimension of the calculated solution will become higher and higher, and the search space will become larger and larger. Therefore, it is necessary to make corresponding improvements to the Gray Wolf Algorithm to improve its search capability. The improvements of this application mainly consist of the following two aspects, and its overall process is as follows: Figure 7 shown.
[0098] Wherein, step 203 specifically includes:
[0099] Step 2031: Initialize the first number of iterations.
[0100] Step 2032: Take each candidate solution as a gray wolf and calculate the fitness of each gray wolf.
[0101] Step 2033: Update the position of the gray wolves according to each fitness to obtain the current first wolf pack.
[0102] Step 2034: Use a crossover operator to optimize the current first wolf pack to obtain the current second wolf pack.
[0103] Step 2035: Use a mutation operator to optimize the current second wolf pack, and introduce a taboo search algorithm in the mutation process to obtain the current third wolf pack.
[0104] Step 2036: Determine whether the first iteration number reaches the first set iteration number.
[0105] If the judgment in step 2036 is yes, execute step 2037.
[0106] Step 2037: Use the solution corresponding to the current optimal grey wolf position as the scheduling solution for the time-sensitive network.
[0107] If the judgment in step 2036 is no, execute step 2038.
[0108] Step 2038: The first iteration number is increased by 1, the current third wolf pack is used as the current first wolf pack, the fitness of each gray wolf in the current first wolf pack is calculated, and the step of using the crossover operator to optimize the current first wolf pack to obtain the current second wolf pack is returned.
[0109] Among them, step 2033 specifically includes: selecting three gray wolves with the best fitness as alpha wolves, updating the search parameters of the gray wolf algorithm, and updating the positions of other gray wolves according to the alpha wolf, that is, updating other solutions.
[0110] (1) Crossover operator based on genetic algorithm: The genetic algorithm uses the crossover operation to replace the partial structure of two parents to generate new individuals, which greatly improves the global search capability. Inspired by it, we introduce the crossover operator into the gray wolf algorithm. After each iteration, the solution has a certain probability P c Continue crossover. This application selects precedent-based order-preserving crossover (POX), which can well inherit the excellent characteristics of the parent generation while ensuring the feasibility of the offspring. The other parent individual required for crossover is obtained by random selection. The offspring selection uses an elite selection strategy to compare the fitness of the two generated offspring with the two parents, and select the best individual to enter the subsequent iteration.
[0111] Wherein, step 2034 specifically includes:
[0112] Traverse the current first wolf pack and randomly select whether to use the crossover operator for optimization of the currently traversed gray wolf. Specifically, if P i1 >P c The currently traversed gray wolf is optimized using the crossover operator. If P i1 ≤P c The currently traversed gray wolf does not use the crossover operator for optimization; P i1 is a random value, P c is a fixed value.
[0113] If yes, randomly select another gray wolf from the current first wolf pack except the currently traversed gray wolf, and cross the currently traversed gray wolf and the other gray wolf as parents to obtain two offspring gray wolves. The gray wolf with the smallest fitness among the two parent gray wolves and the two offspring gray wolves is used as the gray wolf after crossover optimization.
[0114] After the traversal of the current first wolf pack is completed, the gray wolves after crossover optimization and the wolf packs in the current first wolf pack that are not optimized by using the crossover operator constitute the current second wolf pack.
[0115] (2) Mutation operator based on taboo search: This application also introduces a mutation operator, and introduces a taboo search algorithm in the mutation process to improve the local development ability of the gray wolf algorithm. Its basic implementation process is as follows: first generate candidate solutions, take the best individual after crossover as the initial solution, generate 50 domain solutions by randomly exchanging points, and select 30 solutions with the best fitness as candidate solutions; then update the taboo table, select the best candidate solution S and compare it with the historical optimal solution S*, and add it to the taboo table if it is better than the historical optimal. The taboo table stores the changed points and does not participate in the subsequent iterations to avoid repeated roundabout searches. If it is not better than the historical optimal and has appeared in the taboo table, delete the solution and determine the next candidate solution. Otherwise, add the solution to the taboo table and use it as the initial solution for the next iteration. Finally, take 50 individual iterations as the convergence criterion, and output the historical optimal solution as the optimization result. In order to speed up the solution, we stipulate that the three alpha wolves in each iteration of the gray wolf algorithm must perform taboo search, while other wolves have only a lower probability of performing taboo search.
[0116] Wherein, step 2035 specifically includes:
[0117] Traverse each gray wolf in the current second wolf pack. If the gray wolf currently traversed is the alpha wolf, use the gray wolf as the gray wolf to be mutated; if the gray wolf currently traversed is not the alpha wolf, randomly select whether to use the mutation operator for optimization. If the random selection is yes, use the gray wolf as the gray wolf to be mutated. If the random selection is no, the gray wolf is not a gray wolf that participates in the mutation. Specifically, if P i2 >P s Then the currently traversed gray wolf is used as the gray wolf to be mutated. If P i2 ≤P s Then the currently traversed gray wolf is a gray wolf that does not participate in mutation; P i2 is a random value, P s is a fixed value.
[0118] If the currently traversed gray wolf is the gray wolf to be mutated, the second iteration number is initialized;
[0119] The mutation operator is used to mutate the currently traversed gray wolves, and the current wolf group to be mutated is obtained, which is composed of multiple optimized gray wolves;
[0120] The gray wolf with the smallest fitness among the current wolf pack to be mutated is taken as the temporary optimal solution;
[0121] Determine whether the fitness of the temporary optimal solution is lower than the fitness of the historical optimal solution;
[0122] If yes, the temporary optimal solution is stored in the taboo table, and the historical optimal solution is updated to the temporary optimal solution;
[0123] If not, it is determined whether the temporary optimal solution is stored in the taboo table. If it is stored in the taboo table, the gray wolf corresponding to the temporary optimal solution is removed from the current wolf group to be mutated, and the step of returning to the step of taking the gray wolf with the smallest fitness in the current wolf group to be mutated as the temporary optimal solution is returned; if it is not stored in the taboo table, the temporary optimal solution is stored in the taboo table;
[0124] Determine whether the second iteration number reaches the second set iteration number;
[0125] If not, the second iteration number is increased by 1, and the temporary optimal solution is mutated using a mutation operator to obtain a current wolf pack to be mutated consisting of multiple mutated optimized gray wolves, and the step of taking the gray wolf with the smallest fitness in the current wolf pack to be mutated as the temporary optimal solution is returned;
[0126] If yes, then initialize the second iteration number, traverse the gray wolves in the current second wolf pack, until the traversal of the gray wolves in the current second wolf pack is completed, and obtain the current third wolf pack. The current third wolf pack includes the gray wolves after the mutation optimization of each gray wolf to be mutated (the temporary optimal solution of the last iteration) and the gray wolves that do not participate in the mutation.
[0127] The proposed method analyzes the worst-case delay based on network calculations, reduces the worst-case delay by optimizing window parameters, and improves the scheduling success rate. At the same time, a gapless design is used to compress the number of window switches in the gated list to reduce the difficulty of deployment. In order to further improve the global and local optimization effects, the gray wolf algorithm is improved and genetic operators and mutation operators are introduced.
[0128] Based on the same inventive concept, the embodiment of the present application also provides a scheduling device for a time-sensitive network based on an intervalless window for implementing the scheduling method for a time-sensitive network based on an intervalless window involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the scheduling device for a time-sensitive network based on an intervalless window provided below can be referred to the above limitations on the scheduling method for a time-sensitive network based on an intervalless window, and will not be repeated here.
[0129] In an exemplary embodiment, the present application provides a scheduling device for a time-sensitive network based on an interval-free window, comprising:
[0130] The module for acquiring parameters of a flow in a time-sensitive network is used to acquire parameters of a flow in a time-sensitive network.
[0131] The candidate set generation module is used to randomly generate multiple candidate solutions of gapless windows for scheduling time-sensitive networks; each candidate solution is generated by decoding each solution vector, each solution vector includes multiple continuous value intervals, each value interval represents an output port, each value interval is divided into multiple segments, and the length value of each segment maps the window length of the stream with the same priority.
[0132] The candidate set optimization module is used to use the accumulated delay upper bounds of each output port as fitness, optimize the candidate solutions through the improved gray wolf algorithm, and use the optimized optimal solution as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after introducing the crossover operator and the mutation operator.
[0133] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. 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. 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 scheduling data based on a time-sensitive network with no interval window. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a scheduling method for a time-sensitive network based on a time-sensitive network with no interval window is implemented.
[0134] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0135] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned scheduling method embodiments for a time-sensitive network based on an intervalless window.
[0136] In an exemplary embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned scheduling method embodiments of a time-sensitive network based on an intervalless window when executed by a processor.
[0137] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0138] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile 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), magnetic 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 may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0139] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a data processing logic of a programmable logic device, etc., but is not limited thereto.
[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0141] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A scheduling method for a time-sensitive network based on an interval-free window, characterized in that: The scheduling method based on a time-sensitive network without interval windows includes: Obtaining parameters of flows in a time-sensitive network; Based on the parameters of the flow in the time-sensitive network, a plurality of candidate solutions of gapless windows for scheduling the time-sensitive network are randomly generated; each candidate solution is generated by decoding each solution vector, each solution vector includes a plurality of continuous value intervals, each value interval represents an output port, each value interval is divided into a plurality of segments, and the length value of each segment maps the window length of the flow of the same priority; The accumulated upper bound of the delay of each output port is used as fitness, and the candidate solution is optimized by the improved gray wolf algorithm, and the optimized optimal solution is used as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after the crossover operator and the mutation operator are introduced.
2. The scheduling method based on time-sensitive network without interval window according to claim 1 is characterized in that: Flow parameters include priority, period, and size; When randomly generating multiple candidate solutions for scheduling time-sensitive networks without gap windows based on the parameters of the flow in the time-sensitive network, the constraints on the window length are: in, is the window length of the mth priority flow at the hth output port, It represents the set of flows of the mth priority transmitted by the hth output port. HP is the super period, and the value of the super period is The least common multiple of the periods of all flows in , f i is the i-th flow, f i .size is f i The size of f i .T is f i The period, T GCL is the gate list period, BW is the bandwidth, is the guard band length; The solution vector is expressed as: Where D is the length of the solution vector, H is the number of output ports in the time-sensitive network, |P h is the priority number of the hth output port; The formula for mapping the length value of each fragment to the window length of a priority stream is: in, is the fragment length corresponding to the i-th priority of the h-th output port, is the length of the fragment corresponding to the mth priority of the hth output port, T GCL is the gate list period; The constraints include for The corresponding window opening time is offset from the start time of the gate list period, is the window length of the jth priority flow of the hth output port, P m is the mth priority, P j is the jth priority, The opening time of the first window is offset from the start time of the gate list period.
3. The scheduling method based on time-sensitive network without interval window according to claim 1 is characterized in that: The fitness is expressed as: Among them, O is the cumulative upper bound of the delay of each output port, F is the set of flows, and f i is the i-th stream, represents f i The maximum end-to-end delay of in, The priority is P m The upper bound of the queuing and transmission delay of the flow at the hth output port, R(f i ) is f i The set of all output ports on the routing path, des represents the last output port, t prop is the propagation delay, t proc To process delay.
4. The scheduling method based on time-sensitive network without interval window according to claim 1 is characterized in that: The accumulated upper bound of the delay of each output port is used as the fitness, and the candidate solution is optimized by the improved grey wolf algorithm. The optimized optimal solution is used as the scheduling scheme of the time-sensitive network, which includes: Initialize the first iteration number; Taking each candidate solution as a gray wolf, calculating the fitness of each gray wolf; Update the position of the gray wolf according to each fitness to obtain the current first wolf pack; The crossover operator is used to optimize the current first wolf pack to obtain the current second wolf pack; The mutation operator is used to optimize the current second wolf pack, and the taboo search algorithm is introduced in the mutation process to obtain the current third wolf pack; Determine whether the first iteration number reaches a first set iteration number; If so, the solution corresponding to the current optimal gray wolf position is used as the scheduling solution for the time-sensitive network; If not, the first iteration number is increased by 1, the current third wolf pack is used as the current first wolf pack, the fitness of each gray wolves in the current first wolf pack is calculated, and the step of using the crossover operator to optimize the current first wolf pack to obtain the current second wolf pack is returned.
5. The scheduling method based on time-sensitive network without interval window according to claim 4 is characterized in that: The crossover operator is used to optimize the current first wolf pack to obtain the current second wolf pack, specifically including: Traverse the current first wolf pack and randomly select whether to use the crossover operator for optimization of the currently traversed gray wolf; If yes, randomly select another gray wolf from the current first wolf pack except the currently traversed gray wolf, use the currently traversed gray wolf and the other gray wolf as the parent generation to cross over, and obtain two offspring gray wolves. The gray wolf with the smallest fitness among the two parent gray wolves and the two offspring gray wolves is used as the gray wolf after crossover optimization. After the traversal of the current first wolf pack is completed, the gray wolves after crossover optimization and the wolf packs in the current first wolf pack that are not optimized by using the crossover operator constitute the current second wolf pack.
6. The scheduling method based on time-sensitive network without interval window according to claim 4 is characterized in that: The mutation operator is used to optimize the current second wolf pack, and the taboo search algorithm is introduced in the mutation process to obtain the current third wolf pack, including: Traverse each gray wolf in the current second wolf pack. If the gray wolf currently traversed is the alpha wolf, use the gray wolf as the gray wolf to be mutated; if the gray wolf currently traversed is not the alpha wolf, randomly select whether to use the mutation operator for optimization. If the random selection is yes, use the gray wolf as the gray wolf to be mutated. If the random selection is no, the gray wolf does not participate in the mutation. If the currently traversed gray wolf is the gray wolf to be mutated, the second iteration number is initialized; The mutation operator is used to mutate the currently traversed gray wolves, and the current wolf group to be mutated is obtained, which is composed of multiple optimized gray wolves; The gray wolf with the smallest fitness among the current wolf pack to be mutated is taken as the temporary optimal solution; Determine whether the fitness of the temporary optimal solution is lower than the fitness of the historical optimal solution; If yes, the temporary optimal solution is stored in the taboo table, and the historical optimal solution is updated to the temporary optimal solution; If not, it is determined whether the temporary optimal solution is stored in the taboo table. If it is stored in the taboo table, the gray wolf corresponding to the temporary optimal solution is removed from the current wolf group to be mutated, and the step of returning to the step of taking the gray wolf with the smallest fitness in the current wolf group to be mutated as the temporary optimal solution is returned; if it is not stored in the taboo table, the temporary optimal solution is stored in the taboo table; Determine whether the second iteration number reaches the second set iteration number; If not, the second iteration number is increased by 1, and the temporary optimal solution is mutated using a mutation operator to obtain a current wolf pack to be mutated consisting of multiple mutated optimized gray wolves, and the step of taking the gray wolf with the smallest fitness in the current wolf pack to be mutated as the temporary optimal solution is returned; If so, initialize the second iteration number, traverse the gray wolves in the current second wolf pack, until the traversal of the gray wolves in the current second wolf pack is completed, and the current third wolf pack is obtained.
7. A scheduling device based on a time-sensitive network without interval windows, characterized in that: The scheduling device based on the time-sensitive network without interval windows includes: A parameter acquisition module for a flow in a time-sensitive network, used to obtain parameters of a flow in a time-sensitive network; A candidate set generation module is used to randomly generate multiple candidate solutions of gapless windows for scheduling time-sensitive networks; each candidate solution is generated by decoding each solution vector, each solution vector includes multiple continuous value intervals, each value interval represents an output port, each value interval is divided into multiple segments, and the length value of each segment maps the window length of the flow of the same priority; The candidate set optimization module is used to use the accumulated delay upper bounds of each output port as fitness, optimize the candidate solutions through the improved gray wolf algorithm, and use the optimized optimal solution as the scheduling scheme of the time-sensitive network; the improved gray wolf algorithm is the gray wolf algorithm after introducing the crossover operator and the mutation operator.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the scheduling method for a time-sensitive network based on an intervalless window according to any one of claims 1 to 6.
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 scheduling method based on a time-sensitive network without interval windows described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the scheduling method based on a time-sensitive network without interval windows described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Multi-level service scheduling engine oriented to time-sensitive network and implementation method
CN114448894A
Industrial wireless and TSN fusion-oriented network scheduling method
CN114553697A
Time-sensitive network flow scheduling method suitable for electric power communication network
CN115333998A
Time-sensitive network traffic scheduling method and system for intelligent connected automobile
CN115883475A
Time-sensitive network traffic scheduling method and system based on survival mechanism
CN116347520A
Cited By
Railway construction optimization method and system based on improved grey wolf algorithm
CN120875180A