Internet of vehicles cache node selection method in complex scene
By establishing a multi-objective optimization model, considering link occlusion and load balancing, dynamically allocating file requests, and selecting the best cache nodes, the problems of link occlusion and load imbalance in the selection of Internet of Vehicles cache nodes are solved, and efficient cache node coverage and Load balancing.
Patent Information
- Application Number
- CN202410630336.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-05-21
AI Technical Summary
The existing Internet of Vehicle Cache Node Selection Algorithm has link occlusion and load imbalance in complex scenarios, resulting in communication interruption and waste of cache node resources, and failing to effectively consider obstacle occlusion and bicycle multi-request scenarios.
Establish a multi-objective optimization model with minimal link quality, load balancing and cache nodes. By building a comprehensive link quality weight matrix and load balancing algorithm, dynamically allocate file requests, and select the best cache nodes and task nodes to achieve minimum cache node coverage The entire network.
The request response rate and cache source response times are increased, and the repetition rate is always zero, which realizes load balancing of cache nodes and reduces resource waste and communication delay.
Smart Images

Figure CN119232742A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network technology, and in particular to a method for selecting a cache node in an Internet of Vehicles (IoV) under complex scenarios. Background Art
[0002] With the popularization of smart vehicles, vehicles will generate a large amount of data and computing needs. Vehicles in IoV are difficult to support computing-intensive services relying solely on their own limited computing and storage resources. Although cloud computing can solve the problem of insufficient vehicle computing resources, its long-distance deployment will lead to unpredictable delays and increase bandwidth overhead. In response to the above problems, the industry has proposed vehicular edge computing technology (VEC), which uses roadside servers or idle vehicles as computing resources to provide users with computing and storage functions nearby, and realize localized, close-range, and distributed deployment of applications, services, and content. According to the upstream and downstream data flows, edge computing from the vehicle perspective can be divided into vehicle unloading computing tasks (task unloading) and vehicle requesting data files (file requests). The present invention mainly studies edge computing in terms of file requests.
[0003] File requests mainly study how to make requests and respond to requests (which device to request files from, how to pre-store files, etc.). In order to reduce the load on cloud servers and the communication overhead of wide area networks, vehicle nodes can access the edge servers on the roadside. However, since all file requests and responses are still transferred by base stations, the communication load of base stations is large and can easily become a communication bottleneck. For this reason, researchers introduced caching technology in vehicle nodes, pre-stored popular files in vehicles (cache nodes), and task nodes first requested files from surrounding cache nodes. If the cache node has pre-stored this file, it will be sent directly to the task node, otherwise the task node will initiate a request to the edge server through the base station. Therefore, vehicle caching technology can make full use of the storage resources and computing resources of cached vehicles, reduce repeated transmission of files in the network, and reduce transmission delays and base station bandwidth overhead.
[0004] After searching domestic and foreign literature, it was found that the existing paper "Information-Centric Networking CachePlacement Method Based on Cache Node Status and Location" (WirelessCommunications and Mobile Computing, 2021) calculates the node status value based on the node cache capacity, routing hops and importance of popular files, and selects the node with the largest status value as the cache vehicle. It can transmit files with a lower number of hops, but when there are many vehicles, too many cache nodes are often selected, resulting in waste of resources.
[0005] The existing paper "Vehicle clustering based edge caching scheme in internet of vehicles" (IET Communications, 2023) proposes an edge caching scheme based on vehicle clustering, which transforms the minimization of latency into a knapsack problem, and then uses a dynamic programming algorithm to solve it to obtain the optimal caching decision. However, this study does not consider the high cost problem caused by the number of cache nodes.
[0006] The existing paper "Load-constrained C-V2X Vehicle Cache Node Selection Algorithm" (Journal of Communications, 2021) proposes the NmaxMDS algorithm, which uses the number of vehicles as the load constraint, takes the vehicle distance and link duration as link stability indicators, constructs an objective function, achieves full network coverage with the least cache nodes, and ensures that the average link weight of the cluster is maximized. Simulation shows that the algorithm achieves a high request response rate, and the repeated response rate is always zero. However, there are also some problems in this study. First, the literature does not consider the link quality under obstacle occlusion, and the interruption of the communication link may cause some requests to fail to obtain a cache node response. Second, the literature only uses the number of task vehicles as the load constraint, assuming that each vehicle carries only one file request in a cycle (single vehicle single request), and does not consider the difference in the number of file requests carried by each task node, which may lead to load imbalance of the cache node. In other words, some clusters have a small number of vehicles and a large number of file requests, or some clusters have a large number of vehicles and a small number of file requests.
[0007] How to solve the above technical problems is the subject faced by the present invention. Summary of the invention
[0008] Aiming at the communication interruption and cache node load imbalance problems caused by link obstruction and single-vehicle multi-request scenarios, the present invention establishes a multi-objective optimization model of link quality, load balancing and minimization of cache nodes, and proposes a vehicle cache node selection algorithm. First, considering link obstruction, vehicle-to-vehicle distance and link duration, a link quality comprehensive weight adjacency matrix is constructed to maximize the average link weight of the cluster; secondly, based on the file load upper limit of the cache vehicle, file requests are dynamically allocated to achieve load balancing; finally, cache nodes and task nodes are selected preferentially to achieve minimum cache node coverage of the entire network.
[0009] In response to the above problems, the present invention proposes a method for selecting cache nodes in the Internet of Vehicles under complex scenarios, which selects cache nodes and task nodes on a preferential basis, obtains a higher request response rate and cache source response times, keeps the repeated response rate at zero, and achieves cache node load balancing.
[0010] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically: a method for selecting a cache node of an Internet of Vehicles in a complex scenario, comprising the following steps:
[0011] S1: Construct three models: (1) Analyze and model link quality by considering obstacles blocking the link, vehicle distance, and link duration; (2) Analyze and model the load balancing of cache nodes; (3) Analyze and model the problem of achieving full network coverage with the least cache nodes;
[0012] S2: A link quality assessment algorithm is proposed. The algorithm first proposes an obstacle occlusion judgment algorithm, and then calculates the comprehensive weighted adjacency matrix based on the vehicle distance and link duration algorithm;
[0013] S3: Based on the file load limit of the cache vehicle, the file request is dynamically allocated and a cache node load balancing algorithm is proposed to achieve load balancing;
[0014] S4: Select cache nodes and task nodes based on their merits, and propose a cache node minimization algorithm to achieve minimum cache node coverage of the entire network;
[0015] S5: Give the cache node selection algorithm process in complex scenarios.
[0016] S1 considers obstacles blocking the link, the distance between vehicles, and the link duration to analyze and model the link quality, which specifically includes the following steps:
[0017] (1) Obstacles
[0018] like Figure 1 As shown in the figure, the road scene is set as a crossroad, and each main road is a two-way three-lane road. The base station communication radius is R B , covering the intersection area in the figure, the number of vehicles in this area is N v , the vehicle communication radius is R v , then the vehicle set is N = {n 1 ,n 2 ,…,n Nv}. In order to obtain the vehicle trajectory in real time, it is assumed that all vehicles are equipped with positioning equipment and the base station has the function of full network control. v The vehicle's driving status information is defined as in is the position coordinate, is the vehicle speed; the length of the rth obstacle vehicle is set to L, and its state information is defined as r is a positive integer. The vehicle regularly uploads basic information such as driving and file requests to the base station. Since the road setting is relatively stable, the base station can predict the location of the vehicle in the next cycle based on the trajectory information of this cycle.
[0019] If the communication link is blocked, V2V data transmission will fail. To avoid selecting cache nodes containing potential blocked links, it is necessary to determine whether the link is blocked by moving obstacles. First, determine the neighboring vehicles of vehicle i. Calculate the distance between vehicles i and j based on the position coordinates of the vehicles in period t+1. for
[0020]
[0021] Only vehicles within the communication range can be neighbors. Assume that the communication radius of each vehicle is R v Therefore, for vehicle i, the vehicles that satisfy formula (2) are its neighbor nodes.
[0022]
[0023] Secondly, determine whether the link between vehicle i and its neighbor vehicle j is blocked. Using formula (1) and formula (2), construct the neighbor node array of vehicle i in the t+1th cycle m i is a natural number. Traverse the above array Determine whether the link between vehicle i and its neighboring nodes is blocked by a moving obstacle. Indicates the link blocking status. The value is set to 0, the unobstructed link The value is set to 1. In the t+1 period, in order to describe the occlusion of each link, the "occlusion" adjacency matrix ω is constructed t+1 ,Will If we fill in the value, we have
[0024]
[0025] (2) Inter-vehicle distance and link duration
[0026] The vehicle distance and link duration also affect the link quality. First, we analyze the vehicle distance. From formula (1), we can get the distance between vehicles i and j in the t+1 period: The communication distance tolerance is Normalizing the tolerance, we get
[0027]
[0028] in, is the normalized communication distance tolerance, d min is the minimum safe distance between two vehicles in the road scene.
[0029] Next, we analyze the duration of the link between the two vehicles. Assuming the period interval is Δt, the base station predicts the duration of time that vehicle nodes i and j are within each other's communication range in the t+1 period based on the vehicle position and velocity vector obtained in the t period, which is called the link duration. For the convenience of calculation, the link duration is normalized and we can get
[0030]
[0031] The weighted sum of the normalized communication distance tolerance and the normalized link duration is denoted as Available
[0032]
[0033] Among them, ρ∈[0,1] is the weighting factor, and its value can be adjusted according to actual conditions.
[0034] In the t+1th cycle, define the weighted adjacency matrix W that represents the communication distance tolerance and link duration t+1 (hereinafter referred to as the “distance-time” weighted adjacency matrix). Calculate the weight of each link according to formula (6): Fill it into W t+1 In, can be obtained
[0035]
[0036] (3) Link quality objective function
[0037] Considering three factors, namely, obstacle occlusion, communication distance tolerance and link duration, the “occlusion” adjacency matrix ω is t+1 and the “distance-time” weighted adjacency matrix W t+1 Perform point multiplication to obtain the comprehensive weight adjacency matrix W of link quality *t+1 (hereinafter referred to as the comprehensive weighted adjacency matrix), we can get
[0038] W *t+1 =W t+1 ·ω t+1 (8)
[0039] Among them, W *t+1 N v ×N v The element in the i-th row and j-th column represents the comprehensive weight value of the link quality between vehicle nodes i and j (hereinafter referred to as the comprehensive weight).
[0040] In the t+1th cycle, the number of cache nodes is set to N C , then the cache node set is C t+1 ={c 1 ,c 2 ,…,cNC}. Cache node c k The task node set is set to If If there are q elements in the set, cache node c k The q task nodes can form a cluster, where q is a natural number. From the comprehensive weight adjacency matrix W *t+1 In the example, we extract cache nodes c respectively. k The sum of the comprehensive weights of its q task nodes is used to define the average link weight of the cluster. is the ratio of sum to q. To ensure that the better link is selected for intra-cluster communication, the average link weight of all clusters in the network should be maximized, so the link quality objective function is:
[0041]
[0042] S1 analyzes and models the cache node load balancing situation, which specifically includes the following steps:
[0043] (1) Cache node load balancing objective function
[0044] The premise of achieving load balancing is to count the number of file requests for each task node. In a cycle, the number of file requests generated by a task vehicle is affected by many factors, so the Poisson distribution is introduced to describe the arrival of file requests from the vehicle. Assuming the time interval is [0, t], the request arrival rate is Then the number of file requests arriving for vehicle i is Num i (t) obedience parameters Poisson distribution. According to the Poisson distribution property, the probability mass function of the number of file requests arriving for vehicle i in time t is K is
[0045]
[0046] In time t, the expected number of file requests arriving from vehicle i is
[0047]
[0048] From the above formula, it can be seen that the number of file requests generated by each vehicle follows the Poisson distribution, and the number of vehicles in a cluster is not equal to the number of file requests.
[0049] In the t+1th cycle, let For cache node c k The request number set of each task node in the cluster, then
[0050]
[0051] in, For cache node c kThe number of requests of the χth task node in the t+1th cycle, χ∈{1,2,…,q}.
[0052] From formula (12), we can see that cache node c k The actual load is
[0053]
[0054] Suppose that the cache node c is k Can only respond to T at most max Requests. Compute cache node c k The actual load The maximum number of requests it can serve, T max The ratio is defined as the load level of the cache node. have
[0055]
[0056] According to formula (14), calculate the load level of each cache node If the value is greater than 1, it means that the cache node is overloaded. max hour, is a number between (0,1]. The number of cache nodes count. Define the load balancing quality LB of the cache nodes in the network, let it be
[0057]
[0058] Where N c is the total number of cache nodes. As can be seen from the above formula, LB∈(0,1]. For a certain period, the larger the LB is, the more cache nodes are not overloaded. When LB is 1, it means that the number of requests received by each cache node is not overloaded. Therefore, the load balancing objective function is
[0059]
[0060] (2) Cache node load balancing constraints
[0061] To ensure that cache nodes and task nodes actually exist, constraints 1 and 2 are proposed respectively. In a cycle, to ensure that the number of file requests for a cluster does not exceed the maximum number of requests that the cache nodes of the cluster can serve, constraint 3 is proposed. Similarly, to ensure that the total number of requests in the entire network does not exceed the maximum total number of requests that all cache nodes can serve, constraint 4 is proposed.
[0062] The maximum number of requests that a cache vehicle can serve in order to respond to requests is T. max Must be greater than or equal to 1, so there is constraint 1
[0063] CON 1: T max ≥1 (17)
[0064] In the t+1th cycle, the number of file requests for each task vehicle cannot be negative, so there is constraint 2
[0065]
[0066] Since each cluster has only one cluster head (cache node), the sum of the number of file requests in a cluster must not be greater than T max , so there is constraint 3
[0067]
[0068] Let the total number of file requests issued by all task nodes be SL, according to formula (11), we can get
[0069]
[0070] To ensure that all requests in the entire network can be responded to, the total number of file requests SL must be less than or equal to the maximum total number of requests that all cache nodes can serve Otherwise, some requests will not be responded to. Therefore, there is constraint 4
[0071]
[0072] S1 analyzes and models the problem of achieving full network coverage with the least cache nodes, which specifically includes the following steps:
[0073] (1) Cache Node Minimization Objective Function
[0074] In order to reduce the overhead of configuring and managing cache nodes and reduce channel contention between cache nodes, the number of cache nodes is required to be as small as possible. The objective function of the number of cache nodes is:
[0075]
[0076] (2) Constraints on minimizing cache nodes
[0077] In the t+1th cycle, cache node c k The set of all q task nodes in the cluster It can be specifically written as
[0078]
[0079] To reduce duplicate responses, all cache nodes are required to only provide file responses to task nodes in their cluster. k and c ΔThe intersection of the task node sets of each cluster is empty, then there is constraint 5
[0080]
[0081] In order to satisfy the requirement of minimum cache nodes covering the entire network, the total number of elements in the union of the cache node set and its optimal task node set should be equal to the total number of vehicles N v Define an operator "<>" to get the total number of elements in the union, then there is a constraint 6
[0082]
[0083] By combining the three objective functions of equations (9), (16) and (22) and the six related constraints, the multi-objective optimization equation constructed by the present invention is:
[0084]
[0085] As can be seen from formula (26), P1 maximizes the average link weight of the cluster, which means that vehicles with better V2V links are selected as cache nodes. P2 achieves the load balancing goal of the cache nodes, which means that the number of requests received by each cache node is relatively balanced. P3 minimizes the number of cache nodes, which means that the entire network is covered with the least cache nodes.
[0086] S2 specifically includes the following steps:
[0087] (1) Obstacle occlusion judgment
[0088] Considering that electromagnetic wave propagation obeys the free space model, mobile obstacles blocking the link will cause communication failure. Figure 2 As shown, vehicle i, neighbor vehicle j, and obstacle vehicle r with a length of L move at speeds v i 、v j and v r Driving from east to west on three lanes. Establish the coordinate axis with vehicle i as the origin, and set the coordinate of neighbor node j to (x j ,y j ), Q is the center of mass of the obstacle node r, with coordinates (α, β), and d is the midpoint of the link segment ij between vehicles i and j. The moment when the front and rear of the obstacle vehicle touch the midpoint d of the link is recorded as the occlusion start time t 1 and the occlusion end time t 2 .
[0089] Taking the neighbor node j in the first quadrant of the coordinate axis as an example, connect point Q and the origin i to obtain a straight line l. 1 and t 2 At time t, if the center of mass Q is on the same side of the y-axis twice, define θ as the angle between l and the positive half axis of the y-axis. Calculate t1 Time and t 2 The tanθ threshold corresponding to the moment is used to form the threshold interval of the obstacle blocking the link using two tanθ values. In any cycle, if the tanθ value formed during the driving of the three vehicles is in the above interval, the link is judged to be blocked. The specific steps of the algorithm are as follows:
[0090] Obstacle occlusion judgment algorithm
[0091] Algorithm input: driving status information of all vehicles, neighbor node array of node i
[0092] Algorithm output: Output the occlusion state value Ψ of each link. According to formula (3), the "occlusion" adjacency matrix ω can be obtained: t+1
[0093] S201: Create (N v -1)*(N v -1)'s "occlusion" adjacency matrix ω t+1 .
[0094] S202: Traverse vehicle i, i∈{1,2,…,N v} and its neighbor node array
[0095] S203: Establish a coordinate axis with vehicle i as the origin, obtain the coordinates (a, b) of neighbor node j, the coordinates (α, β) of the center of mass Q of the obstacle vehicle r, and the link segment ij connecting vehicles i and j, and take the midpoint d. The time when the front and rear of the obstacle vehicle touch the midpoint d of the link is recorded as the occlusion start time t 1 and the occlusion end time t 2 .
[0096] S204: If the neighbor node is in the first or second quadrant, the following two situations are performed:
[0097] (a) At t 1 Time and t 2 At time t, if the center of mass Q of the obstacle vehicle r is on the same side of the y-axis twice, that is, L≤2aβ / b, connect point Q and the origin i to obtain a straight line l, and let the angle between l and the positive semi-axis of the y-axis be θ. Calculate t 1 Time and t 2 The tanθ threshold corresponding to the time constitutes the tanθ threshold interval of the obstacle blocking the link. In any cycle, if the tanθ values of the three vehicles are in the above interval, the link is judged to be blocked, and let Otherwise,
[0098] (b) At t 1 Time and t 2At time t, if the center of mass Q of the obstacle vehicle r is on the left and right sides of the y-axis, that is, when L>2aβ / b, connect point Q and the origin i to obtain a straight line l, and let the angle between l and the positive semi-axis of the x-axis be θ. Calculate t 1 Time and t 2 The tanθ threshold corresponding to the time constitutes the tanθ threshold interval of the obstacle blocking the link. In any cycle, if the tanθ values of the three vehicles are in the above interval, the link is judged to be blocked, and let Otherwise,
[0099] S205: If the neighbor node is in the third or fourth quadrant, the processing steps are the same as S204.
[0100] S206: The algorithm ends and the occlusion state Ψ value of each link is output. According to the formula Get ω t+1 .
[0101] (2) Calculation of comprehensive weighted adjacency matrix
[0102] To ensure stable communication, the cache node gives priority to vehicles with larger comprehensive link weights as task nodes, so that the average link weight of the cluster reaches the maximum value. Through the obstacle occlusion judgment algorithm, the "occlusion" adjacency matrix ω can be obtained t+1 According to the workshop distance and link duration, the “distance-time” weighted adjacency matrix W is calculated using formula (7): t+1 By multiplying the above two matrices according to formula (8), we can obtain the comprehensive weighted adjacency matrix W *t+1 .
[0103] S3 specifically includes the following steps:
[0104] According to the objective function P2 and constraints of the cache node load balancing in S1, the specific implementation steps are in "Load balancing maximization" in S5 "Cache node selection algorithm in complex scenarios".
[0105] S4 specifically includes the following steps:
[0106] According to the objective function P3 and constraints of achieving full network coverage with the least cache nodes in S1, the specific implementation steps are in "Cache Node Minimization" in S5 "Cache Node Selection Algorithm in Complex Scenarios"
[0107] S5 specifically includes the following steps:
[0108] The vehicles are divided into undetermined nodes, task nodes and cache nodes, and the identity bits are set to 0, 1 and 2 respectively, so as to construct the node identification bit vector of the t+1th cycle as
[0109]
[0110] The identity bits of all nodes are initialized to 0. The number of nodes with undetermined identities in the neighbors of node i is called the node degree F i The ratio of the sum of the comprehensive weights of all links of node i to the number of its neighboring nodes is called the average neighbor comprehensive weight.
[0111] Cache node selection algorithm in complex scenarios
[0112] Input: Comprehensive weighted adjacency matrix W *t+1 , request load constraint T max , the neighbor node array of each node
[0113] Output: cache node set C t+1 , the set of task nodes of each cluster Load balancing quality LB
[0114] (1) Algorithm initialization
[0115] S501: Initialization
[0116] S502: If there is a node with an identifier of 0, execute the following steps. If not, execute step S514.
[0117] S503: Traverse all nodes and calculate the node degree F of each node i .
[0118] (2) Minimize cache nodes
[0119] S504: Update the node degree list.
[0120] S505: If the node degree of node i is F i = 0, it takes itself as a cache node and includes it in set C t+1 , the identity is set to 2.
[0121] S506: If the node degree of node i is F i = 1, and the node degree of its neighbor node is greater than 1, it will be used as a task node, the identity is set to 1, and its neighbor nodes will be included in the cache node set C t+1 , the identity is set to 2.
[0122] (3) Maximizing the average link weight of the cluster
[0123] S507: If the node degree of node i is F i =1, and the node degree of its neighbor node is also 1, the node with the largest average neighbor comprehensive weight is selected as the cache node, and its identity is set to 2.
[0124] S508: At this point, the node degree Fi = 0 or 1 have been determined, and the remaining nodes are processed in two cases. The first case is that the node degrees of the nodes are different, then the node with the largest node degree is selected as the cache node, so that a cache node can cover as many nodes as possible. The second case is that the node degrees of some nodes are the same, then the node with the largest average neighbor comprehensive weight is selected as the cache node. The selected cache nodes are included in C t+1 , the identity is set to 2.
[0125] S509: After initially selecting the cache nodes, update the node degree of each node.
[0126] (4) Maximizing Load Balancing
[0127] S510: cache node c k The neighbor nodes are based on F i Sort the values from small to large to get the node number sequence F array .
[0128] S511: If cache node c k The total number of requests from all neighbor nodes is less than T max , then all neighbor vehicles with node degree 0 are taken as task nodes and added to the set And set its identity to 1. Otherwise, select F array The total number of requests does not exceed T max , and the nodes ranked first are included as task nodes And set its identity to 1.
[0129] S512: If c k A collection of task nodes Already included in F array Sort the first u neighbor nodes in the sequence, and the total number of requests for the first u neighbor nodes is less than T max , then the total number of requests is (T max –u)’s neighbor nodes can become c k The neighbor nodes with the remaining node degree of 0 are selected as candidate task nodes. The selection method is as follows:
[0130] a) In F array When the last vehicle can be added in F array If the order is H, and the number of requests from the H+1th vehicle is the same as the number of requests from the Hth vehicle, then sort all the links of these two nodes from large to small according to the comprehensive weight, and select c k The node with a higher rank in its sequence is c k task node.
[0131] b) If in c kIn the neighbor node link weight sequence of c k If the positions are still the same, choose the one with c k The neighbor node with the largest comprehensive weight is taken as the task node and included in The identity flag is set to 1.
[0132] (5) Algorithm ends
[0133] S513: Update the node degree of each node, and return to S502.
[0134] S514: Count the load of each cache node and calculate LB.
[0135] S515: Algorithm ends, output C t+1 , and LB.
[0136] Compared with the prior art, the present invention has the following beneficial effects:
[0137] 1. For link quality assessment, add obstacle blocking factors. The communication environment of the Internet of Vehicles is usually non-ideal, and electromagnetic waves are easily interfered or shielded. The impact of mobile obstacles blocking signals on link transmission is particularly prominent. Therefore, in addition to considering the factors of vehicle distance and link duration, the present invention adds link blocking factors to link quality modeling and constructs a link quality comprehensive weight adjacency matrix to accurately describe the vehicle link quality under the mobile obstacle scenario.
[0138] 2. For load balancing, file requests are dynamically allocated based on the vehicle's file load limit. Existing studies only consider a single request per vehicle, with the number of task vehicles as the load constraint. However, in actual scenarios, a vehicle may carry multiple file requests per vehicle in a certain cycle. The present invention considers taking the maximum number of requests that a cache vehicle can serve as a load constraint, dynamically allocating file requests, and achieving load balancing.
[0139] 3. Aiming at the complex scenarios of obstacle occlusion and multiple requests from a single vehicle, based on the minimum dominating set algorithm, with the goals of link quality, load balancing and minimization of cache nodes, the present invention proposes a cache node selection ObsTmax scheme. Experiments show that compared with NmaxMDS and random selection algorithms, the new algorithm achieves better performance in terms of request response rate and cache source response times, the repeated response rate is also always 0, and load balancing of cache nodes is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0140] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0141] Figure 1This is a road scene in the simulation experiment of the present invention.
[0142] Figure 2 This is an example of an obstacle blocking a link in the present invention.
[0143] Figure 3 This is a comparison chart of request response rates of the three algorithms of the present invention.
[0144] Figure 4 This is a comparison chart of the mean cache source response times of the three algorithms of the present invention.
[0145] Figure 5 This is a comparison chart of the repeated response rates of the three algorithms of the present invention.
[0146] Figure 6 The load balancing quality LB comparison chart of the three algorithms of the present invention.
[0147] Figure 7 The maximum number of requests that a cache node can serve is T max When the cache capacity J is 8, 12 and 16 respectively, the difference in request response rate between the two comparison algorithms and the ObsTmax algorithm of the present invention is shown.
[0148] Figure 8 The maximum number of requests that a cache node can serve is T max When the cache capacity is 8, 12 and 16 respectively, let J=5, and the repeated response rate of the random algorithm.
[0149] Fig. 9 When the cache capacity J is 5, 10 and 15 respectively, let T max =8, the difference in request response rate between the two comparison algorithms and the ObsTmax algorithm of the present invention. DETAILED DESCRIPTION
[0150] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0151] Example 1
[0152] See also Figures 1 to 9 The technical solution provided by this embodiment is: a method for selecting a cache node in an Internet of Vehicles under a complex scenario, comprising the following steps:
[0153] S1: Construct three models: (1) Analyze and model link quality by considering obstacles blocking the link, vehicle distance, and link duration; (2) Analyze and model the load balancing of cache nodes; (3) Analyze and model the problem of achieving full network coverage with the least cache nodes;
[0154] S2: A link quality assessment algorithm is proposed. The algorithm first proposes an obstacle occlusion judgment algorithm, and then calculates the comprehensive weighted adjacency matrix based on the vehicle distance and link duration algorithm;
[0155] S3: Based on the file load limit of the cache vehicle, the file request is dynamically allocated and a cache node load balancing algorithm is proposed to achieve load balancing;
[0156] S4: Select cache nodes and task nodes based on their merits, and propose a cache node minimization algorithm to achieve minimum cache node coverage of the entire network;
[0157] S5: Give the cache node selection algorithm process in complex scenarios.
[0158] S1 considers obstacles blocking the link, the distance between vehicles, and the link duration to analyze and model the link quality, which specifically includes the following steps:
[0159] (1) Obstacles
[0160] like Figure 1 As shown in the figure, the road scene is set as a crossroad, and each main road is a two-way three-lane road. The base station communication radius is R B , covering the intersection area in the figure, the number of vehicles in this area is N v , the vehicle communication radius is R v , then the vehicle set is N = {n 1 ,n 2 ,…,n Nv}. In order to obtain the vehicle trajectory in real time, it is assumed that all vehicles are equipped with positioning equipment and the base station has the function of full network control. v The vehicle's driving status information is defined as in is the position coordinate, is the vehicle speed; the length of the rth obstacle vehicle is set to L, and its state information is defined as r is a positive integer. The vehicle regularly uploads basic information such as driving and file requests to the base station. Since the road setting is relatively stable, the base station can predict the location of the vehicle in the next cycle based on the trajectory information of this cycle.
[0161] If the communication link is blocked, V2V data transmission will fail. To avoid selecting cache nodes containing potential blocked links, it is necessary to determine whether the link is blocked by moving obstacles. First, determine the neighboring vehicles of vehicle i. Calculate the distance between vehicles i and j based on the position coordinates of the vehicles in period t+1. for
[0162]
[0163] Only vehicles within the communication range can be neighbors. Assume that the communication radius of each vehicle is R v Therefore, for vehicle i, the vehicles that satisfy formula (2) are its neighbor nodes.
[0164]
[0165] Secondly, determine whether the link between vehicle i and its neighbor vehicle j is blocked. Using formula (1) and formula (2), construct the neighbor node array of vehicle i in the t+1th cycle m i is a natural number. Traverse the above array Determine whether the link between vehicle i and its neighboring nodes is blocked by a moving obstacle. Indicates the link blocking status. The value is set to 0, the unobstructed link The value is set to 1. In the t+1 period, in order to describe the occlusion of each link, the "occlusion" adjacency matrix ω is constructed t+1 ,Will If we fill in the value, we have
[0166]
[0167] (2) Inter-vehicle distance and link duration
[0168] The vehicle distance and link duration also affect the link quality. First, we analyze the vehicle distance. From formula (1), we can get the distance between vehicles i and j in the t+1 period: The communication distance tolerance is Normalizing the tolerance, we get
[0169]
[0170] in, is the normalized communication distance tolerance, d min is the minimum safe distance between two vehicles in the road scene.
[0171] Next, we analyze the duration of the link between the two vehicles. Assuming the period interval is Δt, the base station predicts the duration of time that vehicle nodes i and j are within each other's communication range in the t+1 period based on the vehicle position and velocity vector obtained in the t period, which is called the link duration. For the convenience of calculation, the link duration is normalized and we can get
[0172]
[0173] The weighted sum of the normalized communication distance tolerance and the normalized link duration is denoted as Available
[0174]
[0175] Among them, ρ∈[0,1] is the weighting factor, and its value can be adjusted according to actual conditions.
[0176] In the t+1th cycle, define the weighted adjacency matrix W that represents the communication distance tolerance and link duration t+1 (hereinafter referred to as the “distance-time” weighted adjacency matrix). Calculate the weight of each link according to formula (6): Fill it into W t+1 In, can be obtained
[0177]
[0178] (3) Link quality objective function
[0179] Considering three factors, namely, obstacle occlusion, communication distance tolerance and link duration, the “occlusion” adjacency matrix ω is t+1 and the “distance-time” weighted adjacency matrix W t+1 Perform point multiplication to obtain the comprehensive weight adjacency matrix W of link quality *t+1 (hereinafter referred to as the comprehensive weighted adjacency matrix), we can get
[0180] W *t+1 =W t+1 ·ω t+1 (8)
[0181] Among them, W *t+1 N v ×N v The element in the i-th row and j-th column represents the comprehensive weight value of the link quality between vehicle nodes i and j (hereinafter referred to as the comprehensive weight).
[0182] In the t+1th cycle, the number of cache nodes is set to N C , then the cache node set is C t+1 ={c 1 ,c 2 ,…,c NC}. Cache node c k The task node set is set to If If there are q elements in the set, cache node c k The q task nodes can form a cluster, where q is a natural number. From the comprehensive weight adjacency matrix W *t+1 In the example, we extract cache nodes c respectively. k The sum of the comprehensive weights of its q task nodes is used to define the average link weight of the cluster. is the ratio of sum to q. To ensure that the better link is selected for intra-cluster communication, the average link weight of all clusters in the network should be maximized, so the link quality objective function is:
[0183]
[0184] S1 analyzes and models the cache node load balancing situation, which specifically includes the following steps:
[0185] (1) Cache node load balancing objective function
[0186] The premise of achieving load balancing is to count the number of file requests for each task node. In a cycle, the number of file requests generated by a task vehicle is affected by many factors, so the Poisson distribution is introduced to describe the arrival of file requests from the vehicle. Assuming the time interval is [0, t], the request arrival rate is Then the number of file requests arriving for vehicle i is Num i (t) obedience parameters Poisson distribution. According to the Poisson distribution property, the probability mass function of the number of file requests arriving for vehicle i in time t is K is
[0187]
[0188] In time t, the expected number of file requests arriving from vehicle i is
[0189]
[0190] From the above formula, it can be seen that the number of file requests generated by each vehicle follows the Poisson distribution, and the number of vehicles in a cluster is not equal to the number of file requests.
[0191] In the t+1th cycle, let For cache node c k The request number set of each task node in the cluster, then
[0192]
[0193] in,
[0194] For cache node c k The number of requests of the χth task node in the t+1th cycle, χ∈{1,2,…,q}.
[0195] From formula (12), we can see that cache node c k The actual load is
[0196]
[0197] Suppose that the cache node c is k Can only respond to T at mostmax Requests. Compute cache node c k The actual load The maximum number of requests it can serve, T max The ratio is defined as the load level of the cache node. have
[0198]
[0199] According to formula (14), calculate the load level of each cache node If the value is greater than 1, it means that the cache node is overloaded. max hour, is a number between (0,1]. The number of cache nodes count. Define the load balancing quality LB of the cache nodes in the network, let it be
[0200]
[0201] Where N c is the total number of cache nodes. As can be seen from the above formula, LB∈(0,1]. For a certain period, the larger the LB is, the more cache nodes are not overloaded. When LB is 1, it means that the number of requests received by each cache node is not overloaded. Therefore, the load balancing objective function is
[0202]
[0203] (2) Cache node load balancing constraints
[0204] To ensure that cache nodes and task nodes actually exist, constraints 1 and 2 are proposed respectively. In a cycle, to ensure that the number of file requests for a cluster does not exceed the maximum number of requests that the cache nodes of the cluster can serve, constraint 3 is proposed. Similarly, to ensure that the total number of requests in the entire network does not exceed the maximum total number of requests that all cache nodes can serve, constraint 4 is proposed.
[0205] The maximum number of requests that a cache vehicle can serve in order to respond to requests is T. max Must be greater than or equal to 1, so there is constraint 1
[0206] CON 1: T max ≥1 (17)
[0207] In the t+1th cycle, the number of file requests for each task vehicle cannot be negative, so there is constraint 2
[0208]
[0209] Since each cluster has only one cluster head (cache node), the sum of the number of file requests in a cluster must not be greater than T max , so there is constraint 3
[0210]
[0211] Let the total number of file requests issued by all task nodes be SL, according to formula (11), we can get
[0212]
[0213] To ensure that all requests in the entire network can be responded to, the total number of file requests SL must be less than or equal to the maximum total number of requests that all cache nodes can serve Otherwise, some requests will not be responded to. Therefore, there is constraint 4
[0214]
[0215] S1 analyzes and models the problem of achieving full network coverage with the least cache nodes, which specifically includes the following steps:
[0216] (1) Cache Node Minimization Objective Function
[0217] In order to reduce the overhead of configuring and managing cache nodes and reduce channel contention between cache nodes, the number of cache nodes is required to be as small as possible. The objective function of the number of cache nodes is:
[0218]
[0219] (2) Constraints on minimizing cache nodes
[0220] In the t+1th cycle, cache node c k The set of all q task nodes in the cluster It can be specifically written as
[0221]
[0222] To reduce duplicate responses, all cache nodes are required to only provide file responses to task nodes in their cluster. k and c Δ The intersection of the task node sets of each cluster is empty, then there is constraint 5
[0223]
[0224] In order to satisfy the requirement of minimum cache nodes covering the entire network, the total number of elements in the union of the cache node set and its optimal task node set should be equal to the total number of vehicles N v Define an operator "<>" to get the total number of elements in the union, then there is a constraint 6
[0225]
[0226] By combining the three objective functions of equations (9), (16) and (22) and the six related constraints, the multi-objective optimization equation constructed by the present invention is:
[0227]
[0228] As can be seen from formula (26), P1 maximizes the average link weight of the cluster, which means that vehicles with better V2V links are selected as cache nodes. P2 achieves the load balancing goal of the cache nodes, which means that the number of requests received by each cache node is relatively balanced. P3 minimizes the number of cache nodes, which means that the entire network is covered with the least cache nodes.
[0229] S2 specifically includes the following steps:
[0230] (1) Obstacle occlusion judgment
[0231] Considering that electromagnetic wave propagation obeys the free space model, mobile obstacles blocking the link will cause communication failure. Figure 2 As shown, vehicle i, neighbor vehicle j, and obstacle vehicle r with a length of L move at speeds v i 、v j and v r Driving from east to west on three lanes. Establish the coordinate axis with vehicle i as the origin, and set the coordinate of neighbor node j to (x j ,y j ), Q is the center of mass of the obstacle node r, with coordinates (α, β), and d is the midpoint of the link segment ij between vehicles i and j. The moment when the front and rear of the obstacle vehicle touch the midpoint d of the link is recorded as the occlusion start time t 1 and the occlusion end time t 2 .
[0232] Taking the neighbor node j in the first quadrant of the coordinate axis as an example, connect point Q and the origin i to obtain a straight line l. 1 and t 2 At time t, if the center of mass Q is on the same side of the y-axis twice, define θ as the angle between l and the positive half axis of the y-axis. Calculate t 1 Time and t 2 The tanθ threshold corresponding to the moment is used to form the threshold interval of the obstacle blocking the link using two tanθ values. In any cycle, if the tanθ value formed during the driving of the three vehicles is in the above interval, the link is judged to be blocked. The specific steps of the algorithm are as follows:
[0233] Obstacle occlusion judgment algorithm
[0234] Algorithm input: driving status information of all vehicles, neighbor node array of node i
[0235] Algorithm output: Output the occlusion state value Ψ of each link. According to formula (3), the "occlusion" adjacency matrix ω can be obtained: t+1
[0236] S201: Create (N v -1)*(N v -1)'s "occlusion" adjacency matrix ω t+1 .
[0237] S202: Traverse vehicle i, i∈{1,2,…,N v} and its neighbor node array
[0238] S203: Establish a coordinate axis with vehicle i as the origin, obtain the coordinates (a, b) of neighbor node j, the coordinates (α, β) of the center of mass Q of the obstacle vehicle r, and the link segment ij connecting vehicles i and j, and take the midpoint d. The time when the front and rear of the obstacle vehicle touch the midpoint d of the link is recorded as the occlusion start time t 1 and the occlusion end time t 2 .
[0239] S204: If the neighbor node is in the first or second quadrant, the following two situations are performed:
[0240] (a) At t 1 Time and t 2 At time t, if the center of mass Q of the obstacle vehicle r is on the same side of the y-axis twice, that is, L≤2aβ / b, connect point Q and the origin i to obtain a straight line l, and let the angle between l and the positive semi-axis of the y-axis be θ. Calculate t 1 Time and t 2 The tanθ threshold corresponding to the time constitutes the tanθ threshold interval of the obstacle blocking the link. In any cycle, if the tanθ values of the three vehicles are in the above interval, the link is judged to be blocked, and let Otherwise,
[0241] (b) At t 1 Time and t 2 At time t, if the center of mass Q of the obstacle vehicle r is on the left and right sides of the y-axis, that is, when L>2aβ / b, connect point Q and the origin i to obtain a straight line l, and let the angle between l and the positive semi-axis of the x-axis be θ. Calculate t 1 Time and t 2 The tanθ threshold corresponding to the time constitutes the tanθ threshold interval of the obstacle blocking the link. In any cycle, if the tanθ values of the three vehicles are in the above interval, the link is judged to be blocked, and let Otherwise,
[0242] S205: If the neighbor node is in the third or fourth quadrant, the processing steps are the same as S204.
[0243] S206: The algorithm ends and the occlusion state Ψ value of each link is output. According to the formula Get ω t+1 .
[0244] (2) Calculation of comprehensive weighted adjacency matrix
[0245] To ensure stable communication, the cache node gives priority to vehicles with larger comprehensive link weights as task nodes, so that the average link weight of the cluster reaches the maximum value. Through the obstacle occlusion judgment algorithm, the "occlusion" adjacency matrix ω can be obtained t+1 According to the workshop distance and link duration, the “distance-time” weighted adjacency matrix W is calculated using formula (7): t+1 By multiplying the above two matrices according to formula (8), we can obtain the comprehensive weighted adjacency matrix W *t+1 .
[0246] S3 specifically includes the following steps:
[0247] According to the objective function P2 and constraints of the cache node load balancing in S1, the specific steps are in "Load balancing maximization" in S5 "Cache node selection algorithm in complex scenarios".
[0248] S4 specifically includes the following steps:
[0249] According to the objective function P3 and constraints of achieving full network coverage with the minimum number of cache nodes in S1, the specific steps are in "Cache Node Minimization" in S5 "Cache Node Selection Algorithm in Complex Scenarios"
[0250] S5 specifically includes the following steps:
[0251] The vehicles are divided into undetermined nodes, task nodes and cache nodes, and the identity bits are set to 0, 1 and 2 respectively, so as to construct the node identification bit vector of the t+1th cycle as
[0252]
[0253] The identity bits of all nodes are initialized to 0. The number of nodes with undetermined identities in the neighbors of node i is called the node degree F i The ratio of the sum of the comprehensive weights of all links of node i to the number of its neighboring nodes is called the average neighbor comprehensive weight.
[0254] Cache node selection algorithm in complex scenarios
[0255] Input: Comprehensive weighted adjacency matrix W*t+1 , request load constraint T max , the neighbor node array of each node
[0256] Output: cache node set C t+1 , the set of task nodes of each cluster Load balancing quality LB
[0257] (1) Algorithm initialization
[0258] S501: Initialization
[0259] S502: If there is a node with an identifier of 0, execute the following steps. If not, execute step S514.
[0260] S503: Traverse all nodes and calculate the node degree F of each node i .
[0261] (2) Minimize cache nodes
[0262] S504: Update the node degree list.
[0263] S505: If the node degree of node i is F i = 0, it takes itself as a cache node and includes it in set C t+1 , the identity is set to 2.
[0264] S506: If the node degree of node i is F i = 1, and the node degree of its neighbor node is greater than 1, it will be used as a task node, the identity is set to 1, and its neighbor nodes will be included in the cache node set C t+1 , the identity is set to 2.
[0265] (3) Maximizing the average link weight of the cluster
[0266] S507: If the node degree of node i is F i =1, and the node degree of its neighbor node is also 1, the node with the largest average neighbor comprehensive weight is selected as the cache node, and its identity is set to 2.
[0267] S508: At this point, the node degree F i = 0 or 1 have been determined, and the remaining nodes are processed in two cases. The first case is that the node degrees of the nodes are different, then the node with the largest node degree is selected as the cache node, so that a cache node can cover as many nodes as possible. The second case is that the node degrees of some nodes are the same, then the node with the largest average neighbor comprehensive weight is selected as the cache node. The selected cache nodes are included in C t+1 , the identity is set to 2.
[0268] S509: After initially selecting the cache nodes, update the node degree of each node.
[0269] (4) Maximizing Load Balancing
[0270] S510: cache node c k The neighbor nodes are based on F i Sort the values from small to large to get the node number sequence F array .
[0271] S511: If cache node c k The total number of requests from all neighbor nodes is less than T max , then all neighbor vehicles with node degree 0 are taken as task nodes and added to the set And set its identity to 1. Otherwise, select F array The total number of requests does not exceed T max , and the nodes ranked first are included as task nodes And set its identity to 1.
[0272] S512: If c k A collection of task nodes Already included in F array Sort the first u neighbor nodes in the sequence, and the total number of requests for the first u neighbor nodes is less than T max , then the total number of requests is (T max –u)’s neighbor nodes can become c k The neighbor nodes with the remaining node degree of 0 are selected as candidate task nodes. The selection method is as follows:
[0273] a) In F array When the last vehicle can be added in F array If the order is H, and the number of requests from the H+1th vehicle is the same as the number of requests from the Hth vehicle, then sort all the links of these two nodes from large to small according to the comprehensive weight, and select c k The node with a higher rank in its sequence is c k task node.
[0274] b) If in c k In the neighbor node link weight sequence of c k If the positions are still the same, choose the one with c k The neighbor node with the largest comprehensive weight is taken as the task node and included in The identity flag is set to 1.
[0275] (5) Algorithm ends
[0276] S513: Update the node degree of each node, and return to S502.
[0277] S514: Count the load of each cache node and calculate LB.
[0278] S515: Algorithm ends, output C t+1 , and LB
[0279] Example 2
[0280] A simulation experiment was carried out based on Example 1;
[0281] Network scenarios such as Figure 1 As shown in the figure, the communication adopts the 3GPP R14 standard, and the length of each lane is 500m. The file popularity follows the Zipf distribution. Due to the limited storage space, the cache vehicle can only store the most popular first J files, that is, the cache capacity is J. The Go language is used to simulate and complete the performance evaluation. The key simulation parameters are shown in Table 1.
[0282] Table 1 Key simulation parameters
[0283]
[0284]
[0285] Figure 3 The request response rate performance of the three algorithms is shown, where T max =8, J=5 (the above values are taken unless otherwise specified below). According to the Zipf distribution, when the total number of files is 20, the Zipf distribution parameter is 0.9, and J is 5, the corresponding theoretical value of the request response rate in the CDF (Cumulative Distribution Function) is 0.593. The mean request response rate of the ObsTmax algorithm of the present invention is 0.592, which is close to the theoretical value of the request response rate and is significantly better than the NmaxMDS algorithm. This is because the ObsTmax algorithm takes into account obstacles and multiple requests for a single vehicle. On the one hand, it avoids selecting blocked links, and on the other hand, it takes the maximum number of requests that can be served by the vehicle as a constraint to ensure the request response performance. The NmaxMDS algorithm does not take the above factors into account, so the mean request response rate is only 0.46. The random algorithm arbitrarily selects 33% of the vehicles in the network as cache nodes, which makes it more likely that the cache nodes are overloaded or there are no cache nodes around the task nodes, so the request response rate is the lowest.
[0286] Figure 4The comparison of the mean number of cache source responses of the three algorithms is shown. The higher the value (total number of responses / total number of cached vehicles), the more active the cached vehicle response is and the smaller the base station load is. The mean number of cache source responses of the ObsTmax algorithm fluctuates between 1.31 and 1.63, which is slightly better than the NmaxMDS algorithm. Since the ObsTmax algorithm avoids selecting blocked links and there is no overload of cache nodes, the total number of responses of cache nodes can be increased. However, due to the obstacle blockage judgment mechanism, the number of cache nodes in the ObsTmax algorithm is slightly more than that of the NmaxMDS algorithm, resulting in the mean number of cache source responses of the former being only slightly higher than that of the latter. For the random algorithm, the task node broadcasts the file request, and the randomly determined cache node responds once it receives the task request. There must be a large number of repeated invalid responses, so the mean number of cache source responses of the random algorithm is the highest.
[0287] Figure 5 The repeated response rates of the three algorithms are shown. The repeated response rates of the ObsTmax and NmaxMDS algorithms are both 0. This is because the task nodes of the two algorithms only make requests within their own clusters, so they will not receive responses from cache nodes in other clusters. Since the random algorithm does not have a clustering mechanism, multiple cache nodes may receive the same request and respond separately, so the repeated response rate is the highest, which also explains Figure 4 The reason why the random algorithm has a higher cache source response time indicator.
[0288] Figure 6 The violin plot is used to intuitively display the load balancing quality LB of the three algorithms. The LB value of each cycle of the ObsTmax algorithm of the present invention is 1, indicating that the load of each cache node is relatively balanced. For the NmaxMDS algorithm, the LB of more than half of the cycles is between 0.80 and 0.95, but there are also many cycles with LB values lower than 0.80, which shows that the load balancing of the NmaxMDS algorithm is weaker than that of the ObsTmax algorithm. This is because the NmaxMDS algorithm uses the number of vehicles that the cache node can load as the load constraint, ignoring the difference in the number of requests of each vehicle, which easily causes an imbalance in the load of the cache node. Due to the arbitrariness of cache node selection, the LB of the random algorithm is scattered between 0.55 and 0.90, and the load balancing performance is the lowest.
[0289] Figure 7 Shows the maximum number of requests that a cache node can serve, T max When the cache capacity is 8, 12 and 16 respectively, and the cache capacity J=5, the difference in request response rate between the two comparison algorithms and the ObsTmax algorithm of the present invention is shown in Figure 2. maxUnder the three values, the median of the difference in request response rate is greater than 0, and most of the box plots remain above the 0 scale, indicating that the request response rate of the ObsTmax algorithm is higher than that of the NmaxMDS algorithm. max When T is 16, the request response rate of the ObsTmax algorithm is lower than that of the random algorithm. This is because max The continuous increase leads to a gradual reduction in the cache node overload phenomenon of the random algorithm, and its request response rate may be higher than that of the algorithm of the present invention.
[0290] Figure 8 Shows the maximum number of requests that a cache node can serve, T max When T is 8, 12 and 16 respectively, let the cache capacity J = 5, the repeated response rate of the random algorithm. The figure shows that the repeated response rate of the random algorithm also increases with T max It can be seen that when T max It is 16:00, Figure 7 The high request response rate of the random algorithm comes at the cost of high duplicate responses.
[0291] Fig. 9 It shows that when the cache capacity J is 5, 10 and 15 respectively, let T max =8, the difference in request response rate between the two comparison algorithms and the ObsTmax algorithm of the present invention. As can be seen in the figure, taking the other two algorithms as the benchmark, the cache capacity J increases from 5 to 15, the median of the difference in request response rate is greater than 0, and the box plots mostly remain above the 0 scale. This shows that under different cache capacities, the request response rate of ObsTmax is higher than that of the two comparison algorithms. Specifically, under the three cache capacities J, the median of the difference in request response rate between ObsTmax and NmaxMDS algorithms is roughly equivalent, which are 0.129, 0.130 and 0.131 respectively. This is because both of the above algorithms can achieve theoretical full network coverage, and the performance gap between the two depends only on obstacle occlusion and load balancing, so the increase in cache capacity will not widen the performance gap between the two algorithms. Under the three cache capacities J, the median of the difference in request response rate between the ObsTmax algorithm and the random algorithm are 0.176, 0.292 and 0.373 respectively, showing a trend of gradual growth. This is because as the cache capacity J increases, when a task node requests a file, the probability that the file exists in the cache node increases. Since the cache nodes of the algorithm of the present invention can cover the entire network, its request response rate gradually increases, while the random algorithm cannot theoretically guarantee that the cache nodes cover the entire network, and its request response rate is difficult to guarantee, so the difference in request response rate between the two gradually increases.
[0292] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for selecting a cache node in an Internet of Vehicles under complex scenarios, characterized in that: The following steps are involved: S1: Build three models: (1) Analyze and model link quality by considering obstacles blocking the link, vehicle distance, and link duration; (2) Analyze and model cache node load balancing; (3) Analyze and model how to achieve full network coverage with the minimum number of cache nodes; S2: A link quality assessment algorithm is proposed. The algorithm first proposes an obstacle occlusion judgment algorithm, and then calculates the comprehensive weighted adjacency matrix based on the vehicle distance and link duration algorithm; S3: Based on the file load limit of the cache vehicle, the file request is dynamically allocated and a cache node load balancing algorithm is proposed to achieve load balancing; S4: Select cache nodes and task nodes based on their merits, and propose a cache node minimization algorithm to achieve minimum cache node coverage of the entire network; S5: Give the cache node selection algorithm process in complex scenarios.
2. According to the method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, it is characterized in that: In step S1, considering obstacles blocking the link, the vehicle distance and the link duration, the link quality is analyzed and modeled, including the following steps: (1) Obstacles The road scene is set as a crossroads, each main road is a two-way three-lane road, and the base station communication radius is R B , covering a certain intersection area, the number of vehicles in this area is N v , the vehicle communication radius is R v , then the vehicle set is N = {n1,n2,…,n Nv }, assuming that all vehicles are equipped with positioning equipment and the base station has the function of full network control, in the tth period, the i∈{1,2,…,N v The vehicle's driving status information is defined as in is the position coordinate, is the vehicle speed; the length of the rth obstacle vehicle is set to L, and its state information is defined as r is a positive integer. The vehicle periodically uploads basic information such as driving and file requests to the base station. Since the road setting is relatively stable, the base station predicts the location of the vehicle in the next cycle based on the trajectory information of the current cycle; If the communication link is blocked, the V2VVehicle to Vehicle data transmission will fail. First, determine the neighboring vehicles of vehicle i, and calculate the distance between vehicles i and j based on the position coordinates of the vehicles in period t+1. Secondly, determine whether the link between vehicle i and its neighbor vehicle j is blocked, and construct the neighbor node array of vehicle i in the t+1th cycle. m i is a natural number, traverse the above array Determine whether the link between vehicle i and its neighboring nodes is blocked by a moving obstacle. To describe the blocking conditions of each link, construct the "blocking" adjacency matrix ω t+1 ,Will Fill in the value; (2) Inter-vehicle distance and link duration The vehicle distance and link duration affect the link quality. First, the vehicle distance is analyzed and the normalized communication distance tolerance is calculated. Secondly, the link duration between the two vehicles is analyzed. The base station predicts the time that vehicle nodes i and j are within each other's communication range in the t+1 period based on the vehicle position and velocity vector obtained in the tth period, and calculates the normalized link duration. The weighted sum of the normalized communication distance tolerance and the normalized link duration is denoted as In the t+1th cycle, define the weighted adjacency matrix W that represents the communication distance tolerance and link duration t+1 , calculate the Fill it into W t+1 middle; (3) Link quality objective function Considering three factors, namely, obstacle occlusion, communication distance tolerance and link duration, the "occlusion" adjacency matrix ω is t+1 and the "distance-time" weighted adjacency matrix W t+1 Perform point multiplication to obtain the comprehensive weight adjacency matrix W of link quality *t+1 ; In the t+1th cycle, the number of cache nodes is set to N C , then the cache node set is C t+1 ={c1,c2,…,c NC }, cache node c k The task node set is set to If If there are q elements in the set, cache node c k Together with the q task nodes, a cluster is formed, where q is a natural number. From the comprehensive weight adjacency matrix W *t+1 In the example, we extract cache nodes c respectively. k The sum of the comprehensive weights of its q task nodes is used to define the average link weight of the cluster. is the ratio of sum to q. To ensure the selection of better links for intra-cluster communication, the average link weights of all clusters in the network should be maximized. The link quality objective function is defined as P1.
3. According to the method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, it is characterized in that: In step S1, the cache node load balancing situation is analyzed and modeled, including the following steps: (1) Cache node load balancing objective function The premise of achieving load balancing is to count the number of file requests of each task node. In a cycle, the number of file requests generated by a task vehicle is affected by many factors. Poisson distribution is introduced to describe the arrival of file requests of vehicles. In the t+1th cycle, let For cache node c k The request count of each task node in the cluster is calculated to calculate the cache node c k The actual load; Suppose that the cache node c is k Maximum response T max requests, calculate cache node c k The actual load The maximum number of requests it can serve, T max The ratio is defined as the load level of the cache node. Calculate the load level of each cache node If the value is greater than 1, it means that the cache node is overloaded. max hour, is a number between (0,1], and then counts the scenes The number of cache nodes count is defined as the load balancing quality LB of the cache nodes in the network as count and N C For a certain period, the larger the LB is, the more cache nodes are not overloaded. When LB is 1, it means that the number of requests received by each cache node is not overloaded. Therefore, the load balancing objective function LB is defined as P2. (2) Cache node load balancing constraints To ensure that cache nodes and task nodes actually exist, constraints 1 and 2 are proposed respectively. In a cycle, to ensure that the number of file requests of a cluster does not exceed the maximum number of requests that the cache nodes of the cluster can serve, constraint 3 is proposed. Similarly, to ensure that the total number of requests in the entire network does not exceed the maximum total number of requests that all cache nodes can serve, constraint 4 is proposed. The cache vehicle needs to respond to file requests. Constraint 1 is set to the maximum number of requests that the cache vehicle can serve, T. max Must be greater than or equal to 1; In the t+1th cycle, constraint 2 is set to the number of file requests of each task vehicle is not negative; Since each cluster has only one cluster head cache node, constraint 3 is set as the sum of the number of file requests within a cluster must not be greater than T max ; Let the total number of file requests issued by all task nodes be SL, and constraint 4 is set as follows: the total number of file requests SL must be less than or equal to the maximum total number of requests that can be served by all cache nodes Otherwise, some requests will not be responded to.
4. According to the method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, it is characterized in that: In step S1, analyzing and modeling to achieve full network coverage with the least cache nodes includes the following steps: (1) Cache Node Minimization Objective Function In order to reduce the overhead of configuring and managing cache nodes and reduce channel contention between cache nodes, the number of cache nodes is required to be as small as possible, and the objective function defining the number of cache nodes is minimized as P3; (2) Constraints on minimizing cache nodes In the t+1th cycle, cache node c k The set of all q task nodes in the cluster It is stipulated that all cache nodes only provide file responses to task nodes in their cluster. Therefore, constraint 5 is that cache node c k and c k The intersection of the task node sets of their respective clusters is empty; In order to satisfy the requirement of minimum cache nodes covering the entire network, constraint 6 is the union of the cache node set and its optimal task node set, and the total number of its elements should be equal to the total number of vehicles N. v ; Based on the above three objective functions and six related constraints, a multi-objective optimization equation is constructed; P1 maximizes the average link weight of the cluster, which means that vehicles with better V2V links are selected as cache nodes. P2 achieves the load balancing goal of the cache nodes, which means that the number of requests received by each cache node is relatively balanced. P3 minimizes the number of cache nodes, which means that the entire network is covered with the least number of cache nodes.
5. According to the method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, it is characterized in that: Step S2 includes the following steps: (1) Obstacle occlusion judgment Considering that electromagnetic wave propagation obeys the FreeSpace model, the mobile obstacle blocks the link and causes communication failure. Vehicle i, neighbor vehicle j, and obstacle vehicle r with a length of L move at speeds v i 、v j and v r Driving from east to west on three lanes, establish a coordinate axis with vehicle i as the origin, and set the coordinate of neighbor node j to be (x j ,y j ), Q is the center of mass of the obstacle node r, with coordinates (α, β), d is the midpoint of the link segment ij between vehicles i and j, and the moment when the front and rear of the obstacle vehicle touch the midpoint d of the link is recorded as the occlusion start time t1 and the occlusion end time t2 respectively; Taking the neighbor node j in the first quadrant of the coordinate axis as an example, connect point Q and origin i to obtain straight line l. At time t1 and t2, if the center of mass Q is on the same side of the y-axis twice, define θ as the angle between l and the positive half axis of the y-axis. Calculate the tanθ thresholds corresponding to time t1 and time t2 respectively. Use the two tanθ values to form the threshold interval of the obstacle blocking the link. In any cycle, if the tanθ value formed during the driving of the three vehicles is in the above interval, it is judged that the link is blocked. (2) Calculation of comprehensive weighted adjacency matrix The cache node preferentially selects vehicles with large link comprehensive weight as task nodes, so that the cluster average link weight reaches the maximum value, and obtains the "occlusion" adjacency matrix ω through the obstacle occlusion judgment algorithm. t+1 , according to the workshop distance and link duration, the "distance-time" weighted adjacency matrix W is calculated t+1 , multiply the above two matrices to obtain the comprehensive weight adjacency matrix W *t+1 .
6. The method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, characterized in that: In step S3, according to the objective function P2 and constraints of the cache node load balancing situation in step S1, "load balancing maximization" in step S5 "cache node selection algorithm in complex scenarios" is performed.
7. The method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, characterized in that: In step S4, according to the objective function P3 and constraints of achieving full network coverage with the least cache nodes in step S1, the "cache node minimization" in step S5 "cache node selection algorithm in complex scenarios" is performed.
8. The method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, characterized in that: The step S5 specifically comprises the following steps: The vehicles are divided into undetermined nodes, task nodes and cache nodes, and the identity bits are set to 0, 1 and 2 respectively, so as to construct the node identification bit vector of the t+1th cycle; The identity bits of all nodes are initialized to 0, and the number of nodes with undetermined identities among the neighbors of node i is called the node degree F i , the ratio of the sum of the comprehensive weights of all links of node i to the number of its neighboring nodes is defined as the average neighbor comprehensive weight; Design cache node selection algorithms for complex scenarios; Input: Comprehensive weighted adjacency matrix W *t+1 , request load constraint T max , the neighbor node array of each node Output: cache node set C t+1 , the set of task nodes of each cluster Load balancing quality LB; (1) Algorithm initialization; (2) Minimize cache nodes; (3) Maximizing the average link weight of the cluster; (4) Maximizing load balancing; (5)The algorithm ends.
Citation Information
Patent Citations
Multi-mode switching type Internet of Vehicles routing method
CN110446184A
Active edge caching method based on community discovery and weighted federated learning
CN115696296A
Vehicle cooperation cache relay method based on deep reinforcement learning in Internet of Vehicles
CN117201508A
Intelligent network connection vehicle group leader vehicle election system and method based on zero-trust architecture
CN117939431A
Method and device for determining a path for an autonomous vehicle
FR3096637A1
