An edge computing resource dynamic allocation and energy consumption optimization method under a vehicle networking environment
By predicting the movement trajectory of vehicle groups and dynamically allocating edge computing resources, the problem of frequent node switching in traditional methods is solved, achieving efficient matching of edge computing resources and energy consumption optimization, and ensuring service continuity and stability.
Patent Information
- Application Number
- CN202511193008.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Traditional edge computing methods fail to effectively combine the real-time movement trajectory of vehicle groups for dynamic matching, resulting in vehicles frequently switching nodes or connecting to nodes outside the coverage area, causing service interruptions or a sharp increase in latency. At the same time, the lack of a dynamic correlation mechanism between energy consumption and load leads to high energy consumption.
By predicting the future trajectory of the vehicle group, computing nodes are dynamically allocated, node energy consumption is monitored, and tasks are migrated to target nodes when energy consumption exceeds the limit, thereby optimizing energy consumption.
This improves the accuracy and continuity of matching computing nodes with vehicle groups, reduces the energy consumption of edge nodes, and ensures the stability and reliability of services.
Smart Images

Figure CN120692579B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of Internet of Vehicles, and more particularly relates to a method for dynamically allocating edge computing resources and optimizing energy consumption in an Internet of Vehicles environment. BACKGROUND
[0002] With the rapid development of Internet of Vehicles technology, vehicles have increasing demands for real-time data processing and low-latency communication. As a technology that deploys computing resources at the edge of the network, edge computing can effectively reduce data transmission delay and improve service response speed, and has become one of the key technologies supporting Internet of Vehicles applications.
[0003] However, traditional methods mostly divide the service range of edge nodes based on fixed areas, and do not dynamically match with the real-time motion trajectory of vehicle groups, resulting in frequent switching of nodes or access to nodes outside the coverage range of vehicle groups in high-speed movement, causing service interruption or dramatic increase in latency. Meanwhile, the resource allocation of edge nodes only focuses on task feasibility, and does not establish a dynamic correlation mechanism between energy consumption and load.
[0004] Therefore, there is an urgent need for a method that can adapt to the dynamic characteristics of vehicle groups, achieve resource allocation, and reduce the energy consumption of edge nodes. SUMMARY
[0005] The purpose of the present application is to provide a method for dynamically allocating edge computing resources and optimizing energy consumption in an Internet of Vehicles environment, so as to achieve the allocation of computing resources of vehicle groups and reduce the energy consumption of edge nodes.
[0006] The first aspect of the present application provides a method for dynamically allocating edge computing resources and optimizing energy consumption in an Internet of Vehicles environment, comprising:
[0007] obtaining a first vehicle group in a first lane, and predicting a first motion trajectory of the first vehicle group in a future preset time period;
[0008] determining a set of computing nodes corresponding to the first lane in an Internet of Vehicles environment, and determining a target node sequence corresponding to the first motion trajectory according to the load information and coverage range of each node in the set of computing nodes;
[0009] if the energy consumption value of the first node in the target node sequence exceeds an energy consumption threshold, determining a migration task of the first node and a target migration node corresponding to the first node, and migrating the migration task to the target migration node.
[0010] The second aspect of the present application provides a system for dynamically allocating edge computing resources and optimizing energy consumption in an Internet of Vehicles environment, comprising:
[0011] The prediction module is configured to acquire a first vehicle group in a first lane, and predict a first motion trajectory of the first vehicle group in a future preset time period.
[0012] The determination module is configured to determine a set of computing nodes corresponding to the first lane in the Internet of Vehicles environment, and determine a target node sequence corresponding to the first motion trajectory according to load information and coverage range of each node in the set of computing nodes.
[0013] The migration module is configured to determine a migration task of a first node in the target node sequence and a target migration node corresponding to the first node, and migrate the migration task to the target migration node if an energy consumption value of the first node exceeds an energy consumption threshold.
[0014] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method for dynamic allocation of edge computing resources and energy consumption optimization in an Internet of Vehicles environment.
[0015] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method for dynamic allocation of edge computing resources and energy consumption optimization in an Internet of Vehicles environment.
[0016] The method for dynamic allocation of edge computing resources and energy consumption optimization in an Internet of Vehicles environment provided by the present application has the following advantages:
[0017] Firstly, by predicting the first motion trajectory of the first vehicle group in the future preset time period, the accuracy and continuity of the matching of the computing nodes to the vehicle group can be improved.
[0018] Secondly, by determining the target node sequence corresponding to the first motion trajectory according to the load information and coverage range of each node in the set of computing nodes, the vehicle group can always access the optimal node within the coverage range in the preset time period.
[0019] Thirdly, by monitoring the energy consumption value of the node and triggering the migration mechanism after the energy consumption value exceeds the energy consumption threshold, the migration task of the first node and the target migration node are determined, which can optimize the energy consumption of the high-energy-consumption node, and reduce the energy consumption of the node while realizing the allocation of computing resources. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0021] Figure 1 A flowchart of a method for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle networking environment according to an embodiment of the present application is shown in FIG. 1.
[0022] Figure 2 A structural block diagram of a system for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle networking environment according to an embodiment of the present application is shown in FIG. 2.
[0023] Figure 3 A schematic block diagram of an electronic device according to an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0024] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details that hinder the description of the present application.
[0025] In order to make the purpose, technical solutions and advantages of the present application clearer, the following will be described by specific embodiments in conjunction with the drawings.
[0026] Reference will be made to Figure 1 , Figure 1 A flowchart of a method for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle networking environment according to an embodiment of the present application is shown in FIG. 1. The method comprises:
[0027] S101: Obtain a first vehicle group in a first lane, and predict a first motion trajectory of the first vehicle group in a future preset time period.
[0028] In the present embodiment, the physical lanes served by the current vehicle networking can be divided, such as the physical lanes can be divided according to the lane number of the physical lanes, and each physical lane obtained after the division is determined as the first lane. The lane number is the unique identification information of the physical lane pre-set in the road planning process, which can be obtained by reading from the pre-stored file related to the physical lane. The first lane represents a first lane with clear boundaries, functions and directions corresponding to each physical number in the vehicle networking environment.
[0029] In the embodiment, the running data of each vehicle in the first lane in each preset time period can be acquired in parallel, the running data including position information, speed and heading angle of the vehicle.
[0030] In the embodiment, the first vehicle group in the first lane can be acquired. The vehicles in the first lane can be clustered according to the running data of each vehicle in the first lane to obtain a cluster. The vehicles corresponding to a cluster with a number greater than or equal to a number threshold can be determined as the first vehicle group, which can represent each vehicle group with a number reaching the number threshold, close spatial distance, similar driving speed, consistent driving direction and no large interval on the first lane. The clustering result of the first lane can be updated every preset time period, and a new first vehicle group can be determined. The preset time period and the number threshold can be determined according to actual conditions, which are not limited in the present application.
[0031] In the embodiment, the first vehicle group can include one or more. After obtaining the first vehicle group, the same processing mode can be adopted for each first vehicle group, and the first motion trajectory of each first vehicle group in a future preset time period can be predicted based on the running characteristics of each first vehicle group. The first motion trajectory of the first vehicle group can include the center position coordinates of the first vehicle group in each time step in the preset time period. The first motion trajectory can represent the overall movement path of the first vehicle group in the future preset time period, and can be formed by concatenating the center positions of the first vehicle group in each time step. The time step is used to represent the minimum time unit of division, and is used to divide the future preset time period into several continuous and equal time segments. The time step can be determined according to actual conditions, which is not limited in the present application.
[0032] In the above manner, the motion trajectory of the first vehicle group can be accurately predicted, and accurate time and space dimensions can be provided for subsequent matching and resource allocation of the edge node.
[0033] Step S102: determining a set of computing nodes corresponding to the first lane in the Internet of Vehicles environment, and determining a target node sequence corresponding to the first motion trajectory according to the load information and coverage range of each node in the set of computing nodes.
[0034] In this embodiment, the first lane can be determined to correspond to a set of computing nodes in the vehicle networking environment. As an example, a relational database of lanes and edge nodes in the vehicle networking environment can be called, which stores the mapping relationship between the identification information of each lane and the corresponding edge computing node. By retrieving the identification information of the first lane, all edge computing nodes that have a spatial coverage association with the lane can be obtained to form the set of computing nodes. The spatial coverage association means that the signal coverage range of the node actually overlaps with the physical section of the first lane, and the length of the overlapping section is not less than a length threshold to ensure that the node can provide stable services for vehicles in the first lane. The length threshold can be determined according to actual conditions, which is not limited in the present application.
[0035] In this embodiment, after obtaining the set of computing nodes corresponding to the first lane, the load information and coverage range of each node in the set can be collected. The load information can include the current CPU (Central Processing Unit) usage rate, remaining memory capacity, task queue length, and data transmission delay of the node; and the coverage range can include the geographical coordinate boundary covered by the node signal, the starting and ending mileages corresponding to the coverage on the first lane, and the like.
[0036] In this embodiment, after obtaining the load information and coverage range of each node in the set of computing nodes, the target node sequence corresponding to the first motion trajectory of the first vehicle group can be determined. For the center position coordinates of the first vehicle group corresponding to each time step in the first motion trajectory, the corresponding position of the center position coordinates on the first lane can be determined. Then, for each position, the nodes whose coverage range contains the mileage position are selected from the set of computing nodes as candidate nodes for the time step.
[0037] In this embodiment, after obtaining the candidate nodes for each time step, the candidate nodes can be screened. As an example, screening conditions can be set, such as the CPU usage rate not exceeding a load rate threshold, the remaining memory capacity not being less than the memory requirement corresponding to the first vehicle group, the task queue length not exceeding a queue length threshold, and the data transmission delay not exceeding a delay threshold. The candidate nodes that meet all the above screening conditions are determined as valid nodes. If there are multiple valid nodes for a time step, the comprehensive scores of the valid nodes can be calculated, which can be based on the CPU usage rate, the remaining memory capacity, the task queue length, and the data transmission delay, and calculated according to the weights. The valid node with the highest comprehensive score is selected as the target node for the time step. The load rate threshold, the queue length threshold, and the delay threshold can be determined according to actual conditions, which are not limited in the present application.
[0038] In this embodiment, after determining the target node of each time step, the target nodes of each time step can be arranged in time sequence to form an initial node sequence. After obtaining the initial node sequence, the continuity of the initial node sequence can be checked. Specifically, the coverage ranges of the target nodes corresponding to two adjacent time steps in the initial node sequence on the first lane can be determined respectively, and the overlapping distance of the coverage ranges corresponding to the two adjacent time steps on the first lane can be determined. If the overlapping distance is not less than the second distance threshold, it means that the two target nodes can realize smooth switching. If the overlapping distance is less than the second distance threshold and the target nodes corresponding to the two time steps are different, it is further determined whether there is a node in the two target nodes that satisfies the filtering condition of the first vehicle group at the two time steps respectively. If there is a node that satisfies the condition, the node that satisfies the condition can be determined as the target node corresponding to the two time steps. The node sequence formed after the continuity check and adjustment is the target node sequence corresponding to the first motion trajectory.
[0039] By determining the calculation node set and screening the target node sequence, it can be ensured that the first vehicle group is always provided with services by suitable edge computing nodes in the future preset time period, and the continuity and stability of the services are guaranteed, thereby improving the reliability of edge computing resource allocation in the vehicle networking environment.
[0040] Step S103: If the energy consumption value of the first node in the target node sequence exceeds the energy consumption threshold, a migration task of the first node and a target migration node corresponding to the first node are determined, and the migration task is migrated to the target migration node.
[0041] In this embodiment, the energy consumption values of the nodes in the target node sequence can be monitored in real time. When it is monitored that the energy consumption value of the first node exceeds the energy consumption threshold, the task migration mechanism can be started. As an example, the energy consumption value of the first node can include the sum of the calculation energy consumption, the data transmission energy consumption and the device standby energy consumption, and the energy consumption threshold can be determined based on the hardware parameters, the energy efficiency level and the historical running data of the first node, which is not limited in the present application.
[0042] In this embodiment, after determining that the start task migration mechanism needs to be performed, the migration task of the first node can be determined. All tasks currently running on the first node can be prioritized according to real-time, and the priority division can be based on factors such as the response time requirement of the task, the degree of influence on the driving safety of the vehicle group, and the like. For example, tasks such as real-time position calculation of the vehicle group, emergency braking signal processing, and the like can be divided into high-priority tasks, and tasks such as historical trajectory data backup, non-critical performance statistics, and the like can be divided into low-priority tasks. The low-priority tasks with a priority lower than a preset priority threshold can be determined as the migration task, and the total computing power requirement of the migration task does not exceed a preset percentage of the current total task computing power requirement of the first node, so as to avoid affecting the processing efficiency of the first node on the high-priority tasks due to a large number of task migrations. The preset percentage can be determined according to actual conditions, such as the preset percentage can be 30%.
[0043] In this embodiment, after determining the migration task, the target migration node corresponding to the first node can be determined. The target migration node can be preferentially selected from the target node sequence, so as to ensure the stability of data transmission, the target migration node has enough resources to undertake the migration task, and the storage requirement of the migration task can be met, and the data transmission delay in the task migration process is reduced.
[0044] In this embodiment, after determining the target migration node, the migration task can be migrated to the target migration node. After the migration is completed, the computing resources, storage resources and communication resources corresponding to the migration task in the first node can be released, so as to reduce the energy consumption of the first node.
[0045] Through the above task migration process, in the case that the energy consumption of the first node exceeds the standard, part of the tasks can be timely migrated to the appropriate target migration node, which not only ensures the continuity and reliability of the vehicle group service, but also effectively reduces the energy consumption of the first node, and realizes the dynamic allocation and energy consumption optimization of edge computing resources in the Internet of Vehicles environment.
[0046] In an embodiment of the present application, the first vehicle group in the first lane is obtained, comprising:
[0047] Obtaining the running data of the vehicle in the first lane, the running data comprising the position information, speed and heading angle of the vehicle;
[0048] According to the running data, the Euclidean distance, speed difference and heading angle difference between any two adjacent vehicles in the first lane are determined, and the vehicles in the first lane are clustered according to the first constraint condition to obtain a cluster; the vehicle group corresponding to each cluster is determined as the first vehicle group;
[0049] The first constraint condition comprises:
[0050] the Euclidean distance between any two vehicles in the first lane is less than or equal to a first distance threshold, the speed difference between any two vehicles is less than or equal to a speed threshold, the heading angle difference between any two vehicles is less than or equal to an angle threshold, and the number of vehicles in the cluster is greater than or equal to a number threshold.
[0051] In this embodiment, the running data of all vehicles in the first lane can be collected in real time. The running data includes the position information, speed and heading angle of the vehicle, and the position information of the vehicle can include the latitude and longitude coordinates of the vehicle.
[0052] In this embodiment, after obtaining the running data, the Euclidean distance, speed difference and heading angle difference between any two adjacent vehicles in the first lane can be calculated based on the running data. Specifically, the Euclidean distance refers to the straight-line distance between the position coordinates of the two vehicles in the first lane; the speed difference refers to the absolute difference between the real-time speeds of the two vehicles; and the heading angle difference refers to the absolute difference between the heading angles of the two vehicles.
[0053] In this embodiment, the vehicles in the first lane can be clustered according to the first constraint condition to obtain a cluster. The first constraint condition includes: the Euclidean distance between any two vehicles is less than or equal to a first distance threshold, which can be 10 meters to ensure that the vehicles are in a relatively close range in space; the speed difference between any two vehicles is less than or equal to a speed threshold to ensure that the vehicles have similar speeds; the heading angle difference between any two vehicles is less than or equal to an angle threshold to ensure that the vehicles have substantially consistent directions; and the number of vehicles in the cluster is greater than or equal to a number threshold, which can be 3 to ensure that a vehicle group of a certain size is formed. The first distance threshold, speed threshold, angle threshold and number threshold can be determined according to the actual situation of the first road, which is not limited in the present application.
[0054] In this embodiment, each vehicle group corresponding to a cluster that meets the first constraint condition can be determined as a first vehicle group. If there are multiple clusters that meet the condition in the first lane, each cluster corresponds to an independent first vehicle group, and subsequent motion trajectory prediction and edge node matching will be performed for each first vehicle group.
[0055] Through the above clustering processing based on the multi-dimensional constraint condition, the vehicle group with the cooperative motion feature in the first lane can be accurately identified, which provides accurate service object division basis for subsequent targeted allocation of edge computing resources of Internet of Vehicles.
[0056] In an embodiment of the present application, the first motion trajectory of the first vehicle group in a future preset time period is predicted, including:
[0057] determine a running feature of the first vehicle group, the running feature comprising average speed, speed standard deviation, average heading angle, heading angle standard deviation, average inter-vehicle distance, inter-vehicle distance standard deviation, lane keeping probability, vehicle density, length of the first vehicle group of each vehicle in the first vehicle group in each time step;
[0058] determine a first motion trajectory of the first vehicle group in a future preset time period according to the pre-trained first graph neural network, the first motion trajectory comprising a center position coordinate of the first vehicle group in each time step in the future preset time period.
[0059] In the embodiment, the running feature of the first vehicle group can be determined, which can include average speed, speed standard deviation, average heading angle, heading angle standard deviation, average inter-vehicle distance, inter-vehicle distance standard deviation, lane keeping probability, vehicle density, length of the first vehicle group of each vehicle in the first vehicle group in each time step, which can comprehensively characterize the overall motion state characteristics of the first vehicle group. Determining the running feature of the first vehicle group can include: calculating the average speed of each vehicle in the first vehicle group in each time step in the current monitored preset time period, which can reflect the overall driving speed of the first vehicle group; calculating the speed standard deviation corresponding to the deviation degree of the speed of all vehicles in the first vehicle group in the time step from the average speed, the smaller the value, the more consistent the vehicle speed; calculating the average heading angle of all vehicles in the first vehicle group in the time step, which reflects the overall driving direction of the vehicle group; calculating the heading angle standard deviation of the heading angle of all vehicles in the first vehicle group in the time step from the average heading angle, the smaller the value, the more uniform the vehicle driving direction; calculating the average inter-vehicle distance of the Euclidean distance between adjacent vehicles in the first vehicle group in the time step, which reflects the overall density of the vehicle group; calculating the inter-vehicle distance standard deviation of the deviation degree of the inter-vehicle distance between adjacent vehicles in the first vehicle group in the time step from the average inter-vehicle distance, the smaller the value, the more uniform the vehicle distribution; calculating the lane keeping probability according to the proportion of vehicles deviating from the first lane in the first vehicle group in the time step, such as 2 out of 10 vehicles deviating temporarily, the lane keeping probability is 80%, which reflects the lane stability of the vehicle group; calculating the vehicle density of the average number of vehicles per unit length of the lane in the time step, which reflects the congestion degree of the vehicle group; calculating the Euclidean distance between the first vehicle position and the last vehicle position in the first vehicle group in the time step, which reflects the spatial span of the vehicle group.
[0060] In the embodiment, after obtaining the running feature, the running feature can be input into the pre-trained first graph neural network to predict the first motion trajectory of the first vehicle group in a future preset time period. The first graph neural network is trained based on the running sample data of the vehicle group in the first lane. The running feature can be input into the pre-trained first graph neural network, and the first graph neural network includes an input layer, a first hidden layer, a second hidden layer, and an output layer. The input layer is used to receive the running feature corresponding to each continuous time step. The first hidden layer has a dimension of 64 and adopts a graph convolution network to extract the internal correlation feature of the first vehicle group. The second hidden layer has a dimension of 32 and embeds an attention mechanism to strengthen the influence weight of the head vehicle in the first vehicle group on the trajectory of the first vehicle group. The output layer outputs the first motion trajectory of the first vehicle group in the future preset time period, and the first motion trajectory includes the center position coordinates of the first vehicle group in each time step in the future preset time period.
[0061] By combining the multi-dimensional running feature of the first vehicle group and the time series prediction ability of the first neural network, the overall motion trend of the first vehicle group can be accurately captured, so that the predicted first motion trajectory not only conforms to the driving characteristics of individual vehicles, but also reflects the cooperative law of the vehicle group, thereby providing reliable space-time basis for the dynamic matching of subsequent edge nodes.
[0062] In an embodiment of the present application, the target node sequence corresponding to the first motion trajectory is determined according to the load information and coverage range of each node in the set of computing nodes, including:
[0063] For each time step in the future preset time period, the center position coordinates of the first vehicle group corresponding to the first motion trajectory in the time step are determined; the first position range of the first vehicle group corresponding to the time step is determined according to the center position coordinates; at least one first candidate node covering the first position range is selected from the set of computing nodes; and the target node corresponding to the time step is determined according to the load rate, the remaining memory capacity, the task queue length, and the average data packet delay of the first candidate node.
[0064] According to the order of the time steps in the future preset time period, the target nodes corresponding to the time steps are sequentially arranged to obtain the target node sequence.
[0065] If the two target nodes corresponding to the adjacent two time steps are different, and the overlapping distance of the coverage ranges of the two target nodes is less than the second distance threshold, a node is selected from the two target nodes corresponding to the adjacent two time steps as the updated target node of the adjacent two time steps, and the target node sequence is updated based on the updated target node.
[0066] In this embodiment, for each time step in the future preset time period, the center position coordinate of the first vehicle group corresponding to the first motion trajectory in the time step can be determined. As an example, if the time step is 1 second and the future preset time period is 5 seconds, the center position coordinate corresponding to the 5th time step, i.e., the center position coordinate of the first vehicle group at the 5th second after the prediction starts, can be determined.
[0067] In this embodiment, the first position range of the first vehicle group corresponding to the time step can be determined according to the center position coordinate. Specifically, the center position coordinate can be taken as a reference point, and the running characteristics of the first vehicle group, such as the length of the first vehicle group being 80 meters and the maximum transverse width of all vehicles in the first vehicle group being 5 meters, can be combined. A rectangular region is formed with the center position coordinate as the center, extending 40 meters forward and backward to cover the length of the first vehicle group, and extending 2.5 meters left and right to cover the transverse width of the first vehicle group. To cope with possible small lane changes or speed fluctuations of the vehicles, a certain fluctuation threshold can be added to the rectangular region, such as a 10% redundancy range. The length of the rectangular region can be extended by 4 meters in the forward and backward directions based on the center, and the width of the rectangular region can be extended by 0.25 meters in the left and right directions based on the center according to the fluctuation threshold. The final region is the first position range of the time step. The first position range can cover the possible positions of all vehicles in the first vehicle group in the time step.
[0068] In this embodiment, at least one first candidate node covering the first position range can be selected from the set of computing nodes. If the circular region of the first position range falls completely within the coverage range of a node, the node is selected as the first candidate node.
[0069] In this embodiment, the target node corresponding to the time step is determined according to the load rate, the remaining memory capacity, the task queue length and the average data packet delay of the first candidate node. The target node can be screened according to the following rules: nodes with a load rate less than or equal to a preset load rate threshold, a remaining memory capacity greater than or equal to the memory requirement of the first vehicle group corresponding to a single time step, a task queue length less than or equal to a preset queue length threshold, and an average data packet delay less than or equal to a preset delay threshold can be reserved. If only one node is left after screening, the node is the target node. If there are multiple nodes, the comprehensive score of each node is calculated, for example, the weighted sum of the load rate, the remaining memory capacity, the task queue length and the average data packet delay of each node can be determined as the comprehensive score, and the node with the highest comprehensive score can be selected as the target node. The weights of the load rate, the remaining memory capacity, the task queue length and the average data packet delay can be determined according to actual conditions, which are not limited in the present application.
[0070] In this embodiment, the target nodes of each time step can be arranged in order according to the order of the time steps in the future preset time period to obtain an initial target node sequence.
[0071] If the two adjacent time steps in the target node sequence correspond to different target nodes, and the overlap distance of the coverage ranges of the two target nodes is less than the second distance threshold, it is necessary to determine whether to update the target node sequence. Specifically, the second position range corresponding to the first vehicle group in the two adjacent time steps can be determined first. The second position range can be determined according to the center position coordinates of the first vehicle group in the two time steps respectively, and the maximum transverse width of the first vehicle group, wherein the position range corresponding to each time step can be determined based on the method of determining the first position range, and the union of the position ranges corresponding to the two time steps is determined as the second position range. From the two target nodes, it is determined whether there is a node whose coverage range contains the second position range and satisfies the conditions that the load rate is less than or equal to the load rate threshold, the remaining memory capacity is greater than or equal to the memory requirement corresponding to the first vehicle group, the task queue length is less than or equal to the queue length threshold, and the average data packet delay is less than or equal to the delay threshold. If there is a node that satisfies the above screening conditions, it can be determined as the updated target node corresponding to the two adjacent time steps. If both nodes satisfy the above conditions, the node with a larger load rate can be selected as the updated target node corresponding to the two adjacent time steps. For example, if the target nodes corresponding to the adjacent time steps are edge node R1 and edge node R2, the second distance threshold is 35 meters, and the overlap distance of the coverage ranges of the two nodes is 30 meters, which is less than the second distance threshold, if the coverage range of R2 contains the second position range corresponding to the first vehicle group and R2 satisfies the conditions that the load rate is less than or equal to the load rate threshold, the remaining memory capacity is greater than or equal to the memory requirement corresponding to the first vehicle group, the task queue length is less than or equal to the queue length threshold, and the average data packet delay is less than or equal to the delay threshold, the target nodes of the two time steps are updated to R2, and the entire target node sequence is adjusted based on the updated target nodes.
[0072] Through the above steps, it can be ensured that the target node sequence not only fits the motion trajectory of the first vehicle group, but also maintains service continuity when the node switches, thereby providing stable node support for dynamic resource allocation of Internet of Vehicles edge computing.
[0073] In an embodiment of the present application, determining the target node corresponding to the time step according to the load rate, the remaining memory capacity, the task queue length and the average data packet delay of the first candidate node comprises:
[0074] The nodes in the first candidate nodes that satisfy the conditions that the load rate is less than or equal to the load rate threshold, the remaining memory capacity is greater than or equal to the memory requirement corresponding to the first vehicle group, the task queue length is less than or equal to the queue length threshold, and the average data packet delay is less than or equal to the delay threshold are determined as the second candidate nodes.
[0075] If the second candidate node contains only one node, the second candidate node is determined as the target node of the time step; if the second candidate node contains multiple nodes, the resource adaptation score of each second candidate node is calculated, and the second candidate node with the highest resource adaptation score is determined as the target node corresponding to the time step.
[0076] In this embodiment, the second candidate node corresponding to the time step can be determined according to the load rate, the remaining memory capacity, the task queue length and the average data packet delay of the first candidate node. Specifically, the nodes in the first candidate node that meet the screening conditions can be determined as the second candidate nodes, and the screening conditions can include that the load rate is less than or equal to the load rate threshold, the remaining memory capacity is greater than or equal to the memory demand of the first vehicle group, the task queue length is less than or equal to the queue length threshold, and the average data packet delay is less than or equal to the delay threshold.
[0077] In this embodiment, after obtaining the second candidate nodes, the target node corresponding to the time step can be determined according to the number of the second candidate nodes. If the second candidate node contains only one node, the node can be directly determined as the target node of the time step; if the second candidate node contains multiple nodes, the resource adaptation score of each second candidate node can be calculated, and the node with the highest resource adaptation score can be determined as the target node. The calculation of the resource adaptation score can be combined with the weight of each parameter. For example, the weight of each parameter corresponding to each parameter can be determined according to the actual situation, such as the weight of the load rate can be set to 30%, the weight of the remaining memory capacity can be set to 20%, the weight of the task queue length can be set to 20%, and the weight of the average data packet delay can be set to 30%. In the specific calculation, the first ratio between the current load rate and the load rate threshold can be determined, the difference between the value 1 and the first ratio is determined as the score of the load rate; the ratio of the current remaining memory capacity to the memory demand of the vehicle group is determined as the score of the remaining memory capacity; the second ratio between the current queue length and the queue length threshold is determined, and the difference between the value 1 and the second ratio is determined as the score of the task queue length; the third ratio between the average data packet delay and the delay threshold is determined, and the difference between the value 1 and the third ratio is determined as the score of the average data packet delay; the weighted sum of each score and the weight corresponding to each score can be determined as the resource adaptation score.
[0078] By determining the second candidate node and the target node in the above manner, it can be ensured that the selected node can meet the needs of the first vehicle group in terms of load, memory, task processing capacity and transmission delay, and the optimal solution can be selected from multiple candidate nodes through the resource adaptation score, so as to provide accurate and stable edge computing service for the vehicle group, and improve the rationality and reliability of resource allocation in the vehicle networking environment.
[0079] In an embodiment of the present application, if the energy consumption value of the first node in the target node sequence exceeds the energy consumption threshold, the migration task of the first node and the target migration node corresponding to the first node are determined, and the migration task is migrated to the target migration node, comprising:
[0080] The energy consumption value of each node in the target node sequence at each time step is monitored;
[0081] If the energy consumption value of the first node in the first number of continuous time steps exceeds the energy consumption threshold, the non-real-time task with a priority lower than the preset threshold in the first node is determined as the migration task;
[0082] The node in the target node sequence that satisfies the second constraint condition is determined as the candidate migration node, and the node with the smallest load rate in the candidate migration node is determined as the target migration node; wherein the second constraint condition is:
[0083] The overlapping distance corresponding to the coverage range of the first node is greater than or equal to the third distance threshold;
[0084] The current load rate is less than or equal to the load rate threshold;
[0085] The remaining memory capacity is greater than or equal to the first multiple of the memory corresponding to the migration task;
[0086] The communication delay corresponding to the migration path between the first node and the target migration node is less than or equal to the delay threshold.
[0087] In the present embodiment, the energy consumption value of each node in the target node sequence at each time step can be monitored. The energy consumption value can be the sum of the energy consumption of calculation, data transmission and device standby, respectively. The calculation energy consumption refers to the energy consumption of the calculation components such as CPU and GPU generated when the node processes tasks, which can be calculated according to the power of the calculation components and the task processing time; the data transmission energy consumption refers to the energy consumption of the communication module generated when the node interacts with the first vehicle group and other nodes, which can be determined based on the data transmission amount, transmission rate and communication module power; the device standby energy consumption refers to the basic energy consumption of the node when it is in the running state but does not process tasks, which is determined by the device hardware parameters. The three types of energy consumption can be collected in real time, and the sampling frequency is consistent with the time step.
[0088] If the energy consumption value of the first node exceeds the energy consumption threshold in a continuous first number of time steps, a determination process of the migration task is started. As an example, the first number can be set to 3 time steps, and the energy consumption threshold can be set based on the rated power of the first node and the energy efficiency standard. When the energy consumption values of the first node in the 5th, 6th and 7th consecutive time steps exceed the energy consumption threshold, the task migration mechanism can be started. At this time, the non-real-time tasks with a priority lower than a preset threshold in the first node can be determined as migration tasks. The task priority can be divided according to the service type, for example, tasks related to driving safety such as vehicle real-time navigation data processing, emergency braking signal response, etc. are high priority; tasks such as historical trajectory storage, non-critical performance statistics, etc. are low priority. These low-priority tasks are determined as migration tasks, and the total computing power demand of the migration tasks does not exceed a preset percentage of the current total task computing power of the first node, avoiding affecting the processing of high-priority tasks. The preset percentage can be determined according to actual conditions, for example, the preset percentage can be set to 30%.
[0089] In the present embodiment, after determining the migration task, a node satisfying a second constraint condition can be selected from the target node sequence as a candidate migration node, and the node with the smallest load rate among them is determined as the target migration node. The second constraint condition includes: the overlapping distance corresponding to the coverage range of the first node is greater than or equal to a third distance threshold, ensuring that the service area of the node has sufficient overlap with the position range of the first vehicle group, reducing the risk of service interruption of the first vehicle group; the current load rate is less than or equal to a load rate threshold, ensuring that the candidate node has sufficient redundant resources to undertake the migration task; the remaining memory capacity is greater than or equal to a first multiple of the memory corresponding to the migration task, such as 1.2 times, if the migration task requires 1GB of memory, then the remaining memory of the candidate node is ≥1.2GB, meeting the storage demand of the migration task; the communication delay corresponding to the migration path between the first node and the target migration node is less than or equal to a delay threshold, such as 30ms, ensuring that task data can be quickly transmitted and reducing migration time consumption.
[0090] After determining the target migration node, the related data of the migration task including the task program, the intermediate calculation result, the progress marker, etc. can be transmitted to the target migration node through an encrypted data transmission channel. After the target migration node completes the environment deployment and confirms that it can take over the task, the running of the migration task on the first node is stopped, and the target migration node continues to execute. After the migration is completed, the energy consumption value of the first node can be significantly reduced, achieving energy consumption optimization while ensuring service continuity.
[0091] Through the above process, the migration task and the target node can be accurately selected in the case of excessive node energy consumption, avoiding the influence of high-priority tasks, and ensuring the stability of the target node after migration through the principle of minimizing the load rate, effectively balancing the demand for service quality and energy consumption control of the Internet of Vehicles.
[0092] In an embodiment of the present application, if there is no candidate migration node in the target node sequence that satisfies the second constraint condition, a node that satisfies the second constraint condition is selected from a backup node pool corresponding to an overlapping distance of a coverage range of the first node greater than or equal to a third distance threshold to determine as a candidate migration node.
[0093] If there is no candidate migration node in the backup node pool that satisfies the second constraint condition, the migration task is split into multiple sub-tasks, and the sub-tasks are migrated to adjacent nodes of the first node with a load rate less than or equal to a load rate threshold.
[0094] In the present embodiment, when there is no node in the target node sequence that satisfies the second constraint condition, the backup node pool can be called. The backup node pool is a set of pre-deployed redundant edge nodes, including temporarily deployed mobile edge terminals, roadside units on non-main roads, etc., and the coverage range thereof needs to have a certain overlap with the first node. Nodes with an overlapping distance of the coverage range of the first node greater than or equal to a third distance threshold can be screened from the backup node pool, and whether these nodes satisfy other requirements in the second constraint condition, such as load rate, memory, latency, etc., is checked, and nodes that satisfy the conditions are determined as candidate migration nodes.
[0095] If there is still no candidate migration node in the backup node pool that satisfies the second constraint condition, the migration task can be split. Specifically, the migration task is split into multiple sub-tasks according to the proportion of computing power requirements, and the computing power requirement of each sub-task does not exceed a preset proportion threshold, such as 30%, of the total requirement of the original migration task. After splitting, these sub-tasks are migrated to adjacent nodes of the first node, which need to satisfy a load rate less than or equal to a load rate threshold. Among them, the adjacent node represents an edge node that is geographically close and has an overlapping distance of the coverage range of the first node greater than or equal to a third distance threshold. When migrating, it is necessary to ensure that the computing power of each adjacent node that undertakes a sub-task does not exceed a preset percentage, such as 30%, of the remaining computing power, to avoid overload due to undertaking too much. The third distance threshold and the fourth distance threshold can be determined according to actual conditions, which are not limited by the present application.
[0096] In the present embodiment, in the sub-task migration process, an independent encrypted data channel can be established for each sub-task to synchronize the corresponding task data. After the adjacent nodes complete the environment deployment, the sub-tasks are started respectively. After migration is completed, the sub-tasks run in parallel on the adjacent nodes, and finally the calculation results are aggregated and fed back to the first node or the first vehicle group, ensuring the integrity of the service logic. For example, the three split sub-tasks are migrated to adjacent nodes N-1, N-2, and N-3 respectively, and after completion, the results are aggregated and fed back by node N-1, ensuring that the overall effect of the migration task is not affected.
[0097] Through the above hierarchical processing strategy, when there is no suitable node in the target node sequence and the standby node pool, migration can still be achieved through task splitting, which not only avoids the risk of excessive load of a single node, but also ensures the continuity of the migration task, further improves the robustness of the energy consumption optimization scheme of the vehicle networking edge computing, and adapts to complex and variable road scenes.
[0098] In an embodiment of the present application, if there are vehicles in the first lane that do not meet the conditions for clustering or the divided clusters do not meet the first constraint conditions of the first vehicle group, these vehicles can be established as independent individuals to establish an independent identification file, and their running data such as position information, speed, and heading angle can be collected and updated in real time, and the data sampling frequency is consistent with that of the first vehicle group to ensure that the monitoring granularity is equivalent; a prediction model suitable for individuals can be used, such as a single vehicle trajectory prediction algorithm based on Kalman filtering, which does not need to calculate the group center position and directly predicts the individual motion trajectory of each vehicle in the future preset time period, and the time step is synchronized with that of the first vehicle group; when matching the edge node, the constraint condition of spatial coverage is relaxed: for independent vehicles, the node coverage range only needs to contain the individual position coordinates, and the overlap length of the coverage range and the vehicle driving path is greater than or equal to a preset path threshold, which can be determined according to actual conditions and is not limited in the present application, such as 30 meters; in terms of resource allocation, the resource amount is calculated according to the actual needs of individuals, and the node load rate threshold can be appropriately relaxed compared with the load rate threshold, such as increasing the load rate threshold by 5% of the original, to prioritize the basic service needs.
[0099] In the present embodiment, all vehicles in the first lane can be re-clustered every preset time period, and vehicles that do not form effective clusters are dynamically tracked. If the first constraint condition is met, they are clustered into the first vehicle group and included in the above vehicle group management process; if it is not met continuously, they are managed individually until they leave the first lane.
[0100] Through the above processing, all vehicles in the first lane can obtain edge computing services, and differentiated management strategies can avoid resource waste, so that the scheme can still operate efficiently in scenarios with sparse traffic or scattered vehicle distribution, and meet the service needs of all vehicles on the road.
[0101] It needs to be further explained that one or more first lanes can exist in the application, and one or more first vehicle groups in the first lane can also exist, each first vehicle group in each first lane corresponds to a first motion trajectory in a future preset time period, and each first motion trajectory corresponds to a target node sequence; the energy consumption threshold corresponding to each target node sequence can be the same or different; it can be determined whether the energy consumption value in each target node sequence exceeds the energy consumption threshold corresponding to the target node sequence, if the energy consumption value of a first node in a target node sequence exceeds the energy consumption threshold, the migration task of the first node and the target migration node corresponding to the first node can be determined, and the migration task is migrated to the target migration node.
[0102] A method for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle networking environment corresponding to the above embodiment, Figure 2 An embodiment of the application provides a structural block diagram of a system for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle networking environment. For the sake of convenience, only the parts related to the embodiments of the application are shown. For reference Figure 2 The system for dynamic allocation of edge computing resources and energy consumption optimization in the vehicle networking environment 20 comprises a prediction module 21, a determination module 22 and a migration module 23.
[0103] The prediction module 21 is configured to obtain a first vehicle group in a first lane and predict a first motion trajectory of the first vehicle group in a future preset time period.
[0104] The determination module 22 is configured to determine a set of computing nodes corresponding to the first lane in the vehicle networking environment, and determine a target node sequence corresponding to the first motion trajectory according to the load information and coverage range of each node in the set of computing nodes.
[0105] The migration module 23 is configured to determine a migration task of a first node and a target migration node corresponding to the first node if the energy consumption value of the first node in the target node sequence exceeds the energy consumption threshold, and migrate the migration task to the target migration node.
[0106] In an embodiment of the application, the prediction module 21 is further configured to obtain running data of the vehicles in the first lane, the running data comprising position information, speed and heading angle of the vehicles; determine the Euclidean distance, speed difference and heading angle difference between any two adjacent vehicles in the first lane, and perform clustering processing on the vehicles in the first lane according to the first constraint condition to obtain a class cluster; determine the vehicle group corresponding to each class cluster as a first vehicle group; wherein the first constraint condition comprises: the Euclidean distance is less than or equal to a first distance threshold, the speed difference is less than or equal to a speed threshold, the heading angle difference is less than or equal to an angle threshold, and the number of vehicles in the class cluster is greater than or equal to a number threshold.
[0107] The prediction module 21 is further configured to determine a running feature of the first vehicle group, the running feature including an average speed, a speed standard deviation, an average heading angle, a heading angle standard deviation, an average inter-vehicle distance, an inter-vehicle distance standard deviation, a lane keeping probability, a vehicle density, and a length of the first vehicle group in each time step of the first vehicle group; and determine a first motion trajectory of the first vehicle group in a future preset time period according to the pre-trained first graph neural network, the first motion trajectory including a center position coordinate of the first vehicle group in each time step in the future preset time period.
[0108] The determination module 22 is further configured to: determine, for each time step in the future preset time period, a center position coordinate of the first vehicle group in the time step according to the first motion trajectory; determine a first position range of the first vehicle group in the time step according to the center position coordinate; select at least one first candidate node covering the first position range from the set of computing nodes; determine a target node corresponding to the time step according to a load rate, a remaining memory capacity, a task queue length, and an average data packet delay of the first candidate node; and arrange the second candidate nodes of the time steps in a sequence according to a time sequence of the time steps in the future preset time period, to obtain a target node sequence; wherein, if two adjacent time steps in the target node sequence correspond to different target nodes, and an overlap distance of the coverage ranges of the target nodes corresponding to the two adjacent time steps is less than a second distance threshold, a node covering the second position ranges of the first vehicle group in the two adjacent time steps and having a load rate less than or equal to a load rate threshold, a remaining memory capacity greater than or equal to a memory requirement of the first vehicle group, a task queue length less than or equal to a queue length threshold, and an average data packet delay less than or equal to a delay threshold is selected from the target nodes corresponding to the two adjacent time steps as an updated target node corresponding to the two adjacent time steps, and the target node sequence is updated based on the updated target node.
[0109] The determination module 22 is further configured to: determine, from the first candidate nodes, a node having a load rate less than or equal to a load rate threshold, a remaining memory capacity greater than or equal to a memory requirement of the first vehicle group, a task queue length less than or equal to a queue length threshold, and an average data packet delay less than or equal to a delay threshold as a second candidate node; if the second candidate node includes only one node, determine the second candidate node as the target node of the time step; and if the second candidate node includes multiple nodes, calculate a resource adaptation degree score of each second candidate node, and determine a second candidate node with a highest resource adaptation degree score as the target node corresponding to the time step.
[0110] Migration module 23 is also used to: monitor the energy consumption value of each node in the target node sequence at each time step; if the energy consumption value of the first node exceeds the energy consumption threshold in a first consecutive number of time steps, then determine the non-real-time tasks with a priority lower than the preset threshold in the first node as migration tasks; determine the nodes in the target node sequence that meet the second constraint condition as candidate migration nodes, and determine the node with the smallest load rate among the candidate migration nodes as the target migration node; wherein, the second constraint condition is: the overlap distance corresponding to the coverage area of the first node is greater than or equal to the third distance threshold; the current load rate is less than or equal to the load rate threshold; the remaining memory capacity is greater than or equal to the first multiple of the memory corresponding to the migration task; and the communication latency corresponding to the migration path between the first node and the first node is less than or equal to the latency threshold.
[0111] The migration module 23 is further configured to: if there are no candidate migration nodes that satisfy the second constraint in the target node sequence, select nodes that satisfy the second constraint from the backup node pool whose overlap distance with the coverage area of the first node is greater than or equal to the third distance threshold and determine them as candidate migration nodes; if there are no candidate migration nodes that satisfy the second constraint in the backup node pool, split the migration task into multiple subtasks and migrate the subtasks to the neighboring nodes of the first node whose load rate is less than or equal to the load rate threshold.
[0112] See Figure 3 , Figure 3 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 3 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of each module / unit in the above system embodiments, for example... Figure 2 The functions of the prediction module 21, determination module 22, and migration module 23 are shown.
[0113] It should be appreciated that in the embodiments of the present application, the processor 301 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0114] The input device 302 can include a touchpad, a fingerprint collection sensor (for collecting fingerprint information and direction information of a fingerprint of a user), a microphone, etc., and the output device 303 can include a display (LCD, etc.), a speaker, etc.
[0115] The memory 304 can include a read-only memory and a random access memory, and provide instructions and data for the processor 301. A part of the memory 304 can also include a non-volatile random access memory. For example, the memory 304 can also store device type information.
[0116] In specific implementations, the processor 301, the input device 302 and the output device 303 described in the embodiments of the present application can perform the implementation manners described in the embodiments of the method for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle Internet environment provided by the embodiments of the present application, and can also perform the implementation manners of the electronic device described in the embodiments of the present application, which will not be described here.
[0117] In another embodiment of the present application, a computer readable storage medium is provided, which stores a computer program. The computer program includes program instructions, which, when executed by a processor, implement all or part of the processes of the above-mentioned embodiment methods. The computer program can also instruct related hardware to complete the implementation. The computer program can be stored in a computer readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0118] The computer readable storage medium can be an internal storage unit of the electronic device of any of the preceding embodiments, such as a hard disk or a memory of the electronic device. The computer readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the electronic device. The computer readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.
[0119] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0120] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic device and the units described above can refer to the corresponding processes in the above-mentioned method embodiments, which will not be described here.
[0121] In several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other manners. For example, the embodiments of the system described above are merely illustrative. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interfaces, or can be in electrical, mechanical or other forms.
[0122] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.
[0123] In addition, each functional unit in the various embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.
[0124] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered in 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 dynamic allocation of edge computing resources and energy consumption optimization in a vehicle-to-everything (V2X) environment, characterized in that, include: Obtain the first group of vehicles in the first lane and predict the first trajectory of the first group of vehicles in a future preset time period. The set of computing nodes corresponding to the first lane in the vehicle-to-everything (V2X) environment is determined. Based on the load information and coverage of each node in the set of computing nodes, the sequence of target nodes corresponding to the first motion trajectory is determined. The sequence of target nodes includes the target nodes corresponding to each time step within the preset future time period. If the energy consumption value of the first node in the target node sequence exceeds the energy consumption threshold, then the migration task of the first node and the target migration node corresponding to the first node are determined, and the migration task is migrated to the target migration node. The step of obtaining the first group of vehicles in the first lane includes: Acquire the vehicle's operating data in the first lane, including the vehicle's position information, speed, and heading angle; Based on the operational data, determine the Euclidean distance, speed difference, and heading angle difference between any two adjacent vehicles in the first lane. Based on the first constraint, cluster the vehicles in the first lane to obtain clusters. The vehicle group corresponding to each cluster is determined as the first vehicle group. The first constraint includes: The Euclidean distance is less than or equal to a first distance threshold, the speed difference is less than or equal to a speed threshold, the heading angle difference is less than or equal to an angle threshold, and the number of vehicles in the cluster is greater than or equal to a number threshold. Determining the target node sequence corresponding to the first motion trajectory based on the load information and coverage of each node in the computing node set includes: For each time step within a preset future time period, determine the center coordinates of the first vehicle group corresponding to the first motion trajectory in the time step; determine the first position range of the first vehicle group corresponding to the time step based on the center coordinates; select at least one first candidate node from the set of computing nodes whose coverage includes the first position range; determine the target node corresponding to the time step based on the load rate, remaining memory capacity, task queue length, and average data packet latency of the first candidate node. According to the chronological order of the time steps within the preset future time period, the target nodes corresponding to each time step are arranged sequentially to obtain the target node sequence; If the target nodes corresponding to two adjacent time steps in the target node sequence are different, and the overlap distance of the coverage areas of the target nodes corresponding to the two adjacent time steps is less than a second distance threshold, then select from the target nodes corresponding to the two adjacent time steps a node whose coverage area includes the second location range of the first vehicle group corresponding to the two adjacent time steps, and whose load rate is less than or equal to the load rate threshold, remaining memory capacity is greater than or equal to the memory requirement corresponding to the first vehicle group, task queue length is less than or equal to the queue length threshold, and average data packet latency is less than or equal to the latency threshold. This node is then determined as the updated target node corresponding to the two adjacent time steps, and the target node sequence is updated based on the updated target node.
2. The method according to claim 1, characterized in that, The prediction of the first trajectory of the first vehicle group within a preset time period includes: Determine the operational characteristics of the first vehicle group, which include the average speed, speed standard deviation, average heading angle, heading angle standard deviation, average vehicle spacing, vehicle spacing standard deviation, lane keeping probability, vehicle density, and length of the first vehicle group for each vehicle in the first vehicle group at each time step. The first motion trajectory of the first vehicle group is determined based on the pre-trained first graph neural network in the future preset time period. The first motion trajectory includes the center position coordinates of the first vehicle group in each time step within the future preset time period.
3. The method according to claim 1, characterized in that, The step of determining the target node corresponding to the time step based on the load rate, remaining memory capacity, task queue length, and average data packet latency of the first candidate node includes: The nodes in the first candidate nodes whose load rate is less than or equal to the load rate threshold, whose remaining memory capacity is greater than or equal to the memory requirement corresponding to the first vehicle group, whose task queue length is less than or equal to the queue length threshold, and whose average data packet latency is less than or equal to the latency threshold are determined as the second candidate nodes. If the second candidate node contains only one node, then the second candidate node is determined as the target node of the time step; if the second candidate node contains multiple nodes, then the resource adaptability score of each second candidate node is calculated, and the second candidate node with the highest resource adaptability score is determined as the target node corresponding to the time step.
4. The method according to claim 1, characterized in that, If the energy consumption value of the first node in the target node sequence exceeds the energy consumption threshold, then the migration task of the first node and the target migration node corresponding to the first node are determined, and the migration task is migrated to the target migration node, including: Monitor the energy consumption value of each node in the target node sequence at each time step; If the energy consumption value of the first node exceeds the energy consumption threshold in a first number of consecutive time steps, then the non-real-time tasks with a priority lower than the preset threshold in the first node are identified as migration tasks. Nodes in the target node sequence that satisfy the second constraint are identified as candidate migration nodes, and the node with the lowest load rate among the candidate migration nodes is identified as the target migration node; wherein, the second constraint is: The overlap distance corresponding to the coverage area of the first node is greater than or equal to the third distance threshold; The current load rate is less than or equal to the load rate threshold; The remaining memory capacity is greater than or equal to the first multiple of the memory corresponding to the migration task; The communication latency corresponding to the migration path between the first node is less than or equal to the latency threshold.
5. The method according to claim 4, characterized in that, If there is no candidate migration node in the target node sequence that satisfies the second constraint condition, then a node that satisfies the second constraint condition is selected from the pool of backup nodes whose overlap distance with the coverage area of the first node is greater than or equal to the third distance threshold and determined as the candidate migration node. If there are no candidate migration nodes in the backup node pool that satisfy the second constraint, the migration task is split into multiple subtasks, and the subtasks are migrated to the neighboring nodes of the first node whose load rate is less than or equal to the load rate threshold.
6. A system for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle-to-everything (V2X) environment, characterized in that, include: The prediction module is used to acquire the first group of vehicles in the first lane and predict the first movement trajectory of the first group of vehicles in a future preset time period. The determination module is used to determine the set of computing nodes corresponding to the first lane in the vehicle-to-everything (V2X) environment, and to determine the target node sequence corresponding to the first motion trajectory based on the load information and coverage of each node in the set of computing nodes; the target node sequence includes the target nodes corresponding to each time step within the future preset time period. The migration module is used to determine the migration task of the first node and the target migration node corresponding to the first node if the energy consumption value of the first node in the target node sequence exceeds the energy consumption threshold, and to migrate the migration task to the target migration node. The prediction module is specifically configured to: acquire the operating data of vehicles in the first lane, the operating data including vehicle position information, speed, and heading angle; determine the Euclidean distance, speed difference, and heading angle difference between any two adjacent vehicles in the first lane based on the operating data; cluster the vehicles in the first lane according to a first constraint condition to obtain clusters; and determine the vehicle group corresponding to each cluster as the first vehicle group; wherein the first constraint condition includes: the Euclidean distance is less than or equal to a first distance threshold, the speed difference is less than or equal to a speed threshold, the heading angle difference is less than or equal to an angle threshold, and the number of vehicles in the cluster is greater than or equal to a number threshold; The determining module is specifically configured to: for each time step within a future preset time period, determine the center position coordinates of the first vehicle group corresponding to the first motion trajectory in the time step; determine the first position range of the first vehicle group corresponding to the time step based on the center position coordinates; select at least one first candidate node from the set of computing nodes whose coverage includes the first position range; determine the target node corresponding to the time step based on the load rate, remaining memory capacity, task queue length, and average data packet latency of the first candidate node; and arrange the target nodes corresponding to each time step in sequence according to the order of the time steps within the future preset time period to obtain a target node sequence; wherein, if two adjacent time steps in the target node sequence are... If the target nodes corresponding to the two adjacent time steps are different, and the overlap distance of the coverage areas of the target nodes corresponding to the two adjacent time steps is less than the second distance threshold, then select from the target nodes corresponding to the two adjacent time steps a node whose coverage area includes the second location range of the first vehicle group in the two adjacent time steps, and whose load rate is less than or equal to the load rate threshold, remaining memory capacity is greater than or equal to the memory requirement of the first vehicle group, task queue length is less than or equal to the queue length threshold, and average data packet latency is less than or equal to the latency threshold. This node is determined as the updated target node corresponding to the two adjacent time steps, and the target node sequence is updated based on the updated target node.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle-to-everything (V2X) environment as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for dynamic allocation of edge computing resources and energy consumption optimization in a vehicle-to-everything (V2X) environment as described in any one of claims 1 to 5.
Citation Information
Patent Citations
efficient edge computing migration method for Internet of Vehicles application
CN109905859A
Vehicle control using trajectory clustering and reactive prediction
US12060060B1