A time-triggered service incremental scheduling method

By constructing a network topology graph and a binary search tree to record idle periods, the incremental scheduling method of time-triggered Ethernet is optimized, which solves the problems of the system's inability to dynamically update and high solution complexity, and achieves efficient service scheduling and low packet loss rate.

CN118802715BActive Publication Date: 2025-09-12XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410814465.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2025-09-12
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Existing time-triggered Ethernet systems cannot dynamically update services. Incremental scheduling leads to missing or mismatched services, and the solution complexity is high, making it unable to adapt to the dynamic changes in complex industrial environments.

Method used

A time-triggered incremental service scheduling method is adopted. By constructing a network topology graph and using a binary search tree to record idle periods, the optimal adaptation search is performed based on the periodic parameters of scheduled and to-be-scheduled services. This method optimizes the scheduling of new services, avoids global rescheduling, and reduces the solution complexity.

Benefits of technology

In large-scale TT business scenarios, it avoids global rescheduling, reduces network update lag, reduces solution complexity, improves the scheduling success rate of new services, and avoids service packet loss caused by mixing new and old scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802715B_ABST
    Figure CN118802715B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for incremental scheduling of time-triggered services, and belongs to the field of communication technology. Based on the concept of the best adaptation algorithm, the occupied time periods on the links corresponding to the offline scheduled TT services are removed, and the remaining time periods are the idle time periods. The idle time periods on all links in the network topology are then recorded in a data structure called a binary search tree. Each link corresponds to a binary search tree containing all the idle time periods on its own link. The path dependency constraints and conflict-free constraints that need to be met during TT service transmission are comprehensively considered, and the idle time periods of each link that best meet the TT service transmission are found as the scheduling results for the TT service. The present invention significantly improves the scheduling success rate of new services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to a time-triggered service incremental scheduling method. Background Art

[0002] Time-triggered Ethernet (TTE) emerged primarily to meet the needs of applications with high real-time requirements. Traditional Ethernet is event-triggered, meaning that data packets are sent only when an event (such as data arrival) occurs. This mechanism cannot meet the requirements of applications with strict real-time communication requirements, such as industrial control, automotive networks, and aerospace. Time-triggered Ethernet introduces a time-triggered mechanism, meaning that data packets are sent according to a predetermined schedule or time slot, rather than waiting for an event trigger. This ensures that data is sent or received within the predetermined time, thus meeting the needs of applications with high real-time requirements.

[0003] Time-triggered (TT) services refer to communications services in TTE that transmit data according to a predetermined schedule or time slot. TT services are crucial to the real-time, predictable, and highly reliable network communications of TTE systems. These services enjoy the highest priority in TTE because they are based on strict time scheduling. Following the constraints of a pre-defined schedule, time-triggered services transmit and receive data within a specified time window, ensuring that data is forwarded within the specified timeframe and enabling real-time control. This approach also avoids conflicts and collisions during packet transmission, significantly improving data transmission accuracy and network transmission efficiency.

[0004] In existing Time-Triggered Ethernet (TTE) systems, the transmission times of TT services are driven by static schedules. However, with the advancement of Industry 4.0 and smart manufacturing, the application of TTE systems in complex industrial environments is expanding, and the real-time tasks and interactive requirements they undertake are becoming increasingly diverse and dynamic. The existing offline-configured schedules are unable to adapt to this constantly changing environment. The system must be able to dynamically update and adapt configurations to specific service changes. Therefore, the design and optimization of incremental scheduling algorithms for TT services is a key research direction in Time-Triggered Ethernet (TTE).

[0005] Marina Gutiérrez et al. proposed a real-time network configuration agent model based on a time-triggered paradigm, aiming to simplify the configuration process for real-time TTE network changes. This model introduces the concept of a "configuration agent," whose primary functions include continuously monitoring services running in the network, extracting service parameters based on measurement data, and generating TTE service schedules. This real-time network configuration agent model provides continuous configuration services throughout the different stages of a real-time network's lifecycle, offering a comprehensive solution for adapting to dynamic configuration updates. However, when the number of TTE services is large, the time required to generate new schedules can significantly increase, leading to delays in network updates.

[0006] Li Zonghui et al. proposed an enhanced reconstruction mechanism for deterministic transmission of services in TTE networks. This mechanism analyzes the dependencies of conflicting transmissions of TT services during network updates and provides a theoretical analysis of deterministic transmission. The reconstruction problem is transformed into an optimization problem on a dependency graph, with minimizing the number of lost frames as the primary optimization objective and the update duration as the secondary optimization objective, thereby generating an updated schedule. They verified that the new mechanism can significantly reduce the loss of TT services during network reconstruction, achieving zero loss in most cases. However, the mechanism has only been verified in two real industrial network topologies, with relatively limited validation scenarios. Therefore, further in-depth verification and research are still needed for a wider range of application scenarios.

[0007] Naresh Ganesh Nayak et al. designed an incremental scheduling algorithm for time-triggered service updates in the field of time-sensitive networks. Building on existing scheduling results, they used an integer programming model to solve the scheduling problem for new TT services. While this algorithm achieved highly optimal scheduling results, the solution time was still relatively long. Most of this research focused on solving the scheduling time for new TT services, achieving optimal scheduling by setting reasonable optimization goals. However, it did not consider the problem of TT service packet loss caused by the mixing of old and new schedules during the configuration process, which could lead to unavoidable application-layer failures.

[0008] Luan Buqun proposed a dynamically improved finite level bin packing algorithm, designed to enable the rapid rollout of new TT services and improve the efficiency of dynamic system updates. Based on existing scheduling results, this algorithm uses a bin packing algorithm to convert new TT services into new items to be packed. These new items are then placed in bins and then sent online to complete the scheduling of new TT services. However, when too many new items are added, the performance of the bin packing results gradually degrades, requiring all items to be repacked, which increases the time required to generate the schedule.

[0009] The above-mentioned prior art has the following disadvantages:

[0010] First, when the number of TT services is large, all services need to be rescheduled, and the time to generate a new schedule will increase significantly, causing network updates to lag.

[0011] Second, the problem of TT service packet loss caused by the mixed use of new and old scheduling tables during the configuration process was not considered, which in turn caused unavoidable application layer failures.

[0012] Third, the complexity of solving the integer programming model increases exponentially with the number of time-triggered services. When solving the scheduling problem of large-scale time-triggered services, the solution is complex and time-consuming. Summary of the Invention

[0013] The technical problems to be solved by the present invention are:

[0014] First, the problem that the Time Triggered Ethernet (TTE) system in the prior art only supports static scheduling and cannot dynamically update services is solved.

[0015] Second, the problem of missing or mismatching time-triggered services due to incremental scheduling in the prior art is solved.

[0016] Third, solve the problem in the existing technology that the complexity of the incremental scheduling algorithm increases exponentially with the business volume.

[0017] In response to the shortcomings of the above-mentioned existing technologies, the present invention comprehensively considers the efficiency of incremental scheduling and the deterministic guarantee of TT services, aims to solve a series of problems caused by unknown incremental TT services and the mixing of new and old configurations, and proposes a time-triggered incremental scheduling method for services.

[0018] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0019] A time-triggered service incremental scheduling method, characterized by comprising:

[0020] Build a time-triggered Ethernet (TTE) scheduling model, define the network topology as a directed graph, and number all nodes and links in the network. Obtain routing parameters for all scheduled TT services and define the routes for all scheduled TT services based on link numbers.

[0021] Obtain the period parameters of all scheduled TT services, and calculate the basic period and matrix period of all scheduled TT services based on the period parameters of all scheduled TT services; obtain the period parameters of all TT services to be scheduled, and calculate the basic period and matrix period of all TT services to be scheduled based on the period parameters of all TT services to be scheduled;

[0022] Adjust the basic cycles of the scheduled TT services and the TT services to be scheduled based on the calculated basic cycles of the scheduled TT services and the TT services to be scheduled; adjust the matrix cycles of the scheduled TT services and the TT services to be scheduled based on the calculated matrix cycles of the scheduled TT services and the TT services to be scheduled;

[0023] Determine the schedulability of all TT services to be scheduled in the current scenario;

[0024] If all TT services to be scheduled in the current scenario meet the schedulability criteria, an empty binary search tree is initialized for each link in the current scenario based on the adjusted basic period and matrix period to store the idle time periods. The set of scheduled TT services is traversed, and the occupied links and occupied time periods are extracted. The idle time periods of the occupied time periods are found on the corresponding tree and split. The idle time period tree distribution of each link is obtained. The newly added service will search for the scheduling time period based on the binary search tree.

[0025] For TT services to be scheduled, the scheduling difficulty is quantified by the strict cycle utilization rate, and the services are sorted from highest to lowest according to the strict cycle utilization rate.

[0026] The optimal adaptation search is performed on the schedulable time period of each sorted TT service to be scheduled: For each TT service to be scheduled, the binary search tree of its first transmission link is searched to find the optimally adapted idle time period. Based on the transmission path dependency constraints and cycle constraints, the occupied time periods of other links are calculated to determine whether they are idle. If all time periods are idle, the scheduling is completed and the idle time period tree is updated. If there is a non-idle time period, the search continues for the next idle time period. If no adaptive time period is found after traversing, the scheduling cannot be completed.

[0027] A further technical solution of the present invention is: the basic period and matrix period of all scheduled TT services are calculated based on the period parameters, specifically:

[0028] Calculate the greatest common divisor of all scheduled TT service periods and record it as the basic period;

[0029] Calculate the lowest common multiple of all scheduled TT service periods and record it as the matrix period.

[0030] A further technical solution of the present invention is that the basic periods of the scheduled TT services and the TT services to be scheduled are adjusted by combining the calculated basic periods of the scheduled TT services and the TT services to be scheduled, specifically:

[0031] The greatest common divisor of the basic period of the scheduled TT service and the basic period of the to-be-scheduled TT service is taken as the adjusted basic period.

[0032] A further technical solution of the present invention is that the matrix periods of the scheduled TT services and the TT services to be scheduled are adjusted by combining the calculated matrix periods of the scheduled TT services and the TT services to be scheduled, specifically:

[0033] The least common multiple of the matrix period of the scheduled TT service and the matrix period of the to-be-scheduled TT service is used as the adjusted matrix period.

[0034] A further technical solution of the present invention is as follows: the schedulability determination of the TT service to be scheduled is specifically as follows:

[0035] For any TT service in the set to be scheduled, calculate the transmission delay of the service and the sum of the interference time of all other scheduled and to-be-scheduled TT services on the current TT service, and determine whether it exceeds the transmission cycle length of the service;

[0036] If the service cycle length is exceeded, the scenario is considered unschedulable;

[0037] If all the TT services to be scheduled pass the schedulability judgment, the routing parameters of all the TT services to be scheduled are defined according to the link numbers.

[0038] A further technical solution of the present invention is: the calculation formula of the strict cycle utilization is:

[0039]

[0040] Among them, T cur is the set of services to be scheduled, T succ is the scheduled service set, τ i is the TT service in the set to be scheduled, c i TT service τ i The transmission delay, GCD(p i ,p k ) is the TT service τ i The period p i With TT business τ k The period p k The greatest common divisor of .

[0041] A further technical solution of the present invention is that the optimal adaptive search for the schedulable time period of the TT service to be scheduled is specifically as follows:

[0042] (a) In the first service transmission cycle of the TT service to be scheduled, search the binary search tree corresponding to the first transmission link for the idle time period that best adapts to the current TT service. When the best adaptation time period is found, extract the start and end times of the time period, and calculate whether the idle time periods that the service should occupy in other transmission cycles are idle based on the cycle constraints. If all are idle, proceed to (b); otherwise, continue to search for the next suitable idle time period.

[0043] (b) Perform schedulability verification, calculate the occupied time periods on other links according to the transmission path dependency constraints, and calculate the occupied time periods on other transmission cycles of these links according to the cycle constraints, and determine whether these time periods are idle time periods on the corresponding binary search tree;

[0044] (c) If the check passes, the optimal adaptive scheduling is completed for the TT service to be scheduled. The scheduling time of the service on each transmission path is recorded, and the idle time period in the binary search tree corresponding to the relevant link is updated according to the TT service occupation period. If the check fails, the search for the next adaptive idle time period is continued from (a).

[0045] (d) If no suitable idle time period is found after traversing all nodes of the binary search tree, it is determined that the TT service to be scheduled has no available scheduling time period under the current scheduling scenario;

[0046] (e) If there is no available scheduling period for the TT service to be scheduled, it is deleted from the set of services to be scheduled and added to the set of unschedulable services. The matrix period is adjusted and the matrix period of the new set of services to be scheduled is calculated.

[0047] (f) If the adjusted matrix period is reduced to an integer multiple of the original period, the binary search tree of each link is pruned, and nodes that are not within the current matrix period are pruned, ensuring that other TT services complete their periodic tasks while reducing the number of searches.

[0048] A further technical solution of the present invention is as follows: the cycle constraint is specifically: the start time and the end time must completely fall within a complete basic cycle and the time interval between two adjacent transmissions of the TT service is equal to the transmission cycle of the service.

[0049] A computer system, characterized in that it includes: one or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method.

[0050] A computer-readable storage medium is characterized by storing computer-executable instructions, which are used to implement the above method when executed.

[0051] The beneficial effects of the present invention are:

[0052] This invention proposes a method for incremental scheduling of time-triggered services. Based on the concept of a best-fit algorithm, the occupied periods on the links corresponding to offline scheduled TT services are removed, and the remaining periods are idle periods. The idle time periods on all links in the network topology are then recorded in a binary search tree data structure. Each link corresponds to a binary search tree containing all idle periods on its link. Taking into account the path dependency constraints and conflict-free constraints that need to be met during TT service transmission, the idle period of each link that best meets the requirements for TT service transmission is found as the scheduling result for TT services. Specific implementations are as follows:

[0053] First, the present invention adopts an incremental scheduling method to avoid rescheduling all services in large-scale TT service scenarios. Only services at the edge need to be rescheduled when the basic cycle changes, thus avoiding the problem of network update delays caused by recalculating all TT services.

[0054] Second, the present invention aims to maintain the scheduling time of already scheduled TT services as unchanged as possible. Based on the time periods occupied by already scheduled TT services, the optimal schedulable time period for the upcoming TT services is searched. This approach can minimize the problem of frame loss for scheduled services caused by mixing old and new schedules at the application level.

[0055] Third, the present invention first sorts newly added TT services and then uses a binary search tree to sequentially record all idle time periods. New services can query the binary search tree to obtain their schedulable time periods, significantly improving the scheduling success rate of new services while significantly reducing the solution complexity compared to integer programming models. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The accompanying drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like parts throughout the drawings.

[0057] Figure 1 Flowchart of the method of the present invention.

[0058] Figure 2 Schematic diagram of network topology modeling.

[0059] Figure 3 Idle period binary search tree update diagram Figure 1 .

[0060] Figure 4 Idle period binary search tree update diagram Figure 2 .

[0061] Figure 5Idle period binary search tree update diagram Figure 3 .

[0062] Figure 6 Find the diagram of schedulable time periods. DETAILED DESCRIPTION

[0063] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0064] The present invention provides a method for incremental scheduling of time-triggered services, comprising: 1) mathematically proving that a newly adjusted basic period will be equal to or an integer multiple of the original basic period, and that a newly adjusted matrix period will be equal to or an integer multiple of the original matrix period. Therefore, when introducing a new TT service, the corresponding scheduling period needs to be adjusted; 2) under the premise of limited network bandwidth resources, pre-judging whether the newly added TT service can be scheduled and allocated within the effective bandwidth resources outside the established configured TT service scheduling window, and directly assuming that the newly added TT service cannot be scheduled based on the judgment scenario; 3) initializing an empty binary search tree for each link to store idle periods, traversing the set of scheduled TT services, extracting the links and occupied periods occupied by the services, finding the idle periods of the occupied periods on the corresponding tree and segmenting them, obtaining an idle period tree distribution for each link, and performing scheduling time slot search based on the tree for the newly added service; 4) comprehensively considering the influencing factors between service-occupied time slots and the bandwidth demand during transmission, and quantifying the scheduling difficulty of the TT service using strict cycle utilization. Sort the TT services in the scheduling set from large to small according to the strict cycle utilization; 5) For each TT service to be scheduled, search the binary search tree of its first transmission link to find the best adapted idle period. According to the transmission path dependency constraint and cycle constraint, calculate the occupied periods of other links and determine whether they are idle. If all periods are idle, the scheduling is completed and the idle period tree is updated. If there is a non-idle period, continue to search for the next idle period. If no adapted period is found after traversing, the scheduling cannot be completed. The flowchart for implementing the present invention is shown in the attached figure. Figure 1 The specific steps are as follows:

[0065] (1) Constructing a Time-Triggered Ethernet (TTE) scheduling model:

[0066] (1a) Define the network topology as a directed graph and number all nodes and links in the network;

[0067] (1b) Obtain routing parameters of all scheduled TT services and define routes of all scheduled TT services according to the link numbers in (1a);

[0068] (1c) Obtain the period parameters of all scheduled TT services and calculate the greatest common divisor of the periods of all scheduled TT services, which is recorded as the basic period BC j , calculate the least common multiple of all scheduled TT service periods, recorded as matrix period MC j , number each basic period within a matrix period;

[0069] (2) Obtain the period parameters of all TT services to be scheduled, calculate the greatest common divisor of the periods of all TT services to be scheduled, and record it as the basic period BC i , and the least common multiple, denoted as the matrix period MC i , it is known that the basic period of the scheduled service set is BC j , the matrix period is MC j , the adjusted basic cycle BC is BC i With BC j The greatest common divisor of the matrix period MC is MC i With MC j the lowest common multiple of ;

[0070] The changes in the adjusted matrix period and basic period are based on the following:

[0071] (2a) Conclusion 1: The product of the greatest common divisor and the least common multiple of two numbers is equal to the product of the two numbers.

[0072] Proof: The definition of the greatest common divisor is The definition of the least common multiple is

[0073]

[0074] make

[0075]

[0076] set up

[0077]

[0078] From ② we can get

[0079] x=mpt=nqt ③

[0080] From ③ we can conclude

[0081]

[0082] By ④

[0083]

[0084] From ③⑤, we can get

[0085] x=qkpt ⑥

[0086] When k = 1, x obtains the smallest integer qpt, which is the least common multiple of a and b, that is,

[0087] lcm(a,b)=pqt ⑦

[0088] So from ①⑦ we can get

[0089] gcd(a,b)·lcm(a,b)=t·pqt=pt·qt=a·b

[0090] Therefore, the product of the greatest common divisor and the least common multiple of two numbers is equal to the product of the two numbers.

[0091] (2b) Conclusion 2: The new matrix period will be equal to or an integer multiple of the original matrix period.

[0092] Proof: The matrix period of a service set is the least common multiple of all service periods in this set. Let the scheduled service set be A={a1,a2,...a m}, the newly added service set is B={b1,b2,...b n}, according to conclusion 1 of (2a) we can know

[0093] lcm(A)·lcm(B)=gcd(lcm(A),lcm(B))·lcm(lcm(A),lcm(B)) ①

[0094] lcm(lcm(A), lcm(B)) is the least common multiple of lcm(A) and lcm(B), that is, the least common multiple of all business cycles in sets A and B. At the same time, lcm(A∪B) represents the least common multiple of all business cycles in the union of A and B. Since the union of A and B contains all elements in A and B, lcm(A∪B) also represents the least common multiple of all elements in A and B, that is,

[0095]

[0096] lcm(A∪B) is the adjusted matrix period. Since gcd(lcm(A),lcm(B)) is the greatest common divisor of lcm(A) and lcm(B), lcm(B) can be expressed as

[0097]

[0098] According to ①②③, we can get

[0099] lcm(A∪B)=k·lcm(A) ④

[0100] In (4), lcm(A) is the matrix period of the original service set, and lcm(A∪B) is the matrix period of the adjusted service set. This shows that the new matrix period is equal to or an integer multiple of the original matrix period.

[0101] (2c) Conclusion 3: The new basic period will be equal to or an integer multiple smaller than the original basic period.

[0102] Proof: The basic period of a service set is the greatest common divisor of all service periods in this set. Let the scheduled service set be A and the newly added service set be B. According to Conclusion 1, we know that

[0103] gcd(A)·gcd(B)=gcd(gcd(A),gcd(B))·lcm(gcd(A),gcd(B)) ①

[0104] gcd(gcd(A), gcd(B)) is the greatest common divisor of gcd(A) and gcd(B), that is, the greatest common divisor of all business cycles in sets A and B. At the same time, gcd(A∪B) represents the greatest common divisor of all business cycles in the union of A and B. Since the union of A and B contains all elements in A and B, gcd(A∪B) also represents the greatest common divisor of all elements in A and B, that is

[0105]

[0106] gcd(A∪B) is the adjusted basic period. Since lcm(gcd(A), gcd(B)) is the least common multiple of gcd(A) and gcd(B), lcm(gcd(A), gcd(B)) can be expressed as

[0107]

[0108] According to ①②③, we can get

[0109]

[0110] In (4), gcd(A) is the basic period of the original service set, and gcd(A∪B) is the basic period of the adjusted service cycle. Therefore, the new basic period is equal to or an integer multiple smaller than the original basic period.

[0111] (2d) According to ② in (2b), the adjusted matrix period is the least common multiple of the matrix period of the original business set and the matrix period of the newly added business set. According to ② in (2c), the adjusted basic period is the greatest common divisor of the basic period of the original business set and the basic period of the newly added business set.

[0112] (3) Determine the schedulability of the scheduling scenario:

[0113] (3a) For any TT service in the set to be scheduled, calculate the transmission delay of the service and the sum of the interference time of all other scheduled and to-be-scheduled TT services on the current TT service, and determine whether it exceeds the cycle length of the service;

[0114] (3b) If the service cycle length is exceeded, the scenario is considered unschedulable and the calculation is stopped;

[0115] (3c) If all the TT services to be scheduled pass the schedulability judgment, the routing parameters of all the TT services to be scheduled are defined according to the link numbers in (1a);

[0116] The basis for judging the schedulability of the scheduling scenario is as follows:

[0117] Necessary conditions for scheduling: For any TT service in the set to be scheduled, the sum of the transmission delay of the service and the interference time of all other TT services on the current TT service is less than or equal to the cycle length of the service. The comparison method is as follows:

[0118]

[0119] Where T cur is the set to be scheduled, T succ is the scheduled set, τ i is a TT service in the set to be scheduled, p i TT service τ i The cycle length, c m is the transmission delay of the scheduled TT service, is the scheduled TT service τ m The cycle length, c n is the transmission delay of the TT service to be scheduled, p m is the TT service to be scheduled τ n The cycle length, is the scheduled TT service τ m For TT service τ i The intervention time, TT service to be scheduled c n For TT service τ i intervention time.

[0120] Proof of schedulable necessary conditions: In a matrix cycle MC cur Within the range, the sum of the time slot lengths occupied by scheduled services is as follows:

[0121]

[0122] The remaining available time slot length in one matrix cycle is as follows:

[0123]

[0124] The time slot length required by the scheduled service must be less than or equal to the remaining available time slot length, as shown in the following formula:

[0125]

[0126] The following formula can be derived

[0127]

[0128] For the set to be scheduled, as long as there is any TT service that does not meet the necessary conditions for scheduling, it can be determined that not all TT services to be scheduled have feasible scheduling time slots. When this happens, the calculation process should be terminated.

[0129] (4) Update idle time based on binary search tree:

[0130] (4a) Initialize an empty binary search tree for each link to store the idle time period;

[0131] (4b) Traverse the set of scheduled TT services. For each scheduled TT service, extract the link it occupies and the corresponding occupied period. Locate the idle period where the period is located on the corresponding binary search tree, and split the idle period to which the occupied period belongs.

[0132] (4c) After completing the traversal of all scheduled TT services and updating the binary search tree, the binary search tree distribution of the idle time period of each link is finally obtained. The newly added TT services will be searched for scheduling time slots based on this tree;

[0133] The process of updating the idle period based on the binary search tree is as follows:

[0134] Update idle time based on binary search tree:

[0135] (4a) Define the hash set BST_Map as the binary search tree of the idle period corresponding to each link. The key is the link ID, and the value is the binary search tree of the idle period corresponding to the link. Add each link and the corresponding [0, MC] tree node to BST_Map, where MC is the matrix period length.

[0136] (4b) Traverse the set of scheduled TT services. For each scheduled TT service, extract the set of occupied links L and the corresponding occupied time period [a, b]. Then, traverse each link ID in L in sequence. Locate the corresponding binary search tree in BST_Map according to the link ID, and on this tree, locate the free time period [m, n] where [a, b] is located, and perform a splitting operation on the free time period [m, n]. According to the occupied time period of the TT service, after deleting the original free time period, zero, one, or two new free time periods may be generated, depending on the size of the remaining available free time period after subtracting the occupied time period required by the TT service;

[0137] ① When a = m and b = n, the occupied time period of the TT service on the current link is exactly equal to the free time period. At this time, delete the node corresponding to [m, n], and no new free time period nodes are generated;

[0138] ② When a > m, b = n or a = m, b < n, delete the node corresponding to [m, n], and generate nodes [m, a] or [b, n];

[0139] ③ When a > m and b < n, delete the node corresponding to [m, n], and generate two nodes [m, a] and [b, n];

[0140] ①②③ The specific processes are as shown in Figure 3 、 Figure 4 、 Figure 5 shown.

[0141] (4c) After completing the traversal of all scheduled TT services and the update of the binary search tree, finally obtain the distribution of the binary search trees of the free time periods of each link, BST_Map. The newly added TT services will search for scheduling time slots based on this hash set;

[0142] (5) For the TT services to be scheduled, quantify their scheduling difficulty with strict periodic utilization rate, and sort them in descending order according to the strict periodic utilization rate;

[0143] The strict periodic utilization rate consists of two parts. One part is the sum of the interference time slots of all other TT services on the current service, and the other part is the time slot length required by the current TT service in one of its cycles. This not only includes the influence factor between the occupied time slots of the services but also considers its own bandwidth demand, more accurately quantifying the scheduling difficulty of each TT service. The calculation formula for the strict periodic utilization rate is:

[0144]

[0145] where, T cur is the set of services to be scheduled, T succ is the set of scheduled services, τ i is the TT service in the set of services to be scheduled, ci TT service τ i The transmission delay, GCD(p i ,p k ) is the TT service τ i The period p i With TT business τ k The period p k The greatest common divisor of .

[0146] (6) Perform the best adaptation search for the schedulable time period of each TT service to be scheduled:

[0147] (6a) In the first service transmission cycle of the TT service to be scheduled, search the binary search tree corresponding to the first transmission link for the idle time period that best adapts to the current TT service. When the best adaptation time period is found, extract the start and end times of the time period, and calculate whether the idle time periods that the service should occupy in other transmission cycles are idle based on the cycle constraint. If they are all idle, continue to execute (6b), otherwise continue to search for the next suitable idle time period.

[0148] Search for the best adaptation of the service in (6a) on the first transmission link. If the service period of the service TT to be scheduled is t, in its first service transmission period [0, t], on its first transmission link e j Search the corresponding binary search tree for the idle time period [a, b] that best suits the current TT service, and calculate the occupied time periods in other transmission cycles of the current link according to the period constraint. The service period constraint is that the scheduling time difference of the TT service in different basic cycles should be a fixed relative scheduling time difference. In other words, it is necessary to verify whether all time periods that meet condition ① are idle. If there is a non-idle time period, re-execute step (6a) and continue searching for the next schedulable time period, that is, the time period after the scheduled time period [a, b], and check whether the occupied time periods in all transmission cycles are idle.

[0149]

[0150] (6b) Perform schedulability check, calculate the occupied time periods on other links according to the transmission path dependency constraints, and calculate the occupied time periods on other transmission cycles of these links according to the cycle constraints, and determine whether these time periods are idle time periods on the corresponding binary search tree;

[0151] Calculate the schedulable time periods on other transmission paths of the service in (6b) based on the transmission path dependency constraint. Considering that the number of links of the TT service is at least greater than 1, the search for schedulable time slots is a multi-tree joint search problem. During the transmission process of the TT service, there is a path dependency constraint on the transmission time between adjacent hops, that is, the time period occupied by the same data frame on each link has a certain difference according to the propagation path, and the size of the difference is related to the link transmission delay and the switch processing delay. The processing delay of the switch is usually related to the forwarding mode of the switch. The processing delay under the store-and-forward mode is not only related to the processing capacity of the switch, but also has a certain impact on the data frame length of the TT service. The processing delay under the direct switching mode is only related to the processing capacity of the switch. In order to simplify the delay calculation process, we only consider the direct switching mode here. Suppose a TT service τ is on its two adjacent transmission links e j and e i The delay difference of the starting scheduling time For link e j The propagation delay and switch processing delay T h_sw The sum is:

[0152]

[0153] So if the TT service is on link e j The schedulable period on is ②:

[0154]

[0155] Then according to the path dependency constraint and formula ①, it is necessary to verify that i Are all the scheduling periods ③ on the POSIX idle?

[0156]

[0157] If there is a non-idle period, step (6a) is executed again to continue searching for the next schedulable period, that is, the period after the scheduling period [a, b].

[0158] (6c) If the check passes, the optimal adaptive scheduling is completed for the TT service to be scheduled, the scheduling time of the service on each transmission path is recorded, and the idle time of the relevant link in the binary search tree is updated according to the TT service occupation period; if it fails, the search for the next adaptive idle time period is continued from (6a);

[0159] (6d) If no suitable idle time period is found after traversing all nodes of the binary search tree, it is determined that the TT service to be scheduled has no available scheduling time period in the current scheduling scenario;

[0160] (6e) If the TT service to be scheduled has no available scheduling period, it will be deleted from the set of services to be scheduled and added to the set of unschedulable services. The matrix period will be adjusted and the matrix period MC of the new set of services to be scheduled will be calculated. k , the adjusted matrix period MC is MC k With MC j the lowest common multiple of ;

[0161] If the adjusted matrix period becomes smaller, the idle period nodes exceeding the new matrix period in the binary search tree corresponding to each link are deleted. This can reduce the number of searches for subsequent TT services to be scheduled and improve computational efficiency.

[0162] (6f) If the adjusted matrix period is reduced to an integer multiple of the original period, the binary search tree of each link is pruned to remove nodes that are not within the current matrix period. This can ensure that other TT services complete their periodic tasks while reducing the number of searches.

[0163] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be included in the scope of protection of the present invention.

Claims

1. A time-triggered service incremental scheduling method, characterized in that: include: Build a time-triggered Ethernet (TTE) scheduling model, define the network topology as a directed graph, and number all nodes and links in the network; Obtain routing parameters for all scheduled TT services and define routes for all scheduled TT services according to link numbers; Obtain the period parameters of all scheduled TT services, and calculate the basic period and matrix period of all scheduled TT services based on the period parameters of all scheduled TT services; obtain the period parameters of all TT services to be scheduled, and calculate the basic period and matrix period of all TT services to be scheduled based on the period parameters of all TT services to be scheduled; Adjust the basic cycles of the scheduled TT services and the TT services to be scheduled based on the calculated basic cycles of the scheduled TT services and the TT services to be scheduled; adjust the matrix cycles of the scheduled TT services and the TT services to be scheduled based on the calculated matrix cycles of the scheduled TT services and the TT services to be scheduled; Determine the schedulability of all TT services to be scheduled in the current scenario; If all TT services to be scheduled in the current scenario meet the schedulability criteria, an empty binary search tree is initialized for each link in the current scenario based on the adjusted basic period and matrix period to store the idle time periods. The set of scheduled TT services is traversed, and the occupied links and occupied time periods are extracted. The idle time periods of the occupied time periods are found on the corresponding tree and split. The idle time period tree distribution of each link is obtained. The newly added service will search for the scheduling time period based on the binary search tree. For TT services to be scheduled, the scheduling difficulty is quantified by the strict cycle utilization rate, and the services are sorted from highest to lowest according to the strict cycle utilization rate. Perform the best adaptation search for the schedulable time period of each sorted TT service to be scheduled: For each TT service to be scheduled, search the binary search tree of its first transmission link to find the best adaptation idle time period; Based on the transmission path dependency constraints and cycle constraints, the occupied periods of other links are calculated to determine whether they are idle. If all periods are idle, the scheduling is completed and the idle period tree is updated. If there is a non-idle period, continue searching for the next idle period; if no adaptive period is found after traversing, the scheduling cannot be completed.

2. The method for incremental scheduling of time-triggered services according to claim 1, wherein: The basic period and matrix period of all scheduled TT services are calculated based on the period parameters as follows: Calculate the greatest common divisor of all scheduled TT service periods and record it as the basic period; Calculate the lowest common multiple of all scheduled TT service periods and record it as the matrix period.

3. The method for incremental scheduling of time-triggered services according to claim 2, wherein: The basic periods of the scheduled TT services and the TT services to be scheduled are adjusted by combining the calculated basic periods of the scheduled TT services and the TT services to be scheduled, specifically: The greatest common divisor of the basic period of the scheduled TT service and the basic period of the to-be-scheduled TT service is taken as the adjusted basic period.

4. The method for incremental scheduling of time-triggered services according to claim 2, wherein: The matrix periods of the scheduled TT services and the TT services to be scheduled are adjusted by combining the calculated matrix periods of the scheduled TT services and the TT services to be scheduled, specifically: The least common multiple of the matrix period of the scheduled TT service and the matrix period of the to-be-scheduled TT service is used as the adjusted matrix period.

5. The method for incremental scheduling of time-triggered services according to claim 1, wherein: The schedulability determination of the TT service to be scheduled is specifically as follows: For any TT service in the set to be scheduled, calculate the transmission delay of the service and the sum of the interference time of all other scheduled and to-be-scheduled TT services on the current TT service, and determine whether it exceeds the transmission cycle length of the service; If the service cycle length is exceeded, the scenario is considered unschedulable; If all the TT services to be scheduled pass the schedulability judgment, the routing parameters of all the TT services to be scheduled are defined according to the link numbers.

6. The method for incremental scheduling of time-triggered services according to claim 1, wherein: The calculation formula of the strict cycle utilization is: Among them, T cur is the set of services to be scheduled, T succ is the scheduled service set, τ i is the TT service in the set to be scheduled, c i TT service τ i The transmission delay, GCD(p i ,p k ) is the TT service τ i The period p i With TT business τ k The period p k The greatest common divisor of .

7. The method for incremental scheduling of time-triggered services according to claim 1, characterized in that: The optimal adaptation search for the schedulable time period of the TT service to be scheduled is specifically as follows: (a) In the first service transmission cycle of the TT service to be scheduled, search the binary search tree corresponding to the first transmission link for the idle time period that best adapts to the current TT service. When the best adaptation time period is found, extract the start and end times of the time period, and calculate whether the idle time periods that the service should occupy in other transmission cycles are idle based on the cycle constraints. If all are idle, proceed to (b); otherwise, continue to search for the next suitable idle time period. (b) Perform schedulability verification, calculate the occupied time periods on other links according to the transmission path dependency constraints, and calculate the occupied time periods on other transmission cycles of these links according to the cycle constraints, and determine whether these time periods are idle time periods on the corresponding binary search tree; (c) If the check passes, the optimal adaptive scheduling is completed for the TT service to be scheduled. The scheduling time of the service on each transmission path is recorded, and the idle time period in the binary search tree corresponding to the relevant link is updated according to the TT service occupation period. If the check fails, the search for the next adaptive idle time period is continued from (a). (d) If no suitable idle time period is found after traversing all nodes of the binary search tree, it is determined that the TT service to be scheduled has no available scheduling time period under the current scheduling scenario; (e) If there is no available scheduling period for the TT service to be scheduled, it is deleted from the set of services to be scheduled and added to the set of unschedulable services. The matrix period is adjusted and the matrix period of the new set of services to be scheduled is calculated. (f) If the adjusted matrix period is reduced to an integer multiple of the original period, the binary search tree of each link is pruned, and nodes that are not within the current matrix period are pruned, ensuring that other TT services complete their periodic tasks while reducing the number of searches.

8. A time-triggered service incremental scheduling method according to claim 7, characterized in that: The cycle constraint is specifically: the start time and the end time must be completely within a complete basic cycle and the time interval between two adjacent transmissions of the TT service is equal to the transmission cycle of the service.

9. A computer system, characterized in that include: One or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method of claim 1.

10. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and when the instructions are executed, they are used to implement the method of claim 1.

Citation Information

Patent Citations

  • A method for service scheduling in a time-triggered FC network

    CN108777660B

  • Delay deterministic transmission method based on route scheduling and joint optimization

    WO2023004898A1