A content collaborative caching method and system based on digital twinning
By leveraging global collaborative caching decisions and content popularity predictions within the digital twin layer, combined with device priority, and optimizing edge network resource allocation, the problems of low cache hit rate and high latency in the Industrial Internet of Things (IIoT) are resolved, achieving efficient response and globally optimal caching for critical equipment.
Patent Information
- Application Number
- CN202611117920.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-02-14
- Filing Date
- 2026-07-27
- Publication Date
- 2026-11-27
AI Technical Summary
In the context of the Industrial Internet of Things (IIoT), existing technologies struggle to achieve seamless collaboration between mobile terminals, edge nodes, and the cloud, resulting in low cache hit rates and high latency. Furthermore, traditional popularity prediction mechanisms neglect device priority, failing to meet the real-time requirements of critical tasks.
A content collaborative caching method based on digital twins is adopted. Through global collaborative caching decision-making of the digital twin layer, combined with content popularity prediction and device priority, potential features are extracted using the AE model to construct a globally optimal caching strategy model, and it is trained through a multi-agent collaborative mechanism to optimize edge network resource allocation.
It significantly improved cache hit rate, reduced content retrieval latency, enhanced overall system service quality and revenue, solved the problem of low edge resource utilization, and achieved priority response of critical devices and global optimal caching decision-making.
Smart Images

Figure CN123185609A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial Internet of Things (IoT) technology, and in particular to a content collaborative caching method and system based on digital twins. Background Technology
[0002] In the Industrial Internet of Things (IIoT) scenario, terminal devices typically need to retrieve large amounts of instructions or business data from the cloud to maintain normal production operations. However, traditional cloud-based data retrieval models are limited by long-distance transmission, often accompanied by high backhaul latency. In recent years, edge caching technology has been widely used. By pre-storing the content required by the terminal on edge nodes, the data transmission path can be effectively shortened, improving system response efficiency. However, due to the limited caching resources of edge nodes, it is difficult to support the distributed storage of all content. Furthermore, the high mobility and dynamic content requests of mobile devices in industrial scenarios make it difficult for static caching strategies to maintain a high hit rate, ultimately requiring requests to the cloud and generating additional latency. Although collaborative caching technology expands the ways terminals retrieve content through cloud, edge, and terminal resource sharing and collaborative scheduling, the additional communication overhead and transmission latency generated during cross-node collaboration remain bottlenecks restricting system real-time performance. Therefore, how to design an efficient caching strategy to achieve seamless collaboration between mobile terminals, edge nodes, and the cloud has become an urgent problem to be solved.
[0003] Content popularity prediction provides key insights for optimizing collaborative caching. By analyzing differentiated request preferences on device sides and capturing demand trends, it's possible to rationally allocate limited cache resources. This not only significantly reduces the overhead of long-distance transmission but also effectively improves edge cache hit rate and reduces content retrieval latency. However, existing technologies often focus on caching globally frequently requested popular content. While this meets most general needs, in the IIoT vertical domain, the operation of all mobile terminals serves the overall factory's efficiency improvement and cost control. Due to differences in production processes, devices exhibit significant priority differences: high-priority devices have stricter real-time requirements for task processing and need to acquire the required content first. Since there is no positive correlation between device priority and content popularity, relying solely on traditional popularity prediction mechanisms often overlooks the specific needs of critical tasks. Therefore, when making edge caching decisions, it's crucial to consider not only content popularity but also device priority. Device priority should be incorporated as a constraint or key factor into the training and decision-making models of collaborative caching to ensure that resources required for core business operations receive priority response and protection.
[0004] Furthermore, existing collaborative caching strategies based on multi-agent reinforcement learning are mostly executed directly in the physical environment. Edge nodes are limited by their perception range and can only train strategies based on local information, resulting in slow model convergence and difficulty in reaching the global optimum. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a content collaborative caching method and system based on digital twins. By organically combining content popularity prediction based on digital twins with global collaborative caching decision-making, the cache hit rate and system benefits are improved, and the efficient operation of the content collaborative caching system in the industrial Internet of Things scenario is realized.
[0006] Technical Solution: A content collaborative caching system based on digital twins includes terminal devices deployed at the terminal layer, edge servers deployed at the edge layer, and a digital twin layer. The terminal devices send real-time content requests and related operational data to the edge servers and receive specific content from the edge servers based on the requests. Upon receiving the requests from the terminal devices, the edge servers perform two actions: first, they obtain the corresponding optimal caching strategy through a locally deployed strategy model; second, they continue to upload data to the digital twin layer. Simultaneously, the edge servers receive a globally optimal caching strategy model from the digital twin layer. After receiving various types of data from the edge servers, the digital twin layer updates and maintains the global digital twin model, extracts latent features using the AE model to obtain predicted content, and inputs the predicted content as prior knowledge into a virtual agent to train the strategy model, thereby obtaining the globally optimal caching strategy model.
[0007] Furthermore, it also includes:
[0008] The data collection module, deployed at the terminal layer, senses and collects various operational data and content request data during the device's operation through a gateway installed on the mobile device.
[0009] The priority module, deployed at the terminal layer, divides mobile devices into multiple priority levels according to preset rules and ensures that each device has a fixed priority attribute.
[0010] The edge data module, deployed at the edge layer, receives basic device data and content request information from the data collection module, forwards the basic device data and content request information to the content popularity prediction module of the digital twin layer for predictive analysis, and forwards the basic device data and content request information to the global collaborative cache training module for training to obtain the global optimal cache strategy model.
[0011] The cost design module, deployed at the edge layer, builds an edge base station content delivery cost model and a priority-based total system cost model, and expresses the system optimization objectives in a formulaic way.
[0012] Markov Decision Design Module: Deployed at the edge layer, it models the agent's cache replacement process as a Markov decision process, defines the agent's state space and action space, and designs a reward function based on a formulaic optimization objective to guide the agent's training direction;
[0013] The content caching module, deployed at the edge layer, receives the globally optimal caching strategy model obtained by the global collaborative caching training module, obtains the optimal caching strategy based on Markov decision design and state data, and performs caching operations on the corresponding content.
[0014] The content popularity prediction module is deployed in the digital twin layer. It uses the AE model to build a content popularity evaluation matrix based on the device's historical request information, and selects high-evaluation content as predicted popular content. The predicted popular content is used as prior knowledge and input into the global collaborative cache training module. At the same time, the predicted popular content is distributed to the edge layer in the first round.
[0015] The global collaborative caching training module is deployed in the digital twin layer. It trains the global collaborative caching strategy model based on the content popularity prediction results and the received global information. During the training process, each agent cooperates by observing each other's states, and finally obtains the global optimal caching strategy model.
[0016] A content collaborative caching method based on digital twins is applied to any of the aforementioned content collaborative caching systems based on digital twins. By organically combining content popularity prediction based on digital twins with global collaborative caching decisions, a globally optimal caching strategy is obtained. The specific steps are as follows:
[0017] S1, each mobile device sends its location, remaining power, and content caching requests to the edge base stations under its coverage area;
[0018] S2, after receiving data sent by the mobile device, the edge base station uploads the data to the digital twin layer; the digital twin layer establishes a digital twin corresponding to each edge base station and mobile device, and aggregates the node information uploaded by different edge base stations to form global virtual data for collaborative caching decision-making by each base station;
[0019] S3, the edge base station designs the total system cost model according to priority, formulates the optimization objective, and establishes the system problem formula;
[0020] S4. Based on the total cost model and the system problem formula, design a Markov decision process;
[0021] S5, the digital twin layer monitors the system's operating status in the r-th round, predicts the content request preferences of mobile devices, and uses the prediction results as prior information for global collaborative caching training in the current round. At the same time, the prediction results are sent to the edge base station for content pre-caching in the first round.
[0022] S6. Based on the given problem and Markov decision process, a global collaborative caching strategy model based on the Actor-Critic network architecture is constructed. The discretized DDPG algorithm is used to train the global collaborative caching strategy model in the digital twin layer to obtain the optimal global collaborative caching strategy model.
[0023] S7, the Actor network model in the obtained optimal global collaborative caching strategy model is sent to the edge layer as the global optimal caching strategy model;
[0024] S8 defines a global collaborative caching strategy update cycle as the process by which the digital twin layer acquires current global operating information, predicts the content request preferences of mobile devices, conducts global collaborative caching training, and forms and distributes the updated global optimal caching strategy model. The r-th strategy update cycle is denoted as the r-th round. Each strategy update cycle includes one prediction of content request preferences and multiple training rounds for training the global collaborative caching strategy model. When the global collaborative caching strategy model converges or the number of training rounds reaches a preset maximum value, the training in the current strategy update cycle ends.
[0025] S9. Pre-set the change conditions for the policy update cycle according to the actual application scenario, business load and system performance requirements. When the conditions are met, start the r+1 round of policy update cycle and repeat steps S5-S7.
[0026] Furthermore, the specific steps for designing the total system cost model for edge base stations based on priorities include:
[0027] S31, Design the overall system model. Mobile devices send content requests to the local base station, and there are three ways to provide content. If the local base station stores the content, it transmits it directly; if a neighboring base station stores the content, it transmits it to the local base station; if neither the local base station nor a neighboring base station stores the content, the cloud transmits it to the local base station.
[0028] S32, after the mobile device sends a content request to the base station, the content transmission cost for the base station to fulfill the request is calculated as follows:
[0029] If the local base station to which the mobile device is connected has cached the content in advance, the content will be transmitted directly through the wireless link. The transmission cost is denoted as the first transmission cost. , is represented as:
[0030] ,
[0031] in, This represents the unit cost of transmitting content using a wireless link. Content Data size, This indicates the wireless link transmission rate between the base station and the mobile device;
[0032] If the local base station connected to the mobile device cannot provide content. However, if a neighboring base station caches this content, it is transmitted to the local base station via fiber optic cable, and then distributed via wireless link. This method of content delivery... The transmission cost is denoted as the second transmission cost. , is represented as:
[0033] ,
[0034] in, This represents the unit cost of transmitting content using a wireless link. This indicates the wired link transmission rate between the local base station and its neighboring base stations.
[0035] If content If the content is neither cached at the local base station nor at a neighboring base station, the local base station needs to request the content from the cloud and transmit it to the corresponding mobile device. This method of content... The transmission cost is denoted as the third transmission cost. , is represented as:
[0036] ,
[0037] in, This indicates the wired link transmission rate between the local base station and the cloud;
[0038] Finally, the total content transmission cost per base station Represented as:
[0039] ,
[0040] in, This represents the set of devices within the coverage area of the base station. A collection representing content. Indicates whether device u requests this content from the base station. ; , respectively, indicate that the content request of device u is provided by the local base station, neighboring base stations, and the cloud, and the selection of the service method satisfies the constraints. ;
[0041] S33, design a priority-based service cost model, including:
[0042] S331 divides all mobile devices into 8 levels according to their priority. Indicates the priority of device u;
[0043] S332, designing the priority index for a single base station. for:
[0044] ,
[0045] in, This represents the cache hit rate of device u at this base station. This represents the total number of mobile devices under a single base station. Indicates the highest priority; The larger the value, the more priorities the strategy considers; conversely, the smaller the value, the fewer priorities it considers.
[0046] S333, Calculate the total system cost for:
[0047] ;
[0048] S34, Design the revenue model, including:
[0049] Calculate the waiting time for the mobile device to receive content after sending a request. Represented as:
[0050] ;
[0051] The revenue from base station design is inversely proportional to the content transmission latency; the revenue function... Represented as:
[0052] ,
[0053] in, Indicates the attenuation factor. Content Value;
[0054] Define an index to determine whether a cached request is satisfied within a specified time. for:
[0055] ,
[0056] in, This is the time limit for waiting for content requests; once the content is successfully transmitted, the index... If it fails, then index ;
[0057] Calculate the revenue of the base station , is represented as:
[0058] ;
[0059] S35, by maximizing the total revenue of a single base station Find the optimal caching strategy The optimization problem can then be expressed as:
[0060] ,
[0061] in, It is the total bandwidth of the base station. It is the bandwidth currently allocated to mobile device u by the edge base station. It is the total bandwidth of the base station. Indicates whether the base station caches content. For example, "yes" takes a value of 1, and "no" takes a value of 0; Represents a single content Size, This refers to the base station's cache capacity; constraint C1 represents the base station's total bandwidth limit; constraint C2 indicates that the base station needs to consider storage capacity limitations when caching content; and constraint C3 defines that the content requested by the mobile terminal can only be retrieved in one place.
[0062] Furthermore, each edge base station is modeled as an intelligent agent, and the Markov decision process is defined as follows:
[0063] Define the state of each base station as ,in This indicates the local cache status of the base station. The state space represents the received content request status. for: ,and , Indicates the total number of base stations;
[0064] Define the action in each base station as ,in For base station caching actions, Indicates the caching service method; then the action. for: ;
[0065] Define the reward function for each base station. The mathematical expression is: Then reward for: .
[0066] Furthermore, the digital twin layer predicts the content request preferences of mobile devices and stores the predicted content in the training data of a global collaborative cache, specifically including:
[0067] S51, Design the backtracking time window for the r-th round. The system predicts future content demand based on data within the digital twin of the window, and the window size is adaptively adjusted based on the cache hit rate.
[0068] S52, in the backtracking time window Within, popular content is predicted based on historical request information from each mobile device;
[0069] S53 uses the predicted popular content as prior information for the current round of global collaborative caching training and as pre-cached content sent to the edge base station in the first round.
[0070] Furthermore, the backtracking time window for the r-th round is obtained. The steps include:
[0071] S511, Design the backtracking time ratio coefficient for the r-th round. :
[0072] ,
[0073] in, , These represent the lower and upper bounds of the proportionality coefficient, respectively. Let represent the cache hit rate in round r-1, and ;
[0074] S512, based on the backtracking time scaling factor Design the final backtracking time window for:
[0075] ,
[0076] in, This indicates the current moment, which is the moment when round (r-1) ends and round r is about to begin; This represents the total duration of the actual training in the (r-1)th round.
[0077] Furthermore, the specific steps for predicting popular content based on historical request information from each mobile device include:
[0078] S521, determine whether a certain request time is within the backtracking time window. If the request time... satisfy:
[0079] ,
[0080] This indicates that the request occurred during the last segment of the previous round, and is a high-value recent feature, which should be retained and input into the AE model.
[0081] S522, the AE model deployed in the digital twin layer extracts historical request information of each mobile device within the jurisdiction of each base station within the retrospective time window, and constructs a content popularity evaluation matrix for each device. ;in The first dimension is the identity characteristics of the mobile device, and the second dimension is the evaluation level of the content by the mobile device.
[0082] S523 sorts the content of mobile devices under each base station from high to low according to their level, and selects the top N content with the highest evaluation level as the predicted popular content, where the size of N is determined by the cache capacity of the base station.
[0083] Furthermore, the specific steps to obtain the global collaborative caching strategy model are as follows:
[0084] S61, the digital twin layer receives the predicted content from the content popularity prediction module and pre-stores the predicted content as prior knowledge in the cache space of the corresponding base station twin to initialize the local cache state of each base station agent.
[0085] S62, the digital twin layer, based on stored node information and predicted content, constructs a global collaborative caching strategy model based on the Actor-Critic network architecture according to the defined Markov decision process, and uses the discretized DDPG algorithm to train the global collaborative caching on the Actor network and Critic network to obtain the optimal global collaborative caching strategy model.
[0086] Compared with the prior art, the significant advantages of this invention are as follows:
[0087] 1. This invention proposes a content collaborative caching system based on digital twins. This system can design an efficient content collaborative caching strategy according to the dynamic content request characteristics of mobile terminals. Through global scheduling of the digital twin layer, it can make full use of the computing and storage resources of edge nodes, significantly reduce the latency and transmission cost of mobile terminals to obtain content, effectively improve the overall service quality and revenue of the system, and solve the problems of low edge resource utilization and difficulty in coping with dynamic requests in the prior art.
[0088] 2. This invention proposes a dynamic content preference prediction algorithm, which designs an adaptive backtracking time window mechanism that can dynamically adjust the window size based on the feedback of cache hit rate. It also combines the inherent logic of extracting historical request data of terminals within the window with the AE model to predict popular content with high request frequency and many preferences, which significantly improves the accuracy of content prediction and the effectiveness of caching strategy.
[0089] 3. This invention proposes a priority-based content cost model and problem formula design method. It addresses the problem that traditional popularity prediction mechanisms may neglect device priority due to excessive focus on content activity in industrial IoT scenarios. It pre-sets priority rules for different devices and calculates the priority index of base stations, incorporating priority weights into system cost considerations. This maximizes system benefits while maximizing the base station priority index, effectively solving the defect of existing technologies that tend to prioritize high-popularity content while neglecting the priority of key devices, and achieving a key balance between content activity and device priority.
[0090] 4. The content collaborative caching method proposed in this invention constructs a real-time interactive digital twin layer based on multi-dimensional data from terminals and the edge, realizing real-time sharing of virtual data between different base stations and updating and maintaining the digital twin model; it enhances the perception of global information, improves the reliability of system state synchronization, increases the accuracy of the global digital twin model, and ensures the global optimality of caching decisions. Attached Figure Description
[0091] Figure 1 This is the overall architecture diagram of the content collaborative caching system based on digital twins of this invention;
[0092] Figure 2 This is a detailed framework diagram of the content collaborative caching system based on digital twins according to the present invention;
[0093] Figure 3 This is a flowchart of the content collaborative caching method based on digital twins according to the present invention;
[0094] Figure 4 This is a diagram of the Actor-Critic network architecture based on the discretized DDPG algorithm of this invention;
[0095] Figure 5 This is a comparison chart of the changes in system cache hit rate before and after the introduction of the dynamic content preference prediction mechanism in this embodiment of the invention;
[0096] Figure 6 This is a comparison chart of the changes in system revenue before and after the introduction of the dynamic content preference prediction mechanism in this embodiment of the invention;
[0097] Figure 7 This is a comparison chart of the changes in system cache hit rate before and after the introduction of the digital twin mechanism in this embodiment of the invention;
[0098] Figure 8 This is a comparison chart of the changes in system revenue before and after the introduction of the digital twin mechanism in this embodiment of the invention. Detailed Implementation
[0099] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0100] Digital twins, acting as a link between physical entities and virtual space, can construct real-time mappings of physical entities in virtual space through perception and high-fidelity modeling technologies, thereby enabling predictive analysis and decision optimization. By constructing a global digital twin layer and training multiple agents based on it, agents can acquire global perception information for simulation and policy evolution, significantly improving the effectiveness of training and the accuracy of decision-making.
[0101] In a content collaborative caching solution based on digital twins, the comprehensive integration of technologies such as content prediction and digital twins, along with consideration of device priority design, is of great significance for optimizing edge network resource allocation, improving system training efficiency, and ensuring the quality of service (QoS) in industrial scenarios.
[0102] This embodiment addresses the caching challenge of mobile devices in Industrial Internet of Things (IIoT) scenarios by introducing a dynamic content prediction mechanism based on digital twins and a global collaborative caching decision-making method. Specifically, at the digital twin layer, an autoencoder (AE model) is used to mine data features of mobile devices within an adaptive backtracking time window, constructing a content popularity evaluation matrix to accurately identify popular content. The AE model includes an encoding layer and a decoding layer. The encoding layer maps the historical request feature vector corresponding to the content to low-dimensional latent features, and the decoding layer reconstructs the predicted popularity vector corresponding to the content based on the low-dimensional latent features. The input dimension of the historical request feature vector corresponds to the content, and each element in the predicted popularity vector represents the predicted evaluation value or popularity score of the corresponding content. In the edge base station (edge layer) where edge servers are deployed, a Markov decision process and a priority-based cost modeling method are designed for global collaborative caching training of the digital twin layer. Based on prior predicted content, the digital twin layer uses a multi-agent collaborative mechanism to find the globally optimal caching strategy model. The introduction of the digital twin layer successfully transforms the local observation information of multiple agents into global state information, significantly improving the accuracy of strategy training. The content popularity prediction design is as follows: After the edge server aggregates mobile device data, it sends it to the digital twin layer. The digital twin layer then uses an AE model to construct a content evaluation matrix for devices within the base station's coverage area, selecting high-scoring content as predicted popular content. The priority-based problem-solving formula design is as follows: Mobile devices within the base station's coverage area are divided into eight priority levels based on importance. The higher the device's priority, the greater the response weight for its content requests. A priority index is also defined and incorporated into the system's total cost constraint model. The Markov decision design is as follows: Each edge base station is modeled as an intelligent agent, and its internal cache is replaced with a triplet-based system. The Markov decision process described Representing the state space, Indicates an action, This represents a reward. The global collaborative caching decision design is embodied in: global collaborative training based on the full data of the digital twin layer, enabling each agent to overcome the limitations of the local environment and collaboratively explore the optimal strategy in the global state space. Through the organic combination of content popularity prediction and global collaborative caching decision-making, the efficient operation of the content collaborative caching system in the industrial IoT scenario is effectively guaranteed.
[0103] like Figure 1 The diagram shows the overall architecture of the content collaborative caching system based on digital twins according to the present invention. This architecture includes a terminal device, an edge server, and a digital twin layer. The terminal device sends real-time content requests and related operational data to the edge server and receives specific content from the edge server based on the requests. After receiving the requests from the terminal device, the edge server performs two functions: first, it obtains the corresponding optimal caching strategy through its locally deployed strategy model; second, it continues to upload data to the digital twin layer (including various types of data from the edge server's runtime, used to construct a global digital twin model). Furthermore, the edge server receives the globally optimal caching strategy model from the digital twin layer. After receiving the various types of data from the edge server, the digital twin layer updates and maintains the global digital twin model, and uses an AE model (Auto-Encoder) to extract latent features to obtain predicted content. This predicted content is then used as prior knowledge input to the virtual agent for training, resulting in the globally optimal caching strategy model. Simultaneously, the predicted popular content is distributed to the edge layer in the first round.
[0104] like Figure 2 The diagram shown is a specific framework diagram of the content collaborative caching system based on digital twins of the present invention. The system includes:
[0105] The data collection module is configured to be deployed at the terminal layer and, through a gateway installed on the mobile device, sense and collect various operational data and content request data during the device's operation.
[0106] The priority module is configured to be deployed at the terminal layer, divide mobile devices into 8 priority levels according to preset rules, and ensure that each device has a fixed priority attribute.
[0107] The edge data module is configured to: be deployed at the edge layer, receive device basic data and content request information from the terminal layer data collection module, forward the device basic data and content request information to the content popularity prediction module of the digital twin layer for predictive analysis, and forward the device basic data and content request information to the global collaborative cache training module for training to obtain the global optimal cache strategy model;
[0108] The cost design module is configured to be deployed at the edge layer to build an edge base station content delivery cost model and a priority-based total system cost model, and to express the system optimization objectives in a formulaic way.
[0109] Markov Decision Design Module: Deployed at the edge layer, it models the agent's cache replacement process as a Markov decision process, defines the agent's state space and action space, and designs a reward function based on a formulaic optimization objective to guide the agent's training direction;
[0110] The content caching module is configured to: be deployed at the edge layer, receive the optimal caching strategy model obtained by the global collaborative caching training module, obtain the optimal caching strategy based on Markov decision design and state data, and perform caching operations on the corresponding content;
[0111] The content popularity prediction module is configured to: be deployed in the digital twin layer, use the AE model to construct a content popularity evaluation matrix based on the device's historical request information, select high-evaluation content as predicted popular content, input the predicted popular content as prior knowledge into the global collaborative cache training module, and simultaneously distribute the predicted popular content to the edge layer in the first round.
[0112] The global collaborative caching training module is configured to be deployed in the digital twin layer and train a global collaborative caching strategy model based on the content popularity prediction results and the received global information. In this process, each agent achieves collaboration by observing each other's states, and finally obtains the global optimal caching strategy model.
[0113] like Figure 3 The diagram shows the flowchart of the content collaborative caching method based on digital twins according to the present invention. The present invention aims to improve cache hit rate and system benefits by organically combining content popularity prediction based on digital twins with global collaborative caching decision-making, thereby achieving efficient operation of the content collaborative caching system in the industrial Internet of Things scenario. The specific steps are as follows:
[0114] Step 1: Each mobile device sends data such as location and remaining energy, as well as content caching requests, to the edge base stations under its coverage area.
[0115] Step 2: Each edge base station receives data sent by mobile devices within its coverage area and uploads the data to the digital twin layer; the digital twin layer establishes a digital twin corresponding to each edge base station and mobile device, aggregates node information uploaded by different edge base stations, and forms global virtual data for collaborative caching decision-making by each base station.
[0116] Step 3: The edge base station designs the total system cost model according to priority, formulates the optimization objective, and establishes the system problem formula.
[0117] Step 31: Design the overall system model. Mobile devices send content requests to the local base station, and there are three ways to provide content. These are: the local base station stores the content and transmits it directly; the neighboring base station stores the content and transmits it to the local base station; neither the local base station nor the neighboring base station stores the content, and the cloud transmits it to the local base station.
[0118] Step 32: Calculate the content transmission cost for the base station to fulfill the content request after the mobile device sends the content request to the base station;
[0119] If the local base station to which the mobile device is connected has pre-cached the content, it can be transmitted directly via the wireless link. The transmission cost is denoted as the first transmission cost. , is represented as:
[0120] ,
[0121] in, This represents the unit cost of transmitting content using a wireless link. Content Data size, This indicates the wireless link transmission rate between the base station and the mobile device;
[0122] If the local base station connected to the mobile device cannot provide content. However, if a neighboring base station has cached this content, it can be transmitted to the local base station via fiber optic cable and then distributed via wireless link. In this case, the content obtained through this method... The transmission cost is denoted as the second transmission cost. , is represented as:
[0123] ,
[0124] in, This represents the unit cost of transmitting content using a wireless link. This indicates the wired link transmission rate between the local base station and its neighboring base stations.
[0125] If content If the content is neither cached at the local base station nor at a neighboring base station, the local base station needs to request the content from the cloud and transmit it to the corresponding mobile device. This method of content delivery... The transmission cost is denoted as the third transmission cost. , is represented as:
[0126] ,
[0127] in, This indicates the wired link transmission rate between the local base station and the cloud;
[0128] Finally, the total content transmission cost per base station Represented as
[0129] ,
[0130] in, This represents the set of devices within the coverage area of the base station. A collection representing content. Indicates whether device u requests this content from the base station. ; , respectively, indicate that the content request of device u is provided by the local base station, neighboring base stations, and the cloud, and the selection of the service method satisfies the constraints. .
[0131] Step 33: Design a priority-based service cost model.
[0132] Step 331: Divide all mobile devices into 8 priority levels according to their importance, using... Indicates the priority of device u;
[0133] Step 332: Design the priority index for a single base station for:
[0134] ,
[0135] in, This represents the cache hit rate of device u at this base station. This represents the total number of mobile devices under a single base station. This indicates the highest priority, which is 8 in this embodiment; The larger the value, the more priorities the strategy considers; conversely, the smaller the value, the fewer priorities it considers.
[0136] Step 333: Calculate the total system cost for:
[0137] ;
[0138] Step 34: Design the revenue model;
[0139] Calculate the waiting time for the mobile device to receive content after sending a request. Represented as:
[0140] ;
[0141] The revenue from base station design is inversely proportional to the content transmission latency; the revenue function... Represented as:
[0142] ,
[0143] in, Indicates the attenuation factor. Content Value;
[0144] Define an index to determine whether a cached request is satisfied within a specified time. for:
[0145] ,
[0146] in, This is the time limit for waiting for content requests; once the content is successfully transmitted, the index... If it fails, then index ;
[0147] Calculate the revenue of the base station , is represented as:
[0148] ;
[0149] Step 35: Establish the system problem formula and find the optimal caching strategy by maximizing the total revenue of a single base station. The optimization problem can then be expressed as:
[0150] ,
[0151] in, This represents the total revenue of a single base station; It is the bandwidth currently allocated to mobile device u by the edge base station. This is the total bandwidth of the base station; Indicates whether the base station caches content. For example, "yes" takes a value of 1, and "no" takes a value of 0; Represents a single content Size, This represents the base station's cache capacity. Constraint C1 indicates the base station's total bandwidth limit, constraint C2 indicates that the base station needs to consider storage capacity limitations when caching content, and constraint C3 defines that the content requested by the mobile terminal can only be retrieved in one place.
[0152] Step 4: Based on the total cost model and the system problem formula, design a Markov decision process; the details are as follows:
[0153] Each edge base station is modeled as an intelligent agent, and the state of each base station is defined as follows: ,in This indicates the local cache status of the base station. The state space represents the received content request status. : ,and , This indicates the total number of base stations.
[0154] Define the action in each base station as ,in For base station caching actions, Indicates the caching service method; action : ,and .
[0155] Since the reward function is directly related to the difference between system revenue and cost, a reward function is defined for each base station. The mathematical expression is: Then there is a defined reward. : ,and .
[0156] Step 5: The digital twin layer monitors the operating status of the system, predicts the content request preferences of mobile devices, and uses the prediction results as prior information for the current round of global collaborative caching training. At the same time, the prediction results are sent to the edge base station for content pre-caching in the first round.
[0157] Step 51: Design the backtracking time window for the r-th round The system predicts future content demand based on data within the digital twin of the window, and the window size is adaptively adjusted based on the cache hit rate.
[0158] Step 511: Design the backtracking time ratio coefficient for the r-th round:
[0159] ,
[0160] in, and These represent the lower and upper bounds of the proportionality coefficient, respectively. from This indicates that the backtracking time window lasts for a maximum of the entire duration of the previous training round, or 0.2 times the last training time. Let represent the cache hit rate in round r-1, and , The initial value is 0.2;
[0161] Step 512: Design the final backtracking time window based on the backtracking time ratio coefficient. for:
[0162] ,
[0163] in, This indicates the current moment, that is, the moment when round (r-1) ends and round r is about to begin. This represents the total duration of the actual training in the (r-1)th round.
[0164] Step 52: In the backtracking time window Within, popular content is predicted based on historical request information from each mobile device;
[0165] Step 521: Determine if a request time is within the backtracking time window. If the request time... satisfy:
[0166] ,
[0167] This indicates that the request occurred during the last segment of the previous round, and is a high-value recent feature, which should be retained and input into the AE model.
[0168] Step 522: The AE model deployed in the digital twin layer extracts the historical request information of each mobile device within the jurisdiction of each base station within the retrospective time window, and constructs a content popularity evaluation matrix for each device. ,in The first dimension is the identity characteristics of the mobile device, and the second dimension is the evaluation level of the content by the mobile device.
[0169] Step 523: Sort the content of mobile devices under each base station in descending order of rating, and select the top N content items with the highest rating as predicted popular content. The value of N is determined by the base station's cache capacity.
[0170] Step 53: The popular content predicted in Step 52 is used as prior knowledge input into the global collaborative caching training data. Simultaneously, it is distributed to the edge layer in the first round for pre-caching by edge base stations to avoid user waiting due to an empty cache before the global optimal caching strategy model is deployed. From the second round onwards, the predicted popular content is only used as prior knowledge for updating the global collaborative caching strategy model and is no longer distributed to the edge layer.
[0171] Step 6: Based on the given problem and Markov decision process, construct a global collaborative caching strategy model; in the digital twin layer, combine content popularity prediction and received global information to train the global collaborative caching strategy model using the discretized DDPG algorithm to obtain the optimal global collaborative caching strategy model.
[0172] Step 61: The digital twin layer receives the predicted content from the content popularity prediction module and pre-places the predicted content as prior knowledge in the cache space of the corresponding base station twin to initialize the local cache state of each base station agent. This avoids the global collaborative cache training from starting from an empty cache state, thereby improving the cache hit rate in the early stage of training and accelerating the convergence of the global collaborative cache strategy model.
[0173] Step 62: Based on the stored node information and predicted content, the digital twin layer constructs a global collaborative caching strategy model based on the Actor-Critic network architecture according to the defined Markov decision process, and uses the discretized DDPG algorithm to train the Actor network and Critic network for global collaborative caching to obtain the optimal global collaborative caching strategy model; the Actor network and Critic network are respectively constructed using a deep neural network (DNN) structure.
[0174] During training, the digital twin layer acquires the local cache state and content request state of each base station agent based on the global state space. The Actor network outputs corresponding action results based on the state information. These action results are discretized and mapped to form specific caching strategies, including base station caching actions and caching service methods. The Critic network evaluates the expected reward of the corresponding state-action pair based on the state information and action results. Furthermore, the Actor and Critic networks continuously interact with the environment to obtain reward feedback, thereby continuously optimizing their parameters. Figure 4 The diagram shown is an Actor-Critic network architecture based on the discretized DDPG algorithm of this invention.
[0175] It should be noted that the digital twin layer maintains global environmental information, rather than the local perception information of a single base station. Therefore, it can conduct collaborative caching training in a global state space, reducing redundant caching between different base stations and improving cache hit rate and collaborative service capabilities. After global collaborative caching training, the trained Actor network is used as the globally optimal caching strategy model, and this model is distributed to the base station agents of each edge server in the edge layer. Each base station agent inputs its current state information into the globally optimal caching strategy model to obtain the corresponding caching action and caching service mode, thereby executing the global collaborative caching strategy.
[0176] Step 621: Construct a global collaborative caching strategy model. The global collaborative caching strategy model includes an Actor network for formulating caching strategies and a Critic network for value estimation. Both the Actor network and the Critic network are constructed using a Deep Neural Network (DNN) structure.
[0177] The input parameters of the Actor network are the first... The status of each base station agent , Indicates the local cache status. The content request status is represented by the Actor network's output parameters, which include candidate caching actions and candidate caching service methods. The Critic network's input parameters are state-action pairs consisting of the aforementioned status and actions, and its output parameter is the Q-value of the corresponding state-action pair. The Q-value is used to evaluate the expected cumulative reward of the current caching strategy and guide the Actor network parameter updates.
[0178] However, the DDPG algorithm is typically applicable to continuous action spaces, while the base station buffer action in this invention... and caching service methods All of these involve discrete decision-making, and cannot be directly cached using continuous actions as the final strategy. Therefore, this invention introduces a discretized action mapping mechanism, enabling the Actor network to perform actions in a discrete manner. Given input, output a probability vector of a series of consecutive actions. :
[0179] ,
[0180] in, Indicates the first The probabilistic Actor policy function for each agent. Indicates the first The current Actor network parameters for each agent, including the weight parameters and bias parameters of each layer; Indicates the state Next choice The probability of a discrete action. . Indicates the number of candidate items; action vectors contain Each action component corresponds one-to-one with the candidate content, the first... The action component is used to represent the action component of the first action. Caching decisions for each candidate content.
[0181] Then through the sampling function Sampling is performed based on a probability distribution to obtain the discrete actions actually executed. for:
[0182] ,
[0183] Wherein, sampling function This is a discrete action selection function based on probability distribution. Its input is the action probability distribution vector output by the Actor network, and its output is a specific discrete action vector from the set of discrete actions; the... The probability of the nth action being selected and the probability distribution vector of the nth action. Each element corresponds to one another.
[0184] Step 622: Set hyperparameters and initialize the global collaborative caching strategy model. In the DNN-based global collaborative caching strategy model, the main parameters are set as follows: Actor learning rate is set to 1e-4, Critic learning rate is set to 1e-3, discount factor is set to 0.99, experience pool capacity is set to 10000, sampling size is set to 64, soft update rate is set to 0.005, training epochs are set to 100, and each epoch contains 512 steps.
[0185] Step 623: In the multi-agent DDPG algorithm, an experience replay mechanism is used. At each time step, all agents (in this embodiment, the base station is used as an agent) can access the current global experience tuple. Store to playback buffer Among them This is the current state. The action selected for the current state. The reward obtained after performing the action. The next state obtained after performing the action; for each agent, in the replay buffer A large batch of random samples were taken from the middle. Small batches of samples are used for training. Random sampling can break the correlation between sample data and reduce training oscillations.
[0186] Step 624: For the sampled first... For the nth mini-batch sample, calculate the nth... The target Q value of the agent :
[0187] ,
[0188] in, It is the first The target Critic network of each agent It is a discount factor. For the first The global joint state of the agents in the next time step; For the first Each agent outputs its target action based on the next state. Indicates the first The target Actor network parameters for each agent, including the weights and biases of each layer of the network. ; Indicates the first The local state obtained by an agent after performing its current action at the next moment; Indicates the first The immediate reward obtained by an agent after performing a corresponding cached action; Indicates the first The target Critic network parameters for each agent include the weights and biases of each layer of the target Critic network.
[0189] Step 625: The current Critic network of each agent updates its parameters by minimizing the loss of the objective Q-value, and its loss function is:
[0190] ,
[0191] in, It is the first The current Critic network of each agent, For the first The current global joint state of each sample. For the first The current global joint action of each sample; This refers to the size of a small batch of samples; Indicates the first The parameters of the Critic network for each agent include the weights and biases of each layer of the Critic network.
[0192] Step 626: The current Actor network of each agent optimizes its policy by maximizing the Q-value of the current Critic network output. The loss function corresponding to its objective function is:
[0193] ,
[0194] in, Indicates the first The action representation output by an agent in the current Actor network based on the current state.
[0195] Step 627: Update the first step using gradient descent. The gradient calculation formula for the current Actor network parameters of each agent is as follows:
[0196] ,
[0197] in, For the first The expected reward gradient of an agent It is the first The current Actor network of each agent; Indicates the first The Q-value of the current Critic network output of the agent is related to the first agent. Actions of an agent The gradient; Indicates the first The current Actor network output of an agent is related to its network parameters. The gradient.
[0198] Step 628: The target Actor network and target Critic network of all agents are updated using a soft update method. The update process is as follows:
[0199] ,
[0200] in, and This is the step size for soft updates, used to control the update rate of the target network. Soft updates allow for smoother parameter changes in the target network, avoiding drastic fluctuations in the target Q-value and thus stabilizing the training process.
[0201] Step 629: After training is complete, the digital twin layer saves the optimal global collaborative caching strategy model.
[0202] Step 7: After the current r-th round is completed, the digital twin layer distributes the Actor network model from the optimal global collaborative caching strategy model to the edge layer as the global optimal caching strategy model. Each base station agent inputs its current local cache state and content request state into the Actor network model to obtain the corresponding caching action and caching service method, and executes the global collaborative caching strategy accordingly. Before the first global optimal caching strategy model is trained and deployed to the edge base stations, the edge base stations can use the predicted popular content pre-cached in Step 5 to provide caching services. Before the new Actor network model in subsequent rounds is trained and distributed, each base station agent continues to use the Actor network model deployed in the previous round to perform caching decisions.
[0203] Step 8: Define the process by which the digital twin layer acquires current global operational information, predicts content request preferences of mobile devices, conducts global collaborative caching training, and forms and distributes the updated global optimal caching strategy model as a global collaborative caching strategy update cycle. The r-th strategy update cycle is denoted as the r-th round. Each strategy update cycle includes one prediction of content request preferences and multiple training rounds for training the global collaborative caching strategy model. When the global collaborative caching strategy model converges or the number of training rounds reaches a preset maximum value, the training in the current strategy update cycle ends and the global optimal caching strategy model is distributed to the edge layer.
[0204] Steps 5 to 7 above are explained using the r-th strategy update cycle as an example; parameters involving information from the previous strategy update cycle are marked with the corresponding round number r subscript, and the remaining parameters represent the corresponding parameters within the current strategy update cycle, without repeating the round number subscript.
[0205] Step 9: When the preset update time interval is reached, or when the detected change in content request distribution reaches a preset change threshold, the cache hit rate falls below a preset hit rate threshold, or the system operating status changes to a preset condition, an r+1 round of strategy update cycle is initiated, repeating steps 5-7. The digital twin layer re-acquires global operating information and content popularity prediction results, and updates the global collaborative caching strategy model. The obtained Actor network model is distributed to the edge layer to update the globally optimal caching strategy model deployed at the edge. The update time interval and corresponding trigger thresholds can be preset according to the actual application scenario, business load, and system performance requirements.
[0206] This embodiment uses a single policy update cycle as an example to simulate and verify the training convergence performance and caching decision performance of the global collaborative caching policy model. By setting a policy update cycle, this invention enables the digital twin layer to continuously acquire system operation information even after the caching policy model is deployed to the edge layer. When a preset update time interval is reached, or when the cache hit rate, content request distribution, and system operation status meet preset trigger conditions, it re-executes content request preference prediction, policy model training, and Actor network model update distribution. This achieves continuous maintenance and dynamic updates of the global collaborative caching policy to adapt to changes in content requests and system operation status. To verify the effectiveness of the digital twin-based content collaborative caching method in this invention, the system's cache hit rate and total system revenue are selected as evaluation indicators. The number of mobile terminals is set to 50, the number of edge servers is set to 4, and the communication bandwidth conditions are set to 200MHz for wired transmission and 20MHz for wireless transmission.
[0207] like Figure 5 and Figure 6As shown, to verify the effectiveness of the content popularity prediction algorithm in this invention, the system performance changes of the method under conditions of introducing a prediction mechanism and not introducing a prediction mechanism were compared. Simulation results show that as the training rounds progress, both the cache hit rate and the system reward exhibit a trend of first briefly decreasing and then continuously increasing, which is consistent with the convergence characteristics of deep reinforcement learning in the early stages of policy exploration. The comparative results show that, compared with the baseline algorithm without a prediction mechanism, the algorithm designed in this invention achieves significant improvements in both the cache hit rate and the system reward, two key indicators.
[0208] like Figure 7 and Figure 8 As shown, to verify the effectiveness of the global collaborative caching decision algorithm based on digital twins in this invention, the algorithm's performance was compared under conditions of constructing a digital twin layer and without a digital twin layer. Simulation results show that the global collaborative caching decision algorithm proposed in this invention consistently outperforms the algorithm without a digital twin design in terms of cache hit rate and system benefits. Furthermore, the performance degradation caused by the lack of a digital twin collaboration mechanism is significantly greater than the impact of the lack of a content prediction mechanism. This result fully demonstrates that in the architecture of this invention, although content prediction can effectively improve the prior accuracy of the content to be cached, the global information perception and collaboration capabilities provided by the digital twin layer are the key to determining whether the caching strategy can achieve global optimization and thus maximize system benefits.
Claims
1. A content collaborative caching system based on digital twins, characterized in that, This includes terminal devices deployed at the terminal layer, edge servers deployed at the edge layer, and a digital twin layer. Terminal devices send real-time content requests and related operational data to the edge servers and receive specific content from the edge servers based on these requests. Upon receiving a request from a terminal device, the edge server performs two actions: first, it uses its locally deployed strategy model to obtain the optimal caching strategy; second, it continues to upload data to the digital twin layer. Simultaneously, the edge server receives the globally optimal caching strategy model from the digital twin layer. After receiving various types of data from the edge server, the digital twin layer updates and maintains the global digital twin model, extracts latent features using the AE model to obtain predicted content, and inputs this predicted content as prior knowledge into the virtual agent to train the strategy model, thus obtaining the globally optimal caching strategy model.
2. The content collaborative caching system based on digital twins according to claim 1, characterized in that, Also includes: The data collection module, deployed at the terminal layer, senses and collects various operational data and content request data during the device's operation through a gateway installed on the mobile device. The priority module, deployed at the terminal layer, divides mobile devices into multiple priority levels according to preset rules and ensures that each device has a fixed priority attribute. The edge data module, deployed at the edge layer, receives basic device data and content request information from the data collection module, forwards the basic device data and content request information to the content popularity prediction module of the digital twin layer for predictive analysis, and forwards the basic device data and content request information to the global collaborative cache training module for training to obtain the global optimal cache strategy model. The cost design module, deployed at the edge layer, builds an edge base station content delivery cost model and a priority-based total system cost model, and expresses the system optimization objectives in a formulaic way. Markov Decision Design Module: Deployed at the edge layer, it models the agent's cache replacement process as a Markov decision process, defines the agent's state space and action space, and designs a reward function based on a formulaic optimization objective to guide the agent's training direction; The content caching module, deployed at the edge layer, receives the globally optimal caching strategy model obtained by the global collaborative caching training module, obtains the optimal caching strategy based on Markov decision design and state data, and performs caching operations on the corresponding content. The content popularity prediction module, deployed in the digital twin layer, utilizes the AE model to construct a content popularity evaluation matrix based on historical request information from devices. It then selects high-evaluation content as predicted popular content and inputs it as prior knowledge into the global collaborative cache training module. Simultaneously, the predicted popular content is distributed to the edge layer in the first round. The AE model includes an encoding layer and a decoding layer. The encoding layer maps the historical request feature vector corresponding to the content into low-dimensional latent features, and the decoding layer reconstructs the predicted popularity vector corresponding to the content based on the low-dimensional latent features. The input dimension of the historical request feature vector corresponds to the content, and each element in the predicted popularity vector represents the predicted evaluation value or popularity score of the corresponding content. The global collaborative caching training module is deployed in the digital twin layer. It trains the global collaborative caching strategy model based on the content popularity prediction results and the received global information. During the training process, each agent cooperates by observing each other's states, and finally obtains the global optimal caching strategy model.
3. A content collaborative caching method based on digital twins, characterized in that, Applied to the content collaborative caching system based on digital twins as described in any one of claims 1-2, a globally optimal caching strategy is obtained through the organic combination of content popularity prediction based on digital twins and global collaborative caching decision-making. The specific steps are as follows: S1, each mobile device sends its location, remaining power, and content caching requests to the edge base stations under its coverage area; S2, each edge base station uploads the received data to the digital twin layer; the digital twin layer establishes a digital twin corresponding to each edge base station and mobile device, aggregates the node information uploaded by different edge base stations, and forms global virtual data for each base station to use for collaborative caching decision-making; S3, the edge base station designs the total system cost model according to priority, formulates the optimization objective, and establishes the system problem formula; S4. Based on the total cost model and the system problem formula, design a Markov decision process; S5, the digital twin layer monitors the system's operating status in the r-th round, predicts the content request preferences of mobile devices, and uses the prediction results as prior information for global collaborative caching training in the current round. At the same time, the prediction results are sent to the edge base station for content pre-caching in the first round. S6. Based on the given problem and Markov decision process, a global collaborative caching strategy model based on the Actor-Critic network architecture is constructed. The discretized DDPG algorithm is used to train the global collaborative caching strategy model in the digital twin layer to obtain the optimal global collaborative caching strategy model. S7, the Actor network model in the optimal global collaborative caching strategy model is distributed to the edge layer as the global optimal caching strategy model; S8 defines a global collaborative caching strategy update cycle as the process by which the digital twin layer acquires current global operating information, predicts the content request preferences of mobile devices, conducts global collaborative caching training, and forms and distributes the updated global optimal caching strategy model. Each strategy update cycle includes one prediction of content request preferences and multiple training rounds for training the global collaborative caching strategy model. When the global collaborative caching strategy model converges or the number of training rounds reaches a preset maximum value, the training in the current strategy update cycle ends. S9. Pre-set the change conditions for the policy update cycle according to the actual application scenario, business load and system performance requirements. When the conditions are met, start the r+1 round of policy update cycle and repeat steps S5-S7.
4. The content collaborative caching method based on digital twins according to claim 3, characterized in that, The specific steps for designing a total system cost model for edge base stations based on priority include: S31, Design the overall system model. Mobile devices send content requests to the local base station, and there are three ways to provide content. If the local base station stores the content, it transmits it directly; if a neighboring base station stores the content, it transmits it to the local base station; if neither the local base station nor a neighboring base station stores the content, the cloud transmits it to the local base station. S32, after the mobile device sends a content request to the base station, the content transmission cost for the base station to fulfill the request is calculated as follows: If the local base station to which the mobile device is connected has cached the content in advance, the content will be transmitted directly through the wireless link. The transmission cost is denoted as the first transmission cost. , represented as: , in, This represents the unit cost of transmitting content using a wireless link. Content Data size, This indicates the wireless link transmission rate between the base station and the mobile device; If the local base station connected to the mobile device cannot provide content. However, if a neighboring base station caches this content, it is transmitted to the local base station via fiber optic cable, and then distributed via wireless link. This method of content delivery... The transmission cost is denoted as the second transmission cost. , represented as: , in, This represents the unit cost of transmitting content using a wireless link. This indicates the wired link transmission rate between the local base station and its neighboring base stations. If content If the content is neither cached at the local base station nor at a neighboring base station, the local base station needs to request the content from the cloud and transmit it to the corresponding mobile device. This method of content... The transmission cost is denoted as the third transmission cost. , represented as: , in, This indicates the wired link transmission rate between the local base station and the cloud; Finally, the total content transmission cost per base station Represented as: , in, This represents the set of devices within the coverage area of the base station. A collection representing content. Indicates whether device u requests this content from the base station. ; , respectively, indicate that the content request of device u is provided by the local base station, neighboring base stations, and the cloud, and the selection of the service method satisfies the constraints. ; S33, design a priority-based service cost model, including: S331 divides all mobile devices into 8 levels according to their priority. Indicates the priority of device u; S332, designing the priority index for a single base station. for: , in, This represents the cache hit rate of device u at this base station. This represents the total number of mobile devices under a single base station. Indicates the highest priority; The larger the value, the more priorities the strategy considers; conversely, the smaller the value, the fewer priorities it considers. S333, Calculate the total system cost for: ; S34, Design the revenue model, including: Calculate the waiting time for the mobile device to receive content after sending a request. Represented as: ; The revenue from base station design is inversely proportional to the content transmission latency; the revenue function... Represented as: , in, Indicates the attenuation factor. Content Value; Define an index to determine whether a cached request is satisfied within a specified time. for: , in, This is the time limit for waiting for content requests; once the content is successfully transmitted, the index... If it fails, then index ; Calculate the revenue of the base station , represented as: ; S35, by maximizing the total revenue of a single base station Find the optimal caching strategy The optimization problem can then be expressed as: , in, It is the total bandwidth of the base station. It is the bandwidth currently allocated to mobile device u by the edge base station. It is the total bandwidth of the base station. Indicates whether the base station caches content. For example, "yes" takes a value of 1, and "no" takes a value of 0; Represents a single content Size, This refers to the base station's cache capacity; constraint C1 represents the base station's total bandwidth limit; constraint C2 indicates that the base station needs to consider storage capacity limitations when caching content; and constraint C3 defines that the content requested by the mobile terminal can only be retrieved in one place.
5. The content collaborative caching method based on digital twins according to claim 3, characterized in that, In step S4, each edge base station is modeled as an agent, and the Markov decision process is defined as follows: Define the state of each base station as ,in This indicates the local cache status of the base station. The state space represents the received content request status. for: ,and , Indicates the total number of base stations; Define the action in each base station as ,in For base station caching actions, Indicates the caching service method; then the action. for: ; Define the reward function for each base station. The mathematical expression is: Then reward for: .
6. The content collaborative caching method based on digital twins according to claim 3, characterized in that, The digital twin layer predicts the content request preferences of mobile devices and uses the prediction results as prior information for the current round of global collaborative caching training. Simultaneously, the prediction results are sent to the edge base station for content pre-caching in the first round, specifically including: S51, Design the backtracking time window for the r-th round. The system predicts future content demand based on data within the digital twin of the window, and the window size is adaptively adjusted based on the cache hit rate. S52, in the backtracking time window Within, popular content is predicted based on historical request information from each mobile device; S53 uses the predicted popular content as prior information for the current round of global collaborative caching training and as pre-cached content sent to the edge base station in the first round.
7. The content collaborative caching method based on digital twins according to claim 6, characterized in that, Obtain the backtracking time window for round r. The steps include: S511, Design the backtracking time ratio coefficient for the r-th round. : , in, , These represent the lower and upper bounds of the proportionality coefficient, respectively. Let represent the cache hit rate in round r-1, and ; S512, based on the backtracking time scaling factor Design the final backtracking time window for: , in, This indicates the current moment, which is the moment when round (r-1) ends and round r is about to begin; This represents the total duration of the actual training in the (r-1)th round.
8. The content collaborative caching method based on digital twins according to claim 6, characterized in that, The specific steps for predicting popular content based on historical request information from various mobile devices include: S521, determine whether a certain request time is within the backtracking time window. If the request time... satisfy: , This indicates that the request occurred during the last segment of the previous round, and is a high-value recent feature, which should be retained and input into the AE model. S522, the AE model deployed in the digital twin layer extracts historical request information of each mobile device within the jurisdiction of each base station within the retrospective time window, and constructs a content popularity evaluation matrix for each device. ;in The first dimension is the identity characteristics of the mobile device, and the second dimension is the evaluation level of the content by the mobile device. S523 sorts the content of mobile devices under each base station from high to low according to their level, and selects the top N content with the highest evaluation level as the predicted popular content, where the size of N is determined by the cache capacity of the base station.
9. The content collaborative caching method based on digital twins according to claim 3, characterized in that, The specific steps to obtain the optimal global collaborative caching strategy model are as follows: S61, the digital twin layer receives the predicted content from the content popularity prediction module and pre-stores the predicted content as prior knowledge in the cache space of the corresponding base station twin to initialize the local cache state of each base station agent. S62, the digital twin layer, based on stored node information and predicted content, constructs a global collaborative caching strategy model based on the Actor-Critic network architecture according to the defined Markov decision process, and uses the discretized DDPG algorithm to train the global collaborative caching on the Actor network and Critic network to obtain the optimal global collaborative caching strategy model.
