A resource caching method, device, equipment and storage medium
By estimating and hierarchically storing target model resources, the cache resource utilization of MEC nodes is improved, the problem of resource acquisition request delay in the digital twin system is solved, and lower response delay is achieved.
Patent Information
- Application Number
- CN202210677908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The cache resource utilization of MEC nodes in the digital twin system is low, resulting in increased response delays for resource acquisition requests, which cannot meet the delay requirements.
By estimating the target model resource requirements required for 3D model rendering, it is divided into different levels of model resource collections, and hierarchically stored in MEC nodes. The underlying MEC nodes and cluster heads in the cluster are used for storage to improve Hit rate of resource acquisition requests and cache resource utilization.
It improves the cache resource utilization of MEC nodes, reduces the response delay of resource acquisition requests of the digital twin system, and meets the system's delay requirements.
Smart Images

Figure CN115102970B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of emerging information technology, and in particular to a resource caching method, device, equipment and storage medium. Background Art
[0002] The digital twin system is based on computer graphics and artificial intelligence. It dynamically simulates real-world elements in the virtual world, making the real world visible, controllable and simulatable in the virtual world.
[0003] The server in the digital twin system needs to use the model resources of the 3D (three dimensional) model to render into a high-definition video stream and transmit it to the client in the digital twin system; when the user views the 3D model through the client and the perspective changes, the server needs to obtain new model resources from the cloud data center for rendering and then transmit it to the client because the video stream under the new perspective needs to be transmitted to the client. Since the digital twin system is sensitive to latency requirements, the transmission latency based on the cloud data center cannot meet the requirements.
[0004] In the related art, the cloud data center pre-caches the model resources to the edge of the network, that is, pre-caches the model resources to the MEC (mobile edge computing) node close to the server. When the user watches the change of the perspective of the 3D model through the client, the server in the digital twin system sends a resource acquisition request for the new model resource to the MEC node, obtains the new model resource from the MEC node for rendering, and transmits the rendered video stream to the client to reduce the transmission delay of the resource acquisition request. However, due to the limited cache space on the MEC node, when the new model resource requested by the server is not cached in the MEC node, that is, the resource cached by the MEC node is not used by the server, it is still necessary to send a resource acquisition request for the new model resource to the cloud data center, which increases the response delay of the resource acquisition request.
[0005] Therefore, how to improve the cache resource utilization of MEC nodes to reduce the response delay of resource acquisition requests of digital twin systems has become a technical problem that needs to be solved urgently. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide a resource caching method, device, equipment and storage medium to improve the cache resource utilization of MEC nodes, thereby reducing the response delay of resource acquisition requests of digital twin systems; in addition, the embodiments of the present invention also provide a resource access method to reduce the response delay of resource acquisition requests of digital twin systems. The specific technical solution is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a resource caching method, which is applied to a master control node in a mobile edge computing MEC cluster, and the method includes:
[0008] estimating the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model;
[0009] Based on the demand of each target model resource, the target model resources are divided into a first model resource set and a second model resource set; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set;
[0010] Each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node within the same preset range of transmission delay with the server in the digital twin system; the target cluster is a cluster whose transmission delay with the server belongs to the lowest preset range; the underlying MEC node in each cluster is the MEC node in the cluster except the cluster head, and the cluster head in each cluster is the MEC node with the lowest access frequency of the server;
[0011] Each target model resource in the second model resource set is stored using a cluster head of at least one cluster.
[0012] Optionally, the estimating the demand for each target model resource required for 3D model rendering includes:
[0013] After entering each cycle, estimate the demand for resources of each target model in that cycle.
[0014] Optionally, after entering each cycle, estimating the demand for each target model resource in the cycle includes:
[0015] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified time period is used to estimate the demand for the target model resource within the cycle;
[0016] The specified duration is the duration from the start time of the historical cycle to the current time of the current cycle; and the historical cycle is the cycle before the current cycle.
[0017] Optionally, after entering each cycle, for each target model resource, using the number of times the model resource is requested within a specified time period, estimating the demand for the target model resource within the cycle includes:
[0018] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified period of time and a predetermined calculation formula are used to estimate the demand for the target model resource within the cycle; wherein the predetermined calculation formula includes:
[0019]
[0020] Among them, i is the cycle identifier, Value i is the demand for the model resource in the current period, Value i-1 is the demand for the model resource in the historical period, Count1 is the number of times the model resource is requested in the first period, and Count i is the number of times the model resource is requested in the current cycle, and γ is a weight preset for the digital twin system.
[0021] Optionally, storing each target model resource in the first model resource set using an underlying MEC node of a target cluster in at least one cluster includes:
[0022] From each bottom-layer MEC node of the target cluster, select the bottom-layer MEC node with the most remaining cache space as the target MEC node;
[0023] Storing the first model resource with the highest demand in the first model resource set in the target MEC node;
[0024] The first model resource with the highest demand is deleted from the first model resource set, and the step of selecting the bottom-level MEC node with the largest remaining cache space from each bottom-level MEC node of the target cluster is returned as the target MEC node.
[0025] Optionally, the method further comprises:
[0026] If the cache space of the target MEC node is smaller than the storage space required to store the first model resource with the highest demand, the remaining target model resources in the first model resource set are added to the second model resource set.
[0027] Optionally, storing each target model resource in the second model resource set by using a cluster head of at least one cluster includes:
[0028] From at least one cluster, select a cluster head with the most remaining cache space and determine it as the target cluster head;
[0029] storing the second model resource with the highest demand in the second model resource set in the target cluster head;
[0030] The second model resource with the highest demand is deleted from the second model resource set, and the step of returning to the step of selecting a cluster head with the most remaining cache space from at least one cluster and determining it as the target cluster head is performed.
[0031] Optionally, the method further comprises:
[0032] If the cache space of the target cluster head is smaller than the storage space required for storing the second model resource with the highest demand, the cache is terminated.
[0033] In a second aspect, an embodiment of the present invention provides a resource access method based on any of the resource caching methods described above, which is applied to a server in a digital twin system, and the method includes:
[0034] In response to a perspective switching operation of a client in the digital twin system, determining a target model resource required for a new perspective after the perspective switching operation;
[0035] Send a resource acquisition request for the target model resource to the target cluster communicating with the server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server; if the target model resource is not stored in the target cluster, send a resource acquisition request for the target model resource to other clusters communicating with the target cluster, so that if the target model resource is stored in the other clusters, the target model resource is transmitted to the server;
[0036] The target model resource is received.
[0037] Optionally, sending a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server, including:
[0038] A resource acquisition request for the target model resource is sent to at least one designated MEC node in the target cluster that communicates with the server in the digital twin system, so that if the target model resource is stored in the designated MEC node, the target model resource is transmitted to the server; if the target model resource is not stored in the designated MEC node, a resource acquisition request for the target model resource is sent to other MEC nodes in the target cluster except the designated MEC node, so that if the target model resource is stored in the other MEC nodes, the target model resource is transmitted to the server.
[0039] Optionally, the method further comprises:
[0040] If the target model resource is not stored in the other cluster, a resource acquisition request for the target model resource is sent to the cloud data center, so that the cloud data center transmits the target model resource to the server.
[0041] In a third aspect, an embodiment of the present invention provides a resource caching system, comprising a master control node and at least one cluster, each cluster including a transmission delay with a server in a digital twin system, a mobile edge computing MEC node within the same preset range, and the MEC nodes in each cluster include a cluster head and underlying MEC nodes other than the cluster head, the cluster head in each cluster is the MEC node with the lowest access frequency of the server, and data is transmitted between clusters through the cluster head;
[0042] The master control node is used to estimate the demand for each target model resource required for 3D model rendering; based on the demand for each target model resource, the target model resources are divided into a first model resource set and a second model resource set; each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster in at least one cluster; each model resource in the second model resource set is stored using the cluster head of at least one cluster; wherein each target model resource is a model resource for a 3D model; the demand for any target model resource in the first model resource set is higher than the demand for each target model resource in the second model resource set; the target cluster is a cluster whose transmission delay with the server is within the lowest preset range;
[0043] The bottom layer MEC node of the target cluster is used to store each target model resource in the first model resource set;
[0044] The cluster head of the at least one cluster is used to store each target model resource in the second model resource set.
[0045] In a fourth aspect, an embodiment of the present invention provides a resource caching device, which is applied to a master control node in a mobile edge computing MEC cluster, and the device includes:
[0046] An estimation module, used for estimating the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model;
[0047] A division module, used for dividing each target model resource into a first model resource set and a second model resource set based on the demand of each target model resource; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set;
[0048] A first storage module is used to store each target model resource in the first model resource set using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node within the same preset range of transmission delay with the server in the digital twin system; the target cluster is a cluster whose transmission delay with the server belongs to the lowest preset range; the underlying MEC node in each cluster is the MEC node in the cluster except the cluster head, and the cluster head in each cluster is the MEC node with the lowest access frequency of the server;
[0049] The second storage module is used to store each target model resource in the second model resource set using a cluster head of at least one cluster.
[0050] Optionally, the estimation module is specifically used to:
[0051] After entering each cycle, estimate the demand for resources of each target model in that cycle.
[0052] Optionally, after entering each cycle, estimating the demand for each target model resource in the cycle includes:
[0053] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified time period is used to estimate the demand for the target model resource within the cycle;
[0054] The specified duration is the duration from the start time of the historical cycle to the current time of the current cycle; and the historical cycle is the cycle before the current cycle.
[0055] Optionally, after entering each cycle, for each target model resource, using the number of times the model resource is requested within a specified time period, estimating the demand for the target model resource within the cycle includes:
[0056] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified period of time and a predetermined calculation formula are used to estimate the demand for the target model resource within the cycle; wherein the predetermined calculation formula includes:
[0057]
[0058] Among them, i is the cycle identifier, Value i is the demand for the model resource in the current period, Value i-1 is the demand for the model resource in the historical period, Count1 is the number of times the model resource is requested in the first period, and Count iis the number of times the model resource is requested in the current cycle, and γ is a weight preset for the digital twin system.
[0059] Optionally, the first storage module includes:
[0060] The first selection submodule is used to select the bottom-level MEC node with the most remaining cache space from each bottom-level MEC node of the target cluster as the target MEC node;
[0061] A first storage submodule, configured to store the first model resource with the highest demand in the first model resource set to the target MEC node;
[0062] The first deletion submodule is used to delete the first model resource with the highest demand from the first model resource set, and return to the step of selecting the bottom-level MEC node with the most remaining cache space from each bottom-level MEC node of the target cluster as the target MEC node.
[0063] Optionally, the device further comprises:
[0064] An adding module is used to add the remaining target model resources in the first model resource set to the second model resource set if the cache space of the target MEC node is less than the storage space required to store the first model resource with the highest demand.
[0065] Optionally, the second storage module includes:
[0066] The second selection submodule is used to select a cluster head with the most remaining cache space from at least one cluster and determine it as a target cluster head;
[0067] A second storage submodule is used to store the second model resource with the highest demand in the second model resource set in the target cluster head;
[0068] The second deletion submodule is used to delete the second model resource with the highest demand from the second model resource set, and return to the step of selecting the cluster head with the most remaining cache space from at least one cluster and determining it as the target cluster head.
[0069] Optionally, the device further comprises:
[0070] The ending module is used to end the cache if the cache space of the target cluster head is smaller than the storage space required for storing the second model resource with the highest demand.
[0071] In a fifth aspect, an embodiment of the present invention provides a resource access device based on any of the resource caching methods described above, which is applied to a server in a digital twin system, and the device includes:
[0072] A determination module, configured to determine, in response to a perspective switching operation of a client in the digital twin system, target model resources required for a new perspective after the perspective switching operation;
[0073] A sending module, used for sending a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server; if the target model resource is not stored in the target cluster, a resource acquisition request for the target model resource is sent to other clusters communicating with the target cluster, so that if the target model resource is stored in the other clusters, the target model resource is transmitted to the server;
[0074] The receiving module is used to receive the target model resource.
[0075] Optionally, the sending module sends a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server, including:
[0076] A resource acquisition request for the target model resource is sent to at least one designated MEC node in the target cluster that communicates with the server in the digital twin system, so that if the target model resource is stored in the designated MEC node, the target model resource is transmitted to the server; if the target model resource is not stored in the designated MEC node, a resource acquisition request for the target model resource is sent to other MEC nodes in the target cluster except the designated MEC node, so that if the target model resource is stored in the other MEC nodes, the target model resource is transmitted to the server.
[0077] Optionally, the sending module is further used for:
[0078] If the target model resource is not stored in the other cluster, a resource acquisition request for the target model resource is sent to the cloud data center, so that the cloud data center transmits the target model resource to the server. In a sixth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0079] Memory, used to store computer programs;
[0080] The processor is used to implement any of the steps of the resource caching method or resource access method described above when executing the program stored in the memory.
[0081] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned resource caching methods or steps of the resource access method.
[0082] Beneficial effects of the embodiments of the present invention:
[0083] The resource caching method provided in the embodiment of the present invention first estimates the demand for each target model resource required for 3D model rendering, and then divides each target model resource into a first model resource set and a second model resource set according to the demand for each target model resource, and uses the underlying MEC node of the target cluster in at least one cluster to store each target model resource in the first model resource set, and uses the cluster head of at least one cluster to store each target model resource in the second model resource set. Since the MEC nodes are layered, different layers store model resources with different demand, so that target model resources with higher demand can be stored in MEC nodes with higher access frequency, and target model resources with lower demand can be stored in MEC nodes with lower access frequency, which can improve the hit rate of MEC nodes for resource acquisition requests, thereby improving the cache resource utilization of MEC nodes, so as to reduce the response delay of resource acquisition requests of digital twin systems. In addition, since the target storage resources with higher demand are stored in the underlying MEC nodes in the target cluster, and the target cluster is a cluster with a transmission delay with the server belonging to the lowest preset range, the response delay of resource acquisition requests of the digital twin system can be further reduced.
[0084] In addition, the resource access method of the model provided in an embodiment of the present invention can reduce the response delay of the resource acquisition request of the digital twin system by sending a resource acquisition request for the target model resource to the target cluster communicating with the server in the digital twin system, and if the target model resource is not stored in the target cluster, sending a resource acquisition request for the target model resource to other clusters communicating with the target cluster.
[0085] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0087] Figure 1 A flowchart of a resource caching method provided by an embodiment of the present invention;
[0088] Figure 2 Another flow chart of the resource caching method provided by an embodiment of the present invention;
[0089] Figure 3 Another flow chart of the resource caching method provided by the embodiment of the present invention;
[0090] Figure 4 A flow chart of a resource access method provided by an embodiment of the present invention;
[0091] Figure 5 A hierarchical MEC network architecture diagram for implementing an embodiment of the present invention;
[0092] Figure 6 A flowchart of a specific example of a resource caching method provided by an embodiment of the present invention;
[0093] Figure 7 A schematic diagram of the structure of a resource cache system provided by an embodiment of the present invention;
[0094] Figure 8 A schematic diagram of the structure of a resource cache device provided in an embodiment of the present invention;
[0095] Fig. 9 A schematic diagram of the structure of a resource access device provided by an embodiment of the present invention;
[0096] Fig.10 A block diagram of an electronic device for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0097] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.
[0098] The following first introduces the professional terms involved in the embodiments of the present invention:
[0099] Digital twin system: can be used for simulation, modeling, analysis and decision-making assistance. The digital twin system focuses on the reproduction, analysis and decision-making of physical objects in the data world. It realizes the synchronous visualization of urban environment, management, equipment, etc., and improves the management level and decision-making efficiency of enterprises or cities.
[0100] MEC nodes: MEC "sinks" the services and functions originally located in the cloud data center to the edge of the mobile network - MEC nodes. By deploying computing, storage, network and communication resources at the edge of the mobile network, it reduces the response delay of user requests and improves the user service experience.
[0101] The digital twin system requires smooth loading and rendering of massive model resources of 3D models, and requires certain storage, computing and communication resources. At the same time, many scenarios of the digital twin system have high requirements for latency, and the transmission latency based on cloud data centers cannot meet the requirements. For example, for the digital twin system of industrial scenarios, since industrial data changes very quickly, if it is not updated in time, a lot of data will accumulate, causing data congestion, or the state of the digital twin system will jump after receiving the accumulated data.
[0102] In the related art, the cloud data center pre-caches the model resources to the edge of the network, that is, pre-caches the model resources to the MEC node close to the server. When the user watches the change of the perspective of the 3D model through the client, the server in the digital twin system sends a resource acquisition request for the new model resource to the MEC node, obtains the new model resource from the MEC node for rendering, and transmits the rendered video stream to the client to reduce the transmission delay of the resource acquisition request. However, the cache resources on the MEC node are limited. When the cache resources of the MEC node hit the perspective requested by the server, that is, the model resources cached by the MEC node hit the model resources corresponding to the perspective requested by the server, then the server can be appropriately allocated less bandwidth resources. If the new model resource requested by the server is not stored in the MEC node, it is still necessary to send a resource acquisition request for the new model resource to the cloud data center, which increases the response delay of the resource acquisition request. At this time, in order to reduce the response delay, more bandwidth resources need to be allocated to the server, which causes a large amount of communication resources to be consumed.
[0103] Based on the above content, in order to improve the cache resource utilization of MEC nodes and reduce the response delay of resource acquisition requests of digital twin systems, an embodiment of the present invention provides a resource caching method, device, equipment and storage medium.
[0104] Below, firstly, a resource caching method provided by an embodiment of the present invention is introduced.
[0105] A resource caching method provided in this embodiment is applied to a master node in a mobile edge computing MEC cluster. Specifically, the executor of the resource caching method may be a resource caching device, which is a computer program running in the master node in the mobile edge computing MEC cluster. The computer program is used to store model resources when executed.
[0106] The method for caching resources provided in the embodiment of the present invention may include the following steps:
[0107] estimating the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model;
[0108] Based on the demand of each target model resource, the target model resources are divided into a first model resource set and a second model resource set; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set;
[0109] Each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node whose transmission delay with the server in the digital twin system belongs to the same preset range; the target cluster is a cluster whose transmission delay with the server belongs to the lowest preset range; the underlying MEC node in each cluster is the MEC node in the cluster except the cluster head, and the cluster head in each cluster is the MEC node with the lowest access frequency of the server;
[0110] Each target model resource in the second model resource set is stored using a cluster head of at least one cluster.
[0111] The solution provided by the embodiment of the present invention first estimates the demand for each target model resource required for 3D model rendering, and then divides each target model resource into a first model resource set and a second model resource set according to the demand for each target model resource, and uses the underlying MEC node of the target cluster in at least one cluster to store each target model resource in the first model resource set, and uses the cluster head of at least one cluster to store each target model resource in the second model resource set. Since the MEC nodes are layered, different layers store model resources with different demand, so that target model resources with higher demand can be stored in MEC nodes with higher access frequency, and target model resources with lower demand can be stored in MEC nodes with lower access frequency, which can improve the hit rate of MEC nodes for resource acquisition requests, thereby improving the cache resource utilization of MEC nodes, so as to reduce the response delay of resource acquisition requests of digital twin systems. In addition, since the target storage resources with higher demand are stored in the underlying MEC nodes in the target cluster, and the target cluster is a cluster with a transmission delay with the server belonging to the lowest preset range, the response delay of resource acquisition requests of the digital twin system can be further reduced.
[0112] The following describes a resource caching method provided by an embodiment of the present invention in conjunction with the accompanying drawings.
[0113] like Figure 1 As shown, the resource caching method provided in the embodiment of the present invention may include steps S101-S104:
[0114] S101, estimating the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model;
[0115] In this embodiment, each target model resource is a model resource for a 3D model. For example, the 3D model may be a city model, an industrial park model, etc. The model resource of the 3D model may include information about each 3D element in the 3D model, and location information for connecting each 3D element. For example, if the 3D model is a city model, the model resource in the 3D model may include information about elements such as buildings, traffic lights, and roads, and location information for combining each element according to different positions.
[0116] It can be understood that due to the limited cache resources in the MEC nodes, in order to reduce the response delay of the digital twin system to the resource acquisition request of each target model resource, in this embodiment, the demand for each target model resource required for 3D model rendering can be first estimated, and then according to the demand of each target model resource, the target model resources with higher demand can be stored in the MEC nodes with higher access frequency, and the target model resources with lower demand can be stored in the MEC nodes with lower access frequency, thereby improving the cache resource utilization of the MEC nodes.
[0117] Exemplarily, the method for estimating the demand for each target model resource may be to calculate the ratio of the number of requests for each target model resource received by each MEC node in a historical time period to the total number of requests in the historical time period, as the estimated demand for each target model resource. Exemplarily, the method for estimating the demand for each target model resource may also be to calculate the demand for each historical period in each historical time period, and estimate the demand for each target model resource in the current period based on the relationship between the demand for each target model resource in each adjacent historical period. It should be noted that the embodiments of the present invention do not limit the method for estimating the demand for each target model resource.
[0118] In addition, it should be noted that for the various target model resources required for 3D model rendering, including the various target model resources not stored on the various MEC nodes of the MEC cluster, the MEC node obtains the various target model resources from the cloud data center and performs subsequent storage operations based on the estimated demand for each target model resource to improve the cache resource utilization of the MEC node.
[0119] S102, based on the demand of each target model resource, dividing each target model resource into a first model resource set and a second model resource set; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set;
[0120] In this embodiment, each target model resource is divided into the first model resource set or the second model resource set according to the level of demand, and the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set. Exemplarily, the method of dividing each target model resource into the first model resource set and the second model resource set may be to set a threshold of demand, and for each target model resource, divide the target model resource with a demand greater than the threshold into the first model resource set, and divide the target model resource with a demand less than the threshold into the second model resource set. Exemplarily, the method of dividing each target model resource into the first model resource set and the second model resource set may also be to sort the demand of each target model resource, and divide several target resource models with a higher ranking into the first model resource set, and divide the remaining target model resources into the second model resource set. It should be noted that the embodiment of the present invention does not limit the method of dividing each target model resource into the first model resource set and the second model resource set.
[0121] S103, storing each target model resource in the first model resource set using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node within the same preset range with respect to the transmission delay with the server in the digital twin system; the target cluster is a cluster with a transmission delay with respect to the server within the lowest preset range; the underlying MEC node in each cluster is an MEC node in the cluster other than the cluster head, and the cluster head in each cluster is an MEC node with the lowest access frequency by the server;
[0122] In this embodiment, the mobile edge computing MEC nodes within the same preset range of the transmission delay with the server in the digital twin system are divided into a cluster, that is, the transmission delay between the MEC nodes in each cluster and the server is similar. For example, if the transmission delay of every 10 seconds is a preset range, the transmission delay between MEC node 1 and the server is 5 seconds, the transmission delay between MEC node 2 and the server is 3 seconds, the transmission delay between MEC node 3 and the server is 11 seconds, and the transmission delay between MEC node 4 and the server is 15 seconds, then MEC node 1 and MEC node 2 are divided into the same cluster, and MEC node 3 and MEC node 4 are divided into the same cluster. It should be noted that the preset range can be set by relevant technical personnel according to the usage scenario of the digital twin system, and the embodiments of the present invention are not limited to this.
[0123] Each cluster includes an underlying MEC node and a cluster head, wherein the cluster head is the MEC node with the lowest access frequency of the server, and the underlying MEC node is the MEC node in the cluster other than the cluster head. Since the target cluster is a cluster whose transmission delay with the server belongs to the lowest preset range, the transmission delay between the MEC node in the target cluster and the server is less than the transmission delay between the MEC node in other clusters and the server. In this embodiment, in order to meet the server's requirements for transmission delay, each target model resource in the first model resource set can be stored using the underlying MEC node of the target cluster in at least one cluster. It can be understood that since each target model resource in the first model resource set is a model resource with a higher demand, each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster, so that the underlying MEC node can hit more resource acquisition requests, thereby reducing the response delay of the resource acquisition request of the digital twin system.
[0124] It should be noted that the digital twin system is the digital twin system corresponding to the above-mentioned 3D model. Exemplarily, if the above-mentioned 3D model is a city model, then the digital twin system may be the digital twin system corresponding to the city model, in which case the above-mentioned target model resources are model resources for the city model; if the above-mentioned 3D model is an industrial park model, then the digital twin system may be the digital twin system corresponding to the industrial park model, in which case the above-mentioned target model resources are model resources for the industrial park model.
[0125] S104: Store each target model resource in the second model resource set using a cluster head of at least one cluster.
[0126] In this embodiment, each target model resource in the second model resource set is a model resource with low demand. Since the cluster head of each cluster is the MEC node with the lowest access frequency of the server in the cluster, each target model resource in the second model resource set is stored using the cluster head of at least one cluster, so that the cluster head can hit the resource acquisition request for the model resource with low demand, thereby making full use of the cache resources of the cluster head. And by storing the target model resources with high demand in the underlying MEC node of the target cluster and storing the target model resources with low demand in the cluster heads of each cluster, the service requests can be balanced.
[0127] In addition, it should be noted that clusters can communicate with each other through cluster heads. If the required target model resource is not cached in the current cluster accessed by the server, a resource acquisition request for the target model resource can be sent to the cluster heads of other clusters through the cluster head of the current cluster, so that if the target model resource is stored in other clusters, the target model resource will be sent to the server.
[0128] The solution provided by the embodiment of the present invention first estimates the demand for each target model resource required for 3D model rendering, and then divides each target model resource into a first model resource set and a second model resource set according to the demand for each target model resource, and uses the underlying MEC node of the target cluster in at least one cluster to store each target model resource in the first model resource set, and uses the cluster head of at least one cluster to store each target model resource in the second model resource set. Since the MEC nodes are layered, different layers store model resources with different demand, so that target model resources with higher demand can be stored in MEC nodes with higher access frequency, and target model resources with lower demand can be stored in MEC nodes with lower access frequency, which can improve the hit rate of MEC nodes for resource acquisition requests, thereby improving the cache resource utilization of MEC nodes, so as to reduce the response delay of resource acquisition requests of digital twin systems. In addition, since the target storage resources with higher demand are stored in the underlying MEC nodes in the target cluster, and the target cluster is a cluster with a transmission delay with the server belonging to the lowest preset range, the response delay of resource acquisition requests of the digital twin system can be further reduced.
[0129] Optionally, in another embodiment of the present invention, estimating the demand for each target model resource required for 3D model rendering in the above step S101 may include:
[0130] After entering each cycle, estimate the demand for resources of each target model in that cycle.
[0131] In this embodiment, by periodically measuring the demand for each target model resource, after entering each cycle, the demand for each target model resource in the cycle is estimated, and then each target model resource can be stored according to the demand for each target model resource in the cycle, so as to periodically update the target model resources stored in the MEC node to ensure the stability of the utilization of the cache resources of the MEC node. Exemplarily, the length of the cycle can be one day, one week, and so on. It should be noted that the length of the cycle can be set by relevant technical personnel based on experience, and the embodiment of the present invention is not limited to this.
[0132] Optionally, in one implementation, after entering each cycle, estimating the demand for each target model resource in the cycle may include:
[0133] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified time period is used to estimate the demand for the target model resource within the cycle; wherein the specified time period is the time from the start time of the historical cycle to the current time of the current cycle; and the historical cycle is the cycle before the current cycle.
[0134] That is, in this implementation, after entering each cycle, for each target model resource, the number of times the model resource has been requested in the current cycle and the number of times the model resource has been requested in the previous cycle of the current cycle are used to estimate the demand for the model resource in the current cycle. For the 3D model to be rendered, the target model resources required for different client perspectives are different. If the MEC node does not store the various target model resources required for rendering the 3D model, it is necessary to obtain the various target model resources from the cloud data center, and after obtaining the various target model resources, use the MEC node to store the model resources according to the demand for the various target model resources. At this point, resource acquisition requests for the various target model resources have occurred in this cycle. Therefore, when estimating the demand for the various target models in each cycle, in order to improve the accuracy of the estimate, the number of times the model resource has been requested within the specified time period can be used to estimate the demand for the target model resource in the cycle.
[0135] Exemplarily, in a specific implementation, after entering each cycle, for each target model resource, using the number of times the model resource is requested within a specified time period, estimating the demand for the target model resource within the cycle may include:
[0136] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified period of time and a predetermined calculation formula are used to estimate the demand for the target model resource within the cycle; wherein the predetermined calculation formula includes:
[0137]
[0138] Among them, i is the cycle identifier, Value i is the demand for model resources in the current period, Value i-1 is the demand for the model resource in the historical period. Count1 is the number of times the model resource was requested in the first period. i is the number of times the model resource is requested in the current cycle, and γ is the preset weight for the digital twin system.
[0139] In this implementation, if the current cycle is the first cycle, the demand for a target model resource in the cycle is the number of times the target model resource is requested in the cycle. If the current cycle is a cycle other than the first cycle, the demand for a target model resource in the cycle is determined by the number of times the target model resource is requested in the cycle and the demand for the target model resource in the previous cycle of the cycle. Wherein, γ is a preset weight for the digital twin system, and different digital twin systems can set different weights γ.
[0140] It should be noted that γ represents the proportion of past model resources to new model resources. It is understandable that for a digital twin city system, since the city model area is large, the proportion of old model resources after switching the perspective is relatively small, so the weight can be set to a relatively small value. For a digital twin park system, since the park model area is relatively small, the proportion of old model resources after switching the perspective is relatively large, so the weight can be set to a relatively large value.
[0141] It can be seen that through this solution, by periodically measuring the demand for each target model resource, after entering each cycle, the demand for each target model resource in the cycle is estimated, and then each target model resource can be stored according to the demand for each target model resource in the cycle, thereby periodically updating the target model resources stored in the MEC node, so that the cache resources of the MEC node are fully utilized in each cycle, thereby ensuring the stability of the cache resource utilization of the MEC node.
[0142] Alternatively, in another embodiment of the present invention, Figure 2 As shown, in the above step S103, each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster in at least one cluster, which may include steps S1031-S1033:
[0143] S1031, selecting the bottom-layer MEC node with the most remaining cache space from each bottom-layer MEC node of the target cluster as the target MEC node;
[0144] It is understandable that when storing each target model resource in the first model resource set using the underlying MEC node of the target cluster, it is necessary to consider the cache space of each underlying MEC node in the target cluster to reduce the probability of cache failure. Therefore, in this embodiment, the underlying MEC node with the most remaining cache space is first selected from each underlying MEC of the target cluster as the target MEC node.
[0145] S1032, storing the first model resource with the highest demand in the first model resource set in the target MEC node;
[0146] It can be understood that due to the limited cache space in each underlying MEC node, in order to reduce the response delay of the resource acquisition request of the digital twin system, the first model resource with the highest demand among the first model resources is preferentially stored in the target MEC node to improve the request hit rate of the MEC node, thereby reducing the response delay of the resource acquisition request of the digital twin system.
[0147] S1033, deleting the first model resource with the highest demand from the first model resource set, and returning to the step of selecting the bottom-level MEC node with the most remaining cache space from each bottom-level MEC node of the target cluster as the target MEC node.
[0148] After the first model resource with the highest demand is stored in the target MEC node through step S1032, the first model resource in the first model resource set can be deleted, and the step of determining the target MEC node can be returned. It can be understood that after the target MEC node in step S1032 stores the first model resource, the cache space in the target MEC node will become smaller. At this time, if other model resources in the first model resource set continue to be stored, there may be a problem of insufficient storage space, resulting in cache failure. Therefore, in order to maximize the priority storage of model resources with high demand in the first model resource set, this embodiment can re-determine a new target MEC node after each storage of the first model resource with the highest demand, so as to use the new MEC node to store new first model resources.
[0149] Accordingly, in this embodiment, the method further includes:
[0150] If the cache space of the target MEC node is smaller than the storage space required to store the first model resource with the highest demand, the remaining target model resources in the first model resource set are added to the second model resource set.
[0151] It is understandable that, during the storage process of the above step S1032, if the cache space of the target MEC node is smaller than the storage space required to store the first model resource with the highest demand, the target MEC node cannot store the first model resource at this time. Since the demand for each target model resource in the first model resource set is higher than the demand for each target model resource in the second model resource set, in order to give priority to storing each target model resource in the first model resource set, the remaining target model resources in the first model resource set can be added to the second model resource set, so that when the target model resources in the second model resource set are subsequently stored, the target model resources added to the second model resource set are given priority in storage.
[0152] It can be seen that through this solution, the priority storage of model resources with high demand in the first model resource set can be achieved to the greatest extent, so as to improve the hit rate of resource acquisition requests of the underlying MEC nodes, thereby improving the cache resource utilization of the underlying MEC nodes, and further reducing the response delay of resource acquisition requests of the digital twin system.
[0153] Alternatively, in another embodiment of the present invention, Figure 3 As shown, in the above step S104, each target model resource in the second model resource set is stored using a cluster head of at least one cluster, which may include steps S1041-S1043:
[0154] S1041, selecting a cluster head with the most remaining cache space from at least one cluster and determining it as a target cluster head;
[0155] It is understandable that when storing each target model resource in the second model resource set using the cluster head of at least one cluster, the cache space of the cluster head of the at least one cluster needs to be considered to reduce the probability of cache failure. Therefore, in this embodiment, the cluster head with the most remaining cache space is first selected from the cluster heads of the at least one cluster as the target cluster head.
[0156] S1042, storing the second model resource with the highest demand in the second model resource set in the target cluster head;
[0157] It can be understood that due to the limited cache space in the target cluster head, in order to reduce the response delay of the resource acquisition request of the digital twin system, the second model resource with the highest demand among the second model resources is preferentially stored in the target cluster head to improve the request hit rate of the target cluster head, thereby reducing the response delay of the resource acquisition request of the digital twin system.
[0158] S1043, deleting the second model resource with the highest demand from the second model resource set, and returning to the step of selecting the cluster head with the most remaining cache space from at least one cluster and determining it as the target cluster head.
[0159] After the second model resource with the highest demand is stored in the target cluster head by step S1042, the second model resource in the second model resource set can be deleted, and the step of determining the target cluster head is returned. It is understandable that after the target cluster head in step S1042 has stored the second model resource, the cache space in the target cluster head will become smaller. If other model resources in the second model resource set are continued to be stored at this moment, the problem of insufficient storage space may occur, thereby causing cache failure. Therefore, in order to guarantee that the model resource with high demand in the second model resource set is stored preferentially to the greatest extent, the present embodiment can re-determine a new target cluster head after storing the second model resource with the highest demand at each time, so as to utilize the new target cluster head to store the new second model resource.
[0160] Accordingly, in this embodiment, the method further includes:
[0161] If the cache space of the target cluster head is smaller than the storage space required for storing the second model resource with the highest demand, the cache is terminated.
[0162] It is understandable that, in the storage process of the above step S1042, if the cache space of the target cluster head is less than the storage space required to store the second model resource with the highest demand, the target cluster head cannot store the second model resource. Since the target cluster head is the cluster head with the most remaining cache space among the cluster heads, none of the at least one cluster head can store the second model resource, and the cache is terminated at this time.
[0163] It can be seen that through this solution, the priority storage of model resources with high demand in the second model resource set can be achieved to the greatest extent, so as to improve the hit rate of the cluster head for resource acquisition requests, thereby improving the cache resource utilization of the cluster head, and further reducing the response delay of the resource acquisition request of the digital twin system.
[0164] Corresponding to the above-mentioned resource caching method embodiment, the present invention also provides a resource access method, which is applied to the server in the digital twin system, such as Figure 4 As shown, steps S401-S403 may be included:
[0165] S401, in response to a perspective switching operation of a client in the digital twin system, determining a target model resource required for a new perspective after the perspective switching operation;
[0166] It is understandable that when a client in a digital twin system switches perspective, the server needs to render the model resources corresponding to the new perspective and transmit them to the client. At this time, the server can first determine the target model resources required for the new perspective after the perspective switching operation.
[0167] S402, sending a resource acquisition request for the target model resource to the target cluster communicating with the server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server; if the target model resource is not stored in the target cluster, sending a resource acquisition request for the target model resource to other clusters communicating with the target cluster, so that if the target model resource is stored in the other clusters, the target model resource is transmitted to the server;
[0168] In this embodiment, after determining the target model resources required for the new perspective, the server can send a resource acquisition request for the target model resources to the target cluster that communicates with the server in the digital twin system. It can be understood that since the target cluster is the cluster with the lowest transmission delay with the server, the server first sends a resource acquisition request for the target model resources to the target cluster after determining the required target model resources. And since the first model resources with high demand are stored in the underlying MEC nodes in the target cluster, sending a resource acquisition request for the target model resources to the target cluster can increase the hit probability of the resource acquisition request, so as to reduce the response delay of the resource acquisition request of the digital twin system.
[0169] Since data is transmitted between clusters through cluster heads, if the target model resource is not stored in the target cluster, a resource acquisition request for the target model resource can be sent to the cluster heads of other clusters communicating with the target cluster through the cluster head of the target cluster, so that if the target model resource is stored in the other cluster, the target model resource is transmitted to the server. It can be understood that since the cluster head stores a second model resource with low demand, if the target model resource is not stored in the target cluster, by sending a resource acquisition request for the target model resource to the other cluster, compared with directly sending a resource acquisition request to the cloud data center, the response delay of the resource acquisition request of the digital twin system is reduced.
[0170] Optionally, in one implementation, sending a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server, may include:
[0171] A resource acquisition request for the target model resource is sent to at least one designated MEC node in the target cluster that communicates with the server in the digital twin system, so that if the target model resource is stored in the designated MEC node, the target model resource is transmitted to the server; if the target model resource is not stored in the designated MEC node, a resource acquisition request for the target model resource is sent to other MEC nodes in the target cluster except the designated MEC node, so that if the target model resource is stored in the other MEC nodes, the target model resource is transmitted to the server.
[0172] In this implementation, the at least one designated MEC node may be a bottom-layer MEC node, or a cluster head. It is understandable that, since the MEC nodes in each cluster can transmit data to each other, if the target model resource is not stored in the designated MEC node, the designated MEC node may send a resource acquisition request to other MEC nodes in the target cluster except itself, so that if the target model resource is stored in the other MEC node, the target model resource is transmitted to the server.
[0173] S403: Receive the target model resource.
[0174] In this embodiment, after sending a resource acquisition request for the target model resource in step S402, if the target model resource is stored in each cluster that receives the resource acquisition request, the target model resource is transmitted to the server. At this time, the server receives the target model resource and completes the acquisition of the target model resource.
[0175] It can be seen that through this solution, by sending a resource acquisition request for the target model resource to the target cluster communicating with the server in the digital twin system, and if the target model resource is not stored in the target cluster, sending a resource acquisition request for the target model resource to other clusters communicating with the target cluster, the response delay of the resource acquisition request of the digital twin system can be reduced.
[0176] Optionally, in another embodiment of the present invention, Figure 4 Based on the embodiment shown, the method further includes:
[0177] If the target model resource is not stored in the other cluster, a resource acquisition request for the target model resource is sent to the cloud data center, so that the cloud data center transmits the target model resource to the server.
[0178] It is understandable that in Figure 4On the basis of the illustrated embodiment, the target cluster and other clusters store a first model resource with high demand and a second model resource with low demand, but due to the limited cache space of the MEC node, the various target model resources required for 3D model rendering are not completely stored on the MEC node. At this time, if the target model resource indicated by the resource acquisition request is not stored on the MEC node, that is, the target model resource is not stored in the other cluster, the other cluster can send a resource acquisition request for the target model resource to the cloud data center to ensure that the server can obtain the target model resource.
[0179] It can be seen that this solution can ensure that the server can obtain the target model resources.
[0180] In order to better understand the content of the embodiments of the present invention, Figure 5-Figure 6 A specific example of an embodiment of the present invention is introduced.
[0181] Figure 5 A hierarchical MEC network architecture diagram for implementing an embodiment of the present invention is shown. The hierarchical MEC network architecture divides each MEC node in the MEC cluster into clusters, each of which includes a cluster head and an underlying MEC node. Based on the hierarchical MEC network architecture, this example designs a pre-caching strategy for model resources required for rendering a 3D model corresponding to a digital twin system to address the problem of limited cache resources on MEC nodes, so as to improve the cache resource utilization of MEC nodes and reduce the response delay of resource acquisition requests of the digital twin system.
[0182] Since the distances between MEC nodes and the server in the digital twin system are different, the access volume of each MEC node is also different. In order to balance the resource access volume of each node in an edge computing environment, the embodiment of the present invention designs a layered MEC network architecture as follows: at the edge of the network, data can be shared between MEC nodes, and the MEC nodes at the edge of the network can be divided into multiple clusters by grouping MEC nodes with similar transmission delays to the server into a cluster. The MEC nodes in the cluster are divided according to the access rate. For nodes with high access rates, they are regarded as bottom-level MEC nodes. In order to reduce their burden, their data transmission with other MEC nodes outside the cluster is cut off. For MEC nodes with low access rates and underutilized resources, they are regarded as cluster heads, which are responsible for data transmission between other nodes in the service cluster and other clusters. The specific structure is as follows:
[0183] (1) Cluster: It is composed of MEC nodes that transmit data to each other and have similar transmission latency with the server.
[0184] (2) Cluster head: In each cluster, the MEC node whose server access rate is significantly lower than the access rate of other MEC nodes in the same cluster.
[0185] (3) Bottom-layer MEC nodes: Bottom-layer MEC nodes are other MEC nodes in each cluster except the cluster head, that is, nodes that are close to users and have high access rates.
[0186] The data transmission rules under this layered MEC network architecture are as follows:
[0187] The cluster heads of each cluster can transmit data to each other; the underlying MEC nodes under the same cluster can also transmit data to each other; the underlying MEC nodes under different clusters cannot transmit data directly, and can only transmit data through the links between cluster heads; the underlying MEC nodes that are not in the cluster cannot directly transmit data to the cluster head of the cluster.
[0188] Figure 6 A flowchart showing a specific example of a resource caching method provided by an embodiment of the present invention includes the following steps:
[0189] S601, obtaining model resources: If the target model resources requested by the server in the digital twin system are not cached by the MEC node, the server can obtain the target model resources requested by the server from the cloud data center. After the server obtains the target model resources, it can render the target model resources and transmit them to the client in the form of pixel streams.
[0190] S602, determine whether the MEC node has cache space, if so, go to step S603; if not, the cache ends.
[0191] S603: Estimate the resource requirements of each target model.
[0192] S604, determining whether the demand of each target model resource is greater than a preset threshold, wherein the preset threshold is a threshold for dividing each target model resource into a first model resource set and a second model resource set, and the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set. If so, proceed to step S605, if not, proceed to step S607.
[0193] S605, determine whether the cache space of the underlying MEC node is sufficient, if so, proceed to step S606, otherwise proceed to step S607.
[0194] S606, store the target model resources in the first model resource set in order from high to low demand: Sort by demand from high to low, and store each target model resource in the first model resource set in the underlying MEC node in turn. In each storage process, the underlying MEC node with the most remaining space is determined as the target MEC node, and the target model resource with the highest demand in the first model resource set is stored in the determined target MEC node. After each storage is completed, a new target MEC node needs to be re-determined. At this time, it is necessary to return to step S605 to determine whether the cache space of the underlying MEC node is sufficient. If sufficient, the target model resource with the highest demand among the remaining target model resources is stored until all target model resources in the first model resource set are stored, and the storage ends. If the cache space in the underlying MEC node is insufficient to store the target model resources, the remaining target model resources in the first model resource set are added to the second model resource set, and step S607 is entered.
[0195] S607, determine whether the cache space in the cluster head is sufficient, if so, proceed to step S608, if not, the cache ends.
[0196] S608, store the target model resources in the second model resource set in order from high to low according to the demand: Sort by high to low according to the demand, and store each target model resource in the second model resource set in the cluster head in order. In each storage process, the cluster head with the most remaining space is determined as the target cluster head, and the target model resource with the highest demand in the second model resource set is stored in the determined target cluster head. After each storage is completed, it is necessary to re-determine a new target cluster head. At this time, it is necessary to return to step S607 to determine whether the cache space of the cluster head is sufficient. If sufficient, the target model resource with the highest demand among the remaining target model resources is stored until all the target model resources in the second model resource set are stored, and the storage ends. If the cache space of the cluster head is not enough to store the target model resources, the remaining target model resources are discarded and the cache ends.
[0197] In order to better understand the caching process of each target model resource in this example, the caching process in the underlying MEC node and the caching process in the cluster head are introduced below.
[0198] (1) In the layered MEC network architecture, the bottom-level MEC nodes are used to cache model resources with high demand to improve the utilization of cache space and reduce cache pressure. The specific steps of bottom-level MEC node caching are:
[0199] The first step is to determine whether all underlying MEC nodes in the cluster with the closest transmission latency to the server have cache space.
[0200] In the second step, if available, select the underlying MEC node with the most remaining space and cache the target model resource with the highest demand in the first model resource set.
[0201] Step 3: Repeat step 2 until all high-demand model resources are cached.
[0202] In the fourth step, if there is no remaining space in the underlying MEC node, the remaining uncached model resources are placed in the first model resource set.
[0203] (2) The access rate of MEC cluster heads is low, and they are used to cache model resources with low demand but likely to be requested, so that the cache space of MEC nodes is fully utilized. The specific steps of cluster head caching are:
[0204] The first step is to determine whether all MEC cluster heads have cache space.
[0205] In the second step, if available, the cluster head with the most remaining storage space is selected to cache the target model resource with the highest demand in the second model resource set.
[0206] Step 3: Repeat step 2 until all model resources in the second model resource set are cached.
[0207] In the fourth step, if there is no remaining space in the cluster head, the remaining model resource cache is abandoned.
[0208] Next, the calculation of the demand for each target model resource in this example is introduced.
[0209] In this example, the model demand perception module periodically measures the demand of each model resource. Assuming that the perception period is t, the demand of the model is reflected by the number of requests. Each requested model resource maintains a demand table item as shown in Table 1. The table item consists of three parts: "Model ID" is used to identify each model resource, "Number of requests in this cycle" records the number of requests for the model resource in the current cycle, and "Demand" is the value of the model demand calculated in the previous cycle. After the current cycle ends, the model demand perception module recalculates the model demand cached in the MEC node.
[0210] Model Identification Number of requests per cycle Demand in the previous period SD1 Count1 V1 SD2 Count2 V2 SD3 Count3 V3
[0211] Table 1 Model Demand
[0212] The model demand perception module uses an exponentially weighted moving average to calculate the demand for model resources in this cycle. The expression of the exponentially weighted moving average is as follows:
[0213]
[0214] Among them, i is the cycle identifier, Value i is the demand for model resources in the current period, Value i-1 is the demand for the model resource in the previous cycle of the current cycle. Count1 is the number of times the model resource is requested in the first cycle. i is the number of times the model resource is requested in the current cycle, and γ is the preset weight for the digital twin system. The smaller γ is, the greater the proportion of past test values.
[0215] The model demand perception module maintains a ranking table of models, as shown in Table 2, and only needs to record the model identifier and the model demand ranking of this cycle. In addition, the model demand perception module can maintain a timer, the timing length of the timer is slightly greater than t, and after timeout, the corresponding table entry is updated.
[0216] Model Identification Sorting SD1 Rank1 SD2 Rank2 SD3 RankN
[0217] Table 2 Demand ranking table
[0218] It can be seen that through this solution, based on the layered MEC network architecture, the cache resources of MEC nodes are fully utilized to improve the cache resource utilization of MEC nodes; by pre-caching the model resources required by the digital twin system in the MEC node, the response delay of the resource acquisition request of the digital twin system can be reduced. In addition, by designing a calculation method for the demand degree of model resources, judging the degree of demand for model resources in a certain period of time by estimating the demand degree, and performing accurate pre-caching, the rendering speed of the 3D model required by the digital twin system can be improved and the response delay can be reduced.
[0219] Corresponding to the above method embodiment, the present invention also provides a resource cache system, such as Figure 7 As shown, it includes a master control node 710 and at least one cluster 720, each cluster includes a transmission delay with the server in the digital twin system, a mobile edge computing MEC node within the same preset range, and the MEC nodes in each cluster include a cluster head and underlying MEC nodes other than the cluster head. The cluster head in each cluster is the MEC node with the lowest access frequency of the server, and data is transmitted between clusters through the cluster head;
[0220] The master control node 710 is used to estimate the demand for each target model resource; based on the demand for each target model resource, the target model resources are divided into a first model resource set and a second model resource set; each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster in at least one cluster; each model resource in the second model resource set is stored using the cluster head of at least one cluster; wherein each target model resource is a model resource for a 3D model; the demand for any target model resource in the first model resource set is higher than the demand for each target model resource in the second model resource set; the target cluster is a cluster whose transmission delay with the server is within the lowest preset range;
[0221] The bottom layer MEC node of the target cluster is used to store each target model resource in the first model resource set;
[0222] The cluster head of the at least one cluster is used to store each target model resource in the second model resource set.
[0223] It should be noted that the specific implementation methods of the above-mentioned functions of the master control node, the underlying MEC node and the cluster head can be found in the relevant content of the above-mentioned method embodiment, which will not be repeated here.
[0224] Corresponding to the above-mentioned resource caching method embodiment, the present invention also provides a resource caching device, which is applied to the master node in the mobile edge computing MEC cluster, such as Figure 8 As shown, the device comprises:
[0225] An estimation module 810 is used to estimate the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model;
[0226] A division module 820 is used to divide each target model resource into a first model resource set and a second model resource set based on the demand of each target model resource; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set;
[0227] The first storage module 830 is used to store each target model resource in the first model resource set using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node within the same preset range with respect to the transmission delay with the server in the digital twin system; the target cluster is a cluster with a transmission delay with the server within the lowest preset range; the underlying MEC node in each cluster is the MEC node in the cluster except the cluster head, and the cluster head in each cluster is the MEC node with the lowest access frequency by the server;
[0228] The second storage module 840 is used to store each target model resource in the second model resource set using a cluster head of at least one cluster.
[0229] Optionally, the estimation module is specifically used to:
[0230] After entering each cycle, estimate the demand for resources of each target model in that cycle.
[0231] Optionally, after entering each cycle, estimating the demand for each target model resource in the cycle includes:
[0232] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified time period is used to estimate the demand for the target model resource within the cycle;
[0233] The specified duration is the duration from the start time of the historical cycle to the current time of the current cycle; and the historical cycle is the cycle before the current cycle.
[0234] Optionally, after entering each cycle, for each target model resource, using the number of times the model resource is requested within a specified time period, estimating the demand for the target model resource within the cycle includes:
[0235] After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified period of time and a predetermined calculation formula are used to estimate the demand for the target model resource within the cycle; wherein the predetermined calculation formula includes:
[0236]
[0237] Among them, i is the cycle identifier, Value i is the demand for the model resource in the current period, Value i-1 is the demand for the model resource in the historical period, Count1 is the number of times the model resource is requested in the first period, and Count iis the number of times the model resource is requested in the current cycle, and γ is a weight preset for the digital twin system.
[0238] Optionally, the first storage module includes:
[0239] The first selection submodule is used to select the bottom-level MEC node with the most remaining cache space from each bottom-level MEC node of the target cluster as the target MEC node;
[0240] A first storage submodule, configured to store the first model resource with the highest demand in the first model resource set to the target MEC node;
[0241] The first deletion submodule is used to delete the first model resource with the highest demand from the first model resource set, and return to the step of selecting the bottom-level MEC node with the most remaining cache space from each bottom-level MEC node of the target cluster as the target MEC node.
[0242] Optionally, the device further comprises:
[0243] An adding module is used to add the remaining target model resources in the first model resource set to the second model resource set if the cache space of the target MEC node is less than the storage space required to store the first model resource with the highest demand.
[0244] Optionally, the second storage module includes:
[0245] The second selection submodule is used to select a cluster head with the most remaining cache space from at least one cluster and determine it as a target cluster head;
[0246] A second storage submodule is used to store the second model resource with the highest demand in the second model resource set in the target cluster head;
[0247] The second deletion submodule is used to delete the second model resource with the highest demand from the second model resource set, and return to the step of selecting the cluster head with the most remaining cache space from at least one cluster and determining it as the target cluster head.
[0248] Optionally, the device further comprises:
[0249] The ending module is used to end the cache if the cache space of the target cluster head is smaller than the storage space required for storing the second model resource with the highest demand.
[0250] Corresponding to the above-mentioned resource access method embodiment, the present invention also provides a resource access device, which is applied to the server in the digital twin system, such as Fig. 9As shown, the device comprises:
[0251] A determination module 910 is used to determine, in response to a perspective switching operation of a client in the digital twin system, target model resources required for a new perspective after the perspective switching operation;
[0252] A sending module 920 is used to send a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server; if the target model resource is not stored in the target cluster, a resource acquisition request for the target model resource is sent to other clusters communicating with the target cluster, so that if the target model resource is stored in the other clusters, the target model resource is transmitted to the server;
[0253] The receiving module 930 is used to receive the target model resource.
[0254] Optionally, the sending module 920 sends a resource acquisition request for the target model resource to a target cluster communicating with the server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server, including:
[0255] A resource acquisition request for the target model resource is sent to at least one designated MEC node in the target cluster that communicates with the server in the digital twin system, so that if the target model resource is stored in the designated MEC node, the target model resource is transmitted to the server; if the target model resource is not stored in the designated MEC node, a resource acquisition request for the target model resource is sent to other MEC nodes in the target cluster except the designated MEC node, so that if the target model resource is stored in the other MEC nodes, the target model resource is transmitted to the server.
[0256] Optionally, the sending module 920 is further configured to:
[0257] If the target model resource is not stored in the other cluster, a resource acquisition request for the target model resource is sent to the cloud data center, so that the cloud data center transmits the target model resource to the server.
[0258] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.
[0259] Memory 1003, used for storing computer programs;
[0260] The processor 1001 is used to implement the steps of any resource caching method or resource access method in the above embodiments when executing the program stored in the memory 1003.
[0261] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0262] The communication interface is used for communication between the above electronic device and other devices.
[0263] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0264] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0265] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the resource caching method or the resource access method in any of the above embodiments.
[0266] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes any resource caching method or resource access method in the above embodiments.
[0267] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0268] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0269] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for system and device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0270] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A resource caching method, characterized in that: Applied to a master control node in a mobile edge computing MEC cluster, the method includes: estimating the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model; Based on the demand of each target model resource, the target model resources are divided into a first model resource set and a second model resource set; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set; Each target model resource in the first model resource set is stored using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node within the same preset range of transmission delay with the server in the digital twin system; the target cluster is a cluster whose transmission delay with the server belongs to the lowest preset range; the underlying MEC node in each cluster is the MEC node in the cluster except the cluster head, and the cluster head in each cluster is the MEC node with the lowest access frequency of the server; Each target model resource in the second model resource set is stored using a cluster head of at least one cluster.
2. The method according to claim 1, characterized in that The estimated requirements for various target model resources required for 3D model rendering include: After entering each cycle, estimate the demand for resources of each target model in that cycle.
3. The method according to claim 2, characterized in that After entering each cycle, the demand for each target model resource in the cycle is estimated, including: After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified time period is used to estimate the demand for the target model resource within the cycle; The specified duration is the duration from the start time of the historical cycle to the current time of the current cycle; and the historical cycle is the cycle before the current cycle.
4. The method according to claim 3, characterized in that After entering each cycle, for each target model resource, using the number of times the model resource is requested within a specified time period, estimating the demand for the target model resource within the cycle includes: After entering each cycle, for each target model resource, the number of times the model resource is requested within a specified period of time and a predetermined calculation formula are used to estimate the demand for the target model resource within the cycle; wherein the predetermined calculation formula includes: Among them, i is the cycle identifier, Value i is the demand for the target model resources in the current cycle, Value i-1 is the demand for the model resource in the historical period, Count1 is the number of times the model resource is requested in the first period, and Count i is the number of times the model resource is requested in the current cycle, and γ is a weight preset for the digital twin system.
5. The method according to claim 1, characterized in that The storing each target model resource in the first model resource set by using the bottom layer MEC node of the target cluster in at least one cluster includes: From each bottom-layer MEC node of the target cluster, select the bottom-layer MEC node with the most remaining cache space as the target MEC node; Storing the first model resource with the highest demand in the first model resource set in the target MEC node; The first model resource with the highest demand is deleted from the first model resource set, and the step of selecting the bottom-level MEC node with the largest remaining cache space from each bottom-level MEC node of the target cluster is returned as the target MEC node.
6. The method according to claim 5, characterized in that The method further comprises: If the cache space of the target MEC node is smaller than the storage space required to store the first model resource with the highest demand, the remaining target model resources in the first model resource set are added to the second model resource set.
7. The method according to claim 1, characterized in that The storing each target model resource in the second model resource set by using a cluster head of at least one cluster includes: From at least one cluster, select a cluster head with the most remaining cache space and determine it as the target cluster head; storing the second model resource with the highest demand in the second model resource set in the target cluster head; The second model resource with the highest demand is deleted from the second model resource set, and the step of returning to the step of selecting a cluster head with the most remaining cache space from at least one cluster and determining it as the target cluster head is performed.
8. The method according to claim 7, characterized in that The method further comprises: If the cache space of the target cluster head is smaller than the storage space required for storing the second model resource with the highest demand, the cache is terminated.
9. A resource access method based on the method according to any one of claims 1 to 8, characterized in that: Applied to a server in a digital twin system, the method includes: In response to a perspective switching operation of a client in the digital twin system, determining a target model resource required for a new perspective after the perspective switching operation; Send a resource acquisition request for the target model resource to the target cluster communicating with the server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server; if the target model resource is not stored in the target cluster, send a resource acquisition request for the target model resource to other clusters communicating with the target cluster, so that if the target model resource is stored in the other clusters, the target model resource is transmitted to the server; The target model resource is received.
10. The method according to claim 9, characterized in that The step of sending a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server, including: A resource acquisition request for the target model resource is sent to at least one designated MEC node in the target cluster that communicates with the server in the digital twin system, so that if the target model resource is stored in the designated MEC node, the target model resource is transmitted to the server; if the target model resource is not stored in the designated MEC node, a resource acquisition request for the target model resource is sent to other MEC nodes in the target cluster except the designated MEC node, so that if the target model resource is stored in the other MEC nodes, the target model resource is transmitted to the server.
11. The method according to claim 9, characterized in that The method further comprises: If the target model resource is not stored in the other cluster, a resource acquisition request for the target model resource is sent to the cloud data center, so that the cloud data center transmits the target model resource to the server.
12. A resource cache system, characterized in that: It includes a master control node and at least one cluster, each cluster includes a transmission delay with the server in the digital twin system, and belongs to a mobile edge computing MEC node within the same preset range, and the MEC nodes in each cluster include a cluster head and underlying MEC nodes other than the cluster head. The cluster head in each cluster is the MEC node with the lowest access frequency of the server, and data is transmitted between clusters through the cluster head; The master control node is used to estimate the demand for each target model resource required for 3D model rendering; based on the demand for each target model resource, the each target model resource is divided into a first model resource set and a second model resource set; each target model resource in the first model resource set is stored using an underlying MEC node of a target cluster in at least one cluster; Each model resource in the second model resource set is stored using a cluster head of at least one cluster; wherein each target model resource is a model resource for a 3D model; the demand for any target model resource in the first model resource set is higher than the demand for each target model resource in the second model resource set; the target cluster is a cluster whose transmission delay with the server is within a minimum preset range; The bottom layer MEC node of the target cluster is used to store each target model resource in the first model resource set; The cluster head of the at least one cluster is used to store each target model resource in the second model resource set.
13. A resource cache device, characterized in that: Applied to a master control node in a mobile edge computing MEC cluster, the device comprises: An estimation module, used for estimating the demand for each target model resource required for 3D model rendering; wherein each target model resource is a model resource for a 3D model; A division module, used for dividing each target model resource into a first model resource set and a second model resource set based on the demand of each target model resource; wherein the demand of any target model resource in the first model resource set is higher than the demand of each target model resource in the second model resource set; A first storage module is used to store each target model resource in the first model resource set using the underlying MEC node of the target cluster in at least one cluster; wherein each cluster includes a mobile edge computing MEC node within the same preset range of transmission delay with the server in the digital twin system; the target cluster is a cluster whose transmission delay with the server belongs to the lowest preset range; the underlying MEC node in each cluster is the MEC node in the cluster except the cluster head, and the cluster head in each cluster is the MEC node with the lowest access frequency of the server; The second storage module is used to store each target model resource in the second model resource set using a cluster head of at least one cluster.
14. A resource access device based on the method according to any one of claims 1 to 8, characterized in that: The device is applied to a server in a digital twin system, and includes: A determination module, configured to determine, in response to a perspective switching operation of a client in the digital twin system, target model resources required for a new perspective after the perspective switching operation; A sending module, used for sending a resource acquisition request for the target model resource to a target cluster communicating with a server in the digital twin system, so that if the target model resource is stored in the target cluster, the target model resource is transmitted to the server; if the target model resource is not stored in the target cluster, a resource acquisition request for the target model resource is sent to other clusters communicating with the target cluster, so that if the target model resource is stored in the other clusters, the target model resource is transmitted to the server; The receiving module is used to receive the target model resource.
15. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1 to 11 when executing a program stored in a memory.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Networking method and apparatus of fog wireless access network based on artificial intelligence
CN109688597A
Edge active caching method based on intra-cluster intelligent sharing
CN114245422A
