Computing power network distributed fine-grained service caching method and system
By building a multi-objective optimization model and distributed caching strategy, the problem of insufficient adaptability to dynamic changes in service popularity in the existing technology is solved, efficient resource sharing and computing optimization are achieved, and the computing efficiency and response speed of computing power network are improved.
Patent Information
- Application Number
- CN202510433058.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art lacks adaptability to dynamic changes in service popularity in the fields of vehicle edge computing and autonomous driving, lacks resource flexibility, low computing efficiency, and is difficult to meet real-time requirements and scalability of high-dimensional problems.
Build a multi-objective optimization model based on application access frequency and network topology, realize distributed cache and resource sharing through lightweight container registry centers, combine Zipf distribution modeling, and use NSGA-II algorithm to optimize service cache decisions to achieve cross-edge and cloud collaborative caching.
Improve cache hit rate and service quality, optimize global resource utilization, enhance system throughput and response speed, and improve computing efficiency and adaptability.
Smart Images

Figure CN120295792A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computing power networks, and in particular, to a distributed fine-grained service caching method and system for computing power networks. Background Art
[0002] With the rapid development of edge computing and computing power networks, distributed service caching and computing resource optimization have become key technologies for improving network performance. Some solutions have been proposed in the prior art in the fields of vehicle edge computing and autonomous driving, but there are still significant deficiencies.
[0003] A Chinese patent application CN118612794A discloses a service caching and task offloading method in a vehicle edge computing network. This solution constructs a mathematical model for service caching, task offloading and cooperation, and resource allocation, and uses the deep learning DDQN algorithm for iterative solution to reduce the average execution delay of the system. However, this method has the following deficiencies: First, it lacks adaptability to the dynamic changes in service popularity and does not model the spatio-temporal differences in service demand, resulting in unpopular services occupying resources or popular services having slow responses, increasing cache miss rates and network loads. Second, it has insufficient support for the flexibility of computing resources. It is only optimized for specific tasks and does not fully consider node heterogeneity and dynamic changes, and may fail in high-load or mobile scenarios, reducing the global resource efficiency. In addition, the DDQN algorithm relies on a large amount of historical data for training, with high computational overhead and lagging updates, making it difficult to meet real-time requirements and the scalability of high-dimensional problems.
[0004] Another Chinese patent application CN118510044A discloses an autonomous driving vehicle computing power network and its edge computing offloading method, which designs a computing power network including vehicles, aerial base stations, ground base stations, and cloud servers, and optimizes service caching, resource allocation, and computing offloading through Stackelberg game to minimize latency and energy consumption and maximize utility. Although this solution effectively reduces the task execution latency, its limitations cannot be ignored: First, it has insufficient adaptability to complex dynamic scenarios. The game model assumes stable parameter values, which does not match the actual scenarios of high vehicle mobility and changing task generation rates, affecting the optimization effect. Second, it has insufficient consideration of cross-layer node cooperation and ignores the joint scheduling between the cloud and the edge, resulting in unbalanced resource utilization, especially when the edge is overloaded. In addition, the game model has a high computational complexity, and the high-dimensional decision variables make the solution time too long to meet real-time requirements. Finally, it does not fully model service popularity, and the caching strategy lacks pertinence, which may increase the miss rate and transmission delay. Summary of the Invention
[0005] The purpose of the present invention is to provide a method and system for distributed fine-grained service caching in a computing power network, so as to solve the problems existing in the prior art in terms of dynamic adaptability, resource flexibility, computing efficiency, and service popularity optimization.
[0006] To achieve one of the above-mentioned invention purposes, an embodiment of the present invention provides a method for distributed fine-grained service caching in a computing power network, and the method includes:
[0007] Based on the access frequency of the application program and the network topology, construct a multi-objective optimization model for optimizing the application program deployment and service caching decision;
[0008] In each time slot, based on the network state of the current time slot, generate an initial application program deployment and service caching decision, and optimize it through the multi-objective optimization model;
[0009] According to the optimized deployment and service caching decision, update the deployment and service caching status of the computing power network, and use the updated network state for the optimization of the next time slot.
[0010] As a further improvement of an embodiment of the present invention, the method further includes: initializing and constructing a three-layer computing power network architecture with edge computing capabilities; the three-layer computing power network architecture includes user equipment, edge nodes, and cloud nodes;
[0011] The edge nodes are connected through network links to form a network topology, where the network topology includes the connection relationship between the edge nodes and their link parameters, and each edge node includes a lightweight container registry, and the lightweight container registry is used to realize the collaborative sharing of the container image layer;
[0012] The cloud node stores all container image layers for the edge nodes to pull, so as to realize distributed caching and resource sharing.
[0013] As a further improvement of an embodiment of the present invention, the method further includes calculating the access frequency of the application program through the generalized Zipf distribution, and the calculation formula is expressed as:
[0014]
[0015] Where, is the application popularity, is the total number of application programs, represents the set ; is, at time slot t, the popularity level shown by the users linked by the edge node for the application program ; is the distribution parameter, i is the number of the edge node, and m is the number of the application program. as the period.
[0016] As a further improvement of an embodiment of the present invention, the method further includes that the construction of the multi-objective optimization model includes,
[0017] Define the objective function, expressed as:
[0018]
[0019] where is the application deployment cost, is the mirror layer pulling time in time slot t, is the total request delay in time slot t, is the weight coefficient, represents the application whether it is deployed on the edge node in time slot t , is the time slot duration, is the edge node is the request arrival rate within time slot t, is the set of edge nodes;
[0020] Define the constraints, expressed as:
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027] where is the set of applications, is the set of services required by the application , is the mirror layer required by the service , is the mirror layer is the data volume, is the mirror layer whether it is cached on the edge node in time slot t , are the CPU, RAM, and disk resources of the edge node respectively, and CPU and RAM requirements for the lightweight registry respectively for the service required disk space, CPU, and RAM.
[0028] As a further improvement of an embodiment of the present invention, the method further includes that the initial application deployment decision is generated by calculating the centroid coordinates of user requests, specifically including:
[0029] Calculate the edge nodes For the application at time slot t user request volume ;
[0030] Map the network topology to a two-dimensional plane through multi-scale analysis to obtain the coordinates of each edge node coordinates ;
[0031] The centroid coordinates are expressed as:
[0032]
[0033]
[0034] Select the edge node closest to the centroid coordinates and satisfying the constraints for application deployment.
[0035] As a further improvement of an embodiment of the present invention, the method further includes that the initial service cache decision is generated by the ε-greedy strategy, including,
[0036] Based on application popularity Sort multiple applications in descending order;
[0037] Traverse the sorted applications and their required container image layers to With a probability of selecting the image layer of the next application for caching until the cache capacity limit of the edge node is reached.
[0038] As a further improvement of an embodiment of the present invention, the method further includes that the multi-objective optimization model uses the NSGA-II algorithm to optimize the initial application deployment decision and the initial service cache decision, specifically including:
[0039] Initialize the population based on the generated initial decision;
[0040] Optimize the population through non-dominated sorting and crowding distance calculation, where non-dominated sorting considers the objective function and constraint violation values;
[0041] Generate the next generation population through crossover and mutation operations until the maximum number of iterations or convergence conditions are met.
[0042] To achieve one of the above invention objectives, an embodiment of the present invention further provides a computing power network distributed fine-grained service caching system, which includes an optimization model construction module, a decision generation module, and a network state update module;
[0043] The optimization model construction module is used to construct a multi-objective optimization model for optimizing application deployment and service caching decisions based on the access frequency of the application program and the network topology;
[0044] The decision generation module is used to generate initial application deployment and service caching decisions based on the network state of the current time slot within each time slot, and optimize them through a multi-objective optimization algorithm;
[0045] The network state update module is used to update the deployment and service caching state of the computing power network according to the optimized program deployment and service caching decisions, and use the updated network state for the optimization of the next time slot.
[0046] To achieve one of the above invention objectives, an embodiment of the present invention further provides an electronic device, including a memory and a processor, characterized in that a computer program that can run on the processor is stored in the memory, and when the program is executed on the processor, the steps in the above-mentioned computing power network distributed fine-grained service caching method are implemented.
[0047] To achieve one of the above invention objectives, an embodiment of the present invention further provides a storage medium, the storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the steps in the above-mentioned computing power network distributed fine-grained service caching method are implemented.
[0048] Compared with the prior art, the present invention provides a computing power network distributed fine-grained service caching method and system. Through the fine-grained service caching strategy, the container image hierarchical model is used to optimize the storage space, reduce duplicate storage, improve the cache utilization rate and service startup efficiency. The dynamic caching strategy based on application popularity, combined with Zipf distribution modeling, flexibly adapts to demand changes, improves the cache hit rate and service quality. The cross-edge and cloud collaborative caching mechanism realizes distributed caching and load balancing through a lightweight container registry, optimizes global resource utilization, enhances the system throughput and response speed. In addition, the two-stage multi-objective optimization algorithm first generates diverse initial solutions, and then evolves and optimizes through NSGA-II, overcomes high-dimensional complexity, improves the solution efficiency and solution quality, and is more flexible and adaptable than the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1It is the overall flowchart of the distributed fine-grained service caching method for the computing power network described in the present invention.
[0050] Figure 2 It is a schematic diagram of the distributed fine-grained service caching model for the computing power network of the distributed fine-grained service caching method described in the present invention.
[0051] Figure 3 It is a schematic diagram of the architecture of the distributed fine-grained service caching system for the computing power network described in the present invention. Specific Embodiments
[0052] The present invention will be described in detail below in conjunction with the specific embodiments shown in the drawings. However, these embodiments do not limit the present invention, and any structural, methodical, or functional transformations made by those of ordinary skill in the art based on these embodiments are included within the protection scope of the present invention.
[0053] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.
[0054] In the first embodiment of the present invention, the present invention provides a distributed fine-grained service caching method for a computing power network, as Figure 1 shown, the method includes,
[0055] S1: Based on the access frequency of the application program and the network topology, construct a multi-objective optimization model for optimizing the application program deployment and service caching decision;
[0056] S2: In each time slot, based on the network state of the current time slot, generate an initial application program deployment and service caching decision, and optimize it through the multi-objective optimization model;
[0057] S3: According to the optimized deployment and service caching decision, update the program deployment and service caching status of the computing power network, and use the updated network state for the optimization of the next time slot.
[0058] In a specific embodiment of the present invention, initialize and construct a three-layer computing power network architecture with edge computing capabilities; the three-layer computing power network architecture includes user equipment, edge nodes, and cloud nodes;
[0059] The edge nodes are connected through network links to form a network topology, where the network topology includes the connection relationship between the edge nodes and their link parameters, and each edge node includes a lightweight container registry, and the lightweight container registry is used to realize the collaborative sharing of the container image layer;
[0060] The cloud node stores all container image layers for the edge nodes to pull, thus achieving distributed caching and resource sharing.
[0061] It should be noted that the present invention adopts a three-layer computing power network architecture. The first layer includes Internet of Things (IoT) devices, such as sensors and smart handheld devices (such as smartphones, tablets, smart vehicles, and wearable devices), collectively referred to as user equipment (UE). The second layer includes network edge devices (such as base stations, routers, gateways, switches, and access points (AP)), which provide wired or wireless connections within a specified area. Each edge device is represented as , where the node serves multiple users, and each user may have multiple UEs. The specific user connected to is represented as . . The average access latency from the user in to is defined as . Each edge node is equipped with an edge server with certain CPU, RAM, and disk resources, respectively represented as , and supports resource sharing through cooperation with adjacent nodes. Let represent the set of network links between edge nodes, where each link has a bandwidth and a latency . If , then . The third layer includes cloud computing nodes with a large amount of computing resources. The network latency and bandwidth between each edge node and its corresponding cloud node are respectively represented by and . In the patent solution, each edge server hosts a lightweight container registry for managing and distributing image layers, and indicate the CPU and RAM requirements of these registries. As shown in Figure 2 , edge node 4 caches multiple container image layers and allows different services, such as A and B, to share some image layers. The edge node also supports caching layers not used by the services of this node to enhance the caching cooperation of the edge network. In addition, the centralized registry on the cloud node also maintains all container image layers required by the edge nodes.
[0062] Furthermore, the container image provides an immutable file system snapshot for containerized services, which encapsulates the basic files, libraries, and configurations for application execution. Each container image consists of multiple "read-only layers" that are stacked incrementally, supporting cross-image reusability to avoid redundant downloads. This layered structure enables efficient caching and updates, facilitating collaborative service caching among edge servers. Containerized services are defined as , where represents a set of image layers required for service , represents a specific image layer required for service , represents the size of the data occupied by , and represents all the image layers required for all services. At time slot t, the service caching decision on the edge server
[0063]
[0064] For a service already running on the edge server, the server must cache all the relevant image layers required for the service, expressed as:
[0065]
[0066] At each time slot , the application deployment situation can be adjusted according to the application popularity and request arrival rate. For example, new applications can be deployed on new edge servers, or existing application instances can be terminated or retained. As Figure 1 shown, the edge node checks the local availability of all the required image layers before starting the container service. If some layers are missing, the edge node will retrieve and pull these image layers from nearby edge nodes with cached copies according to the service caching index maintained in the network. If no nearby node has the required layers, these layers will be obtained from the cloud center. Assuming that the computing node can complete the caching of the service image layers within each time slot t (with a duration of ω), then at time slot all newly deployed containers will obtain the image layers according to the caching results of time slot t. If the edge node needs layer at time slot , the shortest link delay path will be calculated by Dijkstra's shortest path and represented by . The pulling time of this image layer is:
[0067]
[0068] If there is no mirror layer in the edge network the cache of which must fetch the layer from the cloud, and the pulling time at this time is:
[0069] .
[0070] In a specific embodiment of the present invention, the access frequency of the application is calculated by a generalized Zipf distribution, and the calculation formula is expressed as:
[0071]
[0072] where is the application popularity, is the total number of applications, represents the set ; is the popularity level shown by the users linked to the edge node for the application at time slot t; is the distribution parameter, i is the number of the edge node, m is the number of the application, is the period.
[0073] It should be noted that in the present invention, by assuming that an application contains one or more services . Each service instance requires a container image to carry, and all service instances of the same application replica are deployed on the same edge or cloud server, so as to minimize the latency between service instances and improve the quality of service (QoS). Due to resource limitations, the number of applications carried by the edge server is limited, while the capacity of the cloud server is unlimited. The resources required for each service are described as , where , and represent the disk space, CPU and RAM required by the service respectively. The CPU and RAM requirements reflect the computing requirements independent of the container image size. The popularity of the application reflects the access frequency of the users to the application. At time slot, the access frequency of the users connected to the edge server to the application follows a generalized Zipf distribution.
[0074] Furthermore, by assuming that the average request arrival rate initiated by the users linked to the edge node at time slot t follows a Poisson distribution. The deployment decision of the application for the edge server at time slot t is defined as:
[0075]
[0076] In a specific embodiment of the present invention, the construction of the multi-objective optimization model is specifically as follows
[0077] Define the optimization objective as the objective function of minimizing the multi-slot weighted sum, expressed as:
[0078]
[0079] Wherein, is the application deployment cost, is the image layer pulling time in slot t, is the total request delay in slot t, is the weight coefficient, represents the application whether it is deployed on the edge node in slot t , is the slot duration, is the edge node the request arrival rate within slot t, is the set of edge nodes;
[0080] It should be noted that if the application is deployed on the edge node in slot t , then the value of is 1, otherwise it is 0;
[0081] Define the resource constraints that limit the disk, CPU, and RAM usage of the edge node, expressed as:
[0082]
[0083]
[0084]
[0085] Wherein, is the set of applications, is the set of services required by the application , is the image layer required by the service , is the image layer the data volume of, is the image layer whether it is cached on the edge node in slot t , are respectively the CPU, RAM, and disk resources of the edge node , and CPU and RAM requirements for the lightweight registry are, respectively, for the service the disk space, CPU, and RAM required.
[0086] It should be noted that an application contains one or more services , and the containerized service is defined as , where represents a set of image layers required for the service , and represents a specific image layer required for the service , and represents all image layers required for all services;
[0087] It should be noted that if the image layer is cached on the edge node at time slot t , then has a value of 1, otherwise 0;
[0088] It should be noted that in the present invention, each edge node hosts a lightweight container registry for managing and distributing image layers;
[0089] Defines the minimum deployment constraint to ensure that each application is deployed at least once, expressed as:
[0090]
[0091] Defines the cache dependency constraint to ensure the availability of the service image layer for deploying the application, expressed as:
[0092]
[0093] Defines the binary constraint where the decision variable is 0 or 1, expressed as:
[0094] .
[0095] It should be noted that in the application deployment model provided by the present invention, a single application can be deployed on multiple edge servers simultaneously. This replication mechanism can significantly increase the availability of the application. Additionally, the Dijkstra's shortest path algorithm is used to ensure that users connected to various edge nodes can access the instance with the shortest latency. Let represent the set of paths when a user connected to the edge node accesses the application instance deployed on the node . At time slot t, the network latency of the user to the application is:
[0096]
[0097] When applied Deployed at a node in time slot t The calculation formula for the request arrival rate is expressed as:
[0098]
[0099] Using the M / M / 1 queue model, the average processing delay of user requests is:
[0100]
[0101] In the case of limited resources at the edge node, optimizing resource allocation can improve efficiency, service quality and reduce costs. By using , and represent the usage costs of CPU, RAM and disk per unit time and unit resource volume, then the cost of deploying an application instance is:
[0102]
[0103] The total deployment cost of the application within time slot t is .
[0104] The cumulative pull time for pulling the container image layer at the start of each time slot is defined as:
[0105]
[0106] If the application deployment decision does not change compared to the previous time slot, the pull time is zero. The total delay of all requests within time slot t (including network delay and computing delay) is:
[0107]
[0108] The modeling optimization objective of the multi-objective optimization model provided by the present invention is to minimize the weighted sum of the average total delay, image layer pull time and deployment cost within the time slot length range; by taking the application deployment decision and the hierarchical service cache decision as optimization variables, a multi-objective multi-time slot optimization model for joint service deployment and service cache optimization is constructed.
[0109] In a specific embodiment of the present invention, the initial application deployment decision is generated by calculating the centroid coordinates of user requests. Specifically,
[0110] Calculate the edge node for the application in time slot t The user request volume ;
[0111] Map the network topology to a two-dimensional plane through multi-scale analysis to obtain the coordinates of each edge node ; ;
[0112] The barycentric coordinates are expressed as:
[0113]
[0114]
[0115] Select the edge node closest to the barycentric coordinates and satisfying the resource constraints for application deployment.
[0116] It should be noted that the present invention first adopts the simple and effective barycenter selection in the location problem from the perspective of optimizing application delay to quickly calculate the initial solution of the application deployment decision. The uneven distribution of application requests is caused by different application popularities in different edge regions. We regard the number of requests of users in the set within the time slot for the application as the weight of the node . However, since the network topology cannot represent the two-dimensional coordinates of the nodes, this patent uses the multi-scale analysis (MDS) method to map the network logical topology to the two-dimensional coordinate plane. As described in the application deployment decision algorithm based on barycenter selection and multi-scale analysis, the algorithm accepts the edge network topology, edge node model, the number of application deployment instances and application models, etc. as inputs. The algorithm first traverses the set of applications to be deployed. In the loop, it first calculates the request volume of each edge node user for . Then, according to the following steps, the network topology nodes are transformed into two-dimensional coordinates so that the coordinate distance between adjacent nodes is as proportional as possible to the link delay between the nodes: :
[0117] 1) Define a distance matrix , where represents and the link delay between
[0118] For nodes that are not directly adjacent, the shortest delay can be calculated through the Dijkstra algorithm. :
[0119]
[0120] where is the centering matrix, is a unit vector with length . is the square of the elements of matrix .
[0121] 3) Perform eigenvalue decomposition on the similarity matrix to obtain eigenvalues and the corresponding eigenvectors .
[0122] 4) Construct plane coordinates: Select the eigenvectors corresponding to the first two largest eigenvalues , to generate node coordinates:
[0123]
[0124] The coordinates of each node are represented by the rows in matrix . Then, calculate the plane centroid, and starting from the centroid coordinates , search for the edge site with the closest distance. If the site has sufficient remaining resources, select the site to deploy the service. After updating the remaining resources of the site, continue the search until service instances are deployed or there are no more nodes that meet the application deployment requirements.
[0125] In a specific implementation scenario of the present invention, the application deployment decision algorithm based on centroid selection and multi-scale analysis includes the following steps:
[0126] Input:
[0127] Result: Deployment decision
[0128] 1: ;
[0129] 2: for do
[0130] 3: Construct the delay matrix ;
[0131] 4: Use the MDS method to map the network topology to a two-dimensional plane to obtain the coordinates of node ;
[0132] 5: Obtain the centroid coordinates according to the centroid calculation formula;
[0133] 6: Calculate the Euclidean distance between each node and the centroid: ;
[0134] 7: For all nodes Sort in ascending order, select the nearest edge nodes not exceeding number of edge nodes, and set ;
[0135] 8: Update the remaining available resources of all edge servers;
[0136] 9: end for
[0137] In a specific embodiment of the present invention, the initial service cache decision is generated by the ε-greedy strategy. Specifically,
[0138] Based on the application popularity Sort multiple application programs in descending order;
[0139] Traverse the sorted application programs and their required container image layers, and with a probability of selecting the image layer of the next application for caching until the cache capacity limit of the edge node is reached.
[0140] It should be noted that for the container image layer caching strategy, the initial solution can be obtained using the ϵ-greedy algorithm. By setting an image layer caching upper limit , each edge server traverses the required image layers of the applications in descending order of the application popularity in this area. The server has with a probability of selecting the image layer of the next application for caching until the cache capacity limit is reached.
[0141] In a specific implementation scenario of the present invention, the service cache decision algorithm based on ϵ-greedy includes the following steps:
[0142] Input: , , , , ,
[0143] Result: Service cache decision
[0144] 1: ;
[0145] 2: For the applications in the set Sort in descending order according to ;
[0146] 3: for do
[0147] 4: if not cached do
[0148] 5: Generate a random number
[0149] 6: if do
[0150] 7:
[0151] 8: end if
[0152] 9: if do
[0153] 10: Exit the algorithm
[0154] 11: end if
[0155] 12: end if
[0156] 13: end for
[0157] In a specific embodiment of the present invention, the multi-objective optimization model uses the NSGA-II algorithm to optimize the initial application deployment decision and the initial service caching decision. Specifically,
[0158] Initialize the population based on the generated initial decisions;
[0159] Optimize the population through non-dominated sorting and crowding distance calculation, where non-dominated sorting considers the objective functions and constraint violation values mentioned above;
[0160] Generate the next generation of the population through crossover and mutation operations until the maximum number of iterations or convergence conditions are met.
[0161] It should be noted that the present invention uses the multi-objective optimization algorithm NSGA-II based on the Pareto set to perform heuristic high-dimensional solution space search. Specifically,
[0162] Step 1: Generate the initial deployment decision and caching decision by using the application deployment decision algorithm based on centroid selection and multi-scale analysis and the service caching decision algorithm based on ϵ-greedy to initialize the population. Each individual in the population represents a set of deployment decisions and caching decisions.
[0163] Step 2: Calculate the three optimization objective values corresponding to the population individuals (denoted as , and , and perform non-dominated sorting on the population to divide different Pareto fronts. Incorporate the objective functions and resource constraints of the multi-objective optimization model into the NSGA-II algorithm by using the constraint violation value ( ) to affect the non-dominated sorting process, The calculation formula is as follows:
[0164]
[0165] If any of the following conditions are met, then the individual is recognized as dominating the individual :
[0166] 1) is a feasible solution and is an infeasible solution
[0167] 2) and are both feasible solutions and , ,
[0168] 3) and are both infeasible solutions but
[0169] Step 3: Calculate the crowding distance for individuals within each front to maintain the diversity of solutions.
[0170] Step 4: Select based on the Pareto rank and crowding distance, and preferentially retain non-dominated solutions.
[0171] Step 5: Perform a crossover operation on the selected parents to generate new offspring individuals. The crossover operation formula is as follows:
[0172]
[0173] where and are both offspring, is a random integer variable.
[0174] Step 6: Mutate the offspring with a small probability ( ) to introduce randomness and enhance the exploration of the solution space:
[0175] 4)
[0176] where is 's offspring, is the gene of the individual.
[0177] Step 7: Combine the parents and offspring to form a new population, sort according to the Pareto front and crowding degree, and retain the individuals in the front row to form the next generation population.
[0178] Finally, a convergence check is performed. If it does not converge, repeat steps 2 to 7 until the maximum number of iterations is satisfied.
[0179] In a specific implementation scenario of the present invention, the joint decision-making algorithm for service deployment and service caching based on NSGA-II includes the following steps:
[0180] Input: , ,
[0181] Result: Service caching decision and application deployment decision
[0182] 1: ;
[0183] 2: while do
[0184] 3: Use the application deployment decision algorithm based on centroid selection and multi-scale analysis and the service caching decision algorithm based on ϵ-greedy to generate initial deployment and caching decisions for initializing the population;
[0185] 4: Calculate the values of three optimization objectives corresponding to the individuals in the population, and perform non-dominated sorting on the population;
[0186] 5: Calculate the crowding distance for each individual within each Pareto front;
[0187] 6: Select based on the Pareto rank and crowding distance, and preferentially retain non-dominated solutions;
[0188] 7: Perform crossover operations on the selected parents to generate new offspring individuals;
[0189] 8: Mutate the offspring with a small probability;
[0190] 9: Combine the parents and offspring to form a new population, sort according to the Pareto front and crowding degree, and retain the individuals in the front row to form the next generation population;
[0191] 10: end while
[0192] In the second embodiment of the present invention, the present invention provides a computing power network distributed fine-grained service caching system, as Figure 3 shown, the system includes an optimization model construction module 1, a decision generation module 2, and a network state update module 3;
[0193] The optimization model construction module 1 is used to construct a multi-objective optimization model for optimizing application deployment and service caching decisions based on the access frequency of the application and the network topology;
[0194] The decision-making generation module 2 is used to generate initial application deployment and service caching decisions based on the network state of the current time slot within each time slot, and optimize them through a multi-objective optimization algorithm;
[0195] The network state update module 3 is used to update the deployment and service caching state of the computing power network according to the optimized program deployment and service caching decisions, and use the updated network state for the optimization of the next time slot.
[0196] In the third embodiment of the present invention, the present invention provides an electronic device, including a memory and a processor, characterized in that the memory stores a computer program that can run on the processor, and when the program is executed on the processor, the steps in the above-mentioned computing power network distributed fine-grained service caching method are implemented.
[0197] In the fourth embodiment of the present invention, the present invention provides a storage medium, the storage medium stores a computer program, characterized in that when the computer program is executed by a processor, the steps in the above-mentioned computing power network distributed fine-grained service caching method are implemented.
[0198] In summary, the computing power network distributed fine-grained service caching method and system provided by the present invention use a fine-grained service caching strategy to optimize the storage space by using the container image layering model, reduce duplicate storage, improve cache utilization and service startup efficiency. The dynamic caching strategy based on application popularity, combined with Zipf distribution modeling, flexibly adapts to demand changes, improves cache hit rate and service quality. The cross-edge and cloud collaborative caching mechanism realizes distributed caching and load balancing through a lightweight container registry, optimizes global resource utilization, and enhances system throughput and response speed. In addition, the two-stage multi-objective optimization algorithm first generates diverse initial solutions and then evolves and optimizes through NSGA-II to overcome high-dimensional complexity, improve the solution efficiency and solution quality, and is more flexible and adaptable compared with the prior art.
[0199] It should be understood that although this specification is described according to embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
[0200] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described modules can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0201] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0202] In addition, the functional modules in each embodiment of the present application can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of a hardware plus software functional module.
[0203] The above integrated modules implemented in the form of software functional modules can be stored in a computer-readable storage medium. The above software functional modules are stored in a storage medium and include several instructions to enable a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor to execute some steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A distributed fine-grained service caching method for a computing power network, characterized in that: including, constructing a multi-objective optimization model for optimizing application deployment and service caching decisions based on the access frequency of applications and the network topology; within each time slot, generating initial application deployment and service caching decisions based on the network state of the current time slot, and optimizing them through the multi-objective optimization model; updating the program deployment and service caching status of the computing power network according to the optimized deployment and service caching decisions, and using the updated network state for the optimization of the next time slot.
2. The distributed fine-grained service caching method for a computing power network according to claim 1, wherein: also including, initializing and constructing a three-layer computing power network architecture with edge computing capabilities; the three-layer computing power network architecture includes user equipment, edge nodes, and cloud nodes; the edge nodes are connected through network links to form a network topology, where the network topology includes the connection relationships between edge nodes and their link parameters, and each edge node includes a lightweight container registry for realizing the collaborative sharing of container image layers; the cloud node stores all container image layers for the edge nodes to pull, thereby realizing distributed caching and resource sharing.
3. The distributed fine-grained service caching method for a computing power network according to claim 1, wherein: calculating the access frequency of the application through the generalized Zipf distribution, and the calculation formula is expressed as: , Among them, is the application popularity, is the total number of applications, represents the set ; At time slot t, for the edge node the popularity level shown by the users linked to it for the application ; is the distribution parameter, i is the number of the edge node, m is the number of the application, is the period.
4. The distributed fine-grained service caching method for a computing power network according to claim 3, wherein: the construction of the multi-objective optimization model includes, defining the objective function, expressed as: , Among them, is the application deployment cost, is the mirror layer pulling time of time slot t, is the total request delay of time slot t, is the weight coefficient, represents the application whether it is deployed on the edge node in time slot t , is the time slot duration, is the edge node the request arrival rate within time slot t, is the set of edge nodes; defining the constraints, expressed as: , , , , , , Among them, is a set of application programs, is an application program required service set, is a service required mirror layer, is the mirror layer data volume, is the mirror layer whether it is cached in the edge node at time slot t , are the CPU, RAM, and disk resources of the edge node respectively, and are the CPU and RAM requirements of the lightweight registry, are the disk space, CPU, and RAM required by the service respectively.
5. The method for distributed fine-grained service caching in a computing power network according to claim 4, wherein: the initial application deployment decision is generated by calculating the centroid coordinates of user requests, specifically including: Calculating edge nodes User request volume of the application at time slot t ; ; Map the network topology to a two-dimensional plane through multi-scale analysis to obtain the coordinates of each edge node ; ; the centroid coordinates are expressed as: , , selecting the edge node closest to the centroid coordinates and satisfying the constraints for application deployment.
6. The method for distributed fine-grained service caching in a computing power network according to claim 5, wherein: the initial service caching decision is generated through the ε-greedy strategy, including, Based on application popularity Sort multiple applications in descending order; Traverse the sorted application programs and their required container image layers to select the image layer of the next application program for caching with a probability of until the cache capacity limit of the edge node is reached.
7. The method for distributed fine-grained service caching in a computing power network according to claim 6, wherein: the multi-objective optimization model uses the NSGA-II algorithm to optimize the initial application deployment decision and the initial service caching decision, specifically including: initializing the population based on the generated initial decisions; optimizing the population through non-dominated sorting and crowding distance calculation, where non-dominated sorting considers the objective function and constraint violation values mentioned above; generating the next generation population through crossover and mutation operations until the maximum iteration number or convergence condition is met.
8. A distributed fine-grained service caching system for a computing power network, characterized in that: including an optimization model construction module, a decision generation module, and a network state update module; the optimization model construction module is used to construct a multi-objective optimization model for optimizing application deployment and service caching decisions based on the access frequency of applications and the network topology; the decision generation module is used to generate initial application deployment and service caching decisions based on the network state of the current time slot within each time slot, and optimize them through the multi-objective optimization algorithm; the network state update module is used to update the deployment and service caching status of the computing power network according to the optimized program deployment and service caching decisions, and use the updated network state for the optimization of the next time slot.
9. An electronic device, comprising a memory and a processor, characterized in that: a computer program that can run on the processor is stored in the memory, and when the program is executed on the processor, it implements the steps in the distributed fine-grained service caching method for the computing power network according to any one of claims 1-7.
10. A storage medium storing a computer program, characterized in that: when the computer program is executed by the processor, it implements the steps in the distributed fine-grained service caching method for the computing power network according to any one of claims 1-7.
Citation Information
Patent Citations
Automatic driving vehicle computing power network and edge computing unloading method thereof
CN118510044A
Service caching and task unloading method in vehicle edge computing network
CN118612794A