Intelligent camera unloading system based on task complexity self-adaption and optimization method thereof
By using an adaptive intelligent camera offloading system, which optimizes edge resource allocation through task complexity modeling and PSO algorithm, the problem of limited computing power of camera devices is solved. This achieves efficient image processing task offloading, reduces latency and energy consumption, and is suitable for scenarios such as intelligent transportation and park security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-10
AI Technical Summary
Existing camera devices have limited computing power and scarce network transmission and edge computing resources when processing high-definition video streams. This makes it impossible to accurately judge the actual complexity of image tasks, resulting in local execution overload or resource waste, and failing to meet the differentiated business needs in terms of latency and energy consumption.
By using a task complexity-adaptive intelligent camera unloading system, which combines a task complexity modeling module, an unloading decision module, an edge resource scheduling module, and a dynamic weight adjustment module with the PSO algorithm, edge computing resources are dynamically allocated to achieve a flexible unloading strategy and optimize the unloading decision for image processing tasks.
It significantly reduces image processing latency and camera power consumption, enables efficient scheduling of edge computing resources, supports personalized offloading decisions for different business scenarios, and is suitable for complex edge computing scenarios such as intelligent transportation, park security, and industrial vision.
Smart Images

Figure CN121644672A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to an unloading system and an optimization method thereof, in particular to a camera intelligent unloading system and an optimization method thereof for real-time estimation of image processing task complexity, optimal allocation of edge computing capability under resource limited conditions and self-adaptation based on task complexity. BACKGROUND
[0002] With the development of urban intelligent construction, intelligent cameras deployed in traffic intersections, streets, parks and other areas need to process high-definition video streams in real time, and perform computationally intensive tasks such as license plate recognition, face detection, behavior analysis, etc. However, the computing capability of the camera device itself is limited, and the network transmission and edge computing resources are also scarce resources. Current task unloading methods mostly rely on fixed unloading rules based on image size or task type, which cannot accurately judge the actual complexity of image tasks, resulting in: (1) local overload or high energy consumption; (2) invalid unloading or resource waste; (3) unable to meet the differentiated needs of delay or energy consumption. SUMMARY
[0003] In view of the above problems, the main purpose of the present application is to provide a camera intelligent unloading system and an optimization method thereof for real-time estimation of image processing task complexity, optimal allocation of edge computing capability under resource limited conditions and self-adaptation based on task complexity.
[0004] The present application solves the above technical problems by the following technical solutions: a camera intelligent unloading system based on task complexity self-adaptation, the main control process of the camera intelligent unloading system based on task complexity self-adaptation is initiated by the intelligent camera every task generation period, the front-end camera is responsible for initiating task complexity perception; unloading decision is made on the camera side; once it is decided to unload, the MEC server is responsible for execution + scheduling; the weight adjustment can be determined by user or system preset parameters, which affects the unloading strategy; PSO algorithm as the hub, scheduling MEC computing power resources; each component information is communicated and parameter synchronized through wireless link and local API.
[0005] The camera intelligent unloading system based on task complexity self-adaptation comprises: A task complexity modeling module is used to extract multiple complexity functions in camera image processing tasks and construct a combined model.
[0006] An unloading determination module is used to determine whether to execute unloading based on calculation delay and energy consumption cost.
[0007] An edge resource scheduling module is used to perform dynamic allocation of computing resources for candidate unloading tasks using a particle swarm optimization algorithm.
[0008] Dynamic weight adjustment module: used to adjust the priority parameters of delay and energy consumption according to user business requirements, to realize flexible offloading strategy.
[0009] Intelligent camera terminal: used for video acquisition, task initiation, local calculation / judgment.
[0010] MEC edge computing node module: processing image tasks of camera offloading, providing computing resources.
[0011] Wireless communication link: responsible for data transmission between camera and MEC.
[0012] Optical fiber wired link: supporting MEC node interconnection or migration to the cloud.
[0013] In the specific implementation case of the application, the intelligent camera terminal: acquires images, performs local complexity analysis, calls the offloading decision module, and uploads the task if the conditions are met; the intelligent camera terminal has preliminary local computing capability.
[0014] Task complexity modeling module: extracts O(n 2 ), O(n 3 ) and other complexity sub-tasks involved in the image task; combines to form the total complexity index; quantifies the "light and heavy" of the task and provides the basis for offloading decision.
[0015] In the specific implementation case of the application, the offloading decision module: based on the delay and energy consumption model, deduces the offloading critical point; compares the local cost and the offloading cost; outputs whether the task needs to be offloaded; Wireless communication link: carrying the uploading of task data; modeling uses real channel characteristics such as Rayleigh channel and Shannon formula; is one of the main factors affecting delay and energy consumption.
[0016] In the specific implementation case of the application, the MEC server: receives the offloaded task; calls the PSO optimization module to schedule resources; actually completes the task calculation and returns the result; Edge resource scheduling module: dynamically allocates computing power according to the task complexity and resource status using particle swarm optimization algorithm; controls the CPU time / frequency occupied by each task; avoids uneven allocation of computing power, congestion or inefficiency.
[0017] In the specific implementation case of the application, the dynamic weight adjustment module: the user can adjust the priority of delay vs. energy consumption; different tasks can load different offloading strategies; enhance the business adaptability of the offloading system.
[0018] An optimization method of a camera intelligent offloading system based on task complexity self-adaptation, the optimization method of the camera intelligent offloading system based on task complexity self-adaptation comprises the following steps: Step 1, collect the feature parameters of the current image processing task of the camera, extract a plurality of typical complexity functions involved in the task, construct a combined complexity model, and calculate the total complexity index of the task under the unit input data volume, to provide a basis for unloading judgment.
[0019] Step 2, based on the constructed complexity model, combining the local computing capability of the camera, the resource state of the edge server, and the quality of the wireless link, the time delay and energy consumption of local execution and offloading execution are calculated respectively, and the offloading critical point is derived through the offloading advantage and disadvantage interpolation function to judge whether to offload the task.
[0020] Step 3, when it is judged that the task needs to be offloaded, the edge resource scheduling module is started, and the particle swarm optimization algorithm is used to minimize the total cost of the system, and the resource dynamic allocation is performed on multiple camera tasks, and the optimal calculation frequency / power allocation scheme is output.
[0021] Step 4, according to the task type and business demand, set the delay weight α and the energy consumption weight β, adjust the priority of the system offloading strategy. Increase the value of α for time delay sensitive tasks, and increase the value of β for energy consumption sensitive devices, to realize the individualized adaptation of the offloading strategy.
[0022] Step 5, after the MEC server completes the image processing task, the result is returned to the camera terminal; the system records the task execution delay and energy consumption index, which is used for adaptive adjustment and experience optimization of subsequent task offloading parameters.
[0023] In the specific implementation case of the present application, the specific steps of step 1 include: Step 101, the camera collects the image task and extracts the key processing link of the task; Match the complexity function corresponding to each subtask; According to the proportion of each subtask ; unit input size ; complexity function, construct a combined complexity model: Among them, is the weight of the th complexity subtask, that is, the proportion of workload; Step 102, the data volume can be expressed as the product of the number of bytes of unit input data and the input size, so the formula of the data volume is: Among them, represents the data volume of the th camera, wherein S is the number of bytes of unit input data; Step 103, is the CPU cycle coefficient corresponding to the complexity of the processing unit task, and thus the number of cycles can be obtained The product of the CPU cycle coefficient corresponding to the complexity of the processing unit task and the complexity, and the formula is as follows: Step 104, using the complexity output by the model as an input parameter for task offloading determination.
[0024] In the specific implementation case of the application, step 2 includes: Step 201, the local calculation When the camera processes its computing task locally, the calculation delay depends on its own computing capability; for the camera, the local calculation delay for processing the task is: wherein, is the frequency of the camera, in Hz, The local power consumption model uses the classic CMOS dynamic power consumption model, and the camera The energy consumption for local calculation is: wherein, represents a constant determined by capacitance, voltage, etc., and is generally between and Step 202, the edge server calculation In the application, the size of the calculation result is much smaller than the size of the input data, and the time delay for receiving the calculation result can be ignored; in this case, the total time delay specifically includes the uplink transmission time delay and the calculation task execution time delay; When the camera offloads the task to the edge server calculation, the uplink transmission time expression is: Therefore, the total time delay of the camera is: wherein, represents the computing resource allocated by the MEC server to the camera , and the definition is the total computing resource of the server m, and thus ; represents the wireless transmission rate between the camera to which the calculation task belongs and the server; the energy consumption of the camera task offloading mainly comes from the energy consumption in the process of offloading data to the edge server, that is: wherein, is the wireless transmission power of the user; Step 203, design a set of offloading decision mechanism and resource allocation algorithm, minimize the total system overhead under the guarantee of task execution delay constraint; the channel overhead is expressed as the weighted sum of delay and energy consumption, so The expression is: Since each task can be executed locally or on the MEC server, the local channel overhead of camera i is: The offloading channel overhead of camera i is expressed as: where and respectively represent the weight factors of energy consumption and delay, representing the importance of energy consumption and delay for the current task, and satisfying the constraint condition ; to meet the requirements of specific users, the camera is allowed to select different weights for decision-making; Step 204, derive the offloading critical point: we define an "offloading advantage interpolation function": Then the critical point satisfies and is the optimal MEC allocation at a given There are two unknown variables: and ; therefore, two equations need to be solved simultaneously: Offloading decision equation: ; MEC resource optimal condition (KKT condition / partial derivative is zero): Then solve the simultaneous equations (A) and (B) to get ; Substitute the offloading cost Offloading cost: Take the partial derivative of (KKT condition): Obviously, the derivative only takes value at the boundary condition (because it is always negative), so is monotonically decreasing with Therefore, the optimal value of the MEC allocating resources is: As large as possible under resource constraints, that is, Determined by system constraints. Need to solve simultaneously by Lagrange. Algorithm implementation suggestions (numerical solutions) can be solved using a double-layer optimization structure .
[0025] In a specific implementation case of the present application, the specific steps of step 4 include: Step 401, introduce adjustable weight parameters for offloading decision cost function (delay), (power consumption) Step 402, users or systems can set different weights according to business needs: Real-time scenario: set a larger , to ensure low latency; Low-power consumption scenario: set a larger , to reduce power consumption; Step 403, adjust the form of the cost function: ; And meet the constraint condition ; Step 404, the weight parameter can be dynamically bound to the task category or preset through a strategy table.
[0026] In a specific implementation case of the present application, the specific steps of step 5 include: Step 501, after the MEC processing is completed, the processing result is returned to the front-end camera (the data volume is small, and the delay can be ignored); Step 502, the camera records the delay and power consumption of this task offloading; Step 503, update the task database for experience optimization of subsequent offloading decision strategies; Step 504, a machine learning model can be further introduced to improve future decision accuracy.
[0027] The positive progress effect of the present application is that the camera intelligent offloading system and optimization method based on task complexity self-adaptation provided by the present application have the following advantages: 1. Compared with the traditional fixed task type offloading method, the present method can determine whether to offload according to the real-time task complexity; 2. Significantly reduces image processing delay and camera power consumption; 3. Achieve efficient scheduling of edge computing resources; 4. Support personalized offloading decisions for different business scenarios; 5. It can be widely applied to intelligent transportation, park security, industrial vision and other complex edge computing scenarios. BRIEF DESCRIPTION OF DRAWINGS
[0028] Figure 1 It is the overall system structure diagram of the application.
[0029] Figure 2 It is the task offloading decision flowchart of the application.
[0030] Figure 3 It is the offloading critical point derivation logic diagram of the application.
[0031] Figure 4 It is the pso optimization flowchart of the application.
[0032] Figure 5-1 It is the n^2 threshold delay energy consumption diagram of the application.
[0033] Figure 5-2 It is the n^3 threshold delay energy consumption diagram of the application.
[0034] Figure 6 It is the local VS threshold offloading delay diagram of the application.
[0035] Figure 7 It is the local VS threshold offloading energy consumption diagram of the application.
[0036] Figure 8 It is the delay comparison diagram of three resource allocation modes based on particle swarm optimization (PSO) strategy, equal proportion allocation strategy and random allocation strategy.
[0037] Figure 9 It is the comparison effect of three allocation strategies under the normalized total cost index. DETAILED DESCRIPTION
[0038] The preferred embodiments of the application are described below in combination with the drawings to specifically describe the technical solutions of the application.
[0039] Figure 1 It is the overall system structure diagram of the application. As shown in Figure 1 The main control flow of the camera intelligent offloading system based on task complexity adaptation proposed by the application is initiated by the intelligent camera every task generation period. The front-end camera is responsible for initiating task complexity perception. Offloading decision is made on the camera side. Once it is decided to offload, the MEC server is responsible for execution + scheduling. The weight adjustment can be determined by user or system preset parameters, which affects the offloading strategy. The PSO algorithm serves as the hub to schedule MEC computing power resources. The component information communicates and synchronizes parameters through wireless link and local API.
[0040] The application provides a camera intelligent unloading system based on task complexity self-adaption, which comprises: A task complexity modeling module is used for extracting a plurality of complexity functions in a camera image processing task and constructing a combined model. An unloading judgment module is used for deriving an unloading critical point and judging whether to execute unloading based on calculation delay and energy consumption cost. An edge resource scheduling module is used for dynamically allocating calculation resources to the candidate unloading task by using a particle swarm optimization algorithm. A dynamic weight adjustment module is used for adjusting priority parameters of delay and energy consumption according to user service requirements, so as to realize a flexible unloading strategy. An intelligent camera terminal is used for video acquisition, task initiation and local calculation / judgment. An MEC edge calculation node module is used for processing image tasks of the camera unloading and providing calculation resources. A wireless communication link is responsible for data transmission between the camera and the MEC. An optical fiber wired link (MEC-MEC or MEC-cloud) supports MEC node interconnection or migration to the cloud.
[0041] An intelligent camera terminal is used for acquiring images, performing complexity analysis locally, calling the unloading judgment module, and uploading the task if the conditions are met.
[0042] A task complexity modeling module (internal to the camera) is used for extracting O(n 2 ), O(n 3 ) and other complexity subtasks involved in the image task, combining to form a total complexity index, and quantifying the task "lightness" to provide a basis for unloading decision.
[0043] An unloading judgment module (camera terminal or embedded chip) is used for deriving an unloading critical point based on a delay and energy consumption model, comparing "local cost" and "unloading cost", and outputting whether the task needs to be unloaded.
[0044] A wireless communication link (camera ↔ MEC) is used for uploading task data, and real channel characteristics such as Rayleigh channel and Shannon formula are used for modeling.
[0045] An MEC server (edge calculation node) is used for receiving the unloading task, calling a PSO optimization module to schedule resources, and actually completing task calculation and returning the result (backhaul delay is ignored).
[0046] An edge resource scheduling module (running on the MEC side) is used for dynamically allocating computing power according to task complexity and resource conditions by using a particle swarm optimization algorithm, controlling CPU time / frequency occupied by each task, and avoiding uneven allocation of computing power, congestion or inefficiency.
[0047] Dynamic weight adjustment module (deployed in MEC or user control interface): user can adjust the priority of latency vs energy consumption; different tasks can load different offloading strategies (e.g. monitoring video vs real-time face recognition); enhance the traffic adaptability of the offloading system.
[0048] Optical fiber wired link (MEC ↔ MEC or cloud): support subsequent scalable task migration to more powerful nodes; alternative path for large-scale task scheduling.
[0049] The application also proposes an optimization method of a camera intelligent offloading system based on task complexity adaptation, as follows: Step 1, collect the characteristic parameters of the current image processing task of the camera, extract multiple typical complexity functions (such as etc.) involved in the task, construct a combined complexity model, and calculate the total complexity index of the task under unit input data volume, to provide a basis for offloading decision; Step 2, based on the constructed complexity model, combined with the local computing capability of the camera, the resource state of the edge server, the quality of the wireless link (such as Rayleigh fading model), etc., the latency and energy consumption of local execution and offloading execution are calculated respectively, and the offloading critical point is derived through the offloading advantage and disadvantage interpolation function to judge whether to offload the task.
[0050] Step 3, when it is determined that the task needs to be offloaded, start the edge resource scheduling module, use the particle swarm optimization (PSO) algorithm, and minimize the total cost (delay + energy consumption weighted sum) as the target to dynamically allocate resources to multiple camera tasks, and output the optimal computing frequency / power allocation scheme; Step 4, according to the task type and business demand, set the delay weight α and the energy consumption weight β, adjust the priority of the system offloading strategy. Increase the value of α for latency-sensitive tasks (such as target recognition), and increase the value of β for energy-sensitive devices (such as low-power terminals), to realize personalized adaptation of the offloading strategy; Step 5, after the MEC server completes the image processing task, the result is returned to the camera terminal; the system records the task execution latency and energy consumption index for subsequent adaptive adjustment and experience optimization of task offloading parameters.
[0051] Collect the characteristic parameters of the current image processing task of the camera, extract multiple typical complexity functions (such as etc.) involved in the task, construct a combined complexity model, and calculate the total complexity index of the task under unit input data volume, to provide a basis for offloading decision.
[0052] The specific steps of step 1 include: Step 101: The camera acquires images and extracts the key processing steps of the task (such as face detection, target tracking, etc.). Match the corresponding complexity function to each subtask (e.g.) wait); Based on the proportion of each subtask Unit input size Complexity function, constructing a combinatorial complexity model: in, It is the first The weight of each complex subtask, i.e., the proportion of workload; Step 102: The data volume can be expressed as the product of the number of bytes per unit of input data and the input size. Therefore, the formula for the data volume is: in, Indicates the first The data volume of each camera, where S is the number of bytes of data per unit input; Step 103 It is the CPU cycle coefficient corresponding to the unit task complexity, from which the number of cycles can be obtained. The formula for the product of the CPU cycle time coefficient and the complexity of a unit task is as follows: Step 104: Use the complexity output by the model as the input parameter for the task unloading decision.
[0053] Step 2 includes the following specific steps: Step 201, Local Computation: When the camera processes its computational tasks locally, the computation latency depends on its own computing power. For the camera, the local computation latency for processing tasks is: in, It refers to the camera's clock speed, measured in Hz. The local power consumption model uses the classic CMOS dynamic power consumption model, and can also obtain data from the camera. The energy consumption for local computation is: in, Represents constants determined by capacitance, voltage, etc., generally in between; Step 202, the edge server calculates in the application, the size of the calculation result is much smaller than the size of the input data, and the time delay of receiving the calculation result can be ignored; in this case, the total time delay specifically includes uplink transmission time delay and calculation task execution time delay; When the camera offloads tasks to the edge server for calculation, the uplink transmission time expression is: Therefore, the total time delay of the camera is: Among them, represents the computing resources allocated by the MEC server to the camera , and the definition is the total computing resources of the server m, so ; represents the wireless transmission rate between the camera to which the calculation task belongs and the server; the energy consumption of the camera task offloading mainly comes from the energy consumption in the process of offloading data to the edge server, that is: Among them, is the wireless transmission power of the user; Step 203, design a set of offloading decision mechanism and resource allocation algorithm, minimize the total system overhead under the constraint of task execution time delay; the channel overhead is expressed as the weighted sum of time delay and energy consumption, so The expression is: Since each task can be executed locally or on the MEC server, the local channel overhead of the camera i is: The offloading channel overhead of the camera i is expressed as: Among them and respectively represent the weight factors of energy consumption and time delay, representing the importance of the current task to energy consumption and time delay, and satisfying the constraint condition ; in order to meet the requirements of a specific user, the camera is allowed to select different weights for decision-making. For example, the camera with energy priority will select a larger to save more energy. At the same time, when the camera is executing some application programs sensitive to time delay, such as target detection, it is better to use a larger to minimize the time delay.
[0054] Step 204, Deriving the unloading critical point: We define a "unloading merit interpolation function": Then the critical point satisfies and is the optimal MEC allocation when given There are two unknown variables: and Therefore, we need to solve two equations simultaneously: Unloading decision equation: MEC resource optimization condition (KKT condition / partial derivative is zero): Then solve the simultaneous equations (A) and (B) to get .
[0055] Substitute the unloading cost Unloading cost: Take the partial derivative of (KKT condition): Obviously, the derivative only takes value at the boundary condition (because it is always negative), so Monotonically decreasing in Therefore, the optimal value of MEC resource allocation is: As large as possible under resource constraints, i.e. Determined by system constraints. Need to solve simultaneously by Lagrange; Algorithm implementation suggestion (numerical solution) can be solved by double-layer optimization structure .
[0056] Step 3 includes the following steps: Step 301, decision variable design Step 302, fitness function design (core) According to the defined unloading merit interpolation function: We set the optimization goal as: Step 303, numerical range suggestion (adjustable) Step 304, Convergence criterion If , consider that the offloading boundary point is found, and a reasonable resource allocation scheme is also found.
[0057] Step 305, 1. Input: task list , each task contains parameters .
[0058] Output: optimal allocation of resources , total cost .
[0059] 2. Initialize particle swarm parameters: set the number of particles , the maximum number of iterations , inertia weight , learning factor .
[0060] Set the frequency range , total resource limit 3. Calculate the pre-processing amount of each task: , , Initialize the position and velocity of particles, all in .
[0061] 4. Calculate the fitness (total cost) of each particle Figure 4 : If a particle violates the resource constraint , the penalty value is Otherwise, calculate the normalized total cost: Record the current individual optimal position and global optimal For each round of iteration to : For each particle to : Update the speed: Update the position: and constrain it to If the new position is better, update the individual optimal and global optimal Output the global optimal solution Calculate the final task index: As above Update Synchronize step 4 Return the optimized task table and convergence curve.
[0062] The specific steps of step 4 include: Step 401, introduce adjustable weight parameters for offloading decision cost function (delay), (energy consumption) Step 402, users or systems can set different weights according to business needs: Real-time scenarios (such as video conferencing): set a larger , to ensure low latency; Low-power scenarios (such as security devices): set a larger , to reduce energy consumption; Step 403, adjust the form of the cost function: And meet the constraint condition Step 404, the weight parameter can be dynamically bound to the task category or preset through the strategy table.
[0063] The specific steps of step 5 include: Step 501, after MEC processing is completed, the processing result is returned to the front-end camera (small data volume, delay can be ignored); Step 502, the camera records the delay and energy consumption of this task offloading; Step 503, update the task database for subsequent experience optimization of offloading decision strategy; Step 504, machine learning models can be further introduced to improve future decision accuracy.
[0064] The following is a specific example: The task complexity modeling module in the application extracts multiple complexity functions in the image task and combines them to form the total complexity; suppose there are cameras in the system, and there are M MEC nodes along the road, each MEC node is equipped with a MEC server, and the two are connected through a fiber optic wired link. The set of MECs is , and the set of cameras is Each camera periodically generates a heterogeneous task The task generated is composed of multiple different time complexity functions. Among them , represents a complexity function. The number of data bytes input per complexity unit, among them is the number of data bytes with a complexity of , unit: B. is the maximum delay time of the task, unit: . Combined with the road communication environment, the wireless link is modeled by Rayleigh fading channel, and the energy consumption and delay constraint are considered in the optimization target at the same time, which is more in line with the actual working condition compared with the ideal channel assumption of traditional MEC. According to Shannon formula, the transmission rate of the upload link can be calculated as: (1) In the formula, , represents the size of the channel bandwidth, , represents the transmission power of the camera, , represents the channel gain between the camera and the MEC server, , represents the transmission noise of the wireless channel. The channel attenuation model is , where is the distance between each camera and the center of the MEC, and the channel gain between them is .
[0065] The data volume can be represented as the product of the number of bytes per input data and the input size, so the formula of the data volume is: (2) Among them, , represents the data volume of the th camera.
[0066] The total number of CPU cycles is due to the fact that the task is not of a single complexity, but is composed of multiple complexities. Therefore, the complexity of the task is defined as formula (3): (3) Among them, is the weight of the th complexity subtask, that is, the proportion of workload.
[0067] is the CPU cycle coefficient corresponding to the processing of unit task complexity, so the number of cycles is the product of the CPU cycle coefficient corresponding to the processing of unit task complexity and the complexity, and the formula is as follows: (4) The task complexity modeling module includes local calculation and edge server calculation.
[0068] (1) Local computation When the camera processes its computing task locally, the computing latency depends on its own computing capability. For the camera, the local computation latency of processing a task is: (5) where, is the clock frequency of the camera, in Hz, The local power consumption model uses the classic CMOS dynamic power consumption model, which can also obtain the camera The energy consumption of local computation is: (6) where, represents a constant determined by capacitance, voltage, etc., generally in .
[0069] (2) Edge server computation In the application, the size of the computing result is much smaller than the size of the input data, and the latency of receiving the computing result can be ignored. In this case, the total latency specifically includes the uplink transmission latency and the computing task execution latency.
[0070] When the camera offloads the task to the edge server for computation, the uplink transmission time expression is: (7) Therefore, the total latency of the camera is: (8) where, represents the computing resources allocated by the MEC server to the camera , and the total computing resources of the server are defined as m , so ; represents the wireless transmission rate between the camera to which the computing task belongs and the server. The energy consumption of the camera task offloading mainly comes from the energy consumption in the process of offloading data to the edge server, that is: (9) where, is the user's wireless transmission power.
[0071] The goal of this study is to design a set of offloading decision mechanism and resource allocation algorithm to minimize the total system overhead under the constraint of task execution latency. The channel overhead is expressed as the weighted sum of latency and energy consumption, so The expression is: (10) Since each task can be executed on the local or MEC server, the local channel overhead of camera i is: (11) The offloading channel overhead of camera i is represented as: (12) where and represent the weight factors of energy consumption and latency, respectively, representing the importance of energy consumption and latency for the current task, and satisfying the constraint condition To meet the requirements of specific users, the camera is allowed to select different weights for decision-making. For example, a camera with energy priority will choose a larger to save more energy. At the same time, when the camera is executing some applications sensitive to latency, such as target detection, it is better to use a larger to minimize latency.
[0072] The offloading decision module in the present application derives the offloading critical point based on the calculation of delay and energy consumption cost; Your two consecutive decision variables are: : the size of the task; : the resources allocated by the MEC.
[0073] Objective: minimize the difference between offloading cost and local cost under the constraint condition .
[0074] We define an "offloading merit interpolation function": Then the critical point satisfies and is the optimal MEC allocation given There are two unknown variables: and Therefore, two equations need to be solved simultaneously: Offloading decision equation: MEC resource optimization condition (KKT condition / partial derivative is zero): Then solve the simultaneous equations (A) and (B) to get .
[0075] Substitute the uninstall cost Uninstall cost: For Partial derivative (KKT condition): Obviously, the derivative only takes value at the boundary condition (because it is always negative), so Monotonic decrease in Therefore, the optimal value of MEC resource allocation is: As large as possible under resource constraints, that is, Determined by system constraints. Need to solve simultaneously by Lagrange.
[0076] Algorithm implementation suggestion (numerical solution) Can be solved by double-layer optimization structure Use complexity decision algorithm + particle swarm optimization (PSO) joint optimization: Search (Task size, determine whether offloading is cost-effective) Search (Computing resources used for offloading) The present application also includes decision variable design, which includes fitness function design, numerical range suggestion, convergence criterion. Table 1 Decision variable table Fitness function design (core) According to the interpolation function defined by you to evaluate the pros and cons of offloading: We set the optimization goal as: Algorithm flow: Numerical range suggestion (adjustable) Table 2 Simulation numerical table Convergence criterion If , it is considered that the offloading boundary point has been found, and a reasonable resource allocation scheme has also been found.
[0077] Figure 5-1 The n^2 threshold value delay energy consumption diagram of the present application,Figure 5-2 The figure is a n^3 threshold value delay energy consumption diagram of the application. Experimental results show that when the task size is small (such as n<782), local computing is more energy-saving than unloading mode due to short time consumption and low energy consumption. MEC unloading needs to consume upload power, resulting in high energy consumption. When the task size increases (n>782), the energy consumption of local computing increases quadratically and gradually exceeds the energy consumption of unloading. MEC unloading has obvious advantages in large task scenarios due to its relatively flat energy consumption growth. The measured results show that the critical point is n=782.15, and the energy consumption of the two modes is equivalent (about 5.34 joules), which can be used as an unloading energy consumption threshold. When the task size is small (n<982), local execution is faster due to no transmission process. Although MEC has higher computing power, the transmission delay makes the overall delay slightly higher. When the task size is large (n>982), the total delay of MEC processing increases more slowly, which is better than local execution. The critical point is n=982.17, at which the delay of the two is equal (about 4.46 seconds), which can be used as a reference basis for delay-aware unloading.
[0078] To comprehensively evaluate the influence of the task unloading mechanism based on the threshold strategy on the system performance, this paper compares and analyzes the performance of local computing and unloading strategy in the multi-user scenario from two key indicators of computing delay and energy consumption, as shown in Figure 6 and Figure 7 .
[0079] In terms of delay (see Figure 6 ), the experimental results show that compared with local computing, unloading to the edge server can significantly reduce the task response time for most users. The local computing delay curve fluctuates greatly as a whole, and the peak value of some users (such as users 1, 35, and 42) is close to or exceeds 2 seconds, reflecting the insufficient processing capacity of terminal devices under high load or complex tasks. The threshold unloading delay is always at a low level with small fluctuation range, showing good stability and consistency. This shows that the edge unloading strategy has obvious advantages in improving task response efficiency and ensuring service quality.
[0080] In terms of energy consumption (see Figure 7 ), the unloading strategy also performs well. Local computing consumes a large amount of terminal computing resources, resulting in significantly high energy consumption, with individual users (such as users 5, 9, and 41) consuming more than 70 joules, and the fluctuation is large. Under the unloading strategy, the terminal device migrates the computing task to the edge server, significantly reducing the local computing burden, and the energy consumption is mostly controlled within 10 joules, and the overall curve is stable. As can be seen, the unloading mechanism not only improves the delay performance, but also effectively reduces the terminal energy consumption, which has a positive effect on prolonging the device battery life and improving the overall energy efficiency of the system.
[0081] In summary, the threshold-based task offloading strategy shows significant advantages in both latency and energy consumption reduction, and is particularly suitable for resource-constrained and latency-sensitive terminal scenarios such as smart wearable devices, vehicle-mounted systems, and smart mobile terminals. In the future, user behavior prediction and network state perception mechanisms can be further introduced to improve the intelligence and adaptability of the offloading strategy.
[0082] To compare the effects of different resource allocation strategies on task response latency, Figure 8 The total latency performance of 50 users under three typical allocation methods is shown, namely the particle swarm optimization (PSO) strategy, the equal proportion allocation strategy, and the random allocation strategy.
[0083] As can be seen from Figure 8 , the PSO optimization strategy achieves the lowest total latency in most user scenarios, with the curve remaining at a relatively low level and showing good volatility stability. In contrast, the latency of the random allocation strategy is the largest and the fluctuation is the most severe, reflecting that this strategy fails to fully consider the task load difference and has obvious resource waste and uneven scheduling problems. The latency performance of the equal proportion allocation scheme is between the two, close to PSO optimization in some scenarios, but the overall performance is still slightly inferior.
[0084] This result verifies that the PSO optimization algorithm can achieve more reasonable resource scheduling when considering system resources and user characteristics, effectively reducing the total task latency and improving the response capability and service efficiency of the system.
[0085] Figure 9 Further comparison of the three allocation strategies under the normalized total cost index is shown. The total cost index considers multiple dimensions such as calculation delay, energy consumption, and offloading failure rate, reflecting the overall pros and cons of system operation efficiency.
[0086] The results show that the PSO optimization strategy also shows significant advantages in total cost control. Its total cost curve is significantly lower than that of the equal proportion and random strategies in most cases, indicating that this method can not only reduce latency but also effectively control system energy consumption and service quality loss. The random allocation strategy has a high total cost in most users and poor stability, verifying its poor applicability in multi-constrained scenarios. Although the equal proportion strategy is more stable than the random method, it still has a high cost at multiple user points and fails to achieve optimal resource matching.
[0087] The above shows and describes the basic principles and main features of the present application and the advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above embodiments, and the above embodiments and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A task complexity adaptive based camera intelligent offloading system, characterized in that: The main control process of the task complexity adaptive camera intelligent offloading system is initiated by the intelligent camera for each task generation cycle, and the front-end camera is responsible for initiating task complexity perception; Offloading decisions are made on the camera side; Once the decision to offload is made, the MEC server is responsible for execution and scheduling; weight adjustment can be determined by user or system preset parameters, affecting the offloading strategy; PSO algorithm as the hub, scheduling MEC computing resources; Each component information communicates and synchronizes parameters through wireless links and local APIs; The task complexity adaptive camera intelligent offloading system comprises: Task complexity modeling module: used to extract multiple complexity functions in camera image processing tasks and build a combined model; Offloading decision module: used to derive the offloading critical point and determine whether to perform offloading based on the calculation delay and energy consumption cost; Edge resource scheduling module: used to dynamically allocate computing resources for candidate offloading tasks using the particle swarm optimization algorithm; Dynamic weight adjustment module: used to adjust the priority parameters of delay and energy consumption according to user business requirements, and implement flexible offloading strategies; Intelligent camera terminal: used for video acquisition, task initiation, local calculation, and offloading judgment; MEC edge computing node module: handles camera offloading image tasks and provides computing resources; Wireless communication link: responsible for data transmission between the camera and the MEC; Optical fiber wired link: supports MEC node interconnection or migration to the cloud.
2. The task complexity adaptive based camera intelligent offloading system of claim 1, wherein: Intelligent camera terminal: acquires images, performs local complexity analysis, and calls the offloading decision module; if the conditions are met, the task is uploaded; The intelligent camera terminal has preliminary local computing capability; Task complexity modeling module: extracts O(n²), O(n³) and other complexity sub-tasks involved in image tasks; Combination forms the total complexity index; quantifies the "light and heavy" of the task and provides a basis for offloading decisions. 3.The task complexity adaptive based camera intelligent offloading system of claim 1, wherein: Offloading decision module: based on delay and energy consumption models, derive the offloading critical point; compare local cost and offloading cost; Output whether to offload the task; Wireless communication link: carries the upload of task data; modeling uses real channel characteristics such as Rayleigh channel and Shannon formula; one of the main factors affecting delay and energy consumption.
4. The task complexity adaptive based camera intelligent offloading system of claim 1, wherein: MEC server: receives offloading tasks; calls the PSO optimization module to schedule resources; actually completes task calculation and returns the result; Edge resource scheduling module: dynamically allocates computing power using the particle swarm optimization algorithm based on task complexity and resource status; controls CPU time / frequency occupied by each task; avoids uneven allocation of computing power, congestion, or inefficiency.
5. The task complexity adaptive based camera intelligent offloading system of claim 1, wherein: Dynamic weight adjustment module: users can adjust the priority of latency vs. energy consumption; different tasks can load different offloading strategies; enhance the business adaptability of the offloading system.
6. An optimization method of a task complexity adaptive-based camera intelligent offloading system, characterized in that: The optimization method of the task complexity adaptive camera intelligent offloading system comprises the following steps: Step 1, collect the characteristic parameters of the current image processing task of the camera, extract multiple typical complexity functions involved in the task, build a combined complexity model, and calculate the total complexity index of the task under unit input data volume, providing a basis for offloading decision; Step 2: Based on the complexity model constructed, the time delay and energy consumption of local execution and offloading execution are calculated respectively, combined with the camera's local computing ability, edge server resource status, and wireless link quality. The offloading critical point is derived through the offloading merit interpolation function to determine whether to offload the task. Step 3: When it is determined that the task needs to be offloaded, the edge resource scheduling module is started. The particle swarm optimization algorithm is used to minimize the total system cost, and the resource is dynamically allocated to multiple camera tasks to output the optimal computing frequency / power allocation scheme. Step 4: According to the task type and business requirements, set the delay weight α and energy consumption weight β to adjust the priority of the system offloading strategy. Increase the α value for time delay sensitive tasks and the β value for energy consumption sensitive devices to achieve personalized adaptation of the offloading strategy. Step 5: After the MEC server completes the image processing task, the result is returned to the camera terminal. The system records the task execution delay and energy consumption indicators for subsequent adaptive adjustment and experience optimization of the offloading parameters.
7. The task complexity adaptive based camera intelligent offloading system and its optimization method according to claim 6, characterized in that: The specific steps of Step 1 include: Step 101: The camera collects image tasks and extracts the key processing links of the tasks. Match each sub-task with its corresponding complexity function. According to the proportion of each sub-task ; unit input scale ; complexity function, construct a combination complexity model: wherein, is the weight of the th complexity subtask, i.e. the proportion of effort. Step 102: The data volume can be represented as the product of the number of bytes per unit input data and the input size, so the formula for data volume is: in, Indicates the first The data volume of each camera, where S is the number of bytes of data per unit input; Step 103, is the CPU cycle coefficient corresponding to the complexity of the processing unit task, so the number of cycles can be obtained The product of the CPU cycle coefficient corresponding to the complexity of the processing unit task and the complexity, the formula is as follows: Step 104: Use the complexity output by the model as an input parameter for task offloading determination. 8.The task complexity adaptive based camera intelligent offloading system and its optimization method according to claim 6, characterized in that: Step 2 includes: Step 201: When the camera processes its computing tasks locally, the calculation time delay depends on its own computing ability. For the camera, the local calculation delay for processing tasks is: wherein, is the main frequency of the camera in Hz, The local power consumption model uses a classical CMOS dynamic power consumption model, while allowing to obtain the camera The energy consumption for the local computation is: wherein, represents a constant determined by capacitance, voltage, etc., and is generally in the range of between 1 and 10. Step 202: In the application, the size of the calculation result is much smaller than the size of the input data, and the time delay for receiving the calculation result can be ignored. In this case, the total time delay specifically includes the uplink transmission time delay and the calculation task execution time delay. When the camera offloads tasks to the edge server for calculation, the uplink transmission time expression is: cameras the total latency is: wherein, denotes the computing resources allocated by the MEC server to the camera , defines as the total computing resources of the server m, then we have ; denotes the wireless transmission rate between the camera to which the computing task belongs and the server; the energy consumption of the camera task offloading mainly comes from the energy consumption in the process of offloading data to the edge server, that is: wherein, is the wireless transmit power of the user; Step 203, design a set of unloading decision mechanism and resource allocation algorithm, minimize the total system overhead under the guarantee of task execution delay constraint; the channel overhead is expressed as the weighted sum of delay and energy consumption, so The expression is: Since each task can be executed locally or on the MEC server, the local channel overhead of camera i is: The offloading channel overhead of camera i is represented as: wherein and respectively represent weight factors of energy consumption and latency, represent the degree of attention of the current task to energy consumption and latency, and satisfy constraint conditions ; to meet the requirements of specific users, the camera is allowed to select different weights for decision-making; Step 204: Derive the offloading critical point: we define an "offloading merit interpolation function": So the critical point satisfies and is the optimal MEC allocation given . There are two unknown variables: and ; therefore, two equations need to be solved simultaneously: Offloading determination equation: ; MEC resource optimal condition (KKT condition / partial derivative is zero): Solving the simultaneous equations (A) and (B) then gives Substitute the offloading cost Offloading cost: For Partial derivatives (KKT conditions): Obviously, the derivative only takes value at the boundary condition (because it is always negative), so monotonically decreasing in Therefore, the optimal value of MEC resource allocation is: Maximize under resource constraints, i.e. Decided by system constraints. Need to solve simultaneously with Lagrangian Algorithm implementation suggestions (numerical solution) can be solved with a double-layer optimization structure . 9.The task complexity adaptive based camera intelligent offloading system and its optimization method according to claim 6, characterized in that: The specific steps of Step 4 include: Step 401, introducing adjustable weight parameters for the offloading decision cost function (delay), (energy consumption) Step 402: Users or systems can set different weights according to business requirements: Real-time scenario: set larger , ensure low latency; Low power consumption scenario: set larger , reduce energy consumption; Step 403, adjusting the cost function form: ; and satisfy the constraint condition ; Step 404: The weight parameter can be dynamically bound to the task category or pre-set through a strategy table. 10.The task complexity adaptive based camera intelligent offloading system and its optimization method according to claim 6, characterized in that: The specific steps of Step 5 include: Step 501: After the MEC processing is completed, the processing result is returned to the front-end camera (data volume is small, delay can be ignored); Step 502: The camera records the delay and energy consumption of this task offloading; Step 503: Update the task database for experience optimization of the subsequent offloading determination strategy; Step 504, a machine learning model can be further introduced to improve the accuracy of future decisions.