A method, apparatus, equipment and medium for scheduling industrial defect detection tasks
By collecting, preprocessing, and extracting features from edge AI tasks, selecting matching computing cores, assigning priorities to tasks, and optimizing energy efficiency, the problems of unreasonable task scheduling and low energy efficiency in edge AI computing devices under a hybrid multi-core architecture are solved, achieving efficient task execution and energy consumption optimization.
Patent Information
- Application Number
- CN202511299926.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Edge AI computing devices suffer from unreasonable task scheduling, wasted computing resources, and low energy efficiency in industrial defect detection under a hybrid multi-core architecture. Existing technologies cannot adjust task allocation strategies in a timely manner, resulting in decreased task execution efficiency and increased energy consumption.
By acquiring and preprocessing data from edge AI tasks, feature extraction is performed to select matching computing cores, priorities are assigned to tasks, energy efficiency is optimized, and the load and sleep status of computing cores are dynamically adjusted to achieve efficient task scheduling.
It improves the versatility and practicality of edge AI devices, enables the reasonable allocation of tasks on a hybrid multi-core architecture, reduces system power consumption, and improves overall system performance and battery life.
Smart Images

Figure CN120780489B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, equipment and medium for scheduling industrial defect detection tasks. Background Technology
[0002] Currently, edge AI (Artificial Intelligence) computing devices often adopt a hybrid multi-core architecture that includes heterogeneous cores such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), and NPU (Neural Processing Unit). Current edge computing multi-core industrial defect detection task scheduling algorithms include: constructing task queues and core resource pools, and using deep Q-networks to learn the optimal allocation strategy between tasks and cores. However, this algorithm only considers some static features of the tasks. When faced with a large number of dynamically changing computing demands in edge AI tasks, it cannot adjust the task allocation strategy in a timely manner, leading to a decrease in task execution efficiency and unnecessary energy consumption during task execution. Based on the parallel computing model, it is assumed that the number of tasks that the MEC (Multi-access Edge Computing server) can compute simultaneously is unlimited, computing resources can be arbitrarily allocated, and tasks have exclusive access to resources. On this basis, scheduling is carried out through task priority division and resource pre-allocation strategies. However, in the actual edge AI hybrid multi-core architecture, the number of cores is limited, computing resources cannot be arbitrarily allocated, and idle resources should be reallocated after the task is completed. This leads to unreasonable task allocation, with some cores being overloaded while other cores are idle, resulting in serious waste of computing resources and low overall system energy efficiency.
[0003] As can be seen from the above, how to solve the problems of unreasonable task scheduling, waste of computing resources and low energy efficiency in industrial defect detection under the hybrid multi-core architecture of edge AI computing devices, achieve reasonable task allocation on the hybrid multi-core architecture, reduce system energy consumption and improve the overall system performance are problems to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for scheduling industrial defect detection tasks, which can solve the problems of unreasonable task scheduling, wasted computing resources, and low energy efficiency of edge AI computing devices in a hybrid multi-core architecture. This achieves reasonable task allocation on the hybrid multi-core architecture, reduces system energy consumption, and improves overall system performance. The specific solution is as follows:
[0005] Firstly, this application discloses an industrial defect detection task scheduling method, including:
[0006] An edge AI task for industrial defect detection is acquired, and data acquisition and preprocessing are performed on the edge AI task to obtain preprocessed data; the preprocessing includes size adjustment and format conversion.
[0007] Feature extraction is performed on the preprocessed data to obtain a feature vector, and a target computing core that matches the feature vector is selected from multiple computing cores; the computing core includes a central processing unit, a graphics processing unit, and a neural network processor.
[0008] Priorities are assigned to the edge AI tasks to obtain target edge AI tasks. Based on the target edge AI tasks, the energy efficiency of the target computing core is optimized to obtain an optimized computing core. The energy efficiency optimization includes efficiency optimization and voltage optimization.
[0009] The target edge AI task is added to the corresponding task queue based on priority, the optimized load parameters of the computing core are obtained, and it is determined whether the load parameters are greater than a preset threshold.
[0010] If the load parameter is greater than the preset threshold, then tasks to be scheduled are selected from the task queue, and computing cores to be scheduled are selected from the optimized computing cores.
[0011] The task to be scheduled is migrated to the computing core to be scheduled, so as to complete the scheduling of industrial defect detection tasks.
[0012] Optionally, the step of collecting and preprocessing data for the edge AI task to obtain preprocessed data includes:
[0013] Data is collected from the edge AI task to obtain task information; the task information includes task type identifier, input data size, and estimated execution time.
[0014] The image task in the edge AI task is standardized and resized, and the speech task in the edge AI task is denoised and converted in format to obtain preprocessed data.
[0015] Optionally, before performing feature extraction on the preprocessed data, the method further includes:
[0016] Deep learning models are built based on convolutional neural networks and long short-term memory networks;
[0017] The deep learning model is trained using historical task data to obtain the trained deep learning model.
[0018] The trained deep learning model is optimized using the cross-entropy loss function and the stochastic gradient descent algorithm to obtain the target deep learning model.
[0019] Optionally, the step of extracting features from the preprocessed data to obtain a feature vector includes:
[0020] The preprocessed data is input into the target deep learning model so that the target deep learning model can extract features from the preprocessed data and output a feature vector. The feature extraction includes multi-layer convolution, pooling, and iterative computation. The feature vector includes task type, computational complexity, data dependencies, and real-time requirements.
[0021] Optionally, selecting the target computing core that matches the feature vector from multiple computing cores includes:
[0022] Acquire characteristic data of multiple computing cores; the characteristic data includes computing power, processing speed, and power consumption parameters;
[0023] Based on the computing power, processing speed, and power consumption parameters, a target computing core that matches the feature vector is selected from multiple computing cores.
[0024] Optionally, obtaining the optimized load parameters of the computing core includes:
[0025] The optimized computing core is monitored in real time to obtain its load parameters, including CPU utilization, GPU memory usage, and neural network processor task queue length.
[0026] Optionally, the industrial defect detection task scheduling method further includes:
[0027] Monitor whether the computing core is idle;
[0028] If the computing core is in an idle state, then determine the idle time.
[0029] If the idle time exceeds a preset idle time threshold, a sleep mechanism is triggered, switching the computing core to sleep mode.
[0030] Secondly, this application discloses an industrial defect detection task scheduling device, comprising:
[0031] The data acquisition and preprocessing module is used to acquire edge AI tasks for industrial defect detection, and to perform data acquisition and preprocessing on the edge AI tasks to obtain preprocessed data; the preprocessing includes size adjustment and format conversion.
[0032] The feature extraction module is used to extract features from the preprocessed data to obtain feature vectors, and to select target computing cores that match the feature vectors from multiple computing cores; the computing cores include a central processing unit, a graphics processing unit, and a neural network processor.
[0033] An energy efficiency optimization module is used to assign priorities to the edge AI tasks to obtain target edge AI tasks, and to perform energy efficiency optimization on the target computing cores based on the target edge AI tasks to obtain optimized computing cores; the energy efficiency optimization includes efficiency optimization and voltage optimization.
[0034] The judgment module is used to add the target edge AI task to the corresponding task queue based on priority, obtain the optimized load parameters of the computing core, and determine whether the load parameters are greater than a preset threshold.
[0035] The task filtering module is used to filter out tasks to be scheduled from the task queue and to filter out computing cores to be scheduled from the optimized computing cores if the load parameter is greater than a preset threshold.
[0036] The industrial defect detection task scheduling module is used to migrate the task to be scheduled to the computing core to be scheduled, so as to complete the scheduling of the industrial defect detection task.
[0037] Thirdly, this application discloses an electronic device, including:
[0038] Memory, used to store computer programs;
[0039] A processor is used to execute the computer program to implement the aforementioned industrial defect detection task scheduling method.
[0040] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed industrial defect detection task scheduling method.
[0041] As can be seen, this application provides a method for scheduling industrial defect detection tasks, including acquiring edge AI tasks for industrial defect detection, performing data acquisition and preprocessing on the edge AI tasks to obtain preprocessed data; the preprocessing includes size adjustment and format conversion; extracting features from the preprocessed data to obtain feature vectors, and selecting target computing cores that match the feature vectors from multiple computing cores; the computing cores include central processing units, graphics processing units, and neural network processors; assigning priorities to the edge AI tasks to obtain target edge AI tasks, and performing energy efficiency optimization on the target computing cores based on the target edge AI tasks to obtain optimized computing cores; the energy efficiency optimization includes efficiency optimization and voltage optimization; adding the target edge AI tasks to the corresponding task queues based on priorities, acquiring the load parameters of the optimized computing cores, and determining whether the load parameters are greater than a preset threshold; if the load parameters are greater than the preset threshold, selecting tasks to be scheduled from the task queues and selecting computing cores to be scheduled from the optimized computing cores; and migrating the tasks to be scheduled to the computing cores to be scheduled to complete the scheduling of industrial defect detection tasks. This application, through data acquisition, preprocessing, and feature extraction of edge AI tasks, can accurately extract feature vectors and select target computing cores that match the feature vectors from multiple computing cores. These computing cores include central processing units (CPUs), graphics processing units (GPUs), and neural network processors (NNZs). This improves the versatility and practicality of edge AI devices. Priorities are assigned to edge AI tasks to obtain target edge AI tasks. Based on these target tasks, the energy efficiency of the target computing cores is optimized to obtain optimized computing cores. This achieves efficient matching of tasks with multiple computing cores in a hybrid multi-core architecture. Target edge AI tasks are added to corresponding task queues based on priorities. The load parameters of the optimized computing cores are checked against a preset threshold. If the threshold is exceeded, tasks to be scheduled are selected from the task queue, and computing cores to be scheduled are selected from the optimized computing cores. The tasks to be scheduled are then migrated to these optimized computing cores. This approach enables real-time response to dynamic task changes, ensuring efficient task execution. It addresses the problems of unreasonable task scheduling, wasted computing resources, and low energy efficiency in industrial defect detection tasks under a hybrid multi-core architecture for edge AI computing devices, reducing system energy consumption and improving overall system performance. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0043] Figure 1 This is a flowchart of an industrial defect detection task scheduling method disclosed in this application;
[0044] Figure 2 This application discloses the structure and a detailed flowchart of an industrial defect detection task scheduling system.
[0045] Figure 3 This is a schematic diagram of the structure of an industrial defect detection task scheduling device disclosed in this application;
[0046] Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Currently, edge AI computing devices often employ a hybrid multi-core architecture that incorporates heterogeneous cores such as CPUs, GPUs, and NPUs. Current edge computing multi-core industrial defect detection task scheduling algorithms include: building task queues and core resource pools, and using deep Q-networks to learn the optimal allocation strategy between tasks and cores. However, this algorithm only considers some static characteristics of tasks and cannot adjust the task allocation strategy in a timely manner when faced with the large number of dynamically changing computational demands in edge AI tasks, leading to decreased task execution efficiency and unnecessary energy consumption during task execution; and using a parallel computing model, assuming that the MEC server can simultaneously compute an unlimited number of tasks, that computing resources can be arbitrarily allocated, and that tasks have exclusive access to resources, scheduling is based on task priority partitioning and resource pre-allocation strategies. However, in actual edge AI hybrid multi-core architectures, the number of cores is limited, computing resources cannot be arbitrarily allocated, and idle resources should be reallocated after task completion. This leads to unreasonable task allocation, with some cores overloaded while others are idle, resulting in significant waste of computing resources and low overall system energy efficiency. As can be seen from the above, how to solve the problems of unreasonable task scheduling, waste of computing resources and low energy efficiency in industrial defect detection under the hybrid multi-core architecture of edge AI computing devices, achieve reasonable task allocation on the hybrid multi-core architecture, reduce system energy consumption and improve the overall system performance are problems to be solved in this field.
[0049] See Figure 1As shown in the figure, an embodiment of the present invention discloses an industrial defect detection task scheduling method, which may specifically include:
[0050] Step S11: Obtain the edge AI task for industrial defect detection, collect and preprocess the data of the edge AI task to obtain preprocessed data; the preprocessing includes size adjustment and format conversion.
[0051] In this embodiment, an edge AI task for industrial defect detection is acquired, and data is collected from the edge AI task to obtain task information. The task information includes task type identifier, input data size, and estimated execution time. The image task in the edge AI task is standardized and resized, and the voice task in the edge AI task is denoised and converted in format to obtain preprocessed data.
[0052] In this embodiment, after acquiring the edge AI task for industrial defect detection, the task information of the mobile phone edge AI task includes task type identifier, input data size, and estimated execution time. Simultaneously, the edge AI task undergoes preprocessing, including but not limited to standardizing and resizing image tasks, and denoising and format conversion for voice tasks, to facilitate subsequent analysis.
[0053] Step S12: Extract features from the preprocessed data to obtain feature vectors, and select target computing cores that match the feature vectors from multiple computing cores; the computing cores include central processing units, graphics processing units, and neural network processors.
[0054] In this embodiment, a deep learning model is constructed based on a convolutional neural network and a long short-term memory network; the deep learning model is trained using historical task data to obtain a trained deep learning model; the trained deep learning model is optimized using a cross-entropy loss function and a stochastic gradient descent algorithm to obtain a target deep learning model; preprocessed data is input into the target deep learning model so that the target deep learning model can extract features from the preprocessed data to output a feature vector and obtain characteristic data of multiple computing cores; based on the computing power, the processing speed, and the power consumption parameters, a target computing core matching the feature vector is selected from the multiple computing cores; the feature extraction includes multi-layer convolution, pooling, and iterative computation; the feature vector includes task type, computational complexity, data dependencies, and real-time requirements; the characteristic data includes computing power, processing speed, and power consumption parameters.
[0055] This application trains a constructed deep learning model using historical task data, employs cross-entropy loss and stochastic gradient descent to update model parameters, and periodically collects new task data for incremental training to continuously optimize the model's accuracy and adaptability, enabling it to more accurately analyze the characteristics of various edge AI tasks. Furthermore, the deep learning model in this application adopts an architecture combining CNN (Convolutional Neural Networks) and LSTM (Long Short-Term Memory). CNN is used to extract spatial features from task data such as images and speech, while LSTM is used to process task data with temporal relationships, such as text sequences in natural language processing tasks. The model's input layer receives preprocessed data, the intermediate layers extract task features through multi-layer convolution, pooling, and iterative computation, and the output layer outputs quantified feature vectors indicating task type, computational complexity, data dependencies, and real-time requirements.
[0056] In this embodiment, a dynamic task allocation algorithm is used to receive feature vectors. Combined with pre-stored characteristic data such as computing power, processing speed, and power consumption parameters of each computing core, a preliminary matching of the feature vectors and computing cores is performed. The computing cores include CPUs, GPUs, and NPUs. Target computing cores that match the feature vectors are selected from multiple computing cores. For example, if the feature vector indicates a computationally intensive AI inference task and the current NPU load is below a threshold, the feature vector is initially allocated to the NPU; if the feature vector represents a data preprocessing and control logic feature vector, it is initially allocated to the CPU.
[0057] Step S13: Assign priority to the edge AI task to obtain the target edge AI task, and optimize the energy efficiency of the target computing core based on the target edge AI task to obtain the optimized computing core; the energy efficiency optimization includes efficiency optimization and voltage optimization.
[0058] In this embodiment, based on the real-time requirements of the task (e.g., real-time monitoring tasks require millisecond-level response, while offline analysis tasks can accept minute-level latency) and its importance (e.g., critical business tasks, ordinary testing tasks), a priority is assigned to each edge AI task, dividing them into high, medium, and low priorities. Then, the target edge AI task is added to the corresponding priority queue. Target edge AI tasks in the high-priority task queue will be allocated and executed first, ensuring that real-time tasks can be processed promptly.
[0059] In this embodiment, after prioritizing edge AI tasks, corresponding energy efficiency control strategies are formulated for target edge AI tasks of different priorities, so as to optimize the energy efficiency of the target computing cores based on the energy efficiency control strategies. For example, low-priority tasks are executed in an energy-saving mode that reduces the core operating frequency and voltage; medium-priority tasks are executed with appropriate adjustments to the core operating state while ensuring timely completion of the task; high-priority tasks prioritize execution speed and only make limited energy-saving adjustments without affecting the real-time performance of the task.
[0060] The energy efficiency optimization in this application is actually a dynamic adjustment of the target computing core's state: establishing a mapping relationship between the target computing core's operating state and task priorities, and monitoring task execution progress and the target computing core's operating state in real time. When a low-priority task starts executing, the operating frequency of the corresponding target computing core is automatically reduced to 60%-70% of the standard frequency, and the voltage is reduced to 70%-80% of the standard voltage; if the priority changes during task execution (e.g., a low-priority task becomes a high-priority task), the target computing core's operating frequency and voltage are immediately restored to normal levels.
[0061] Step S14: Add the target edge AI task to the corresponding task queue based on priority, obtain the optimized load parameters of the computing core, and determine whether the load parameters are greater than a preset threshold.
[0062] In this embodiment, the target edge AI task is added to the corresponding task queue based on priority, and the optimized computing core is monitored in real time to obtain the load parameters of the optimized computing core and determine whether the load parameters are greater than a preset threshold. The load parameters include CPU utilization, GPU memory usage, and neural network processor computing task queue length.
[0063] Step S15: If the load parameter is greater than the preset threshold, then select the tasks to be scheduled from the task queue and select the computing cores to be scheduled from the optimized computing cores.
[0064] In this embodiment, the optimized computing cores are monitored in real time to obtain their load parameters. When the load parameters exceed a preset threshold (e.g., greater than 80% load), a task migration mechanism is triggered: tasks to be scheduled are selected from the task queue, and dynamically migrated to computing cores with lower loads based on the load of other cores and task adaptability. For example, computationally intensive AI inference tasks are assigned to the NPU, data preprocessing and control logic tasks are assigned to the CPU, and large-scale data parallel computing tasks are assigned to the GPU.
[0065] Step S15: Migrate the task to be scheduled to the computing core to be scheduled in order to complete the scheduling of the industrial defect detection task.
[0066] In this embodiment, during the migration of tasks to be scheduled, the execution delay caused by task migration can be reduced by caching intermediate task data and quickly restoring the task execution environment.
[0067] In addition, the industrial defect detection task scheduling method further includes: monitoring whether the computing core is in an idle state; if the computing core is in an idle state, determining the idle time in the idle state; if the idle time is greater than a preset idle time threshold, triggering a hibernation mechanism to switch the computing core to a hibernation state.
[0068] This application proposes a hibernation-wake-up mechanism. Through hardware monitoring circuitry and software monitoring programs, it monitors in real time whether the computing core is idle. When the computing core has no task to execute and the idle time exceeds a preset duration (e.g., 500 milliseconds), the hibernation mechanism is triggered, switching the computing core to a low-power hibernation state and shutting down the power to some non-essential components. When a new task is assigned to the computing core, it is quickly woken up. By preloading critical system resources and initializing the computing environment, the computing core is restored to an executable task state in the shortest possible time.
[0069] The structure and specific task scheduling process of the industrial defect detection task scheduling system in this application are as follows: Figure 2 As shown, the specific process is as follows:
[0070] Task access and feature extraction module: After acquiring the edge AI task, the module collects and preprocesses the data of the edge AI task, then extracts the feature vector through the deep learning model, and passes the feature vector to the dynamic task scheduling module and the energy efficiency optimization module at the same time.
[0071] The dynamic task scheduling module acquires feature vectors, performs preliminary matching based on the characteristic data of each computing core, and assigns priorities to edge AI tasks. Simultaneously, it transmits the task priority information to the energy efficiency optimization module, which then formulates corresponding energy efficiency control strategies.
[0072] Load monitoring and energy efficiency adjustment module: The dynamic task scheduling module monitors the load of each computing core in real time. When task migration is required, it notifies the energy efficiency optimization module of the migration plan. Based on the task migration situation, the energy efficiency optimization module adjusts the working state of the computing cores in advance, such as waking up dormant cores or increasing the core working frequency, to ensure that tasks can be migrated and executed efficiently, thereby optimizing system energy efficiency.
[0073] Feedback Optimization and Continuous Improvement Module: The energy efficiency optimization module transmits energy consumption data from the computing core and energy efficiency feedback information from task execution to the task feature analysis module and the dynamic task scheduling module. The task feature analysis module optimizes the task feature extraction model based on this feedback information, while the dynamic task scheduling module adjusts the task allocation strategy, forming a closed-loop optimization system that continuously improves the scheduling efficiency and energy efficiency of edge AI tasks.
[0074] This application constructs a deep learning-based task access and feature extraction module to accurately extract feature vectors such as task type and computational complexity. Combined with a dynamic task scheduling module and a load monitoring and energy efficiency adjustment module, it achieves efficient matching of tasks with computing cores such as CPU, GPU, and NPU in a hybrid multi-core architecture, enabling real-time response to dynamically changing task requirements. Specifically, upon acquiring an edge AI task, its key attributes can be quickly analyzed. Based on the analysis results and the current load of each computing core, the dynamic task allocation algorithm rationally distributes the task to the most suitable computing core. The load balancing mechanism continuously monitors the operating status of each core and adjusts task allocation in a timely manner, further ensuring efficient task execution.
[0075] In the comparative experiments, an edge AI device experimental platform was built, comprising an Intel Core i7 CPU, an NVIDIA Jetson AGX Xavier GPU, and a Cambricon MLU270 NPU, to simulate real-time video analysis scenarios. One hundred video streams with different resolutions and frame rates were selected as the task set. Using existing algorithms, the average task execution time was 12.5 seconds. However, this invention, through a dynamic task scheduling strategy, prioritizes computationally intensive video image inference tasks to the NPU and data preprocessing tasks to the CPU, reducing the average task execution time to 8.7 seconds, an efficiency improvement of approximately 30.4%. This is because the task scheduling strategy of this invention fully leverages the computing advantages of each core, avoiding resource waste and execution delays caused by unreasonable task allocation.
[0076] The dynamic task scheduling and energy efficiency optimization strategy of this invention can be adjusted in real time according to task characteristics and system status. Existing task scheduling methods do not fully consider the actual characteristics of edge AI hybrid multi-core architectures. This invention can achieve good adaptability when facing different types of edge AI tasks (such as speech recognition, image classification, natural language processing, etc.) and diverse hybrid multi-core architecture configurations.
[0077] Multiple experiments were conducted on edge AI devices with different configurations (including different combinations of CPUs, GPUs, and NPUs). The results show that the task scheduling and energy efficiency optimization technology of this invention can maintain a stable effect of improving task execution efficiency by 25%-35% and reducing energy consumption by 18%-22% on all devices. In contrast, the methods in existing technologies exhibit significant performance fluctuations on different devices, with some devices even experiencing a decrease in task execution efficiency and an increase in energy consumption. This fully demonstrates that the technology of this invention has good adaptability to different types of edge AI tasks and hybrid multi-core architectures, greatly improving the versatility and practicality of edge AI devices.
[0078] Based on the correlation mechanism between task priority and energy efficiency regulation, and the core sleep / wake-up strategy, this invention optimizes system energy consumption. Unlike the single hardware energy-saving method in existing technologies, this invention takes a task scheduling approach, employing an energy-saving mode that reduces the core operating frequency and voltage for low-priority tasks.
[0079] Under the same experimental platform and task set, the experimental conditions were set with the device initially at 100% battery and continuously running tasks until the battery was depleted. Using existing methods, the total device operating time was 3.2 hours, and the total energy consumption was 48W / h. This invention, by dynamically adjusting the core working state and task execution strategy, extends the total device operating time to 3.8 hours and reduces the total energy consumption to 38.4Wh, a reduction of approximately 20%. This demonstrates that this invention can effectively reduce unnecessary energy consumption and significantly extend the battery life of edge AI devices while ensuring task execution efficiency through an intelligent energy efficiency optimization mechanism.
[0080] This invention aims to address the problems of unreasonable task scheduling, wasted computing resources, and low energy efficiency in existing edge AI computing devices with hybrid multi-core architectures. By designing efficient task scheduling strategies and comprehensive energy efficiency optimization mechanisms, it achieves reasonable task allocation on hybrid multi-core architectures, fully leverages the computing advantages of each core, and improves overall system performance. Simultaneously, while ensuring task execution efficiency, it reduces system energy consumption and extends the battery life of edge AI devices, achieving a dual improvement in performance and energy efficiency.
[0081] In this embodiment, an edge AI task for industrial defect detection is acquired, and data is collected and preprocessed to obtain preprocessed data. The preprocessing includes size adjustment and format conversion. Feature extraction is performed on the preprocessed data to obtain feature vectors, and target computing cores matching the feature vectors are selected from multiple computing cores. The computing cores include a central processing unit, a graphics processing unit, and a neural network processor. Priorities are assigned to the edge AI task to obtain target edge AI tasks. Based on the target edge AI task, the energy efficiency of the target computing core is optimized to obtain optimized computing cores. The energy efficiency optimization includes efficiency optimization and voltage optimization. The target edge AI task is added to the corresponding task queue based on the priority. The load parameters of the optimized computing core are obtained, and it is determined whether the load parameters are greater than a preset threshold. If the load parameters are greater than the preset threshold, tasks to be scheduled are selected from the task queue, and computing cores to be scheduled are selected from the optimized computing cores. The tasks to be scheduled are migrated to the computing cores to be scheduled to complete the scheduling of the industrial defect detection task. This application, through data acquisition, preprocessing, and feature extraction of edge AI tasks, can accurately extract feature vectors and select target computing cores that match the feature vectors from multiple computing cores. These computing cores include central processing units (CPUs), graphics processing units (GPUs), and neural network processors (NNZs). This improves the versatility and practicality of edge AI devices. Priorities are assigned to edge AI tasks to obtain target edge AI tasks. Based on these target tasks, the energy efficiency of the target computing cores is optimized to obtain optimized computing cores. This achieves efficient matching of tasks with multiple computing cores in a hybrid multi-core architecture. Target edge AI tasks are added to corresponding task queues based on priorities. The load parameters of the optimized computing cores are checked against a preset threshold. If the threshold is exceeded, tasks to be scheduled are selected from the task queue, and computing cores to be scheduled are selected from the optimized computing cores. The tasks to be scheduled are then migrated to these optimized computing cores. This approach enables real-time response to dynamic task changes, ensuring efficient task execution. It addresses the problems of unreasonable task scheduling, wasted computing resources, and low energy efficiency in industrial defect detection tasks under a hybrid multi-core architecture for edge AI computing devices, reducing system energy consumption and improving overall system performance.
[0082] See Figure 3 As shown in the figure, an embodiment of the present invention discloses an industrial defect detection task scheduling device, which may specifically include:
[0083] The data acquisition and preprocessing module 11 is used to acquire edge AI tasks for industrial defect detection, and to perform data acquisition and preprocessing on the edge AI tasks to obtain preprocessed data; the preprocessing includes size adjustment and format conversion.
[0084] Feature extraction module 12 is used to extract features from the preprocessed data to obtain feature vectors, and to select target computing cores that match the feature vectors from multiple computing cores; the computing cores include a central processing unit, a graphics processing unit, and a neural network processor;
[0085] Energy efficiency optimization module 13 is used to assign priorities to the edge AI tasks to obtain target edge AI tasks, and to perform energy efficiency optimization on the target computing core based on the target edge AI tasks to obtain optimized computing cores; the energy efficiency optimization includes efficiency optimization and voltage optimization.
[0086] The judgment module 14 is used to add the target edge artificial intelligence task to the corresponding task queue based on priority, obtain the optimized load parameters of the computing core, and determine whether the load parameters are greater than a preset threshold.
[0087] The task filtering module 15 is used to filter out tasks to be scheduled from the task queue and to filter out computing cores to be scheduled from the optimized computing cores if the load parameter is greater than a preset threshold.
[0088] The industrial defect detection task scheduling module 16 is used to migrate the task to be scheduled to the computing core to be scheduled, so as to complete the scheduling of the industrial defect detection task.
[0089] In some specific embodiments, the data acquisition and preprocessing module 11 may specifically include:
[0090] The data acquisition module is used to acquire data from the edge AI task and obtain task information; the task information includes task type identifier, input data size, and estimated execution time.
[0091] The preprocessing module is used to standardize and resize the image task in the edge AI task, and to reduce noise and convert the format of the speech task in the edge AI task to obtain preprocessed data.
[0092] In some specific embodiments, the feature extraction module 12 may specifically include:
[0093] The deep learning model building module is used to build deep learning models based on convolutional neural networks and long short-term memory networks.
[0094] The training module is used to train the deep learning model using historical task data to obtain the trained deep learning model.
[0095] The optimization module is used to optimize the trained deep learning model using the cross-entropy loss function and the stochastic gradient descent algorithm to obtain the target deep learning model.
[0096] In some specific embodiments, the feature extraction module 12 may specifically include:
[0097] The feature vector output module is used to input preprocessed data into the target deep learning model so that the target deep learning model can extract features from the preprocessed data and output a feature vector. The feature extraction includes multi-layer convolution, pooling, and iterative computation. The feature vector includes task type, computational complexity, data dependencies, and real-time requirements.
[0098] In some specific embodiments, the feature extraction module 12 may specifically include:
[0099] The feature data acquisition module is used to acquire feature data of multiple computing cores; the feature data includes computing power, processing speed, and power consumption parameters.
[0100] The filtering module is used to filter out target computing cores that match the feature vector from multiple computing cores based on the computing power, the processing speed, and the power consumption parameters.
[0101] In some specific embodiments, the determination module 14 may specifically include:
[0102] The real-time monitoring module is used to monitor the optimized computing core in real time to obtain the load parameters of the optimized computing core; the load parameters include the CPU utilization rate, the GPU memory usage rate, and the neural network processor computing task queue length.
[0103] In some specific embodiments, the industrial defect detection task scheduling device may specifically include:
[0104] The idle state monitoring module is used to monitor whether the computing core is in an idle state;
[0105] The idle time determination module is used to determine the idle time if the computing core is in an idle state.
[0106] The hibernation mechanism trigger module is used to trigger the hibernation mechanism and switch the computing core to hibernation state if the idle time is greater than a preset idle time threshold.
[0107] Figure 4This is a schematic diagram of an electronic device provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the industrial defect detection task scheduling method performed by the electronic device disclosed in any of the foregoing embodiments.
[0108] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0109] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0110] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the industrial defect detection task scheduling method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the industrial defect detection task scheduling device from external devices, as well as data collected by its own input / output interface 25.
[0111] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0112] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the steps of the industrial defect detection task scheduling method disclosed in any of the foregoing embodiments.
[0113] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0114] The above provides a detailed description of the industrial defect detection task scheduling method, apparatus, equipment, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for scheduling industrial defect detection tasks, characterized in that, include: Acquire edge AI tasks for industrial defect detection, perform data acquisition and preprocessing on the edge AI tasks, and obtain preprocessed data. The preprocessing includes size adjustment and format conversion; Feature extraction is performed on the preprocessed data to obtain a feature vector, and a target computing core that matches the feature vector is selected from multiple computing cores; the computing core includes a central processing unit, a graphics processing unit, and a neural network processor. Priorities are assigned to the edge AI tasks to obtain target edge AI tasks. Based on the target edge AI tasks, the energy efficiency of the target computing core is optimized to obtain an optimized computing core. The energy efficiency optimization includes efficiency optimization and voltage optimization. The target edge AI task is added to the corresponding task queue based on priority, the optimized load parameters of the computing core are obtained, and it is determined whether the load parameters are greater than a preset threshold. If the load parameter is greater than the preset threshold, then tasks to be scheduled are selected from the task queue, and computing cores to be scheduled are selected from the optimized computing cores. The task to be scheduled is migrated to the computing core to be scheduled in order to complete the scheduling of industrial defect detection tasks; The energy efficiency optimization involves establishing a mapping relationship between the target computing core's working status and task priorities, and monitoring the task execution progress and the target computing core's working status in real time.
2. The industrial defect detection task scheduling method according to claim 1, characterized in that, The process of collecting and preprocessing data for the edge AI task to obtain preprocessed data includes: Data is collected from the edge AI task to obtain task information; the task information includes task type identifier, input data size, and estimated execution time. The image task in the edge AI task is standardized and resized, and the speech task in the edge AI task is denoised and converted in format to obtain preprocessed data.
3. The industrial defect detection task scheduling method according to claim 1, characterized in that, Before performing feature extraction on the preprocessed data, the method further includes: Deep learning models are built based on convolutional neural networks and long short-term memory networks; The deep learning model is trained using historical task data to obtain the trained deep learning model. The trained deep learning model is optimized using the cross-entropy loss function and the stochastic gradient descent algorithm to obtain the target deep learning model.
4. The industrial defect detection task scheduling method according to claim 3, characterized in that, The step of extracting features from the preprocessed data to obtain feature vectors includes: The preprocessed data is input into the target deep learning model so that the target deep learning model can extract features from the preprocessed data and output a feature vector. The feature extraction includes multi-layer convolution, pooling, and iterative computation. The feature vector includes task type, computational complexity, data dependencies, and real-time requirements.
5. The industrial defect detection task scheduling method according to claim 1, characterized in that, The step of selecting a target computing core that matches the feature vector from multiple computing cores includes: Acquire characteristic data of multiple computing cores; the characteristic data includes computing power, processing speed, and power consumption parameters; Based on the computing power, processing speed, and power consumption parameters, a target computing core that matches the feature vector is selected from multiple computing cores.
6. The industrial defect detection task scheduling method according to claim 1, characterized in that, The process of obtaining the optimized load parameters of the computing core includes: The optimized computing core is monitored in real time to obtain its load parameters, including CPU utilization, GPU memory usage, and neural network processor task queue length.
7. The industrial defect detection task scheduling method according to any one of claims 1 to 6, characterized in that, Also includes: Monitor whether the computing core is idle; If the computing core is in an idle state, then determine the idle time. If the idle time exceeds a preset idle time threshold, a sleep mechanism is triggered, switching the computing core to sleep mode.
8. An industrial defect detection task scheduling device, characterized in that, include: The data acquisition and preprocessing module is used to acquire edge AI tasks for industrial defect detection, and to perform data acquisition and preprocessing on the edge AI tasks to obtain preprocessed data. The preprocessing includes size adjustment and format conversion; The feature extraction module is used to extract features from the preprocessed data to obtain feature vectors, and to select target computing cores that match the feature vectors from multiple computing cores; the computing cores include a central processing unit, a graphics processing unit, and a neural network processor. An energy efficiency optimization module is used to assign priorities to the edge AI tasks to obtain target edge AI tasks, and to perform energy efficiency optimization on the target computing cores based on the target edge AI tasks to obtain optimized computing cores; the energy efficiency optimization includes efficiency optimization and voltage optimization. The judgment module is used to add the target edge AI task to the corresponding task queue based on priority, obtain the optimized load parameters of the computing core, and determine whether the load parameters are greater than a preset threshold. The task filtering module is used to filter out tasks to be scheduled from the task queue and to filter out computing cores to be scheduled from the optimized computing cores if the load parameter is greater than a preset threshold. An industrial defect detection task scheduling module is used to migrate the task to be scheduled to the computing core to be scheduled, so as to complete the scheduling of industrial defect detection tasks. The energy efficiency optimization involves establishing a mapping relationship between the target computing core's working status and task priorities, and monitoring the task execution progress and the target computing core's working status in real time.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the industrial defect detection task scheduling method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the industrial defect detection task scheduling method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Task processing method of artificial intelligence processor, storage medium and electronic equipment
CN120066806A
Computing resource optimization method and system for analyzing tasks
CN120256087A