An edge-computing-based internet of vehicles task offloading method
Patent Information
- Application Number
- CN202111519572.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2041-12-14
AI Technical Summary
车联网是将信息传输到云计算中心进行统一处理,存在着传输时延较长、网络负载过大和信息安全等方面的问题
[0057] The edge computing-based vehicle network task offloading method provided by this invention has the following beneficial effects: constructing an edge computing-based vehicle network computing architecture can reduce transmission latency and ensure the information security of the vehicle network; using a task splitting model can flexibly handle task upload schemes; using an adaptive immune algorithm can greatly reduce the time for strategy generation; and using an adaptive mutation operator can enhance the initial stability of the algorithm and overcome the defects of local optima in the later stage.
Smart Images

Figure CN116266124B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of edge computing task offloading strategies for vehicle-to-everything (V2X) networks, and specifically relates to a method for offloading V2X edge computing tasks based on an adaptive immune optimization algorithm. Background Technology
[0002] Vehicle-to-everything (V2X) technology refers to the process of uploading information from onboard devices in vehicles to a cloud computing platform via wireless communication for unified scheduling and utilization, providing various functional services to vehicles in operation. This technology can effectively reduce the probability of vehicle collisions. Statistics show that globally, traffic accidents cause approximately 1.3 million deaths annually, making it the leading cause of death among young people. Commuters lose tens or even hundreds of hours of time each year due to traffic congestion, resulting in economic losses that account for 1% to 3% of GDP in some countries. Furthermore, over 10% of global greenhouse gas emissions come from fuel used in the transportation sector.
[0003] Offloading computation in vehicle-to-everything (V2X) edge computing is a key technological step in achieving low latency and high reliability in V2X systems. It is currently a research hotspot and one of the most challenging research areas in the fields of network communication and automobiles both domestically and internationally. It can also be applied to various modern infrastructure projects, providing fundamental support for smart transportation and smart cities. V2X edge computing technology refers to offloading highly complex and energy-intensive computing tasks from in-vehicle terminals to the network edge closer to the terminals. This provides distributed computing capabilities and localized cloud services, and has become one of the most competitive key technologies in next-generation mobile communication systems. However, V2X transmits information to cloud computing centers for unified processing, which presents challenges such as long transmission latency, excessive network load, and information security issues. Summary of the Invention
[0004] To address the aforementioned problems, this invention aims to provide a vehicle-to-everything (V2X) task offloading method based on edge computing. First, a V2X edge computing framework is constructed. Then, a V2X edge computing task offloading model, incorporating task and device parameters, is generated using task segmentation and data modeling methods. An adaptive immune optimization algorithm is then used to generate high-quality feasible solutions based on this offloading model. Finally, immune operators are employed to optimize these feasible solutions. This method can significantly reduce the combined costs of latency and energy consumption, meeting the low-latency and low-energy offloading requirements of V2X terminal applications.
[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0006] A method for offloading vehicle-to-everything (V2X) tasks based on edge computing includes the following steps performed in sequence:
[0007] (1) Construct an edge computing framework for the Internet of Vehicles scenario; the network architecture is divided into three layers, namely the vehicle terminal equipment application layer, the edge base station equipment layer and the cloud computing center layer.
[0008] (2) Perform data modeling; establish a task segmentation model, a latency calculation model, and an energy consumption model, and divide the calculation task into multiple sub-tasks. Each task is divided into three parts: the amount of data required to calculate the sub-task, the computing resources required to execute the sub-task, and the amount of data output after the sub-task is completed, thus forming a task segmentation model; each sub-task has two execution methods: one is to execute the task on the vehicle terminal, and the other is to upload the calculation task to the edge server for execution, thus forming a task offloading model based on the execution method of each sub-task; preprocess the offloading model and design a dependency relationship for each sub-task. Each sub-task has two relationships: depending on the previous sub-task and not depending on the previous sub-task, thus forming a task offloading model.
[0009] (3) On the task unloading model generated in step one, an immune optimization algorithm is used to obtain a high-quality and feasible execution plan.
[0010] In the above technical solution, the data modeling process is as follows: the cloud computing server is moved from the core network to the network edge near the vehicle terminal, and the mobile base station and the edge computing server are connected by optical fiber; the vehicle terminal device is within the coverage area of the base station and is connected to the base station wirelessly; an actual task is divided into n sub-task arrays, which are numbered from left to right as 0, 1, 2, 3, 4, ..., n, and each sub-task has two execution methods: local execution and execution on the server.
[0011] In the above technical solution, in step (2), after establishing the optimization model, the specific method for generating a high-quality feasible decision scheme using the adaptive immune algorithm is as follows:
[0012] 1. Select the encoding method and adopt binary encoding, that is, use binary to represent the execution method of the task;
[0013] 2. Generate an initial population and initialize the population using a random algorithm; that is, each subtask has a 50% probability of being executed locally and a 50% probability of being executed on an edge server.
[0014] 3. Design the fitness function; taking into account both response latency and terminal device energy consumption evaluation indicators, the two optimization objectives are transformed into a single-objective optimization problem through a weighted sum. The overall affinity function is defined as follows:
[0015] aff=1 / g(x) (1)
[0016] Wherein, g(x) is defined as follows:
[0017] g(x)=ω×τ+(1-ω)×EC (2)
[0018] Where ω represents the weighting coefficient, used to balance the proportion of latency and energy consumption; τ represents the response latency of the computing task, from the start of task execution to the output of the task result; and EC represents the energy consumption of the vehicle terminal, including computing energy consumption and data transmission energy consumption.
[0019] The expression for τ is:
[0020] τ=τ (1) +τ (2) (3)
[0021] Where, τ (1) τ represents the latency caused by local execution. (2) This indicates the latency generated during edge computing execution.
[0022] Assuming the i-th subtask is executed locally, the computation latency of this subtask is:
[0023]
[0024] Among them, w i c represents the computational cost of the i-th subtask. local This indicates the computing power of the vehicle terminal.
[0025] Assuming the i-th subtask is executed locally, the computation latency of this subtask is:
[0026]
[0027] in, This represents the amount of data required for the i-th task. r represents the amount of data output after the i-th task is completed. up C represents the upload speed of the terminal device. MEC r represents the computing power of the edge computing server down Representing the data download rate, when the i-th subtask is offloaded to the edge server for execution, in addition to considering the latency caused by the MEC server completing the computational workload, it is also necessary to consider the offloading status of the two subtasks before and after it and the related latency they generate. Equation (2) corresponds to four combinations of the offloading status of the two subtasks before and after it. i-1 =0, x i =1,x i =0: Neither the (i-1)th nor the (i+1)th subtask has been uninstalled. In this case, the data upload latency and the download latency of the calculation result for the current subtask must be considered; x i-1 =1,x i =1,x i+1=0: The (i-1)th subtask was uninstalled, but the (i+1)th subtask was not uninstalled. In this case, the download latency of the calculation result of the current subtask should be considered; x i-1 =0, x i =1,x i+1 =1: If the (i-1)th subtask was not uninstalled but the (i+1)th subtask was uninstalled, the data upload latency of the current subtask must be considered; x i-1 =1,x i =1,x i+1 =1: The (i-1)th and (i+1)th subtasks have both been uninstalled. In this case, there is no need to consider the data upload latency and calculation result download latency of the current subtask.
[0028] The formula for calculating EC is:
[0029] EC = EC (1) +EC (2) (6)
[0030] Among them, EC (1) EC represents the computing power consumed during local execution. (2) This indicates the transmission power consumption generated during local execution.
[0031] EC (1) The calculation formula is:
[0032] EC (1) =λ1·τ (1) (7)
[0033] Where λ1 represents the energy consumption coefficient of local execution.
[0034] EC (2) The calculation formula is:
[0035] EC (2) =λ2·τ up +λ3·τ down (8)
[0036] Where λ2 represents the energy consumption coefficient for uploading data, and λ3 represents the energy consumption coefficient for downloading data.
[0037] 4. Calculate antibody concentration and activation level; antibody concentration is an indicator for evaluating antibody population diversity. Evaluating antibody quality requires considering both antibody affinity and antibody concentration. Generally, antibodies with higher affinity and lower concentration should have higher activation level. The formula for calculating antibody concentration is shown below:
[0038]
[0039] Where den is the antibody concentration in the population; N is the number of antibodies in the population; S(X) i X j () represents the similarity between two antibodies, and its expression is as follows:
[0040]
[0041] Where δ represents the similarity threshold, aff(X) i X j Hamming distance is the affinity function between antibodies. This paper uses Hamming distance as the function to calculate the affinity between antibodies, as shown below:
[0042]
[0043]
[0044] Where, x i,k and x j,k Let i and j be the k-th decision variables for antibody i and antibody j, respectively; N represents the total number of subtasks that the task can be divided into.
[0045] The formula for calculating the excitation function in this paper is shown below:
[0046] sim(X i )=α·aff(X i )-β·den(X i (13)
[0047] In the formula, sim(X) i Scheme X i The excitation degree; α and β represent the weighting coefficients of antibody affinity and antibody concentration, respectively. In this paper, we set α = 2 and β = 1.
[0048] 5. Immunological selection: By ranking the level of stimulation, the top N / 2 antibodies are selected for immunization operations such as cloning, mutation, and clonal inhibition.
[0049] 6. Cloning operation: The first N / 2 antibodies selected in (5) are replicated, and each antibody is replicated m times.
[0050] 7. Mutation; An adaptive mutation probability based on the number of iterations and the degree of activation is used to perform mutation operations on the cloned antibody.
[0051] The new formula for calculating the adaptive mutation probability is as follows:
[0052]
[0053] Where sim is the motivation value of the selected individual. maxIt is the highest motivation value of the entire antibody population, sim avg This represents the average motivation level of the entire population. `pm_high` and `pm_low` are fixed constants between 0 and 1, with `pm_low` < `pm_high`. `t` represents the current iteration number, and `T` represents the total number of iterations. This indicates that after sorting the motivation values, the last one... Average value of antibody activation
[0054] The mutation method uses the traditional single-point mutation.
[0055] 8. Clonal suppression: Clonal suppression is performed on mutated clonal antibodies to suppress low-affinity antibodies and retain the high-affinity antibody population, so that the population remains at N.
[0056] 9. Population refresh; delete the one with the lowest incentive. One antibody is generated, and new antibodies are randomly generated to replenish it.
[0057] The edge computing-based vehicle network task offloading method provided by this invention has the following beneficial effects: constructing an edge computing-based vehicle network computing architecture can reduce transmission latency and ensure the information security of the vehicle network; using a task splitting model can flexibly handle task upload schemes; using an adaptive immune algorithm can greatly reduce the time for strategy generation; and using an adaptive mutation operator can enhance the initial stability of the algorithm and overcome the defects of local optima in the later stage. Attached Figure Description
[0058] Figure 1 This is a schematic diagram illustrating the workflow of the edge computing-based vehicle networking task offloading method provided by the present invention.
[0059] Figure 2 This is a diagram of the edge computing network architecture for the Internet of Vehicles provided by the present invention.
[0060] Figure 3 This is a framework diagram of the adaptive immune algorithm provided by the present invention. Detailed Implementation
[0061] The edge computing-based vehicle networking task offloading method provided by the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0062] like Figure 1 , Figure 2 , Figure 3 As shown, the edge computing-based vehicle networking task offloading method provided by the present invention includes the following steps performed in sequence:
[0063] (1) Construct an edge computing framework for the Internet of Vehicles scenario; divide the network architecture into three layers, namely the vehicle terminal device application layer, the edge base station device layer, and the cloud computing center layer. The vehicle terminal device application layer consists of tasks that need to be computed on the vehicle, and there are different types of computing tasks, which can be divided into multiple sub-tasks; the edge base station device layer consists of base stations and smart street light facilities with certain computing capabilities; the cloud computing center layer is located in a large computing center and has the strongest computing capabilities.
[0064] (2) Perform data modeling; establish a task segmentation model, a latency calculation model, and an energy consumption model, and divide the calculation task into multiple sub-tasks. Each task is divided into three parts: the amount of data required for the calculation of the sub-task, the computing resources required for the execution of the sub-task, and the amount of data output after the execution of the sub-task, thus forming a task segmentation model; each sub-task has two execution methods, one is to execute the task on the vehicle terminal, and the other is to upload the calculation task to the edge server for execution, and a task offloading model is formed according to the execution method of each sub-task; the offloading model is preprocessed, and a dependency relationship is designed for each sub-task. Each sub-task has two relationships: depending on the previous sub-task and not depending on the previous sub-task, thus forming a task offloading model.
[0065] The data modeling process is as follows: cloud computing servers are moved from the core network to the network edge closer to the vehicle terminal, and mobile base stations are connected to edge computing servers via optical fiber; vehicle terminal devices are within the coverage area of the base station and are connected to the base station wirelessly; an actual task is divided into an array of n subtasks, numbered from left to right as 0, 1, 2, 3, 4, ..., n, and each subtask has two execution methods: local execution and execution on the server.
[0066] (3) On the task unloading model generated in step (1), an immune optimization algorithm is used to obtain a high-quality and feasible execution scheme;
[0067] In step (3), the specific method for obtaining a high-quality feasible decision scheme using the adaptive immune algorithm is as follows:
[0068] 1. Select the encoding method; use binary encoding. Binary encoding is used to represent the execution method of subtasks.
[0069] 2. Generate the initial population; This embodiment uses a random algorithm for population initialization. Assuming the task is divided into n subtasks, each subtask has a 50% probability of being 0 (meaning it is executed locally) and a 50% probability of being 1 (meaning it is executed on an edge server). The specific steps for generating the initial population are as follows:
[0070] (1) Each antibody has n nodes. Each node has a 50% probability of being 0 and a 50% probability of being 1, which can generate an antibody.
[0071] (2) If the number of individuals required for the initial population is m, then only m antibodies need to be generated.
[0072] 3. Design the affinity function; affinity is commonly used to evaluate the quality of antibodies. This invention comprehensively considers response latency and terminal device energy consumption evaluation indicators, and transforms the two optimization objectives into a single-objective optimization problem through a weighted summation. The overall affinity function is defined as follows:
[0073] aff=1 / g(x) (1)
[0074] Wherein, g(x) is defined as follows:
[0075] g(x)=ω×τ+(1-ω)×EC (2)
[0076] Where ω represents the weighting coefficient, used to balance the proportion of latency and energy consumption; τ represents the response latency of the computing task, from the start of task execution to the output of the task result; and EC represents the energy consumption of the vehicle terminal, including computing energy consumption and data transmission energy consumption.
[0077] The expression for τ is:
[0078] τ=τ (1) +τ (2) (3)
[0079] Where, τ (1) τ represents the latency caused by local execution. (2) This indicates the latency generated during edge computing execution.
[0080] Assuming the i-th subtask is executed locally, the computation latency of this subtask is:
[0081]
[0082] Among them, w i c represents the computational cost of the i-th subtask. local This indicates the computing power of the vehicle terminal.
[0083] Assuming the i-th subtask is executed locally, the computation latency of this subtask is:
[0084]
[0085] in, This represents the amount of data required for the i-th task. r represents the amount of data output after the i-th task is completed. upC represents the upload speed of the terminal device. MEC r represents the computing power of the edge computing server down Representing the data download rate, when the i-th subtask is offloaded to the edge server for execution, in addition to considering the latency caused by the MEC server completing the computational workload, it is also necessary to consider the offloading status of the two subtasks before and after it and the related latency they generate. Equation (2) corresponds to four combinations of the offloading status of the two subtasks before and after it. i-1 =0, x i =1,x i =0: Neither the (i-1)th nor the (i+1)th subtask has been uninstalled. In this case, the data upload latency and the download latency of the calculation result for the current subtask must be considered; x i-1 =1,x i =1,x i+1 =0: The (i-1)th subtask was uninstalled, but the (i+1)th subtask was not uninstalled. In this case, the download latency of the calculation result of the current subtask should be considered; x i-1 =0, x i =1,x i+1 =1: If the (i-1)th subtask was not uninstalled but the (i+1)th subtask was uninstalled, the data upload latency of the current subtask must be considered; x i-1 =1,x i =1,x i+1 =1: The (i-1)th and (i+1)th subtasks have both been uninstalled. In this case, there is no need to consider the data upload latency and calculation result download latency of the current subtask.
[0086] The formula for calculating EC is:
[0087] EC = EC (1) +EC (2) 6)
[0088] Among them, EC (1) EC represents the computing power consumed during local execution. (2) This indicates the transmission power consumption generated during local execution.
[0089] EC (1) The calculation formula is:
[0090] EC (1) =λ1·τ (1) (7)
[0091] Where λ1 represents the energy consumption coefficient of local execution.
[0092] EC (2) The calculation formula is:
[0093] EC (2) =λ2·τup +λ3·τ down (8)
[0094] Where λ2 represents the energy consumption coefficient for uploading data, and λ3 represents the energy consumption coefficient for downloading data.
[0095] The specific parameters are shown in the table below:
[0096]
[0097]
[0098] 4. Calculate antibody concentration and activation level; antibody concentration is an indicator for evaluating antibody population diversity. Evaluating antibody quality requires considering both antibody affinity and antibody concentration. Generally, antibodies with higher affinity and lower concentration should have higher activation level. The formula for calculating antibody concentration is shown below:
[0099]
[0100] Where den is the antibody concentration in the population; N is the number of antibodies in the population; S(X) i X j () represents the similarity between two antibodies, and its expression is as follows:
[0101]
[0102] Where δ represents the similarity threshold, aff(X) i X j Hamming distance is the affinity function between antibodies. This paper uses Hamming distance as the function to calculate the affinity between antibodies, as shown below:
[0103]
[0104]
[0105] Where, x i,k and x j,k Let i and j be the k-th decision variables for antibody i and antibody j, respectively; N represents the total number of subtasks that the task can be divided into.
[0106] The formula for calculating the excitation function in this paper is shown below:
[0107] sim(X i )=α·aff(X i )-β·den(X i (13)
[0108] In the formula, sim(X) i Scheme Xi The excitation degree; α and β represent the weighting coefficients of antibody affinity and antibody concentration, respectively. In this paper, we set α = 2 and β = 1.
[0109] 5. Immunological selection: By ranking the level of stimulation, the top N / 2 antibodies are selected for immunization operations such as cloning, mutation, and clonal inhibition.
[0110] 6. Cloning operation: The first N / 2 antibodies selected in (5) are replicated, and each antibody is replicated m times.
[0111] 7. Mutation; An adaptive mutation probability based on the number of iterations and the degree of activation is used to perform mutation operations on the cloned antibody.
[0112] The new formula for calculating the adaptive mutation probability is as follows:
[0113]
[0114] Where sim is the motivation value of the selected individual. max It is the highest motivation value of the entire antibody population, sim avg This represents the average motivation level of the entire population. `pm_high` and `pm_low` are fixed constants between 0 and 1, with `pm_low` < `pm_high`. `t` represents the current iteration number, and `T` represents the total number of iterations. This indicates that after sorting the motivation values, the last one... The average level of antibody activation
[0115] The mutation method uses the traditional single-point mutation.
[0116] 8. Clonal suppression: Clonal suppression is performed on mutated clonal antibodies to suppress low-affinity antibodies and retain the high-affinity antibody population, keeping the population at N.
[0117] 9. Population refresh; delete the one with the lowest incentive. One antibody is generated, and new antibodies are randomly generated to replenish it.
Claims
1. A method for offloading vehicle-to-everything (V2X) tasks based on edge computing, characterized in that, The edge computing-based vehicle networking task offloading method includes the following steps: (1) Construct an edge computing framework for the Internet of Vehicles scenario; the network architecture is divided into three layers, namely the vehicle terminal equipment application layer, the edge base station equipment layer and the cloud computing center layer; (2) Perform data modeling; A task partitioning model, a latency calculation model, and an energy consumption model are established. The computational task is divided into multiple subtasks. Each task consists of three parts: the amount of data required for the subtask, the computational resources required for the subtask, and the amount of data output upon completion of the subtask. This forms the task partitioning model. Each subtask has two execution methods: one is to execute the task on the vehicle terminal, and the other is to upload the computational task to an edge server for execution. Based on the execution method of each subtask, a task offloading model is formed. The offloading model is preprocessed to design dependencies for each subtask. Each subtask has two relationships: depending on the previous subtask and not depending on the previous subtask. This forms the task offloading model. (3) On the task unloading model generated in step (2), an immune optimization algorithm is used to obtain a high-quality and feasible execution scheme; The specific method for generating an executable decision scheme using the immune optimization algorithm in step (3) is as follows: (1) Select the encoding method and adopt binary encoding, that is, use binary to represent the execution method of the task; (2) Generate an initial population and use a random algorithm to initialize the population; that is, each subtask has a 50% probability of being executed locally and a 50% probability of being executed on an edge server. (3) Calculate affinity; taking into account response delay and terminal equipment energy consumption evaluation indicators, the two optimization objectives are transformed into a single-objective optimization problem by weighted summation. (4) Calculate antibody concentration and activation level; antibody concentration is an indicator for evaluating antibody population diversity; evaluating antibody quality requires comprehensive consideration of both antibody affinity and antibody concentration; antibodies with higher affinity and lower concentration have higher activation level. (5) Immune selection; by ranking the level of stimulation, the top N / 2 antibodies are selected for immunization operations such as cloning, mutation and clonal inhibition; (6) Cloning operation; the first N / 2 antibodies selected in (5) are replicated, and each antibody is replicated m times; (7) Mutation; An adaptive mutation probability based on the number of iterations and the degree of activation is used to perform mutation operations on the cloned antibody; (8) Clonal suppression; Clonal suppression is performed on the mutated clonal antibodies to suppress low-affinity antibodies and retain the high-affinity antibody population, so that the population remains at N; (9) Population refresh; delete the one with the lowest incentive. One antibody is generated, and new antibodies are randomly generated to replenish it.
2. The method for offloading vehicle network tasks based on edge computing according to claim 1, characterized in that: In step (1), the process of constructing the task computing framework is as follows: the edge computing framework in the vehicle network scenario is divided into three layers: vehicle terminal equipment application layer, edge base station equipment layer and cloud computing center layer; The application layer of the vehicle terminal equipment consists of tasks that need to be computed on the vehicle. There are different types of computing tasks, and these tasks can be divided into multiple sub-tasks. The edge base station equipment layer consists of base stations and smart street light facilities with certain computing capabilities; the cloud computing center layer is located in a large computing center and has the strongest computing capabilities.
3. The method for offloading vehicle network tasks based on edge computing according to claim 2, characterized in that: The task computing framework described herein operates as follows: some computing and storage functions of the cloud computing server are moved from the core network to the network edge closer to the vehicle terminal; the mobile base station and the edge computing server are connected via optical fiber; the vehicle terminal device is within the coverage area of the base station and is connected to the base station wirelessly; the tasks applied by the vehicle terminal device can be divided into multiple sub-tasks, and each sub-task has two execution methods: one is to execute it on the vehicle terminal device, and the other is to upload the sub-task to the edge base station device layer for computing; The edge base station equipment layer uploads information that needs to be stored and information that cannot be computed to the cloud computing center layer for storage and computation.
4. The method for offloading vehicle network tasks based on edge computing according to claim 1, characterized in that: The process of establishing the task segmentation model is as follows: an actual task is divided into n subtask arrays, which are numbered from left to right as 0, 1, 2, 3, 4, ..., n. Each subtask has two execution methods: local execution and execution on the server.
5. The method for offloading vehicle network tasks based on edge computing according to claim 1, characterized in that: The specific method for generating an executable decision scheme using the immune optimization algorithm in step (3) is as follows: (1) Select the encoding method and adopt binary encoding, that is, use binary to represent the execution method of the task; (2) Generate an initial population and use a random algorithm to initialize the population; that is, each subtask has a 50% probability of being executed locally and a 50% probability of being executed on an edge server. (3) Calculate affinity; taking into account both response delay and terminal equipment energy consumption evaluation indicators, the two optimization objectives are transformed into a single-objective optimization problem through a weighted sum. The total affinity function is defined as follows: aff=1 / g(x) (1) Wherein, g(x) is defined as follows: g(x)=ω×τ+(1-ω)×EC (2) Where ω represents the weighting coefficient, used to balance the proportion of latency and energy consumption; τ represents the response latency of the computing task, from the start of task execution to the output of the task result; EC represents the energy consumption of the vehicle terminal, including computing energy consumption and data transmission energy consumption. The expression for τ is: τ=τ (1) +t (2) (3) Where, τ (1) τ represents the latency caused by local execution. (2) This indicates the latency incurred during edge computing execution; Assuming the i-th subtask is executed locally, the computation latency of this subtask is: Among them, w i c represents the computational cost of the i-th subtask. local This indicates the computing power of the vehicle terminal. Assuming the i-th subtask is executed locally, the computation latency of this subtask is: in, This represents the amount of data required for the i-th task. r represents the amount of data output after the i-th task is completed. up C represents the upload speed of the terminal device. MEC r represents the computing power of the edge computing server down Representing the data download rate, when the i-th subtask is unloaded to the edge server for execution, in addition to considering the latency caused by the MEC server completing the computational workload, it is also necessary to consider the unloading status of the two subtasks before and after it and the related latency they generate; Equation (2) corresponds to four combinations of the unloading status of the two subtasks before and after it; x i-1 =0, x i =1,x i =0: i-th -1 Subtasks and the i-th +1 Since none of the subtasks have been uninstalled, the data upload latency and calculation result download latency of the current subtask must be considered; x i-1 =1,x i =1,x i+1 =0: i-th -1 The i-th subtask was uninstalled, but the i-th subtask... +1 If a subtask is not uninstalled, the download latency of the current subtask's calculation results must be considered; x i-1 =0, x i =1,x i+1 =1: i-th -1 The subtask was not uninstalled, but the i-th subtask... +1 Once a subtask has been unloaded, the data upload latency of the current subtask must be considered; x i-1 =1,x i =1,x i+1 =1: i-th -1 Subtasks and the i-th +1 All subtasks have been uninstalled, so there is no need to consider the data upload latency and calculation result download latency of the current subtask. The formula for calculating EC is: EC=EC (1) +EC (2) (6) Among them, EC (1) EC represents the computing power consumed during local execution. (2) This indicates the transmission power consumption generated during local execution; EC (1) The calculation formula is: EC (1) =λ1·τ (1) (7) Where λ1 represents the energy consumption coefficient of local execution; EC (2) The calculation formula is: EC (2) =λ2·τ up +λ3·τ down (8) Where λ2 represents the energy consumption coefficient for uploading data, and λ3 represents the energy consumption coefficient for downloading data; (4) Calculate antibody concentration and activation level; antibody concentration is an indicator for evaluating antibody population diversity; evaluating antibody quality requires comprehensive consideration of both antibody affinity and antibody concentration; antibodies with higher affinity and lower concentration have higher activation level; the formula for calculating antibody concentration is shown below: Where den is the antibody concentration in the population; N is the number of antibodies in the population; S(X) i X j The similarity between two antibodies is represented by , and its expression is as follows: Where δ represents the similarity threshold, aff(X) i X j Hamming distance is the affinity function between antibodies. This paper uses Hamming distance as the function to calculate the affinity between antibodies, as shown below: Where, x i,k and x j,k Let i and j be the k-th decision variables for antibody i and antibody j, respectively; N represents the total number of subtasks that the task can be divided into. The formula for calculating the excitation function in this paper is shown below: sim(X i )=α·aff(X i )-β·den(X i In equation (12), sim(X) i Scheme X i The incentive degree; a and β represent the weighting coefficients of antibody affinity and antibody concentration, respectively. In this paper, we let α = 2 and β = 1. (5) Immune selection; by ranking the level of stimulation, the top N / 2 antibodies are selected for immunization operations such as cloning, mutation and clonal inhibition; (6) Cloning operation; the first N / 2 antibodies selected in (5) are replicated, and each antibody is replicated m times; (7) Mutation; An adaptive mutation probability based on the number of iterations and the degree of activation is used to perform mutation operations on the cloned antibody; The new formula for calculating the adaptive mutation probability is as follows: Where sim is the motivation value of the selected individual. max It is the highest motivation value of the entire antibody population, sim avg This represents the average motivation value of the entire population. pm_high and pm_low are fixed constants between 0 and 1, with pm_low < pm_high; t represents the current iteration number, and T represents the total number of iterations. This indicates that after sorting the motivation values, the last one... Average value of antibody activation The mutation method uses traditional single-point mutation; (8) Clonal suppression; Clonal suppression is performed on the mutated clonal antibodies to suppress low-affinity antibodies and retain the high-affinity antibody population, so that the population remains at N; (9) Population refresh; delete the one with the lowest incentive. One antibody is generated, and new antibodies are randomly generated to replenish it.
6. A vehicle-to-everything (V2X) computing framework, characterized in that, It employs the task unloading decision method based on the adaptive immune algorithm as described in any one of claims 1-5.