A method for offloading computing tasks of internet of vehicles based on optimization and security protection of mantis shrimp
By adopting a computational task offloading method based on the mantis shrimp optimization algorithm, the problem of insufficient safety protection and optimization in the Internet of Vehicles is solved, and the efficient and safe offloading of computational tasks is achieved, thereby improving system performance and robustness.
Patent Information
- Application Number
- CN202511194703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-08-26
AI Technical Summary
Existing vehicle-to-everything (V2X) computing offloading methods have significant shortcomings in terms of security protection and optimization, making it difficult to achieve coordinated optimization of security and efficiency in heterogeneous and complex V2X environments.
A computational 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, and combining a joint optimization objective function of latency, energy consumption and security protection level, the improved mantis shrimp optimization algorithm is used for iterative optimization to find the optimal offloading decision.
In the vehicle-to-everything (V2X) environment, efficient offloading of computing tasks is achieved, which improves system performance and reliability, enhances security and privacy protection capabilities, avoids premature convergence, and improves the robustness of the offloading process.
Smart Images

Figure CN120723337B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of Internet of Vehicles, and particularly relates to a vehicle Internet of Things (IoV) computing task offloading method based on mantis shrimp optimization and security protection. BACKGROUND
[0002] The development of Internet of Things (IoT) technology has brought many computing-intensive and time-delay-sensitive computing tasks in the Internet of Vehicles, such as automatic driving, intelligent navigation, vehicle control, collision warning and vision enhancement application programs. The computing and storage resources of vehicle terminals are facing great challenges, and thus edge computing as a new computing mode is proposed and implemented in the Internet of Vehicles. The computing offloading strategy is a major problem that needs to be considered in edge computing. How to efficiently allocate services for computing tasks and how to effectively use the resources of edge devices and ensure the security during the offloading process are the focuses of our attention. Some existing offloading schemes have obvious deficiencies in security protection and optimization degree, and therefore we propose a computing task offloading method based on a new mantis shrimp optimization algorithm and security protection, which can balance security and efficiency in a heterogeneous and complex Internet of Vehicles environment, realize the cooperative optimization of security and performance, and provide high-reliable services. SUMMARY
[0003] The technical problem to be solved by the application is to provide a vehicle Internet of Things (IoV) computing task offloading method based on mantis shrimp optimization and security protection to solve the technical problem of obvious deficiencies in security protection and optimization degree of existing vehicle Internet of Things (IoV) computing offloading methods.
[0004] The vehicle Internet of Things (IoV) computing task offloading method based on mantis shrimp optimization and security protection comprises the following steps, and the following steps are performed in sequence:
[0005] Step 1: Establish an edge computing architecture of the Internet of Vehicles (IoV) including multiple entities, wherein the entities are vehicles, road side units (RSUs), edge service nodes and cloud centers; the cloud center is in communication connection with multiple edge service nodes; each edge service node is in communication connection with multiple road side units (RSUs), and the edge service node adopts a MEC server; the upper end of the road side unit (RSU) is connected with at least one edge service node, and the lower end of the road side unit (RSU) is in communication connection with vehicles entering the detection range thereof;
[0006] Step 2: Establish a vehicle computing task model, a vehicle mobility model, a communication model between entities and a security capacity model;
[0007] Step three: establish the local computing model of the vehicle, the edge offloading computing model and the vehicle offloading computing model, calculate and obtain the time delay overhead, energy consumption overhead, security protection level provided by the edge service node and the security protection level provided by the offloaded vehicle in each computing model for each execution computing task; wherein the vehicle that offloads the computing task to other vehicles or edge service nodes is called the offloaded vehicle, the vehicle that processes the computing task offloaded by the offloaded vehicle is called the offloaded vehicle, and the edge service node that processes the computing task offloaded by the offloaded vehicle is called the offloaded edge service node;
[0008] Step four: combine the three key indicators of time delay overhead, energy consumption overhead and security protection level to establish a joint optimization problem objective function for vehicle computing task offloading;
[0009] Step five: condition initialization and iterative optimization of the objective function using the improved mantis shrimp optimization algorithm, execute the specified number of iterations or output the result to reach the set convergence condition, find the optimal solution; wherein the improved mantis shrimp optimization algorithm adopts the mantis shrimp behavior strategy based on the detected polarized light type for optimization.
[0010] The vehicle computing task model in step two is represented by a tuple: , wherein represents the computing task size of data required to be uploaded; represents the computing task number of CPU clock cycles required; represents the maximum time limit that can be tolerated for task completion; represents the criticality level of the task, corresponding to low priority, medium priority, and high priority, respectively; represents the security level of the task, or , represents that the task does not require protection offloading, represents that the task needs to be protected offloading; represents the decision variable of the task, , represents executing the task locally, represents that the task needs to be offloaded to other vehicles for execution, represents that the task needs to be offloaded to edge service nodes for execution;
[0011] The criticality level of the task is set by artificial setting, and the high priority tasks include vehicle control, autonomous driving, and road warning; the medium priority includes field of view enhancement and path navigation; and the low priority includes online audio and entertainment games.
[0012] The calculation method for the latency overhead of each computational task in each computational model in step three is as follows:
[0013] (1) The computational task latency overhead of the local computing model:
[0014] ;
[0015] In the formula, Indicates the unloaded vehicle The generated computational tasks The time required for local execution; Indicates the unloaded vehicle The number of clock cycles executed by the CPU per second; Represents computational task The vehicle to be unloaded needs to be The time that the task queue is waiting to be executed;
[0016] in, ;
[0017] In the formula, This indicates that the task is queued in the task queue of the unloaded vehicle. The total number of CPU clock cycles required for the previous task; Indicates the level of criticality regarding the computational task. The exponential function;
[0018] (2) The computational latency overhead of the edge offloading computation model:
[0019] ;
[0020] In the formula, Indicates the unloaded vehicle The generated computational tasks Uninstalling edge service nodes The time required for execution; Indicates the unloaded vehicle With offloading edge service nodes The authentication time between; Represents computational task Edge service nodes need to be uninstalled The time that the task queue is waiting to be executed; Represents computational task Transmitted to offloading edge service node The time required; Represents computational task Uninstalling edge service nodes Processing time; denotes the time at which the computation output result is returned to the offloaded vehicle ; denotes the offloaded vehicle and the offloading edge service node ; performs the encryption and decryption operations;
[0021] wherein, ;
[0022] wherein, denotes the number of CPU clock cycles required in total for the tasks arranged in front of the computation task in the task queue of the offloading edge service node ; denotes the number of clock cycles per second performed by the CPU in the offloading edge service node ; denotes the maximum time for which the computation task is to wait in the queue; denotes the offloaded vehicle ; the maximum delay which the computation task generated by the offloaded vehicle can tolerate; denotes the weight factor of the first addend in the addition operation of the argument of the exponential function; denotes the weight factor of the second addend in the addition operation of the argument of the exponential function; ;
[0023] (3) Vehicle offloading computation model computation task latency overhead:
[0024] ;
[0025] wherein denotes the computation task generated by the offloaded vehicle , the time required for the execution of which by the offloading vehicle ; denotes the authentication time between the offloaded vehicle and the offloading vehicle ; denotes the time for which the computation task is to wait in the task queue of the offloading vehicle for execution; denotes the time required for the computation task to be transmitted to the offloading vehicle ; denotes the time for which the computation task is processed by the offloading vehicle ; denotes the time that the computation output result is returned to the offloaded vehicle ; denotes the time that the computation output result is returned to the offloaded vehicle ; denotes the time that the computation output result is returned to the offloaded vehicle
[0026] wherein, ;
[0027] wherein, denotes the number of CPU clock cycles that the tasks arranged before the computation task in the task queue of the offloaded vehicle need in total; denotes the number of clock cycles per second that the CPU in the offloaded vehicle performs; denotes the maximum time that the computation task waits in the queuing queue; denotes the computation task generated by the offloaded vehicle can tolerate the maximum delay.
[0028] The calculation method of the energy consumption overhead in step three is as follows:
[0029] (1) The computation task energy consumption overhead of the local computing model:
[0030] ;
[0031] In the formula, denotes the computation task generated by the offloaded vehicle , the energy consumption of local execution generation; denotes the power consumption generated by each vehicle core calculation; denotes the number of clock cycles per second that the CPU in the offloaded vehicle performs; is the effective capacitance coefficient depending on the chip structure;
[0032] (2) The computation task energy consumption overhead of the edge offloading computing model:
[0033] ;
[0034] In the formula, denotes the computation task generated by the offloaded vehicle , the energy consumption of execution generation by the offloaded edge service node ; denotes the offloaded vehicle and the offloaded edge service node energy consumption generated in the transmission process; denotes the offloaded vehicle with the offloaded edge service node energy consumption generated in the authentication process; denotes the offloaded edge service node energy consumption generated in the processing process;
[0035] (3) The energy consumption overhead of the computing task of the vehicle offloading computing model:
[0036] ;
[0037] In the formula, denotes the offloaded vehicle the generated computing task , the offloaded vehicle executes the energy consumption; denotes the offloaded vehicle with the offloaded vehicle energy consumption generated in the transmission process; denotes the offloaded vehicle with the offloaded vehicle energy consumption generated in the authentication process; denotes the offloaded vehicle the energy consumption generated in the processing process.
[0038] The calculation formula of the security protection level that the offloaded edge service node in step three can provide is as follows:
[0039] ;
[0040] In the formula, denotes the offloaded vehicle the generated computing task offloaded to the offloaded edge service node can provide the security level; denotes the offloaded edge service node the reliability in a certain period of time in the past; denotes the offloaded edge service node the current load security degree; denotes the offloaded vehicle with the offloaded edge service node the security evaluation value of the physical layer link.
[0041] The calculation formula of the security protection level that the offloaded vehicle in step three can provide is as follows:
[0042] ;
[0043] represents the offloading vehicle represents the offloading vehicle a security evaluation value of the remaining validity period of the certificate; represents the offloading vehicle a risk evaluation value of abnormal behavior possibly brought by being detected within a certain set period of time before; represents the offloading vehicle a risk evaluation value of whether a relay is needed and brought by the relay; represents the offloading vehicle a current load security degree; represents the offloading vehicle a security evaluation value of a physical layer link between the offloading vehicle .
[0044] The objective function of the joint optimization problem in the fourth step is: .
[0045] wherein, represents the objective function formula, .
[0046] wherein, represents the offloading vehicle a generated computing task , an execution time delay calculated according to the offloading decision factor, and the calculation formula is:
[0047] .
[0048] represents the offloading vehicle a generated computing task , an execution energy consumption calculated according to the offloading decision factor, and the calculation formula is:
[0049] .
[0050] represents the offloading vehicle a generated computing task , an execution security level calculated according to the offloading decision factor, and the calculation formula is:
[0051] .
[0052] wherein, , , respectively represent a trade-off factor between the time delay, the energy consumption and the security level, and satisfy , , , ; to offload decision factors, and ; representing the offloaded vehicle the generated computing task the time required for execution locally; representing the offloaded vehicle the generated computing task the time required for execution at the offloading edge service node; representing the offloaded vehicle the generated computing task the time required for execution at the offloaded vehicle; representing the offloaded vehicle the generated computing task the energy consumption generated for execution locally; representing the offloaded vehicle the generated computing task the energy consumption generated for execution at the offloading edge service node; representing the offloaded vehicle the generated computing task the energy consumption generated for execution at the offloaded vehicle; representing the offloaded vehicle the generated computing task the security level that can be provided for execution locally; representing the offloaded vehicle the generated computing task the security level that can be provided for execution at the offloading edge service node; representing the offloaded vehicle the generated computing task the security level that can be provided for execution at the offloaded vehicle.
[0053] The specific operation steps of the improved mantis shrimp optimization algorithm in step five are as follows:
[0054] (1) Update of visual detection of polarization light type identifier
[0055] The left eye and the right eye of the mantis shrimp independently detect the polarization light, first determine the type of the polarization light according to the polarization angle, then calculate the deviation between the polarization angle of the left eye and the right eye and the reference angle, finally compare the deviations of the left eye and the right eye to determine the dominant eye, and a double probability control mechanism is introduced in it, which retains the biological heuristic rule of the mantis shrimp, and through the weight control, the overall behavior strategy distribution tendency of the mantis shrimp is controlled, so that the algorithm can obtain the solution space in the early stage, and can concentrate in the superior area of the solution in the middle and late stages;
[0056] (2) Update of mantis shrimp behavior algorithm
[0057] The updating of different behavior strategies is performed according to the type of polarized light detected by the dominant eye, and the updating of the optimal strategy, i.e., the optimal solution, is performed according to different behavior strategies:
[0058] ①The updating mode of the best position of the foraging strategy is:
[0059] ;
[0060] In the formula, represents the new position of the mantis shrimp in the second iteration; represents the best position found by the mantis shrimp at present; represents the difference between the current position and the best position; represents a random diffusion value; represents an adaptive factor; represents the difference between the current position and the best position so far, and is not equal to ; ;
[0061] ②The updating mode of the best position of the attack strategy is:
[0062] ;
[0063] In the formula, represents an adaptive step size, represents a unit sphere;
[0064] ③The best position of the burrow, defense or shelter strategy
[0065] Defense: ;
[0066] Shelter: ;
[0067] In the formula, is a randomly generated scaling factor between 0 and 0.3.
[0068] The design scheme can bring the following beneficial effects:
[0069] 1. The method of the present application deeply innovates the edge computing technology of Internet of Vehicles, takes the mantis shrimp optimization algorithm as the core, and comprehensively considers various factors to find the optimal computing offloading decision scheme. The present application simulates the operation of the mantis shrimp behavior strategy based on the unique visual characteristics of mantis shrimp, quickly finds the optimal solution strategy in a heterogeneous and complex Internet of Vehicles environment, allocates reasonable offloading points for computing tasks, and effectively improves the overall performance of the edge computing system of the Internet of Vehicles.
[0070] 2. The method of the present application classifies computing tasks, assigns different priorities to computing tasks, considers the scheduling mode of computing tasks, and brings all-round performance improvement to the edge computing of the Internet of Vehicles, and improves the quality of service guarantee.
[0071] 3. The method of the present application considers the joint optimization of safety, time delay and energy consumption, realizes the resource allocation of safety perception, improves the overall performance and reliability of the system, the privacy protection ability and the robustness in complex environment, and guarantees the safe and efficient offloading of the computing task of the Internet of Vehicles.
[0072] 4. The method of the present application uses the unique polarized light updating mechanism and mantis shrimp behavior strategy updating mechanism in the mantis shrimp optimization algorithm, increases the diversity of exploring the solution space, avoids premature convergence, and improves the quality of solution. BRIEF DESCRIPTION OF DRAWINGS
[0073] The present application will be further described in combination with the drawings and specific embodiments:
[0074] Figure 1 The edge computing architecture diagram in the Internet of Vehicles computing task offloading method based on mantis shrimp optimization and safety protection of the present application;
[0075] Figure 2 The improved mantis shrimp optimization algorithm PTI vector updating process diagram in the Internet of Vehicles computing task offloading method based on mantis shrimp optimization and safety protection of the present application;
[0076] Figure 3 The flowchart of the mantis shrimp optimization algorithm in the Internet of Vehicles computing task offloading method based on mantis shrimp optimization and safety protection of the present application;
[0077] Figure 4 The simulation result comparison diagram of average time delay in the Internet of Vehicles computing task offloading method based on mantis shrimp optimization and safety protection of the present application;
[0078] Figure 5 The simulation result comparison diagram of average energy consumption in the Internet of Vehicles computing task offloading method based on mantis shrimp optimization and safety protection of the present application;
[0079] Figure 6The simulation result comparison chart of average overhead in the vehicle networking computing task offloading method based on mantis shrimp optimization and security protection of the application;
[0080] Figure 7 The simulation result comparison chart of average security level in the vehicle networking computing task offloading method based on mantis shrimp optimization and security protection of the application. DETAILED DESCRIPTION
[0081] The application will be further described in detail below in combination with the drawings and specific embodiments.
[0082] The embodiment of the application provides a vehicle networking computing task offloading method based on mantis shrimp optimization and security protection, which comprises the following steps:
[0083] S1: a vehicle networking edge computing architecture comprising multiple entities is established, and the architecture is a three-layer architecture. The entities are respectively a vehicle, a road side unit RSU, an edge service node and a cloud center; the cloud center is in communication connection with multiple edge service nodes; each edge service node is in communication connection with multiple road side units RSU, and the edge service node adopts a MEC server; the upper end of the road side unit RSU is connected with at least one edge service node, and the lower end of the road side unit RSU is in communication connection with a vehicle entering the detection range thereof. As shown in the figure, the set of vehicles is defined as V, the set of road side units is defined as R, and the set of edge service nodes is defined as E. Figure 1
[0084] S2: a vehicle computing task model, a vehicle mobility model, a communication model between entities and a security capacity model are established.
[0085] S201: the tasks are prioritized according to the criticality of the vehicle computing tasks:
[0086] (1) high priority: vehicle control, automatic driving, road warning, etc.
[0087] (2) medium priority: vision enhancement, path navigation, etc.
[0088] (3) low priority: online audio, entertainment games, etc.
[0089] The vehicle computing task model is represented by a tuple: , wherein represents the size of the data required for the computing task to upload; represents the number of CPU clock cycles required for the computing task ; represents the maximum time limit that can be tolerated for task completion; a criticality level of the task, corresponding to low priority, medium priority, high priority, respectively; a security level of the task, or , indicating that the task does not need to be protected offloading, indicating that the task needs to be protected offloading; a decision variable of the task, , indicating that the task is executed locally, indicating that the task needs to be offloaded to other vehicles for execution.
[0090] S202. The vehicle mobility model is established as follows:
[0091] The vehicle travels at a constant speed on the road, and the computing task generated by the vehicle within the jurisdiction of the edge service node to which the current road side unit RSU belongs is completed as much as possible before driving out of the service area of the current road side unit RSU, and the expected residence time of the vehicle in a certain road side unit RSU service area is defined as:
[0092] (1);
[0093] In formula (1), denotes the expected residence time of the vehicle in the service area of the current road side unit RSU, denotes the radius of the coverage range of the service area of the road side unit RSU to which the vehicle currently belongs, denotes the horizontal distance between the vehicle and the RSU to which it currently belongs, and the formula is:
[0094] (2);
[0095] In formula (2), denotes the time required for processing the computing task.
[0096] S203. According to the communication model between entities, the communication model mainly includes V2V communication and V2I communication:
[0097] In V2V communication, IEEE 802.11-based DSRC technology is used between two entities.
[0098] In V2I communication, LTE technology with wider coverage and supporting high-speed mobile devices is used between two entities.
[0099] Define the channel data transmission rate between vehicles and the channel data transmission rate traversed by the vehicle transmitting tasks from the roadside unit (RSU) to the edge service node, and the edge service node returning the calculated data results and then transmitting them back to the vehicle via the roadside unit (RSU). Using Shannon's formula:
[0100] (3);
[0101] In equation (3), Indicates channel bandwidth. Indicates vehicle Transmission power, Indicates vehicle Channel gain between the associated roadside unit (RSU) and its corresponding roadside unit. This represents the white noise power of the Gaussian channel.
[0102] Establish a safe capacity model:
[0103] (4);
[0104] In equation (4), Indicates the maximum secure transmission rate. Indicates vehicle Gain of the main channel Indicates vehicle The gain of the eavesdropping channel, Indicates the noise power of the legitimate channel. This represents the noise power of the eavesdropping channel. The superscript "+" indicates that the result of this operation is positive.
[0105] S3: Establish the local computing model, edge unloading computing model, and vehicle unloading computing model for the vehicle.
[0106] S301. Establish a local computing model:
[0107] When a vehicle generates computational tasks that need to be executed locally, the latency and energy costs incurred during execution are affected by the vehicle's own energy.
[0108] Calculation of latency overhead:
[0109] (5);
[0110] In equation (5), Indicates the unloaded vehicle The generated computational tasks The time required for local execution; Indicates the unloaded vehicle The number of clock cycles executed by the CPU per second; representing the computing task need to wait to be executed in the task queue of the offloaded vehicle; the time; representing the computing task the number of CPU clock cycles required.
[0111] wherein, (6);
[0112] wherein, representing the total number of CPU clock cycles required by the tasks arranged before the computing task in the task queue of the offloaded vehicle; representing the exponential function of the priority of the computing task.
[0113] Calculation of energy consumption overhead:
[0114] (7);
[0115] In formula (7), representing the computing task generated by the offloaded vehicle , the energy consumption required for local execution of the generated; representing the power consumption generated by each vehicle core calculation, representing the number of clock cycles executed per second by the CPU in the offloaded vehicle ; is the effective capacitance coefficient depending on the chip structure;
[0116] S302. Edge offloading computing model
[0117] When the computing task generated by the vehicle needs to be offloaded to the edge service node for execution, the execution generated delay, energy consumption and the level of security protection provided are defined as:
[0118] (1) Calculation of time delay overhead
[0119] (8);
[0120] In formula (8), representing the computing task generated by the offloaded vehicle , the time required for execution at the offloaded edge service node ; representing the authentication time between the offloaded vehicle and the offloaded edge service node ; representing the computing task the time needed to transfer the computation task to the offloading edge service node ; the time needed to transfer the computation task to the offloading edge service node ; the time needed to transfer the computation task to the offloading edge service node ; the time needed to transfer the computation task to the offloading edge service node ; the time needed to transfer the computation task to the offloading edge service node ; the time needed to transfer the computation task to the offloading edge service node ; the time needed to transfer the computation task to the offloading edge service node ;
[0121] wherein, the computation formula is:
[0122] (9);
[0123] In formula (9), the size of the uploaded data needed for the computation task, the data transmission rate of the vehicle in the channel, the distance between the offloaded vehicle and the offloading edge service node , the propagation speed;
[0124] the computation formula is:
[0125] (10);
[0126] In formula (10), the number of clock cycles per second executed by the CPU in the offloading edge service node ;
[0127] (2) Computation of energy consumption overhead
[0128] (11);
[0129] In formula (11), the computation task generated by the offloaded vehicle , the energy consumption generated by the offloading edge service node ; the computation task with the offloading edge service node energy consumption generated in the transmission process; representing the offloaded vehicle with the offloading edge service node energy consumption generated in the authentication process; representing the offloading edge service node energy consumption generated in the processing process;
[0130] (3) Calculation of the security protection level that the edge service node can provide
[0131] (12);
[0132] In formula (12), representing the offloaded vehicle generated computing tasks offloaded to the offloading edge service node security level that can be provided; representing the offloading edge service node reliability in a certain period of time in the past; representing the offloading edge service node current load security degree; representing the offloaded vehicle with the offloading edge service node security evaluation value of the physical layer link between them.
[0133] Definition:
[0134] (13);
[0135] In formula (13), representing the attenuation coefficient, representing the offloading edge service node number of attacks suffered in a set period of time in the past;
[0136] (14);
[0137] In formula (14), representing the current CPU usage rate of the offloading edge service node
[0138] (15);
[0139] In formula (15), representing the physical layer security capacity, representing the offloaded vehicle generated computing tasks transmission rate of the data;
[0140] S303. Vehicle unloading computing model
[0141] When a computing task generated by a vehicle needs to be unloaded to other vehicles for execution, the execution generated latency, energy consumption and provided security protection level are defined as:
[0142] (1) Calculation of latency overhead
[0143] (16);
[0144] In formula (16), denotes the unloaded vehicle generating the computing task , the time needed for the unloaded vehicle to execute; denotes the authentication time between the unloaded vehicle and the unloading vehicle ; denotes the time that the computing task needs to wait to be executed in the task queue of the unloading vehicle ; denotes the time needed for the computing task to be transmitted to the unloading vehicle ; denotes the time that the computing task is processed by the unloading vehicle ; denotes the time that the computing output result is returned to the unloaded vehicle ; denotes the time that the unloaded vehicle and the unloading vehicle perform encryption and decryption operations on the computing task;
[0145] wherein, the calculation formula is:
[0146] (17);
[0147] In formula (17), denotes the distance between the unloaded vehicle and the unloading vehicle ;
[0148] the calculation formula is:
[0149] (18);
[0150] In formula (18), Indicates unloading the vehicle The number of clock cycles executed by the CPU per second;
[0151] for Since the output data value is much smaller than the input data value, the latency overhead generated by this part is negligible. Indicates the unloaded vehicle With unloading vehicles The time required to perform encryption and decryption operations on a computational task;
[0152] (2) Calculation of energy consumption
[0153] (19);
[0154] In equation (19), Indicates the unloaded vehicle The generated computational tasks Unloading the vehicle Energy consumption during execution; Indicates the unloaded vehicle With unloading vehicles Energy consumption during transmission; Indicates the unloaded vehicle With unloading vehicles Energy consumption generated during the certification process; Indicates unloading the vehicle Energy consumption during the processing;
[0155] (3) Calculation of the level of safety protection that the unloaded vehicle can provide
[0156] (20);
[0157] In equation (20), Indicates the unloaded vehicle The generated computational tasks Unload to unload vehicle The level of security that can be provided; Indicates unloading the vehicle Security assessment value for the remaining validity period of the certificate; Indicates unloading the vehicle The risk assessment value that may result from abnormal behavior detected within a certain set time period; Indicates unloading the vehicle Whether a relay is required and the risk assessment value associated with the relay; Indicates unloading the vehicle Current load security level; Indicates the unloaded vehicle With unloading vehicles a security evaluation value of a physical layer link between the two nodes;
[0158] Definition:
[0159] (21);
[0160] In formula (21), represents the remaining validity period of the certificate, represents the total validity period of the certificate.
[0161] (22);
[0162] In formula (22), represents the unloaded vehicle the number of times of abnormal behavior or malicious behavior detected, the malicious behavior including unloading the vehicle frequently broadcasting false information, using a false ID, etc.; the abnormal behavior including brake behavior anomaly, long-time low-speed driving or illegal overspeed driving, etc.
[0163] (23);
[0164] In formula (23), represents the unloaded vehicle to the unloaded vehicle the number of hops required; the number of hops is the number of intermediate nodes required for the unloaded vehicle to deliver information to the unloaded vehicle.
[0165] (24);
[0166] In formula (24), represents the current unloaded vehicle the CPU usage rate.
[0167] (25);
[0168] In formula (25), represents the physical layer security capacity, represents the unloaded vehicle the transmission rate of the computing task generated.
[0169] S4: Determine the optimization target and establish a joint optimization objective function.
[0170] The optimization target of the application mainly considers three key indicators: delay overhead, energy consumption overhead and security protection level.
[0171] (1) For the computing task generated by the vehicle, the calculation method of the delay is defined as:
[0172] (26);
[0173] (2) the calculation method of energy consumption is defined as:
[0174] (27);
[0175] (3) the calculation method of security level is defined as:
[0176] (28);
[0177] In formula (26), (27), (28), is the unloading decision factor, and .
[0178] Therefore, the total joint optimization problem objective function is:
[0179] (29);
[0180] In formula (29), , , denote the trade-off factor between the delay overhead, energy consumption overhead, and security protection level, and satisfy , , , Therefore, the joint optimization problem objective function can also be expressed in the following form:
[0181] (30);
[0182] Wherein, formula (30) further includes the following five limiting conditions C1 to C5:
[0183] C1: ;
[0184] C2: ;
[0185] C3: ;
[0186] C4: ; ;
[0187] C5 : ;
[0188] In the above formula, denote the energy of the vehicle currently being unloaded; denote the energy of the edge service node currently being unloaded; represents the number of clock cycles per second executed by the CPU in the offloading edge service node; represents the number of clock cycles per second executed by the CPU in the offloading vehicle;
[0189] The constraint conditions C1 and C2 limit the energy consumption required for executing the computing task to be less than the energy of the executing entity itself; C3 ensures that the computing task can be executed and the computing result returned before leaving the jurisdiction area; C4 limits the computing capability possessed by the vehicle and the edge service node; and C5 ensures that in a wireless environment where there is an eavesdropper, the system must dynamically adjust the transmission strategy according to the channel condition to ensure absolute data security.
[0190] S5: Condition initialization and iterative optimization using the improved mantis shrimp optimization algorithm. In each iteration, the individual solution and local optimal solution are updated according to the behavior strategy of the mantis shrimp. Finally, it is determined whether the mantis shrimp algorithm reaches the specified number of iterations and whether the output result meets the convergence condition, so as to determine the optimal strategy.
[0191] S501. Condition initialization
[0192] (1) Random initialization of population
[0193] ( 31);
[0194] In formula (31), the subscript i represents the i-th search agent, , , , represents the number of search agents, represents the dimension of the problem, , , represents the total dimension of the problem, and represent the upper and lower bounds of the search space, represents a random value in [0, 1], represents the initial population matrix.
[0195] Finally, the initial population matrix can be obtained:
[0196] (32);
[0197] (2) Mantis shrimp visual polarization type indicator PTI vector initialization
[0198] (33);
[0199] In the above two stages, The function is subject to uniform distribution in the range [0, 1], The function restriction PTI The value of is in the set {1, 2, 3}, the three different values respectively represent different reference angles, which correspond to , , , where, represents 180 degrees radian. These angles represent the types of polarized light detected by mantis shrimp respectively: vertical polarized light, horizontal polarized light, and circular polarized light.
[0200] S502. PTI The updating process of the vector
[0201] (1) First, calculate the polarization angle
[0202] The calculation of the polarization angle is based on the characteristics of the mantis shrimp visual system, the left and right eyes of the mantis shrimp are independently responsible for perception. The left eye polarization angle LPA is defined by formula (34), and the right eye polarization angle RPA is defined by formula (35):
[0203] (34);
[0204] In formula (34), and respectively represent the corresponding vectors of the initial population and the updated population.
[0205] (35);
[0206] (2) Calculation of the type of polarization LPT,RPT
[0207] (36); (3) Calculation of the eye angle difference
[0208] LAD,RAD (37);
[0209] (4) Calculation of
[0210] PTI (38);
[0211] S503. Mantis shrimp behavior strategy based on the type of detected polarized light
[0212] (1) Foraging strategy
[0213] (2) Mating strategy
[0214] The position update of the execution strategy is defined based on the kinetic behavior of Brownian motion and the Langevin equation:
[0215] (39);
[0216] (40);
[0217] (41);
[0218] (42);
[0219] In the equations (39), (40), (41), (42), represents the new position of the mantis shrimp in the t+1 th iteration; represents the position of the mantis shrimp in the t th iteration; represents the best position found so far by the mantis shrimp; represents the difference between the current position and the best position; represents a random diffusion value; represents an adaptive factor; represents a randomly selected other position; represents the difference between the current position and the so far, and is not equal to .
[0220] (2) Attack strategy
[0221] (43);
[0222] In the equation (43), represents the adaptive step size, represents the unit sphere.
[0223] (3) Burrow digging, Defense, or Shelter strategy
[0224] Defense: (44);
[0225] Shelter: (45);
[0226] In the equations (44), (45), is a randomly generated scaling factor between 0 and 0.3.
[0227] Referring to Figure 4 、 Figure 5 、 Figure 6 、 Figure 7 We compared the energy consumption, latency, security level and total average cost of the local offloading scheme, the average offloading scheme, other optimization algorithm schemes and mantis shrimp optimization scheme under different offloading task sizes. It can be clearly observed that compared with other offloading schemes, the mantis shrimp optimization scheme shows a very significant advantage, its results are greatly reduced in energy consumption, which can greatly reduce energy consumption and effectively improve energy utilization; In terms of time delay, it also performs better, which can significantly shorten the time spent in processing computing tasks; In terms of security level, we can find a higher security level scheme to improve the security of the computing offloading process, so as to better realize the cooperative optimization of security and performance, and at the same time, the scheme also has good performance in total average cost control, successfully reducing the cost of implementation process, with higher cost performance and better robustness.
[0228] The system using the vehicle networking computing task offloading method based on mantis shrimp optimization and security protection comprises a vehicle networking edge computing environment and a communication module, a computing task management module, a target function definition module, an optimization algorithm iteration module, and a convergence condition judgment and decision scheme result output module.
[0229] The vehicle networking edge computing environment and communication module is used to establish a vehicle networking edge computing architecture, which comprises the following entities: vehicles, roadside units RSUs, edge service nodes and cloud centers vehicles, and the vehicle networking edge computing environment and communication module is also provided with a communication model between the entities, wherein the communication mainly comprises V2V communication and V2I communication.
[0230] The computing task management module is used to define the composition of computing tasks, classify the computing tasks generated by vehicles, determine the scheduling mode of each computing task in the queuing queue, and assign different priorities to different types of computing tasks.
[0231] The target function definition module is used to define the calculation method of related parameters, variables and key indicators, and the key indicators mainly include latency, energy consumption and security level, and finally a target function model is established.
[0232] The optimization algorithm iteration module is used to find the optimal strategy for computing task offloading, mainly using the improved mantis shrimp optimization algorithm for iteration, and gradually finding the global optimal solution through iterative optimization.
[0233] The convergence condition judging and decision scheme result output module is used for judging the applicability and convergence of the improved mantis shrimp optimization algorithm in the Internet of Vehicles computing task offloading, and outputting an optimal computing offloading strategy.
[0234] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1.A method for computing task offloading in vehicle-to-everything based on optimization and security protection of mantis shrimp, characterized in that: Comprising the following steps, And the following steps are in turn: Step one: establish a vehicle networking edge computing architecture including multiple entities, which are vehicles, road side units RSU, edge service nodes and cloud centers; the cloud center is in communication connection with multiple edge service nodes; each edge service node is in communication connection with multiple road side units RSU, and the edge service node adopts MEC server; the upper end of the road side unit RSU is connected with at least one edge service node, and the lower end of the road side unit RSU is in communication connection with the vehicles entering its detection range; Step two: establish vehicle computing task model, vehicle mobility model, communication model between entities and security capacity model; Step three: establish local computing model of vehicle, edge offload computing model and vehicle offload computing model, calculate and obtain the time delay cost, energy consumption cost, security protection level provided by edge service node and security protection level provided by offloaded vehicle of each computing task in each computing model; wherein the vehicle offloading computing task to other vehicles or edge service nodes is called offloaded vehicle, the vehicle processing the offloaded computing task of offloaded vehicle is called offloaded vehicle, and the edge service node processing the offloaded computing task of offloaded vehicle is called offloaded edge service node; Step four: combine the three key indicators of time delay cost, energy consumption cost and security protection level to establish the objective function of joint optimization problem about vehicle computing task offloading; Step five: conditional initialization and iterative optimization of the objective function by using improved mantis shrimp optimization algorithm, execute specified iteration number or output result reaches set convergence condition, find optimal solution; wherein the improved mantis shrimp optimization algorithm adopts the behavior strategy of mantis shrimp based on detected polarized light type for optimization; The vehicle computing task model in step two is represented by a tuple: wherein represents the computing task size of data required to be uploaded; represents the computing task number of CPU clock cycles required; represents the maximum time limit tolerable for the task to complete; represents the criticality level of the task, corresponding to low priority, medium priority, high priority, respectively; represents the security level of the task, or , represents that the task does not need protection offloading, represents that the task needs to be protected offloading; represents the decision variable of the task, , represents that the task is executed locally, represents that the task needs to be offloaded to other vehicles for execution, represents that the task needs to be offloaded to an edge service node for execution; Wherein, the key level of task is set by artificial, high priority task includes vehicle control, automatic driving, road warning; medium priority includes field of view enhancement, path navigation; low priority includes online audio, entertainment game; The calculation method of time delay cost of each computing task in each computing model in step three is as follows: (1) time delay cost of computing task of local computing model: ; wherein the offloaded vehicle the generated computing task the time required for execution locally; the offloaded vehicle the number of clock cycles per second executed by the CPU in the offloaded vehicle the computing task the time the task queue of the offloaded vehicle waits to be executed; wherein ; wherein represents the number of CPU clock cycles required by the tasks in the task queue of the vehicle being unloaded in total before the computation task is arranged; represents an exponential function of the criticality level of the computation task; (2) time delay cost of computing task of edge offload computing model: ; In the formula, Indicates the unloaded vehicle The generated computational tasks Uninstalling edge service nodes The time required for execution; Indicates the unloaded vehicle With offloading edge service nodes The authentication time between; Represents computational task Edge service nodes need to be uninstalled The time that the task queue is waiting to be executed; Represents computational task Transmitted to offload edge service node The time required; Represents computational task Uninstalling edge service nodes Processing time; This indicates that the calculation output is returned to the unloaded vehicle. Time; Indicates the unloaded vehicle With offloading edge service nodes For computational tasks The time required to perform encryption and decryption operations; wherein ; In the formula, This indicates that the edge service node is being uninstalled. In the task queue, the computing tasks are arranged in order. The total number of CPU clock cycles required for the previous task; Indicates unloading edge service nodes The number of clock cycles executed by the CPU per second; This indicates the computational task. The maximum waiting time in the queue; Indicates the unloaded vehicle The generated computational tasks The maximum tolerable delay; This represents the first addend in the addition operation of the independent variable of the exponential function. Weighting factors; This represents the second addend in the addition operation of the independent variable of the exponential function. Weighting factors; (3) time delay cost of computing task of vehicle offload computing model: ; wherein the offloaded vehicle the generated computing task , in the offloaded vehicle the time required for execution; the offloaded vehicle the authentication time between the offloaded vehicle ; the computing task the time required for the task to wait in the task queue of the offloaded vehicle for execution; the computing task the time required for transmission to the offloaded vehicle ; the computing task the time for processing by the offloaded vehicle ; the time for the computing output result to be returned to the offloaded vehicle ; the offloaded vehicle the time for the offloaded vehicle to perform encryption and decryption operations on the computing task wherein ; In the formula, This indicates that the vehicle is being unloaded. In the task queue, the computing tasks are arranged in order. The total number of CPU clock cycles required for the previous task; Indicates unloading the vehicle The number of clock cycles executed by the CPU per second; Represents computational task The maximum waiting time in the queue; Indicates the unloaded vehicle The generated computational tasks The maximum tolerable delay; The calculation method of energy consumption cost in step three is as follows: (1) energy consumption cost of computing task of local computing model: ; In the formula, represents the vehicle being offloaded generated computing tasks , the energy consumption of the local execution of the generated; represents the power consumption generated by each vehicle core computing; represents the vehicle being offloaded the number of clock cycles per second executed by the CPU in the vehicle; is the effective open capacitance coefficient depending on the chip structure; (2) energy consumption cost of computing task of edge offload computing model: ; In the formula, representing the offloaded vehicle generated computing tasks at the offloading edge service node energy consumption generated in the execution; representing the offloaded vehicle with the offloading edge service node energy consumption generated in the transmission process; representing the offloaded vehicle with the offloading edge service node energy consumption generated in the authentication process; representing the offloading edge service node energy consumption generated in the processing process; (3) energy consumption cost of computing task of vehicle offload computing model: ; in which representing the offloaded vehicle computational tasks generated , in offloading the vehicle energy consumption generated in performing representing the offloaded vehicle with the offloaded vehicle energy consumption generated in the transmission process representing the offloaded vehicle with the offloaded vehicle energy consumption generated in the authentication process representing the offloaded vehicle energy consumption generated in the processing process The calculation formula of security protection level provided by offloaded edge service node in step three is as follows: ; In the formula, represents the vehicle being offloaded generated computing tasks offloaded to the offloading edge service node security level that can be provided; represents the offloading edge service node reliability in a past time period; represents the offloading edge service node current load security degree; represents the vehicle being offloaded with the offloading edge service node security evaluation value of a physical layer link between; Definition: ; In the formula, is expressed as an attenuation coefficient, representing an offload edge service node the number of attacks suffered within a time period set in the past; ; In the formula, represents the usage rate of the CPU of the current offloading edge service node ; ; In the formula, denotes the physical layer security capacity, denotes the offloaded vehicle generated computing tasks the transmission rate; The calculation formula of security protection level provided by offloaded vehicle in step three is as follows: ; In the formula, a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; a security evaluation value of a remaining valid period of the certificate; Definition: ; In the formula, represents the remaining valid period of the certificate, represents the total valid period of the certificate; ; In the formula, indicates the unloading vehicle the number of times the abnormal or malicious behavior is detected; ; In the formula, representing the unloading vehicle to the unloading vehicle the number of hops that need to be taken by the unloading vehicle to pass the information to the unloading vehicle; ; In the formula, indicates the current offloading vehicle CPU usage rate; ; In the formula, denotes the physical layer security capacity, denotes the offloaded vehicle generated computing tasks the transmission rate; The objective function of the joint optimization problem in step four is: ; wherein represents a target function formula, ; In the formula, representing the vehicle being unloaded generated computing task The execution delay calculated according to the unloading decision factor, and the calculation formula is: ; representing the vehicle being unloaded generated computing tasks , the execution energy consumption calculated according to the unloading decision factor, the calculation formula of which is: ; representing the vehicle being unloaded generated computing task an execution safety level calculated according to the unloading decision factor, the formula of which is: ; In the formula, , , Let represent the trade-off factors between latency, energy consumption, and security level, respectively, and satisfy . , , , ; To unload decision factors, and ; Indicates the unloaded vehicle The generated computational tasks The time required for local execution; Indicates the unloaded vehicle The generated computational tasks The time required to unload the edge service node; Indicates the unloaded vehicle The generated computational tasks The time required for unloading the vehicle; Indicates the unloaded vehicle The generated computational tasks The energy consumption generated during local execution; Indicates the unloaded vehicle The generated computational tasks The energy consumption generated during the execution of offloading edge service nodes; Indicates the unloaded vehicle The generated computational tasks The energy consumption generated during the unloading of vehicles; Indicates the unloaded vehicle The generated computational tasks The level of security that can be provided when executed locally; Indicates the unloaded vehicle The generated computational tasks The level of security that can be provided when unloading edge service nodes; Indicates the unloaded vehicle The generated computational tasks The level of safety that can be provided during vehicle unloading. 2.The method of claim 1, wherein the method further comprises: The specific operation steps of improved mantis shrimp optimization algorithm in step five are as follows: (1) update of visual detection polarized light type identifier The left and right eyes of mantis shrimp detect polarized light independently, first determine the type of polarized light according to the polarization angle, then calculate the deviation between the polarization angle of the left and right eyes and the reference angle, and finally compare the deviations of the left and right eyes to determine the dominant eye, and a double probability control mechanism is introduced, which retains the biological heuristic rules of mantis shrimp and controls the overall behavior strategy distribution of mantis shrimp through weight control, so that the algorithm can obtain the solution space in the early stage and focus on the superior area of the solution in the middle and late stages; (2) Update of mantis shrimp behavior algorithm Different behavior strategies are executed 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 behavior strategies: ① The update mode of the best position of Foraging strategy is: ; wherein represents the new position of the mantis shrimp in the next iteration; represents the best position found so far by the mantis shrimp; represents the difference between the current position and the best position; represents a random diffusion value; represents an adaptation factor; represents the difference between the current position and the best position so far, and is not equal to ; ② The update mode of the best position of Attack strategy is: ; wherein denotes an adaptive step size, denotes a unit sphere; ③ Burrow, Defense or Shelter strategy Defense ; Shelter shelter: ; In the formula, is a randomly generated scaling factor between 0 and 0.3.
Citation Information
Patent Citations
Internet of vehicles computing unloading method and system
CN120050723A