A multi-agent multi-task collaborative offloading method
By putting forward multi -intelligent multi -tasking collaborative uninstalling methods in vehicle network communication technology, using local computing and edge uninstallation calculations, through single jump or two -jump uninstallation method, multi -vehicle multi -tasking collaborative unloading delay and low resource utilization rate are solved The problem achieves the minimum system average delay.
Patent Information
- Application Number
- CN202211016816.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-08-24
AI Technical Summary
In the existing vehicle network communication technology, there are problems such as high delay, low channel resource utilization and communication conflicts during coordinated unloading of multiple vehicles and multi-tasks, resulting in low task offloading efficiency.
Put forward a multi -intelligent and multi -task collaborative uninstallation method. By setting up the vehicle task unloading scene, determining the type of node, selecting local computing and multi -service node edge uninstallation calculation for task unloading, and performing tasks through a single jump or two -jump uninstallation method.
In the dynamic vehicle environment, make full use of the task vehicle limited computing resources and the service resources of the surrounding space, solve the problem of multi -vehicle and multi -tasking collaborative unloading conflict, and achieve the smallest system delay.
Smart Images

Figure CN115550357B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle networking communication technology, and more specifically, to a multi-agent multi-task collaborative unloading method. Background Art
[0002] The Internet of Vehicles is a typical industrial Internet of Things technology, in which vehicles can exchange and share ubiquitous information without human intervention. In the Internet of Vehicles environment, vehicles on the road generate massive amounts of sensor data every second. In order to have an intelligent vision in a complex driving environment, a large amount of data transmission, storage, and processing operations need to be completed in a relatively short period of time. The real three-dimensional winding mountain road multi-task scene is a high-incidence section of traffic accidents. Due to the limitations of terrain conditions and occlusion environments, the vehicle speed is slow and there are blind spots in the RSU signal coverage. Therefore, task collaborative offloading is particularly important.
[0003] At present, there are many deficiencies in the existing research on the collaborative offloading scheme of vehicle networking tasks. In terms of the collaborative offloading model, most of the collaborative offloading modes are executed using a single-process offloading model. Such an offloading mode will bring higher latency and lower channel resource utilization. Then, in terms of task splitting, the types of collaborative offloading tasks are currently mainly indivisible and equally split. Such a task splitting scheme often cannot fully utilize the computing resources on the host vehicle's service vehicle. Secondly, in terms of vehicle mobility, vehicles are relatively stationary during the current research on unloading. However, for the real three-dimensional road scene, vehicles are in motion during the collaborative offloading process. More importantly, in terms of conflict handling, when a multi-task multi-host vehicle collaborative offloading scenario occurs, multiple host vehicles will compete for a collaborative node, resulting in communication conflicts, reducing task offloading efficiency, increasing task offloading latency, and failing to provide users with good service quality.
[0004] Therefore, how to provide a multi-agent multi-task collaborative unloading method that can utilize the limited computing resources of the task vehicle and the service resources of the surrounding space in a dynamic vehicle environment, solve the conflict problem of multi-vehicle multi-task collaborative unloading, and achieve the minimum system average delay has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a multi-agent multi-task collaborative unloading method, which can utilize the limited computing resources of the task vehicle and the service resources of the surrounding space in a dynamic vehicle environment to solve the conflict problem of multi-vehicle multi-task collaborative unloading and achieve the minimum system average delay.
[0006] The technical solutions provided by this application are as follows:
[0007] The present application provides a multi-agent multi-task collaborative unloading method, comprising the following steps: S1, setting a vehicle task unloading scenario: identifying a vehicle generating a task as a task vehicle TaV; being within the communication range within the maximum tolerable delay of the task vehicle, and configuring a service node that provides unloading services for the task vehicle; S2, determining the node type: identifying a service node within the communication range of multiple task vehicles TaV as a candidate service node; when the candidate service node is determined to be a task vehicle TaV, the service node is configured to provide an unloading service for the task vehicle. i After the service node is found, the current candidate service node can serve as a candidate relay node for the remaining task vehicles; then the relay nodes that can perform two-hop unloading and the service nodes of the relay nodes are screened out from the candidate relay nodes; S3, unloading task representation: any task vehicle v i The generated tasks use triples: Indicates; where D i is the size of the offload task, C i is the computing resources required for the task, Tmax i is the maximum tolerable delay for executing the task; S4, offloading mode selection: after defining the node status, select local computing and multi-service node edge offloading computing to offload the task, where the edge offloading computing includes single-hop offloading and two-hop offloading; S5, execute offloading task: based on the selection of edge offloading computing, determine the v in the task vehicle TaV i Service node v j is in idle state, and the service node v j Satisfy the requirement of acting as the relay node; then, based on the result judgment of the idle state, perform the offloading task through the single-hop offloading method; if the idle state does not meet the single-hop offloading condition, offload the computing offloading task to the relay node v through the two hops j Idle service node v k Executed in.
[0008] Furthermore, in a preferred embodiment of the present invention, in step S4, it further includes:
[0009] If the local calculation is selected, that is, when TaV chooses to use the local computing resources to process the task, the local computing delay is directly obtained.
[0010]
[0011] in, Represents the local computing power of TaV, Indicates the computational amount of the local task.
[0012] Further, in a preferred embodiment of the present invention, in step S4, the node state is defined as follows: using a 0-1 variable Δ i,j represents the task vehicle v in the single-hop unloading i Service node v within the communication range j Status:
[0013]
[0014] Using 0-1 variable β j,k Indicates the relay node v when performing two-hop offloading j Service node v k Status:
[0015]
[0016] Further, in a preferred embodiment of the present invention, in step S5, the step of executing the uninstallation task is specifically:
[0017] Determine the mission vehicle TaV i Service node v j Idle state:
[0018] If the mission vehicle v i Service node v j In idle state, i.e. α i,j = 0; offload the task directly to the service node v through single-hop offloading j Calculate in and obtain the single-hop calculation delay;
[0019]
[0020] in, For mission vehicles i To service node v j Assigned sub-computation tasks; i,j v i Transfer computing tasks to v j The upload rate; μ1 is the overlap factor in the communication process, which indicates the proportion of data that can be offloaded to the edge node; Represents the service node v j Give the mission vehicle vehicle v i Allocated computing power;
[0021] If the mission vehicle v i Service node v j In the occupied state, that is, α i,j =1, indicating that the service node v j Has been selected as a service node by other TaVs; at the service node v jIf the requirements of acting as a relay node are met, the node v j As a relay node, it offloads to its idle service node v through two hops k Execute offload computing tasks, i.e., β j,k =0; then obtain the two-hop calculation delay:
[0022]
[0023] in, Indicates v i Compute subtasks Upload to relay node v j ; Represents the relay node v j The calculation task Two-hop offloading to relay node v j Service node v k ; Vt represents the set of mission vehicles TaV; Vs represents the set of service nodes.
[0024] Further, in a preferred embodiment of the present invention, in step S2, after completing the determination of the node type, it also includes: constructing a vehicle motion model, through the task vehicle v α Location information at time t Estimated position information at time t+Δt
[0025] Furthermore, in a preferred embodiment of the present invention, a vehicle motion model is constructed to estimate the position information. The steps specifically include:
[0026] S1. Get the mission vehicle v α The speed at time t The angles with the x-axis, y-axis and z-axis are θ x ,θ y ,θ z ∈[0,π];
[0027] S2, according to the speed and angle to obtain speed Velocity components on the x-, y-, and z-axes;
[0028]
[0029] S3, then after obtaining the vehicle running Δt through the direction cosine theorem, the mission vehicle v α Components of distance traveled in the x-, y-, and z-directions;
[0030] From the direction cosine theorem, we can get cos 2 θ x +cos2 θ y +cos 2 θ z =1, that is:
[0031]
[0032] S4, then use the L2 norm to calculate the mission vehicle v α to v β Euclidean distance at any time:
[0033] Right now
[0034] Furthermore, in a preferred embodiment of the present invention, in the step S2 of determining the node type, it further includes: clustering the vehicle driving roads based on the task vehicles, wherein the edge servers are provided with N+1 and the task vehicles Vt are provided with M, so as to cluster the service nodes of the multi-task vehicles;
[0035] The step of clustering service nodes specifically includes:
[0036] S1. From the vehicle set V = {v0, v1, v2, ..., v N} randomly select M task vehicles as the centroid;
[0037] S2. Sampling is performed in the service node, and the Euclidean distance of each sample to M centroids is calculated;
[0038] S3, if the sample is in Δt∈[0~Tmax i ]Euclidean distance to the centroid at any time Go to the next step; where R is the coverage radius of the roadside unit RSU located on the road to provide services for all devices;
[0039] S4. If the sample is within the communication range of multiple centroids, α i,j =1, then this sample is selected as the service node; otherwise, α i,j =0, the sample is divided into the cluster corresponding to the centroid;
[0040] S5. Finally, the clustering result is output to obtain the service node set Vs of the task vehicle.
[0041] Furthermore, in a preferred embodiment of the present invention, before selecting the unloading mode in step S4, the method further includes: constructing a communication model to obtain the rate of the communication upload link; the steps specifically include:
[0042] S1. Set the communication mode between the mission vehicle and the service node: short-range wireless communication mode; use orthogonal frequencies to reduce mutual influence during communication;
[0043] S2, setting the upload link in the communication process as a flat Rayleigh fading channel without considering channel interference;
[0044] S3. Then, according to Shannon's formula, the mission vehicle v can be calculated. i To service node v j Average transmission rate of the upload link:
[0045]
[0046] Where, * can be v2v or v2r, W v2v and W v2r represent the bandwidth of V2V and V2R channels respectively; Pi is the mission vehicle v i The transmission power, ρ0 represents the white Gaussian noise power, d i,j Yes i to v j Transmission distance; represents the path loss exponent; the channel fading coefficient is represented by h.
[0047] Furthermore, in a preferred embodiment of the present invention, before the step S3 of unloading the task representation, it also includes task allocation: determining the unequal task sets C that the task vehicles allocate to the service nodes.
[0048] Furthermore, in a preferred embodiment of the present invention, the specific steps of task allocation include:
[0049] S1. Setting an objective function, wherein the objective function is intended to solve the computational delay problem of multi-vehicle multi-task unloading;
[0050] S2, converting the objective function into edge node offloading and local parallel calculation difference absolute value The minimization problem is The closer to 0, the higher the degree of parallelism; the objective function after conversion is:
[0051]
[0052] Among them, C represents the unequally split computing subtasks; the constraint condition C1 represents the constraint boundary of the local and offloaded computing subtasks; C2 represents the maximum tolerance time limit Tmax of the task i Internal mission vehicle i To service node v j The relative Euclidean distance between them is less than or equal to v i The communication range R; C3 indicates that the sum of the local and multi-service node offloaded computing subtasks is equal to the task vehicle v i The total computing task
[0053] S3. Then, a differential evolution algorithm is used to assign the offloading tasks to the service nodes.
[0054] Compared with the prior art, the present invention provides a multi-agent multi-task collaborative unloading method, which comprises the following steps: S1, setting a vehicle task unloading scenario: identifying the vehicle generating the task as a task vehicle TaV; being within the communication range within the maximum tolerable delay of the task vehicle, and configuring a service node that provides unloading service for the task vehicle; S2, determining the node type: identifying the service nodes within the communication range of multiple task vehicles TaV as candidate service nodes; when the candidate service node is determined to be a task vehicle TaV, the service node is configured to provide unloading service for the task vehicle. i After the service node is found, the current candidate service node can serve as a candidate relay node for the remaining task vehicles; then the relay nodes that can perform two-hop unloading and the service nodes of the relay nodes are screened out from the candidate relay nodes; S3, unloading task representation: any task vehicle v i The generated tasks use triples: Indicates; where D i is the size of the offload task, C i is the computing resources required for the task, Tmax i is the maximum tolerable delay for executing the task; S4, offloading mode selection: after defining the node status, select local computing and multi-service node edge offloading computing to offload the task, where the edge offloading computing includes single-hop offloading and two-hop offloading; S5, execute offloading task: based on the selection of edge offloading computing, determine the v in the task vehicle TaV i Service node v j is in idle state, and the service node v j Satisfy the requirement of acting as the relay node; then, based on the result judgment of the idle state, perform the offloading task through the single-hop offloading method; if the idle state does not meet the single-hop offloading condition, offload the computing offloading task to the relay node v through the two hops j Idle service node v k Executed in. Utilizing the multi-agent multi-task collaborative unloading method provided by the present application, when there is a contradiction between limited computing resources and user experience needs, parallel computing tasks are executed through local execution and multi-service node multi-hop distributed unloading. On the premise of ensuring user service needs, the computing resources of the task vehicle itself and the service resources of the surrounding space are fully utilized to achieve the minimum overall computing delay of the system. When the number of task vehicles is large, the overall delay of the multi-hop distributed unloading system is better than that of the traditional single-hop single-node unloading system. The technical solution disclosed in the present application can utilize the limited computing resources of the task vehicle and the service resources of the surrounding space to solve the conflict problem of multi-vehicle multi-task collaborative unloading and achieve the minimum system average delay.
[0055] Beneficial effects:
[0056] 1. The multi-agent multi-task collaborative unloading method provided by this application can adopt a multi-hop serial unloading distributed execution unloading strategy for multi-task and multi-node, solving the conflict problem of multi-vehicle multi-task collaborative unloading;
[0057] 2. The multi-agent multi-task collaborative unloading method provided in this application has a very obvious low-latency characteristic in solving the multi-task optimization unloading problem, and realizes the prediction of vehicle movement trajectory in three-dimensional road scenes;
[0058] 3. The multi-agent multi-task collaborative unloading method provided in this application allocates the unloading tasks of task vehicles to service nodes based on the differential evolution algorithm, and has good convergence when solving high-dimensional nonlinear problems such as unequal task splitting. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0060] Figure 1 A flowchart of the steps of the multi-agent multi-task collaborative offloading method provided by an embodiment of the present invention;
[0061] Figure 2 A framework flow chart of the clustering algorithm for solving service nodes provided by an embodiment of the present invention;
[0062] Figure 3 A schematic diagram of a first clustering structure of a service node set provided in an embodiment of the present invention;
[0063] Figure 4 A schematic diagram of a second clustering structure of a service node set provided in an embodiment of the present invention;
[0064] Figure 5 A schematic diagram of a third clustering structure of a service node set provided in an embodiment of the present invention;
[0065] Figure 6 A comparison chart of task offloading computing latency provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of this application.
[0067] It should be noted that when an element is referred to as being "fixed on" or "set on" another element, it can be directly on the other element or indirectly set on the other element; when an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0068] It should be understood that the terms "length", "width", "up", "down", "front", "back", "first", "second", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0069] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.
[0070] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.
[0071] The present invention provides a multi-agent multi-task collaborative unloading method, comprising the following steps: S1, setting a vehicle task unloading scenario: identifying the vehicle generating the task as a task vehicle TaV; being within the communication range within the maximum tolerable delay of the task vehicle, and configuring a service node that provides unloading services for the task vehicle; S2, determining the node type: identifying the service nodes within the communication range of multiple task vehicles TaV as candidate service nodes; when the candidate service node is determined to be a task vehicle TaV, the service node is configured to provide unloading services for the task vehicle. i After the service node is found, the current candidate service node can serve as a candidate relay node for the remaining task vehicles; then the relay nodes that can perform two-hop unloading and the service nodes of the relay nodes are screened out from the candidate relay nodes; S3, unloading task representation: any task vehicle v i The generated tasks use triples: Indicates; where D i is the size of the offload task, C i is the computing resources required for the task, Tmax i is the maximum tolerable delay for executing the task; S4, offloading mode selection: after defining the node status, select local computing and multi-service node edge offloading computing to offload the task, where the edge offloading computing includes single-hop offloading and two-hop offloading; S5, execute offloading task: based on the selection of edge offloading computing, determine the v in the task vehicle TaV i Service node v j is in idle state, and the service node v j Satisfy the requirement of acting as the relay node; then, based on the result judgment of the idle state, perform the offloading task through the single-hop offloading method; if the idle state does not meet the single-hop offloading condition, offload the computing offloading task to the relay node v through the two hops j Idle service node v k The present invention provides a multi-agent multi-task collaborative unloading method, which can utilize the limited computing resources of the task vehicle and the service resources of the surrounding space to solve the conflict problem of multi-vehicle multi-task collaborative unloading and achieve the minimum system average delay.
[0072] like Figures 1 to 6 As shown, the step flow of a multi-agent multi-task collaborative unloading method disclosed in this application is specifically described below in combination with a specific embodiment.
[0073] This application takes Hubei Enshi Shiguaiwan as a specific embodiment and proposes a multi-agent multi-task collaborative unloading method, which specifically includes the following steps:
[0074] S1. Setting a vehicle task unloading scenario: identifying a vehicle generating a task as a task vehicle TaV; being within the communication range within the maximum tolerable delay of the task vehicle, and configuring a service node to provide unloading services for the task vehicle.
[0075] In this embodiment of the present application, a ten-turn road is used as an unloading scenario. First, a roadside unit (RSU) with a coverage radius of R is deployed on the road and can provide services to all devices at the same time. The MEC server is deployed on the RSU, denoted by v0. N} represents N vehicle terminals with Poisson distribution within the coverage of RSU, and each vehicle terminal is equipped with positioning equipment such as Beidou Satellite Navigation System (BDS), through which the vehicle's trajectory information can be obtained in real time; the vehicle that generates the task is called the task vehicle (TaV), which is represented by the set The vehicles and RSUs that can provide services within the communication range of TaV are collectively referred to as Service Nodes (SN). Represents. Collection Indicates the real-time trajectory information of all vehicles on the road. The trajectory information of the αth vehicle at the tth time is in For speed, is the position coordinate of the αth vehicle.
[0076] S2. Determine the node type: identify the service nodes within the communication range of multiple mission vehicles TaV as candidate service nodes; when the candidate service node is determined to be a v in the mission vehicle TaV i After selecting the service node, the current candidate service node can serve as a candidate relay node for the remaining task vehicles; then, the relay nodes that can perform two-hop unloading and the service nodes of the relay nodes are screened out from the candidate relay nodes.
[0077] Among them, when SN belongs to the intersection vehicles within the communication range of multiple task vehicles TaV, they are collectively called candidate service nodes (CsN), and the set When the candidate service node has been determined as TaV v i After the service node of the current candidate service node can serve as the remaining task vehicle (Vs-{v i}) of the candidate relay nodes (Candidate relay Nodes, CrN), using the set Then, the relay nodes (RN) that can perform two-hop offloading are further selected from the CrN, and the set Relay service nodes (RsN), using the collection
[0078] Specifically, in an embodiment of the present invention, the multi-agent multi-task collaborative unloading method further includes: after completing the determination of the node type, it also includes: constructing a vehicle motion model, through the task vehicle v α Location information at time t Estimated position information at time t+Δt
[0079] Specifically, in an embodiment of the present invention, a vehicle motion model is constructed to estimate position information. The steps specifically include: S1, obtaining the task vehicle v α The speed at time t The angles with the x-axis, y-axis and z-axis are θ x ,θ y ,θ z ∈[0,π];
[0080] S2, according to the speed and angle to obtain speed Velocity components on the x-, y-, and z-axes;
[0081]
[0082] S3, then after obtaining the vehicle running Δt through the direction cosine theorem, the mission vehicle v α Components of distance traveled in the x-, y-, and z-directions;
[0083] From the direction cosine theorem, we can get cos 2 θ x +cos 2 θ y +cos 2 θ z =1,
[0084] Right now:
[0085]
[0086] S4, then use the L2 norm to calculate the mission vehicle v α to v β Euclidean distance at any time:
[0087]
[0088] S3, unloading task representation: any task vehicle v i The generated tasks use triples: Indicates; where D i is the size of the offload task, C i is the computing resources required for the task, Tmax i is the maximum tolerable delay in executing the task.
[0089] Specifically, in an embodiment of the present invention, the multi-agent multi-task collaborative offloading method further includes: constructing a communication model to obtain the rate of the communication upload link; the steps specifically include:
[0090] S1. Set the communication mode between the mission vehicle and the service node: short-range wireless communication mode; use orthogonal frequencies to reduce mutual influence during communication;
[0091] S2, setting the upload link in the communication process as a flat Rayleigh fading channel, without considering channel interference;
[0092] S3. Then, according to Shannon's formula, the mission vehicle v can be calculated. i To service node v j Average transmission rate of the upload link:
[0093]
[0094] Where, * can be v2v or v2r, W v2v and W v2r Respectively represent the bandwidth of V2V and V2R channels; P i Is the mission vehicle v i The transmission power, ρ0 represents the white Gaussian noise power, d i,j Yes i to v j Transmission distance; represents the path loss exponent; the channel fading coefficient is represented by h.
[0095] In the embodiment, the communication between vehicles and between vehicles and between vehicles and RSU adopts the IEEE802.11 protocol in the short-range wireless communication mode. The orthogonal frequencies are used in the communication process to reduce the mutual influence in the communication process. The upload link in the communication process is set as a flat Rayleigh fading channel, and channel interference is not considered.
[0096] S4. Offloading method selection: After defining the node status, select local computing and multi-service node edge offloading computing to perform task offloading, where the edge offloading computing includes single-hop offloading and two-hop offloading.
[0097] In the embodiments of the present application, there are four ways to process tasks: local processing, single-hop V2I (Vehicle to Infrastructure) offloading to the MEC server of the RUS, single-hop V2V (Vehicle to Vehicle) offloading to a nearby idle service vehicle, and two-hop offloading to an idle service vehicle at a relay node; the subsequent three offloading methods are edge offloading calculations.
[0098] Specifically, in the embodiment of the present invention, the node state is defined as follows: using a 0-1 variable αi ,j represents the task vehicle v in the single-hop unloading i Service node v within the communication range j Status:
[0099]
[0100] Using 0-1 variable β j,k Indicates the relay node v when performing two-hop offloading j Service node v k Status:
[0101]
[0102] S5. Execute unloading task: Based on the selected edge unloading calculation, determine the v in the task vehicle TaV i Service node v j is in idle state, and the service node v j Satisfy the requirement of acting as the relay node; then, based on the result judgment of the idle state, perform the offloading task through the single-hop offloading method; if the idle state does not meet the single-hop offloading condition, offload the computing offloading task to the relay node v through the two hops j Idle service node v k Executed in.
[0103] In this embodiment, in order to make full use of the vehicle's computing resources, the task vehicle TaV can not only process tasks locally, but also SN is always within the communication range of TaV at all times. It can process tasks in two ways: local computing and edge offloading computing.
[0104] 1) Use local computing to offload calculations:
[0105] When TaV chooses to use its own local computing resources to process tasks, the local computing latency is:
[0106]
[0107] Among them, the local computing capacity of TaV is Indicates the computational amount of the local task.
[0108] 2) Offloading computing at the edge
[0109] When TaV is performing service node offloading calculation, it includes the following stages: task upload, task calculation and result feedback. Since the task downlink transmission speed in the result feedback stage is much faster than the uplink speed, the delay of result feedback is ignored in this embodiment. Assume that TaV's u i Select the service node set to be uninstalled VS i , respectively, the delays at different stages are analyzed:
[0110] Case 1: Mission vehicle v i Service node v j When in idle state, α i,j = 0. In this case, the task is offloaded to the service node and the task can be directly calculated:
[0111]
[0112] in, For mission vehicles i To service node v j Assigned sub-computation tasks; i,j v i Transfer computing tasks to v j The upload rate; μ1 is the overlap factor in the communication process, which indicates the proportion of data that can be offloaded to the edge node; Represents the service node v j Give the mission vehicle vehicle v i Allocated computing power.
[0113] Case 2: Mission vehicle v i Service node v j When in occupied state, that is, α i,j =1. The reason for this is that the service node v j has been selected as a service node by other TaVs. In this case, v j Only for mission vehicles i The candidate relay node CrN. Assume that v k Always in v j within the communication range and Then v j The vehicle can act as a relay node to perform the offloading computing task through a two-hop offloading method, i.e., β j,k =0.
[0114]
[0115] in, Indicates v i Compute subtasks Upload to relay node v j ; Represents the relay node v j The calculation task Two-hop offloading to relay node v j Service node v k .
[0116] Specifically, in the embodiment of the present invention, the overall expression of multi-task offloading is:
[0117]
[0118] Based on this, when there is a contradiction between limited computing resources and user experience, parallel computing tasks are performed through local execution and multi-service node multi-hop distributed offloading. The overall latency of multi-hop distributed offloading is better than that of traditional single-hop single-node offloading system. The design objective function is as follows:
[0119]
[0120] Among them, C represents the computing subtasks with different Vs, Vrn and Vrs split unequally.
[0121] Constraint C1 represents the constraint boundary of local and offloaded computing subtasks; C2 represents the maximum tolerance time limit Tmax of the task. i Internal mission vehicle i To service node v j The relative Euclidean distance between them is less than or equal to v i The communication range R; C3 indicates that the sum of the local and multi-service node offloaded computing subtasks is equal to the task vehicle v i The total computing task
[0122] In step S2, since the vehicle position is constantly changing, the network topology is also constantly changing, and the communication range of the task vehicle is also limited, not all vehicles on the three-dimensional road can serve as service nodes for the task vehicle. Therefore, a clustering algorithm is used in this application to determine the service node sets and relay nodes of different task vehicles, as well as two-hop service nodes.
[0123] Specifically, in the present invention, in the step S2 of determining the node type, it also includes: clustering the vehicle driving roads based on the task vehicles, wherein the edge servers are provided with N+1, and the task vehicles Vt are provided with M, so as to cluster the service nodes of the multi-task vehicles;
[0124] The step of clustering service nodes specifically includes:
[0125] S1. From the vehicle set V = {v0, v1, v2, ..., v N} randomly select M task vehicles as the centroid;
[0126] S2. Sampling is performed in the service node, and the Euclidean distance of each sample to M centroids is calculated;
[0127] S3, if the sample is in Δt∈[0~Tmax i ]Euclidean distance to the centroid at any time Go to the next step; where R is the coverage radius of the roadside unit RSU located on the road to provide services for all devices;
[0128] S4. If the sample is within the communication range of multiple centroids, α i,j =1, then this sample is selected as the service node; otherwise, α i,j =0, the sample is divided into the cluster corresponding to the centroid;
[0129] S5. Finally, the clustering result is output to obtain the service node set Vs of the task vehicle.
[0130] In order to verify the quality of the clustering degree, the similarity measure is selected as the inverse of the Euclidean distance That is, the smaller the distance between the task vehicle and the service node, the greater the similarity between the two, and vice versa.
[0131] The objective function optimized by this application is the problem of minimizing the average delay of the system. If a candidate service node has been used as a service node for a certain mission vehicle, this node can serve as a candidate relay node for the remaining Tavs within the communication range. In order to minimize the system delay, the selected service node is determined as the TaV service node with the smallest number of clusters by comparing the number of clusters after TaV clustering.
[0132] For a clearer expression, we assume that V0 and V4 are mission vehicles, A and B are their service node sets, and C = A∩B is the candidate service node. We use examples to illustrate whether the element in C should be the service node of TaV or the selected relay node in different situations. The specific situation analysis is as follows:
[0133] Case 1: If Figure 3 As shown, the first clustering structure of the service node set: when |A|>|B|, V3 is the service node of V4 and the selected relay node of V0.
[0134] Case 2: If Figure 4 As shown, the second clustering structure of the service node set: when |A|<|B|, V3 is the service node of V0 and the selected relay node of V4.
[0135] Case 3: If Figure 5 As shown, the third clustering structure of the service node set: |A|=|B|, if Then V3 is the service node of V0 and the selected relay node of V4, and vice versa.
[0136] Next, we need to determine RN and RsN from the candidate relay nodes CrN. The strategy adopted is whether there are idle vehicles in the communication range of the candidate relay nodes, that is, β j,k = 0. If there is β i,k =0, then this node is selected as a relay node, otherwise it cannot be used as a relay node for two-hop unloading. The sets Vrn and Vrs can be calculated by the above method.
[0137] Specifically, in an embodiment of the present invention, before the step S3 unloading the task representation, it also includes task allocation: determining the unequal task sets C that the task vehicles allocate to the service nodes.
[0138] In order to minimize the average system delay, the optimization objective function is converted into the absolute value of the parallel difference between edge node offloading and local calculation in this embodiment. The minimization problem is The closer to 0, the higher the degree of parallelism; the converted objective function is as follows:
[0139]
[0140] Then, the differential evolution algorithm (DE algorithm) is used to assign the offloading tasks to the service nodes:
[0141] The DE algorithm uses floating-point vectors for encoding to generate population individuals. In the DE algorithm optimization process, first, two individuals are selected from the parent individuals to generate a differential vector by vector difference; secondly, another individual is selected and summed with the differential vector to generate an experimental individual; then, the parent individuals and the corresponding experimental individuals are cross-operated to generate new offspring individuals; finally, a selection operation is performed between the parent individuals and the offspring individuals, and the individuals that meet the requirements are saved in the next generation population.
[0142] Multi-task vehicle unloading only affects the unloading strategy and has no effect on task allocation. i Take as an example to illustrate the unequal task splitting process. C2 only affects the unloading strategy, and its influence is not considered in the calculation of the unequal split set C of the task in this section. The mathematical model of the optimization problem is simplified to:
[0143]
[0144] Where D is the dimension of the solution space, x1, x2, ..., x DThey represent the amount of allocated computing subtasks, They represent the upper and lower bounds of the value range of the calculation subtask respectively. The DE algorithm process is as follows:
[0145] 1) Initialization population: initial population Randomly generate:
[0146]
[0147] Among them, x i (0) represents the i-th "chromosome" (or individual) in the population at generation 0; x j,i (0) represents the jth "gene" of the i-th "chromosome" of the 0th generation; NP represents the population size, and rand(0, 1) represents a random number uniformly distributed in the interval (0, 1).
[0148] 2) Mutation operation: DE achieves individual mutation through the differential strategy, and the differential strategy is to randomly select two different individuals in the population, scale their vector difference, and then synthesize the vector with the individual to be mutated, that is,
[0149]
[0150] Where F is the scaling factor, represents the i-th individual in the g-th generation population.
[0151] In the process of evolution, in order to ensure the validity of the solution, it is necessary to regenerate each "gene" in the "chromosome" using a random method (the same method as the generation of the initial population).
[0152] The g-generation population After mutation, an intermediate is produced
[0153] 3) Crossover operation: for the g-th generation population {x i (g)} and the variant intermediate {h i (g+1)} to perform crossover operation between individuals:
[0154]
[0155] Among them, CR is the crossover probability, j rand is a random integer in the range [1, 2, ..., D].
[0156] In order to ensure that the variant intermediate {h i Each "chromosome" of (g+1)} has at least one "gene" inherited to the next generation. The gene of the first crossover operation is to randomly select h i The jth randThe "gene" is the "chromosome" after crossing i (g+1)jth rand The subsequent crossover operation process is to select x through the crossover probability CR. i (g) h i (g+1) as u i (g+1) allele.
[0157] 3) Selection operation: DE uses a greedy algorithm to select individuals to enter the next generation population:
[0158]
[0159] The specific evolution process is as follows:
[0160] (1) Determine the control parameters of the differential evolution algorithm and determine the fitness function. The control parameters of the differential evolution algorithm include: population size NP, scaling factor F and hybridization probability CR.
[0161] (2) Randomly generate an initial population.
[0162] (3) Evaluate the initial population, that is, calculate the fitness value of each individual in the initial population.
[0163] (4) Determine whether the termination condition is met or the number of evolution generations reaches the maximum. If so, terminate the evolution and output the best individual as the optimal solution; if not, continue.
[0164] (5) Perform mutation and crossover operations to obtain the intermediate population.
[0165] (6) Select individuals from the original population and the intermediate population to obtain a new generation of population.
[0166] (7) Evolutionary algebra g=g+1, go to step (4).
[0167] As described above, the multi-agent multi-task collaborative unloading method involved in the embodiment of the present invention includes: S1, setting a vehicle task unloading scenario: identifying the vehicle generating the task as a task vehicle TaV; always being within the communication range within the maximum tolerable delay of the task vehicle, and configuring a service node that provides unloading services for the task vehicle; S2, determining the node type: identifying the service nodes within the communication range of multiple task vehicles TaV as candidate service nodes; when the candidate service node is determined to be a task vehicle TaV, the service node is configured to provide unloading services for the task vehicle. i After the service node is found, the current candidate service node can serve as a candidate relay node for the remaining task vehicles; then the relay nodes that can perform two-hop unloading and the service nodes of the relay nodes are screened out from the candidate relay nodes; S3, unloading task representation: any task vehicle v i The generated tasks use triples: Indicates; where D i is the size of the offload task, C i is the computing resource required for the task, Tmaxi is the maximum tolerable delay for executing the task; S4, offloading mode selection: after defining the node status, select local computing and multi-service node edge offloading computing to offload the task, where the edge offloading computing includes single-hop offloading and two-hop offloading; S5, execute offloading task: based on the selection of edge offloading computing, determine the v in the task vehicle TaV i Service node v j is in idle state, and the service node v j Satisfy the requirement of acting as the relay node; then, based on the result judgment of the idle state, perform the offloading task through the single-hop offloading method; if the idle state does not meet the single-hop offloading condition, offload the computing offloading task to the relay node v through the two hops j Idle service node v k The present invention provides a multi-agent multi-task collaborative unloading method, which can utilize the limited computing resources of the task vehicle and the service resources of the surrounding space to solve the conflict problem of multi-vehicle multi-task collaborative unloading and achieve the minimum system average delay.
[0168] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in this application may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in this application, but will conform to the widest scope consistent with the principles and novel features disclosed in this application.
Claims
1. A multi-agent multi-task collaborative unloading method, characterized in that: The following steps are involved: S1. Set the vehicle task unloading scenario: identify the vehicle that generates the task as the task vehicle TaV; The service node is configured to be within the communication range within the maximum tolerable delay of the task vehicle and provide unloading service for the task vehicle; S2. Determine the node type: identify the service nodes within the communication range of multiple mission vehicles TaV as candidate service nodes; when the candidate service node is determined to be a v in the mission vehicle TaV i After the service node is selected, the current candidate service node can serve as a candidate relay node for the remaining task vehicles; then, the relay nodes that can perform two-hop unloading and the service nodes of the relay nodes are screened out from the candidate relay nodes; S3, unloading task representation: any task vehicle v i The generated tasks use triples: Indicates; where D i is the size of the offload task, C i is the computing resources required for the task, Tmax i is the maximum tolerable delay in executing the task; S4, offloading mode selection: after defining the node status, select local computing and multi-service node edge offloading computing to perform task offloading, wherein the edge offloading computing includes single-hop offloading and two-hop offloading; If the local calculation is selected, that is, when TaV chooses to use the local computing resources to process the task, the local computing delay is directly obtained. in, Represents the local computing power of TaV, Indicates the computational amount of the local task; The node status is defined as follows: using a 0-1 variable α i,j represents the task vehicle v in the single-hop unloading i Service node v within the communication range j Status: Using 0-1 variable β j,k Indicates the relay node v when performing two-hop offloading j Service node v k Status: S5. Execute unloading task: Based on the selected edge unloading calculation, determine the v in the task vehicle TaV i Service node v j is in idle state, and the service node v j Satisfy the requirement of acting as the relay node; then, based on the result judgment of the idle state, perform the unloading task through the single-hop unloading method; If the idle state does not meet the single-hop offloading condition, the computation offloading task is offloaded to the relay node v through the two hops. j Idle service node v k Execute in The steps of performing the uninstallation task are specifically as follows: Determine the mission vehicle TaV i Service node v j Idle state: If the mission vehicle v i Service node v j In idle state, i.e. α i,j = 0; offload the task directly to the service node v through single-hop offloading j Calculate in and obtain the single-hop calculation delay; in, For mission vehicles i To service node v j Assigned sub-computation tasks; i,j v i Transfer computing tasks to v j The upload rate; μ1 is the overlap factor in the communication process, which indicates the proportion of data that can be offloaded to the edge node; Represents the service node v j Give the mission vehicle vehicle v i Allocated computing power; If the mission vehicle v i Service node v j In the occupied state, that is, α i,j =1, indicating that the service node v j Has been selected as a service node by other TaVs; at the service node v j If the requirements of acting as a relay node are met, the node v j As a relay node, it offloads to its idle service node v through two hops k Execute offload computing tasks, i.e., β j,k =0; then obtain the two-hop calculation delay: in, Indicates v i Compute subtasks Upload to relay node v j ; Represents the relay node v j The calculation task Two-hop offloading to relay node v j Service node v k ; V t It is represented by the set of mission vehicles TaV; Vs is represented by the set of service nodes.
2. The multi-agent multi-task collaborative offloading method according to claim 1 is characterized in that: In step S2, after completing the determination of the node type, it also includes: constructing a vehicle motion model, through the task vehicle v α Location information at time t Estimated position information at time t+Δt 3. The multi-agent multi-task collaborative offloading method according to claim 2 is characterized in that: Build a vehicle motion model and estimate position information The steps specifically include: S1. Get the mission vehicle v α The speed at time t The angles with the x-axis, y-axis and z-axis are θ x ,θ y ,θ z ∈[0,π]; S2, according to the speed and angle to obtain speed Velocity components on the x-, y-, and z-axes; S3, then after obtaining the vehicle running Δt through the direction cosine theorem, the mission vehicle v α Components of distance traveled in the x-, y-, and z-directions; From the direction cosine theorem, we can get cos 2 θ x +cos 2 θ y +cos 2 θ z =1, that is: S4, then use the L2 norm to calculate the mission vehicle v α to v β Euclidean distance at any time: Right now 4. The multi-agent multi-task collaborative offloading method according to claim 3 is characterized in that: In the step S2 of determining the node type, it also includes: clustering the vehicle driving roads based on the task vehicles, wherein the edge servers are provided with N+1 and the task vehicles Vt are provided with M, so as to perform service node clustering of the multi-task vehicles; The step of clustering service nodes specifically includes: S1, from the vehicle set V = {v0,v1,v2,…,v N } randomly select M task vehicles as the centroid; S2. Sampling is performed in the service node, and the Euclidean distance of each sample to M centroids is calculated; S3, if the sample is in Δt∈[0~Tmax i ]Euclidean distance to the centroid at any time Go to the next step; where R is the coverage radius of the roadside unit RSU located on the road to provide services for all devices; S4. If the sample is within the communication range of multiple centroids, α i,j =1, then this sample is selected as the service node; otherwise, α i,j =0, the sample is divided into the cluster corresponding to the centroid; S5. Finally, the clustering result is output to obtain the service node set Vs of the task vehicle.
5. The multi-agent multi-task collaborative offloading method according to claim 1, characterized in that: Before selecting the offloading mode in step S4, the process further includes: constructing a communication model to obtain the rate of the communication upload link; the steps specifically include: S1. Set the communication mode between the mission vehicle and the service node: short-range wireless communication mode; use orthogonal frequencies to reduce mutual influence during communication; S2, setting the upload link in the communication process as a flat Rayleigh fading channel, without considering channel interference; S3. Then, according to Shannon's formula, the mission vehicle v can be calculated. i To service node v j Average transmission rate of the upload link: Where * can be v2v or v2r,W v2v and W v2r Respectively represent the bandwidth of V2V and V2R channels; P i Is the mission vehicle v i The transmission power, ρ0 represents the white Gaussian noise power, d i,j Yes i to v j The transmission distance; θ represents the path loss exponent; the channel fading coefficient is represented by h.
6. The multi-agent multi-task collaborative unloading method according to claim 3 is characterized in that: Before the step S3 of unloading the task representation, it also includes task allocation: determining the unequal task sets C that the task vehicles allocate to the service nodes.
7. The multi-agent multi-task collaborative working method according to claim 6, characterized in that: The specific steps of task allocation include: S1. Setting an objective function, wherein the objective function is intended to solve the computational delay problem of multi-vehicle multi-task unloading; S2, converting the objective function into edge node offloading and local parallel calculation difference absolute value The minimization problem is The closer to 0, the higher the degree of parallelism; the objective function after conversion is: Among them, C represents the unequally split computing subtasks; the constraint condition C1 represents the constraint boundary of the local and offloaded computing subtasks; C2 represents the maximum tolerance time limit Tmax of the task i Internal mission vehicle i To service node v j The relative Euclidean distance between them is less than or equal to v i The communication range R; C3 indicates that the sum of the local and multi-service node offloaded computing subtasks is equal to the task vehicle v i The total computing task S3. Then, a differential evolution algorithm is used to assign the offloading tasks to the service nodes.
Citation Information
Patent Citations
Dynamic task allocation and node reconfiguration in mesh network
US20190188043A1
Framework for computing in radio access network (RAN)
US20200404069A1