Internet of vehicles cache node selection method under complex scene

By building a multi-objective optimization model in the Internet of Vehicles, taking into account obstacle obstruction, vehicle distance and link duration, dynamically allocating file requests and preferentially selecting cache nodes, the problems of link obstruction and load imbalance are solved, the request response rate and load balancing are improved, and the repeated response rate is reduced.

CN119232742BActive Publication Date: 2025-10-17JIANGXI JILUO SCIENTIFIC & TECHNOLOGICAL ACHIEVEMENTS TRANSFORMATION SERVICE CO LTD

Patent Information

Application Number
CN202410630336.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2025-10-17
Estimated Expiration
2044-05-21

AI Technical Summary

Technical Problem

Existing technologies in the Internet of Vehicles have failed to effectively solve the problems of communication interruption and cache node load imbalance in scenarios such as link obstruction and multiple requests per vehicle, resulting in low request response rate, high duplicate response rate, and unbalanced cache node load.

Method used

A multi-objective optimization model for link quality, load balancing, and minimization of cache nodes is established. Link quality is evaluated through obstacle occlusion judgment, vehicle distance, and link duration. File requests are dynamically allocated, and cache and task nodes are preferentially selected to achieve load balancing and minimize cache node coverage.

Benefits of technology

It improves the request response rate, reduces the duplicate response rate, achieves load balancing of cache nodes, and optimizes the cache node selection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232742B_ABST
    Figure CN119232742B_ABST
Patent Text Reader

Abstract

The present invention provides a method for selecting cache nodes in an Internet of Vehicles (IoV) under complex scenarios, and belongs to the technical field of IoV. It solves the technical problems of communication interruption and cache node load imbalance caused by obstacles blocking the link and multiple requests from a single vehicle. Its technical solution is: including the following steps: S1: constructing three models; S2: proposing a link quality assessment algorithm; S3: based on the file load upper limit of the cache vehicle, dynamically allocating file requests, and proposing a cache node load balancing algorithm; S4: preferentially selecting cache nodes and task nodes, and proposing a cache node minimization algorithm; S5: giving a cache node selection algorithm process under complex scenarios. The beneficial effects of the present invention are: the present invention considers the maximum number of requests that can be served by the cache vehicle as a load constraint, dynamically allocates file requests, and achieves load balancing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer networks, and particularly relates to a vehicle networking cache node selection method in a complex scenario. BACKGROUND

[0002] With the popularization of intelligent vehicles, vehicles will generate a large amount of data and computing demand. Vehicles in IoV can hardly support computing-intensive services relying on their own limited computing and storage resources. Cloud computing can solve the problem of insufficient computing resources of vehicles, but its long-distance deployment will cause unpredictable latency and increase bandwidth overhead. In view of the above problems, the industry proposes vehicular edge computing technology (VEC), which uses roadside servers or idle vehicles as computing resources to provide computing and storage functions for users nearby, realizing the localization, proximity and distributed deployment of applications, services and contents. According to the uplink and downlink direction of data, vehicle perspective edge computing can be divided into vehicle offloading computing tasks (task offloading) and vehicle requesting data files (file request), and the present application mainly studies the edge computing of file request.

[0003] File request mainly studies how to make a request and respond to the request (requesting files from which device, how to pre-store files, etc.). In order to reduce the load of cloud servers and the communication overhead of wide area networks, vehicle nodes can access roadside edge servers. However, since all file requests and responses are still transferred by base stations, the communication load of base stations is large and they are easy to become communication bottlenecks. Therefore, researchers introduce cache technology in vehicle nodes, pre-store popular files in vehicles (cache nodes), and task nodes first request files from surrounding cache nodes. If the cache node pre-stores the file, it is directly sent to the task node, otherwise the task node initiates a request to the edge server through the base station. Therefore, vehicle cache technology can fully utilize the storage resources and computing resources of cache vehicles, reduce the repeated transmission of files in the network, and reduce transmission delay and base station bandwidth overhead.

[0004] Through domestic and foreign literature retrieval, it is found that the existing paper "Information-Centric Networking Cache Placement Method Based on Cache Node Status and Location" (Wireless Communications and Mobile Computing, 2021) calculates the node state value according to the node cache capacity, routing hop count and importance of popular files, and selects the node with the largest state value as the cache vehicle, which can transmit files with lower hop count, but when there are many vehicles, too many cache nodes will be selected, resulting in resource waste.

[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 converts the minimization of delay into a knapsack problem, and then uses a dynamic programming algorithm to solve it to obtain the optimal caching decision. However, this research 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 an NmaxMDS algorithm. This algorithm takes the number of vehicles as the load constraint, takes the distance between vehicles and the link duration as the link stability indicators, constructs the objective function, and realizes network full coverage with the least number of cache nodes while maximizing the average link weight of the cluster. Simulation shows that this algorithm achieves a high request response rate and a constant zero repeat response rate. However, this research also has some problems. First, the literature does not consider the link quality under the obstruction of obstacles, and the interruption of the communication link may cause some requests to be unable to obtain a response from the cache node. Second, the literature only takes the number of task vehicles as the load constraint, assuming that each vehicle carries only one file request in a period (single vehicle single request), without considering the difference in the number of file requests carried by each task node, which may lead to load imbalance of cache nodes. In other words, the number of vehicles in some clusters is small, while the number of file requests is large, or the number of vehicles in some clusters is large, while the number of file requests is small.

[0007] How to solve the above technical problems is the subject faced by the present application. SUMMARY

[0008] The present application establishes a multi-objective optimization model of link quality, load balancing and cache node minimization to solve the problems of communication interruption and cache node load imbalance caused by link obstruction and single vehicle multi-request scenarios, and proposes a vehicle cache node selection algorithm. First, considering link obstruction, distance between vehicles and link duration, a comprehensive weight adjacency matrix of link quality is constructed to maximize the average link weight of the cluster. Second, based on the upper limit of the file load of the cache vehicle, the file request is dynamically allocated to achieve load balancing. Finally, the cache node and task node are selected to achieve the least number of cache nodes covering the entire network.

[0009] To solve the above problems, the present application proposes a cache node selection method for Internet of Vehicles in complex scenarios, which selects the cache node and task node optimally, achieves a high request response rate and cache source response times, and a constant zero repeat response rate, and realizes cache node load balancing.

[0010] In order to achieve the above object of the application, the technical scheme is specifically as follows: a vehicle networking cache node selection method under a complex scene, comprising the following steps:

[0011] S1: three models are constructed: (1) considering the link blocked by obstacles, the distance between vehicles and the link duration, the link quality is analyzed and modeled; (2) the load balancing of cache nodes is analyzed and modeled; (3) the problem of realizing the whole network coverage with the least cache nodes is analyzed and modeled;

[0012] S2: a link quality evaluation algorithm is proposed, which firstly proposes an obstacle blocking judgment algorithm, and then calculates a comprehensive weight adjacency matrix based on the distance between vehicles and the link duration algorithm;

[0013] S3: based on the upper limit of the file load of the cache vehicle, a file request is dynamically allocated, and a cache node load balancing algorithm is proposed to realize load balancing;

[0014] S4: the cache node and the task node are selected, and a cache node minimization algorithm is proposed to realize the least cache node covering the whole network;

[0015] S5: the cache node selection algorithm process under the complex scene is given.

[0016] In S1, the link blocked by obstacles, the distance between vehicles and the link duration are considered, and the link quality is analyzed and modeled, which specifically comprises the following steps:

[0017] (1) obstacle blocking

[0018] As shown in Figure 1 , the road scene is set as a crossroad, and each main road is a three-lane two-way road. The base station communication radius is R B , covering the intersection area, the number of vehicles in the area is N v , and the communication radius of the vehicle is R v , so the vehicle set is N={n1,n2,…,n Nv}. In order to obtain the vehicle trajectory in real time, it is assumed that all vehicles are equipped with positioning devices, and the base station has the function of whole network control. In the t period, the driving state information of the i∈{1,2,…,N v} vehicle is defined as Wherein is the position coordinate, is the vehicle speed; the length of the rth obstacle vehicle is L, and its state information is defined as r is a positive integer. The vehicle regularly uploads the basic information such as driving and file request to the base station. Since the road setting is relatively stable, the base station can predict the position of the vehicle in the next period according to the trajectory information in this period.

[0019] The communication link is blocked, which leads to the failure of V2V data transmission. In order to avoid selecting the buffer node containing the potential blocked link, it is necessary to judge whether the link is blocked by the moving obstacle. First of all, the neighborhood of vehicle i is determined. According to the position coordinates of the vehicle in the t+1 period, the distance between vehicles i and j is calculated For

[0020]

[0021] Only the vehicles within the communication range of each other can be neighbor nodes of each other. Let the communication radius of the vehicle be R v . Therefore, for vehicle i, the vehicle satisfying formula (2) is its neighbor node.

[0022]

[0023] Secondly, it is judged whether the link between vehicle i and neighbor vehicle j is blocked. By using formula (1) and formula (2), the neighbor node array of vehicle i in the t+1 period is constructed m i is a natural number. The above array is traversed to judge whether the link between vehicle i and its neighbor node is blocked by the moving obstacle. The variable is used to represent the link blocking state. The value of of the blocked link is set to 0, and the value of of the unblocked link is set to 1. In the t+1 period, in order to describe the blocking situation of each link, the “blocking” adjacency matrix ω t+1 is constructed, and the value of is filled in it, so that

[0024]

[0025] (2) Distance between vehicles and link duration

[0026] The distance between vehicles and the link duration also affect the link quality. First of all, the distance between vehicles is analyzed. From formula (1), the distance between vehicles i and j in the t+1 period is The communication distance tolerance is The tolerance is normalized to obtain

[0027]

[0028] wherein, is the normalized communication distance tolerance, and d min is the minimum safety distance of two vehicles in the road scene.

[0029] Secondly, the link duration of two vehicles is analyzed. Let the cycle interval be Δt, and the base station predicts the duration that vehicle nodes i and j are in each other's communication range in the t+1th cycle according to the vehicle positions and velocity vectors obtained in the tth cycle, which is called link duration For convenience of calculation, the link duration is normalized, and the following equation is obtained

[0030]

[0031] Let the weighted sum of the normalized communication distance tolerance and the normalized link duration be The following equation is obtained

[0032]

[0033] where ρ ∈ [0, 1] is a weighting factor, and its value can be adjusted according to actual conditions.

[0034] In the t+1th cycle, the weight adjacency matrix W t+1 (referred to as "distance-time" weight adjacency matrix hereinafter) representing the communication distance tolerance and the link duration is defined. According to equation (6), the t+1 of each link is calculated.

[0035]

[0036] (3) Link quality objective function

[0037] Considering the three factors of obstacle shielding, communication distance tolerance and link duration, the "shielding" adjacency matrix ω t+1 is point multiplied with the "distance-time" weight adjacency matrix W t+1 to obtain the comprehensive weight adjacency matrix W *t+1 (referred to as comprehensive weight adjacency matrix hereinafter) of the link quality, and the following equation is obtained

[0038] W *t+1 = W t+1 · ω t+1 (8)

[0039] where W *t+1 is an N v × N v matrix, and the element in the ith row and jth column represents the comprehensive weight value (referred to as comprehensive weight hereinafter) of the link quality of vehicle nodes i and j.

[0040] In the t+1th cycle, the number of buffer nodes is set to N C , and the buffer node set is C t+1 = {c1, c2, …, c NC}. The buffer node ck The task node set of the cache node c If there are q elements in the set, the cache node c The set of the number of requests of the task nodes in the cluster of the 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 , the comprehensive weight values of the cache node c k and the q task nodes are extracted and summed to obtain sum, and the average link weight of the cluster is defined as the ratio of sum to q. To ensure that the optimal link is selected for intra-cluster communication, the average link weight of all clusters in the network should be maximized, and the link quality objective function is

[0041]

[0042] In S1, the cache node load balancing situation is analyzed and modeled, including the following steps:

[0043] (1) Cache node load balancing objective function

[0044] The premise of load balancing is to count the number of file requests of each task node. In a period, 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 of the vehicle. Assuming that the time interval is [0, t] and the request arrival rate is The number of file requests Num i (t) of vehicle i follows the Poisson distribution with parameter According to the properties of the Poisson distribution, the probability mass function of the number of file requests of vehicle i in t time is

[0045]

[0046] The expected number of file requests of vehicle i in t time is

[0047]

[0048] As can be seen from the above formula, the number of file requests generated by each vehicle follows the Poisson distribution, and the number of vehicles in the cluster is not equal to the number of file requests.

[0049] In the t+1 period, let be the set of the number of requests of each task node in the cluster of the cache node c k , then

[0050]

[0051] where is the cache node c k ​The number of requests from the χth task node in the t+1th cycle, χ∈{1,2,…,q}.

[0052] From formula (12), we can see that the 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 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] Constraints 1 and 2 are proposed to ensure that cache nodes and task nodes actually exist. Constraint 3 is proposed to ensure that the number of file requests for a cluster does not exceed the maximum number of requests that the cache nodes in that cluster can service within a cycle. Similarly, constraint 4 is proposed to ensure that the total number of requests across the entire network does not exceed the maximum number of requests that all cache nodes can service.

[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+1 period, the number of file requests of each task vehicle cannot be negative, so there is constraint 2

[0065]

[0066] Since each cluster has and only has one cluster head (cache node), the sum of the number of file requests in a cluster cannot be greater than T max Therefore, there is constraint 3

[0067]

[0068] Let the total number of file requests sent by all task nodes be SL, according to formula (11), we can get

[0069]

[0070] To ensure that all requests in the network can be responded, 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, there must be requests that cannot be responded. Therefore, there is constraint 4

[0071]

[0072] In S1, the problem of achieving full network coverage with the least cache nodes is analyzed and modeled, which 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 should be as small as possible, so the objective function of the number of cache nodes is

[0075]

[0076] (2) Cache node minimization constraint

[0077] In the t+1 period, the cache node c k The set of all q task nodes in the cluster where the cache node c can be specifically written as

[0078]

[0079] In order to reduce repeated responses, all cache nodes are required to provide file responses only for task nodes within their clusters. Therefore, the cache node c k and c ΔThe intersection of the task node sets of their respective clusters is empty, then there is constraint 5

[0080]

[0081] In order to ensure that the minimum cache nodes cover 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] 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 Equation (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 number of 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, moving 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 as (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 moments when the front and rear of the obstacle vehicle touch the link midpoint d are recorded as the occlusion start time t1 and the occlusion end time t2, respectively.

[0089] Take the first quadrant of the coordinate axis as an example, connect point Q and the origin i to obtain a straight line l. At t1 and t2, if the centroid Q is on the same side of the y-axis twice, define θ as the angle between l and the positive half of the y-axis. Calculate the tanθ threshold value corresponding to t1 and t2 respectively, and use the two tanθ values to form the threshold interval of the obstacle shielding link. In any period, if the tanθ value formed during the driving of the three vehicles is in the above interval, it is judged that the link is shielded. The specific steps of the algorithm are as follows:

[0090] Obstacle shielding judgment algorithm

[0091] Algorithm input: driving state information of all vehicles, neighbor node array of node i

[0092] Algorithm output: output the shielding state value Ψ of each link, and the "shielding" adjacency matrix ω can be obtained according to formula (3) t+1

[0093] S201: Create an "shielding" adjacency matrix ω of size (N v -1)*(N v -1) 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 centroid Q of obstacle vehicle r, and the link segment ij connecting vehicles i and j, and take the midpoint d. Respectively, the time when the obstacle vehicle head and tail contact the midpoint d of the link is recorded as the shielding start time t1 and the shielding end time t2.

[0096] S204: If the neighbor node is in the first or second quadrant, execute in two cases:

[0097] (a) At t1 and t2, if the centroid Q of the obstacle vehicle r is on the same side of the y-axis twice, i.e. L≤2aβ / b, connect point Q and the origin i to obtain a straight line l, and let l and the positive half of the y-axis form an angle θ. Calculate the tanθ threshold value corresponding to t1 and t2 respectively, and form the tanθ threshold interval of the obstacle shielding link. In any period, if the tanθ value during the driving of the three vehicles is in the above interval, it is judged that the link is shielded, and let Otherwise, let

[0098] (b) If the obstacle vehicle r centroid Q is on the left and right sides of the y-axis respectively at time t1 and t2, i.e. L > 2aβ / b, the connecting point Q and the origin i obtain a straight line l, and the angle between l and the positive half of the x-axis is θ. Calculate the tanθ threshold value corresponding to t1 and t2 respectively, and form the tanθ threshold value interval of the obstacle blocking link. In any period, if the tanθ value of the three vehicles is in the above interval, it is judged that the link is blocked, and Otherwise, let

[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 blocking state Ψ value of each link is output according to the formula Get ω t+1 .

[0101] (2) Comprehensive weight adjacency matrix calculation

[0102] In order to ensure stable communication, the buffer node preferentially selects a vehicle with a larger link comprehensive weight as a task node, so that the average link weight of the cluster reaches a maximum value. Through the obstacle blocking judgment algorithm, the "blocking" adjacency matrix ω t+1 According to the distance between vehicles and the link duration, the "distance-time" weight adjacency matrix W t+1 is calculated by formula (7). According to formula (8), the point multiplication of the above two matrices can obtain the comprehensive weight adjacency matrix W *t+1 .

[0103] S3 specifically includes the following steps:

[0104] According to the target function P2 and the constraint condition of the buffer node load balancing in S1, the specific implementation steps are "load balancing maximization" in S5 "cache node selection algorithm in complex scene".

[0105] S4 specifically includes the following steps:

[0106] According to the target function P3 and the constraint condition of the minimum buffer node to achieve full network coverage in S1, the specific implementation steps are "minimum buffer node" in S5 "cache node selection algorithm in complex scene".

[0107] S5 specifically includes the following steps:

[0108] The vehicles are divided into identity undetermined nodes, task nodes and buffer 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+1 period as

[0109]

[0110] All nodes' identity bits are initialized as 0. The number of nodes with undetermined identity in node i's neighbor is called node degree F i . The ratio of the sum of all links' comprehensive weights of node i to the number of its neighbor nodes is called average neighbor comprehensive weight.

[0111] Cache node selection algorithm in complex scenario

[0112] Input: comprehensive weight adjacency matrix W *t+1 , request load constraint T max , neighbor node array of each node

[0113] Output: cache node set C t+1 , task node set of each cluster Load balancing quality LB

[0114] (1) Algorithm initialization

[0115] S501: initialization

[0116] S502: if there is a node with identity 0, execute the following steps. If not, execute step S514.

[0117] S503: traverse all nodes, calculate the node degree F i of each node.

[0118] (2) Cache node minimization

[0119] S504: update node degree list.

[0120] S505: if the node degree F i of node i = 0, take itself as a cache node, and include it in set C t+1 , and set its identity as 2.

[0121] S506: if the node degree F i of node i = 1, and the node degree of its neighbor nodes is greater than 1, take itself as a task node, set its identity as 1, and then include its neighbor nodes in cache node set C t+1 , and set their identities as 2.

[0122] (3) Cluster average link weight maximization

[0123] S507: if the node degree F i of node i = 1, and the node degree of its neighbor nodes is also 1, select the node with the maximum average neighbor comprehensive weight as a cache node, and set its identity as 2.

[0124] S508: by now, the node degree F iThe node identities of =0 or 1 have been determined, and the remaining nodes are processed in two cases. In the first case, the node degrees of the nodes are all different, and the node with the largest node degree is selected as the cache node, so that the nodes covered by the cache node are as many as possible. In the second case, the node degrees of some nodes are the same, and the node with the largest average neighbor comprehensive weight is selected as the cache node. The selected cache node is included in C t+1 , and the identity is set to 2.

[0125] S509: After the preliminary selection of the cache node, the node degree of each node is updated.

[0126] (4) Load balancing maximization

[0127] S510: The neighbor nodes of the cache node c k are sorted in ascending order according to the F i value, and the node number sequence F array is obtained.

[0128] S511: If the total request number of all neighbor nodes of the cache node c k is less than T max , then all neighbor vehicles with a node degree of 0 are selected as task nodes and added to the set , and the identity is set to 1. Otherwise, the node with a total request number not exceeding T array in F max and in the front of the sequence is selected as a task node and added to the set , and the identity is set to 1.

[0129] S512: If the task node set of the cache node c k has been added to the first u neighbor nodes in F array , and the total request number of the first u neighbor nodes is less than T max , then there are still neighbor nodes with a total request number of (T max -u) that can become task nodes of c k . The remaining neighbor nodes with a node degree of 0 are selected as candidate task nodes, and the selection method is as follows:

[0130] a) In F array , when the last vehicle that can be added is H in F array , and the request number of the (H+1)th vehicle is the same as that of the Hth vehicle, then all the links of the two nodes are sorted in descending order of comprehensive weight, and the node with a higher position in the sequence of c k is selected as the task node of c k .

[0131] b) If in the link weight sequence of the neighbor nodes of c k , ck The bit position remains the same, and the neighbor node with the maximum comprehensive weight of c k is selected as the task node, and is included in The identity is set to 1.

[0132] (5) The 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: The algorithm ends, and outputs C t+1 , and LB.

[0136] Compared with the prior art, the beneficial effects of the present application are:

[0137] 1. For link quality evaluation, an obstacle shielding factor is added. The Internet of Vehicles communication environment is usually in non-ideal conditions, and electromagnetic waves are easily disturbed or shielded, among which the influence of mobile obstacles on link transmission is particularly prominent. Therefore, in addition to considering the distance between vehicles and the link duration factor, the present application increases the link shielding factor in the link quality modeling to accurately describe the inter-vehicle link quality in the mobile obstacle scenario.

[0138] 2. For load balancing, based on the upper limit of the file load of the vehicle, the file request is dynamically allocated. Existing research only considers single-vehicle single-request, and the number of task vehicles is used as the load constraint. However, in actual scenarios, a vehicle may carry multiple files in a certain period, and the present application considers the maximum number of requests that can be served by the cache vehicle as the load constraint, dynamically allocates file requests, and realizes load balancing.

[0139] 3. For the complex scenario of obstacle shielding and single-vehicle multiple requests, based on the minimum dominating set algorithm, the present application proposes a cache node selection ObsTmax scheme with the goal of link quality, load balancing and cache node minimization. Experiments show that compared with NmaxMDS and random selection algorithm, the new algorithm has better performance in request response rate and cache source response times, and the repeated response rate is always 0, and load balancing of cache nodes is realized. BRIEF DESCRIPTION OF DRAWINGS

[0140] The accompanying drawings are used to provide a further understanding of the present application, and constitute a part of the specification, together with the embodiments of the present application, to explain the present application, and do not constitute a limitation of the present application.

[0141] Figure 1 The road scene in the simulation experiment of the present application.

[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 the request response rates of the three algorithms of the present invention.

[0144] Figure 4 This is a comparison chart of the mean number of cache source responses 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 following is a comparison chart of the load balancing quality LB 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 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.

[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] Figure 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 solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described herein are only used to explain the present invention and are not intended 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 (IoV) under complex scenarios, 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 minimum number of cache nodes;

[0154] S2: A link quality evaluation algorithm is proposed, which first proposes an obstacle shielding judgment algorithm, and then calculates a comprehensive weight adjacency matrix based on the inter-vehicle distance and link duration algorithm;

[0155] S3: Based on the upper limit of the file load of the cache vehicle, a cache node load balancing algorithm is proposed to dynamically allocate file requests and achieve load balancing;

[0156] S4: Select the best cache node and task node, and propose a cache node minimization algorithm to achieve the least cache node covering the entire network;

[0157] S5: The cache node selection algorithm flowchart in complex scenarios is given.

[0158] In S1, the link quality is analyzed and modeled considering obstacle-shielded links, inter-vehicle distance, and link duration, including the following steps:

[0159] (1) Obstacle shielding

[0160] As shown in Figure 1 , the road scene is set as a crossroad intersection, and each main road is a three-lane two-way road. The base station communication radius is R B , covering the intersection area, the number of vehicles in this area is N v , and the communication radius of each vehicle is R v , so the vehicle set is N={n1,n2,…,n Nv}. In order to obtain the vehicle trajectory in real time, it is assumed that all vehicles are equipped with positioning devices, and the base station has full network control function. In the tthperiod, the driving state information of the ith∈{1,2,…,N v} vehicle is defined as where is the position coordinate, is the vehicle speed; the length of the rthobstacle vehicle is L, and its state information is defined as r is a positive integer. Vehicles regularly upload 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 position of the vehicle in the next period according to the trajectory information in this period.

[0161] Communication links are shielded, which will cause V2V data transmission failure. In order to avoid selecting cache nodes containing potential shielded links, it is necessary to judge whether the link is shielded by mobile obstacles. First, determine the dominant vehicle of vehicle i. According to the position coordinates of the vehicle in the t+1period, the distance between vehicles i and j is calculated is

[0162]

[0163] Only vehicles within each other's communication range can be neighbor nodes. Let the communication radius of each vehicle be R v . Therefore, for vehicle i, vehicles satisfying formula (2) are its neighbor nodes.

[0164]

[0165] Secondly, it is determined whether the link between vehicle i and neighbor vehicle j is blocked. Using formula (1) and formula (2), the neighbor node array of vehicle i in the t+1 period is constructed m i is a natural number. The above array is traversed It is determined whether the link between vehicle i and its neighbor nodes is blocked by a moving obstacle. The variable is used to represent the link blocking state. The value of of the blocked link is set to 0, and the value of of the unblocked link is set to 1. In the t+1 period, in order to describe the blocking situation of each link, the "blocking" adjacency matrix ω t+1 is constructed, and the value of is filled in, then

[0166]

[0167] (2) Distance between vehicles and link duration

[0168] The distance between vehicles and the link duration also affect the link quality. First, the distance between vehicles is analyzed. From formula (1), the distance between vehicle i and j in the t+1 period is The communication distance tolerance is After normalization, the normalized communication distance tolerance is

[0169]

[0170] wherein is the normalized communication distance tolerance, and d min is the minimum safety distance between two vehicles in a road scene.

[0171] Secondly, the link duration between two vehicles is analyzed. Let the period interval be Δt, and the base station predict the duration that vehicle nodes i and j are within each other's communication range in the t+1 period according to the vehicle positions and velocity vectors obtained in the t period, which is called the link duration For convenience of calculation, the link duration is normalized, and the normalized link duration is

[0172]

[0173] The weighted sum of the normalized communication distance tolerance and the normalized link duration is denoted as and it is obtained that

[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 weights of each link according to formula (6): Fill it into W t+1 In, you can get

[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 weight 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 of 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 ={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 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, extract cache node c respectively. k The sum of the comprehensive weight values ​​of its q task nodes is used to obtain the sum, which defines 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 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 parameter Poisson distribution. According to the properties of Poisson distribution, 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 for vehicle i is

[0189]

[0190] As can be seen from the above formula, the number of file requests generated by each vehicle follows a Poisson distribution, and the number of vehicles in a cluster is not equal to the number of file requests.

[0191] In the t+1th period, let For cache node c k The set of request numbers of each task node in the cluster is:

[0192]

[0193] in,

[0194] For cache node c k The number of requests from the χth task node in the t+1th cycle, χ∈{1,2,…,q}.

[0195] From formula (12), we can see that the cache node c k The actual load is

[0196]

[0197] 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

[0198]

[0199] According to formula (14), calculate the load level of each cache node If the value is greater than 1, it means 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] Constraints 1 and 2 are proposed to ensure that cache nodes and task nodes actually exist. Constraint 3 is proposed to ensure that the number of file requests for a cluster does not exceed the maximum number of requests that the cache nodes in that cluster can service within a cycle. Similarly, constraint 4 is proposed to ensure that the total number of requests across the entire network does not exceed the maximum number of requests that all cache nodes can service.

[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+1 period, 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 cannot be greater than T max , so there is constraint 3

[0210]

[0211] Let the total number of file requests sent by all task nodes be SL, according to formula (11), we can get

[0212]

[0213] To ensure that all requests in the network can be responded, 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, there must be requests that cannot obtain responses. Therefore, there is constraint condition 4

[0214]

[0215] In S1, the problem of achieving full network coverage with the least cache nodes is analyzed and modeled, which 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 should be as small as possible. Therefore, the objective function of the number of cache nodes is

[0218]

[0219] (2) Cache node minimization constraints

[0220] In the t+1 period, the cache node c k The set of all q task nodes in the cluster where the cache node c is located can be specifically written as

[0221]

[0222] In order to reduce repeated responses, all cache nodes are required to provide file responses only for task nodes within their clusters. Therefore, the intersection of the task node sets of cache nodes c k and c Δ is empty, and constraint condition 5 is

[0223]

[0224] In order to meet the least cache node coverage of the entire network, the total number of elements in the union set 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 set, and constraint condition 6 is

[0225]

[0226] 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 Equation (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 number of 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, moving 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 as (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 moments when the front and rear of the obstacle vehicle touch the link midpoint d are recorded as the occlusion start time t1 and the occlusion end time t2, respectively.

[0232] Taking 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. At time t1 and t2, if the center of mass Q is on the same side of the y-axis both times, define θ as the angle between l and the positive half axis of the y-axis. Calculate the tanθ threshold corresponding to time t1 and time t2 respectively, and use these two tanθ values ​​to form the threshold interval for the obstacle blocking the link. In any cycle, if the tanθ value formed during the three vehicles' driving is within the above interval, the link is considered 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 (Nv -1)*(N v -1) of the "occlusion" adjacency matrix ω t+1 .

[0237] S202: Traverse the 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 centroid Q of the obstacle vehicle r, the link segment ij connecting vehicle i and j, and take the midpoint d. Respectively, the time when the obstacle vehicle head and tail contact the link midpoint d is recorded as the occlusion start time t1 and the occlusion end time t2.

[0239] S204: If the neighbor node is in the first or second quadrant, execute in two cases:

[0240] (a) At t1 and t2, if the centroid Q of the obstacle vehicle r is on the same side of the y-axis twice, i.e. L≤2aβ / b, the connecting point Q and the origin i obtain a straight line l, and the angle between l and the positive half of the y-axis is θ. Respectively, calculate the tanθ threshold corresponding to t1 and t2, and form the tanθ threshold interval of the obstacle occlusion link. In any period, if the tanθ value of the three vehicles during driving is in the above interval, it is judged that the link is occluded, and Otherwise, let

[0241] (b) At t1 and t2, if the centroid Q of the obstacle vehicle r is on the left and right sides of the y-axis, respectively, i.e. L>2aβ / b, the connecting point Q and the origin i obtain a straight line l, and the angle between l and the positive half of the x-axis is θ. Respectively, calculate the tanθ threshold corresponding to t1 and t2, and form the tanθ threshold interval of the obstacle occlusion link. In any period, if the tanθ value of the three vehicles during driving is in the above interval, it is judged that the link is occluded, and Otherwise, let

[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 ω t+1 .

[0244] (2) Comprehensive weight adjacency matrix calculation

[0245] To ensure the stability of communication, the buffer node preferentially selects the vehicle with larger link comprehensive weight as the task node, so that the average link weight of the cluster reaches the maximum value. Through the obstacle shielding judgment algorithm, the "shielding" adjacency matrix ω t+1 is obtained. According to the distance between vehicles and the link duration, the "distance-time" weight adjacency matrix W t+1 is calculated by formula (7). The point multiplication of the above two matrices according to formula (8) can obtain the comprehensive weight adjacency matrix W *t+1 .

[0246] S3 specifically includes the following steps:

[0247] According to the target function P2 and the constraint condition of the buffer node load balancing in S1, the specific steps are "load balancing maximization" in S5 "buffer node selection algorithm in complex scene".

[0248] S4 specifically includes the following steps:

[0249] According to the target function P3 and the constraint condition of the minimum buffer node to achieve full network coverage in S1, the specific steps are "buffer node minimization" in S5 "buffer node selection algorithm in complex scene".

[0250] S5 specifically includes the following steps:

[0251] The vehicles are divided into identity undetermined nodes, task nodes and buffer nodes, and the identity bits are set to 0, 1 and 2 respectively, so as to construct the node identity bit vector of the t+1 period as

[0252]

[0253] The identity bits of all nodes are initialized to 0. The number of identity undetermined nodes 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 neighbor nodes is called the average neighbor comprehensive weight.

[0254] Buffer node selection algorithm in complex scene

[0255] Input: comprehensive weight adjacency matrix W *t+1 , request load constraint T max , neighbor node array of each node

[0256] Output: buffer node set C t+1 , task node set 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 the 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, then it will be used as the task node, the identity is set to 1, and then its neighbor nodes are 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 are determined, and the remaining nodes are processed in two cases. The first case is that the node degrees of all 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 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 a node degree of 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 list, 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 neighboring 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 all links of the two nodes are sorted from large to small according to the comprehensive weight, and c is selected. k The node with a higher position 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 position is 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, communication adopts the 3GPP R14 standard, and each lane is 500 meters long. File popularity follows a Zipf distribution. Due to limited storage space, cache vehicles can only store the top J most popular files, resulting in a cache capacity of J. Simulations and performance evaluation were conducted using the Go language. 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 per vehicle. On the one hand, it avoids selecting blocked links, and on the other hand, it uses the maximum number of requests that can be served by the vehicle as a constraint to ensure request response performance. The NmaxMDS algorithm does not take the above factors into consideration, 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 4 The figure shows a comparison of the mean cache source response times for the three algorithms. A higher value (total response times / total number of cached vehicles) indicates more proactive responses from the cached vehicles and lower base station load. The mean cache source response times for the ObsTmax algorithm fluctuates between 1.31 and 1.63, slightly outperforming the NmaxMDS algorithm. Because the ObsTmax algorithm avoids selecting obstructed links and prevents cache node overload, it can improve the total cache node response times. However, due to its obstacle detection mechanism, the ObsTmax algorithm uses slightly more cache nodes than the NmaxMDS algorithm, resulting in the former's mean cache source response times being only slightly higher than the latter. For the random algorithm, task nodes broadcast file requests, and randomly determined cache nodes respond upon receiving the task requests. This inevitably results in a large number of duplicate and invalid responses, resulting in the random algorithm having the highest mean cache source response times.

[0287] Figure 5 The repeated response rates of the three algorithms are shown. The repeated response rates of ObsTmax and NmaxMDS algorithms are both 0, because the task nodes of the two algorithms only make requests within the cluster, so they will not receive responses from cache nodes of other clusters. Since there is no clustering mechanism in the random algorithm, 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 response rate in the cache source response times index.

[0288] Figure 6 The load balancing quality LB of the three algorithms is visually displayed using a violin plot. The LB value of each cycle of the ObsTmax algorithm of the application 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 an LB value less than 0.80, indicating 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 a cache node can load as a load constraint, ignoring the difference in the number of requests from each vehicle, which easily causes load imbalance of cache nodes. Since the cache node selection is random, 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 The maximum number of requests T max that a cache node can serve when the cache capacity J = 5 is 8, 12, and 16, respectively, and the difference in request response rates between the two comparative algorithms and the ObsTmax algorithm of the application is shown. Taking the NmaxMDS algorithm as the benchmark, the request response rate of the ObsTmax algorithm is higher than that of the NmaxMDS algorithm when T max < 16. max Taking the random algorithm as the benchmark, the request response rate of the ObsTmax algorithm is lower than that of the random algorithm only when T max is 16. This is because the continuous increase in T max causes the cache node overload phenomenon of the random algorithm to gradually decrease, and its request response rate may be higher than that of the algorithm of the application.

[0290] Figure 8 The maximum number of requests T max that a cache node can serve when the cache capacity J = 5 is 8, 12, and 16, respectively, and the repeated response rate of the random algorithm is shown. The figure shows that the repeated response rate of the random algorithm is also increasing with the increase of T max , and it can be seen that when T max is 16, Figure 7 the high request response rate of the random algorithm is at the expense of a high repeated response.

[0291] Figure 9 The request response rate difference between the two comparative algorithms and the ObsTmax algorithm of the present application is shown when the cache capacity J is 5, 10 and 15 respectively. max = 8. It can be seen from the figure that the median of the request response rate difference is greater than 0 when the cache capacity J increases from 5 to 15 based on the other two algorithms, and the box plot is mostly above the 0 scale. This shows that the request response rate of ObsTmax is higher than that of the two comparative algorithms under different cache capacities. Specifically, the median of the request response rate difference between ObsTmax and NmaxMDS algorithm is roughly equivalent under the three cache capacities J, which is 0.129, 0.130 and 0.131 respectively. This is because the above two algorithms can achieve theoretical full network coverage, and the performance gap between the two depends on the obstacle shielding and load balancing, so the increase of the cache capacity will not widen the performance gap between the two algorithms. The median of the request response rate difference between ObsTmax algorithm and random algorithm under the three cache capacities J is 0.176, 0.292 and 0.373 respectively, showing a gradual increasing trend. This is because as the cache capacity J increases, the probability of the existence of the file in the cache node when the task node requests a file increases. Since the cache node of the algorithm of the present application can cover the whole network, its request response rate gradually increases, while the random algorithm cannot guarantee that the cache node covers the whole network in theory, so its request response rate is difficult to guarantee, and therefore the request response rate difference between the two gradually increases.

[0292] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for selecting cache nodes in an Internet of Vehicles (IoV) 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; 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, extract cache node c respectively. k The sum of the comprehensive weight values ​​of its q task nodes is used to obtain the sum, which defines the average link weight of the cluster. is the ratio of sum to q. To ensure that a better link is selected for intra-cluster communication, the average link weight of all clusters in the network should be maximized. The link quality objective function is defined as P1. (2) Analyze and model the load balancing of cache nodes; Cache node load balancing objective function The premise for 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. Poisson distribution is introduced to describe the arrival of file requests from vehicles. In the t+1th cycle, let For cache node c k The number of requests for each task node in the cluster is collected to calculate the cache node c k The actual load; Suppose that the cache node c is k Maximum response T max requests, computing cache node c k The actual load The request load constraint T that it can serve 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, define 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. (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. 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 S1, link quality is analyzed and modeled by considering obstacles blocking the link, vehicle distance, and link duration. The steps include: (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 the 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 driving status information of a vehicle 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 about its driving and file requests to the base station. Since the road setting is relatively stable, the base station predicts the vehicle's position in the next cycle based on the trajectory information of the current cycle. The obstruction of the communication link will cause V2V data transmission failure. 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 the t+1 period. 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+1 period. 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 , the link is blocked 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. Second, the link duration between the two vehicles is analyzed. Based on the vehicle position and velocity vector obtained in the tth cycle, the base station predicts the length of time that vehicle nodes i and j are within each other's communication range in the t+1th cycle, 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 link Fill it into W t+1 middle.

3. The method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 2, characterized in that: In step S1, the cache node load balancing situation is analyzed and modeled: 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 for a cluster does not exceed the request load constraint 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, and constraint 1 is set as the request load constraint T that the cache vehicle can serve. max Must be greater than or equal to 1; In the t+1th cycle, constraint 2 is set as the number of file requests for 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. 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 fail to get a response.

4. The method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 3, characterized in that: In step S1, analyzing and modeling to achieve full network coverage with a minimum number of 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. The objective function for minimizing the number of cache nodes is defined 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 meet 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. The method for selecting a cache node in a complex scenario of an Internet of Vehicles according to claim 1, 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 and 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 coordinates of neighbor node j as (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 moments when the front and rear ends of the obstacle vehicles touch the link midpoint d are recorded as the occlusion start time t1 and the occlusion end time t2 respectively; Taking 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θ threshold corresponding to time t1 and time t2 respectively. Use these two tanθ values ​​to form the threshold interval for obstacle blocking the link. In any cycle, if the tanθ value formed during the three vehicles' driving is within the above interval, the link is considered 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, calculate the "distance-time" weighted adjacency matrix W t+1 , multiply the above two matrices to obtain the comprehensive weighted 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, based on the objective function P2 and constraints of the cache node load balancing situation in step S1, the "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: The step S5 specifically includes the following steps: The vehicles are divided into undetermined nodes, task nodes, and cache nodes, and their 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) Maximize load balancing; (5) The algorithm ends.

Citation Information

Patent Citations

  • Multi-mode switching type Internet of Vehicles routing method

    CN110446184A

  • Intelligent network connection vehicle group leader vehicle election system and method based on zero-trust architecture

    CN117939431A

Cited By

  • Pre-auxiliary caching method based on vehicle position

    CN122179475A