Internet of vehicles computing task unloading method based on mantis shrimp optimization and safety protection
Through the computing task offloading method based on the mantis shrimp optimization algorithm, the problem of insufficient security protection and optimization in the Internet of Vehicles computing offloading method is solved, the coordinated optimization of security and efficiency in heterogeneous environments is achieved, and the performance and security of the Internet of Vehicles edge computing system are improved.
Patent Information
- Application Number
- CN202511194703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing Internet of Vehicles computing offloading methods have obvious deficiencies in security protection and optimization, making it difficult to achieve coordinated optimization of security and efficiency in heterogeneous and complex Internet of Vehicles environments.
A computing task offloading method based on the mantis shrimp optimization algorithm is adopted. By establishing an edge computing architecture of vehicles, roadside units, edge service nodes and cloud centers, combined with latency overhead, energy consumption overhead and security protection level, the improved mantis shrimp optimization algorithm is used for iterative optimization to find the optimal offloading decision.
Quickly find the optimal offloading point in the Internet of Vehicles edge computing system, improve system performance, enhance service quality, achieve security-aware resource allocation, reduce energy consumption, and improve robustness and privacy protection capabilities.
Smart Images

Figure CN120723337A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Vehicles, and in particular relates to a method for offloading Internet of Vehicles computing tasks based on mantis shrimp optimization and security protection. Background Art
[0002] The development of IoT technology has led to the emergence of numerous compute-intensive and latency-sensitive tasks in the Internet of Vehicles (IoV), such as autonomous driving, intelligent navigation, vehicle control, collision warning, and enhanced vision applications. This poses significant challenges to the computing and storage resources of vehicle terminals. Consequently, edge computing has been proposed and implemented as a new computing model in the IoV. Computation offloading strategies are a key consideration in edge computing. Our focus is on efficiently allocating services to computing tasks, effectively utilizing the resources of edge devices, and ensuring security during the offloading process. Existing offloading solutions lack significant security protection and optimization capabilities. To address this, we propose a computational task offloading method based on a novel mantis shrimp optimization algorithm and integrated security protection. This method balances security and efficiency in heterogeneous and complex IoV environments, achieving coordinated optimization of security and performance, and providing highly reliable services. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method for offloading vehicle network computing tasks based on mantis shrimp optimization and safety protection to solve the technical problem that the existing vehicle network computing offloading methods have obvious deficiencies in safety protection and optimization.
[0004] The method for offloading computing tasks of the Internet of Vehicles based on Mantis Shrimp optimization and security protection includes the following steps, which are performed in sequence: Step 1: Establish an IoV edge computing architecture that includes multiple entities, namely vehicles, roadside units (RSUs), edge service nodes, and a cloud center; the cloud center is communicatively connected to multiple edge service nodes; each edge service node is communicatively connected to multiple roadside units (RSUs), and the edge service nodes use MEC servers; the upper end of the roadside unit (RSU) is connected to at least one edge service node, and the lower end of the roadside unit (RSU) is communicatively connected to vehicles that enter its detection range; Step 2: Establish vehicle computing task model, vehicle mobility model, inter-entity communication model, and safety capacity model; Step 3: Establish a local computing model, an edge offloading computing model, and a vehicle offloading computing model for the vehicle, and calculate and obtain the latency overhead, energy consumption overhead, security protection level that the edge service node can provide, and security protection level that the offloading vehicle can provide for each computing task in each computing model. The vehicle that offloads computing tasks to other vehicles or edge service nodes is called the offloaded vehicle, the vehicle that processes the computing tasks offloaded by the offloaded vehicle is called the offloading vehicle, and the edge service node that processes the computing tasks offloaded by the offloaded vehicle is called the offloading edge service node. Step 4: Combine the three key indicators of latency overhead, energy consumption overhead, and safety protection level to establish the objective function of the joint optimization problem for vehicle computing task offloading; Step 5: Initialize the conditions and use the improved mantis shrimp optimization algorithm to iteratively optimize the objective function, execute the specified number of iterations or output the results to meet the set convergence conditions to find the optimal solution; among them, the improved mantis shrimp optimization algorithm adopts a mantis shrimp behavior strategy based on the detected polarization light type for optimization.
[0005] The vehicle computing task model in step 2 is represented by a tuple: ,in Represents a computing task The size of the data to be uploaded; Represents a computing task The number of CPU clock cycles required; Indicates the maximum time limit that can be tolerated for task completion; Indicates the criticality level of the task. Corresponding to low priority, medium priority, and high priority respectively; Indicates the security level of the task, or , Indicates that the task does not need to be protected from uninstallation. Indicates that the task needs to be protected and uninstalled; represents the decision variable of the task, , Indicates that the task is executed locally. Indicates that the task needs to be offloaded to other vehicles for execution. Indicates that the task needs to be offloaded to the edge service node for execution; Among them, the criticality level of the tasks is set manually. High-priority tasks include vehicle control, autonomous driving, and road warning; medium-priority tasks include enhanced vision and path navigation; low-priority tasks include online audio and entertainment games.
[0006] The calculation method for the delay overhead of each computing task in each computing model in step 3 is as follows: (1) Computational task latency overhead of the local computing model: ; Where, Indicates unloaded vehicle Computational tasks generated , the time required for local execution; Indicates unloaded vehicle The number of clock cycles executed per second by the CPU in; Represents a computing task The vehicle needs to be unloaded The time the task waits in the task queue to be executed; in, ; Where, Indicates that the task queue of the unloaded vehicle is arranged in the calculation task The total number of CPU clock cycles required for the previous task; Indicates the criticality level of the computing task exponential function of ; (2) Computational task latency overhead of the edge offloading computing model: ; Where, Indicates unloaded vehicle Computational tasks generated , before uninstalling the edge service node The time required for execution; Indicates unloaded vehicle Offloading edge service nodes The authentication time between Represents a computing task Need to uninstall edge service node The time the task waits in the task queue to be executed; Represents a computing task Transfer to the offload edge service node the time required; Represents a computing task Uninstalling edge service nodes the time of processing; Indicates that the calculation output is returned to the unloaded vehicle time; Indicates unloaded vehicle Offloading edge service nodes For computing tasks The time when encryption and decryption operations are performed; in, ; Where, Indicates that the edge service node is being uninstalled. In the task queue, the calculation task is arranged The total number of CPU clock cycles required for the previous task; Indicates uninstalling edge service nodes The number of clock cycles executed per second by the CPU in; Indicates the computational task Maximum waiting time in the queue; Indicates unloaded vehicle Computational tasks generated The maximum delay that can be tolerated; Represents the first addend in the addition operation of the exponential function's independent variable The weight factor of Represents the second addend in the addition operation of the exponential function argument The weight factor of (3) Computational task delay overhead of the vehicle unloading calculation model: ; In the formula Indicates unloaded vehicle Computational tasks generated , when unloading the vehicle The time required for execution; Indicates unloaded vehicle and unloading vehicles The authentication time between Represents a computing task Need to unload the vehicle The time the task waits in the task queue to be executed; Represents a computing task Transfer to unloading vehicle the time required; Represents a computing task By unloading vehicle the time of processing; Indicates that the calculation output is returned to the unloaded vehicle time; Indicates unloaded vehicle and unloading vehicles The time to perform encryption and decryption operations on computing tasks; in, ; Where, Indicates unloading of vehicle In the task queue, it is arranged in the computing task The total number of CPU clock cycles required for the previous task; Indicates unloading of the vehicle The number of clock cycles executed per second by the CPU in; Represents a computing task Maximum waiting time in the queue; Indicates unloaded vehicle Computational tasks generated The maximum delay that can be tolerated.
[0007] The calculation method of the energy consumption in step 3 is as follows: (1) Energy consumption of computing tasks in local computing models: ; In the formula, Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by local execution; Represents the power consumption generated by each vehicle core calculation; Indicates unloaded vehicle The number of clock cycles executed per second by the CPU in; It is the effective open capacitance coefficient that depends on the chip structure; (2) Energy consumption of computing tasks in edge offloading computing model: ; In the formula, Indicates unloaded vehicle Computational tasks generated , before uninstalling the edge service node Energy consumption generated by execution; Indicates unloaded vehicle Offloading edge service nodes Energy consumption during transmission; Indicates unloaded vehicle Offloading edge service nodes Energy consumption during the certification process; Indicates uninstalling edge service nodes Energy consumption during the processing; (3) Energy consumption of the computational task of the vehicle unloading computation model: ; In the formula, Indicates unloaded vehicle Computational tasks generated , when unloading the vehicle Energy consumption generated by execution; Indicates unloaded vehicle and unloading vehicles Energy consumption during transmission; Indicates unloaded vehicle and unloading vehicles Energy consumption during the certification process; Indicates unloading of the vehicle Energy consumption during processing.
[0008] The calculation formula for the security protection level that the offloading edge service node can provide in step 3 is as follows: ; In the formula, Indicates unloaded vehicle Computational tasks generated Offload to the offload edge service node The level of security that can be provided; Indicates uninstalling edge service nodes Reliability over a certain period of time in the past; Indicates uninstalling edge service nodes Current load safety; Indicates unloaded vehicle Offloading edge service nodes The security assessment value of the physical layer link between them.
[0009] The calculation formula for the safety protection level that can be provided by unloading the vehicle in step 3 is as follows: ; In the formula, Indicates unloading of the vehicle The security assessment value of the remaining validity period of the certificate; Indicates unloading of the vehicle The risk assessment value that may be brought about by abnormal behavior detected within a certain set time period; Indicates unloading of the vehicle Whether relaying is required and the risk assessment value brought by relaying; Indicates unloading of the vehicle Current load safety; Indicates unloaded vehicle and unloading vehicles The security assessment value of the physical layer link between them.
[0010] The objective function of the joint optimization problem in step 4 is: ; in, Represents the objective function formula, ; Where, Indicates unloaded vehicle Computational tasks generated ,The execution delay calculated based on the offloading decision factor is calculated as follows: ; Indicates unloaded vehicle Computational tasks generated ,The execution energy consumption calculated according to the offloading decision factor is calculated as follows: ; Indicates unloaded vehicle Computational tasks generated ,The execution security level calculated according to the uninstall decision factor is calculated as follows: ; In the formula, 、 、 Represent the trade-off factors between delay, energy consumption and security level, and satisfy , , , ; is the uninstall decision factor, and ; Indicates unloaded vehicle Computational tasks generated , the time required for local execution; Indicates unloaded vehicle Computational tasks generated , the time required to execute at the offloading edge service node; Indicates unloaded vehicle Computational tasks generated , the time required to perform the unloading of the vehicle; Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by local execution; Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by executing at the offloading edge service node; Indicates unloaded vehicle Computational tasks generated , the energy consumption generated when unloading the vehicle; Indicates unloaded vehicle Computational tasks generated , the level of security that local execution can provide; Indicates unloaded vehicle Computational tasks generated ,implement the security level that can be provided at the offload edge service node; Indicates unloaded vehicle Computational tasks generated , which provides a level of safety when unloading vehicles.
[0011] The specific operation steps of the improved mantis shrimp optimization algorithm in step 5 are as follows: (1) Update of visual detection polarization type identifier The mantis shrimp's left and right eyes independently detect polarized light. The algorithm first determines the polarization type based on the polarization angle, then calculates the deviation between the left and right polarization angles and a reference angle. Finally, the deviations are compared to determine the dominant eye. A dual probabilistic control mechanism is introduced to this algorithm, preserving the mantis shrimp's biologically inspired rules while also controlling the distribution of the shrimp's overall behavioral strategies through weights. This allows the algorithm to acquire a solution space in the early stages and focus on the dominant solution region in the middle and late stages. (2) Update of mantis shrimp behavior algorithm Different behavioral strategies are updated according to the type of polarized light detected by the dominant eye, and the optimal strategy, i.e., the optimal solution, is updated according to different behavioral strategies: ① The best position of the Foraging strategy is updated as follows: ; Where, Indicates that mantis shrimp The new position in the iteration; Indicates the best location found by mantis shrimp so far; Indicates the difference between the current position and the best position; Represents a random diffusion value; represents the adaptive factor; Indicates the current position and The difference between and Not equal to ; ②The best position update method of the Attack attack strategy is: ; Where, represents the adaptive step size, represents the unit sphere; ③Burrow digging, Defense or Shelter cover strategy DefenseDefense: ; Shelter: ; In the formula, is a randomly generated scaling factor between 0 and 0.3.
[0012] Through the above design scheme, the present invention can bring the following beneficial effects: 1. The method described in this paper advances innovation in edge computing technology for connected vehicles. Using a mantis shrimp optimization algorithm as its core, it comprehensively considers multiple factors to find the optimal solution for computational offloading. By simulating the mantis shrimp's behavioral strategy based on its unique visual characteristics, this method rapidly finds the optimal solution strategy in a heterogeneous and complex connected vehicle environment, assigning appropriate offloading points for computational tasks, and effectively improving the overall performance of the connected vehicle edge computing system.
[0013] 2. The method described in the present invention classifies computing tasks, assigns different priorities to computing tasks, and considers the scheduling method of computing tasks, thereby bringing all-round performance improvement to the edge computing of the Internet of Vehicles and improving service quality assurance.
[0014] 3. The method described in the present invention takes into account the joint optimization of security, latency and energy consumption, realizes security-aware resource allocation, improves the overall performance and reliability of the system, privacy protection capabilities and robustness in complex environments, and ensures the safe and efficient offloading of Internet of Vehicles computing tasks.
[0015] 4. The method described in the present invention utilizes the unique polarization light update mechanism and the mantis shrimp behavior strategy update mechanism in the mantis shrimp optimization algorithm, which increases the diversity of the solution space explored, avoids falling into premature convergence, and improves the quality of the solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below with reference to the accompanying drawings and specific embodiments: Figure 1 This is a diagram of the Internet of Vehicles edge computing architecture in the Internet of Vehicles computing task offloading method based on mantis shrimp optimization and security protection of the present invention; Figure 2 This is a diagram of the PTI vector update process of the improved mantis shrimp optimization algorithm in the vehicle network computing task offloading method based on mantis shrimp optimization and safety protection of the present invention; Figure 3 This is a flow chart of the mantis shrimp optimization algorithm in the vehicle network computing task offloading method based on mantis shrimp optimization and safety protection of the present invention; Figure 4 This is a comparison chart of simulation results of average delay in the vehicle network computing task offloading method based on mantis shrimp optimization and safety protection of the present invention; Figure 5This is a comparison chart of simulation results of average energy consumption in the vehicle network computing task offloading method based on mantis shrimp optimization and safety protection of the present invention; Figure 6 This is a comparison chart of simulation results of the average overhead in the vehicle network computing task offloading method based on mantis shrimp optimization and safety protection of the present invention; Figure 7 This is a comparison chart of simulation results of the average security level in the vehicle network computing task offloading method based on mantis shrimp optimization and safety protection of the present invention. DETAILED DESCRIPTION
[0017] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] An embodiment of the present invention provides a method for offloading computing tasks in an Internet of Vehicles (IoV) based on Mantis Shrimp optimization and security protection, comprising the following steps: S1: Establish an Internet of Vehicles edge computing architecture that includes multiple entities. The architecture is a three-layer architecture. The entities are vehicles, roadside units (RSUs), edge service nodes, and cloud centers. The cloud center is connected to multiple edge service nodes. Each edge service node is connected to multiple roadside units (RSUs). The edge service nodes use MEC servers. The upper end of the roadside unit (RSU) is connected to at least one edge service node, and the lower end of the roadside unit (RSU) is connected to vehicles that enter its detection range. Figure 1 As shown, we define the set of vehicles as , the set of roadside units is ,The set of edge service nodes is .
[0019] S2: Establish vehicle computing task model, vehicle mobility model, inter-entity communication model and safety capacity model.
[0020] S201. Prioritize vehicle computing tasks according to their criticality: (1) High priority: vehicle control, autonomous driving, road warning, etc.;
[0021] (2) Medium priority: enhanced vision, path navigation, etc.
[0022] (3) Low priority: online audio, entertainment games, etc.
[0023] The vehicle computing task model is represented by a tuple: ,in Represents a computing task The size of the data to be uploaded; Represents a computing task The number of CPU clock cycles required; Indicates the maximum time limit that can be tolerated for task completion; Indicates the criticality level of the task. Corresponding to low priority, medium priority, and high priority respectively; Indicates the security level of the task, or , Indicates that the task does not need to be protected from uninstallation. Indicates that the task needs to be protected and uninstalled; represents the decision variable of the task, , Indicates that the task is executed locally. Indicates that the task needs to be offloaded to other vehicles for execution.
[0024] S202. The vehicle mobility model is established as follows: The vehicle is moving at a constant speed When driving on the road, the computing tasks generated by the vehicle within the jurisdiction of the edge service node to which the current roadside unit (RSU) belongs are completed as much as possible before leaving the service area of the current roadside unit (RSU). When a vehicle enters the service area of a roadside unit (RSU), its estimated stay time in the area is defined as: (1); In formula (1), Indicates vehicle In the current roadside unit RSU service area Estimated duration of stay within Indicates the service area of the roadside unit RSU to which the vehicle currently belongs The radius of coverage, Indicates the horizontal distance between the vehicle and the RSU it currently belongs to. The formula is: (2); In formula (2), Indicates the time required for the computation task to be processed.
[0025] S203. Establish a communication model between entities according to the communication object, the communication model mainly includes V2V communication and V2I communication: In V2V communication, DSRC technology based on IEEE802.11 is used between two entities.
[0026] In V2I communication, LTE technology with wider coverage and support for high-speed mobile devices is used between two entities.
[0027] Defines the channel data transmission rate between vehicles and the channel data transmission rate through which the vehicle transmits tasks to the edge service node through the roadside unit RSU and the edge service node returns the calculated data results and then passes through the roadside unit RSU to the vehicle , using Shannon's formula: (3); In formula (3), represents the channel bandwidth, Indicates vehicle The transmission power, Indicates vehicle The channel gain between the roadside unit RSU and the corresponding represents the white noise power of the Gaussian channel.
[0028] Build a safety capacity model: (4); In formula (4), Indicates the maximum safe transmission rate, Indicates vehicle The gain of the main channel to which it belongs, Indicates vehicle The gain of the eavesdropping channel, represents the noise power of the legal channel, Represents the noise power of the eavesdropping channel. The superscript + indicates that the result of this operation is a positive number.
[0029] S3: Establish the vehicle's local computing model, edge unloading computing model, and vehicle unloading computing model.
[0030] S301. Establish a local computing model: When the computing tasks generated by the vehicle need to be executed locally, the delay overhead and energy consumption overhead generated by the execution are affected by the vehicle's own energy.
[0031] Calculation of delay overhead: (5); In formula (5), Indicates unloaded vehicle Computational tasks generated , the time required for local execution; Indicates unloaded vehicle The number of clock cycles executed per second by the CPU in; Represents a computing task The vehicle needs to be unloaded The time the task waits in the task queue to be executed; Represents a computing task The number of CPU clock cycles required.
[0032] in, (6); Where, Indicates that the task queue of the unloaded vehicle is arranged in the calculation task The total number of CPU clock cycles required for the previous task; Indicates the priority of computing tasks The exponential function of .
[0033] Calculation of energy consumption: (7); In formula (7), Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by local execution; Represents the power consumption generated by the core computing of each vehicle, Indicates unloaded vehicle The number of clock cycles executed per second by the CPU in; It is the effective open capacitance coefficient that depends on the chip structure; S302. Edge offloading computing model When the computing tasks generated by the vehicle need to be offloaded to the edge service node for execution, the execution latency, energy consumption, and security protection level provided are defined as: (1) Calculation of delay overhead (8); In formula (8), Indicates unloaded vehicle Computational tasks generated , before uninstalling the edge service node The time required for execution; Indicates unloaded vehicle Offloading edge service nodes The authentication time between Represents a computing task Need to uninstall edge service node The time the task waits in the task queue to be executed; Represents a computing task Transfer to the offload edge service node the time required; Represents a computing task Uninstalled edge service node the time of processing; Indicates that the calculation output is returned to the vehicle Since the output data value is much smaller than the input data value, the delay caused by this part can be ignored. Indicates unloaded vehicle Offloading edge service nodes For computing tasks The time when encryption and decryption operations are performed; in, The calculation formula is: (9); In formula (9), Indicates the size of the uploaded data required for the computing task. represents the data transmission rate of the vehicle in the channel, Indicates unloaded vehicle Offloading edge service nodes The distance between Indicates the propagation speed; The calculation formula is: (10); In formula (10), Uninstalling edge service nodes The number of clock cycles executed per second by the CPU in; (2) Calculation of energy consumption (11); In formula (11), Indicates unloaded vehicle Computational tasks generated , before uninstalling the edge service node Energy consumption generated by execution; Indicates unloaded vehicle Offloading edge service nodes Energy consumption during transmission; Indicates unloaded vehicle Offloading edge service nodes Energy consumption during the certification process; Indicates uninstalling edge service nodes Energy consumption during the processing; (3) Calculation of the security protection level that edge service nodes can provide ( 12); In formula (12), Indicates unloaded vehicle Computational tasks generated Offload to the offload edge service node The level of security that can be provided; Indicates uninstalling edge service nodes Reliability over a certain period of time in the past; Indicates uninstalling edge service nodes Current load safety; Indicates unloaded vehicle Offloading edge service nodes The security assessment value of the physical layer link between them.
[0034] definition: (13); In formula (13), Expressed as the attenuation coefficient, Indicates uninstalling edge service nodes The number of attacks suffered within a set period of time in the past; (14); In formula (14), Indicates that the edge service node is currently uninstalled CPU usage; (15); In formula (15), Indicates the physical layer security capacity, Indicates unloaded vehicle Computational tasks generated The transmission rate; S303. Vehicle unloading calculation model When the computing tasks generated by a vehicle need to be offloaded to other vehicles for execution, the execution latency, energy consumption, and security protection level provided are defined as: (1) Calculation of delay overhead (16); In formula (16), Indicates unloaded vehicle Computational tasks generated , when unloading the vehicle The time required for execution; Indicates unloaded vehicle and unloading vehicles The authentication time between Represents a computing task Need to unload the vehicle The time the task waits in the task queue to be executed; Represents a computing task Transfer to unloading vehicle the time required; Represents a computing task By unloading vehicle the time of processing; Indicates that the calculation output is returned to the unloaded vehicle time; Indicates unloaded vehicle and unloading vehicles The time to perform encryption and decryption operations on computing tasks; in, The calculation formula is: (17); In formula (17), Indicates unloaded vehicle and unloading vehicles the distance between them; The calculation formula is: (18); In formula (18), Indicates unloading of the vehicle The number of clock cycles executed per second by the CPU in; for ,Since the output result data value is much smaller than the input data value, the delay overhead generated by this part can be ignored; Indicates unloaded vehicle and unloading vehicles The time to perform encryption and decryption operations on computing tasks; (2) Calculation of energy consumption (19); In formula (19), Indicates unloaded vehicle Computational tasks generated Unloading the vehicle Energy consumption generated by execution; Indicates unloaded vehicle and unloading vehicles Energy consumption during transmission; Indicates unloaded vehicle and unloading vehicles Energy consumption during the certification process; Indicates unloading of the vehicle Energy consumption during the processing; (3) Calculation of the safety protection level that the unloaded vehicle can provide (20); In formula (20), Indicates unloaded vehicle Computational tasks generated , unloading to unloading vehicle The level of security that can be provided; Indicates unloading of the vehicle The security assessment value of the remaining validity period of the certificate; Indicates unloading of the vehicle The risk assessment value that may be brought about by abnormal behavior detected within a certain set time period; Indicates unloading of the vehicle Whether relaying is required and the risk assessment value brought by relaying; Indicates unloading of the vehicle Current load safety; Indicates unloaded vehicle and unloading vehicles Security assessment value of the physical layer link between them; definition: (twenty one); In formula (21), Indicates the remaining validity period of the certificate. Indicates the total validity period of the certificate.
[0035] (twenty two); In formula (22), Indicates unloading of the vehicle The number of times abnormal or malicious behavior was detected; malicious behavior includes unloading vehicles Frequent broadcasting of false information, use of false IDs, etc.; abnormal behaviors include abnormal braking behavior, long periods of low-speed driving, or illegal speeding, etc.
[0036] (twenty three); In formula (23), Indicates the unloaded vehicle to the unloading vehicle The number of hops required is the number of intermediate nodes that the unloaded vehicle needs to pass through to transmit information to the unloading vehicle.
[0037] (twenty four); In formula (24), Indicates that the vehicle is currently unloading CPU usage.
[0038] (25); In formula (25), Indicates the physical layer security capacity, Indicates unloaded vehicle Computational tasks generated The transmission rate.
[0039] S4: Determine the optimization goal and establish a joint optimization objective function.
[0040] The optimization objectives of the present invention mainly consider three key indicators: delay overhead, energy consumption overhead and security protection level.
[0041] (1) For the computing tasks generated by the vehicle, the calculation method of the delay is defined as: (26); (2) The calculation method of energy consumption is defined as: (27); (3) The calculation method for defining the security level is: (28); In formulas (26), (27), and (28), is the uninstall decision factor, and .
[0042] Therefore, the overall joint optimization problem objective function is: (29); In formula (29), 、 、 Represents the trade-off factor between delay overhead, energy consumption overhead, and security protection level, and satisfies , , , , therefore, the objective function of the joint optimization problem can also be expressed as follows: (30); Among them, formula (30) also includes the following five limiting conditions C1 to C5: C1: ; C2: ; C3: ; C4: ; ; C5 : ; In the above formula, Indicates the energy currently unloaded from the vehicle; Indicates the energy currently offloading the edge service node; Indicates the number of clock cycles executed per second by the CPU in the offload edge service node; Indicates the number of clock cycles executed per second by the CPU in the unloading vehicle; The constraints C1 and C2 limit the energy consumption required to execute computing tasks to no more than the energy of the executing entity itself; C3 ensures that computing tasks can be completed and the calculation results returned before leaving the jurisdiction; C4 limits the computing power of vehicles and edge service nodes; C5 ensures that in a wireless environment where eavesdroppers exist, the system must dynamically adjust the transmission strategy according to the channel conditions to ensure absolute confidentiality of data.
[0043] S5: Conditional initialization and iterative optimization using the improved mantis shrimp optimization algorithm. In each iteration, the individual solution and the local optimal solution are updated based on the mantis shrimp's behavioral strategy. Finally, the optimal strategy is determined by determining whether the mantis shrimp algorithm has executed the specified number of iterations and whether the output meets the convergence condition.
[0044] S501. Conditional initialization (1) Random initialization of the population ( 31 ); In formula (31), the subscript Indicates the Search agents, , represents the number of search agents, The dimensions of the problem are indivual, , represents the total number of dimensions of the problem, and represent the upper and lower bounds of the search space, respectively. represents a random value in [0,1], represents the initial population matrix.
[0045] Finally, the initial population matrix can be obtained: (32); (2) Mantis shrimp visual polarization type indicator ( PTI ) Vector initialization (33); In the above two stages, The function follows a uniform distribution in the range [0,1]. Function restrictions PTIThe value of is in the set {1,2,3}. These three different values represent different reference angles, corresponding to , , ,in, Represents 180 degrees of arc. These angles represent the types of polarized light detected by the mantis shrimp: vertically polarized light, horizontally polarized light, and circularly polarized light.
[0046] S502. PTI Vector update process (1) First calculate the polarization angle The calculation of polarization angle is based on the characteristics of the mantis shrimp's visual system. The left and right eyes of the mantis shrimp perform perception independently. LPA Defined by formula (34), the right eye polarization angle RPA Defined by formula (35): (34); In formula (34), and Represent the corresponding vectors of the initial population and the updated population respectively.
[0047] (35); (2) Polarization type ( LPT,RPT ) (36); (3) Difference in eye angle ( LAD,RAD ) (37); (4) PTI Calculation (38); S503. Mantis shrimp behavioral strategy based on the detected polarized light type (1) Foraging strategy The position update is based on the dynamic behavior of Brownian motion and the Langevin equation to define the execution strategy: (39); (40); (41); ( 42 ); In formulas (39), (40), (41), and (42), Indicates that mantis shrimpt+1 The new position in the iteration; Indicates that mantis shrimp is t The position in the iteration; Indicates the best location found by mantis shrimp so far; Indicates the difference between the current position and the best position; Represents a random diffusion value; represents the adaptive factor; represents other randomly selected positions; Indicates the current position and The difference between and Not equal to .
[0048] (2) Attack strategy (43); In formula (43), represents the adaptive step size, represents the unit sphere.
[0049] (3) Burrow, Defense, or Shelter strategies DefenseDefense: (44); Shelter: (45); In formulas (44) and (45), is a randomly generated scaling factor between 0 and 0.3.
[0050] See Figure 4 、 Figure 5 、 Figure 6 、 Figure 7We compared the energy consumption, latency, security level, and total average cost of the local offloading solution, average offloading solution, other optimization algorithm solutions, and the Mantis Shrimp optimization solution under different offloading task sizes. It can be clearly observed that compared with other offloading solutions, the Mantis Shrimp algorithm optimization solution has shown extremely significant advantages. Its results have greatly reduced energy consumption, which can greatly reduce energy consumption and effectively improve energy utilization. It also performs better in terms of latency cost, which can significantly shorten the time it takes for computing tasks to be processed. In terms of security level cost, we can find a solution with a higher security level to improve the security of the computing offloading process, thereby better realizing the coordinated optimization of security and performance. At the same time, the solution has also achieved good performance in total average cost control, successfully reducing various cost expenditures during the implementation process, and has higher cost performance and better robustness.
[0051] A system using the method for offloading computing tasks of the Internet of Vehicles based on mantis shrimp optimization and security protection includes an Internet of Vehicles edge computing environment and communication module, a computing task management module, an objective function definition module, an optimization algorithm iteration module, and a convergence condition judgment and decision solution result output module. The IoV edge computing environment and communication module are used to establish an IoV edge computing architecture, which includes the following entities: vehicles, roadside units (RSUs), edge service nodes, and cloud center vehicles. The IoV edge computing environment and communication module are also provided with a communication model between the entities, and the communication mainly includes V2V communication and V2I communication; The computing task management module is used to define the composition of computing tasks, classify the computing tasks generated by vehicles, determine the scheduling method of each computing task in the queue, and assign different priorities to different types of computing tasks; The objective function definition module is used to define the calculation method of relevant parameters, variables and key indicators, which mainly include delay overhead, energy consumption overhead and security protection level, and finally establish the objective function model; The optimization algorithm iteration module is used to find the optimal strategy for offloading computing tasks, mainly using the improved mantis shrimp optimization algorithm for iteration, and gradually finding the global optimal solution through iterative optimization; The convergence condition judgment and decision-making solution result output module is used to judge the applicability and convergence of the improved mantis shrimp optimization algorithm in the offloading of vehicle network computing tasks, and output the optimal computing offloading strategy.
[0052] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for offloading computing tasks from the Internet of Vehicles (IoV) based on Mantis Shrimp optimization and security protection, characterized by: The following steps are included: And the following steps are performed in sequence: Step 1: Establish an IoV edge computing architecture that includes multiple entities, namely vehicles, roadside units (RSUs), edge service nodes, and a cloud center; the cloud center is communicatively connected to multiple edge service nodes; each edge service node is communicatively connected to multiple roadside units (RSUs), and the edge service nodes use MEC servers; the upper end of the roadside unit (RSU) is connected to at least one edge service node, and the lower end of the roadside unit (RSU) is communicatively connected to vehicles that enter its detection range; Step 2: Establish vehicle computing task model, vehicle mobility model, inter-entity communication model, and safety capacity model; Step 3: Establish a local computing model, an edge offloading computing model, and a vehicle offloading computing model for the vehicle, and calculate and obtain the latency overhead, energy consumption overhead, security protection level that the edge service node can provide, and security protection level that the offloading vehicle can provide for each computing task in each computing model. The vehicle that offloads computing tasks to other vehicles or edge service nodes is called the offloaded vehicle, the vehicle that processes the computing tasks offloaded by the offloaded vehicle is called the offloading vehicle, and the edge service node that processes the computing tasks offloaded by the offloaded vehicle is called the offloading edge service node. Step 4: Combine the three key indicators of latency overhead, energy consumption overhead, and safety protection level to establish the objective function of the joint optimization problem for vehicle computing task offloading; Step 5: Initialize the conditions and use the improved mantis shrimp optimization algorithm to iteratively optimize the objective function, execute the specified number of iterations or output the results to meet the set convergence conditions to find the optimal solution; among them, the improved mantis shrimp optimization algorithm adopts a mantis shrimp behavior strategy based on the detected polarization light type for optimization.
2. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized in that: The vehicle computing task model in step 2 is represented by a tuple: ,in Represents a computing task The size of the data to be uploaded; Represents a computing task The number of CPU clock cycles required; Indicates the maximum time limit that can be tolerated for task completion; Indicates the criticality level of the task. Corresponding to low priority, medium priority, and high priority respectively; Indicates the security level of the task, or , Indicates that the task does not need to be protected from uninstallation. Indicates that the task needs to be protected and uninstalled; represents the decision variable of the task, , Indicates that the task is executed locally. Indicates that the task needs to be offloaded to other vehicles for execution. Indicates that the task needs to be offloaded to the edge service node for execution; Among them, the criticality level of the tasks is set manually. High-priority tasks include vehicle control, autonomous driving, and road warning; medium-priority tasks include enhanced vision and path navigation; low-priority tasks include online audio and entertainment games.
3. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized in that: The calculation method for the delay overhead of each computing task in each computing model in step 3 is as follows: (1) Computational task latency overhead of the local computing model: ; Where, Indicates unloaded vehicle Computational tasks generated , the time required for local execution; Indicates unloaded vehicle The number of clock cycles executed per second by the CPU in; Represents a computing task The vehicle needs to be unloaded The time the task waits in the task queue to be executed; in, ; Where, Indicates that the task queue of the unloaded vehicle is arranged in the calculation task The total number of CPU clock cycles required for the previous task; Indicates the criticality level of the computing task exponential function of ; (2) Computational task latency overhead of the edge offloading computing model: ; Where, Indicates unloaded vehicle Computational tasks generated , before uninstalling the edge service node The time required for execution; Indicates unloaded vehicle Offloading edge service nodes The authentication time between Represents a computing task Need to uninstall edge service node The time the task waits in the task queue to be executed; Represents a computing task Transfer to the offload edge service node the time required; Represents a computing task Uninstalling edge service nodes the time of processing; Indicates that the calculation output is returned to the unloaded vehicle time; Indicates unloaded vehicle Offloading edge service nodes For computing tasks The time when encryption and decryption operations are performed; in, ; Where, Indicates that the edge service node is being uninstalled. In the task queue, it is arranged in the computing task The total number of CPU clock cycles required for the previous task; Indicates uninstalling edge service nodes The number of clock cycles executed per second by the CPU in; Indicates the computational task Maximum waiting time in the queue; Indicates unloaded vehicle Computational tasks generated The maximum delay that can be tolerated; Represents the first addend in the addition operation of the exponential function's independent variable The weight factor of Represents the second addend in the addition operation of the exponential function argument The weight factor of (3) Computational task delay overhead of the vehicle unloading calculation model: ; Where, Indicates unloaded vehicle Computational tasks generated , when unloading the vehicle The time required for execution; Indicates unloaded vehicle and unloading vehicles The authentication time between Represents a computing task Need to unload the vehicle The time the task waits in the task queue to be executed; Represents a computing task Transfer to unloading vehicle the time required; Represents a computing task By unloading vehicle the time of processing; Indicates that the calculation output is returned to the unloaded vehicle time; Indicates unloaded vehicle and unloading vehicles The time to perform encryption and decryption operations on computing tasks; in, ; Where, Indicates unloading of vehicle In the task queue, it is arranged in the computing task The total number of CPU clock cycles required for the previous task; Indicates unloading of the vehicle The number of clock cycles executed per second by the CPU in; Represents a computing task Maximum waiting time in the queue; Indicates unloaded vehicle Computational tasks generated The maximum delay that can be tolerated.
4. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized in that: The calculation method of the energy consumption in step 3 is as follows: (1) Energy consumption of computing tasks in local computing models: ; In the formula, Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by local execution; Represents the power consumption generated by each vehicle core calculation; Indicates unloaded vehicle The number of clock cycles executed per second by the CPU in; It is the effective open capacitance coefficient that depends on the chip structure; (2) Energy consumption of computing tasks in edge offloading computing model: ; In the formula, Indicates unloaded vehicle Computational tasks generated , before uninstalling the edge service node Energy consumption generated by execution; Indicates unloaded vehicle Offloading edge service nodes Energy consumption during transmission; Indicates unloaded vehicle Offloading edge service nodes Energy consumption during the certification process; Indicates uninstalling edge service nodes Energy consumption during the processing; (3) Energy consumption of the computational task of the vehicle unloading computation model: ; In the formula, Indicates unloaded vehicle Computational tasks generated , when unloading the vehicle Energy consumption generated by execution; Indicates unloaded vehicle and unloading vehicles Energy consumption during transmission; Indicates unloaded vehicle and unloading vehicles Energy consumption during the certification process; Indicates unloading of the vehicle Energy consumption during processing.
5. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized in that: The calculation formula for the security protection level that the offloading edge service node can provide in step 3 is as follows: ; In the formula, Indicates unloaded vehicle Computational tasks generated Offload to the offload edge service node The level of security that can be provided; Indicates uninstalling edge service nodes Reliability over a certain period of time in the past; Indicates uninstalling edge service nodes Current load safety; Indicates unloaded vehicle Offloading edge service nodes The security assessment value of the physical layer link between them.
6. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized by: The calculation formula for the safety protection level that can be provided by unloading the vehicle in step 3 is as follows: ; In the formula, Indicates unloading of the vehicle The security assessment value of the remaining validity period of the certificate; Indicates unloading of the vehicle The risk assessment value that may be brought about by abnormal behavior detected within a certain set time period; Indicates unloading of the vehicle Whether relaying is required and the risk assessment value brought by relaying; Indicates unloading of the vehicle Current load safety; Indicates unloaded vehicle and unloading vehicles The security assessment value of the physical layer link between them.
7. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized in that: The objective function of the joint optimization problem in step 4 is: ; in, Represents the objective function formula, ; Where, Indicates unloaded vehicle Computational tasks generated ,The execution delay calculated based on the offloading decision factor is calculated as follows: ; Indicates unloaded vehicle Computational tasks generated ,The execution energy consumption calculated according to the offloading decision factor is calculated as follows: ; Indicates unloaded vehicle Computational tasks generated ,The execution security level calculated according to the uninstall decision factor is calculated as follows: ; In the formula, 、 、 Represent the trade-off factors between delay, energy consumption and security level, and satisfy , , , ; is the uninstall decision factor, and ; Indicates unloaded vehicle Computational tasks generated , the time required for local execution; Indicates unloaded vehicle Computational tasks generated , the time required to execute at the offloading edge service node; Indicates unloaded vehicle Computational tasks generated , the time required to perform the unloading of the vehicle; Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by local execution; Indicates unloaded vehicle Computational tasks generated , the energy consumption generated by executing at the offloading edge service node; Indicates unloaded vehicle Computational tasks generated , the energy consumption generated when unloading the vehicle; Indicates unloaded vehicle Computational tasks generated , the level of security that local execution can provide; Indicates unloaded vehicle Computational tasks generated ,implement the security level that can be provided at the offload edge service node; Indicates unloaded vehicle Computational tasks generated , which provides a level of safety when unloading vehicles.
8. The method for offloading computing tasks in the Internet of Vehicles based on mantis shrimp optimization and security protection according to claim 1 is characterized in that: The specific operation steps of the improved mantis shrimp optimization algorithm in step 5 are as follows: (1) Update of visual detection polarization type identifier The mantis shrimp's left and right eyes independently detect polarized light. The algorithm first determines the polarization type based on the polarization angle, then calculates the deviation between the left and right polarization angles and a reference angle. Finally, the deviations are compared to determine the dominant eye. A dual probabilistic control mechanism is introduced to this algorithm, preserving the mantis shrimp's biologically inspired rules while also controlling the distribution of the shrimp's overall behavioral strategies through weights. This allows the algorithm to acquire a solution space in the early stages and focus on the dominant solution region in the middle and late stages. (2) Update of mantis shrimp behavior algorithm Different behavioral strategies are updated according to the type of polarized light detected by the dominant eye, and the optimal strategy, i.e., the optimal solution, is updated according to different behavioral strategies: ① The best position of the Foraging strategy is updated as follows: ; Where, Indicates that mantis shrimp The new position in the iteration; Indicates the best location found by mantis shrimp so far; Indicates the difference between the current position and the best position; Represents a random diffusion value; represents the adaptive factor; Indicates the current position and The difference between and Not equal to ; ②The best position update method of the Attack attack strategy is: ; Where, represents the adaptive step size, represents the unit sphere; ③Burrow digging, Defense or Shelter cover strategy Defense: ; Shelter: ; In the formula, is a randomly generated scaling factor between 0 and 0.3.
Citation Information
Patent Citations
Joint allocation optimization method for computing resources and communication resources of vehicle-mounted edge network
CN113518326A
Vehicle unloading decision optimization method for different time delay sensitive tasks
CN116801309A
Internet of vehicles task unloading method based on single base station optimization
CN117440343A
Internet of vehicles calculation unloading method based on VIFOX optimization algorithm
CN117687797A
Secure computing unloading method for cache-assisted ultra-dense heterogeneous MEC network
CN119031393A
Cited By
Method, system and equipment for detecting turn-to-turn short circuit fault of smoothing reactor and medium
CN120951105A
Methods, systems, equipment and media for detecting inter-turn short-circuit faults in smoothing reactors
CN120951105B