Edge collaborative caching method based on federated learning
By adopting a federated learning-based edge collaborative caching method, combined with user context space partitioning and hybrid caching strategies, the cache resource configuration is optimized, solving the problem of low cache resource utilization of MEC nodes, and achieving efficient and secure content recommendation and improved cache hit rate.
Patent Information
- Application Number
- CN202411005711.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
Traditional centralized caching architectures are inefficient when faced with massive amounts of network data. The caching resources of MEC nodes are underutilized, making it difficult to meet the high-efficiency caching needs of time-sensitive applications. Furthermore, they suffer from limited cache capacity and high overhead.
We adopt an edge collaborative caching method based on federated learning, which predicts content popularity by partitioning the user context space, hybrid cache space partitioning, and vector quantization variational autoencoder. Combined with cache replacement strategies, we optimize cache resource configuration and content recommendation.
It improves the efficiency of cache resource configuration on MEC servers, reduces user response time, increases cache hit rate and system performance, while protecting user privacy and reducing data transmission latency and network burden.
Smart Images

Figure CN118972905A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge computing technology, and in particular to an edge collaborative caching method based on federated learning. Background Art
[0002] Edge caching technology refers to a strategy that moves data caching functions to the edge of the network. In traditional network structures, data caches are usually located in data centers or servers. However, with the rise of technologies such as cloud computing, the Internet of Things, and edge computing, more and more data needs to be processed and stored at the edge of the network. Therefore, edge caching technology has emerged. Its core concept is to cache data closer to the user, which can reduce network bandwidth consumption and shorten transmission delays, thereby improving user experience and overall system performance.
[0003] The surge in network data has intensified the challenge to traditional centralized cache systems: the widespread use of the Internet and the continuous expansion of its application areas have led to a sharp increase in network data and traffic. In the face of this data torrent, the traditional centralized cache architecture seems to be unable to cope with it, and a new cache strategy is urgently needed to reduce the burden on the central data center. Distributing the cache function to the edge layer of the network has become an effective solution.
[0004] People's pursuit of high-speed transmission and high-quality user experience is constantly increasing. In many time-sensitive application scenarios, such as online games, live video and the Internet of Things, high requirements for data transmission speed have become the key to improving user experience. Through the deployment of network edge cache, fast data delivery can be achieved, data transmission delay can be reduced, and data processing speed can be accelerated.
[0005] Mobile edge computing deploys data processing and storage functions close to the user, such as mobile communication base stations, wireless access nodes or dedicated edge servers, and uses multiple edge nodes to jointly store and share data to improve cache efficiency and system performance and reduce latency and bandwidth consumption. However, the performance of MEC nodes is still often limited by limited cache capacity and high cache-related overhead. Therefore, how to efficiently use MEC cache resources to enhance cache efficiency has become a hot topic of common concern in the industry and academia. The optimization of cache efficiency is generally affected by the following factors, including but not limited to the size of the cache capacity, the relevance of the content, the way the cache space is divided, and the cache replacement strategy. Therefore, edge collaborative caching technology has great value in optimizing the overall cache resource configuration scheme and exploring the intrinsic connection between user characteristics and content attributes.
[0006] Edge collaborative caching can enhance the responsiveness of mobile applications, reduce the latency of data transmission, and improve the operating efficiency and response speed of mobile applications. In addition, it can also reduce network congestion. By processing data at the edge of the network, it can ease the burden of network transmission, reduce the frequency and distance of data flow in the network, and improve the utilization of network bandwidth. In the context of the development of new mobile applications, mobile edge computing provides technical support for a variety of emerging mobile application scenarios such as intelligent transportation systems, telemedicine, virtual reality, etc., and promotes innovation and practical applications in these fields. The closest and most tangible point of edge collaborative caching should be that it can optimize the user interaction experience, respond to mobile applications in a timely manner, and is safe and reliable, optimizing the user's interactive experience and meeting the user's high standards for mobile application performance. Summary of the invention
[0007] The present invention proposes an edge collaborative caching method based on federated learning, which can optimize user interactive experience and respond to mobile applications in a timely manner.
[0008] The present invention adopts the following technical solutions.
[0009] An edge collaborative caching method based on federated learning, the method comprising a user scenario space partitioning mechanism and a hybrid cache space partitioning mechanism, comprising the following steps;
[0010] Step S1: divide the user intervals in combination with the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so as to improve the accuracy of content recommendation for users in the classification interval;
[0011] Step S2: Use a vector quantized variational autoencoder to predict content popularity, improve the accuracy of the system's analysis of usage preferences, and improve the accuracy and pertinence of content caching;
[0012] Step S3: Using a cache replacement strategy based on federated learning, timely update content resources according to user content requests to improve the hit rate of edge collaborative cache.
[0013] The caching method is based on an edge collaborative caching model that can improve the cache resource allocation efficiency and performance of the MEC server;
[0014] The edge collaborative caching model system includes N users and M MEC servers.
[0015] The user is represented by u, u∈{1,2,...,N u ,...,U},
[0016] The MEC server is represented by e, e∈{1,2,...,M e ,...,E};
[0017] c is the cache space of MEC server c∈{1, 2, ..., M c , ..., C};
[0018] An edge area consists of multiple MEC nodes, and a base station is responsible for covering all MEC nodes in the edge area; each user connects to a MEC node and sends a content access request to the edge server to which it is connected, and then receives a corresponding response operation from the MEC server; if the content already exists on this MEC node, the MEC server will directly send the content to the requesting user; if the requested content is not found on the MEC server, it will need to be retrieved from a neighboring MEC server or called from a remote cloud data service center.
[0019] If the current MEC node can cache more requested content required by users in advance and can hit the content when the user directly connected to it sends a content request, the user service response time within the coverage of the base station will be greatly reduced, and the end user experience will be more optimized; when the user sends a content request, the MEC node performs encryption preprocessing of the user information data, encrypts personal information such as user location and historical records, and analyzes the user information locally, while only the model parameters are uploaded to the cloud service center without involving user information, which greatly reduces the risk of user privacy information leakage and can better protect user privacy; each MEC node iteratively trains the user request matrix, and then uploads the local model training parameters to the global model for parameter update, and forms the optimal global model of this round through federated aggregation, and then distributes this global model to each MEC node for cache hit rate prediction;
[0020] In order to meet the requirement of timely improving the hit rate of obtaining content within a certain time limit, popular hot content is cached in advance, and the content popularity index is defined as follows: 0 / 1 variable Used to indicate the content f within a period of time t i Whether the request is made by the current MEC server m To provide;
[0021] Indicates that within time period t, content f i Cache on the server, for content i The request is made by the current MEC server e m To provide;
[0022] Indicates the current MEC server e m Content f does not exist i , then the adjacent MEC server M eOr the root server E provides content, j∈{M e , E}; MEC node e m The service rounds are recorded as k times;
[0023] The MEC server responds to the content request of user u and sends the content to e in time period t. m Server Contents i The request frequency is expressed as Within the time period t, m The frequency of requests for all the content f on the server Content popularity is defined as:
[0024]
[0025] In order to measure the difference between the model prediction value and the actual value, the average of the squares of the difference between the model prediction value and the actual value is calculated to evaluate the performance of the model in content popularity prediction. The mean square error of the content popularity global loss function is defined.
[0026]
[0027] in is the true value of popularity, is the popularity prediction value, for e m Node model parameters, α k The global model parameter n represents the number of training samples in the MEC node, which is calculated by minimizing the mean square error and is expressed as:
[0028]
[0029] In order to evaluate the proportion of requested content that is already in the cache and can be directly provided to the user, the cache hit rate is defined as:
[0030]
[0031] The hybrid cache space partitioning mechanism determines the size of cache space allocated to interval users by comprehensively considering factors of static partitioning, dynamic partitioning, content perception and user scenario space partitioning, and optimizing the allocation strategy of cache resources;
[0032] When dividing the user context space, we analyze the user context space from the user end. Assume that the user's gender, age, environment, time, location, device, education, and occupation context information affect their preference for content acquisition. The context of the context information is represented by the context vector:
[0033] δ n =[δ n,1 , δ n,2, ..., δ n,D ] T ∈[0, 1] D ,
[0034] D is the user scenario space dimension. The system analyzes the user's behavior and needs through the user's characteristics and makes corresponding recommendations or decisions based on the user's characteristics. The edge collaborative caching method based on federated learning divides users with similar user characteristics into the same partition to improve the accuracy of predicting content popularity, and better obtains the potential relationship between interval users and their preferred content through partitioning, reducing the overall computational complexity of the system. The specific method is as follows:
[0035] First, construct the original context space Θ0 and perform normalization, w = 1, all users belong to the same interval, then partition the context space, Num(Θ i ) represents Θ i The number of users in the context subspace, when the number of users Num(Θ i ) exceeds the separation threshold, the space is equally divided into two-dimensional user scenario space. The segmentation threshold determines the speed at which the user scenario space is segmented and the number of users in the classification interval. When the threshold is large, the user scenario space is segmented slowly, the number of users is large, and the user preferences cannot be reflected. When the threshold is small, the user scenario space is segmented quickly, the number of users is small, and the overhead of system preference analysis becomes huge. The comprehensive parameter adjustment threshold is set to The threshold parameters γ1 and γ2 are both greater than 0, and the user scenario space Θ obtained after division is Θ={Θ1,Θ2,...,Θ s , ..., Θ S}.
[0036] The hybrid cache space partitioning mechanism comprehensively considers the number of users in the user interval in the user scenario space, the concentration of user request content, and the user activity. The cache space of an MEC node is allocated to the users in the user scenario space in a certain proportion according to the hybrid cache space partitioning strategy. Specifically:
[0037] Set in the user scenario space Θ i In the example, the user's access set capacity is Φ(Θ i ), the user’s access demand is determined by the subspace user access ratio To measure, the effect of e on m The request frequency of all content f of the server is defined as Within the time period t s Users within e m The request frequency of all content f of the server is defined as The user access ratio is:
[0038]
[0039] Need to give users context spaceΘ i The access collection capacity set for each user in is:
[0040] avg(Θ i )=Φ(Θ i ) / Num(Θ i )
[0041] The MEC node needs to give the scenario space Θ i The proportion of user-allocated cache space in:
[0042]
[0043] In step S2, content popularity prediction is performed based on a vector quantization variational autoencoder, using a neural network model VQ-VAE that combines vector quantization and variational autoencoder;
[0044] The VQ-VAE model includes an encoder, a decoder, and a codebook (Codebook: E = [e1, e2, ..., e k ]), Latent Embedding Space: V = [v1, v2, ... v l ]);
[0045] The user's request matrix X = [x1, x2..., x n ] T Records the user's use of content f during the time period t i The preference of the request is a binary variable. When the value of the element is 1, it means that the user has successfully requested the relevant content; when the value of the element is 0, it means that the user has failed to request the required content.
[0046] The algorithm flow of VQ-VAE is as follows:
[0047] Step A1: First, define the latent embedding space, which has K embedding vectors as the queryable codebook, denoted as Codebook: E = [e1, e2, ..., e k ], k∈[1,K],q(z|x);
[0048] Step A2: Input the user request content matrix X and use an autoregressive model PixelCNN to learn the prior through the Encoder to obtain N intermediate representations z e (x), and then use the nearest neighbor search algorithm to query the codebook for the vector Z that is most similar to the N intermediate representations;
[0049] Step A3: Put the similar vector z in the codebook into the corresponding z e (x), we get z q (x) = v l ;
[0050] Step A4: Decoder obtains the intermediate representation z q (x) Reconstruct the user request content matrix X′.
[0051] The index of the decoder Input-Vector is:
[0052] VQ-VAE training loss function L VQ-VAE It consists of three parts: reconstruction loss, codebook loss, and commitment loss. α is a weight hyperparameter that depends on the size of the reconstruction loss.
[0053] L VQ-VAE The specific formula is as follows:
[0054] L VQ-VAE =L recon +L codebook +αL commit
[0055] Reconstruction loss function: L recon =log p (x|z p (x))
[0056] Codebook loss:
[0057] Committed loss:
[0058] x = sg(x);
[0059] The first part of the loss function mainly evaluates the performance of the Encoder and Decoder. The codebook query process in the middle is essentially discrete. q The gradient of (x) Assign to z e (x), forming the back-propagation gradient The reconstruction loss can be ignored; the second term is called the codebook loss, which aims to train V = [v1, v2, ...v l ], due to z e (x) is constant, so the embedding vector υ is promoted l To z e (x) is close, the third term makes the output more stable, which in turn makes z e (x) tends to Codebook;
[0060] Where sg is the gradient Stop operation, it plays an identity role in the forward propagation process, and its derivative is zero, which means that the module where sg is located will not be affected by the gradient Impact of updates.
[0061] The cache replacement strategy based on federated learning in step S3 includes model training and edge collaborative caching strategy. The preferred content of the interval users is counted by the interval users and the size of the interval users' cache space. The preferred content of all interval users under the MEC node is added up for deduplication. Each node is divided into intervals for cache replacement, and the content that should be cached by each MEC node is obtained. The content cached by each interval user of each MEC node is also obtained, which improves the performance and efficiency of the edge cache system.
[0062] The specific steps of the edge collaborative caching strategy are as follows:
[0063] Step B1: At the beginning of training, the number of rounds of model updates between the cloud service center and each device participating in the training is k, k∈[1,K]. In each round of federated learning training, first, all devices will participate in the training process of the local content model; then, these updated information will be transmitted to the remote server and summarized there to adjust and update the parameters of the global model accordingly. Finally, the above steps are iterated and repeated. When the content popularity model α is satisfied, k When the hit rate reaches the threshold, the model is considered to have converged and the iteration is stopped;
[0064] Step B2: Update and train the local model parameters. Take the content popularity prediction model and the user request record set as input data, complete the model learning and optimization process in the local node, and after the training is completed, synchronize the model parameter update to the cloud master server. Among the model parameters, the number of training epochs is represented by E, the training batch is represented by B, and the learning rate is represented by η, which are three hyperparameters.
[0065] Step B3, determine the node cache replacement strategy; first, obtain the user scenario space Θ, and consider the content popularity factor, because content popularity is an important basis for cache content replacement. Therefore, the vector quantization variational autoencoder proposed above is used to determine the priority and predict the sorting of content popularity, and include it in the temporary cache Cache temp ;
[0066] Assume that the closer the user information intervals are, the greater the overlap of user preference content is, and there is a cache redundancy problem. For this, a cache priority replacement strategy is adopted to select the m content that the user is most interested in in the current interval from the preset cache list and then replace Θ s Cache list s ;
[0067] When all interval users complete the cache update, aggregate the cache list Θ s And update the available cache space size of the MEC node, and iterate continuously until the cache space is fully allocated.
[0068] The method for determining the cache hit rate of the edge collaborative caching strategy is as follows: after each federation aggregation is completed, each MEC node receives the global VQ-VAE model sent by the cloud service center, and all nodes test the collaborative cache hit rate according to the test set and average the cache hit rates of N MEC nodes.
[0069] The use of the caching method comprises the following steps:
[0070] Step C1: Based on the user scenario space division and hybrid cache space division mechanism, the user interval division is performed in combination with the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so that users can obtain more accurate content recommendations in the classification interval. Step C2: Based on the user's historical requests, the MCCF method uses VQ-VAE to learn the latent embedding space composed of a set of discrete vectors, and then the decoder uses the nearest neighbor algorithm to find the discrete latent vector used to generate the user request matrix. In this way, the system can be helped to analyze user preferences more accurately, thereby achieving more accurate and targeted content caching. .
[0071] Step C3, the MCCF method uses federated deep learning to aggregate the local models of each MEC node based on the user request data stored in the MEC node to generate a global shared model to minimize the global loss.
[0072] Step C4, the MCCF method is based on a redesigned active cache replacement strategy to better adapt to the optimized cache resource configuration, thereby improving the cache hit rate.
[0073] In order to improve the cache performance in edge computing, this paper proposes an edge collaborative cache (ECCF) strategy, which is a strategy that combines federated learning and edge collaborative cache. It includes three main parts: hybrid cache space partitioning, content popularity prediction based on vector quantization variational autoencoder, and model training and cache replacement strategy. The goal is to provide an edge collaborative cache model to achieve excellent cache and timeliness performance. The main contents are as follows:
[0074] (1) A hybrid cache space partitioning mechanism is designed, which comprehensively considers factors such as static partitioning, dynamic partitioning, content perception, and user scenario space partitioning. By optimizing the allocation strategy of cache resources, the size of cache space allocated to interval users is determined.
[0075] (2) The generative model of vector quantization technology and variational autoencoder is combined. Vector quantization variational autoencoder is used to extract user features, and continuous and random latent vectors are replaced with deterministic discrete vectors to construct a user request matrix for content popularity prediction. The model is trained locally through federated learning to obtain an optimized user request matrix, so that user sensitive data can be retained locally to protect user privacy. A cache priority replacement strategy is also adopted to count the cache space size of interval users and interval users, and use it in the collaborative scenario of cache nodes to optimize the use of cache resources and improve cache efficiency and system performance.
[0076] Through comparative experiments based on the Movielens real data set, the ECCF method proposed in this paper is compared with the other four methods LRU, AE, Oracle, and Random. The experimental results show that the ECCF method has a cache hit rate close to that of the ideal Oracle. The weights of hybrid cache space partitioning and collaborative cache on the ECCF method, as well as the impact of the number of MEC nodes on the cache hit rate and federated learning training time are further explored.
[0077] The present invention uses federated learning technology to train the model on the local MEC node, reducing data transmission and communication overhead and optimizing the use of network resources. At the same time, the model training of the edge device using federated learning is used to explore the relationship between the user information space and personalized content recommendation, and combined with the priority cache replacement strategy, the hit rate of user content acquisition is improved.
[0078] The present invention proposes an edge collaborative caching method (ECCF) based on federated learning. The user scenario space division and hybrid cache space division mechanism are proposed, and the user interval division is performed in combination with the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so that users can obtain more accurate content recommendations in the classification interval. The use of vector quantization variational autoencoder to predict content popularity can help the system to more accurately analyze user preferences, thereby achieving more accurate and targeted content caching. Finally, a cache replacement strategy based on federated learning is designed to update content resources in a timely manner according to the user's content request situation, thereby improving the hit rate of edge collaborative cache. In the experimental verification stage, based on the MovieLens movie rating real data set, four benchmark methods are used to compare with the proposed ECCF method. The experimental results show that ECCF achieves a higher cache hit rate and is close to the optimal result. Further ablation experiments are performed to verify the role of hybrid cache space division and collaborative cache in improving the performance of edge collaborative cache. At the same time, ECCF shows excellent cache performance and timeliness performance in scenarios with different numbers of MEC nodes and cache space sizes, and can adapt to more complex edge collaboration scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0080] Attached Figure 1 is a schematic diagram of an edge collaborative caching model of the present invention;
[0081] Attached Figure 2 It is a schematic diagram of the system model training process of the present invention.
[0082] Attached Figure 3 It is a schematic diagram of the vector quantized variational autoencoder VQ-VAE; DETAILED DESCRIPTION
[0083] As shown in the figure, the edge collaborative caching method based on federated learning includes a user scenario space division mechanism and a hybrid cache space division mechanism, and includes the following steps:
[0084] Step S1: divide the user intervals based on the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so as to improve the accuracy of content recommendation for users in the classification interval;
[0085] Step S2: Use a vector quantized variational autoencoder to predict content popularity, improve the accuracy of the system's analysis of usage preferences, and improve the accuracy and pertinence of content caching;
[0086] Step S3: Using a cache replacement strategy based on federated learning, timely update content resources according to user content requests to improve the hit rate of edge collaborative cache.
[0087] The caching method is based on an edge collaborative caching model that can improve the cache resource allocation efficiency and performance of the MEC server;
[0088] The edge collaborative caching model system includes N users and M MEC servers.
[0089] The user is represented by u, u∈{1, 2, ..., N u , ..., U},
[0090] The MEC server is represented by e, e∈{1,2,...,M e ,...,E};
[0091] c is the cache space of MEC server c∈{1,2,...,M c ,...,C};
[0092] An edge area consists of multiple MEC nodes, and a base station is responsible for covering all MEC nodes in the edge area; each user connects to a MEC node and sends a content access request to the edge server to which it is connected, and then receives a corresponding response operation from the MEC server; if the content already exists on this MEC node, the MEC server will directly send the content to the requesting user; if the requested content is not found on the MEC server, it will need to be retrieved from a neighboring MEC server or called from a remote cloud data service center.
[0093] If the current MEC node can cache more requested content required by users in advance and can hit the content when the user directly connected to it sends a content request, the user service response time within the coverage of the base station will be greatly reduced, and the end user experience will be more optimized; when the user sends a content request, the MEC node performs encryption preprocessing of the user information data, encrypts personal information such as user location and historical records, and analyzes the user information locally, while only the model parameters are uploaded to the cloud service center without involving user information, which greatly reduces the risk of user privacy information leakage and can better protect user privacy; each MEC node iteratively trains the user request matrix, and then uploads the local model training parameters to the global model for parameter update, and forms the optimal global model of this round through federated aggregation, and then distributes this global model to each MEC node for cache hit rate prediction;
[0094] In order to meet the requirement of timely improving the hit rate of obtaining content within a certain time limit, popular hot content is cached in advance, and the content popularity index is defined as follows: 0 / 1 variable Used to indicate the content f within the time period t i Whether the request is made by the current MEC server e m To provide;
[0095] Indicates that within time period t, content f i Cache on the server, for content i The request is made by the current MEC server e m To provide;
[0096] Indicates the current MEC server e m Content f does not exist i , then the adjacent MEC server M e Or the root server E provides content, j∈{M e , E}; MEC node e m The service rounds are recorded as k times;
[0097] The MEC server responds to the content request of user u and sends the content to e in time period t. m Server Content i The request frequency is expressed as Within the time period t, m The frequency of requests for all the content f on the server Content popularity is defined as:
[0098]
[0099] In order to measure the difference between the model prediction value and the actual value, the average of the squares of the difference between the model prediction value and the actual value is calculated to evaluate the performance of the model in content popularity prediction. The mean square error of the content popularity global loss function is defined.
[0100]
[0101] in is the true value of popularity, is the popularity prediction value, for e m Node model parameters, α k The global model parameter n represents the number of training samples in the MEC node, which is calculated by minimizing the mean square error and is expressed as:
[0102]
[0103] In order to evaluate the proportion of requested content that is already in the cache and can be directly provided to the user, the cache hit rate is defined as:
[0104]
[0105] The hybrid cache space partitioning mechanism determines the size of cache space allocated to interval users by comprehensively considering factors of static partitioning, dynamic partitioning, content perception and user scenario space partitioning, and optimizing the allocation strategy of cache resources;
[0106] When dividing the user context space, we analyze the user context space from the user end. Assume that the user's gender, age, environment, time, location, device, education, and occupation context information affect their preference for content acquisition. The context of the context information is represented by the context vector:
[0107] δ n =[δ n,1 ,δ n,2 ,...,δ n,D ] T ∈[0,1] D ,
[0108] D is the user scenario space dimension. The system analyzes the user's behavior and needs through the user's characteristics and makes corresponding recommendations or decisions based on the user's characteristics. The edge collaborative caching method based on federated learning divides users with similar user characteristics into the same partition to improve the accuracy of predicting content popularity, and better obtains the potential relationship between interval users and their preferred content through partitioning, reducing the overall computational complexity of the system. The specific method is as follows:
[0109] The method is expressed in pseudo code as:
[0110]
[0111] First, the original context space Θ0 is constructed and normalized, ω = 1, and all users belong to the same interval. Then, the context space is partitioned, Num(Θ i ) represents Θ i The number of users in the context subspace, when the number of users Num(Θ i ) exceeds the separation threshold, the space is equally divided into two-dimensional user scenario space. The segmentation threshold determines the speed at which the user scenario space is segmented and the number of users in the classification interval. When the threshold is large, the user scenario space is segmented slowly, the number of users is large, and the user preferences cannot be reflected. When the threshold is small, the user scenario space is segmented quickly, the number of users is small, and the overhead of system preference analysis becomes huge. The comprehensive parameter adjustment threshold is set to The threshold parameters γ1 and γ2 are both greater than 0, and the user scenario space Θ obtained after division is Θ={Θ1,Θ2,...,Θ s , ..., Θ S}.
[0112] The hybrid cache space partitioning mechanism comprehensively considers the number of users in the user interval in the user scenario space, the concentration of user request content, and the user activity. The cache space of an MEC node is allocated to the users in the user scenario space in a certain proportion according to the hybrid cache space partitioning strategy. Specifically:
[0113] Set in the user scenario space Θ i In the example, the user's access set capacity is Φ(Θ i ), the user’s access demand is determined by the subspace user access ratio To measure, the effect of e on m The request frequency of all content f of the server is defined as Within the time period t s Users within e m The request frequency of all content f of the server is defined as The user access ratio is:
[0114]
[0115] Need to give users context spaceΘ i The access collection capacity set for each user in is:
[0116] avg(Θ i )=Φ(Θ i ) / Num(Θ i )
[0117] The MEC node needs to give the scenario space Θ i The proportion of user-allocated cache space in:
[0118]
[0119] In step S2, content popularity prediction is performed based on a vector quantization variational autoencoder, using a neural network model VQ-VAE that combines vector quantization and variational autoencoder;
[0120] The VQ-VAE model includes an encoder, a decoder, and a codebook (Codebook: E = [e1, e2, ..., e k ]), Latent Embedding Space: V = [v1, v2, ... v l ]);
[0121] The user's request matrix X = [x1, x2..., x n ] T Records the user's use of content f during the time period t i The preference of the request is a binary variable. When the value of the element is 1, it means that the user has successfully requested the relevant content; when the value of the element is 0, it means that the user has failed to request the required content.
[0122] The algorithm flow of VQ-VAE is as follows:
[0123] Step A1: First, define the latent embedding space, which has K embedding vectors as the queryable codebook, denoted as Codebook: E = [e1, e2, ..., e k ], k∈[1,K],q(z|x);
[0124] Step A2: Input the user request content matrix X and use an autoregressive model PixelCNN to learn the prior through the Encoder to obtain N intermediate representations z e (x), and then use the nearest neighbor search algorithm to query the codebook for the vector Z that is most similar to the N intermediate representations;
[0125] Step A3: Put the similar vector z in the codebook into the corresponding z e (x), we get z q (x) = v l ;
[0126] Step A4: Decoder obtains the intermediate representation z q (x) Reconstruct the user request content matrix X′.
[0127] The index of the decoder Input-Vector is:
[0128] VQ-VAE training loss function L VQ-VAE It consists of three parts: reconstruction loss, codebook loss, and commitment loss. α is a weight hyperparameter that depends on the size of the reconstruction loss.
[0129] L VQ-VAE The specific formula is as follows:
[0130] L VQ-VAE =L recon +L codebook +αL commit
[0131] Reconstruction loss function: L recon =log p (x|zp (x))
[0132] Codebook loss:
[0133] Committed loss:
[0134] x = sg(x);
[0135] The first part of the loss function mainly evaluates the performance of the Encoder and Decoder. The codebook query process in the middle is essentially discrete. q The gradient of (x) Assign to z e (x), forming the back-propagation gradient The reconstruction loss can be ignored; the second term is called the codebook loss, which aims to train V = [v1, v2, ...v l ], due to z e (x) is constant, so the embedding vector v l To z e (x) is close, the third term makes the output more stable, which in turn makes z e (x) tends to Codebook;
[0136] Where sg is the gradient Stop operation, it plays an identity role in the forward propagation process, and its derivative is zero, which means that the module where sg is located will not be affected by the gradient Impact of updates.
[0137] The cache replacement strategy based on federated learning in step S3 includes model training and edge collaborative caching strategy. The preferred content of the interval users is counted by the interval users and the size of the interval users' cache space. The preferred content of all interval users under the MEC node is added up for deduplication. Each node is divided into intervals for cache replacement, and the content that should be cached by each MEC node is obtained. The content cached by each interval user of each MEC node is also obtained, which improves the performance and efficiency of the edge cache system.
[0138] The specific steps of the edge collaborative caching strategy are as follows:
[0139] Step B1: At the beginning of training, the number of rounds of model updates between the cloud service center and each device participating in the training is k, k∈[1, K]. In each round of federated learning training, first, all devices will participate in the training process of the local content model; then, these updated information will be transmitted to the remote server and summarized there to adjust and update the parameters of the global model accordingly. Finally, the above steps are iterated and repeated. When the content popularity model α is satisfied, k When the hit rate reaches the threshold, the model is considered to have converged and the iteration is stopped;
[0140] Step B2: Update and train the local model parameters. Take the content popularity prediction model and the user request record set as input data, complete the model learning and optimization process in the local node, and after the training is completed, synchronize the model parameter update to the cloud master server. Among the model parameters, the number of training epochs is represented by E, the training batch is represented by B, and the learning rate is represented by η, which are three hyperparameters.
[0141] Step B3, determine the node cache replacement strategy; first, obtain the user scenario space Θ, and consider the content popularity factor, because content popularity is an important basis for cache content replacement. Therefore, the vector quantization variational autoencoder proposed above is used to determine the priority and predict the sorting of content popularity, and include it in the temporary cache Cache temp ;
[0142] Assume that the closer the user information intervals are, the greater the overlap of user preference content is, and there is a cache redundancy problem. For this, a cache priority replacement strategy is adopted to select the m content that the user is most interested in in the current interval from the preset cache list and then replace Θ s Cache list s ;
[0143] When all interval users complete the cache update, aggregate the cache list Θ s And update the available cache space size of the MEC node, and iterate continuously until the cache space is fully allocated.
[0144] The method for determining the cache hit rate of the edge collaborative caching strategy is as follows: after each federation aggregation is completed, each MEC node receives the global VQ-VAE model sent by the cloud service center, and all nodes test the collaborative cache hit rate according to the test set and average the cache hit rates of N MEC nodes.
[0145] The relevant algorithm is expressed in pseudo code as
[0146]
[0147] The use of the caching method comprises the following steps:
[0148] Step C1: Based on the user scenario space division and hybrid cache space division mechanism, the user interval division is performed in combination with the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so that users can obtain more accurate content recommendations in the classification interval. Step C2: Based on the user's historical requests, the MCCF method uses VQ-VAE to learn the latent embedding space composed of a set of discrete vectors, and then the decoder uses the nearest neighbor algorithm to find the discrete latent vector used to generate the user request matrix. In this way, the system can be helped to analyze user preferences more accurately, thereby achieving more accurate and targeted content caching. .
[0149] Step C3, the MCCF method uses federated deep learning to aggregate the local models of each MEC node based on the user request data stored in the MEC node to generate a global shared model to minimize the global loss.
[0150] Step C4, the MCCF method is based on a redesigned active cache replacement strategy to better adapt to the optimized cache resource configuration, thereby improving the cache hit rate.
[0151] Example:
[0152] In this example, the Movielens (1M) dataset is selected to test the cache efficiency related to content popularity. The Movielens (1M) dataset covers a total of 1 million rating records made by 6040 users on 3952 movies. Each dataset entry contains the following content: timestamp, movie ID, movie rating, user ID, and some user statistics, including the user's gender, age, occupation, and zip code. However, deploying cache algorithms in actual environments is not as ideal as in experiments. Users' personal preferences, activity trajectories, and content popularity are usually not available in advance. Therefore, we selected user gender, age, and occupation as user feature indicators to characterize the user information space in order to conduct a simulation experiment that is closer to reality. After comparing and analyzing the cache performance, we also conducted a more detailed comparison of the cache performance of the four commonly used algorithms.
[0153] (1) Data cleaning: Check whether there are missing values, outliers or erroneous values in user information and rating information, and clean them accordingly. After inspection, 70 duplicate samples were found. Considering that duplicate samples may interfere with the preference prediction of this experiment, the duplicate sample data was removed.
[0154] (2) Dataset division: In this example, the data set requested by the user is divided into two parts. One part is 70% of the data used for training; the other part is the remaining 30% of the data used for the final test phase.
[0155] (3) Feature encoding: For the categorical features gender, age, and occupation, one-hot encoding is required to be converted into numerical form.
[0156] (4) Data normalization: When constructing the original scenario space, the data is normalized to ensure that the values of different features have similar ranges, which helps the model converge faster.
[0157] (5) Request delay control: The content request delay of users requesting the local MEC node is controlled within 3 milliseconds, while the content request delay of users requesting the cloud data center through the local MEC node is controlled within 30 milliseconds, and the content request delay of users requesting the adjacent MEC node is controlled within 10 milliseconds.
[0158] This example simulates a multi-edge collaborative caching scenario, including a cloud data center, 5 to 20 MEC nodes, and 6040 users, to evaluate the performance of the ECCF method. The ECCF model is built and trained using Python and the Tensorflow machine learning framework.
Claims
1. Edge collaborative caching method based on federated learning, Features: The method includes a user scenario space division mechanism and a hybrid cache space division mechanism, and includes the following steps; Step S1: divide the user intervals in combination with the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so as to improve the accuracy of content recommendation for users in the classification interval; Step S2: Use a vector quantized variational autoencoder to predict content popularity, improve the accuracy of the system's analysis of usage preferences, and improve the accuracy and pertinence of content caching; Step S3: Using a cache replacement strategy based on federated learning, timely update content resources according to user content requests to improve the hit rate of edge collaborative cache.
2. The edge collaborative caching method based on federated learning according to claim 1, Features: The caching method is based on an edge collaborative caching model that can improve the cache resource allocation efficiency and performance of the MEC server; The edge collaborative caching model system includes N users and M MEC servers. The user is represented by u, u∈{1, 2, ..., N u , ..., U}, The MEC server is represented by e, e∈{1, 2, ..., M e , ..., E}; c is the cache space of MEC server c∈{1, 2, ..., M c , ..., C}; An edge area consists of multiple MEC nodes, and a base station is responsible for covering all MEC nodes in the edge area; each user connects to a MEC node and sends a content access request to the edge server to which it is connected, and then receives a corresponding response operation from the MEC server; if the content already exists on this MEC node, the MEC server will directly send the content to the requesting user; if the requested content is not found on the MEC server, it will need to be retrieved from a neighboring MEC server or retrieved from a remote cloud data service center; Each MEC node iteratively trains the user request matrix, then uploads the local model training parameters to the global model to update the parameters, forms the optimal global model of this round through federation aggregation, and then distributes this global model to each MEC node to predict the cache hit rate; In order to meet the requirement of timely improving the hit rate of content acquisition within a certain time limit, popular hot content with high popularity is cached in advance, and the content popularity index is defined as follows: 0 / 1 variables Used to indicate the content f within the time period t i Whether the request is made by the current MEC server e m To provide; Indicates that within time period t, content f i Cache on the server, for content i The request is made by the current MEC server e m To provide; Indicates the current MEC server e m Content f does not exist i , then the adjacent MEC server M e Or the root server E provides content, j∈{M e , E}; MEC node e m The service rounds are recorded as k times; The MEC server responds to the content request of user u and sends the content to e in time period t. m Server Contents i The request frequency is expressed as Within the time period t, m The frequency of requests for all the content f on the server Content popularity is defined as: In order to measure the difference between the model prediction value and the actual value, the average of the squares of the difference between the model prediction value and the actual value is calculated to evaluate the performance of the model in content popularity prediction. The mean square error of the content popularity global loss function is defined. in is the true value of popularity, is the popularity prediction value, for e m Node model parameters, α k The global model parameter n represents the number of training samples in the MEC node, which is calculated by minimizing the mean square error and is expressed as: In order to evaluate the proportion of requested content that is already in the cache and can be directly provided to the user, the cache hit rate is defined as:
3. The edge collaborative caching method based on federated learning according to claim 2, Features: The hybrid cache space partitioning mechanism determines the size of cache space allocated to interval users by comprehensively considering factors of static partitioning, dynamic partitioning, content perception and user scenario space partitioning, and optimizing the allocation strategy of cache resources; When dividing the user context space, we analyze the user context space from the user end. Assume that the user's gender, age, environment, time, location, device, education, and occupation context information affect their preference for content acquisition. The context of the context information is represented by the context vector δ n =[δ n,1 , δ n,2 , ..., δ n,D ] T ∈[0, 1] D , D is the user scenario space dimension. The system analyzes the user's behavior and needs through the user's characteristics and makes corresponding recommendations or decisions based on the user's characteristics. The edge collaborative caching method based on federated learning divides users with similar user characteristics into the same partition to improve the accuracy of predicting content popularity, and better obtains the potential relationship between interval users and their preferred content through partitioning, reducing the overall computational complexity of the system. The specific method is as follows: First, construct the original scenario space Θ 0 , and normalize it, w = 1, all users belong to the same interval, and then partition the context space, Num(Θ i ) represents Θ i The number of users in the context subspace, when the number of users Num(Θ i ) exceeds the separation threshold, the space is equally divided into two-dimensional user scenario space. The segmentation threshold determines the speed at which the user scenario space is segmented and the number of users in the classification interval. When the threshold is large, the user scenario space is segmented slowly, the number of users is large, and the user preferences cannot be reflected. When the threshold is small, the user scenario space is segmented quickly, the number of users is small, and the overhead of system preference analysis becomes huge. The comprehensive parameter adjustment threshold is set to The threshold parameter γ 1 , γ 2 are all greater than 0, and the user scenario space Θ obtained after division is Θ = {Θ 1 , Θ 2 , ..., Θ s , ..., Θ S }.
4. The edge collaborative caching method based on federated learning according to claim 3, Features: The hybrid cache space partitioning mechanism comprehensively considers the number of users in the user interval in the user scenario space, the concentration of user request content, and the user activity. The cache space of an MEC node is allocated to the users in the user scenario space in a certain proportion according to the hybrid cache space partitioning strategy. Specifically: Set in the user scenario space Θ i In the example, the user's access set capacity is Φ(Θ i ), the user’s access demand is determined by the subspace user access ratio To measure, the effect of e on m The request frequency of all content f on the server is defined as Within the time period t s Users within e m The request frequency of all content f on the server is defined as The user access ratio is: Need to give users context spaceΘ i The access collection capacity set for each user in is: aug(Θ i )=Φ(Θ i ) / Num(Θ i ) The MEC node needs to give the scenario space Θ i The proportion of user-allocated cache space in:
5. The edge collaborative caching method based on federated learning according to claim 2, Features: In step S2, content popularity prediction is performed based on a vector quantization variational autoencoder, and a neural network model VQ-VAE that combines vector quantization and variational autoencoder is used; the VQ-VAE model includes an encoder, a decoder, and a codebook (Codebook: E = [e 1 , e 2 , ..., e k ]), Latent Embedding Space: V = [υ 1 , v 2 , ... l ]); The user's request matrix X = [x 1 , x 2 ..., x n ] T Records the user's use of content f during the time period t i The preference of the request is a binary variable. When the value of the element is 1, it means that the user has successfully requested the relevant content; when the value of the element is 0, it means that the user has failed to request the required content.
6. The edge collaborative caching method based on federated learning according to claim 5, Features: The algorithm flow of VQ-VAE is as follows: Step A1: First, define the latent embedding space, which has K embedding vectors as the queryable codebook, denoted as Codebook: E = [e 1 , e 2 , ..., e k ], k∈[1,K],q(z|x); Step A2: Input the user request content matrix X and use an autoregressive model PixelCNN to learn the prior through the Encoder to obtain N intermediate representations Z e (x), and then use the nearest neighbor search algorithm to query the codebook for the vector z that is most similar to the N intermediate representations; Step A3: Put the similar vector z in the codebook into the corresponding z e (x), we get z q (x) = v l ; Step A4: Decoder obtains the intermediate representation z q (x) Reconstruct the user request content matrix X′. The index of the decoder Input-Vector is: VQ-VAE training loss function L VQ-VAE It consists of three parts: reconstruction loss, codebook loss, and commitment loss. α is a weight hyperparameter that depends on the size of the reconstruction loss. L VQ-VAE The specific formula is as follows: L VQ-VAE =L recon +L codebook +αL commit Reconstruction loss function: L recon =log p (x|z p (x)) Codebook loss: Committed loss: x = sg(x); The first part of the loss function mainly evaluates the performance of the Encoder and Decoder. The codebook query process in the middle is essentially discrete. q Gradient of (x) Assign to z e (x), forming the back-propagation gradient The reconstruction loss can be ignored; the second term is called the codebook loss, which is used to train V = [υ 1 , 2 , ..., υ l ], due to Z e (x) is constant, so the embedding vector υ is promoted l To Z e (x) is close, the third term makes the output more stable, which in turn makes Z e (x) tends to Codebook; Where sg is the gradient Stop operation, it plays an identity role in the forward propagation process, and its derivative is zero, which means that the module where sg is located will not be affected by the gradient Impact of updates.
7. The edge collaborative caching method based on federated learning according to claim 5, Features: The cache replacement strategy based on federated learning in step S3 includes model training and edge collaborative caching strategy. The preferred content of the interval users is counted by the interval users and the size of the interval users' cache space. The preferred content of all interval users under the MEC node is added up for deduplication. Each node is divided into intervals for cache replacement, and the content that should be cached by each MEC node is obtained. The content cached by each interval user of each MEC node is also obtained, which improves the performance and efficiency of the edge cache system.
8. The edge collaborative caching method based on federated learning according to claim 7, Features: The specific steps of the edge collaborative caching strategy are as follows: Step B1: At the beginning of training, the number of rounds of model updates between the cloud service center and each device participating in the training is k, k∈[1, K]. In each round of federated learning training, first, all devices will participate in the training process of the local content model; then, these updated information will be transmitted to the remote server and summarized there to adjust and update the parameters of the global model accordingly. Finally, the above steps are iterated and repeated. When the content popularity model α is satisfied, k When the hit rate reaches the threshold, the model is considered to have converged and the iteration is stopped; Step B2: Update and train the local model parameters. Take the content popularity prediction model and the user request record set as input data, complete the model learning and optimization process in the local node, and after the training is completed, synchronize the model parameter update to the cloud master server. Among the model parameters, the number of training epochs is represented by E, the training batch is represented by B, and the learning rate is represented by η, which are three hyperparameters. Step B3, determine the node cache replacement strategy; first, obtain the user scenario space Θ, and consider the content popularity factor, because content popularity is an important basis for cache content replacement. Therefore, the vector quantization variational autoencoder proposed above is used to determine the priority and predict the sorting of content popularity, and include it in the temporary cache Cache temp ; Assume that the closer the user information intervals are, the greater the overlap of user preference content is, and there is a cache redundancy problem. For this, a cache priority replacement strategy is adopted to select the m content that the user is most interested in in the current interval from the preset cache list and then replace Θ s Cache list s ; When all interval users complete the cache update, aggregate the cache list Θ s And update the available cache space size of the MEC node, and iterate continuously until the cache space is fully allocated.
9. The edge collaborative caching method based on federated learning according to claim 8, Features: The method for determining the cache hit rate of the edge collaborative caching strategy is as follows: after each federation aggregation is completed, each MEC node receives the global VQ-VAE model sent by the cloud service center, and all nodes test the collaborative cache hit rate according to the test set and average the cache hit rates of N MEC nodes.
10. The edge collaborative caching method based on federated learning according to claim 8, Features: The use of the caching method comprises the following steps: Step C1: Based on the user scenario space division and the hybrid cache space division mechanism, user interval division is performed in combination with the user feature matrix to obtain the cache space size of each user interval of a specific MEC node, so that users can obtain more accurate content recommendations in the classification interval. Step C2: Based on the user's historical requests, the MCCF method uses VQ-VAE to learn a latent embedding space consisting of a set of discrete vectors, and then the decoder uses the nearest neighbor algorithm to find the discrete latent vectors used to generate the user request matrix. In this way, the system can be helped to more accurately analyze user preferences, thereby achieving more accurate and targeted content caching. Step C3, the MCCF method uses federated deep learning to aggregate the local models of each MEC node based on the user request data stored in the MEC node to generate a global shared model to minimize the global loss. Step C4, the MCCF method is based on a redesigned active cache replacement strategy to better adapt to the optimized cache resource configuration, thereby improving the cache hit rate.
Citation Information
Patent Citations
Multi-edge collaborative caching method based on federal deep learning
CN117202263A
Communication compression method based on model weight distribution in federated learning
US11468370B1
Cited By
Content caching and replacing method and system based on context awareness
CN120354972A
