Export order-based complex control system test scheduling method, device, medium and product

CN116627801BActive Publication Date: 2026-09-22HARBIN INST OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310426677.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2026-09-22
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

[0004]本发明目的是为了解决现有复杂控制系统调度性能和效率较低的问题,提供了基于出口排序的复杂控制系统测试调度方法、设备、介质和产品

Benefits of technology

[0055]本发明的基于出口排序的复杂控制系统测试调度方法通过采用各测试任务的出口排序值作为蚁群算法中的启发函数,很大程度上将任务间的优先级关系、通信代价耦合到算法最优解的搜索中,有效提高了算法对最优解的搜索效率,从而提高了测试调度系统的调度性能,缩短复杂控制系统测试时间,提高自动化测试系统测试效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116627801B_ABST
    Figure CN116627801B_ABST
Patent Text Reader

Abstract

The export order-based complex control system test scheduling method, device, medium and product belong to the technical field of automatic test and solve the problems of low performance and efficiency of the complex control system.The method comprises the following steps: the export order-based complex control system test scheduling method of the present application uses the export order value of each test task as the heuristic function in the ant colony algorithm, greatly couples the priority relationship between the tasks and the communication cost into the search of the optimal solution of the algorithm, effectively improves the search efficiency of the optimal solution, improves the optimization performance of the algorithm, and further improves the performance and efficiency of the complex control system.The present application is suitable for optimizing the test task scheduling of the complex control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automated testing technology, and in particular to test scheduling for complex control systems. Background Technology

[0002] For complex control systems, testing tasks are numerous, each with different test plans and resources. Furthermore, due to limitations in technology, experience, logical relationships, and other specific requirements, various constraints exist between tasks. When there are many test items, relying on manual arrangement is inefficient and cannot yield the optimal solution for the test process.

[0003] Existing scheduling algorithms, when dealing with test tasks with constraints, do not consider the changes in the start time of subsequent tasks (communication costs) caused by the constraints. Furthermore, the performance optimization of current scheduling algorithms is still far from meeting the actual needs when facing highly correlated test tasks. Summary of the Invention

[0004] The purpose of this invention is to solve the problem of low scheduling performance and efficiency of existing complex control systems, and to provide a test scheduling method, equipment, medium and product for complex control systems based on exit sorting.

[0005] This invention is achieved through the following technical solution: In one aspect, this invention provides a test scheduling method for complex control systems based on exit sequencing, the method comprising:

[0006] Step 1: Input experimental data and initialize the parameters of the ant colony algorithm;

[0007] Step 2: Calculate the export ranking value, specifically including:

[0008] Calculate the exit ranking value for all test tasks. The formula for calculating the exit ranking value for each test task is as follows:

[0009]

[0010] Among them, rank u (t i ) for test task t i The exit ranking value indicates that the task has a greater impact on the scheduling of subsequent tasks, and the corresponding task priority is higher. For task t i The average test time for all test plans, task t s For task t i Direct successor task node, c i,s For task t i To task t s The communication cost depends on the constraints between tasks and the computing performance of the computing nodes;

[0011] Step 3: Determine if the iteration conditions are met; if the iteration conditions are met, proceed to Step 4; otherwise, proceed to Step 13.

[0012] Step 4: Determine if the ant convergence condition is met; if the ant convergence condition is met, proceed to Step 5; otherwise, increment the iteration count and proceed to Step 3.

[0013] Step 5: Randomly select the initial test task and test plan;

[0014] Step 6: Update the task prohibition table, resource availability table, and task scheduling matrix according to the selected test task number and test plan. Specifically, this includes: updating the task prohibition table by adding the selected test task to the task prohibition table; updating the resource availability table by updating the idle time slices of each test resource; and the task scheduling matrix describing the start time, end time, and selected test plan number of each test task.

[0015] Step 7: Determine if all test tasks have been scheduled; if all have been scheduled, proceed to Step 9; otherwise, proceed to Step 8.

[0016] Step 8: Calculate the heuristic function, the test task state transition probability, and the test plan transition probability; select the test task and test plan; and proceed to Step 6.

[0017] Step 9: Calculate the total test time and resource balance;

[0018] Step 10: Determine whether the test resource balance τ satisfies the constraints:

[0019] τ≤ε2

[0020] Among them, ε2>120;

[0021] If the conditions are met, proceed to step eleven; otherwise, proceed to step twelve.

[0022] Step 11: Global pheromone update;

[0023] Step 12: Data return to its place, initialize the task taboo table, resource idle table and task scheduling matrix, increment the ant count and execute step 4;

[0024] Step 13: Output the optimal solution after bi-objective optimization.

[0025] Furthermore, step one specifically includes:

[0026] Input experimental data, which includes the number of test tasks m, the number of test resources n, the constraints and communication costs between test tasks, the test time and test resources occupied by different test schemes for each test task;

[0027] The parameters of the ant colony algorithm are initialized, including the maximum number of iterations num_cycle, the maximum number of ants num_anut, the initial pheromone tau0, the expected search intensity teta_Q, the pheromone evaporation coefficient rho, the pheromone heuristic factor α, and the expected heuristic factor β.

[0028] Furthermore, in step six, the start time and completion time of each test task are calculated using the following formula:

[0029] Assume test task t i The selected test plan includes test instruments r j Then test task t i In the testing instrument r j The earliest test start time is defined as:

[0030]

[0031] Among them, pred(t) i ) represents task t i The set of all direct predecessor tasks, EFT(t) p ) represents test task t p Completion time, C p,i Representing task t p With task t i The communication cost between them, when the two tasks use exactly the same test instruments, is C. p,i =0; otherwise, in This represents the average latency of all processor cores; This represents the average bandwidth connected to the processor cores, data p,i Indicates t p Send to task t i Total amount of data, ST(r) j ) is the test instrument r in the resource free list. j The earliest free time;

[0032] Test task t i In the testing instrument r j The earliest test completion time is defined as:

[0033] EFT(t i ,r j ) = EST(t i ,r j )+w i,j

[0034] Among them, w i,j In test task t iIn the selected test plan, in instrument r j The time required to complete the test.

[0035] Furthermore, in step eight, the heuristic function η for the test task is... i and the test task state transition probability p i,j k (t) is defined as follows:

[0036] η i =rank u (t i )

[0037]

[0038] Wherein, the state transition probability p i,j k (t) indicates that ant k performed well in the previous test task t. i In this case, the next test task is selected as t. j The probability of η; j For test task t j The export ranking value, τ i,j Let t be the previous test task. i The next test task selects t j The pheromone, allow(t) is the set of test tasks available at this time, determined by the task taboo list and the constraints between tasks, η s For test task t s The exit ranking value, α and β are the information heuristic factor and the expectation heuristic factor, respectively; the test task is selected according to the state transition probability by the roulette wheel rule;

[0039] The state transition probability of the test scheme is defined as follows:

[0040]

[0041] Wherein, the state transition probability P i,s k Let ant k be the test task t. i The probability of choosing test plan s; τ i,s For test task t i Select pheromone testing scheme s, solution(t) i ) for test task t i All possible schemes are available, with α being the information heuristic factor; a corresponding test scheme is selected for each test task according to the state transition probability of the test scheme using a roulette wheel rule.

[0042] Furthermore, in step nine, the test time makespan is defined as the maximum test completion time among all test tasks, and the test resource balance τ is defined as follows:

[0043]

[0044] Among them, T j T is the time each instrument is occupied. mean Let n be the average time the instrument is occupied, and n be the number of test instrument resources.

[0045] Furthermore, in step eleven, the pheromone τ ij The update formula is as follows:

[0046]

[0047] In the formula: τ ij (t+1) indicates that the test task preceding time t+1 was t. i The next test task selects t j The pheromone, ρ is the pheromone evaporation coefficient, i.e., (1-ρ) represents the pheromone residue factor, A is the number of ants, and Δτ ij (t) k For the k-th ant in task t i t j The increment of pheromones released between intervals is calculated using the following formula;

[0048]

[0049] In the formula: τ0 is the initial pheromone concentration, and makespan is the test time corresponding to ant k, which is the total test time. LB is the average total test time for all ants in one iteration, and LB is the minimum test time.

[0050] Furthermore, in step ten, ε2 in the constraint is set to 130.

[0051] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, it executes the steps of a test scheduling method for a complex control system based on exit sorting as described above.

[0052] Thirdly, the present invention provides a computer-readable storage medium storing a plurality of computer instructions, the plurality of computer instructions being used to cause a computer to execute a test scheduling method for a complex control system based on exit sequencing as described above.

[0053] Fourthly, the present invention provides a computer program product, which, when executed by a processor, implements a test scheduling method for a complex control system based on exit sorting as described above.

[0054] The beneficial effects of this invention are:

[0055] The complex control system test scheduling method based on exit sorting of the present invention uses the exit sorting value of each test task as the heuristic function in the ant colony algorithm, which largely couples the priority relationship and communication cost between tasks into the search for the optimal solution of the algorithm, effectively improving the search efficiency of the algorithm for the optimal solution, thereby improving the scheduling performance of the test scheduling system, shortening the test time of complex control systems, and improving the test efficiency of automated test systems.

[0056] This invention is applicable to optimizing the scheduling of test tasks for complex control systems. Attached Figure Description

[0057] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is the overall flowchart of the present invention. Detailed Implementation

[0059] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0060] Implementation Method 1: A test scheduling method for complex control systems based on exit sequencing, the method comprising:

[0061] Step 1: Input experimental data and initialize the parameters of the ant colony algorithm;

[0062] Step 2: Calculate the export ranking value, specifically including:

[0063] Calculate the exit ranking value for all test tasks. The formula for calculating the exit ranking value for each test task is as follows:

[0064]

[0065] Among them, rank u (t i ) for test task t iThe exit ranking value indicates that the task has a greater impact on the scheduling of subsequent tasks, and the corresponding task priority is higher. For task t i The average test time for all test plans, task t s For task t i Direct successor task node, c i,s For task t i To task t s The communication cost depends on the constraints between tasks and the computing performance of the computing nodes;

[0066] Step 3: Determine if the iteration conditions are met; if the iteration conditions are met, proceed to Step 4; otherwise, proceed to Step 13.

[0067] Step 4: Determine if the ant convergence condition is met; if the ant convergence condition is met, proceed to Step 5; otherwise, increment the iteration count and proceed to Step 3.

[0068] Step 5: Randomly select the initial test task and test plan;

[0069] Step 6: Update the task prohibition table, resource availability table, and task scheduling matrix according to the selected test task number and test plan. Specifically, this includes: updating the task prohibition table by adding the selected test task to the task prohibition table; updating the resource availability table by updating the idle time slices of each test resource; and the task scheduling matrix describing the start time, end time, and selected test plan number of each test task.

[0070] Step 7: Determine if all test tasks have been scheduled; if all have been scheduled, proceed to Step 9; otherwise, proceed to Step 8.

[0071] Step 8: Calculate the heuristic function, the test task state transition probability, and the test plan transition probability; select the test task and test plan; and proceed to Step 6.

[0072] Step 9: Calculate the total test time and resource balance;

[0073] Step 10: Determine whether the test resource balance τ satisfies the constraints:

[0074] τ≤ε2=130

[0075] If the conditions are met, proceed to step eleven; otherwise, proceed to step twelve.

[0076] Step 11: Global pheromone update;

[0077] Step 12: Data return to its place, initialize the task taboo table, resource idle table and task scheduling matrix, increment the ant count and execute step 4;

[0078] Step 13: Output the optimal solution after bi-objective optimization.

[0079] In this embodiment, the test scheduling method for complex control systems based on exit sorting uses the exit sorting value of each test task as the heuristic function in the ant colony algorithm. This largely couples the priority relationship and communication cost between tasks into the search for the optimal solution of the algorithm, effectively improving the search efficiency for the optimal solution, improving the optimization performance of the algorithm, and thus improving the test scheduling performance of complex control systems.

[0080] Implementation Method Two is a further limitation on the test scheduling method for complex control systems based on exit sequencing described in Implementation Method One. In this implementation method, step one is further defined, specifically including:

[0081] Step one specifically includes:

[0082] Input experimental data, which includes the number of test tasks m, the number of test resources n, the constraints and communication costs between test tasks, the test time and test resources occupied by different test schemes for each test task;

[0083] The parameters of the ant colony algorithm are initialized, including the maximum number of iterations num_cycle, the maximum number of ants num_anut, the initial pheromone tau0, the expected search intensity teta_Q, the pheromone evaporation coefficient rho, the pheromone heuristic factor α, and the expected heuristic factor β.

[0084] This embodiment provides specific experimental data and ant colony algorithm parameters for a test scheduling method for complex control systems based on exit sorting. These experimental data and parameters can complete the test scheduling method for complex control systems based on exit sorting, thereby improving the search efficiency for the optimal solution and enhancing the optimization performance of the algorithm.

[0085] Implementation Method 3 further defines the test scheduling method for complex control systems based on exit sequencing described in Implementation Method 1. In this implementation method, the various test tasks in step six are further defined, specifically including:

[0086] In step six, the start time and completion time of each test task are calculated using the following formula:

[0087] Assume test task t i The selected test plan includes test instruments r j Then test task t i In the testing instrument r j The earliest test start time is defined as:

[0088]

[0089] Among them, pred(t) i ) represents task t i The set of all direct predecessor tasks, EFT(t) p ) represents test task t p Completion time, C p,i Representing task t p With task t i The communication cost between them, when the two tasks use exactly the same test instruments, is C. p,i =0; otherwise, in This represents the average latency of all processor cores, typically set to 0. This represents the average bandwidth connected to the processor cores, data p,i Indicates t p Send to task t i Total amount of data, ST(r) j ) is the test instrument r in the resource free list. j The earliest free time;

[0090] Test task t i In the testing instrument r j The earliest test completion time is defined as:

[0091] EFT(t i ,r j ) = EST(t i ,r j )+w i,j

[0092] Among them, w i,j In test task t i In the selected test plan, in instrument r j The time required to complete the test.

[0093] In this embodiment, a method for calculating the test start time and test completion time of each test task is provided. This method can accurately calculate the test start time and test completion time of each test task, and then calculate the total test scheduling time of the control system, which is used to evaluate the scheduling performance of the complex control system test scheduling method based on exit sorting in this embodiment.

[0094] Implementation Method Four: This implementation method further defines the test scheduling method for complex control systems based on exit sorting described in Implementation Method One. In this implementation method, the heuristic function and state transition probability of the test task in step eight are further defined, specifically including:

[0095] In step eight, the heuristic function η for the test task is...i and the test task state transition probability p i,j k (t) is defined as follows:

[0096] η i =rank u (t i )

[0097]

[0098] Wherein, the state transition probability p i,j k (t) indicates that ant k performed well in the previous test task t. i In this case, the next test task is selected as t. j The probability of η; j For test task t j The export ranking value, τ i,j Let t be the previous test task. i The next test task selects t j The pheromone, allow(t) is the set of test tasks available at this time, determined by the task taboo list and the constraints between tasks, η s For test task t s The exit ranking value, α and β are the information heuristic factor and the expectation heuristic factor, respectively; the test task is selected according to the state transition probability by the roulette wheel rule;

[0099] The state transition probability of the test scheme is defined as follows:

[0100]

[0101] Wherein, the state transition probability P i,s k Let ant k be the test task t. i The probability of choosing test plan s; τ i,s For test task t i Select pheromone testing scheme s, solution(t) i ) for test task t i All possible schemes are available, with α being the information heuristic factor; a corresponding test scheme is selected for each test task according to the state transition probability of the test scheme using a roulette wheel rule.

[0102] In this embodiment, a method for calculating the heuristic function and state transition probability of the test task is given. The heuristic function and state transition probability of the test task obtained by the calculation method are used for the sorting of test tasks and the selection of test schemes for each test task during the scheduling process. This can integrate several test information such as pheromones between ants and constraints between test tasks, communication costs, and test times into the solution process of the scheduling optimization problem, thereby enhancing the connection between the scheduling algorithm and the specific scheduling model.

[0103] Implementation Method Five: This implementation method further defines the test scheduling method for complex control systems based on exit sorting described in Implementation Method One. In this implementation method, the total test time and resource balance in step nine are further defined, specifically including:

[0104] In step nine, the test time makespan is defined as the maximum test completion time among all test tasks, and the test resource balance τ is defined as follows:

[0105]

[0106] Among them, T j T is the time each instrument is occupied. mean The average time the instrument is occupied; the smaller the test resource balance τ, the more reasonable the scheduling effect, and n is the number of test instrument resources.

[0107] In this embodiment, a method for calculating total test time and resource balance is provided to evaluate the applicability of the algorithm in the dual-objective optimization problem of test time and test resource balance.

[0108] Implementation method six is ​​a further limitation on the test scheduling method for complex control systems based on exit sequencing described in implementation method one. In this implementation method, the pheromone in step eleven is further defined, specifically including:

[0109] In step eleven, pheromone τ ij The update formula is as follows:

[0110]

[0111] In the formula: τ ij (t+1) indicates that the test task preceding time t+1 was t. i The next test task selects t j The pheromone, ρ is the pheromone evaporation coefficient, i.e., (1-ρ) represents the pheromone residue factor, A is the number of ants, and Δτ ij (t) k For the k-th ant in task t i t jThe increment of pheromones released between intervals is calculated using the following formula;

[0112]

[0113] In the formula: τ0 is the initial pheromone concentration, and makespan is the test time corresponding to ant k. LB is the average total test time for all ants in one iteration, and LB is the minimum test time.

[0114] In this embodiment, a pheromone update method is provided to quantify the effect of test time on global pheromone update for different ant schemes, and to improve the convergence of the scheduling algorithm through cooperation among ants.

[0115] Implementation method seven: This implementation method is an example of a test scheduling method for complex control systems based on exit sorting, as described above. The overall algorithm flow is as follows: Figure 1 As shown, it specifically includes:

[0116] Step 1: Data Input and Parameter Initialization. Import experimental data, including the number of test tasks m, the number of test resources n, the constraints and communication costs between test tasks, and the test time and resources used for different test schemes for each test task; initialize the parameters of the ant colony algorithm, including the maximum number of iterations num_cycle, the maximum number of ants num_anut, the initial pheromone tau0, the expected search intensity teta_Q, the pheromone evaporation coefficient rho, the pheromone heuristic factor α, and the expected heuristic factor β. See Table 1.

[0117] Table 1 Parameter Configuration Table

[0118] m 50 Number of tasks α 10 Information heuristic factor n 10 Number of test resources β 5 Expected heuristic factor tau0 3 initial pheromone num_cycle 50 Number of iterations teta_Q 3 Expected search intensity num_anut 8 Ant count rho 0.9 Pheromones volatile coefficient

[0119] Step Two: Calculate the exit ranking value. Calculate the exit ranking value for all test tasks. The formula for calculating the exit ranking value for each test task is as follows:

[0120]

[0121] Among them, rank u (t i ) for test task t i The exit ranking value indicates that the task has a greater impact on the scheduling of subsequent tasks, and the corresponding task priority is higher. For task t i The average test time for all test plans, task t s For task t i Direct successor task node, c i,s For task t i To task t sThe communication cost depends on the constraints between tasks and the computing performance of the computing nodes.

[0122] Step 3: Determine if the iteration conditions are met. If the iteration conditions are met, proceed to Step 4; otherwise, proceed to Step 13.

[0123] Step 4: Determine if the ant convergence condition is met. If the ant convergence condition is met, proceed to Step 5; otherwise, increment the iteration count and proceed to Step 3.

[0124] Step 5: Randomly select the initial test task and test plan.

[0125] Step Six: Update the task prohibition table, resource availability table, and task scheduling matrix based on the selected test task number and test plan. Updating the task prohibition table involves adding the selected test task to the task prohibition table. Updating the resource availability table involves updating the idle time slices of each test resource. The task scheduling matrix describes the start time, completion time, and selected test plan number of each test task.

[0126] The start and end times of each test task are calculated using the following formula.

[0127] Assume test task t i The selected test plan includes test instruments r j Then test task t i In the testing instrument r j The earliest test start time is defined as:

[0128]

[0129] Among them, pred(t) i ) represents task t i The set of all direct predecessor tasks, EFT(t) p ) represents test task t p Completion time, C p,i Representing task t p With task t i The communication cost between them, when the two tasks use exactly the same test instruments, is C. p,i =0; otherwise, in This represents the average latency of all processor cores, typically set to 0. This represents the average bandwidth connected to the processor cores, data p,i Indicates t p Send to task t i Total amount of data, ST(r) j ) is the test instrument r in the resource free list. j The earliest free time.

[0130] Test task t i In the testing instrument r j The earliest test completion time is defined as:

[0131] EFT(t i ,r j ) = EST(t i ,r j )+w i,j

[0132] Among them, w i,j In test task t i In the selected test plan, in instrument r j The time required to complete the test.

[0133] Step 7: Determine if all test tasks have been scheduled. If all have been scheduled, proceed to Step 9; otherwise, proceed to Step 8.

[0134] Step 8: Calculate the heuristic function, the test task state transition probability, and the test plan transition probability; select the test task and the test plan; then, execute Step 6.

[0135] Test task heuristic function η i and the test task state transition probability p i,j k (t) is defined as follows:

[0136] η i =rank u (t i )

[0137]

[0138] Wherein, the state transition probability p i,j k (t) indicates that ant k performed well in the previous test task t. i In this case, the next test task is selected as t. j The probability of η. j For test task t j The export ranking value, τ i,j Let t be the previous test task. i The next test task selects t j The pheromone, allow(t) is the set of test tasks available at this time, determined by the task taboo list and the constraints between tasks, α and β are the information heuristic factor and the expected heuristic factor, respectively, and η s For test task t s The exit ranking value. The test task is selected according to the state transition probability using a roulette wheel rule.

[0139] The state transition probability of the test scheme is defined as follows:

[0140]

[0141] Wherein, the state transition probability P i,s k Let ant k be the test task t. i The probability of choosing test plan s. τ i,s For test task t i Select pheromone testing scheme s, solution(t) i ) for test task t i All possible solutions are provided, with α being the information heuristic factor. A suitable test solution is selected for each test task based on the state transition probabilities of the test solutions using a roulette wheel rule.

[0142] Step 9: Calculate the total test time and resource balance. The test time makespan is defined as the maximum completion time of all test tasks, as shown in the following formula.

[0143]

[0144] Among them, EFT(t) i ) for test task t i The completion time of the test, [t1,...,t m ] represents the test task set, and m represents the total number of test tasks.

[0145] The resource balance τ is defined as follows:

[0146]

[0147] Among them, T j T is the time each instrument is occupied. mean The average time the instrument is occupied. The smaller the test resource balance τ, the more reasonable the scheduling effect, where n is the number of test instrument resources.

[0148] Step 10: Determine if the test resource balance τ satisfies the constraints. If it does, proceed to Step 11; otherwise, proceed to Step 12. The value of ε2 depends on the test task set and actual test requirements. In this experimental task set, the minimum single-objective optimization value for test resource balance is 120. Considering the actual test requirements and the constraints between the dual optimization objectives, ε2 is set to 130.

[0149] τ≤ε2=130

[0150] Step 11: Global pheromone update.

[0151] Pheromones τ ij The update formula is as follows:

[0152]

[0153] In the formula: τ ij (t+1) indicates that the test task preceding time t+1 was t. i The next test task selects t j The pheromone, ρ is the pheromone evaporation coefficient, i.e., (1-ρ) represents the pheromone residue factor, A is the number of ants, and Δτ ij (t) k For the k-th ant in task t i t j The increment of pheromones released between intervals is calculated using the following formula.

[0154]

[0155] In the formula: τ0 is the initial pheromone concentration, and makespan is the test time corresponding to ant k (i.e., the total test time). LB is the average total test time for all ants in one iteration, and LB is the minimum test time.

[0156] Step 12: Data return to its place, initialize the task taboo table, resource idle table and task scheduling matrix, increment the ant count and execute step 4.

[0157] Step 13: Output the optimal solution after bi-objective optimization.

[0158] For 50 test tasks and 10 test instruments, after generating a Gantt chart using the scheduling optimization algorithm of the present invention, it can be seen that the method of the present invention can achieve maximum task parallelism and shorten the total test time.

[0159] A comparison with other algorithms is shown in Table 2.

[0160] Table 2

[0161] This paper's algorithm 66 Traditional ant colony algorithm 102 Serial test 175 Half-serial test 110 Genetic Algorithm 96

[0162] As can be seen from Table 2, the test time of the test scheduling method for complex control systems based on exit sorting in this application is 66 minutes, which is significantly reduced compared to the test time of other algorithms. This indicates that the method in this application can effectively improve the search efficiency for the optimal solution and also improve the optimization performance of the algorithm.

[0163] This application provides a test scheduling method for complex control systems based on exit sequencing, which mainly includes the following five steps:

[0164] Step 1: Calculate the exit ranking value. Calculate the exit ranking value for all test tasks. The exit ranking calculation formula is as follows:

[0165]

[0166] Among them, rank u (t i ) for test task t i The exit ranking value indicates that the task has a greater impact on the scheduling of subsequent tasks, and thus a higher task priority. For task t i The average test time for all test plans, task t s For task t i Direct successor task node.

[0167] Step Two: Task Sorting Phase. Ants generate a task scheduling matrix T using a roulette wheel approach, based on the exit sorting values ​​of each test task and the pheromones between tasks and solutions. P .

[0168] T P =[[t1,s1],[t2,s2],[…,…],[t m ,s m ]]

[0169] Among them, T P [1] = [t2, s2] indicates that the task scheduled in the second step is t2, and the test scheme number is s2.

[0170] Step 3: Resource Scheduling Phase. According to T... P Based on the task ordering relationship and the selected test plan, test resources are allocated to the test tasks sequentially from beginning to end. When allocating test resources, it is ensured that T... P Test tasks with lower ranking values ​​should not start testing earlier than test tasks with higher ranking values, and test resources are preemptive in terms of time.

[0171] Test task t i In the testing instrument r j The earliest test start time is defined as:

[0172]

[0173] Among them, pred(t) i ) represents task t i The set of all direct predecessor tasks, EFT(t) p ) represents test task t p Completion time, C p,i Representing task t p With task t i The communication cost between them, when the two tasks use exactly the same test instruments, is C. p,i =0; otherwise, in This represents the average latency of all processor cores, typically set to 0. Data represents the average bandwidth connected to the processor cores. p,i Indicates t p Send to task t i Total amount of data.

[0174] Test task t i In the testing instrument r j The earliest test completion time is defined as:

[0175] EFT(t i ,r j ) = EST(t i ,r j )+w i,j

[0176] Among them, w i,j In test task t i In the selected test plan, in instrument r j The time required to complete the test.

[0177] Step 4: Pheromone Update. After one iteration, the pheromone is updated based on the test scheduling results of all ants.

[0178] The desired optimization target is the total testing time, defined as the latest completion time among all testing tasks. This is expressed as follows:

[0179]

[0180] The updating of pheromones mainly includes two parts: pheromone volatilization and the labeling and updating of dynamic pheromones. The calculation formula is as follows:

[0181]

[0182] In the formula: ρ is the pheromone evaporation coefficient, i.e., (1-ρ) represents the pheromone residue factor, A is the number of ants, and Δτ ij (t) k For the k-th ant in task t i t j The increment of pheromones released between intervals is calculated using the following formula.

[0183]

[0184] In the formula: τ0 is the initial pheromone concentration, and makespan is the total testing time for ant k. LB is the average total time taken by all ants in one iteration, and LB is the minimum test time.

[0185] Step 5: After all ants in all iterations have completed their scheduling, output the scheduling scheme with the shortest test time among all scheduling results to complete the scheduling optimization.

[0186] In summary, the test scheduling method for complex control systems based on exit sorting proposed in this application uses the exit sorting value of each test task as a heuristic function in the ant colony algorithm. This largely couples the priority relationship and communication cost between tasks into the search for the optimal solution, effectively improving the search efficiency for the optimal solution and enhancing the optimization performance of the algorithm.

Claims

1. A test scheduling method for complex control systems based on exit sequencing, characterized in that, The method includes: Step 1: Input experimental data and initialize the parameters of the ant colony algorithm; Step 2: Calculate the export ranking value, specifically including: Calculate the exit ranking value for all test tasks. The formula for calculating the exit ranking value for each test task is as follows: in, For testing tasks The exit ranking value indicates that the task has a greater impact on the scheduling of subsequent tasks, and the corresponding task priority is higher. For the task The average test time for all test plans, task For the task Direct successor task node, For the task To the mission The communication cost depends on the constraints between tasks and the computing performance of the computing nodes; Step 3: Determine if the iteration conditions are met; if the iteration conditions are met, proceed to Step 4; otherwise, proceed to Step 13. Step 4: Determine if the ant convergence condition is met; if the ant convergence condition is met, proceed to Step 5; otherwise, increment the iteration count and proceed to Step 3. Step 5: Randomly select the initial test task and test plan; Step 6: Update the task prohibition table, resource availability table, and task scheduling matrix according to the selected test task number and test plan. Specifically, this includes: updating the task prohibition table by adding the selected test task to the task prohibition table; updating the resource availability table by updating the idle time slices of each test resource; and the task scheduling matrix describing the start time, end time, and selected test plan number of each test task. Step 7: Determine if all test tasks have been scheduled; if all have been scheduled, proceed to Step 9; otherwise, proceed to Step 8. Step 8: Calculate the heuristic function, the test task state transition probability, and the test plan transition probability; select the test task and test plan; and proceed to Step 6. Step 9: Calculate the total test time and resource balance; Step 10: Determine the resource balance of the test. Does the constraint satisfy: in, 120; If the conditions are met, proceed to step eleven; otherwise, proceed to step twelve. Step 11: Global pheromone update; Step 12: Data return to its place, initialize the task taboo table, resource idle table and task scheduling matrix, increment the ant count and execute step 4; Step 13: Output the optimal solution after bi-objective optimization; Test task heuristic function and test task state transition probability The definition is as follows: Among them, the state transition probability This indicates that ant k was in the previous test task. In this case, the next test task is selected. The probability of; For testing tasks Export ranking value, For the previous test task Next test task selection pheromones, The set of test tasks available at this time is determined by the task taboo list and the constraints between tasks. For test task t s Export ranking value, These are the information heuristic factor and the expectation heuristic factor, respectively; the test task is selected according to the state transition probability using a roulette wheel rule.

2. The test scheduling method for complex control systems based on exit sequencing according to claim 1, characterized in that, Step one specifically includes: Input experimental data, which includes the number of test tasks m, the number of test resources n, the constraints and communication costs between test tasks, the test time and test resources occupied by different test schemes for each test task; The parameters of the ant colony algorithm are initialized, including the maximum number of iterations (num_cycle), the maximum number of ants (num_anut), the initial pheromone level (tau0), the expected search intensity (teta_Q), the pheromone evaporation coefficient (rho), and the pheromone heuristic factor. and expected heuristic factors .

3. The test scheduling method for complex control systems based on exit sequencing according to claim 1, characterized in that, In step six, the start time and completion time of each test task are calculated using the following formula: Assuming test task The selected test plan includes test instruments. Then the test task In the testing instrument The earliest test start time is defined as: in, Representative task The set of all direct predecessor tasks, Represents test task Completion time, Representative task With the task The communication cost between them, when the two tasks use exactly the same testing instruments, ;otherwise, ,in This represents the average latency of all processor cores; This represents the average bandwidth connected to the processor cores. express Send to task Total amount of data, Test instruments for the resource free table The earliest free time; Test task In the testing instrument The earliest test completion time is defined as: in, Indicating in the test task Among the selected test plans, in the instrument The time required to complete the test.

4. The test scheduling method for complex control systems based on exit sequencing according to claim 1, characterized in that, In step eight, the state transition probability of the test scheme is defined as follows: Among them, the state transition probability This indicates that ant k is the test task. The probability of selecting test plan s; For testing tasks Select pheromone test scheme s For testing tasks All available schemes The information heuristic factor is used; the appropriate test plan is selected for each test task according to the state transition probability of the test plan using the roulette wheel rule.

5. The test scheduling method for complex control systems based on exit sequencing according to claim 1, characterized in that, In step nine, the test time makespan is defined as the maximum completion time of all test tasks, and the test resource balance is... The definition is as follows: in, The time each instrument is occupied, Let n be the average time the instrument is occupied, and n be the number of test instrument resources.

6. The test scheduling method for complex control systems based on exit sequencing according to claim 1, characterized in that, In step eleven, pheromones The update formula is as follows: In the formula: This indicates that the previous test task at time t+1 was Next test task selection pheromones, The pheromone evaporation coefficient, i.e. This represents the pheromone residue factor, where A is the number of ants. For the k-th ant in the task The increment of pheromones released between intervals is calculated using the following formula; In the formula: The initial pheromone concentration, The test time corresponding to ant k is the total test time. LB is the average total test time for all ants in one iteration, and LB is the minimum test time.

7. The test scheduling method for complex control systems based on exit sequencing according to claim 1, characterized in that, In step ten, the constraints Take 130.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, The steps of the method according to any one of claims 1 to 7 are performed when the processor runs the computer program stored in the memory.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of computer instructions, which are used to cause a computer to perform the method of any one of claims 1 to 7.

10. A computer program product, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Routing of fluid pipelines

    US20210027224A1

  • Expense optimization scheduling method for deadline constraint under cloud scientific workflow

    WO2020186872A1