Edge Collaborative Content Caching Method, Apparatus, Device, and Storage Medium
By adopting the edge collaborative content caching method in the Internet of Vehicles, using federated learning and reinforcement learning to predict the needs of service components and perform pre-cache, the problems of delay and privacy leakage in the traditional centralized caching mode are solved, and efficient and secure service delivery is achieved.
Patent Information
- Application Number
- CN202211329613.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-10-27
AI Technical Summary
The traditional centralized content caching model leads to high-end to-end transmission delays in the Internet of Vehicles, making it difficult to meet the needs of delay-sensitive and computing-intensive services, and at the same time there is a risk of privacy data leakage.
By obtaining the service preference data of each service vehicle in the collaborative cache domain, the federated prediction model obtained by federated learning training predicts future service component needs, and obtains a global optimal precache strategy through reinforcement learning calculations, and caches the precache components to the edge node.
It effectively avoids the leakage of vehicle privacy data, improves the security of data transmission, and quickly responds to vehicle service requests through pre-cache service components, improving the service reliability and efficiency of the Internet of Vehicles.
Smart Images

Figure CN115941790B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to an edge collaborative content caching method, apparatus, device, and storage medium. Background Art
[0002] With the development of technologies such as artificial intelligence and intelligent transportation, the requirements for the computing efficiency and reliability of the bearer network for high-speed mobile services such as assisted driving and intelligent transportation are gradually increasing. Among them, delay-sensitive and computing-intensive services such as assisted driving need to accurately complete the intelligent judgment and prediction of road conditions in real time on the basis of a low-delay and secure and reliable communication link, while taking into account user privacy.
[0003] With the rapid development of the Internet of Vehicles, vehicles generate a large amount of computing services that require local processing for assisted driving. Currently, the traditional centralized content caching mode caches all service components required for computing tasks on the cloud server. Due to the characteristics of a large number of vehicles, complex movement trajectories, a wide variety of required service types, and delay sensitivity in the Internet of Vehicles, a relatively high end-to-end transmission delay will be generated during the process of obtaining service components, making it difficult to meet the service requirements of a large number of mobile services. Moreover, when predicting the future potential service requirements of vehicles, there are many characteristics of vehicles in different regions, and there is a risk of privacy leakage in data transmission. Summary of the Invention
[0004] The present invention provides an edge collaborative content caching method, apparatus, device, and storage medium, aiming to improve the security of data transmission while meeting the service requirements of a large number of mobile services.
[0005] The present invention provides an edge collaborative content caching method, including:
[0006] Obtain the service preference data of each service vehicle within the collaborative caching domain;
[0007] Input each of the service preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle within the edge nodes in the collaborative caching domain;
[0008] Perform reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy, so as to cache the pre-caching components corresponding to the globally optimal pre-caching policy into the edge nodes.
[0009] Optionally, according to an edge collaborative content caching method provided by the present invention, the federated prediction model is obtained through training based on the following steps:
[0010] For any edge node within the collaborative caching domain, select a number of training vehicles from among the various service vehicles in the collaborative caching domain;
[0011] Send the training model and the global model parameters of the training model in the edge node to each of the training vehicles, so that each training vehicle can iteratively train the training model based on its respective historical preference data and the global model parameters to obtain a local model, and upload the local model parameters of the local model to the edge node;
[0012] Aggregate the local model parameters of each of the training vehicles to obtain aggregated model parameters;
[0013] Based on the aggregated model parameters, update the global model parameters of the training model, and send the updated global model parameters to each target vehicle, where the target vehicle is the training vehicle that uploads the local model parameters to the edge node;
[0014] For each of the target training vehicles to perform a new round of model training based on the updated global model parameters until the training model of the edge node converges to obtain the federated prediction model.
[0015] Optionally, according to an edge collaborative content caching method provided by the present invention, the aggregating the local model parameters of each of the training vehicles to obtain aggregated model parameters includes:
[0016] Calculate the weight ratio corresponding to each of the training vehicles based on the historical preference data corresponding to each of the training vehicles;
[0017] Aggregate based on the weight ratio corresponding to each of the training vehicles and the local model parameters to obtain the aggregated model parameters.
[0018] Optionally, according to an edge collaborative content caching method provided by the present invention, the performing reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy includes:
[0019] Set the state space, action space, and caching reward function of the collaborative caching domain;
[0020] Count the current vehicle density status of each edge node within the collaborative caching domain;
[0021] Based on the component demand prediction result and the current vehicle density status, in combination with the state space, the action space, and the caching reward function, calculate to obtain the globally optimal pre-caching policy.
[0022] Optionally, for an edge collaborative content caching method provided by the present invention, before obtaining the service preference data of each service vehicle in the collaborative caching domain, it further includes:
[0023] Construct an edge collaborative caching domain model;
[0024] Obtain the coordinate positions of each edge node in the edge collaborative caching domain model;
[0025] Based on the coordinate positions of each edge node, cluster each edge node to obtain several collaborative caching domains; wherein, the edge node is communicatively connected to each service vehicle within the coverage range of the edge node.
[0026] Optionally, for an edge collaborative content caching method provided by the present invention, after performing reinforcement learning calculation on the component demand prediction result to obtain a global optimal pre-caching policy, and caching the pre-caching components corresponding to the global optimal pre-caching policy into edge nodes, it further includes:
[0027] Obtain the service request sent by the target requesting vehicle in the collaborative caching domain;
[0028] Based on each pre-cached service component stored in each edge node, deliver the requested service component corresponding to the service request to the target requesting vehicle according to a pre-set delivery policy.
[0029] Optionally, for an edge collaborative content caching method provided by the present invention, if the target edge node that receives the service request stores the requested service component, deliver the requested service component in the target edge node to the target requesting vehicle;
[0030] If the target edge node does not store the requested service component, query whether any other edge nodes in the collaborative caching domain except the target edge node store the requested service component;
[0031] If so, send a component assistance request to the edge node storing the requested service component to obtain the requested service component, and deliver the requested service component to the target requesting vehicle;
[0032] If not, send a service component request to the remaining collaborative caching domains in the edge collaborative caching domain model to obtain the requested service component, and deliver the requested service component to the target requesting vehicle.
[0033] The present invention also provides an edge collaborative content caching device, including:
[0034] An acquisition module, configured to acquire the service preference data of each service vehicle in the collaborative caching domain;
[0035] A demand prediction module, configured to input each of the service preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained by performing federated learning training based on historical preference data of each service vehicle in the edge nodes within the collaborative caching domain.
[0036] A calculation module, configured to perform reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy, so as to cache the pre-cached components corresponding to the globally optimal pre-caching policy into the edge nodes.
[0037] The present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the edge collaborative content caching method described in any one of the above is implemented.
[0038] The present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the edge collaborative content caching method described in any one of the above is implemented.
[0039] The present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the edge collaborative content caching method described in any one of the above is implemented.
[0040] The edge collaborative content caching method, device, equipment, and storage medium provided by the present invention can effectively avoid the leakage of vehicle privacy data by predicting future vehicle service component demands through a federated prediction model obtained by federated learning training, and perform reinforcement learning calculation based on the component demand prediction result to obtain a globally optimal pre-caching policy. According to the globally optimal pre-caching policy, the service components are pre-cached into each edge node, so that when a service request from a vehicle is received, the service components pre-cached in the edge node can be quickly delivered to the vehicle, thereby comprehensively improving the service reliability and efficiency of the vehicle network. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the description of the embodiments or the prior art will be briefly introduced one by one below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1 It is a schematic flowchart of the edge collaborative content caching method provided by the present invention;
[0043] Figure 2It is a schematic structural diagram of the edge collaborative content caching device provided by the present invention;
[0044] Figure 3 It is a schematic structural diagram of the electronic device provided by the present invention. Specific embodiments
[0045] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.
[0046] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms "a", "the" and "said" used in one or more embodiments of the present invention are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more related listed items.
[0047] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present invention to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while".
[0048] The following will be combined with Figure 1 to describe the exemplary embodiments of the present invention in detail.
[0049] Figure 1 It is a schematic flow diagram of the edge collaborative content caching method provided by the present invention. As Figure 1 shown, the edge collaborative content caching method includes:
[0050] Step 11, obtaining the service preference data of each service vehicle in the collaborative caching domain;
[0051] It should be noted that the collaborative caching domain includes a number of edge nodes; each edge node is provided with its corresponding coverage range, and the edge nodes are communicatively connected to each service vehicle within the coverage range of the edge node. The service preference data includes data such as the request frequency of the service vehicle for different services. Specifically, each edge node in the collaborative caching domain is used to obtain the service preference data of each service vehicle in each edge node.
[0052] Step 12: Input each piece of the service preference data into the federated prediction model to obtain the component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle in the edge nodes in the collaborative caching domain.
[0053] Specifically, input the service preference data in the edge nodes into the federated prediction model corresponding to the edge node, so as to determine the future component demand prediction result within the collaborative caching domain according to the output result of the federated prediction model. The federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle in the edge nodes in the collaborative caching domain. The trained federated prediction model can predict the future service component demand within the collaborative caching domain based on the current service preference data of the service vehicle, which can effectively avoid the leakage of vehicle privacy data and improve the security of privacy data.
[0054] Step 13: Perform reinforcement learning calculation on the component demand prediction result to obtain the globally optimal pre-caching policy, and cache the pre-cached components corresponding to the globally optimal pre-caching policy into the edge nodes.
[0055] It should be noted that the pre-cached components refer to the service components that need to be cached into the edge nodes. The globally optimal pre-caching policy includes each pre-cached component and the edge node corresponding to each pre-cached component respectively. The reinforcement learning calculation is a calculation method for obtaining the best pre-caching policy based on the PPO algorithm (Proximal Policy Optimization).
[0056] Specifically, by defining the state space, action space and caching reward function of the collaborative caching domain, the action space includes the caching actions corresponding to which service components need to be cached and the placement actions corresponding to placing the service components in which edge node within the collaborative caching domain. Then, the current vehicle density state of each edge node within the collaborative caching domain is counted. Thus, based on the component demand prediction result and the current vehicle density state, combined with the state space and the action space, the benefits brought by caching different service components during the caching process are calculated through the caching reward function, and finally the globally optimal pre-caching policy is obtained.
[0057] In the embodiment of the present invention, the future vehicle service component requirements are predicted by a federated prediction model obtained through federated learning, which can effectively avoid the leakage of vehicle privacy data, and reinforcement learning calculations are performed based on the component requirement prediction results to obtain a globally optimal pre-caching policy. According to the globally optimal pre-caching policy, service components are pre-cached into each edge node in advance, so that when a service request from a vehicle is received, the service components pre-cached by the edge node can be quickly delivered to the vehicle, thereby comprehensively improving the service reliability and efficiency of the vehicle network.
[0058] In one embodiment of the present invention, the federated prediction model is obtained through training based on the following steps:
[0059] For each edge node in the collaborative caching domain, a number of training vehicles are selected from the various service vehicles in the collaborative caching domain; the training model in the edge node and the global model parameters of the training model are sent to each of the training vehicles, so that each training vehicle can iteratively train the training model based on its respective historical preference data and the global model parameters to obtain a local model, and upload the local model parameters of the local model to the edge node; the local model parameters of each training vehicle are aggregated to obtain aggregated model parameters; based on the aggregated model parameters, the global model parameters of the training model are updated, and the updated global model parameters are sent to each target vehicle, where the target vehicle is the training vehicle that uploads the local model parameters to the edge node; for each target training vehicle to perform a new round of model training based on the updated global model parameters until the training model of the edge node converges to obtain the federated prediction model.
[0060] Specifically, the following steps are performed for any edge node in the collaborative caching domain:
[0061] First, select several training vehicles for model training from each service vehicle in the collaborative caching domain. Preferably, select service vehicles with stronger computing power and more stable channels to participate in the federated learning training process. The number of selected training vehicles can be set based on actual situations and will not be elaborated here specifically. Then, send the training model and the global model parameters of the training model in the edge node to each training vehicle, so that each training vehicle can perform local iterative training on the training model based on the historical preference data corresponding to the training vehicle and the global model parameters sent by the edge node. The historical preference data includes data such as the request frequency of the service vehicle for different services. The specific process of local iterative training of the service vehicle is as follows: Input the historical preference data into the training model to obtain the prediction result output by the training model. Then, based on the prediction result, use a preset loss function algorithm to calculate the model loss value of this round of iteration. The preset loss function algorithm includes the L1 loss function and the dice loss function, etc. After calculating the model loss value, use the error backpropagation algorithm to update the global model parameters in the training model. This training process ends, and then the next training is carried out. During the training process, determine whether the updated training model meets the preset training end conditions. If it meets, use the updated training model as the local model corresponding to the training vehicle. If it does not meet, continue to train the model. The preset training end conditions include loss convergence and reaching the maximum iteration number threshold, etc.
[0062] Further, screen to obtain target vehicles that can complete training within a preset time. That is, training vehicles that cannot complete training on time will not be able to participate in the next round of training. Upload the local model parameters of the local models in the target vehicles to the edge node. Then, aggregate the local model parameters of each target vehicle to obtain aggregated model parameters. As an implementable method, calculate the average value of the local model parameters of each target vehicle and use the average value as the aggregated model parameters. As another implementable method, use the FedAvg algorithm for model parameter aggregation. Specifically: Determine the amount of historical preference data used by each target vehicle in training its local model, count the total amount of data for model training of all target vehicles, calculate the proportion of the data amount of each target vehicle in the total data amount, and use the proportion of the target vehicle as the weight proportion of the local model parameters corresponding to the target vehicle. Then, aggregate the weight proportions and local model parameters of each target vehicle to obtain aggregated model parameters, which can take into account the differences in data contributions of each target vehicle in the collaborative caching domain, thereby effectively improving the accuracy of model prediction.
[0063] Further, based on the aggregated model parameters, update the global model parameters of the training model, and send the updated global model parameters to each target vehicle, so that each of the target training vehicles performs a new round of model training based on the updated global model parameters until the training model of the edge node converges, and the federated prediction model is obtained.
[0064] In the embodiment of the present invention, vehicles with high computing power and stable channels in the cooperative caching domain are selected to participate in federated learning training, and vehicles that complete training on time are screened out during the training process and continue training. Finally, the weight ratio is calculated based on the amount of data used in vehicle training, so as to perform model parameter aggregation based on the weight ratio, which can take into account the differences in data contributions of each target vehicle in the cooperative caching domain, thereby improving the accuracy of the model in predicting the service component requirements of vehicles in the cooperative caching domain.
[0065] In an embodiment of the present invention, step S13: performing reinforcement learning calculation on the component requirement prediction result to obtain a globally optimal pre-caching policy, including:
[0066] Set the state space, action space, and caching reward function of the cooperative caching domain; count the current vehicle density state of each edge node in the cooperative caching domain; based on the component requirement prediction result and the current vehicle density state, and in combination with the state space, the action space, and the caching reward function, calculate to obtain the globally optimal pre-caching policy.
[0067] It should be noted that the expression of the action space is: a(t) = {a cache (t), a put (t)}, where a cache (t) represents the caching action at time t, and a put (t) represents the placement action at time t.
[0068] The expression of the state space: Among them, represents the current storage space state of the edge node in the cooperative caching domain at time t, represents the component requirement prediction result of the edge node in the cooperative caching domain at time t; represents the current vehicle density state of the edge node in the cooperative caching domain at time t. Generally, the state space of the edge node satisfies the Poisson distribution.
[0069] The expression of the caching reward function: Among them, represents the delay cost of caching service components, represents the penalty for placing the service component on the edge node.
[0070] Specifically, define the state space, action space, and caching reward function of the collaborative caching domain, count the current vehicle density status of each edge node in the collaborative caching domain, and based on the component demand prediction result and the current vehicle density status, combine the state space, the action space, and the caching reward function to calculate the expected benefits brought by caching different service components, so as to evaluate the advantages and disadvantages of the pre-caching strategy and obtain the global optimal pre-caching strategy.
[0071] Through the above solution, the embodiment of the present invention realizes calculating the expected benefits brought by caching different service components based on the component demand prediction result and the current vehicle density status, so as to evaluate the advantages and disadvantages of the pre-caching strategy and obtain the global optimal pre-caching strategy, thereby caching the service components into the edge nodes according to the optimal pre-caching strategy, and comprehensively improving the resource utilization ability and service reliability of the vehicle-to-everything network.
[0072] In an embodiment of the present invention, before step 11: obtaining the service preference data of each service vehicle in the collaborative caching domain, it further includes:
[0073] Construct an edge collaborative caching domain model; obtain the coordinate positions of each edge node in the edge collaborative caching domain model; based on the coordinate positions of each edge node, cluster each edge node to obtain several collaborative caching domains; wherein, the edge node is communicatively connected to each service vehicle within the coverage range of the edge node.
[0074] It should be noted that the edge collaborative caching domain model is composed of each edge node, and the coordinate position can be the longitude and latitude position of the edge node, or a coordinate system can be constructed with a preset position as the coordinate origin, and the x-axis and y-axis directions of the coordinate system can be set according to the actual situation. For example: select the due east direction as the positive direction of the x-axis and the due north direction as the positive direction of the y-axis, and then the coordinate positions of each edge node in this coordinate position can be calculated.
[0075] Specifically, first construct an edge collaborative caching domain model, obtain the coordinate positions of each edge node in the edge collaborative caching domain model, and further, perform aggregation classification based on the coordinate positions of each edge node to obtain several collaborative caching domains. As an implementable manner: based on the coordinate positions of each edge node, calculate the distances between each edge node, and then aggregate each edge node with a distance not exceeding the first preset distance threshold into one category to form a collaborative caching domain.
[0076] As another implementable manner: several starting nodes can be selected from all edge nodes. Among them, the number of starting nodes can determine the number of collaborative caching domains. Then, the distances between each edge node and the starting nodes are calculated respectively. Further, each edge node whose distance from the starting node does not exceed the second preset distance threshold is determined to calculate the node distances between each edge node. Each edge node whose node distance does not exceed the third preset distance threshold and the starting node are clustered to form a collaborative caching domain. Among them, the first preset distance threshold, the second preset distance threshold, and the third preset distance threshold can all be set according to the actual situation. In addition, in order to avoid an excessive number of edge nodes in the collaborative caching domain, an upper limit number threshold of the edge nodes in the collaborative caching domain can be preset, so as to aggregate each edge node with a relatively short distance and meeting the upper limit number threshold to form a collaborative caching domain.
[0077] Additionally, after several collaborative caching domains are formed, a node is selected as the domain head node among each edge node in the collaborative caching domain. It can be randomly selected or selected according to parameter information such as the bandwidth, storage space, and vehicle density of the edge node.
[0078] Through the above solution in this embodiment, by dynamically clustering each edge node into a collaborative caching domain, services are provided for vehicles in different collaborative caching domains, and the service capabilities and stability of the collaborative caching domains are balanced.
[0079] In an embodiment of the present invention, after performing reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching strategy and caching the pre-caching components corresponding to the globally optimal pre-caching strategy into edge nodes, it further includes:
[0080] Obtain a service request sent by a target requesting vehicle within the collaborative caching domain; based on each pre-caching service component stored in each edge node, deliver the requested service component corresponding to the service request to the target requesting vehicle according to a pre-set delivery strategy.
[0081] The delivering the requested service component corresponding to the service request to the target requesting vehicle based on each pre-caching service component stored in each edge node according to a pre-set delivery strategy includes:
[0082] If the target edge node that receives the service request stores the requested service component, deliver the requested service component in the target edge node to the target requesting vehicle; if the target edge node does not store the requested service component, query whether any of the other edge nodes in the collaborative caching domain, except the target edge node, store the requested service component; if so, send a component assistance request to the edge node storing the corresponding requested service component to obtain the requested service component, and deliver the requested service component to the target requesting vehicle; if not, send a service component request to each of the remaining collaborative caching domains in the edge collaborative caching domain model to obtain the requested service component, and deliver the requested service component to the target requesting vehicle.
[0083] It should be noted that the service request includes the service component to be requested. Specifically, when the target edge node receives a service request sent by a target requesting vehicle within the coverage area of the target edge node, it is necessary to deliver the requested service component required by the service request to the target requesting vehicle. During the delivery process, there are three cases:
[0084] The first case: The requested service component exists among the pre-cached service components in the target edge node, and thus directly deliver the requested service component to the target requesting vehicle through the target edge node.
[0085] The second case: The requested service component does not exist among the pre-cached service components in the target edge node. Then query whether any of the other edge nodes in the collaborative caching domain, except the target edge node, store the requested service component. If so, send a component assistance request to the domain head node in the collaborative caching domain to forward the component assistance request to the edge node storing the corresponding requested service component through the domain head node to obtain the requested service component, and deliver the requested service component to the target requesting vehicle.
[0086] The third case: The requested service component does not exist among the pre-cached service components in the target edge node, and none of the other edge nodes in the collaborative caching domain store the requested service component. Then the target edge node sends a service component request to the domain head node in the collaborative caching domain to send a service component request to each of the remaining collaborative caching domains in the edge collaborative caching domain model or to a pre-set central server through the domain head node in the collaborative caching domain. The central server is communicatively connected to the domain head node of each collaborative caching domain to obtain the requested service component, and deliver the requested service component to the target requesting vehicle.
[0087] Based on the service request sent by the target requesting vehicle, the embodiments of the present invention can search for the requested service components corresponding to the service request among the edge nodes within the collaborative caching domain and between the collaborative caching domains, improving the efficiency of edge caching services, thereby comprehensively improving the resource utilization ability and service reliability of the vehicle network.
[0088] The edge collaborative content caching device provided by the present invention will be described below. The edge collaborative content caching device described below can be mutually referred to with the edge collaborative content caching method described above.
[0089] Figure 2 It is a schematic structural diagram of the edge collaborative content caching device provided by the present invention. As Figure 2 shown, an edge collaborative content caching device according to an embodiment of the present invention includes:
[0090] An acquisition module 21, configured to acquire the service preference data of each service vehicle within the collaborative caching domain;
[0091] A demand prediction module 22, configured to input each of the service preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle within the edge nodes in the collaborative caching domain;
[0092] A calculation module 23, configured to perform reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy, so as to cache the pre-caching components corresponding to the globally optimal pre-caching policy into the edge nodes.
[0093] The edge collaborative content caching device is further configured to:
[0094] For any edge node within the collaborative caching domain, select a number of training vehicles from the service vehicles in the collaborative caching domain;
[0095] Send the training model and the global model parameters of the training model in the edge node to each of the training vehicles, so that each training vehicle iteratively trains the training model based on its own corresponding historical preference data and the global model parameters to obtain a local model, and upload the local model parameters of the local model to the edge node;
[0096] Aggregate the local model parameters of each training vehicle to obtain aggregated model parameters;
[0097] Update the global model parameters of the training model based on the aggregated model parameters, and send the updated global model parameters to each target vehicle, where the target vehicle is a training vehicle that uploads the local model parameters to the edge node;
[0098] For each of the target training vehicles to perform a new round of model training based on the updated global model parameters until the training model of the edge node converges to obtain the federated prediction model.
[0099] The edge collaborative content caching device is further configured to:
[0100] Calculate the weight ratio corresponding to each training vehicle based on the historical preference data corresponding to each training vehicle;
[0101] Aggregate based on the weight ratio corresponding to each training vehicle and the local model parameters to obtain the aggregated model parameters.
[0102] The calculation module 23 is further configured to:
[0103] Define the state space, action space, and caching reward function of the collaborative caching domain;
[0104] Count the current vehicle density status of each edge node in the collaborative caching domain;
[0105] Based on the component demand prediction result and the current vehicle density status, combined with the state space, the action space, and the caching reward function, calculate to obtain the global optimal pre-caching policy.
[0106] The edge collaborative content caching device is further configured to:
[0107] Construct an edge collaborative caching domain model;
[0108] Obtain the coordinate positions of each edge node in the edge collaborative caching domain model;
[0109] Cluster each edge node based on the coordinate positions of each edge node to obtain several collaborative caching domains; wherein, the edge node is communicatively connected to each service vehicle within the coverage range of the edge node.
[0110] The edge collaborative content caching device is further configured to:
[0111] Obtain the service request sent by the target requesting vehicle in the collaborative caching domain;
[0112] Deliver the requested service component corresponding to the service request to the target requesting vehicle according to a pre-set delivery policy based on each pre-cached service component stored in each edge node.
[0113] The edge collaborative content caching device is further configured to:
[0114] If the target edge node that receives the service request stores the requested service component, deliver the requested service component in the target edge node to the target requesting vehicle;
[0115] If the target edge node does not store the requested service component, query whether any other edge nodes within the collaborative caching domain except the target edge node store the requested service component;
[0116] If there is, send a component assistance request to the edge node storing the requested service component to obtain the requested service component, and deliver the requested service component to the target requesting vehicle;
[0117] If not, send a service component request to the remaining collaborative caching domains in the edge collaborative caching domain model to obtain the requested service component, and deliver the requested service component to the target requesting vehicle.
[0118] It should be noted here that the above device provided in the embodiment of the present invention can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiment will not be specifically described in this embodiment.
[0119] Figure 3 is a schematic structural diagram of an electronic device provided by the present invention. As Figure 3 shown, the electronic device may include: a processor 310, a memory 320, a communication interface 330, and a communication bus 340. Among them, the processor 310, the memory 320, and the communication interface 330 communicate with each other through the communication bus 340. The processor 310 may call the logical instructions in the memory 320 to execute the edge collaborative content caching method, which includes: obtaining the service preference data of each service vehicle within the collaborative caching domain; inputting each piece of the service preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle in the edge nodes within the collaborative caching domain; performing reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy, so as to cache the pre-caching components corresponding to the globally optimal pre-caching policy into the edge nodes.
[0120] In addition, when the logical instructions in the above-mentioned memory 320 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0121] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the edge collaborative content caching method provided by the above-mentioned various methods. The method includes: obtaining the service preference data of each service vehicle within the collaborative caching domain; inputting each of the service preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle within the edge nodes in the collaborative caching domain; performing reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching strategy, so as to cache the pre-caching components corresponding to the globally optimal pre-caching strategy into the edge nodes.
[0122] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is capable of executing the edge collaborative content caching method provided by the above-mentioned various methods. The method includes: obtaining the service preference data of each service vehicle within the collaborative caching domain; inputting each of the service preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle within the edge nodes in the collaborative caching domain; performing reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching strategy, so as to cache the pre-caching components corresponding to the globally optimal pre-caching strategy into the edge nodes.
[0123] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0124] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or equivalently replace some of the technical features. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An edge collaborative content caching method, characterized in that, Including: Obtain the business preference data of each service vehicle within the collaborative cache domain; Input each of the business preference data into the federated prediction model to obtain the component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle within the edge nodes in the collaborative cache domain; Perform reinforcement learning calculation on the component demand prediction result to obtain the globally optimal pre-caching policy, so as to cache the pre-cached components corresponding to the globally optimal pre-caching policy into the edge nodes; Before obtaining the business preference data of each service vehicle within the collaborative cache domain, it further includes: Construct an edge collaborative cache domain model; Obtain the coordinate positions of each edge node in the edge collaborative cache domain model; Cluster each of the edge nodes based on the coordinate positions of the edge nodes to obtain several collaborative cache domains; wherein, the edge nodes are communicatively connected to each service vehicle within the coverage range of the edge nodes.
2. The edge collaborative content caching method according to claim 1, characterized in that, The federated prediction model is obtained through training based on the following steps: For any edge node within the collaborative cache domain, select several training vehicles from the service vehicles within the collaborative cache domain; Send the training model in the edge node and the global model parameters of the training model to each of the training vehicles, so that each training vehicle iteratively trains the training model based on its respective historical preference data and the global model parameters to obtain a local model, and upload the local model parameters of the local model to the edge node; Aggregate the local model parameters of each training vehicle to obtain aggregated model parameters; Update the global model parameters of the training model based on the aggregated model parameters, and send the updated global model parameters to each target vehicle, wherein the target vehicle is the training vehicle that uploads the local model parameters to the edge node; So that each target training vehicle performs a new round of model training based on the updated global model parameters until the training model of the edge node converges to obtain the federated prediction model.
3. The edge collaborative content caching method according to claim 2, characterized in that, The aggregating the local model parameters of each training vehicle to obtain aggregated model parameters includes: Calculate the weight ratio corresponding to each training vehicle based on the historical preference data corresponding to each training vehicle; Aggregate based on the weight ratio corresponding to each training vehicle and the local model parameters to obtain the aggregated model parameters.
4. The edge collaborative content caching method according to claim 1, characterized in that, The performing reinforcement learning calculation on the component demand prediction result to obtain the globally optimal pre-caching policy includes: Define the state space, action space, and cache reward function of the collaborative cache domain; Count the current vehicle density state of each edge node within the collaborative cache domain; Based on the component demand prediction result and the current vehicle density state, combine the state space, the action space, and the cache reward function to calculate and obtain the globally optimal pre-caching policy.
5. The edge collaborative content caching method according to claim 1, characterized in that, After performing reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy and caching the pre-cached components corresponding to the globally optimal pre-caching policy in the edge nodes, the method further includes: Obtaining a service request sent by a target requesting vehicle within the collaborative caching domain; Based on each pre-cached service component stored in each edge node, delivering the requested service component corresponding to the service request to the target requesting vehicle according to a pre-set delivery policy.
6. The edge collaborative content caching method according to claim 5, characterized in that, The delivering the requested service component corresponding to the service request to the target requesting vehicle based on each pre-cached service component stored in each edge node according to a pre-set delivery policy includes: If the target edge node that receives the service request stores the requested service component, delivering the requested service component in the target edge node to the target requesting vehicle; If the target edge node does not store the requested service component, querying whether any other edge node within the collaborative caching domain except the target edge node stores the requested service component; If so, sending a component assistance request to the edge node storing the requested service component to obtain the requested service component and delivering the requested service component to the target requesting vehicle; If not, sending a service component request to the remaining collaborative caching domains in the edge collaborative caching domain model to obtain the requested service component and delivering the requested service component to the target requesting vehicle.
7. An edge collaborative content caching device, characterized in that, including: An obtaining module, configured to obtain the business preference data of each service vehicle within the collaborative caching domain; A demand prediction module, configured to input each piece of the business preference data into a federated prediction model to obtain a component demand prediction result output by the federated prediction model; wherein, the federated prediction model is obtained through federated learning training based on the historical preference data of each service vehicle in the edge nodes within the collaborative caching domain; A calculation module, configured to perform reinforcement learning calculation on the component demand prediction result to obtain a globally optimal pre-caching policy and cache the pre-cached components corresponding to the globally optimal pre-caching policy in the edge nodes; The edge collaborative content caching device is further configured to: Construct an edge collaborative caching domain model; Obtain the coordinate positions of each edge node in the edge collaborative caching domain model; Based on the coordinate positions of each edge node, clustering each edge node to obtain a plurality of collaborative caching domains; wherein, each edge node is communicatively connected to each service vehicle within the coverage range of the edge node.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the edge collaborative content caching method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the edge collaborative content caching method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Edge pre-caching strategy based on federated learning in vehicle-mounted content center network
CN113158544A
Cooperative online video edge caching method based on federated learning
CN113315978A