A sensing and computing-coordinated high-speed railway contact network defect real-time detection task scheduling system and method
By constructing a real-time detection task scheduling system for high-speed railway contact network defects with sensing computing and optimizing task scheduling with improved cuckoo genetic algorithm, the problem of real-time detection of high-speed railway contact network defects in the existing technology is solved, and efficient real-time detection effect is achieved .
Patent Information
- Application Number
- CN202411292954.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-14
AI Technical Summary
The existing technology is difficult to realize real-time detection of high-speed rail contact network defects. It is mainly due to insufficient resources of edge equipment and complexity of detection tasks, which cannot match the acquisition speed of the camera device, and it is impossible to realize real-time detection of sensor computing coordination and shooting while shooting.
Build a real-time detection task scheduling system for high-speed railway contact network defects with sensing computing collaboration, optimize task scheduling through improved cuckoo genetic algorithm (CKGA), reasonably allocate tasks to be detected, make full use of edge equipment computing power, reduce overall processing time, and meet real-time Testing requirements.
It effectively improves the task execution efficiency and edge equipment utilization rate in the contact network defect detection scenario, realizes efficient real-time detection, and meets the real-time detection requirements of high-speed railway contact network defects.
Smart Images

Figure CN118799831B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge computing task scheduling, and specifically relates to a sensing and computing collaborative high-speed railway contact network defect real-time detection task scheduling system and method. Background Art
[0002] As a high-speed, safe and convenient means of transportation, high-speed rail plays an important role in my country's railway transportation. The core element of the electrified railway system, the overhead line, is the only power source for high-speed rail, and its stability and reliability are crucial. Regular inspections of related lines and equipment are a basic work to ensure the safe and stable operation of the overhead line. The current mainstream detection method is to use a camera to collect line data, and then transmit it to the data center for analysis and processing. In this way, the shooting and detection links are often separated, the cycle is long, and there are increased risks.
[0003] In recent years, many researchers have used edge computing technology to conduct safety inspections of contact networks. This method involves inspectors carrying video acquisition devices and edge devices on high-speed trains, deploying devices at the head of the train, and transmitting the video directly to the edge device for processing after the camera captures the video, which preliminarily solves the problem of separation between the acquisition end and the detection end. However, due to the lack of edge device resources, the wide variety of contact network safety defects, and the large amount of data to be detected, the processing speed of the edge detection device for high-speed rail contact network defect inspection currently lags behind the acquisition speed of the camera device, and it is impossible to achieve real-time detection of sensing and computing coordination and shooting and inspection at the same time. It is urgent to model the scheduling problem of real-time detection of contact network defects, design appropriate task scheduling strategies, reasonably allocate tasks to be detected, make full use of the computing power of edge devices, reduce the overall processing time, and meet the requirements of real-time detection. Summary of the invention
[0004] The purpose of the present invention is to provide a sensing and computing collaborative high-speed railway contact network defect real-time detection task scheduling system and method, by constructing a high-speed railway contact network defect real-time detection task scheduling model to solve the problem that edge devices and acquisition devices cannot work together, and use the improved cuckoo genetic algorithm (CKGA) to solve the real-time task scheduling optimization problem.
[0005] In order to achieve the above-mentioned object, the present invention is implemented by the following technical solutions: In the first aspect, the present invention provides a high-speed railway contact network defect real-time detection task scheduling system with sensor-computing collaboration, comprising:
[0006] The high-speed railway contact network defect real-time detection module includes an edge device model, a camera device model, a target detection model and a task model, which are used to describe the scheduling of high-speed railway contact network defect detection tasks under real-time detection requirements; wherein, the edge device model describes the relevant information and parameters of the edge device, the camera device model describes the relevant information and parameters of the camera acquisition device, the target detection model describes the model used for contact network defect detection, and the task model describes the relevant parameters of the edge detection task, and constrains the execution time of the task;
[0007] A constraint condition building module is used to establish a set of task scheduling model constraints for high-speed rail contact network defect real-time detection task scheduling requirements;
[0008] The edge device model is represented as follows:
[0009] ;
[0010] in, Represents the edge device set, the number of edge devices is ; Indicates the number edge devices;
[0011] A single edge device It is expressed as:
[0012] ;
[0013] in, Indicates The computing resources of the edge devices; express The time to read a single frame of the data stream; express The time to store the result of a single frame of data stream;
[0014] The camera device model is expressed as follows:
[0015] ;
[0016] in, Indicates the camera device used, The frame rate of the data stream collected by the camera, The time when data flow collection starts;
[0017] The time interval between frames collected by the camera device is the maximum processing time of a single-frame task in real-time detection. Under the real-time detection requirement, the latest completion time of the subtasks in the single-frame image task set cannot exceed , otherwise it will affect the processing of the next frame of the picture;
[0018] The target detection model is expressed as follows:
[0019] ;
[0020] in, Represents the target detection model ; for use Model checking The processing time required for one frame of image; To make Model checking The computing resources required for one frame of image;
[0021] The task model is expressed as follows:
[0022] ;
[0023] in, Represents the real-time task set to be detected, the number of tasks is ; Indicates the number tasks to be tested.
[0024] Furthermore, the TLFG task model (Time Less than Frame Gap) represents tasks whose model processing time is less than the data frame gap time, that is, ; For such tasks, a task allocation solution that meets real-time detection is found through scheduling.
[0025] definition is the smallest subtask to be scheduled, representing the camera device The collected data frames are used Subtasks to process; Represents a subtask The task starts at indicates the task end time, and = .
[0026] After scheduling, we get , express Edge devices at all times Is the camera detection device running? Data frame defect detection Model subtasks.
[0027] Furthermore, a set of constraints required for real-time detection of high-speed railway contact network defect task scheduling is defined, including task constraints, computing resource constraints, and real-time detection time constraints;
[0028] The task constraints are as follows:
[0029] For the models involved in the contact network defect detection task, the detection task of a single model of a single frame image cannot be distributed to multiple edge devices within a frame interval;
[0030] ;
[0031] The above definition indicates that for the models involved in the contact network defect detection task, the detection task of a single model of a single frame image is only assigned to one edge device. Indicates that in a single frame time interval, the edge device Whether to run the detection camera device Data frame defect detection Model subtask;
[0032] The computing resource constraints are as follows:
[0033] At any given moment, the resources required for the tasks executed on each edge device cannot exceed the maximum resources of the edge device;
[0034] ;
[0035] The above definition means that: at each moment, the resources required for the tasks executed on each edge device must be less than or equal to the maximum resources of the edge device;
[0036] The real-time detection time constraints are as follows:
[0037] In real-time detection, the earliest start time of each frame task must be later than the arrival time of the picture, and the latest completion time must be earlier than the arrival time of the next frame to meet the real-time requirements;
[0038] ;
[0039] ;
[0040] in, Represents the detection task The start time of That is, the earliest start time of all detection tasks for a single frame; Represents the detection task The end time of The latest completion time of all detection tasks for a single frame photo.
[0041] The above definition indicates that the starting time is zero. and the number of frames detected , we can get The input time of the frame is , then for the The time constraint of the frame image task is:
[0042] ;
[0043] ;
[0044] in: , indicating that the edge device receives the The moment of the frame, Indicates transmission delay. For the The earliest start time of all detection tasks for a frame image, For the The latest completion time of all detection tasks for a frame image.
[0045] In a second aspect, the present invention provides a method for scheduling sensing and computing collaborative real-time detection tasks based on an improved cuckoo genetic algorithm, which is implemented based on the sensing and computing collaborative high-speed railway contact network defect real-time detection task scheduling system described in the first aspect. The scheduling method includes the following steps:
[0046] Step S1: The edge device computing end receives the data frame task transmitted by the acquisition device sensing end, and performs schedulability verification to check whether the data frame task is a TLFG task;
[0047] Step S2: Based on the inspection result that the task is schedulable, the main edge device divides the detection task into multiple subtasks and obtains a subtask set ;
[0048] Step S3: In the subtask set On the basis of,the improved cuckoo genetic algorithm is used in the main edge device to obtain the,scheduling scheme to meet the constraints of the task scheduling model;
[0049] Step S4: Each edge device executes the subtask according to the scheduling scheme to obtain the final result.
[0050] Furthermore, in step S3, the task scheduling method based on the improved cuckoo genetic algorithm specifically includes:
[0051] Step S3.1: After the sensing end transmits a new task, the edge computing end divides the task into multiple subtasks and determines the encoding format of the cuckoo individual sequence according to the number of tasks in the subtask set:
[0052]
[0053] The number of tasks is , Indicates that the number The subtasks are assigned to edge devices ;
[0054] Step S3.2, initialize the population; assume that the number of nests in the population is , the number of cuckoos in each nest is , each cuckoo individual consists of Gene sequences; when initializing the population, a completely random method is used to generate gene sequences, and then randomly assigned them to cuckoo individuals; then randomly distribute the cuckoo individuals to each nest evenly; Different populations are generated by the above method, thereby obtaining different initial scheduling strategies;
[0055] Step S3.3, updating the cuckoo individuals in the nest, including selection, crossover and mutation operations; the selection operation uses roulette and binary tournament method; the crossover operation uses two-point crossover method; the mutation operation performs mutation operation on genes at a certain position other than the first gene and the last gene of the individual sequence according to the mutation probability;
[0056] The selection operation selects individuals based on fitness evaluation and real-time constraints: the cuckoo individual sequence is determined based on the real-time constraints and cuckoo individual sequences feasibility, when one is a feasible solution and the other is an infeasible solution, select the individual sequence of the feasible solution; when both individual sequences are feasible solutions, select Larger individual sequence; when both individual sequences are infeasible solutions, choose Larger sequences, and according to Criteria to determine whether to accept the infeasible solution; when the task cannot meet the real-time requirements, the algorithm will give a solution with the shortest completion time;
[0057] Step S3.4, randomly migrate and select the nests that need to be updated, using the method flight;
[0058] Step S3.5, nest replacement operation; calculate the individual fitness value of the cuckoo and update the optimal solution of the nest; wherein, randomly generate a new nest and calculate the fitness value; if the fitness value of the new nest is less than that of the original nest, retain the original nest; otherwise, determine whether to accept the new nest according to the Metropolis criterion; then evaluate all the nests in the population according to the fitness function, sort them according to the fitness value, randomly eliminate the last nest, and generate a new nest; after updating the nest, calculate the individual sequence with the highest fitness in the population and retain the result; output the optimal solution when the maximum number of iterations is reached.
[0059] Furthermore, in step S3.3, the fitness calculation function with real-time detection as the goal is:
[0060]
[0061] in, represents the target fitness value, is the latest completion time calculated by allocating tasks according to the scheduling plan of the cuckoo individual sequence; the fitness value of the cuckoo individual sequence is obtained by the above fitness function, and the fitness value of the cuckoo nest is the maximum fitness value of the gene sequence contained therein;
[0062]
[0063] in, represents a single cuckoo individual sequence, is the fitness value function of the cuckoo's nest, taking the maximum fitness value of all gene sequences it contains.
[0064] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the second aspect when executing the program.
[0065] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the second aspect.
[0066] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention decouples the detection task process for the scene of continuous shooting by the high-speed rail camera device in actual application, abstractly models the real-time defect detection problem, and analyzes it as a 0-1 optimization problem in the combinatorial optimization problem; the model is designed as a single-objective task scheduling problem, with the goal of meeting the real-time detection requirements, analyzing the constraints, and constructing a high-speed rail contact network defect detection model with sensing and computing collaboration; according to the processing time requirements brought by the shooting frame rate of the acquisition device and the characteristics of continuously outputting data streams to the edge device, a fitness evaluation function is designed; the global search capability of the Cuckoo Search (CS) algorithm and the optimization capability of the Genetic Algorithm (GA) are combined, and the combination of CS and GA is proposed to propose an improved Cuckoo Genetic Algorithm scheduling strategy (Improved Cuckoo Genetic Algorithm, CKGA), which realizes the reasonable allocation of edge device resources in the contact network defect detection scenario under the sensing and computing collaborative architecture. The present invention aims to construct a high-speed rail contact network defect real-time detection model with sensing and computing collaboration for the real-time detection scenario of high-speed rail contact network defects, and designs an improved CKGA scheduling strategy for the specific requirements of real-time detection. Experiments have proved that the sensing and computing collaborative real-time detection scheduling model for high-speed railway contact network defects and the improved cuckoo genetic algorithm scheduling strategy proposed in this paper effectively improve the task execution efficiency and edge equipment utilization in the contact network defect detection scenario, and better meet the requirements of real-time detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 Schematic diagram of the structure of the high-speed railway contact network defect real-time detection task scheduling model with sensing and computing collaboration.
[0068] Figure 2 This is the algorithm flow chart of the task scheduling strategy based on the improved cuckoo genetic algorithm. DETAILED DESCRIPTION
[0069] The overhead contact network is the only power source for high-speed rail, but it is prone to safety defects and requires regular inspections to ensure stable operation. However, due to problems such as insufficient edge device resources and too many tasks to be detected, the current inspection method lacks the ability to process in real time, making it difficult to achieve real-time detection. The present invention combines the sensing and computing collaborative framework to decouple the high-speed rail overhead contact network defect detection task, split the sub-tasks, establish a sensing and computing collaborative high-speed rail overhead contact network defect real-time detection scheduling model, design and improve the cuckoo genetic algorithm scheduling method to obtain task scheduling decisions, and reasonably schedule tasks to edge devices. The model and method provided by the present invention effectively improve the task execution efficiency and edge device resource utilization in the overhead contact network defect detection scenario, better meet the requirements of real-time detection, and realize the reasonable allocation of edge computing resources and tasks to be detected in the overhead contact network defect detection scenario under the sensing and computing collaborative architecture.
[0070] In order to make the technical solution of the present invention more clear and specific to those skilled in the art, the present invention is described in further detail below in conjunction with embodiments and drawings, but the implementation manner of the present invention is not limited thereto.
[0071] like Figure 1-Figure 2 As shown, the present invention provides a high-speed railway contact network defect real-time detection task scheduling system and method, which comprehensively considers the high-speed railway contact network defect real-time detection task running on edge devices, supports the establishment of real-time task models and the definition of real-time constraints. The method includes:
[0072] Step S1: The inspector takes the high-speed rail with the camera and edge device and deploys them at the front of the train. The edge device reads the single-frame image in the video captured by the camera as the input data of the high-speed rail contact network defect detection model;
[0073] Step S2: Read the collected single-frame image as the input data of the trained high-speed rail contact network defect detection model. The edge device decouples the detection task and divides the subtasks according to the high-speed rail contact network defect real-time detection task scheduling model. Different models to be detected are different subtasks. Finally, a subtask set is obtained;
[0074] Step S3: According to the subtask set, an improved cuckoo genetic scheduling algorithm is used to obtain a scheduling scheme that satisfies the constraints of the defect scheduling model and takes real-time detection as the goal;
[0075] Step S4: Allocate subtasks to each edge device according to the scheduling plan.
[0076] In this embodiment, step S2 specifically includes the following:
[0077] Step S21: establishing an edge device model, a camera device model, a target detection algorithm model and a task model for real-time detection of high-speed rail contact network defects; the models together constitute an efficient and accurate detection system to ensure the real-time performance of railway visual detection;
[0078] Step S22: define a set of constraints of the task scheduling model for the high-speed railway contact network defect real-time detection task scheduling requirements. The constraints ensure the rationality and efficiency of task scheduling, so that the detection work can be carried out in an orderly and efficient manner.
[0079] Further, the step S21 includes the following models: edge device model; camera device model; target detection algorithm model; task model;
[0080] The edge device model includes: edge devices,
[0081] Furthermore, a single edge device It can be expressed as:
[0082] in: Indicates The computing resources of the edge devices; express Read in The time of a single frame of the data stream; express storage The time of a single frame result of the data stream.
[0083] Camera device model: ,
[0084] in: The frame rate of the data stream collected by the camera, The time when data flow collection starts.
[0085] Further, It is the interval time between frames (unit: milliseconds), and also the maximum time for single frame processing in real-time detection.
[0086] Target detection algorithm model: ,
[0087] in: Represents the target detection model ; for use Model checking The processing time required for one frame of image; To make Model checking The computing resources required for one frame of image. In this embodiment, The detection time information is as follows:
[0088]
[0089] Mission Model:
[0090] in: Represents the real-time task set to be detected, the number of tasks is ; Indicates the number tasks to be tested.
[0091] Furthermore, the step S22 defines a set of model constraints according to the task-related constraints and the real-time detection constraints, and the step S22 includes:
[0092] Task constraints:
[0093] For the models involved in the contact network defect detection task, the detection task of a single model of a single frame image cannot be distributed to multiple edge devices.
[0094]
[0095] Computing resource constraints:
[0096] At each moment, the resources required for the tasks executed on each edge device cannot exceed the maximum resources of the edge device.
[0097]
[0098] Execution time constraints:
[0099]
[0100]
[0101] in: , indicating the The input time of the frame.
[0102] In summary, step S2 specifically includes:
[0103] The overall model of real-time detection and dispatching of high-speed rail contact network defects with sensor-computing collaboration is as follows:
[0104] Objective function:
[0105]
[0106] Time constraints:
[0107]
[0108]
[0109] Resource constraints:
[0110] For time , edge devices have:
[0111]
[0112] Task constraints:
[0113]
[0114] In this embodiment, if Figure 2 As shown, step S3 specifically includes the following:
[0115] Step S31: After the subtask set is generated, a cuckoo individual sequence is generated according to the number of tasks in the subtask set:
[0116]
[0117] Among them: The number of tasks is , Indicates that the number The subtasks are assigned to edge devices .
[0118] Step S32: Assume that the number of nests in the population is , the number of cuckoos in each nest is , each cuckoo individual consists of When initializing the population, a completely random method is used to generate gene sequences, and then randomly assigned them to cuckoo individuals; and then randomly distribute the cuckoo individuals to each nest. Different populations are generated by the above method.
[0119] Step S33: Update the cuckoo individuals in the nest, including selection, crossover and mutation operations. The selection operation uses roulette and binary tournament method. The crossover operation uses two-point crossover. The mutation operation performs mutation operation on genes at a certain position other than the first gene and the last gene of the individual sequence according to the mutation probability.
[0120] Furthermore, the selection operation selects individuals based on fitness evaluation and real-time constraints: the cuckoo individual sequence is determined based on the real-time constraints and cuckoo individual sequences feasibility, when one is a feasible solution and the other is an infeasible solution, select the individual sequence of the feasible solution; when both individual sequences are feasible solutions, select The larger individual sequence; when both individual sequences are infeasible solutions, choose Larger sequences, and according to The algorithm uses the criterion to determine whether to accept the infeasible solution. This ensures that the infeasible solution has a certain probability of being inherited, thereby increasing the probability of finding the global optimal solution. And when the task cannot meet the real-time requirements, the algorithm will give the solution with the shortest completion time.
[0121] Step S34: Randomly migrate and select the nest that needs to be updated.
[0122] Step S35: Nest replacement operation. Calculate the individual fitness values of the cuckoos and update the optimal solution of the nest. Among them, randomly generate new nests and calculate the fitness values. If the fitness value of the new nest is less than that of the original nest, the original nest is retained; otherwise, according to the Metropolis criterion, determine whether to accept the new nest. Then evaluate all the nests in the population according to the fitness function, sort them according to the fitness values, randomly eliminate the last nest, and generate a new nest. After updating the nest, calculate the individual sequence with the highest fitness in the population and retain the result. Output the optimal solution when the maximum number of iterations is reached.
[0123] In this embodiment, the optimal solution is:
[0124]
[0125] The tasks are scheduled according to the plan, and the results are as follows:
[0126] Edge device 0: {Subtask 5, Subtask 12, Subtask 15}
[0127] Edge device 1: {Subtask 1, Subtask 3, Subtask 10, Subtask 18}
[0128] Edge device 2: {Subtask 4, Subtask 6, Subtask 9, Subtask 14, Subtask 17}
[0129] Edge device 3: {Subtask 2, Subtask 11, Subtask 13}
[0130] Edge device 4: {Subtask 7, Subtask 8, Subtask 16, Subtask 19, Subtask 20}
[0131] The present invention aims to construct a real-time detection model for high-speed rail contact network defects with sensor-computing collaboration for the real-time detection scenario of high-speed rail contact network defects, and designs an improved CKGA scheduling strategy for the specific requirements of real-time detection. The proposed model and method can effectively improve the task execution efficiency and edge device utilization in the contact network defect detection scenario, better meet the requirements of real-time detection, and have good application prospects.
[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A high-speed railway contact network defect real-time detection task scheduling system with sensor-computing collaboration, characterized in that: include: The high-speed railway contact network defect real-time detection module includes an edge device model, a camera device model, a target detection model and a task model, which are used to describe the scheduling of high-speed railway contact network defect detection tasks under real-time detection requirements; wherein, the edge device model describes the relevant information and parameters of the edge device, the camera device model describes the relevant information and parameters of the camera acquisition device, the target detection model describes the model used for contact network defect detection, and the task model describes the relevant parameters of the edge detection task, and constrains the execution time of the task; A constraint condition building module is used to establish a set of task scheduling model constraints for high-speed rail contact network defect real-time detection task scheduling requirements; The edge device model is represented as follows: ; in, Represents the edge device set, the number of edge devices is ; Indicates the number edge devices; A single edge device It is expressed as: ; in, Indicates The computing resources of the edge devices; express The time to read a single frame of the data stream; express The time to store the result of a single frame of data stream; The camera device model is expressed as follows: ; in, Indicates the camera device used, The frame rate of the data stream collected by the camera, The time when data flow collection starts; The time interval between frames collected by the camera device is the maximum processing time of a single-frame task in real-time detection. Under the real-time detection requirement, the latest completion time of the subtasks in the single-frame image task set cannot exceed ; The target detection model is expressed as follows: ; in, Represents the target detection model ; for use Model checking The processing time required for one frame of image; To make Model checking The computing resources required for one frame of image; The task model is expressed as follows: ; in, Represents the real-time task set to be detected, the number of tasks is ; Indicates the number tasks to be tested.
2. The sensing and computing-coordinated high-speed railway contact network defect real-time detection task scheduling system according to claim 1 is characterized in that: The task model is the TLFG task model, which means that the model processing time is less than the data frame interval time. ; For such tasks, the system finds a task allocation solution that meets real-time detection through scheduling.
3. The sensing and computing-coordinated high-speed railway contact network defect real-time detection task scheduling system according to claim 1 is characterized in that: definition is the smallest subtask to be scheduled, representing the camera device The collected data frames are used Subtasks to process; Represents a subtask The task starts at indicates the task end time, and = .
4. The sensing and computing-coordinated high-speed railway contact network defect real-time detection task scheduling system according to claim 3 is characterized in that: After scheduling, we get , express Edge devices at all times Is the camera detection device running? Data frame defect detection Model subtasks.
5. The sensing and computing-coordinated high-speed railway contact network defect real-time detection task scheduling system according to claim 1 is characterized in that: Define a set of constraints for real-time detection of high-speed rail contact network defect task scheduling, including task constraints, computing resource constraints, and real-time detection time constraints; The task constraints are as follows: For the models involved in the contact network defect detection task, the detection task of a single model of a single frame image cannot be distributed to multiple edge devices within a frame interval; ; The above definition indicates that for the models involved in the contact network defect detection task, the detection task of a single model of a single frame image is only assigned to one edge device. Indicates that in a single frame time interval, the edge device Whether to run the detection camera device Data frame defect detection Model subtask; The computing resource constraints are as follows: At any given moment, the resources required for the tasks executed on each edge device cannot exceed the maximum resources of the edge device; ; The above definition means that: at each moment, the resources required for the tasks executed on each edge device must be less than or equal to the maximum resources of the edge device; The real-time detection time constraints are as follows: In real-time detection, the earliest start time of each frame task must be later than the arrival time of the picture, and the latest completion time must be earlier than the arrival time of the next frame to meet the real-time requirements; ; ; in, Represents the detection task The start time of That is, the earliest start time of all detection tasks for a single frame; Represents the detection task The end time of The latest completion time of all detection tasks for a single frame photo; The above definition indicates that the starting time is zero; according to and the number of frames detected , get the The input time of the frame is , then for the The time constraint of the frame image task is: ; ; in: , indicating that the edge device receives the The moment of the frame, Indicates transmission delay; For the The earliest start time of all detection tasks for a frame image, For the The latest completion time of all detection tasks for a frame image.
6. A method for scheduling real-time detection tasks based on improved cuckoo genetic algorithm, characterized in that: The method is implemented based on the sensing and computing collaborative high-speed railway contact network defect real-time detection task scheduling system described in any one of claims 1 to 5, and the method includes the following steps: Step S1: The edge device computing end receives the data frame task transmitted by the acquisition device sensing end, and performs schedulability verification to check whether the data frame task is a TLFG task; a TLFG task indicates a task whose model processing time is less than the data frame gap time; Step S2: Based on the inspection result that the task is schedulable, the main edge device divides the detection task into multiple subtasks and obtains a subtask set ; Step S3: In the subtask set On the basis of,the improved cuckoo genetic algorithm is used in the main edge device to obtain the,scheduling scheme to meet the constraints of the task scheduling model; Step S4: Each edge device executes the subtask according to the scheduling scheme to obtain the final result.
7. The method according to claim 6, characterized in that In step S3, the task scheduling method based on the improved cuckoo genetic algorithm specifically includes: Step S3.1: After the sensing end transmits a new task, the edge computing end divides the task into multiple subtasks and determines the encoding format of the cuckoo individual sequence according to the number of tasks in the subtask set: ; The number of tasks is , Indicates that the number The subtasks are assigned to edge devices ; Step S3.2, initialize the population; assume that the number of nests in the population is , the number of cuckoos in each nest is , each cuckoo individual consists of Gene sequences; when initializing the population, a completely random method is used to generate gene sequences, and then randomly assigned them to cuckoo individuals; then randomly distribute the cuckoo individuals to each nest evenly; Different populations are generated by the above method, thereby obtaining different initial scheduling strategies; Step S3.3, updating the cuckoo individuals in the nest, including selection, crossover and mutation operations; the selection operation uses roulette and binary tournament method; the crossover operation uses two-point crossover method; the mutation operation performs mutation operation on genes at a certain position other than the first gene and the last gene of the individual sequence according to the mutation probability; The selection operation selects individuals based on fitness evaluation and real-time constraints: the cuckoo individual sequence is determined based on the real-time constraints and cuckoo individual sequences feasibility, when one is a feasible solution and the other is an infeasible solution, select the individual sequence of the feasible solution; when both individual sequences are feasible solutions, select Larger individual sequences, Represents the target fitness value; when both individual sequences are infeasible solutions, choose Larger sequences, and according to Criteria to determine whether to accept the infeasible solution; when the task cannot meet the real-time requirements, the algorithm will give a solution with the shortest completion time; Step S3.4, randomly migrate and select the nests that need to be updated, using the method flight; Step S3.5, nest replacement operation; calculate the individual fitness value of the cuckoo and update the optimal solution of the nest; wherein, randomly generate a new nest and calculate the fitness value; if the fitness value of the new nest is less than that of the original nest, retain the original nest; otherwise, determine whether to accept the new nest according to the Metropolis criterion; then evaluate all the nests in the population according to the fitness function, sort them according to the fitness value, randomly eliminate the last nest, and generate a new nest; after updating the nest, calculate the individual sequence with the highest fitness in the population and retain the result; output the optimal solution when the maximum number of iterations is reached.
8. The method according to claim 7, characterized in that In step S3.3, the fitness calculation function with real-time detection as the goal is: ; in, is the latest completion time calculated by allocating tasks according to the scheduling plan of the cuckoo individual sequence; the fitness value of the cuckoo individual sequence is obtained by the above fitness function, and the fitness value of the cuckoo nest is the maximum fitness value of the gene sequence contained therein; ; in, represents a single cuckoo individual sequence, is the fitness value function of the cuckoo's nest, taking the maximum fitness value of all gene sequences it contains.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 6 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 6 to 8 are implemented.
Citation Information
Patent Citations
Improved cuckoo search algorithm based cloud computing task scheduling method and system
CN105975342A
Low-energy-consumption computing migration method for delay sensitive task of end-side cloud hybrid system
CN118450438A