Application task end-to-end execution method
By establishing JL-DAG and CRTA analysis, the task and traffic model are optimized, and the mutual influence of information generation and reception processes in end-to-end execution of industrial field tasks is solved, real-time performance of task end-to-end execution and deterministic traffic transmission are realized, ensuring that information arrives within the timeliness time and is consumed by backward task reception.
Patent Information
- Application Number
- CN202510397564.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
AI Technical Summary
The prior art cannot effectively ensure the real-time performance of end-to-end execution of industrial field tasks, especially in the process of information generation and information reception, traffic injection and consumption scheme design are independent of each other, resulting in the real-time performance and traffic certainty of task execution cannot be guaranteed.
By establishing an instance-level directed acyclic graph (JL-DAG) to describe the mutual influence of information generation and information reception processes, building a minimum deterministic constraint set, combining comprehensive response time analysis (CRTA) to optimize traffic injection and consumption schemes, designing tasks and traffic models to ensure real-time end-to-end execution.
It reduces the design complexity, ensures the real-time end-to-end execution of tasks and the certainty of traffic transmission, ensures that information arrives within the timeliness time and is consumed by backward receiving tasks, and avoids the problem of information staying in the reception buffer area for too long.
Smart Images

Figure CN120263749A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of computers, and in particular, to an application task end-to-end execution method. Background Art
[0002] With the rapid development of the industrial Internet of Things and the continuous improvement of production requirements, the number of devices in industrial production is increasing. The devices connected by the industrial Internet of Things can be divided into two categories: execution control devices and network communication devices. Among them, the execution control device, as the production terminal, completes the tasks included in the production application by executing specific calculations or actions; the network communication device, as the relay facility for information transmission between different execution control device tasks, forms a communication network to transmit the information generated after the task execution, and realizes the coordinated cooperation between different tasks. A series of tasks included in the application define the coordinated cooperation relationship in the form of a task chain dependency relationship (Directed Acyclic Graph, DAG). The dependent task execution and information transmission carried by the execution control device and the network communication device jointly ensure the orderly production of the industrial site. The emergence of a large number of applications with low-latency perception requirements poses the requirement of ensuring the real-time end-to-end execution of the application on the premise of meeting the deterministic transmission requirements of ensuring information timeliness, low jitter, low packet loss, and high bandwidth. However, the current existing industrial field networks, such as PROFINET, Ethernet, CAN bus, etc., can only provide "best effort" traffic services for information transmission and cannot meet the growing deterministic transmission requirements.
[0003] To this end, the IEEE 802.1 TSN working group has proposed Time-Sensitive Networking (TSN) technology and developed a series of TSN sub-protocols to ensure the deterministic transmission requirements of information in communication networks. The IEEE 802.1AS protocol and the IEEE 802.1Qci protocol define network device clock synchronization technology and Per Stream Filter and Policing (PSFP) strategies respectively as the basis for network communication. The IEEE 802.1Qbv, IEEE 802.1Qch, and IEEE 802.1Qav protocols define three switch buffer queue gating mechanisms, namely Time-Aware Shaper (TAS), Cyclic Queuing and Forwarding (CQF), and Credit-Based Shaper (CBS), for traffic shaping. However, the current sub-protocols only consider ensuring the deterministic requirements of delay, jitter, bandwidth, and packet loss for information transmitted in the form of traffic in the network by designing network parameters such as the Gate Control List (GCL). When TSN is used as the network foundation for cooperation between different end-device tasks, there is still a lack of a design solution that can ensure the end-to-end execution real-time performance of application tasks. The end-to-end execution of dependent tasks in applications can be specifically divided into the "information generation" process in which tasks generate traffic when executed on end devices and inject it into the network, and the "information reception" process in which the traffic is transmitted through TSN to the end device and consumed as task input. Ensuring the end-to-end execution real-time performance of application tasks is based on the deterministic delay, jitter, packet loss, and bandwidth of TSN traffic transmission, and realizes the orderly execution of dependent tasks included in the application within the deadline. However, compared with the strict deterministic transmission requirements of traffic, the relatively loose real-time performance of tasks introduces extremely high jitter into the traffic injection into the network during the information generation process, and also causes the traffic received by tasks during the information reception process to exceed the deterministic information timeliness. Subsequent tasks lack the necessary information input, disrupting the overall application operation. Therefore, how to design traffic injection and traffic consumption schemes during the information generation process and the information reception process respectively to ensure the end-to-end execution real-time performance of tasks in applications remains an open question.
[0004] For the design problem of end-to-end real-time execution of application tasks, the current existing methods are strict periodicity method, priority configuration method and TSN side configuration method. The first two methods focus on the design of traffic injection during information generation, while the last method focuses on the design of traffic consumption during information reception. Specifically, the strict periodicity method arranges the task periodic instances and traffic periodic frames regularly in the computing resources and network at intervals of their respective periods, and injects the traffic into the network immediately after the task instance is executed. However, this arrangement method that follows strict periodicity requires a lot of calculations to avoid collisions and conflicts between different task instances and different traffic frames, resulting in a huge waste of computing resources and network resources, and introducing extremely high solution complexity; the priority configuration method determines the computing resource allocation and task execution sequence in a priority competition manner, and injects the generated information into the network at the worst-case task execution time, but this method does not consider the impact of traffic on task execution in the case of dependent tasks, and cannot guarantee the timeliness of information when the information reaches the end device; the TSN side configuration method guarantees the determinism of end-to-end information transmission through traffic scheduling under the premise of the actual execution of the given task, and designs the actual traffic consumption time of the information receiving process, but this method ignores the jitter problem when the end device accesses the network, and it is difficult to guarantee the deterministic jitter requirements of traffic generation. In general, the existing methods all assume that the two processes of information generation and information reception are independent of each other, and only consider the design related to a single process. However, due to the collaborative relationship between different application tasks in transmitting information through network traffic, the two processes of end-to-end execution of application tasks will affect each other: the specific time when traffic is injected into the network during the information generation process affects the network transmission performance, and the traffic transmitted through the network as input determines the traffic consumption time; the specific time when the task receives input during the information reception process affects the task execution performance, and the actual response time of task execution determines the specific time of information generation. Therefore, the real-time performance of tasks and the certainty of traffic in the end-to-end execution of application tasks cannot be guaranteed by simply designing a single process or the simple addition of two independent design solutions. How to design traffic injection and consumption solutions based on the mutual influence of the information generation process and the information reception process in the end-to-end execution of application tasks is a very challenging problem.
[0005] Retrieving existing documents, the search keywords are "time-sensitive network", "task traffic", "edge network", "joint design", "edge device jitter". The patent number of a similar implementation solution is: 202410685977.5, and the name is: Task Traffic Prediction Method, Device, Equipment, Medium and Product for Real-Time Tasks. The specific approach is as follows: For the task scheduling problem in the real-time system of a computer device, considering the communication between computing tasks and storage tasks through the system bus, using a pre-trained prediction model for task scheduling, thereby improving the schedulability of the computer real-time system. However, this method only designs the task scheduling framework within an independent computer system and does not involve research on the establishment of a scheduling prediction model, the generation of a scheduling scheme, and communication between multiple devices, and cannot give a joint design scheme for the edge device - TSN network, making it difficult to ensure the real-time operation of tasks in the edge network system. The patent number of a similar implementation solution is: 201710979340.7, and the name is: A Transmission Control Method Based on Task Traffic Characteristics in a Data Center Network. The specific approach is as follows: Designing a congestion control algorithm for the data center network, adjusting the network transmission window according to information such as the length of task data packets transmitted in real-time, thereby reducing the average completion time of data center network traffic transmission while ensuring the network throughput rate. However, this solution mainly considers designing a congestion control method at the communication level to ensure communication performance and does not involve the generation, execution, and network access of real-time tasks on edge devices, making it difficult to ensure the real-time performance of applications across multiple devices. The patent number of a similar implementation solution is: 202110906290.6, and the name is: A Method for Deploying Edge Cloud Network Servers Based on Task Traffic and Timeliness. The specific approach is as follows: Based on the existing task computing resources and communication requirements in the edge - edge device system, determining the number and deployment locations of edge servers, thereby obtaining the lowest-cost edge server deployment scheme while ensuring computational resource limitations and communication experiment requirements. However, this method mainly considers the deployment problem of edge devices at the hardware device level and does not involve designing a joint configuration scheme for real-time tasks and communication on the premise that device deployment is completed and application tasks are ready to be issued, and cannot ensure the real-time execution of application tasks. The patent number of a similar implementation solution is: 202010102713.4, and the name is: Method, System, Device and Medium for Allocating Tasks in an Edge Computing Network. The specific approach is as follows: In the edge network, taking the minimization of the average task completion time or the minimization of the system operation cost as the optimization goal, generating a task distribution scheme to edge devices. However, this method only considers the deployment problem of tasks on edge devices in task scheduling and cannot solve the problem of communication between tasks on different edge devices after tasks are deployed to different edge devices in a multi-edge device system. Summary of the Invention
[0006] In view of the above-mentioned defects of the prior art, the technical problems to be solved by the present invention include:
[0007] How to design an end-to-end execution method for application tasks to overcome the above technical problems.
[0008] To achieve the above object, the present invention provides an end-to-end execution method for application tasks, including the steps:
[0009] Step 1, establishment and simplification of DAG;
[0010] Step 2, establishment of the minimum deterministic constraint set;
[0011] Step 3, determination of the initial value and the calculation target;
[0012] Step 4, analyze the upper and lower bounds of the response time of each task by CRTA;
[0013] Step 5, customize the upper and lower bounds of the TSN delay;
[0014] Step 6, replace the initial value of the calculation in Step 3 or the previously recorded TSN delay range with the upper and lower bounds of the TSN delay obtained in Step 4, and use it to return to Step 4 for a new round of CRTA calculation. Repeat this step until the TSN delay converges;
[0015] Step 7, design an information generation scheme from tasks to traffic;
[0016] Step 8, design an information reception scheme from traffic to tasks.
[0017] Further, the specific content of the said Step 1 is,
[0018] Represent the DAG with a square matrix adjacency matrix, where the dimension is the sum of all instances in the super period, the rows and columns are arranged in the order of all task instances, and the element value of 1 indicates that the instance represented by the current row points to the instance represented by the current column in the DAG;
[0019] After establishing the DAG through the given adjacency matrix, perform DAG simplification through matrix operations to remove unnecessary dependency constraints and information timeliness constraints. The specific calculation formula is as follows:
[0020]
[0021] In the formula, A is the aforementioned original adjacency matrix, sgn(·) represents extracting the positive and negative signs of each element of the matrix, A id is a discrimination matrix for whether task instances belong to the same task, and the element of 1 indicates that the instance represented by the current row and the instance represented by the current column belong to the same task.
[0022] Further, the specific content of the said Step 2 is,
[0023] For the simplified DAG, the final minimum deterministic constraint set can be determined, which is divided into task execution constraints and information transmission constraints, and is specifically determined by the following formula:
[0024]
[0025] In the formula, k specifically refers to the k-th task instance in the adjacency matrix, and dim(A) is the dimension of matrix A. is the start execution time when the task actually obtains the allocated computing resources. is the execution time matrix, 1 1×dim(A) (k) is a matrix of size 1*dim(A), where the k-th element is 1 and the rest are 0. is the task communication delay. is the timeliness of the message generated by the task.
[0026] The first row is the task execution constraint, and the second row is the information transmission constraint.
[0027] Furthermore, the specific content of step 3 is as follows.
[0028] As a variable directly related to the traffic injection design, The response time directly determines the time when the task obtains the computing resources and completes the execution, and thus can also obtain the specific time when the task generates traffic.
[0029] Then it directly determines the specific time when the information is transmitted to the task and the task receives the necessary input, and thus can determine the specific start execution time of the task.
[0030] is set as the worst-case response time given by the ordinary priority preemption RTA method. Then is the transmission delay obtained from the TSN path length.
[0031] The worst-case response time given by the ordinary priority preemption RTA method is as follows:
[0032]
[0033] Furthermore, the specific content of step 4 is as follows. Based on the task instance arrangement given by the current response time of each task and the task execution constraints in step 2, calculate the upper and lower bounds of the task response time, that is, the arrangement range of the task instances in the time sequence.
[0034] Furthermore, step 5 is to calculate the optimal and worst-case delay requirements that the TSN communication needs to meet based on the foregoing CRTA results of this round and the information transmission constraints in step 2.
[0035] The optimal and worst-case delay requirements for calculating TSN communication are specifically as follows:
[0036] 5.1: Extract the attribute information of the task set and traffic set, including: the reference time for task generation, the analysis of the comprehensive response time of tasks, the set of alternative routing paths for traffic, and the timeliness of traffic data; where the traffic period is the same as the task period to which it belongs, and the hyper-period is the same as the hyper-period given in step 1 of the comprehensive response time analysis;
[0037] 5.2: Calculate the allowable transmission delay of the traffic generated by each task; among them, the lower bound of the delay is given by the earliest execution time of the backward task in the task chain, that is, the traffic should arrive no earlier than when the backward task is generated; the upper bound of the delay is given by the earliest execution time of the backward task in the task chain, that is, the traffic should arrive no later than when the backward task starts to execute. The specific calculation formula is as follows:
[0038]
[0039] In the formula, respectively refer to the upper and lower bound convergence values of the response time of task τ k after CRTA iterative calculation, T = 0.2ms is the artificially specified CQF time slot size in TSN, is any allowable routing path for task τ i , is the timeliness length of the information generated by task τ k .
[0040] Furthermore, in step 6, the specific convergence formula is as follows:
[0041]
[0042] That is, the difference between the results of two rounds of iteration does not exceed the given error limit σ TSN when it is considered that the iteration converges.
[0043] Furthermore, in step 7,
[0044] The traffic injection network time for designing the information generation scheme can be obtained from the final CRTA result, as shown in the following formula:
[0045]
[0046] In the formula is the actual network injection time of the information generated by task τ k , is the final worst-case comprehensive response time analysis result of task τ k , and Δ is the jitter capacity of the network itself time synchronization jitter and the end device itself synchronization jitter.
[0047] Further, in the step 8, the moment when the traffic of the information receiving process is consumed by the task can be designed according to the upper bound of the TSN delay, and the specific consumption time is where is the TSN delay for the task τ k to generate traffic, and Δ is the jitter capacity of the network itself time synchronization jitter and the end device itself synchronization jitter.
[0048] Further, in the step 4, the CRTA analysis is specifically as follows:
[0049] 4.1: Extract all task attributes in the task set of the terminal device, including: task generation period, task distribution on the end device, task execution time, task priority, task generation reference time, and calculate the hyperperiod;
[0050] 4.2: Analyze the influence of the forward tasks of different end devices on the response time for each task; consider all forward tasks τ i ∈Pre(τ k ) and the earliest allowable execution time of this task since its generation under the combined influence, specifically satisfying the following iterative formula:
[0051]
[0052] In the formula is the task generation reference time of the task τ k , are the nth iteration values of the lower / upper bound of the response time of the task τ k respectively, mod represents the modulo operation, represents the period of the task τ k , represents the greatest common divisor of the periods of the task τ i and τ k , is the current iteration value of the lower bound of the TSN delay, and as converges the iteration ends; when the forward task and the current task are on the same end device, it is considered that
[0053] 4.3: Judge the task set that may preempt this task on the same end device. Consider all other tasks on the same end device and judge whether the response time ranges of the periodic instances of this task and the considered tasks overlap in the hyperperiod. If there is an overlap, it means there is a possibility of preemption, otherwise there is no possibility of preemption; for the tasks τ k , τ i distributed on the same end device, the specific judgment formula is as follows:
[0054]
[0055] where and are both auxiliary variables, are respectively the upper and lower bounds of the influence of the forward task on the response time obtained in 4.2;
[0056] 4.4: Based on the earliest allowable execution time results in 4.2, calculate the influence of the preemption of other tasks with higher priorities on the response time of this task by the same-end device, and combine to obtain the comprehensive response time bound. Considering higher or same-priority tasks deployed on the same-end device, in the best case, only higher-priority tasks with the possibility of preemption will have an impact, and in the worst case, both higher- and same-priority tasks with the possibility of preemption will have an impact. The calculation formula for the comprehensive response time influence is:
[0057]
[0058] where is the execution time of task τ k hp(τ i ) and ep(τ i ) respectively refer to the sets of higher-priority tasks and same-priority tasks.
[0059] Compared with the prior art solutions, the technical effects of the present invention are as follows:
[0060] The present invention establishes a Job-Level Directed Acyclic Graph (JL-DAG) at the instance level to describe the mutual influence between the information generation and information reception processes, and establishes a model of tasks and traffic based on the JL-DAG. To reduce the design complexity, a minimum deterministic constraint set is constructed through model simplification, reducing the original constraint amount and thus reducing the solution time complexity while ensuring the end-to-end execution real-time performance of tasks and the determinacy of traffic transmission. Finally, to design the traffic injection and traffic consumption schemes, an iterative optimization framework for JL-DAG, task performance analysis, and traffic delay customization is given, and accurate performance analysis and delay customization results are calculated, which are respectively used to determine the traffic injection network time and the time when traffic is consumed by tasks during the information generation and reception processes, that is, the final solution. This solution can establish a JL-DAG according to the task chain to determine the dependency relationship between periodic instances of each task, establish the connection of the execution sequence and information transmission direction at the instance level, and describe the mutual influence between the information generation and information reception processes. Establish a model of tasks and traffic, obtain the minimum deterministic constraint set, and ensure the end-to-end execution real-time performance of tasks with lower complexity. Iteratively optimize to obtain the task performance analysis results and the optimal network delay customization results, which are respectively used to design the two processes of end-to-end execution.
[0061] The performance analysis method of the present invention's design task - Comprehensive Response Time Analysis (CRTA). For the first time, it is proposed to analyze the response time of each task under the joint influence of tasks on the same end device and tasks on different end devices when multi-device dependent tasks collaborate through network communication in the scenario where tasks are distributed on different end devices, and to analyze more accurate upper and lower bounds of the response time for each task. For the first time, the accurate response time analysis results under the joint influence of the receiving end device task and the communication network in the case of collaborative execution of multi-end device tasks are given, and the upper and lower bounds of the task execution performance are obtained.
[0062] Based on the traffic transmission constraints in the minimum deterministic constraint set and the calculation of the response time range in task performance analysis, the present invention customizes the delay that can ensure deterministic jitter and deterministic data timeliness in the transmission process, thereby ensuring the deterministic transmission of TSN traffic. By customizing the TSN transmission delay, the specific time when the given traffic actually arrives at the end device where the receiving task is located is determined, ensuring that the information arrives and is received and consumed by the subsequent task within the timeliness time, and avoiding the problem that the information stays in the receiving buffer for too long and exceeds the information timeliness.
[0063] The following will further illustrate the concept, specific structure and technical effects of the present invention with reference to the accompanying drawings, so as to fully understand the purpose, features and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flowchart of the iterative design scheme for end-to-end execution of application tasks;
[0065] Figure 2 It is a task chain relationship diagram of this embodiment;
[0066] Figure 3 It is a schematic diagram of the JL-DAG structure of the instance-level dependency relationship diagram of this embodiment;
[0067] Figure 4 It is the terminal device - network topology structure of this embodiment;
[0068] Figure 5 It is the directed graph of the terminal device - network topology after modeling of this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0069] The following introduces multiple preferred embodiments of the present invention with reference to the accompanying drawings of the specification, making its technical content clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.
[0070] Design of end-to-end execution of application tasks:
[0071] The flow chart of the end-to-end execution design solution for application tasks based on TSN is as follows Figure 1 as shown.
[0072] Step 1: Establishment and simplification of the job-level directed acyclic graph (JL-DAG). Hereinafter, JL-DAG is abbreviated as DAG. The task chain shows the dependencies between tasks, while the DAG determines the execution order and information collaboration relationships for the instances periodically generated by each task in the supercycle. The supercycle is the least common multiple of all task periods, given by the following formula:
[0073]
[0074] The DAG is represented by a square adjacency matrix, where the dimension is the sum of all instance numbers in the supercycle, and both the rows and columns are arranged in the order of all task instances. The element value of 1 indicates that the instance represented by the current row points to the instance represented by the current column in the DAG. After establishing the DAG through the given adjacency matrix, the DAG is simplified through matrix operations to remove unnecessary dependency constraints and information timeliness constraints. The specific calculation formula is as follows:
[0075]
[0076] In the formula, A is the aforementioned original adjacency matrix, sgn(·) represents extracting the positive and negative signs of each element of the matrix, and A id is the discrimination matrix for whether task instances belong to the same task. The element of 1 indicates that the instance represented by the current row and the instance represented by the current column belong to the same task.
[0077] The following gives a preferred embodiment of this solution. The terminal task attributes include five attributes: task generation period, terminal task distribution, task execution time, task priority, and task generation reference time. The task chain is as Figure 2 shown, and the task attributes are shown in Table 1. This embodiment includes a total of 4 tasks τ1, τ2, τ3, τ4. Among them, tasks τ1 and τ2 are distributed in the end device ES0, with generation periods of 2 ms and 4 ms respectively, execution times of 0.5 ms and 1 ms respectively, the priority of task τ1 is the higher 0, the priority of task τ2 is the lower 1, and the generation reference times are both at the 0 moment. Tasks τ3 and τ4 are distributed in the end device ES1, with generation periods of 2 ms and 4 ms respectively, execution times of 0.5 ms and 1 ms respectively, the priority of task τ3 is the lower 1, the priority of task τ4 is the higher 0, and the generation reference times are both at the 0 moment. The supercycle of this embodiment is the least common multiple of 2 ms and 4 ms, which is 4 ms. Therefore, the total number of task instances in the dimension of the JL-DAG adjacency matrix is 6. So the JL-DAG is as Figure 3 shown and is represented by the following adjacency matrix:
[0078]
[0079] The simplified DAG is as follows:
[0080]
[0081] Table 1 Terminal Task Attribute Information
[0082]
[0083] Step 2: Establishment of the minimum deterministic constraint set. For the simplified DAG, the final minimum deterministic constraint set can be determined, which is divided into task execution constraints and information transmission constraints, and is specifically determined by the following formula:
[0084]
[0085] where k specifically refers to the kth task instance in the adjacency matrix, dim(A) is the dimension of matrix A, is the start execution time when the task actually obtains the allocated computing resources, is the execution time matrix, 1 1×dim(A) (k) is a matrix of size 1*dim(A), where the kth element is 1 and the rest are 0, is the task communication delay, is the timeliness of the message generated by the task. The first row is the task execution constraint, and the second row is the information transmission constraint. In this embodiment, the minimum deterministic constraint set is:
[0086]
[0087] where the TSN delay are respectively from the task
[0088] Step 3: Determination of the initial value and the calculation target. As variables directly related to the flow injection design,
[0089] The response time directly determines the time when the task obtains computing resources and completes execution, and thus can also obtain the specific time when the task generates traffic; then directly determines the specific time when the information is transmitted to the task and the task receives the necessary input, so as to determine the specific time when the task starts execution. Therefore is the calculation target to be determined in this scheme. The initial value setting rules for both are as follows: is set to the worst-case response time given by the ordinary priority preemption RTA method, It is the transmission delay obtained from the TSN path length. The worst-case response time given by the ordinary priority preemption RTA method is as follows:
[0090]
[0091] In this embodiment, the initial values of the response time calculated by the ordinary priority preemption RTA method are respectively Only task τ1 has a TSN delay. Under the CQF mechanism, the initial TSN communication delay of the forward task τ1 depends on the path length in the alternative routes. The maximum length of the alternative paths for τ1 is 3 hops, and the minimum length is 2 hops. According to the CQF delay formula in TSN, when the CQF time slot length is T = 0.2 ms, the upper limit of the initial communication delay of τ1 is 0.6 ms, and the lower limit is 0.4 ms. Therefore, under the condition of the initial TSN transmission delay, The delays of the remaining tasks are all 0 because there is no cross-device transmission.
[0092] Step 4: CRTA analyzes the upper and lower bounds of the response time of each task. Based on the task instance arrangement given by the current response time of each task and the task execution constraints in Step 2, calculate the upper and lower bounds of the task response time, that is, the arrangement range of task instances in the time sequence. CRTA obtains the optimal and worst-case comprehensive response times of each task in the current iteration round under the combined influence of dependent tasks and TSN delays.
[0093] Step 5: Customize the upper and lower bounds of the TSN delay. Based on the CRTA results of the current round and the information transmission constraints in Step 2, calculate the optimal and worst-case delay requirements that the TSN communication needs to meet.
[0094] Step 6: Replace the initial calculation values in Step 3 or the previously recorded TSN delay range with the upper and lower bounds of the TSN delay obtained in Step 4, and use them to return to Step 4 for a new round of CRTA calculation. Repeat this step until the TSN delay converges. The specific convergence formula is as follows:
[0095]
[0096] That is, the difference between the two-round iteration results does not exceed the given error limit σ TSN When it is considered that the iteration converges.
[0097] Step 7: Design an information generation scheme from tasks to traffic. From the final CRTA results, the traffic injection network time of the information generation scheme can be designed, as follows:
[0098]
[0099] In the formula is the actual network injection time of the information generated by task τ k For task τ k The final worst-case comprehensive response time analysis result, where Δ is the jitter capacity of the network's own time synchronization jitter and the end device's own synchronization jitter.
[0100] Step 8: Design the information reception scheme for traffic to tasks. From the upper bound of TSN delay, the moment when the traffic in the information reception process is consumed by the task can be designed, and the specific consumption time is Where For task τ k The TSN delay for generating traffic, where Δ is the jitter capacity of the network's own time synchronization jitter and the end device's own synchronization jitter.
[0101] CRTA analysis in Step 4:
[0102] 4.1: Extract all task attributes in the task set of the terminal device, including: task generation period, task distribution on the end device, task execution time, task priority, task generation reference time, and calculate the hyperperiod.
[0103] In this embodiment, the original terminal device-network structure is as Figure 4 shown, the abstract topological structure diagram is as Figure 5 shown, the task chain is as Figure 2 shown, and 4 tasks are distributed in 2 different terminal devices.
[0104] 4.2: Analyze the impact of forward tasks on the response time for each task on different end devices. Consider the earliest allowable execution time of this task after generation under the combined influence of all forward tasks τ i ∈Pre(τ k ). Specifically, it satisfies the following iterative formula:
[0105]
[0106] In the formula is the task generation reference time of task τ k , are the nth iteration values of the lower / upper bounds of the response time of task τ k respectively, mod represents the modulo operation, represents the period of task τ k , represents the greatest common divisor of the periods of task τ i and τ k , is the current iteration value of the lower bound of the TSN delay. As converges, ends the iteration. When the forward task and the current task are on the same end device, it is considered that
[0107] In this embodiment, according to the task chain information, the task combinations with information transmission relationships are (τ1, τ2), (τ1, τ3), and (τ3, τ4). Since tasks τ1 and τ2 are both in the end device ES0, and tasks τ3 and τ4 are both in the end device ES1, the only task group that requires cross-end device communication is (τ1, τ3). And g ik = 2ms. The lower bound of the response time for the initial value setting of the first-round CRTA iteration is the execution time, and the upper bound is the worst-case response time obtained by the common priority preemption RTA method. Therefore the initial iteration's Task τ1 has no forward task. Therefore The forward tasks of tasks τ2 and τ4 are all in the same end device. It is considered that Therefore In each round of iteration, as is updated, is also continuously updated until convergence.
[0108] 4.3: Determine the task set in the same end device that may preempt this task. Considering all other tasks in the same end device, determine whether the response time ranges of the periodic instances of this task and the considered tasks overlap in the supercycle. If there is an overlap, it means there is a possibility of preemption; otherwise, there is no possibility of preemption. For tasks τ k , τ i distributed in the same end device, the specific judgment formula is as follows:
[0109]
[0110] In the formula and are both auxiliary variables, which are the upper and lower bounds of the influence of the forward task on the response time obtained in 4.2 respectively.
[0111] In this embodiment, the task combinations in the same terminal device are ES0: (τ1, τ2), ES1: (τ3, τ4). It is necessary to separately determine whether there is a possibility of preemption within the above task groups. Under the initial TSN transmission delay condition and the first-round response time iterative calculation, it can be obtained that that is, there is a possibility of preemption between (τ1, τ2), and there is a possibility of preemption between (τ3, τ4). Since in the end device ES0, the priority of task τ1 is higher than that of task τ2, and in the end device ES1, the priority of task τ4 is higher than that of task τ3, task τ1 will execute before task τ2, and task τ4 will execute before task τ3.
[0112] 4.4: Based on the earliest allowable execution time result in 4.2, calculate the impact of the preemption of other task priorities on the response time of this task by the same-end device, and combine to obtain the comprehensive response time bound. Considering higher or equal-priority tasks deployed on the same end device, in the best case, only higher-priority tasks with the possibility of preemption will have an impact, and in the worst case, both higher- and equal-priority tasks with the possibility of preemption will have an impact. The calculation formula for the comprehensive response time impact is as follows:
[0113]
[0114] In the formula is the execution time of task τ k , hp(τ i ) and ep(τ i ) respectively refer to the sets of higher-priority tasks and equal-priority tasks.
[0115] In this embodiment, under the initial TSN transmission delay condition and the first-round response time iterative calculation, according to the preemption relationship given in 4.3, in the calculation of the comprehensive response time of τ3, τ i ∈hp(τ i ) and τ i ∈ho(τ i )∪ep(τ i ) both only contain task τ4, so Task τ1 has no impact from forward tasks and priority preemption by the same device, and the response time is Task τ2 is affected by the forward task τ1 on the same end device (which is also a priority preemption task), and the response time is The final calculation results are shown in Table 3. Task τ4 is affected by the forward task τ3 on the same end device (which is also a priority preemption task), and the response time is 2ms. The detailed calculation results of the initial values of CRTA iteration under the initial TSN delay are shown in Table 2. After continuous iteration When it converges, the final upper and lower bounds of the response time are the final values.
[0116] Table 2 Initial values of CRTA iteration in the embodiment (based on the initial TSN delay)
[0117]
[0118] In the table, " / " indicates that for the corresponding task, since it has the highest priority in the local device, there is no situation of judging whether there is priority preemption.
[0119] In step 5, calculate the optimal and worst-case delay requirements that the TSN communication needs to meet:
[0120] 5.1: Extract the attribute information of the task set and traffic set, including: the benchmark time for task generation, the comprehensive response time analysis of tasks, the set of optional routing paths for traffic, and the timeliness of traffic data. Among them, the traffic period is consistent with the task period to which it belongs, and the super-period is the same as the super-period given in step 1 of the comprehensive response time analysis. In this embodiment, the optional routing paths for traffic and the data timeliness are shown in Table 3.
[0121] Table 3 Network Traffic Attribute Information
[0122]
[0123] 5.2: Calculate the allowable transmission delay of the traffic generated by each task. Among them, the lower bound of the delay is given by the earliest execution time of the backward task in the task chain, that is, the traffic should arrive no earlier than when the backward task is generated; the upper bound of the delay is given by the earliest execution time of the backward task in the task chain, that is, the traffic should arrive no later than when the backward task starts to execute. The specific calculation formula is as follows:
[0124]
[0125] In the formula, respectively refer to the upper and lower bound convergence values of the response time of task τ k after iterative calculation by CRTA. T = 0.2ms is the artificially specified CQF time slot size in TSN. is any allowable routing path for task τ i and is the timeliness length of the information generated by task τ k . In this embodiment, due to the final response time results obtained by CRTA iterative calculation and the final TSN delay customization calculation results obtained are shown in Table 4.
[0126] Table 4 TSN Delay Customization Settlement Results of the Embodiment
[0127]
[0128] In the table, " / " indicates that the corresponding task has no forward task or the forward task and this task are on the same end device, and there is no cross-end device TSN communication requirement.
[0129] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and the combination of processes and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices generate for realizing the processesFigure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.
[0130] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device that implements the process Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the process Figure 1 one process or multiple processes and / or blocks Figure 1 the functions specified in one block or multiple blocks.
[0132] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. An end-to-end execution method for application tasks, characterized in that, Including the steps: Step 1, establishment and simplification of the DAG; Step 2, establishment of the minimum deterministic constraint set; Step 3, determination of the initial value calculation and calculation target; Step 4, CRTA analyzes the upper and lower bounds of the response time of each task; Step 5, customize the upper and lower bounds of the TSN delay; In Step 6, replace the initial value calculated in Step 3 or the previously recorded TSN delay range with the upper and lower bounds of the TSN delay obtained in Step 4, and use it to return to Step 4 for a new round of CRTA calculation. Repeat this step until the TSN delay converges; Step 7, design an information generation scheme from tasks to traffic; Step 8, design an information reception scheme from traffic to tasks.
2. The application task end-to-end execution method according to claim 1, characterized in that: Specifically, Step 1 is as follows: The DAG is represented by a square adjacency matrix, where the dimension is the sum of all instances of the supercycle, and both the rows and columns are arranged in the order of all task instances. The element value of 1 indicates that the instance represented by the current row points to the instance represented by the current column in the DAG; After establishing the DAG through the given adjacency matrix, perform DAG simplification through matrix operations to remove unnecessary dependency constraints and information timeliness constraints. The specific calculation formula is as follows: In the formula, A is the aforementioned original adjacency matrix, sgn(·) represents extracting the positive and negative signs of each element of the matrix, and A id is a discrimination matrix for whether task instances belong to the same task. An element of 1 indicates that the instance represented by the current row and the instance represented by the current column belong to the same task.
3. The application task end-to-end execution method according to claim 2, characterized in that: Specifically, Step 2 is as follows: For the simplified DAG, the final minimum deterministic constraint set can be determined, which is divided into task execution constraints and information transmission constraints, and is specifically determined by the following formula: where k specifically refers to the k-th task instance in the adjacency matrix, and dim(A) is the dimension of matrix A. is the starting execution time when the task actually obtains the allocated computing resources. is the execution time matrix, 1 1×dim(A) (k) is a matrix of size 1*dim(A), where the k-th element is 1 and the rest are 0. is the task communication delay. is the timeliness of the messages generated by the task. The first row is the task execution constraint, and the second row is the information transmission constraint.
4. The application task end-to-end execution method according to claim 3, wherein: Specifically, Step 3 is as follows: As a variable directly related to the traffic injection design, The response time directly determines the time for the task to obtain computing resources and complete execution, and thus can also obtain the specific moment when the task generates traffic; It directly determines the specific time when the information is transmitted to the task and when the task receives the necessary input, so that the specific moment when the task starts to execute can be determined; Set to the worst-case response time given by the RTA method preempted by the normal priority, then it is the transmission delay obtained from the TSN path length; The worst-case response time given by the ordinary priority preemption RTA method is as follows:
5. The application task end-to-end execution method according to claim 4, characterized in that: Specifically, Step 4 is to calculate the upper and lower bounds of the task response time, that is, the arrangement range of task instances in the time sequence, based on the arrangement of task instances given by the current response time of each task and the task execution constraints in Step 2.
6. The application task end-to-end execution method according to claim 5, characterized in that: Step 5 is to calculate the optimal and worst-case delay requirements that the TSN communication needs to meet based on the results of the current round of CRTA and the information transmission constraints in Step 2; The specific calculation of the optimal and worst-case delay requirements that the TSN communication needs to meet is as follows: 5.1: Extract the attribute information of the task set and traffic set, including: the task generation reference time, the comprehensive response time analysis of the task, the set of optional routing paths of the traffic, and the traffic data timeliness; where the traffic period is the same as the task period to which it belongs, and the supercycle is the same as the supercycle given in Step 1 of the comprehensive response time analysis; 5.2: Calculate the allowable transmission delay of the traffic generated by each task one by one; among them, the lower bound of the delay is given by the earliest execution time of the backward task in the task chain, that is, the traffic should not arrive earlier than when the backward task is generated; the upper bound of the delay is given by the earliest execution time of the backward task in the task chain, that is, the traffic should not arrive later than when the backward task starts to execute. The specific calculation formula is as follows: Wherein, respectively refer to the task τ k the convergence values of the upper and lower bounds of the response time after CRTA iterative calculation, T = 0.2ms is the CQF time slot size artificially specified in TSN, for the task τ i any allowed routing path, for the task τ k the aging length of the information generated.
7. The method for end-to-end execution of an application task according to claim 6, wherein: In Step 6, the specific convergence formula is as follows: That is, the difference between the results of two rounds of iteration does not exceed the given error limit σ TSN When this occurs, the iteration is considered to have converged.
8. The method for end-to-end execution of an application task according to claim 7, wherein: In Step 7, The traffic injection network moment of the information generation scheme can be designed from the final CRTA result, specifically as follows: where is the task τ k is the actual injection time of the generated information into the network, is the task τ k is the final worst-case comprehensive response time analysis result, and Δ is the jitter capacity of the network's own time synchronization jitter and the end device's own synchronization jitter.
9. The method for end-to-end execution of an application task according to claim 8, characterized in that: In the said step 8, the moment when the traffic of the information receiving process is consumed by the task can be designed based on the upper bound of the TSN delay, and the specific consumption time is where is the TSN delay for the task τ k to generate traffic, and Δ is the jitter capacity of the network itself time synchronization jitter and the end device itself synchronization jitter.
10. The application task end-to-end execution method according to claim 5, characterized in that: In Step 4, the specific CRTA analysis is as follows: 4.1: Extract all task attributes in the task set of the terminal device, including: Calculate the supercycle based on the task generation period, the distribution of tasks on the end device, the task execution time, the task priority, and the task generation reference time; 4.2: Analyze the impact of forward tasks on the response time of different end devices task by task; considering all forward tasks τ i ∈ pre(τ k ) jointly affect the earliest allowable execution time of this task since its generation, specifically satisfying the following iterative formula: where is the task τ k to generate the reference time, are respectively the nth iteration values of the lower / upper bounds of the response time of task τ k , and mod represents the modulo operation, represents the task τ k period, represents the task τ i and τ k the greatest common divisor of the periods, is the current iteration value of the lower bound of the TSN delay. As converges the iteration ends; when the current forward task and the current task are on the same end device, it is considered that 4.3: Determine the task set in the same-end device that may preempt this task. Consider all other tasks in the same-end device and determine whether the response time ranges of the periodic instances of this task and the considered tasks overlap in the supercycle. If there is an overlap, it means there is a possibility of preemption; otherwise, there is no possibility of preemption. For tasks τ k , τ i The specific judgment formula is as follows: where and are both auxiliary variables, are respectively the upper and lower bounds of the influence of the forward task on the response time obtained in 4.2; 4.4: Based on the earliest allowable execution time result in 4.2, calculate the impact of the preemption of other task priorities of the co-located device on the response time of this task, and combine to obtain the comprehensive response time bound. Considering higher or same-priority tasks deployed on the same device, in the best case, only higher-priority tasks with the possibility of preemption will have an impact, and in the worst case, both higher- and same-priority tasks with the possibility of preemption will have an impact. The calculation formula for the comprehensive response time impact is as follows: where is the task τ k execution time, hp(τ i ) and ep(τ i ) respectively refer to the sets of higher-priority tasks and same-priority tasks.
Citation Information
Patent Citations
A transmission control method based on task traffic characteristics in data center networks
CN107770082B
Method, system and device for allocating tasks in edge computing network and medium
CN111352731A
Edge cloud network server deployment method based on task traffic and timeliness
CN113595801A
Task flow prediction method and device for real-time task, equipment, medium and product
CN118277066A