Cross-cycle incremental scheduling method and system
By adopting a cross-period incremental scheduling method in the time-sensitive network model, the problem that tasks cannot be cross-period scheduling in the existing technology is solved, and efficient cross-period scheduling and resource optimization of tasks are achieved.
Patent Information
- Application Number
- CN202411301889.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-09-18
AI Technical Summary
In the prior art, when a task completes end-to-end transmission within a repetitive cycle, it cannot be scheduled across cycles, resulting in the transmission task being unable to be completed before the end of the cycle.
Using the cross-period incremental scheduling method, the task tree is executed in the time-sensitive network model through a centralized network configuration unit, the task request message is obtained, the task tree is parsed and constructed, and the task tree is performed based on the cross-period constraints using the incremental computing model. Solve, make scheduling decisions and conduct network configuration management.
Cross-cycle scheduling of tasks is realized, ensuring that critical tasks are given priority, avoid resource conflicts and execution process conflicts, and improving the efficiency of cross-cycle scheduling.
Smart Images

Figure CN119402354A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a cross-cycle incremental scheduling method and system. Background Art
[0002] In the current industrial field, deterministic real-time communication has become a necessary requirement in industrial networks. Distributed network-physical systems have put forward higher requirements on communication in terms of bandwidth, real-time and reliability. The high-bandwidth characteristics of traditional Ethernet can meet these requirements, but its forwarding mode cannot achieve deterministic transmission.
[0003] In the prior art, the IEEE 802.1 time-sensitive network component is used to achieve deterministic communication. The time-sensitive network (TSN) based on the IEEE 802 standard defines a set of sub-protocols and forms a toolkit to meet the needs of different scenarios. The time-sensitive network component covers time synchronization, traffic shaping, reliability and resource management. Time-triggered communication is achieved by combining two important time-sensitive network protocols IEEE 802.1AS and IEEE 802.1Qbv. The periodic scheduling gating list of IEEE802.1Qbv allocates a sending window based on a unified time reference to the queue. In the existing algorithm based on the satisfiability modulo theory (SMT), all tasks complete end-to-end transmission within a repetitive cycle starting from a unified time reference point. In order to avoid conflicts between sending windows, the window is offset relative to the start time of the cycle, but its latest end time is still aligned with the end of the cycle, which results in the actual available end-to-end transmission time being shorter than one cycle. When multiple transmission tasks compete for one port, the transmission task sent later may not be able to complete the end-to-end transmission before the end of the cycle, and the transmission task cannot be completed. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a cross-cycle incremental scheduling method and system to eliminate or improve one or more defects existing in the prior art, and solves the problem that cross-cycle scheduling cannot be performed when performing end-to-end task transmission in the prior art.
[0005] One aspect of the present invention provides a cross-period incremental scheduling method, the method is performed based on a centralized network configuration unit deployed in a time-sensitive network model, the time-sensitive network model also includes a centralized user configuration unit, a user network interface, a terminal and a switch, the method includes the following steps:
[0006] Obtaining a task request message through the user network interface and storing it in the centralized network configuration unit; the task request message is forwarded by the terminal to the user network interface via the centralized user configuration unit;
[0007] Parsing the task request message to obtain periodic task parameters related to the terminal executing the task, communication task parameters related to the switch executing the task, and task execution sequence parameters indicating the execution dependency relationship between the tasks, and constructing a task tree according to the periodic task parameters, the communication task parameters, and the task execution sequence parameters;
[0008] Based on the cross-cycle constraints that limit the task execution requirements of the terminal and the switch, the task tree is solved and the solution results are analyzed through a preset incremental calculation model, and a scheduling decision for the switch to execute the task is made according to the analysis result to perform network configuration management on the switch, and a scheduling decision for the terminal to execute the task is made and transmitted to the centralized user configuration unit to perform network configuration management on the terminal.
[0009] In some embodiments, the process of constructing the time-sensitive network model includes:
[0010] The terminal and the switch are defined as nodes to obtain a node set, a full-duplex link between each two nodes is defined as an edge to obtain an edge set, and a directed graph is created through the node set and the edge set;
[0011] The centralized network configuration unit obtains network topology information through the link discovery protocol of the directed graph, and adds a centralized user configuration unit according to the centralized management requirements of the terminal, so as to construct the terminal, the switch, the centralized network configuration unit and the centralized user configuration unit into a time-sensitive network model; the network topology information includes a network topology structure, terminal performance parameters and switch performance parameters.
[0012] In some embodiments, the centralized network configuration unit acquires network topology information through the link discovery protocol of the directed graph, including:
[0013] The centralized network configuration unit sends a link discovery request to the switch and receives a response message returned by the switch;
[0014] The centralized network configuration unit parses the received response message to obtain network topology information including the network topology structure, the terminal performance parameters and the switch performance parameters.
[0015] In some embodiments, constructing a task tree according to the periodic task parameters, the communication task parameters and the task execution order parameters includes:
[0016] Decompose the periodic task into multiple sub-periodic tasks, and decompose the communication task into multiple sub-communication tasks;
[0017] Analyze the dependencies between the sub-period tasks and the dependencies between the sub-communication tasks, and construct a task tree according to the task execution order parameters; set an offset, a worst-case execution time, and a cross-period binary indicator variable on the sub-period tasks of the task tree; set an offset, a message length, a task cycle, a number of sub-communication tasks, and a cross-period binary indicator variable on the sub-communication tasks of the task tree; and set a task tree priority on the task tree.
[0018] In some embodiments, based on the cross-cycle constraints that define the task execution requirements of the terminal and the switch, solving the task tree through a preset incremental calculation model includes:
[0019] Sort the task trees according to their importance from high to low, and put the task trees of the same importance into a set; put the importance set containing the task tree with the highest importance into the set to be scheduled, and initialize the scheduled set and the maximum schedulable set to be empty;
[0020] Generate corresponding cross-period constraint conditions according to the to-be-scheduled set and the scheduled set and input them into a satisfiability modulo theory solver for solving;
[0021] When the satisfiability modulo theory solver has a solution, the importance set in the to-be-scheduled set is added to the scheduled set and the solved offset is saved; at the same time, the maximum schedulable set is recorded as the scheduled set; when the importance sets are all in the scheduled set, the scheduling solution is exited, and the final solution result and the scheduled set are returned; when the importance set is not in the scheduled set, the set that is not currently involved in the scheduling and has the highest importance is put into the to-be-scheduled set, and the corresponding cross-period constraints are generated according to the to-be-scheduled set and the scheduled set, and the solutions are repeatedly solved through the satisfiability modulo theory solver;
[0022] When the solver has no solution, determine whether the scheduled set is empty. When the scheduled set is empty, determine whether the maximum schedulable set is empty. When the maximum schedulable set is empty, return the final no-solution result. When the maximum schedulable set is not empty, return the final partial solution result and the maximum schedulable set. When the scheduled set is not empty, put the set with the lowest importance in the scheduled set into the set to be scheduled, generate corresponding cross-cycle constraints according to the set to be scheduled and the scheduled set, and repeatedly solve them through the satisfiability modulo theory solver.
[0023] In some embodiments, the cross-cycle constraints that limit the task execution requirements of the terminal and the switch include: task cycle constraints for limiting the offset position and task execution window range of all tasks; task conflict constraints for limiting that all tasks cannot conflict during execution; sub-communication task cycle constraints for limiting the offset position and task sending window range of all sub-communication tasks; sub-communication task conflict constraints for limiting that all sub-communication tasks cannot conflict during sending; sub-communication task transmission constraints for limiting the transmission path and the sending window of the sub-communication task; sub-communication task isolation constraints for limiting the transmission order of sub-communication tasks of the same priority; task tree execution constraints for limiting the task execution requirements in the task tree; and task tree delay constraints for limiting the end-to-end delay of the task tree.
[0024] In some embodiments, a scheduling decision for the switch to perform a task is formulated according to the analysis result to perform network configuration management on the switch, and a scheduling decision for the terminal to perform a task is formulated and transmitted to the centralized user configuration unit to perform network configuration management on the terminal, including:
[0025] When the final solution result is obtained, the scheduled set is parsed and the offset calculated by the task on the terminal is transmitted to the centralized user configuration unit through the user network interface to send the generated terminal configuration file to the terminal; the periodic scheduling gating list configuration file generated by the offset calculated by the task on the switch is sent to the switch;
[0026] When the final partial solution result is obtained, the final partial solution result is parsed and then transmitted to the centralized user configuration through the user network interface to determine whether the configuration file is sent;
[0027] When the final unsolvable result is obtained, the final unsolvable result is transmitted to the centralized user configuration unit through the user network interface to transmit resource allocation failure information to the terminal.
[0028] On the other hand, the present invention also provides a cross-cycle incremental scheduling system, comprising a processor, a memory, and a computer program / instructions stored in the memory, wherein the processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of any one of the above methods.
[0029] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the above methods when executed by a processor.
[0030] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0031] The beneficial effects of the present invention are at least:
[0032] In the cross-cycle incremental scheduling method and system of the present invention, a task request message is obtained through the user network interface and stored in the centralized network configuration unit; the task request message is forwarded by the terminal to the user network interface via the centralized user configuration unit; the centralized user configuration unit performs real-time monitoring and information collection on the periodic tasks of the terminal and establishes a connection relationship with the centralized user configuration unit for data transmission and communication, performs collaborative work and makes scheduling decisions; the task tree is constructed according to the periodic task parameters, the communication task parameters and the task execution sequence parameters to display the dependencies and execution sequence between tasks, clarify the importance of each task to ensure that key tasks are given priority and effective resource allocation is performed; the cross-cycle constraint conditions that limit the terminal and switch task execution requirements can ensure that tasks are executed in sequence, avoiding resource conflicts and execution process conflicts; the preset incremental calculation model solves the task tree, reduces the amount of repeated calculations and improves the efficiency of the solution, obtains the final solution result of the task tree, ensures that key tasks can be successfully scheduled, realizes cross-cycle scheduling in the time-sensitive network model and improves the efficiency of cross-cycle scheduling.
[0033] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0034] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0036] Figure 1 The figure is a flow chart of a cross-cycle incremental scheduling method according to an embodiment of the present invention.
[0037] Figure 2 The figure is a schematic diagram of the structure of a time-sensitive network model according to an embodiment of the present invention.
[0038] Figure 3 A schematic diagram of the solution process of the incremental calculation model described in one embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0040] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0041] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0042] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0043] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0044] In the prior art, a periodic scheduling gating list allocates a sending window based on a unified time reference to a queue. In the existing algorithm based on the satisfiability modulus theory, a task completes end-to-end transmission in a repeating cycle starting from a unified time. In order to avoid sending window conflicts, the window is offset relative to the cycle start time, but its latest end time is still aligned with the cycle end, which results in the actual available end-to-end transmission time being shorter than one cycle; when multiple transmission tasks compete for one port, the transmission tasks sent later cannot complete the end-to-end transmission before the end of the cycle; the present invention proposes a cross-cycle incremental scheduling method and system, which is based on the centralized network configuration unit deployed in the time-sensitive network model, and obtains the time information transmitted by the terminal through the user network interface. The centralized user configuration unit forwards the task request message and stores it in the centralized network configuration unit; the task request message is parsed to obtain the periodic task parameters related to the terminal execution task, the communication task parameters related to the switch execution task and the task execution sequence parameters representing the execution dependency relationship between the tasks and construct a task tree; based on the cross-cycle constraint conditions that limit the task execution requirements of the terminal and the switch, the task tree is solved and the solution results are analyzed through a preset incremental calculation model, and a scheduling decision for the switch to execute the task is formulated according to the analysis result to perform network configuration management on the switch, and a scheduling decision for the terminal to execute the task is formulated and transmitted to the centralized user configuration unit to perform network configuration management on the terminal.
[0045] Figure 1 The flowchart of the cross-cycle incremental scheduling method described in one embodiment of the present invention is as follows. Specifically, the present application provides a cross-cycle incremental scheduling method, which is executed based on a centralized network configuration unit deployed in a time-sensitive network model, and the time-sensitive network model also includes a centralized user configuration unit, a user network interface, a terminal and a switch. The method includes the following steps S101 to S103:
[0046] Step S101: Obtain a task request message through a user network interface and store it in a centralized network configuration unit; the task request message is forwarded from the terminal to the user network interface via the centralized user configuration unit.
[0047] Step S102: parse the task request message to obtain periodic task parameters related to the terminal executing the task, communication task parameters related to the switch executing the task, and task execution sequence parameters indicating the execution dependency relationship between the tasks, and construct a task tree according to the periodic task parameters, communication task parameters, and task execution sequence parameters.
[0048] Step S103: Based on the cross-cycle constraints that limit the task execution requirements of the terminal and the switch, the task tree is solved and the solution results are analyzed through a preset incremental calculation model, and a scheduling decision for the switch to execute the task is made according to the analysis results to perform network configuration management on the switch, and a scheduling decision for the terminal to execute the task is made and transmitted to the centralized user configuration unit to perform network configuration management on the terminal.
[0049] In step S101, the centralized user configuration unit is connected to the centralized network configuration unit through a user network interface (UNI) to transmit the task request message obtained from the terminal to the centralized network configuration unit; switches are deployed between the terminals for end-to-end network transmission, and the centralized user configuration, centralized network configuration, terminals and switches are deployed in a time-sensitive network model constructed by a directed graph. Figure 2 FIG. 1 is a schematic diagram of the structure of a time-sensitive network model according to an embodiment of the present invention. In some embodiments, the process of constructing a time-sensitive network model includes steps S1011 to S1012:
[0050] Step S1011: define terminals and switches as nodes to obtain a node set, define a full-duplex link between every two nodes as an edge to obtain an edge set, and create a directed graph through the node set and the edge set.
[0051] Step S1012: The centralized network configuration unit obtains network topology information through a directed graph link discovery protocol, and adds a centralized user configuration unit according to the centralized management requirements of the terminal, and constructs the terminal, switch, centralized network configuration unit and centralized user configuration unit into a time-sensitive network model; the network topology information includes the network topology structure, terminal performance parameters and switch performance parameters.
[0052] Specifically, nodes represent entities in the time-sensitive network model, and edges represent the connection relationship between entities. The connection relationship includes physical connection and logical connection. A full-duplex link consists of two directed links. Both ends of the full-duplex link have sending and receiving functions, which can enable network transmission to be carried out independently in two directions, improving the efficiency of network communication and bandwidth utilization. In Ethernet, terminals and switches are connected through twisted pair or optical fiber. Furthermore, the link discovery protocol can monitor and adjust the network in real time. When the network topology information changes, the centralized network configuration unit can reconfigure the network according to the changed network topology information to maintain the stability of network performance.
[0053] In some embodiments, the centralized network configuration unit obtains network topology information through a directed graph link discovery protocol, including steps S10121-S10122:
[0054] Step S10121: The centralized network configuration unit sends a link discovery request to the switch and receives a response message returned by the switch.
[0055] Step S10122: The centralized network configuration unit parses the received response message to obtain network topology information including network topology structure, terminal performance parameters, and switch performance parameters.
[0056] Furthermore, the structure of terminals, switches and full-duplex links in the network is represented by a directed graph, and the centralized network configuration unit uses a link discovery protocol to obtain detailed information and connection relationships of nodes and edges in the directed graph; the centralized network configuration unit sends a link discovery request to the switch, and the link discovery request includes a topology structure request and a performance parameter request. After receiving the link discovery request, the switch responds according to the request content, providing performance parameters and connection information of itself and adjacent nodes. After collecting information, the centralized network configuration unit builds a time-sensitive network model.
[0057] In step S102, the periodic task parameters include an offset, a worst execution time, and a cross-cycle binary indicator variable. The cross-cycle binary indicator variable uses a binary variable to indicate whether the task crosses cycles. When the binary indicator variable is 1, it indicates that the task crosses cycles, and the task execution window is in a different cycle from the previous task. When the binary indicator variable is 0, it indicates that the task does not cross cycles, and the task execution window is in the same cycle as the previous task. The communication task parameters include an offset, a message length, a task cycle, the number of sub-communication tasks, and a cross-cycle binary indicator variable, wherein the length of each sub-communication task is less than the maximum transmission unit. After parsing the task request message to obtain the parameters, a task tree is constructed according to the execution order parameters between tasks.
[0058] In some embodiments, constructing a task tree according to periodic task parameters, communication task parameters and task execution order parameters includes steps S1021 to S1022:
[0059] Step S1021: decompose the periodic task into a plurality of sub-periodic tasks, and decompose the communication task into a plurality of sub-communication tasks.
[0060] Step S1022: Analyze the dependencies between sub-cycle tasks and the dependencies between sub-communication tasks, and construct a task tree according to the task execution order parameters; set the offset, worst execution time and cross-cycle binary indicator variables on the sub-cycle tasks of the task tree; set the offset, message length, task cycle, number of sub-communication tasks and cross-cycle binary indicator variables on the sub-communication tasks of the task tree; set the task tree priority on the task tree.
[0061] Specifically, the task tree describes the execution process and dependencies of tasks in a graphical way, and sets the execution order of tasks through the dependencies of tasks; multiple tasks can be executed independently in parallel or in order according to the existing dependencies. Only when the dependent tasks are completed can the next tasks be executed.
[0062] In step S103, Figure 3 The figure is a schematic diagram of the solution process of the incremental calculation model according to an embodiment of the present invention. In some embodiments, based on the cross-cycle constraint conditions that limit the task execution requirements of the terminal and the switch, solving the task tree by using the preset incremental calculation model includes steps S1031 to S1034:
[0063] Step S1031: Sort the task trees according to their importance from high to low, and put the task trees of the same importance into a set; put the importance set containing the task tree with the highest importance into the set to be scheduled, and initialize the scheduled set and the maximum schedulable set to empty.
[0064] Step S1032: Generate corresponding cross-cycle constraints according to the set to be scheduled and the set already scheduled and input them into the satisfiability modulo theory solver for solving.
[0065] Step S1033: When the satisfiability modulo theory solver has a solution, the importance set in the to-be-scheduled set is added to the scheduled set and the solved offset is saved; at the same time, the maximum schedulable set is recorded as the scheduled set; when all the importance sets are in the scheduled set, the scheduling solution is exited, and the final solution result and the scheduled set are returned; when the importance set is not in the scheduled set, the set that is not currently participating in the scheduling and has the highest importance is placed in the to-be-scheduled set, and the corresponding cross-period constraints are generated according to the to-be-scheduled set and the scheduled set, and the solution is repeated through the satisfiability modulo theory solver.
[0066] Step S1034: When the solver has no solution, determine whether the scheduled set is empty. When the scheduled set is empty, determine whether the maximum schedulable set is empty. When the maximum schedulable set is empty, return the final no-solution result. When the maximum schedulable set is not empty, return the final partial solution result and the maximum schedulable set. When the scheduled set is not empty, put the set with the lowest importance in the scheduled set into the set to be scheduled, generate corresponding cross-cycle constraints according to the set to be scheduled and the scheduled set, and repeatedly solve them through the satisfiability modulo theory solver.
[0067] Specifically, the task tree is solved by an incremental computing model provided with a satisfiability modulus theory solver to make scheduling decisions to configure network resources for terminals and switches in a time-sensitive network model. The incremental computing model has three solution results, namely, a final solution result, a final partial solution result, and a final unsolvable result. The three results are analyzed separately by a centralized network configuration unit to perform network configuration management on the switch through the centralized network configuration unit, and the analysis results are transmitted to a centralized user configuration unit to perform network configuration management on the terminal. In some embodiments, a scheduling decision for the switch to execute a task is made according to the analysis result to perform network configuration management on the switch, and a scheduling decision for the terminal to execute a task is made and transmitted to a centralized user configuration unit to perform network configuration management on the terminal, including steps S1 to S3:
[0068] Step S1: When the final solution is obtained, the scheduled set is parsed and the offset calculated by the task on the terminal is passed to the centralized user configuration unit through the user network interface to send the generated terminal configuration file to the terminal; the periodic scheduling gating list configuration file generated by the offset calculated by the task on the switch is sent to the switch.
[0069] Step S2: When the final partial solution result is obtained, the final partial solution result is parsed and transmitted to the centralized user configuration unit through the user network interface to determine whether the configuration file should be sent.
[0070] Step S3: When a final unsolvable result is obtained, the final unsolvable result is transmitted to the centralized user configuration unit through the user network interface to transmit resource allocation failure information to the terminal.
[0071] In some embodiments, the cross-cycle constraints that limit the task execution requirements of the terminal and the switch include: task cycle constraints for limiting the offset position and task execution window range of all tasks; task conflict constraints for limiting that all tasks cannot conflict during execution; sub-communication task cycle constraints for limiting the offset position and task sending window range of all sub-communication tasks; sub-communication task conflict constraints for limiting that all sub-communication tasks cannot conflict during sending; sub-communication task transmission constraints for limiting the transmission path and the sending window of the sub-communication task; sub-communication task isolation constraints for limiting the transmission order of sub-communication tasks of the same priority; task tree execution constraints for limiting the task execution requirements in the task tree; and task tree delay constraints for limiting the end-to-end delay of the task tree.
[0072] Specifically, the task cycle constraint stipulates that the offset of all tasks can be at any time within a cycle, and the task execution window can cross the cycle boundary; the task conflict constraint stipulates that all tasks cannot be executed on the same terminal at the same time, and the task execution window cannot conflict with other task execution windows when it is mapped back to windows in other super cycles when it crosses the super cycle boundary; the sub-communication task cycle constraint stipulates that the offset of all sub-communication tasks can be at any time within a cycle, and the sending window of the sub-communication task can cross the cycle boundary; the sub-communication task conflict constraint stipulates that all sub-communication tasks cannot be transmitted on the same link at the same time; the sub-communication task sending window cannot conflict with other sub-communication task sending windows when it crosses the super cycle boundary; the sub-communication task transmission constraint stipulates Subcommunication tasks must be transmitted sequentially along the path, and the next-hop sending window of the same subcommunication task must be between the sending windows of the current cycle and the next cycle of the previous cycle; the subcommunication task isolation constraint stipulates that subcommunication tasks of the same priority must be transmitted in the order of arrival. When a subcommunication task arrives after another subcommunication task is sent, the sending window of the subcommunication task must be before the arrival of the next cycle of the other subcommunication task; the task tree execution constraint stipulates that the tasks in the task tree must be executed in sequence, and any task can only be executed after its child node tasks are completed; the task tree delay constraint stipulates that the end-to-end delay corresponding to the task tree is within the upper bound of the end-to-end delay of the task tree, and the difference between the start time of any leaf node task and the end time of the root node task in the task tree is less than the upper bound of the end-to-end delay of the task tree.
[0073] Furthermore, through cross-cycle constraints, reasonable network configuration is performed on the cross-cycle tasks in different cycles of the current task execution window and the previous task, so that the tasks are executed in an orderly manner; cross-cycle execution of tasks can make full use of the idle time within the cycle and improve the utilization rate of the cycle, and the existence of cross-cycle constraints can avoid resource competition and task conflicts between tasks, further improving the execution efficiency of tasks and resource utilization within the cycle.
[0074] On the other hand, the present invention also provides a cross-cycle incremental scheduling system, including a processor, a memory, and a computer program / instruction stored in the memory, the processor is used to execute the computer program / instruction, and when the computer program / instruction is executed, the system implements the steps of any of the above methods.
[0075] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the above methods when the program / instruction is executed by a processor.
[0076] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0077] The present invention is described below in conjunction with a specific embodiment:
[0078] The present invention provides a cross-cycle incremental scheduling method and system. Through the cross-cycle scheduling concept, the end-to-end delay of tasks is allowed to cross the cycle boundary, and the incremental calculation model is used for scheduling solution, which speeds up the scheduling solution speed. When it is difficult to solve, the schedulability of high-importance tasks can be prioritized. Compared with traditional methods, the present invention can achieve lower end-to-end delay, and the incremental calculation model used can speed up the solution speed, while ensuring the determinism and low latency of important task trees.
[0079] 1. A cross-period scheduling method includes steps S100 to S500:
[0080] Step S100: The centralized network configuration unit (CNC) obtains network topology information through the link discovery protocol, including network topology configuration, performance parameter information of switches and terminals in the network, and constructs a specific time-sensitive network model; network modeling is performed using G = {V, L}, where the vertex set V = {ES, SW} represents all terminals and switches in the network, and the edge set L represents all full-duplex links in the network; the terminal es i ∈ES is composed of the tuple {es i .s,es i .r} definition, where es i .s indicates the upper limit of the sending delay, es i .r represents the upper bound of the receive delay; the switch uses sw i .pd indicates the internal processing delay.
[0081] A full-duplex link between two adjacent nodes in a network consists of two directed links l a,b and l b,a Composition: Link l a,b The parameters are {l a,b .t,l a,b ,q}, where l a,b .t represents the link transmission rate, l a,b ,q represents the maximum number of scheduling queues supported by the link transmitter.
[0082] Step S200: The centralized user configuration unit (CUC) receives the task request message from the terminal, including the parameters of the periodic task executed on the terminal, the parameters of the communication task executed by the switch between the terminals, and the execution order parameters between the tasks; and sends the parameter information to the centralized network configuration unit through the user network interface (UNI).
[0083] Step S300: The centralized network configuration unit receives the parameter information of the centralized user configuration unit and models the tasks in the network; the periodic tasks executed on the terminal By tuple Definition, where Indicates the offset, represents the worst case execution time (WCET) of the task, Represents the task cycle, Binary indicator variable indicating whether a task spans a period.
[0084] Define each communication task between terminals Corresponding to a flow F i , flow through tuples Definition, where Indicates the flow priority, represents the flow period, Indicates the number of flow instances in a flow; a flow instance is a sub-communication task in a communication task; a flow consists of one or more flow instances, where the length of each flow instance is less than the maximum transmission unit (MTU) size; each flow instance Additional tuples defined relative to the stream in Indicates the offset, Indicates the duration of the stream transmission. Represents a cross-cycle binary indicator variable; the set of flow instances at the first hop and the last hop of the flow are represented by src() and dst() respectively; the first flow instance and the last flow instance in the flow are represented by first() and last() respectively.
[0085] According to the execution order parameters between tasks, a task tree model is abstracted, and each task tree corresponds to an application a i ∈A, define a i .e2e represents the upper bound of the end-to-end delay of the application.
[0086] Step S400: To ensure that the more important the task tree is, the more successfully it can be scheduled, the method adopts an incremental computing model based on a satisfiability modulo theory (SMT) solver for solving; when solving, corresponding cross-cycle constraints are specified according to the information input in the current round, and the constraints include task cycle constraints, task conflict constraints, sub-communication task cycle constraints, sub-communication task conflict constraints, sub-communication task transmission constraints, sub-communication task isolation constraints, task tree execution constraints, and task tree delay constraints.
[0087] Step S500: The centralized network configuration unit analyzes the final solution result.
[0088] 2. The solution process of the incremental calculation model includes steps S4001 to S4003:
[0089] Step S4001: Initially, the task trees are sorted from high to low according to their importance, and task trees of the same importance are put into one set; the set with the highest importance is put into the set to be scheduled, and the scheduled set and the maximum schedulable set are initialized to empty.
[0090] Step S4002: Generate cross-cycle constraints based on the to-be-scheduled set and the scheduled set; when generating constraints for the scheduled set, the task offset needs to be additionally constrained to be the previously solved value; put the generated cross-cycle constraints into the satisfiability modulo theory solver for solving, and execute step S4003 or step S4004 depending on whether the solver has a solution.
[0091] Step S4003: When the solver has a solution in step S4002, all importance sets in the set to be scheduled are added to the scheduled set, and the value of the solved offset is saved; at the same time, the maximum schedulable set is recorded as the current scheduled set; when all importance sets are in the scheduled set, the scheduling solution is exited, and the solution and the scheduled set are returned, otherwise the set that is not currently involved in the scheduling and has the highest importance is placed in the set to be scheduled, and step S4002 is repeated. When the solver has no solution in step S4002, step S4005 or step S4006 is executed according to whether the scheduled set is empty. When the solver has no solution in step S4002 and the scheduled set is empty, the scheduling solution is exited, and when the maximum schedulable set is empty, no solution is returned, and when the maximum schedulable set is not empty, partial solutions and the maximum schedulable set are returned. When the solver has no solution in step S4002 and the scheduled set is not empty, the set with the lowest importance in the scheduled set is put into the set to be scheduled, and step S4002 is repeated.
[0092] 3. Cross-period constraints include:
[0093] 3.1. Task cycle constraint: The offset of all tasks can be at any time within a cycle, and the task execution window can cross the cycle boundary. The corresponding formula is expressed as follows:
[0094]
[0095] 3.2. Task conflict constraint: All tasks cannot be executed on the same end system at the same time. When a task execution window crosses the hypercycle boundary, the window mapped back to other hypercycles cannot conflict with other task execution windows. The corresponding formula is expressed as follows:
[0096]
[0097]
[0098] 3.3. Sub-communication task cycle constraint: The offset of all sub-communication tasks can be at any time within a cycle, and the sub-communication task sending window can cross the cycle boundary. The corresponding formula is expressed as follows:
[0099]
[0100] 3.4. Sub-communication task conflict constraint: All sub-communication tasks cannot be transmitted on the same link at the same time. When a sub-communication task sends a window across a hypercycle boundary, the window mapped back to other hypercycles cannot conflict with other sub-communication task send windows. The corresponding formula is expressed as follows:
[0101]
[0102] 3.5. Subcommunication task transmission constraints: Subcommunication tasks must be transmitted sequentially along the path. The next hop sending window of the same subcommunication task must be between the sending windows of the current cycle and the next cycle of the previous hop. The corresponding formula is expressed as follows:
[0103]
[0104] 3.6. Sub-communication task isolation constraint: Sub-communication tasks of the same priority must be transmitted in the order of arrival. When a sub-communication task arrives after another sub-communication task is sent, the sending window of the sub-communication task must be before the next cycle of the other sub-communication task arrives. The corresponding formula is expressed as follows:
[0105]
[0106] 3.7. Task tree execution constraints: Tasks in the task tree must be executed in order. Any task can only be executed after its child node tasks are completed. The corresponding formula is as follows:
[0107]
[0108]
[0109] 3.8. Task tree delay constraint: The end-to-end delay corresponding to the task tree is within the upper limit of the end-to-end delay of the task tree. The difference between the task start time of any leaf node and the task end time of the root node of the task tree is less than the upper limit of the end-to-end delay of the task tree. The end-to-end delay of the task tree is within the upper limit of the end-to-end delay of the task tree. The corresponding formula is expressed as follows:
[0110]
[0111] 4. The centralized network configuration unit analyzes the final solution results and divides them into the following situations according to the final solution results:
[0112] 4.1. If there is a solution in the final solution, the scheduled set is parsed, and the offset calculated by the task on the terminal is passed to the centralized user configuration unit through the user network interface. The corresponding terminal configuration file is generated and sent to each terminal; the centralized network configuration unit generates a gating list configuration file based on the offset calculated on the switch and sends it to each switch.
[0113] 4.2. In the final solution, if there is a partial solution, the solution result is parsed and passed to the centralized user configuration unit through the user network interface. The user decides on the subsequent execution operations, including not sending configuration parameters and sending configuration parameters with partial solution.
[0114] 4.3. If there is no solution in the final solution, the unsolvable situation will be transmitted to the centralized user configuration unit through the user network interface to notify the user, and a resource allocation failure message will be returned to each terminal.
[0115] In summary, the present invention provides a cross-cycle incremental scheduling method and system, which is executed based on a centralized network configuration unit deployed in a time-sensitive network model, and a task request message is obtained through the user network interface and stored in the centralized network configuration unit; the task request message is forwarded by the terminal to the user network interface via the centralized user configuration unit; the task request message is parsed to obtain periodic task parameters related to the terminal execution task, communication task parameters related to the switch execution task, and task execution sequence parameters representing the execution dependency relationship between tasks, and a task tree is constructed; based on the cross-cycle constraint conditions that limit the task execution requirements of the terminal and the switch, the task tree is solved and the solution results are analyzed through a preset incremental calculation model, and a scheduling decision for the switch to execute the task is formulated according to the analysis result to perform network configuration management on the switch, and a scheduling decision for the terminal to execute the task is formulated and transmitted to the centralized user configuration unit to perform network configuration management on the terminal.
[0116] An embodiment of the present invention further provides a computer device, which may include a processor and a memory, wherein the processor and the memory may be connected via a bus or in other ways.
[0117] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0118] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the key shielding method of the vehicle-mounted display device in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory.
[0119] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0120] The one or more modules are stored in the memory, and when executed by the processor, the method described in this embodiment is performed.
[0121] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0122] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention 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 on a transmission medium or a communication link via a data signal carried in a carrier.
[0123] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0124] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cross-cycle incremental scheduling method, characterized in that: The method is performed based on a centralized network configuration unit deployed in a time-sensitive network model, wherein the time-sensitive network model further includes a centralized user configuration unit, a user network interface, a terminal, and a switch, and the method includes the following steps: Obtaining a task request message through the user network interface and storing it in the centralized network configuration unit; the task request message is forwarded by the terminal to the user network interface via the centralized user configuration unit; Parsing the task request message to obtain periodic task parameters related to the terminal executing the task, communication task parameters related to the switch executing the task, and task execution sequence parameters indicating the execution dependency relationship between the tasks, and constructing a task tree according to the periodic task parameters, the communication task parameters, and the task execution sequence parameters; Based on the cross-cycle constraints that limit the task execution requirements of the terminal and the switch, the task tree is solved and the solution results are analyzed through a preset incremental calculation model, and a scheduling decision for the switch to execute the task is made according to the analysis result to perform network configuration management on the switch, and a scheduling decision for the terminal to execute the task is made and transmitted to the centralized user configuration unit to perform network configuration management on the terminal.
2. The cross-cycle incremental scheduling method according to claim 1, characterized in that: The construction process of the time-sensitive network model includes: The terminal and the switch are defined as nodes to obtain a node set, a full-duplex link between each two nodes is defined as an edge to obtain an edge set, and a directed graph is created through the node set and the edge set; The centralized network configuration unit obtains network topology information through the link discovery protocol of the directed graph, and adds a centralized user configuration unit according to the centralized management requirements of the terminal, so as to construct the terminal, the switch, the centralized network configuration unit and the centralized user configuration unit into a time-sensitive network model; the network topology information includes a network topology structure, terminal performance parameters and switch performance parameters.
3. The cross-cycle incremental scheduling method according to claim 2, characterized in that: The centralized network configuration unit acquires network topology information through the link discovery protocol of the directed graph, including: The centralized network configuration unit sends a link discovery request to the switch and receives a response message returned by the switch; The centralized network configuration unit parses the received response message to obtain network topology information including the network topology structure, the terminal performance parameters and the switch performance parameters.
4. The cross-cycle incremental scheduling method according to claim 1, characterized in that: Constructing a task tree according to the periodic task parameters, the communication task parameters and the task execution order parameters comprises: Decompose the periodic task into multiple sub-periodic tasks, and decompose the communication task into multiple sub-communication tasks; Analyze the dependencies between the sub-period tasks and the dependencies between the sub-communication tasks, and construct a task tree according to the task execution order parameters; set an offset, a worst-case execution time, and a cross-period binary indicator variable on the sub-period tasks of the task tree; set an offset, a message length, a task cycle, a number of sub-communication tasks, and a cross-period binary indicator variable on the sub-communication tasks of the task tree; and set a task tree priority on the task tree.
5. The cross-cycle incremental scheduling method according to claim 1, characterized in that: Based on the cross-cycle constraints that limit the task execution requirements of the terminal and the switch, solving the task tree through a preset incremental calculation model includes: Sort the task trees according to their importance from high to low, and put the task trees of the same importance into a set; put the importance set containing the task tree with the highest importance into the set to be scheduled, and initialize the scheduled set and the maximum schedulable set to be empty; Generate corresponding cross-period constraint conditions according to the to-be-scheduled set and the scheduled set and input them into a satisfiability modulo theory solver for solving; When the satisfiability modulo theory solver has a solution, the importance set in the to-be-scheduled set is added to the scheduled set and the solved offset is saved; at the same time, the maximum schedulable set is recorded as the scheduled set; when the importance sets are all in the scheduled set, the scheduling solution is exited, and the final solution result and the scheduled set are returned; when the importance set is not in the scheduled set, the set that is not currently involved in the scheduling and has the highest importance is put into the to-be-scheduled set, and the corresponding cross-period constraints are generated according to the to-be-scheduled set and the scheduled set, and the solutions are repeatedly solved through the satisfiability modulo theory solver; When the solver has no solution, determine whether the scheduled set is empty. When the scheduled set is empty, determine whether the maximum schedulable set is empty. When the maximum schedulable set is empty, return the final no-solution result. When the maximum schedulable set is not empty, return the final partial solution result and the maximum schedulable set. When the scheduled set is not empty, put the set with the lowest importance in the scheduled set into the set to be scheduled, generate corresponding cross-cycle constraints according to the set to be scheduled and the scheduled set, and repeatedly solve them through the satisfiability modulo theory solver.
6. The cross-cycle incremental scheduling method according to claim 1, characterized in that: The cross-cycle constraints that limit the task execution requirements of terminals and switches include: task cycle constraints for limiting the offset positions of all tasks and the range of task execution windows; task conflict constraints for limiting that all tasks cannot conflict during execution; sub-communication task cycle constraints for limiting the offset positions of all sub-communication tasks and the range of task sending windows; sub-communication task conflict constraints for limiting that all sub-communication tasks cannot conflict during sending; sub-communication task transmission constraints for limiting transmission paths and sending windows of sub-communication tasks; sub-communication task isolation constraints for limiting the transmission order of sub-communication tasks of the same priority; task tree execution constraints for limiting the task execution requirements in the task tree; and task tree delay constraints for limiting the end-to-end delay of the task tree.
7. The cross-cycle incremental scheduling method according to claim 1, characterized in that: According to the analysis result, a scheduling decision for the switch to execute the task is formulated to perform network configuration management on the switch, and a scheduling decision for the terminal to execute the task is formulated and transmitted to the centralized user configuration unit to perform network configuration management on the terminal, including: When the final solution result is obtained, the scheduled set is parsed and the offset calculated by the task on the terminal is transmitted to the centralized user configuration unit through the user network interface to send the generated terminal configuration file to the terminal; the periodic scheduling gating list configuration file generated by the offset calculated by the task on the switch is sent to the switch; When the final partial solution result is obtained, the final partial solution result is parsed and then transmitted to the centralized user configuration through the user network interface to determine whether the configuration file is sent; When the final unsolvable result is obtained, the final unsolvable result is transmitted to the centralized user configuration unit through the user network interface to transmit resource allocation failure information to the terminal.
8. A cross-cycle incremental scheduling system, comprising a processor, a memory, and a computer program / instruction stored in the memory, characterized in that: The processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the system implements the steps of the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
A method and system for scheduling tasks
CN109445929A
Task scheduling model of TTFC network and message scheduling table generation method
CN111030835A
Dependent object scheduling method and device, computer system and storage medium
CN113821314A
Configuration method and device of time sensitive network and computer readable storage medium
CN114513404A
Process layer network communication method, device and system based on TSN, and TSN controller
CN115484140A