CN116860447A - Task caching method, device, system, equipment and medium - Google Patents

Task caching method, device, system, equipment and medium Download PDF

Info

Publication number
CN116860447A
CN116860447A CN202310841827.4A CN202310841827A CN116860447A CN 116860447 A CN116860447 A CN 116860447A CN 202310841827 A CN202310841827 A CN 202310841827A CN 116860447 A CN116860447 A CN 116860447A
Authority
CN
China
Prior art keywords
task
edge server
user
physical edge
cache
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310841827.4A
Other languages
Chinese (zh)
Inventor
宋雅奇
丁鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202310841827.4A priority Critical patent/CN116860447A/en
Publication of CN116860447A publication Critical patent/CN116860447A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a task caching method, device, system, equipment and medium, and relates to the technical field of computers, wherein the method specifically comprises the following steps: mapping a plurality of physical edge server clusters, constructing a twin model in a data twin layer, acquiring tasks generated by users in each physical edge server cluster in real time in the twin model, and caching the tasks according to the occurrence frequency of any one task and the average occurrence frequency of all the tasks, wherein the user task vector, the edge server task vector, the task local execution resource cost and the task edge server execution resource cost are used for determining the cache affinity of the user task and the physical edge server cluster to which the user belongs, combining the residual cache capacity, storing the user task, simulating through the digital twin layer, not occupying the calculation resources of the physical layer, caching the tasks according to the cache affinity, and enabling the task cache to be orderly, so that the user can access again.

Description

Task caching method, device, system, equipment and medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a task caching method, device, system, equipment and medium.
Background
With the development of internet technology, a great amount of application software and services bring a qualitative leap to the life of people, and server clusters also need more and more resources to cache the calculation results of services today when various internet services are blown out.
In the related art, tasks generated by users are mostly randomly generated, and each server cluster cache task is also disordered, so that resources of the server clusters are wasted.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure provides a task caching method, device, system, equipment and medium, which at least overcome the problem of wasting resources of a server cluster in the related art to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
In a first aspect, embodiments in the present disclosure provide a digital twin task caching method, the method including:
mapping a plurality of physical edge server clusters, and constructing a twin model in a data twin layer;
In the twin model, acquiring tasks generated by users in each physical edge server cluster in real time;
acquiring the occurrence frequency of any one task and the average occurrence frequency of all tasks;
acquiring a user task vector, an edge server task vector, task local execution resource overhead and task edge server execution resource overhead;
determining cache affinity 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;
and indicating each physical edge server cluster to store the task generated by the user according to the buffer affinity determined in the digital twin layer and the residual buffer capacity of each physical edge server cluster.
In a possible embodiment, the mapping a plurality of physical edge server clusters, building a twinning model in a data twinning layer, includes:
mapping network state information, existing caches and remaining cache capacities of the plurality of physical edge server clusters;
Deleting the existing caches in the plurality of physical edge server clusters to obtain a plurality of initialized physical edge server clusters;
and establishing the twin model in a data twin layer according to the network state information, the residual cache capacity and the initialized multiple physical edge server clusters.
In one possible embodiment, the determining the cache affinity 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:
determining the occurrence frequency parameter of any task according to the first difference value of the occurrence frequency minus 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;
determining a second difference of the task local execution resource overhead minus the task edge server execution resource overhead;
and determining the cache affinity 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.
In one possible embodiment, the instructing each physical edge server cluster to store the user-generated task according to the cache affinity determined in the digital twin layer and the remaining cache capacity of each physical edge server cluster includes:
determining the task quantity generated by each physical edge server cluster according to tasks generated by users in the physical edge server clusters;
adding a mark variable label for each physical edge server cluster according to the generated task quantity and the residual cache capacity;
and indicating each physical edge server cluster to store tasks generated by users according to the cache affinity and the tag variable labels.
In a possible embodiment, adding a tag variable label to each physical edge server cluster according to the task amount and the remaining cache capacity includes:
adding a first preset mark variable label for the physical edge server cluster with the task quantity smaller than the residual cache capacity;
and adding a second preset mark variable label for the physical edge server cluster with the task quantity not smaller than the residual cache capacity.
In one possible embodiment, the tag variable label includes: the first preset mark variable label and the second preset mark variable label;
the indicating each physical edge server cluster to store the task generated by the user according to the cache affinity and the tag variable label comprises the following steps:
storing tasks with cache affinity larger than preset affinity in a physical edge server cluster to which the tasks belong;
and sending the task of which the cache affinity is smaller than the preset affinity to a physical edge server cluster corresponding to the first preset mark variable label for storage.
In a second aspect, embodiments in the present disclosure provide a task cache device, including:
the establishing unit is used for mapping a plurality of physical edge server clusters and establishing a twin model in the data twin layer;
the acquisition unit is used for acquiring tasks generated by users in each physical edge server cluster in real time in the twin model;
the acquisition unit is also used for acquiring the occurrence frequency of any task and the average occurrence frequency of all tasks;
the acquisition unit is also used for acquiring user task vectors, edge server task vectors, task local execution resource cost and task edge server execution resource cost;
The determining unit is used for determining cache affinity between each task of the 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 cost and the task edge server execution resource cost;
and the storage unit is used for storing tasks generated by users according to the buffer affinity determined in the digital twin layer and the residual buffer capacity of each physical edge server cluster.
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;
wherein the central cloud system is configured to perform the method of any of the first aspects.
In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method described in the first aspect above via execution of the executable instructions.
In a fifth aspect, embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method described in the first aspect above.
In a sixth aspect, according to another aspect of the present disclosure, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the method of any of the above.
The task caching method provided by the embodiment of the disclosure specifically comprises the following steps: mapping a plurality of physical edge server clusters, constructing a twin model in a data twin layer, acquiring tasks generated by users in each physical edge server cluster in real time in the twin model, acquiring the occurrence frequency of any one task and the average occurrence frequency of all tasks, acquiring a user task vector, an edge server task vector, task local execution resource overhead and task edge server execution resource overhead, determining the cache affinity between each task of a 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, and indicating each physical edge server cluster to store the tasks generated by the user according to the cache affinity determined in the digital twin layer and the residual cache capacity of each physical edge server cluster. On the one hand, a twin model can be constructed through a digital twin layer, and the information of a physical layer is simulated and simulated in the digital twin layer, so that the physical layer is not influenced, and the computing resource of the physical layer is not occupied. On the other hand, the tasks are cached according to the occurrence frequency, the vector and the cost of the tasks through the cache affinity obtained through simulation, so that the caching of the tasks becomes orderly, the user can conveniently access and use the tasks again, and the computing resources of the server cluster on the tasks are saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 is a schematic diagram of a task cache system according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram illustrating another task cache system according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a task caching method according to an embodiment of the disclosure;
FIG. 4 is a schematic flow chart of determining cache affinity in an embodiment of the disclosure;
fig. 5 illustrates a schematic structural diagram of a task buffering device in an embodiment of the disclosure;
fig. 6 shows a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept 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.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
With the development of internet technology and the development of a large amount of application software and services, a qualitative leap is brought to the life of people, and in the present day of various internet business blowout, server clusters also need more and more resources to cache the calculation results of the business, in the related technology, tasks generated by users are mostly randomly generated, the caching tasks of each server cluster are disordered, the caching tasks of a plurality of server clusters can be repeated, the task is not conveniently queried again by the users, the disorder of task caching can also cause that after some task caches are cached, the users can not open again at all, and the caching resources of the server clusters can be wasted.
The task caching method provided by the embodiment of the disclosure specifically comprises the following steps: mapping a plurality of physical edge server clusters, constructing a twin model in a data twin layer, acquiring tasks generated by users in each physical edge server cluster in real time in the twin model, acquiring the occurrence frequency of any one task and the average occurrence frequency of all tasks, acquiring a user task vector, an edge server task vector, task local execution resource overhead and task edge server execution resource overhead, determining the cache affinity between each task of a 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, and indicating each physical edge server cluster to store the tasks generated by the user according to the cache affinity determined in the digital twin layer and the residual cache capacity of each physical edge server cluster. On the one hand, a twin model can be constructed through a digital twin layer, and the information of a physical layer is simulated and simulated in the digital twin layer without influencing the physical layer. On the other hand, the content with higher relativity is stored in the same physical edge server cluster through the cache affinity obtained through simulation, so that the physical edge server cluster caches tasks orderly, and the cache resources of the server cluster are saved.
The business computing unloading method can be applied to electronic equipment and a task caching system.
The task cache system in the present disclosure may be jointly constructed by a digital twin layer constructed by a central computing cloud system and a physical layer constructed by a plurality of physical edge servers, and fig. 1 shows a schematic structural diagram of a task cache system 100 provided by an embodiment of the present disclosure, as shown in fig. 1.
The task cache system 100 comprises 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 may build a digital twin layer. The edge server cluster near the user side consists of N edge servers and a physical layer formed by a plurality of physical edge servers.
Various information, such as user information, server information, computing information, network information, and cache information, of a plurality of physical edge server structures in the physical layer may be obtained in real time by the task cache system 100. User information may include user-generated tasks, and cache information may include existing caches and remaining cache resources, such as the remaining cache capacity of each physical edge server cluster.
Further, a physical marginaler cluster may also be used to build digital twin layers.
Based on the task cache system 100, a twin model of a plurality of physical edge servers can be further constructed in a digital twin layer of the task cache system 100, the twin model is managed and processed, tasks generated by users are obtained in real time, the tasks of the users and the cache affinity of the physical edge server cluster to which the users belong are determined, and the cache of the tasks generated by the users is simulated and simulated to instruct the physical edge server cluster to cache.
Fig. 2 illustrates a schematic structure of a task cache system provided by an embodiment of the present disclosure.
As shown in fig. 2, task cache system 200 may include a central cloud system 201 and physical edge server clusters 202, 203, 204.
The central cloud system 201 may include a data center 211, where the data center 211 stores information of the acquired multiple physical edge server clusters, such as user information, server information, calculation information, network information, and the like, and may also be used to store a twin database, a twin model, and the like.
The central cloud system 201 may further include a twin mapping center 221, where the twin mapping center 221 may be used for policy mapping and function mapping, where the policy mapping may map policies obtained by the digital twin layer, and the function mapping is used for mapping functions of multiple physical edge server clusters.
The central cloud system 201 may further include a resource management module 231, where the resource management module 231 may be used to manage computing resources and cache resources, and the twin mapping center 221 may map the management of the computing resources and the cache resources by the resource management module 231 to a physical edge server cluster in a physical layer through policy mapping.
The present exemplary embodiment will be described in detail below with reference to the accompanying drawings and examples.
Firstly, in the embodiment of the present disclosure, a task caching method is provided, and the method may be executed by any electronic device with computing processing capability, where the electronic device is taken as an example of a central cloud system in the following process.
Fig. 3 shows a flowchart of a task buffering method in an embodiment of the present disclosure, and as shown in fig. 3, the task buffering method provided in the embodiment of the present disclosure includes the following steps:
s302: mapping a plurality of physical edge server clusters, and constructing a twin model in a data twin layer;
in one possible embodiment, a digital twin layer is built in a central cloud system, and by mapping and interacting with a plurality of physical edge server clusters, information such as actual network state information, existing cache and residual cache capacity and the like of each moment of the plurality of physical edge server clusters is obtained in real time, and a twin model of the plurality of physical edge server clusters is built in the digital twin layer.
A physical edge server cluster is understood to be a real physical layer edge server cluster, which is a real device.
By acquiring the information, the method can be used for determining the correlation between the task generated by the user and the information cached in the physical edge server cluster, so as to orderly cache the task.
In one possible embodiment, the initialized plurality of physical edge server clusters are obtained by mapping network state information, existing caches and residual cache capacities of the plurality of physical edge server clusters, and a twinning model is built in the data twinning layer according to the network state information, the residual cache capacities and the initialized plurality of physical edge server clusters.
Since the existing caches in the physical edge server clusters may be more and more, all belong to history cache information, the information is unordered, and a user generates a task, the server clusters will cache the information and may influence the subsequent calculation of cache affinity, so that the existing caches can be deleted in the digital twin layer to obtain initialized multiple physical edge server clusters, but considering that the physical edge server clusters belong to a physical layer and are real devices, the residual cache resources influence the subsequent task cache, and therefore, the twin model needs to be built by using the residual cache capacity.
The network status information may be used to determine which network status is better, available, unavailable, etc.
The tasks generated by the user may be specifically multimedia tasks, for example, the user browses videos, refers to materials, opens web pages on the internet, and the like.
The digital twin layer is a network system/network layer which creates a virtual twin body of a physical network entity in a digital mode and can be interactively mapped with the physical network entity in real time, the digital twin technology is introduced into a collaborative cache, the data of the physical layer mainly comprises physical entity data, space data, resource data, protocols, interfaces, routes, signaling, processes, performances, alarms, logs, states and the like and is stored in a real-time or non-real-time data acquisition mode, so that data support is provided for constructing the network twin body and enabling the network twin body, and a data model with rich functions is formed based on the data.
S304: in the twin model, user-generated tasks in each physical edge server cluster are acquired in real-time.
In one possible embodiment, tasks generated by users in the physical edge server cluster are acquired in real time, and a primary label and a secondary label are added to each task stored by each edge server, wherein the primary label is three major categories of video, text and audio, and the secondary label is a minor category of sports, smelling, drama and the like.
The user generated tasks are tagged for use in subsequent steps to determine cache affinity in the digital twin layer.
S306: the occurrence frequency of any one task and the average occurrence frequency of all the tasks are obtained.
In one possible embodiment, the frequency of occurrence of any one task may be understood as the number of times any one task is generated by the user.
The average occurrence frequency of all tasks is understood to be the average of the occurrence frequencies of all tasks in the physical edge server cluster, and is used to characterize the average of the number of times all tasks have been generated.
By way of example, the frequency of occurrence of task a and the average frequency of occurrence of all tasks can be used to determine whether task a belongs to a frequently occurring task. For example, if the frequency of occurrence of task a is 10 times, 100 tasks are generated by the user in total, and 200 times, the average frequency of occurrence of all tasks is 2 times, and if task a belongs to more tasks than other tasks are generated, the more the frequency of occurrence of task a is greater than the average frequency of occurrence of all tasks, the more task a needs to be cached.
After the task A is cached once, the task A is more likely to be referred again, and the physical edge server cluster caches the task A, so that when a user initiates the task A again, the physical edge server cluster does not need to waste calculation resources to calculate the task A any more, a calculation result is generated, the cached task A is directly opened, the task A is referred again by the user at a higher speed, the time delay and the energy consumption for executing the task A can be reduced, and the response speed of the cluster to the task A is improved.
S308: and acquiring a user task vector, an edge server task vector, task local execution resource overhead and task edge server execution resource overhead.
In one possible embodiment, a user task vector may be understood as a vectorized representation of a user-generated task that may be used to characterize the type of task that is generated by any one user. An edge server task vector may be understood as a result of vectorized representation of tasks that have been cached in the edge server memory in the physical edge server cluster, and may be used to characterize the type of tasks that have been cached in the physical edge server cluster.
The vectorization result of the task generated by the user can be determined through the label of the task generated by the user, and the task vector of the edge server can be determined according to the task cached in the memory of the edge server in the physical edge server cluster.
By comparing the user task vector with the edge server task vector, the correlation between the task generated by the user and the stored task can be reflected to select whether to cache the task, and if the correlation between the user task vector and the edge server task vector is higher, the task generated by the user needs to be cached.
Taking any one physical edge server cluster A as an example, the higher the correlation is, the tasks of the same type are stored in the physical edge server cluster, the tasks of the same type are cached in the same physical edge server cluster, the tasks of the same type are easier to find in the physical edge server cluster A, the tasks A generated by users can be cached in the physical edge server cluster A, the caching is not needed again, the direct calling and the opening are realized, the expense of executing the tasks by the clusters can be saved, and the time delay of responding the tasks is reduced.
In one possible embodiment, the task local execution resource overhead is the overhead of the user generating task hypothesis delivery executing locally. The task edge server execution resource overhead is the overhead that the user generates task assumptions to send on the edge server. Wherein the overhead includes latency and computational cost of executing tasks.
In the process of judging whether the task needs to be cached, the cost of executing the task locally and the cost of executing the task at the edge server are required to be calculated and compared, and if the difference between the cost of executing the resource locally of the task and the cost of executing the resource by the edge server of the task is not large, the task does not need to be cached too.
If the local execution resource cost of the task is larger than the execution resource cost of the task edge server, the task needs to be cached, and the time delay of directly opening the cache content after caching is smaller.
S310: and determining cache affinity 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.
In one possible embodiment, the cache affinity may be calculated by frequency of occurrence and average frequency of occurrence, user task vector and edge server task vector, and task local execution resource overhead and task edge server execution resource overhead.
For example, 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 task local execution resource overhead and the task edge server execution resource overhead may be obtained by multiplying them to obtain the cache affinity, and the greater the cache affinity, the more the task needs to be cached.
Illustratively, the cache affinity may also be determined by, as shown in fig. 4, fig. 4 shows a flow chart for determining the cache affinity, which includes the following steps:
s402: and determining the occurrence frequency parameter of any task according to the first difference value of the occurrence frequency minus the average occurrence frequency and a preset frequency adjustment factor.
S404: a cosine value between the user task vector and the edge server task vector is determined.
S406: a second difference of the task local execution resource overhead minus the task edge server execution resource overhead is determined.
S408: and determining the cache affinity 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.
The following formula can be referred to:
the cache_sim (r, x) represents cache affinity between a task of a user and a physical edge server cluster to which the user belongs; v (V) rx Representing a user task vector; v (V) r Representing an edge server task vector;representing task local execution resource overhead; />Representing the execution resource overhead of the task edge server; f (F) x Representing the frequency of occurrence; f (F) avg Representing the average frequency of occurrence; μ represents a preset frequency adjustment factor.
By the formula (1), the relation between the occurrence frequency and the average occurrence frequency of the tasks, the correlation between vectors and the resource cost can be taken into consideration, the calculation of the cache affinity is considered from multiple dimensions, the accuracy is higher, and the cache relation between the tasks and the clusters is easier to judge.
S312: and indicating each physical edge server cluster to store the task generated by the user according to the buffer affinity determined in the digital twin layer and the residual buffer capacity of each physical edge server cluster.
In one possible embodiment, the task with higher cache affinity is directly stored in the corresponding physical edge server cluster, and the task with lower cache affinity is sent to other physical edge server clusters with larger residual cache capacity.
In one possible embodiment, the task amount generated by each physical edge server cluster is determined according to tasks generated by users in the plurality of physical edge server clusters, a tag variable label is added to each physical edge server cluster according to the generated task amount and the residual cache capacity, and each physical edge server cluster is instructed to store the tasks generated by the users according to the cache affinity and the tag variable label. Wherein, the mark variable label includes: the first preset mark variable label and the second preset mark variable label.
For example, the task amount of each physical edge server cluster may be counted according to tasks generated by users in the plurality of physical edge server clusters, the time required from the start to the completion of the tasks may be counted for a preset period of time, the task amount may be counted for one time slot from the start to the completion of the tasks, and the task amount may be counted for several time slots.
And after the task quantity is counted, judging whether the physical edge server clusters can have space for caching tasks according to the residual cache capacity of each physical edge server cluster, and adding labels for the physical edge server clusters.
The first preset flag variable label is added for the physical edge server cluster with the task quantity smaller than the residual cache capacity, and the second preset flag variable label is added for the physical edge server cluster with the task quantity not smaller than the residual cache capacity.
The following formula can be referred to:
wherein, the liquid crystal display device comprises a liquid crystal display device,the specific values of the sign variable labels can be a first preset sign variable label 0 and a second preset sign variable label 1; />Representing a task amount for each physical edge server cluster; />Representing the remaining cache capacity of each physical edge server cluster.
The tasks with the cache affinity being greater than the preset affinity are stored in the physical edge server cluster to which the tasks belong, and the tasks with the cache affinity being less than the preset affinity are sent to the physical edge server cluster corresponding to the first preset mark variable label for storage.
According to the task caching method, on one hand, calculation of cache affinity can be completed under the condition that interaction of a physical layer is not affected and calculation resources of the physical layer are not occupied, and caching of tasks in the physical layer can be simulated and used for indicating a physical edge server cluster in the physical layer to cache the tasks. On the other hand, the task with high correlation and high occurrence frequency can be buffered, so that the task can be conveniently queried and used by a user again, and when the user processes and calculates the task again, the processing speed of the cluster on the task can be faster, and the calculation cost can be lower.
Further, in the related art, the task generated by the user is cached by the cluster, and random, so that the task may be cached, after the task is cached, the task may not be reused by the user later, and the number of the tasks is large, so that the cache resources of the cluster are wasted, and resource waste is caused.
In one possible embodiment, if the task generated by the user is already cached in the physical edge server cluster to which the user belongs, the cache affinity is high and the need for caching again is avoided.
In one possible implementation manner, for any task of the user, if the cache affinity 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, the vector of any task can be calculated, the correlation between the vector of any task and the edge server task vector of the edge server in the other physical edge server clusters can be determined, and any task is preferentially stored in the cluster corresponding to the other edge server with high correlation. It should be noted that, for calculating the correlation between the vector of any task and the edge server task vector of the edge server in other physical edge server clusters, the correlation may be performed in the digital twin layer, and the instruction may be directly issued. And does not occupy any computing resources of the physical edge server cluster.
Taking any task as a task A as an example, the task A is cached in the physical edge server cluster B in the mode, so that the use of a user can be facilitated, and the computing resources of the server for executing the task can be saved. Because the correlation between the task vector of the edge server in the physical edge server cluster B and the task A is high, the user in the physical edge server cluster B is more prone to generating the task of the type corresponding to the task A, and if the user in the physical edge server cluster B generates the task A in the later use process, the physical edge server cluster B has cached the task A and can be directly called.
In another possible implementation, a query may be first performed for a task generated by a user, and then the task may be processed and calculated.
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 in the server of the first three of the correlation sequences, the cache of the task can be directly used interactively, and the calculation can be executed again in disorder.
In the digital twin layer, the existing cache information of each physical edge server cluster can be obtained, so that the query in the digital twin layer does not need to occupy any resource of the physical layer.
In a possible embodiment, if the twin model of the existing cache is deleted in the digital chaotic layer, since the memory of the simulated twin model is empty at first, the task generated at first can be directly cached, as the cache is more and more, the cache affinity is calculated according to the above manner, and the task is cached according to the above manner.
In one possible embodiment, the digital twin layer may calculate vectorization results of tasks stored in each edge server in the physical edge server cluster for use in the next stage of cache affinity calculation after collaborative caching of the tasks according to the real-time interaction information.
Based on the same inventive concept, the embodiments of the present disclosure further provide a task buffer device, as follows. Since the principle of solving the problem of the embodiment of the device is similar to that of the embodiment of the method, the implementation of the embodiment of the device can be referred to the implementation of the embodiment of the method, and the repetition is omitted.
Fig. 5 is a schematic structural diagram of a task buffering device in an embodiment of the disclosure, and as shown in fig. 5, the task buffering device 50 includes: the system comprises a building unit 501, an acquisition unit 502, a storage unit 504, a determination unit 503, a storage unit 504 and a storage unit, wherein the building unit 501 is used for mapping a plurality of physical edge server clusters, building a twin model in a data twin layer, the acquisition unit 502 is used for acquiring tasks generated by users in each physical edge server cluster in real time in the twin model, the acquisition unit 502 is also used for acquiring the occurrence frequency of any task and the average occurrence frequency of all tasks, the acquisition unit 502 is also used for acquiring user task vectors, edge server task vectors, task local execution resource costs and task edge server execution resource costs, and the determination unit 503 is used for determining the cache affinity between each task of a user and the physical edge server cluster to which the user belongs according to the occurrence frequency, the average occurrence frequency, the user task vectors, the edge server task local execution resource costs and the task edge server execution resource costs, and the storage unit 504 is used for storing the tasks generated by the users according to the cache affinity determined in the digital twin layer and the residual cache capacity of each physical edge server cluster.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to such an embodiment of the present disclosure is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 6, the electronic device 600 is in the form of a general purpose computing device. Components of electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, and a bus 630 that connects the various system components, including the memory unit 620 and the processing unit 610.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs steps according to various exemplary embodiments of the present disclosure described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 610 may perform the steps of any of the method embodiments described above.
The storage unit 620 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
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 or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing 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 using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 640 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and/or any device (e.g., router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. As shown, network adapter 660 communicates with other modules of electronic device 600 over bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as a computer program product or computer program comprising computer instructions 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 performs the method in the above-described embodiment.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium, which may be a readable signal medium or a readable storage medium, is also provided. On which a program product is stored which enables the implementation of the method described above of the present disclosure. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
More specific examples of the computer readable storage medium in the present disclosure may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In this disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Alternatively, the program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In particular implementations, the program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind 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., connected via the Internet using an Internet service provider).
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
From the description of the above embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A task caching method, the method comprising:
mapping a plurality of physical edge server clusters, and constructing a twin model in a data twin layer;
in the twin model, acquiring tasks generated by users in each physical edge server cluster in real time;
acquiring the occurrence frequency of any one task and the average occurrence frequency of all tasks;
acquiring a user task vector, an edge server task vector, task local execution resource overhead and task edge server execution resource overhead;
determining cache affinity 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;
And indicating each physical edge server cluster to store the task generated by the user according to the buffer affinity determined in the digital twin layer and the residual buffer capacity of each physical edge server cluster.
2. The method of claim 1, wherein the mapping the plurality of physical edge server clusters, constructing a twinning model in the data twinning layer, comprises:
mapping network state information, existing caches and remaining cache capacities of the plurality of physical edge server clusters;
deleting the existing caches in the plurality of physical edge server clusters to obtain a plurality of initialized physical edge server clusters;
and establishing the twin model in a data twin layer according to the network state information, the residual cache capacity and the initialized multiple physical edge server clusters.
3. The method of claim 1, wherein determining the cache affinity between each task of the user and the physical edge server cluster to which the user belongs based on the frequency of occurrence, the average frequency of occurrence, 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 the occurrence frequency parameter of any task according to the first difference value of the occurrence frequency minus 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;
determining a second difference of the task local execution resource overhead minus the task edge server execution resource overhead;
and determining the cache affinity 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.
4. The method of claim 1, wherein the indicating each physical edge server cluster to store the user-generated task based on the determined cache affinity in the digital twin layer and the remaining cache capacity of each physical edge server cluster comprises:
determining the task quantity generated by each physical edge server cluster according to tasks generated by users in the physical edge server clusters;
adding a mark variable label for each physical edge server cluster according to the generated task quantity and the residual cache capacity;
And indicating each physical edge server cluster to store tasks generated by users according to the cache affinity and the tag variable labels.
5. The method of claim 4, wherein adding a tag variable label to each of the physical edge server clusters according to the task amount and the remaining cache capacity comprises:
adding a first preset mark variable label for the physical edge server cluster with the task quantity smaller than the residual cache capacity;
and adding a second preset mark variable label for the physical edge server cluster with the task quantity not smaller than the residual cache capacity.
6. The method of claim 4, wherein the tag variable label comprises: the first preset mark variable label and the second preset mark variable label;
the indicating each physical edge server cluster to store the task generated by the user according to the cache affinity and the tag variable label comprises the following steps:
storing tasks with cache affinity larger than preset affinity in a physical edge server cluster to which the tasks belong;
and sending the task of which the cache affinity is smaller than the preset affinity to a physical edge server cluster corresponding to the first preset mark variable label for storage.
7. A task buffering device, characterized by comprising:
the establishing unit is used for mapping a plurality of physical edge server clusters and establishing a twin model in the data twin layer;
the acquisition unit is used for acquiring tasks generated by users in each physical edge server cluster in real time in the twin model;
the acquisition unit is also used for acquiring the occurrence frequency of any task and the average occurrence frequency of all tasks;
the acquisition unit is also used for acquiring user task vectors, edge server task vectors, task local execution resource cost and task edge server execution resource cost;
the determining unit is used for determining cache affinity between each task of the 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 cost and the task edge server execution resource cost;
and the storage unit is used for storing tasks generated by users according to the buffer affinity determined in the digital twin layer and the residual buffer capacity of each physical edge server cluster.
8. A task cache system, comprising: a central cloud system and a physical edge server cluster;
wherein the central cloud system is configured to perform the method of any of claims 1-6.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any one of claims 1-6 via execution of the executable instructions.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1-6.
CN202310841827.4A 2023-07-10 2023-07-10 Task caching method, device, system, equipment and medium Pending CN116860447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310841827.4A CN116860447A (en) 2023-07-10 2023-07-10 Task caching method, device, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310841827.4A CN116860447A (en) 2023-07-10 2023-07-10 Task caching method, device, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN116860447A true CN116860447A (en) 2023-10-10

Family

ID=88224737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310841827.4A Pending CN116860447A (en) 2023-07-10 2023-07-10 Task caching method, device, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116860447A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117631615A (en) * 2023-10-12 2024-03-01 中国电建集团山东电力管道工程有限公司 Production workshop data acquisition and processing method and system based on Internet of things equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117631615A (en) * 2023-10-12 2024-03-01 中国电建集团山东电力管道工程有限公司 Production workshop data acquisition and processing method and system based on Internet of things equipment

Similar Documents

Publication Publication Date Title
US9785373B2 (en) Optimizing fine grained context addressability in highly dimensional environments using TCAM hybrid memory and storage architectures
US11076020B2 (en) Dynamically transitioning the file system role of compute nodes for provisioning a storlet
CN110908697A (en) Resource packaging method, device, server and storage medium
CN110908707B (en) Resource packaging method, device, server and storage medium
CN113254445B (en) Real-time data storage method, device, computer equipment and storage medium
CN116860447A (en) Task caching method, device, system, equipment and medium
CN110198473A (en) Method for processing video frequency, device, electronic equipment and computer readable storage medium
CN109697034A (en) A kind of method for writing data, device, electronic equipment and storage medium
CN109783321A (en) Monitoring data management method, device, terminal device
CN111858393B (en) Memory page management method, memory page management device, medium and electronic equipment
CN111324258B (en) Method, device, equipment and medium for generating contents of configuration items of multilevel pull-down menu
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
CN106446272B (en) Method and apparatus for sending data
CN117472555A (en) Computing power resource allocation method, system, device, equipment and storage medium
US11204923B2 (en) Performance for query execution
CN111030856B (en) Cloud-based data access method, electronic device and computer readable medium
CN116521377B (en) Service computing unloading method, system, device, equipment and medium
CN111880831A (en) Method and device for synchronously updating server, computer equipment and storage medium
CN116820539B (en) System software operation maintenance system and method based on Internet
CN109828719A (en) Magnetic disc control method, device and relevant device where commitLog file based on cloud monitoring
US11966338B2 (en) Prefetching management in database system based on number of pages being prefetched
CN113778350A (en) Log printing method and device
CN117112189A (en) Data processing method, device, electronic equipment and storage medium
CN112948141A (en) Data processing method, device and system based on message middleware
CN117290579A (en) Information generating method, apparatus, electronic device, computer readable medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination