Task caching method, device, system, equipment and medium
By building a twin model in the data twin layer, calculating the cache intimacy between tasks and server clusters, and optimizing task storage locations, the problem of task cache disorder in server clusters is solved, and efficient resource utilization and fast access to tasks are achieved.
Patent Information
- Application Number
- CN202310841827.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-07-10
AI Technical Summary
In the existing technology, server clusters waste resources when caching tasks because tasks generated by users are randomly generated, resulting in cached tasks being out of order, repeated and not used again, which wastes the computing resources of the server cluster.
By building a twin model in the data twin layer, the task information of each physical edge server cluster is obtained in real time, the frequency of task occurrence and resource overhead are calculated, the cache intimacy between the task and the server cluster is determined, and the cache intimacy is determined based on the intimacy and remaining cache Capacity, optimize the storage location of tasks, and ensure that the task cache is orderly.
It achieves the orderliness of task cache, reduces resource waste in server clusters, improves task access speed and user experience, and saves computing resources.
Smart Images

Figure CN116860447B
Abstract
Description
Background Art
[0002] With the development of Internet technology, a large number of application software and services have brought a qualitative leap in people's lives. Today, with the explosive growth of various Internet businesses, server clusters also need more and more resources to cache the calculation results of the business.
[0003] In the related art, most of the tasks generated by users are randomly generated, and the cache tasks of each server cluster are also disordered, which will waste the resources of the server cluster.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a task caching method, apparatus, system, device and medium, which at least to a certain extent overcome the problem of wasting resources of a server cluster in the related art.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] In a first aspect, an embodiment of the present disclosure provides a task caching method for a digital twin, the method comprising:
[0008] Map multiple physical edge server clusters and build twin models in the data twin layer;
[0009] In the twin model, tasks generated by users in each physical edge server cluster are obtained in real time;
[0010] Get the occurrence frequency of any task and the average occurrence frequency of all tasks;
[0011] Obtaining a user task vector, an edge server task vector, a task local execution resource cost, and a task edge server execution resource cost;
[0012] Determine the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs according to the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead;
[0013] Based on the cache closeness determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster, each physical edge server cluster is instructed to store the tasks generated by the user.
[0014] In a possible embodiment, mapping multiple physical edge server clusters and building a twin model in a data twin layer includes:
[0015] Mapping network status information, existing cache, and remaining cache capacity of the plurality of physical edge server clusters;
[0016] Deleting existing caches in the multiple physical edge server clusters to obtain multiple initialized physical edge server clusters;
[0017] The twin model is established in the data twin layer according to the network status information, the remaining cache capacity and the initialized multiple physical edge server clusters.
[0018] In a possible embodiment, determining the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs according to the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead includes:
[0019] Determining an occurrence frequency parameter of any one of the tasks according to a first difference between the occurrence frequency and the average occurrence frequency, and a preset frequency adjustment factor;
[0020] Determining a cosine value between the user task vector and the edge server task vector;
[0021] Determine a second difference between the task local execution resource cost and the task edge server execution resource cost;
[0022] The cache intimacy between each task of the user and the physical edge server cluster to which the user belongs is determined according to the product of the occurrence frequency parameter, the cosine value and the second difference value.
[0023] In a possible embodiment, instructing each physical edge server cluster to store tasks generated by a user according to the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster includes:
[0024] Determining the amount of tasks generated by each physical edge server cluster according to the tasks generated by users in the multiple physical edge server clusters;
[0025] Adding a flag variable tag to each physical edge server cluster according to the generated task volume and the remaining cache capacity;
[0026] According to the cache intimacy and the flag variable tag, each physical edge server cluster is instructed to store the tasks generated by the user.
[0027] In a possible embodiment, adding a flag variable tag to each physical edge server cluster according to the task amount and the remaining cache capacity includes:
[0028] For the physical edge server cluster whose task volume is less than the remaining cache capacity, adding a first preset flag variable tag;
[0029] For the physical edge server cluster whose task volume is not less than the remaining cache capacity, a second preset flag variable tag is added.
[0030] In a possible embodiment, the flag variable label includes: a first preset flag variable label and a second preset flag variable label;
[0031] The step of instructing each physical edge server cluster to store tasks generated by a user according to the cache intimacy and the flag variable tag includes:
[0032] The tasks whose cache intimacy is greater than the preset intimacy are stored in the physical edge server cluster to which the tasks belong;
[0033] The tasks whose cache intimacy is less than the preset intimacy are sent to the physical edge server cluster corresponding to the first preset flag variable tag for storage.
[0034] In a second aspect, an embodiment of the present disclosure provides a task cache device, including:
[0035] Establishing a unit for mapping a plurality of physical edge server clusters and building a twin model in the data twin layer;
[0036] An acquisition unit, used to acquire tasks generated by users in each physical edge server cluster in real time in the twin model;
[0037] The acquisition unit is also used to obtain the occurrence frequency of any task and the average occurrence frequency of all tasks;
[0038] The acquisition unit is further used to acquire the user task vector, the edge server task vector, the task local execution resource overhead and the task edge server execution resource overhead;
[0039] a determining unit, configured to determine a cache intimacy between each task of a user and a physical edge server cluster to which the user belongs based on the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead;
[0040] The storage unit is used to store the tasks generated by the user according to the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster.
[0041] In a third aspect, an embodiment of the present disclosure provides a task cache system, including: a central cloud system and a plurality of physical edge server clusters;
[0042] Wherein, the central cloud system is configured to execute the method described in any one of the first aspects.
[0043] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method described in the first aspect above by executing the executable instructions.
[0044] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0045] In a sixth aspect, according to another aspect of the present disclosure, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any of the above-described methods.
[0046] A task caching method provided by an embodiment of the present disclosure specifically includes: mapping multiple physical edge server clusters, building a twin model in a data twin layer, in the twin model, obtaining tasks generated by users in each physical edge server cluster in real time, obtaining the occurrence frequency of any task and the average occurrence frequency of all tasks, obtaining user task vectors, edge server task vectors, task local execution resource overheads, and task edge server execution resource overheads, and determining the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs based on the occurrence frequency, average occurrence frequency, user task vectors, edge server task vectors, task local execution resource overheads, and task edge server execution resource overheads, and indicating each physical edge server cluster to store the tasks generated by the user based on the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster. On the one hand, a twin model can be built through a digital twin layer, and the information at the physical level can be simulated and simulated in the digital twin layer, which will not affect the physical layer and will not occupy the computing resources of the physical layer. On the other hand, by using the cache intimacy obtained through simulation, tasks are cached according to their occurrence frequency, vector, and cost overhead, making the task cache orderly, convenient for users to access and use again, and saving the computing resources of the server cluster for tasks.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0049] Figure 1 A schematic diagram showing the structure of a task cache system in an embodiment of the present disclosure is shown;
[0050] Figure 2 A schematic diagram showing the structure of another task cache system in an embodiment of the present disclosure is shown;
[0051] Figure 3 A schematic diagram showing a process flow of a task caching method in an embodiment of the present disclosure is shown;
[0052] Figure 4 A schematic diagram of a process for determining cache intimacy in an embodiment of the present disclosure is shown;
[0053] Figure 5A schematic diagram showing the structure of a task cache device in an embodiment of the present disclosure is shown;
[0054] Figure 6 A schematic structural diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0055] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0056] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0057] With the development of Internet technology, a large number of application software and services have brought a qualitative leap in people's lives. With the explosion of various Internet businesses today, server clusters also need more and more resources to cache the calculation results of the business. In related technologies, the tasks generated by users are mostly randomly generated, and the cached tasks of each server cluster are also disordered. Tasks cached by multiple server clusters may be repeated, which is not conducive to users querying the tasks again. The disorder of task caching will also lead to some tasks being cached and users will never open them again, which will waste the cache resources of the server cluster.
[0058] A task caching method provided by an embodiment of the present disclosure specifically includes: mapping multiple physical edge server clusters, building a twin model in a data twin layer, in the twin model, obtaining tasks generated by users in each physical edge server cluster in real time, obtaining the occurrence frequency of any task and the average occurrence frequency of all tasks, obtaining user task vectors, edge server task vectors, task local execution resource overheads, and task edge server execution resource overheads, and determining the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs according to the occurrence frequency, average occurrence frequency, user task vectors, edge server task vectors, task local execution resource overheads, and task edge server execution resource overheads, and indicating each physical edge server cluster to store the tasks generated by the user according to the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster. On the one hand, a twin model can be built through a digital twin layer, and the information at the physical level can be simulated and simulated in the digital twin layer without affecting the physical layer. On the other hand, through the cache intimacy obtained by simulation, the content with relatively high correlation is stored in the same physical edge server cluster, so that the physical edge server cluster caches tasks in an orderly manner, saving the cache resources of the server cluster.
[0059] The business computing offloading method disclosed in the present invention can be applied to electronic devices, and can also be applied to task cache systems.
[0060] The task cache system in the present disclosure may be constructed by a digital twin layer constructed by a central computing cloud system and a physical layer constructed by multiple physical edge servers. Figure 1 FIG. 1 shows a schematic diagram of the structure of a task cache system 100 provided in an embodiment of the present disclosure. Figure 1 shown.
[0061] The task cache system 100 includes a central cloud system 101, a physical edge server cluster 102, a physical edge server cluster 103, and a physical edge server cluster 104; wherein the central cloud system 101 can construct a digital twin layer. The edge server cluster close to the user side is composed of N edge servers, and multiple physical edge servers construct a physical layer.
[0062] Various information of multiple physical edge server structures in the physical layer, such as user information, server information, computing information, network information, and cache information, can be obtained in real time through the task cache system 100. The user information may include tasks generated by the user, and the cache information may include existing cache and remaining cache resources, such as the remaining cache capacity of each physical edge server cluster.
[0063] Furthermore, a cluster of physical edge devices can also be used to build the digital twin layer.
[0064] Based on the task cache system 100, twin models of multiple physical edge servers can be further constructed in the digital twin layer of the task cache system 100, and the twin models can be managed and processed to obtain the tasks generated by users in real time, determine the cache intimacy between the user's tasks and the physical edge server cluster to which the user belongs, and simulate and simulate the cache of the tasks generated by the user to instruct the physical edge server cluster to cache.
[0065] Figure 2 A schematic diagram of the structure of a task cache system provided by an embodiment of the present disclosure is shown.
[0066] like Figure 2 As shown, the task cache system 200 may include a central cloud system 201 and a physical edge server cluster 202 , a physical edge server cluster 203 , and a physical edge server cluster 204 .
[0067] Among them, the central cloud system 201 may include a data center 211, which stores the information of multiple physical edge server clusters, such as user information, server information, computing information, and network information, etc., and can also be used to store twin databases, twin models, etc.
[0068] The central cloud system 201 may also include a twin mapping center 221, which can be used for strategy mapping and function mapping. Strategy mapping can map the policies obtained by the digital twin layer, and function mapping is used to map the functions of multiple physical edge server clusters.
[0069] The central cloud system 201 may also include a resource management module 231, which can be used to manage computing resources and cache resources. The twin mapping center 221 can map the management of computing resources and cache resources by the resource management module 231 to the physical edge server cluster in the physical layer through policy mapping.
[0070] The present exemplary implementation is described in detail below with reference to the accompanying drawings and embodiments.
[0071] First, a task caching method is provided in an embodiment of the present disclosure. The method can be executed by any electronic device with computing and processing capabilities. The following process takes the electronic device as the center cloud system as an example.
[0072] Figure 3 A flowchart of a task caching method in an embodiment of the present disclosure is shown. Figure 3 As shown, the task caching method provided in the embodiment of the present disclosure includes the following steps:
[0073] S302: Map multiple physical edge server clusters and build a twin model in the data twin layer;
[0074] In a possible embodiment, a digital twin layer is constructed in the central cloud system, and through mapping and interacting with multiple physical edge server clusters, the actual network status information, existing cache and remaining cache capacity and other information of the multiple physical edge server clusters at each moment are obtained in real time, and twin models of the multiple physical edge server clusters are constructed in the digital twin layer.
[0075] The physical edge server cluster can be understood as a real physical edge server cluster, which is a real device.
[0076] By obtaining the above information, it can be used to determine the correlation between the tasks generated by the user and the information already cached in the physical edge server cluster, so as to cache the tasks in an orderly manner.
[0077] In a possible embodiment, by mapping the network status information, existing cache and remaining cache capacity of multiple physical edge server clusters, the existing cache in the multiple physical edge server clusters is deleted to obtain multiple initialized physical edge server clusters, and a twin model is established in the data twin layer based on the network status information, the remaining cache capacity and the initialized multiple physical edge server clusters.
[0078] Since there may be a lot of existing caches in the physical edge server cluster, all of them are historical cache information. This information is disordered. When the user generates a task, the server cluster will cache it, which may affect the subsequent calculation of cache intimacy. Therefore, the existing cache can be deleted in the digital twin layer to obtain multiple initialized physical edge server clusters. However, considering that the physical edge server cluster belongs to the physical level and is a real device, the remaining cache resources will affect the subsequent task cache, so the remaining cache capacity needs to be used to establish the twin model.
[0079] The network status information can be used to determine which networks are in a better state, in an available state, and in an unavailable state.
[0080] The tasks generated by users may be specifically multimedia tasks, for example, users browsing videos, looking up information, opening web pages on the Internet, etc.
[0081] The digital twin layer is a network system / network layer that creates a virtual twin of a physical network entity in a digital way and can interact and map with the physical network entity in real time. By introducing digital twin technology into the collaborative cache, the physical layer data, mainly including physical entity data, spatial data, resource data, as well as protocols, interfaces, routing, signaling, processes, performance, alarms, logs, status, etc., can be collected and stored in real-time or non-real-time manner, providing data support for building network twins and empowering network twins, and forming a function-rich data model based on these data.
[0082] S304: In the twin model, tasks generated by users in each physical edge server cluster are obtained in real time.
[0083] In a possible embodiment, tasks generated by users in a physical edge server cluster are obtained in real time, and primary and secondary tags are added to the tasks stored in each edge server. The primary tags are the three major categories of video, text, and audio, and the secondary tags are the subcategories of sports, news, TV series, etc.
[0084] Labeling the tasks generated by the user can be used in subsequent steps to determine cache affinity in the digital twin layer.
[0085] S306: Obtain the occurrence frequency of any task and the average occurrence frequency of all tasks.
[0086] In a possible embodiment, the occurrence frequency of any task can be understood as the number of times any task generated by a user occurs.
[0087] The average occurrence frequency of all tasks can be understood as the average occurrence frequency of all tasks in the physical edge server cluster, which is used to represent the average number of times all tasks have been generated.
[0088] Exemplarily, the occurrence frequency of task A and the average occurrence frequency of all tasks can be used to determine whether task A is a frequently generated task. For example, if the occurrence frequency of task A is 10 times, and the user has generated 100 tasks 200 times in total, and the average occurrence frequency of all tasks is 2 times, then task A is a task that is generated more frequently than other tasks. The greater the occurrence frequency of task A is compared to the average occurrence frequency of all tasks, the more task A needs to be cached.
[0089] This means that after Task A has been cached once, it is more likely to be consulted again. By caching Task A through the physical edge server cluster, when the user initiates Task A again later, the physical edge server cluster no longer needs to waste computing resources to calculate Task A and generate calculation results. The cached Task A can be opened directly, and the user can consult Task A again faster, which can reduce the delay and energy consumption of executing Task A and improve the cluster's response speed to Task A.
[0090] S308: Obtain a user task vector, an edge server task vector, a task local execution resource overhead, and a task edge server execution resource overhead.
[0091] In a possible embodiment, the user task vector can be understood as the vectorized representation result of the task generated by the user, and can be used to characterize the type of task generated by any user. The edge server task vector can be understood as the vectorized representation result of the task cached in the edge server memory in the physical edge server cluster, and can be used to characterize the type of task cached in the physical edge server cluster.
[0092] The vectorization result of the task generated by the user can be determined by the label of the task generated by the user, and the edge server task vector can be determined according to the tasks already cached in the memory of the edge server in the physical edge server cluster.
[0093] By comparing the user task vector and the edge server task vector, we can reflect the correlation between the tasks generated by the user and the stored tasks, and choose whether to cache the tasks. The higher the correlation between the user task vector and the edge server task vector, the more the tasks generated by the user need to be cached.
[0094] Taking any physical edge server cluster A as an example, the higher the correlation, the more tasks of the same type are stored in the physical edge server cluster. Caching highly correlated tasks in the same physical edge server cluster makes it easier to find tasks of the same type in physical edge server cluster A. Task A generated by the user may have been cached in physical edge server cluster A. There is no need to cache it again. Directly calling it can save the overhead of cluster task execution and reduce the latency of task response.
[0095] In a possible embodiment, the local execution resource overhead of the task is the overhead of the user-generated task assumed to be sent to the local execution. The edge server execution resource overhead of the task is the overhead of the user-generated task assumed to be sent to the edge server. The overhead includes the delay and the computational cost of executing the task.
[0096] In the process of determining whether a task needs to be cached, the cost of executing the task locally and the cost of executing the task on the edge server need to be calculated and compared. If the difference between the local execution resource cost and the edge server execution resource cost of the task is not large, the task does not need to be cached.
[0097] If the resource overhead of executing the task locally is greater than the resource overhead of executing the task on the edge server, it means that the task needs to be cached. After caching, directly opening the cached content will have a smaller latency.
[0098] S310: Determine the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs based on the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead.
[0099] In a possible embodiment, the cache intimacy can be calculated through the occurrence frequency and the average occurrence frequency, the user task vector and the edge server task vector, and the task local execution resource overhead and the task edge server execution resource overhead.
[0100] Exemplarily, the ratio between the occurrence frequency and the average occurrence frequency, the cosine value between the user task vector and the edge server task vector, and the ratio between the local execution resource overhead of the task and the edge server execution resource overhead of the task can be obtained, and they can be multiplied to obtain the cache intimacy. The larger the cache intimacy, the more the task needs to be cached.
[0101] Exemplarily, cache intimacy may also be determined in the following manner: Figure 4 As shown, Figure 4 A schematic diagram of a process for determining cache intimacy is shown, comprising the following steps:
[0102] S402: Determine an occurrence frequency parameter of any task according to a first difference between the occurrence frequency and the average occurrence frequency, and a preset frequency adjustment factor.
[0103] S404: Determine a cosine value between the user task vector and the edge server task vector.
[0104] S406: Determine a second difference between the task local execution resource overhead and the task edge server execution resource overhead.
[0105] S408: Determine the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs according to the product of the occurrence frequency parameter, the cosine value, and the second difference value.
[0106] You can refer to the following formula:
[0107]
[0108] Where cache_sim(r,x) represents the cache intimacy between the user's task and the physical edge server cluster to which the user belongs; V rx represents the user task vector; V r represents the edge server task vector; Indicates the local execution resource overhead of the task; represents the resource overhead of the task edge server execution; F x Indicates the frequency of occurrence; F avg represents the average occurrence frequency; μ represents the preset frequency adjustment factor.
[0109] Through the above formula (1), the relationship between the occurrence frequency of tasks and the average occurrence frequency, the correlation between vectors and the comparison between resource overheads can be taken into consideration. The calculation of cache intimacy is considered from multiple dimensions, which is more accurate and the cache relationship between tasks and clusters is easier to judge.
[0110] S312: Instruct each physical edge server cluster to store tasks generated by the user according to the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster.
[0111] In a possible embodiment, tasks with relatively high cache intimacy are directly stored in the corresponding physical edge server cluster, and tasks with relatively low cache intimacy are sent to other physical edge server clusters with relatively large remaining cache capacity.
[0112] In a possible embodiment, according to the tasks generated by users in multiple physical edge server clusters, the amount of tasks generated by each physical edge server cluster is determined, and according to the amount of tasks generated and the remaining cache capacity, a flag variable tag is added to each physical edge server cluster, and according to the cache intimacy and the flag variable tag, each physical edge server cluster is instructed to store the tasks generated by the user. The flag variable tag includes: a first preset flag variable tag and a second preset flag variable tag.
[0113] Exemplarily, the task volume of each physical edge server cluster can be counted based on the tasks generated by users in multiple physical edge server clusters. The task takes time from start to completion, so the task volume within a preset time period can be counted, or the start to end of the task can be regarded as a time slot, and the task volume within several time slots can be counted.
[0114] After counting the task volume, it is determined whether the physical edge server cluster has space for caching tasks based on the remaining cache capacity of each physical edge server cluster, and a label is added to the physical edge server cluster.
[0115] Exemplarily, for a physical edge server cluster whose task volume is less than the remaining cache capacity, a first preset flag variable tag is added, and for a physical edge server cluster whose task volume is not less than the remaining cache capacity, a second preset flag variable tag is added.
[0116] You can refer to the following formula:
[0117]
[0118] in, Indicates a flag variable label, and its specific value can be a first preset flag variable label 0 and a second preset flag variable label 1; represents the task volume of each physical edge server cluster; Indicates the remaining cache capacity of each physical edge server cluster.
[0119] Exemplarily, tasks with cache intimacy greater than a preset intimacy are stored in the physical edge server cluster to which the tasks belong, and tasks with cache intimacy less than the preset intimacy are sent to the physical edge server cluster corresponding to the first preset flag variable tag for storage.
[0120] Through the task caching method disclosed in the present invention, on the one hand, not only can the calculation of cache intimacy be completed without affecting the physical layer interaction and occupying the physical layer computing resources, but also the caching of tasks in the physical layer can be simulated to instruct the physical edge server cluster in the physical layer to cache tasks. On the other hand, it can focus on caching tasks with high relevance and high frequency of occurrence, so that users can query and use the tasks again. When users process and calculate the tasks again, the cluster will process the tasks faster and the computing cost will be lower.
[0121] Furthermore, in the related art, the cluster caches the tasks generated by the user in an unordered and random manner. When a user generates a task, the task may be cached. After the task is cached, it may not be used by the user again in the future. A large number of such tasks will waste the cache resources of the cluster and cause resource waste. However, the task caching method in the present invention does not completely cache the generated tasks in the cluster to which the user belongs. Tasks with high cache intimacy are cached for repeated use by subsequent users. For some tasks with low cache intimacy, they are not cached in the cluster to which the user belongs, but are cached in other clusters with large remaining cache capacity through collaboration through other physical edge server clusters.
[0122] In a possible embodiment, if the task generated by the user has been cached in the physical edge server cluster to which the user belongs, there is no need to cache it again even if the cache intimacy is high.
[0123] In one possible implementation, for any task of the user, if the cache intimacy between any task of the user and the physical edge server cluster to which the user belongs is low, any task needs to be sent to other physical edge server clusters for caching, and the vector of any task can be calculated, and the correlation between the vector of any task and the edge server task vector of the edge server in other physical edge server clusters can be determined, and any task can be preferentially stored in the cluster corresponding to other edge servers with high correlation. It should be noted that the calculation of the correlation between the vector of any task and the edge server task vector of the edge server in other physical edge server clusters can be performed in the digital twin layer, and instructions can be issued directly. It does not occupy the computing resources of any physical edge server cluster.
[0124] Taking any task as Task A, caching Task A in the physical edge server cluster B in this way can facilitate the use of users and save the computing resources of the server for task execution. Since the edge server task vector in the physical edge server cluster B has a high correlation with Task A, it means that users in the physical edge server cluster B are more inclined to generate tasks of the type corresponding to Task A. If users in the physical edge server cluster B generate Task A in the future, the physical edge server cluster B has already cached Task A and can call it directly.
[0125] In another possible implementation, for the tasks generated by the user, a query may be performed first, and then the tasks may be processed and calculated.
[0126] Exemplarily, for any task generated by a user, in the digital twin layer, the task is queried through the correlation between the edge server task vector of the edge server in each edge server cluster and the user task vector. If any task generated by the user is queried among the top three servers ranked by correlation, the task cache can be directly used interactively and the calculation can be performed again in an unordered manner.
[0127] In the digital twin layer, the existing cache information of each physical edge server cluster can be obtained, so queries in the digital twin layer do not need to occupy any resources in the physical layer.
[0128] In a possible embodiment, if the twin model that has been cached is deleted in the digital chaos layer, since the memory of the simulated twin model is empty at the beginning, the task generated at the beginning can be cached directly. As the cache increases, the cache intimacy is calculated in the above manner, and the task is cached in the above manner.
[0129] In a possible embodiment, the digital twin layer can calculate the vectorized results of the tasks stored in each edge server in the physical edge server cluster after collaboratively caching the tasks based on the real-time interaction information, for the cache affinity calculation in the next stage.
[0130] Based on the same inventive concept, the present disclosure also provides a task cache device, such as the following embodiment. Since the principle of solving the problem in the device embodiment is similar to that in the above method embodiment, the implementation of the device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0131] Figure 5 A schematic diagram of the structure of a task cache device in an embodiment of the present disclosure is shown. Figure 5 As shown, the task caching device 50 includes: an establishing unit 501, which is used to map multiple physical edge server clusters and build a twin model in the data twin layer; an acquiring unit 502, which is used to acquire the tasks generated by users in each physical edge server cluster in real time in the twin model; the acquiring unit 502 is also used to acquire the occurrence frequency of any task and the average occurrence frequency of all tasks; the acquiring unit 502 is also used to acquire the user task vector, the edge server task vector, the task local execution resource overhead and the task edge server execution resource overhead; a determining unit 503 is used to determine the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs based on the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead and the task edge server execution resource overhead; a storage unit 504 is used to store the tasks generated by the user based on the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster.
[0132] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0133] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0134] like Figure 6As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, and a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610).
[0135] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps of various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 610 can perform any step in the above method embodiments.
[0136] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0137] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0138] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0139] The electronic device 600 may also communicate with one or more external devices 640 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0140] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0141] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the above embodiment.
[0142] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above “Exemplary Method” section of this specification.
[0143] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0144] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0145] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0146] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0147] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0148] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0149] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0150] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A task caching method, It is characterized in that The method comprises: Map multiple physical edge server clusters and build twin models in the data twin layer; In the twin model, tasks generated by users in each physical edge server cluster are obtained in real time; Get the occurrence frequency of any task and the average occurrence frequency of all tasks; Obtaining a user task vector, an edge server task vector, a task local execution resource cost, and a task edge server execution resource cost; Determine the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs according to the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead; the cache intimacy represents the degree to which the task is cached; Instructing each physical edge server cluster to store tasks generated by the user based on the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster; The method of instructing each physical edge server cluster to store tasks generated by the user according to the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster includes: According to the tasks generated by users in the multiple physical edge server clusters, determine the amount of tasks generated by each physical edge server cluster; according to the amount of tasks generated and the remaining cache capacity, add a flag variable label to each physical edge server cluster; according to the cache intimacy and the flag variable label, instruct each physical edge server cluster to store the tasks generated by users.
2. The method according to claim 1, It is characterized in that The mapping of multiple physical edge server clusters and building a twin model in the data twin layer include: Mapping network status information, existing cache, and remaining cache capacity of the plurality of physical edge server clusters; Deleting existing caches in the multiple physical edge server clusters to obtain multiple initialized physical edge server clusters; The twin model is established in the data twin layer according to the network status information, the remaining cache capacity and the initialized multiple physical edge server clusters.
3. The method according to claim 1, It is characterized in that The step of determining the cache intimacy between each task of the user and the physical edge server cluster to which the user belongs according to the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead comprises: Determining an occurrence frequency parameter of any one of the tasks according to a first difference between the occurrence frequency and the average occurrence frequency, and a preset frequency adjustment factor; Determining a cosine value between the user task vector and the edge server task vector; Determine a second difference between the task local execution resource cost and the task edge server execution resource cost; The cache intimacy between each task of the user and the physical edge server cluster to which the user belongs is determined according to the product of the occurrence frequency parameter, the cosine value and the second difference value.
4. The method according to claim 1, It is characterized in that The adding a flag variable tag to each physical edge server cluster according to the task amount and the remaining cache capacity includes: For the physical edge server cluster whose task volume is less than the remaining cache capacity, adding a first preset flag variable tag; For the physical edge server cluster whose task volume is not less than the remaining cache capacity, a second preset flag variable tag is added.
5. The method according to claim 1, It is characterized in that The flag variable label includes: a first preset flag variable label and a second preset flag variable label; The step of instructing each physical edge server cluster to store tasks generated by a user according to the cache intimacy and the flag variable tag includes: The tasks whose cache intimacy is greater than the preset intimacy are stored in the physical edge server cluster to which the tasks belong; The tasks whose cache intimacy is less than the preset intimacy are sent to the physical edge server cluster corresponding to the first preset flag variable tag for storage.
6. A task cache device, It is characterized in that include: Establish a unit for mapping multiple physical edge server clusters and building twin models in the data twin layer; An acquisition unit, used to acquire tasks generated by users in each physical edge server cluster in real time in the twin model; The acquisition unit is also used to obtain the occurrence frequency of any task and the average occurrence frequency of all tasks; The acquisition unit is further used to acquire the user task vector, the edge server task vector, the task local execution resource overhead and the task edge server execution resource overhead; a determining unit, configured to determine a cache intimacy between each task of a user and a physical edge server cluster to which the user belongs, according to the occurrence frequency, the average occurrence frequency, the user task vector, the edge server task vector, the task local execution resource overhead, and the task edge server execution resource overhead; the cache intimacy represents the degree to which a task is cached; a storage unit for storing tasks generated by users based on the cache intimacy determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster; The storage unit is also used to determine the amount of tasks generated by each physical edge server cluster based on the tasks generated by users in the multiple physical edge server clusters; add a flag variable label to each physical edge server cluster based on the amount of tasks generated and the remaining cache capacity; and instruct each physical edge server cluster to store the tasks generated by users based on the cache intimacy and the flag variable label.
7. A task cache system, It is characterized in that include: Central cloud system and physical edge server clusters; Wherein, the central cloud system is configured to execute the method described in any one of claims 1 to 5.
8. An electronic device, It is characterized in that include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 5 by executing the executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
