Edge computing task scheduling method, electronic device, storage medium and product
By building a cache pool in edge computing tasks, using mirror data and task parameters to build key feature data, and directly reusing historical execution results, the problem of insufficient utilization of computing resources is solved, and efficient resource utilization and improved user experience are achieved.
Patent Information
- Application Number
- CN202510940327.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-08
AI Technical Summary
In the existing technology, increasing computing resources by expanding capacity leads to insufficient utilization and resource waste, especially when computing demand is low, resulting in serious resource waste, and expansion increases costs.
By building a cache pool to store the execution results of common edge computing tasks, and filtering data based on the task's image data, startup parameters, and task execution environment to build key feature data, the target value feature data is matched in the cache pool, and historical execution results are directly reused to reduce repeated calculations.
It reduces the consumption of computing resources, reduces the waste of resources caused by capacity expansion, and improves the utilization efficiency of computing resources and user experience.
Smart Images

Figure CN120429094B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a scheduling method, electronic device, storage medium, and product for edge computing tasks. Background Art
[0002] As the user scale continues to expand, the number of edge computing tasks that the cluster needs to mobilize is also increasing, which in turn increases the demand for computing resources.
[0003] In the related art, to ensure the normal operation of each edge computing task, the cluster's computing resources are usually increased through capacity expansion. However, when the cluster is running in a low-consumption resource state, this approach can easily lead to insufficient utilization of computing resources. Summary of the Invention
[0004] The present application provides a scheduling method, electronic device, storage medium and product for edge computing tasks, so as to at least solve the problem of insufficient utilization of computing resources caused by capacity expansion in related technologies.
[0005] This application provides a scheduling method for edge computing tasks, including:
[0006] Obtain a scheduling request for the target edge computing task, which includes the image data, startup parameters, and task execution environment screening data used by the target edge computing task.
[0007] Filter data based on the image data, startup parameters, and task execution environment used by the target edge computing task, and build the target key feature data corresponding to the target edge computing task;
[0008] According to the target key feature data, the target value feature data corresponding to the target key feature data is matched in the pre-established cache pool. The target value feature data is the execution result data of the target edge computing task.
[0009] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the scheduling method for any of the above-mentioned edge computing tasks when executing the computer program.
[0010] The present application also provides a computer-readable storage medium, which stores a computer program, wherein when the computer program is executed by a processor, the steps of the scheduling method for any of the above-mentioned edge computing tasks are implemented.
[0011] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the scheduling method for any of the above-mentioned edge computing tasks.
[0012] In the present application, a scheduling request of a target edge computing task is obtained, wherein the scheduling request includes the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used. Then, based on the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used, the target key feature data corresponding to the target edge computing task is constructed, and based on the target key feature data, the target value feature data corresponding to the target key feature data is matched in a pre-established cache pool, and the target value feature data is the execution result data of the target edge computing task. The method of the present application, when obtaining a scheduling request, first constructs the target key feature data based on the image data used by the target edge computing task in the scheduling request, the startup parameters used, and the task execution environment screening data used, and directly reuses the historical execution results of the task, i.e., the target value feature data, from the cache pool, without the need for repeated calculations, thereby reducing the consumption of computing resources, thereby reducing the waste of computing resources caused by capacity expansion in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0014] Figure 1 A schematic diagram of an exemplary architecture provided for this application;
[0015] Figure 2 A flowchart of a method for scheduling edge computing tasks provided in an embodiment of the present application;
[0016] Figure 3 A flowchart of a method for constructing key-value pairs corresponding to each edge computing task provided in an embodiment of the present application;
[0017] Figure 4 A flowchart of another method for scheduling edge computing tasks provided in an embodiment of the present application;
[0018] Figure 5 A schematic diagram of an exemplary edge computing task provided in an embodiment of the present application;
[0019] Figure 6 A schematic diagram of the structure of a scheduling device for edge computing tasks provided in an embodiment of the present application;
[0020] Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0022] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0023] In recent years, with the rapid development of technologies such as mobile internet and the Internet of Things, the number of various terminals and the amount of data stored in them have increased dramatically. Traditional clusters for centralized data processing are no longer able to handle the massive computing demands. This situation has also driven the development of edge computing models, which decentralize computing power. In this model, clusters dispatch edge computing tasks from the cloud to edge computing devices for execution. This approach balances latency requirements with performance requirements.
[0024] In edge computing devices, users can perform two types of computing operations, one is long-cycle task (Service task) computing operation, and the other is short-cycle task (Job task) computing operation. A long-cycle task means that after a task is started, the running cycle of the task is bound to the running cycle of the edge computing device. The task will not stop in the middle and will continue to run until the edge computing device stops running. The task can be, for example, a World Wide Web (Web) service or a monitoring service. A short-cycle task means that a task automatically exits from the start to the end of execution, without waiting until the edge computing device stops running. The task can be, for example, a data cleaning task, a one-time image acquisition task, or a temperature and humidity acquisition task. This application mainly focuses on short-cycle tasks. After the short-cycle task scheduling operation is completed, it will exit and release the occupied resources.
[0025] When a cluster performs task scheduling, it typically receives task execution requests submitted by each user terminal. Based on these requests, it then uses its computing resources to schedule the tasks sent by each user terminal on its edge computing device. After the edge computing device completes the task, it sends the results to the cluster, which then sends them to the corresponding user terminal.
[0026] As the user scale continues to expand, the number of Job tasks executed by cluster scheduling is also increasing, and the computing resources required for scheduling are also increasing. In order to better schedule tasks and meet the demand for computing resources. In related technologies, the computing resources of the cluster are usually increased by expansion. If the capacity is expanded according to the computing resources consumed during the peak of task submission, that is, the high water level, then when the cluster runs at a water level with relatively low demand for computing resources, it will cause a large amount of computing resources to be wasted, and expansion will also increase certain costs. However, if the capacity is not expanded, the Job tasks sent by each user terminal will have to queue up for execution, resulting in too long waiting time for the task and affecting the execution of the task, which in turn leads to a decline in user experience.
[0027] Therefore, in response to the above-mentioned problems in related technologies, it was found during the research process that when the cluster performs task scheduling, some tasks are repeated. The data source update frequency of such tasks is lower than the task execution frequency. Therefore, the execution results of such tasks can be reused within a certain period of time. Based on this, the present application proposes a scheduling method for edge computing tasks. In this application, the execution results of such tasks are stored in a cache pool. When the same task is executed again, the cluster does not need to use computing resources to schedule it, but directly obtains the execution result corresponding to the task from the cache pool without repeated calculation, thereby reducing the consumption of computing resources.
[0028] To facilitate understanding of this application, the following is an exemplary architecture diagram for explanation. Figure 1 , Figure 1 This is a schematic diagram of an exemplary architecture provided in this application, including a user terminal 01 and a cluster 02 , where the cluster 02 includes a processor 701 .
[0029] Among them, the user terminal 01 sends a scheduling request for the target edge computing task to the cluster 02. The processor 701 in the cluster 02 constructs the target key feature data corresponding to the target edge computing task according to the image data, the startup parameters used, and the task execution environment screening data used by the target edge computing task in the scheduling request, and matches the target value feature data corresponding to the target key feature data in the pre-established cache pool based on the target key feature data. The target value feature data is the execution result data of the target edge computing task.
[0030] It is understandable that the above examples are only for illustration and do not limit the present application, and they can be determined according to actual application conditions, etc.
[0031] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0032] See Figure 2 , Figure 2 This is a flow chart of a method for scheduling edge computing tasks provided in an embodiment of the present application. The execution subject of this method can be a processing device for edge computing tasks. The processing device for edge computing tasks can be implemented by a computer program, or by a medium storing a relevant computer program, such as a USB flash drive and / or an optical disk, or by a physical device integrated or installed with a relevant computer program, such as an electronic device. The electronic device can be a server, a server cluster, an intelligent terminal, etc. The method may include the following steps:
[0033] S201. Obtain a scheduling request for a target edge computing task, where the scheduling request includes image data used by the target edge computing task, startup parameters used, and task execution environment screening data used.
[0034] In this embodiment, the execution entity is a server cluster (referred to as the cluster) as an example. The cluster receives a scheduling request for a target edge computing task from a user terminal. The scheduling request includes at least the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used.
[0035] To facilitate understanding of this step, the above-mentioned data are first explained below, see Table 1.
[0036] Table 1
[0037]
[0038] The image data used for the target edge computing task in the scheduling request can be obtained through the field with the attribute name of images in Table 1, the startup parameters used in the scheduling request can be obtained through the field with the attribute name of args in Table 1, and the task execution environment screening data used in the scheduling request can be obtained through the field with the attribute name of nodeSelectionFactor in Table 1.
[0039] In Table 1, volumeMount is set by the user and specifies the volume mounted in the container. This volume can be a Network File System (NFS) or a host hard drive directory. It is primarily used for persistent storage of runtime container data and for reading raw data from edge node hosts. nodeSelectionFactor is set by the user and specifies the necessary conditions for the edge computing device node executing the task. It is in key-value format. finish and result indicate the task status and are modifiable. When the finish field is true, the task is complete, and the result field is set to the job output. optimize, optimizeTargetJob, and optimizeSourceJobs are set by the system. During task execution, the system merges tasks that can be processed offline. If a task is merged, the optimize field is set to true, and optimizeTargetJob is set to the merged job. Subsequent status determination and result acquisition are performed through the target job. The merged jobs are recorded in the optimizeSourceJobs field of the actually executed job, and the status of these jobs is updated after completion. The cache is set by the user to indicate whether the execution result of this task can be reused. If it can be reused, the reuse period, i.e., the validity period, is set using the cacheTime field.
[0040] Therefore, in addition to the image data, startup parameters, and task execution environment screening data used by the target edge computing task included in the scheduling request, other data in Table 1 may also be included according to actual usage requirements, which is not limited in this embodiment.
[0041] S202: Filter data based on the image data, startup parameters, and task execution environment used by the target edge computing task to construct target key feature data corresponding to the target edge computing task.
[0042] In this embodiment, a key-value pair cache pool is pre-built, storing key feature data (key) corresponding to multiple edge computing tasks and corresponding value feature data (value). The key feature data consists of the image data used by the edge computing task, the startup parameters used, and the task execution environment screening data used.
[0043] Therefore, it is necessary to filter data based on the image data, startup parameters, and task execution environment used by the target edge computing task, and construct the target key feature data corresponding to the target edge computing task, so as to facilitate search and matching in the cache pool based on the constructed target key feature data.
[0044] S203. According to the target key feature data, target value feature data corresponding to the target key feature data is matched in a pre-established cache pool, where the target value feature data is the execution result data of the target edge computing task.
[0045] According to the constructed target key feature data, it is matched with the key feature data in the cache pool to match the corresponding target value feature data. The target value feature data is the execution result data of the target edge computing task.
[0046] In the above embodiment of the present application, by obtaining a scheduling request for a target edge computing task, wherein the scheduling request includes the mirror data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used. Then, based on the mirror data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used, the target key feature data corresponding to the target edge computing task is constructed, and based on the target key feature data, the target value feature data corresponding to the target key feature data is matched in a pre-established cache pool, and the target value feature data is the execution result data of the target edge computing task. The method of this embodiment, when obtaining a scheduling request, first constructs the target key feature data based on the mirror data used by the target edge computing task in the scheduling request, the startup parameters used, and the task execution environment screening data used, and directly reuses the historical execution results of the task, i.e., the target value feature data, from the cache pool, without the need for repeated calculations, thereby reducing the consumption of computing resources, thereby reducing the waste of computing resources caused by capacity expansion in related technologies.
[0047] Furthermore, based on the above embodiments, it is explained that before the cluster obtains the scheduling request of the target edge computing task, it first needs to construct the key-value pairs corresponding to each edge computing task, and store the key-value pairs corresponding to each edge computing task in the cache pool.
[0048] Optionally, the edge computing tasks corresponding to the key-value pairs stored in the cache pool can be frequently used tasks. A frequently used task is one that is executed multiple times within a preset duration using the same parameters, namely, the same image data, startup parameters, and task execution environment screening data, and produces the same execution results. The high number of executions and the consistent results indicate that such tasks are prone to recurrence, and the likelihood of their results being reused is high.
[0049] See Figure 3 , Figure 3 A flowchart of a method for constructing key-value pairs corresponding to each edge computing task provided in an embodiment of the present application may include the following steps:
[0050] S301. Acquire triplet data corresponding to each edge computing task. The triplet data includes the image data used by the edge computing task, the startup parameters used, and the task execution environment screening data used.
[0051] The smallest unit of edge computing task scheduling is the container. All jobs consist of a container image and startup parameters. Container image data can be pre-built by the user, specifically by accepting external input parameters within the image through a startup script or other means to complete the build operation. During the build process, the container image data can be uploaded to a private image repository for scheduling.
[0052] When constructing key-value pairs, the cluster only needs to base its work on the metadata corresponding to each edge computing task. For any edge computing task, the metadata corresponding to the edge computing task must include at least image data, startup data, and task execution environment screening data. Image data, startup data, and task execution environment screening data constitute a triplet of data.
[0053] Image data is used to define the software environment and dependencies for edge computing tasks, ensuring the consistency of execution results. Startup data identifies the input data and configuration of edge computing tasks, determining their specific logic and output. Task execution environment screening data limits the hardware and system environment for edge computing tasks, ensuring the applicability of cached results.
[0054] In this embodiment, after executing the edge computing task, each edge computing device obtains the execution result data, and then sends the triple data required to execute the edge computing task and the execution result data to the cluster. Therefore, the cluster can obtain the triple data and execution result data of each edge computing task sent by each edge computing device.
[0055] S302. Construct key feature data corresponding to each edge computing task based on the triple data corresponding to each edge computing task.
[0056] One possible implementation is:
[0057] Based on preset splicing rules, the image data, startup parameters, and task execution environment screening data used by each edge computing task are spliced together to obtain the initial key string corresponding to each edge computing task. The initial key string corresponding to each edge computing task is then standardized. Specifically, a hash operation is performed on the initial key string corresponding to each edge computing task to generate a fixed-length hash value. The hash value is then converted to a preset format to obtain the key feature data corresponding to each edge computing task.
[0058] S303: Associating the key feature data corresponding to each edge computing task with the execution result data corresponding to each edge computing task, and constructing a key-value pair corresponding to each edge computing task.
[0059] The key feature data corresponding to each edge computing task is used as the "key" in the key-value pair, and the execution result data corresponding to each edge computing task is used as the "value" in the same key-value pair, thereby constructing the key-value pair corresponding to each edge computing task.
[0060] After constructing the key-value pairs corresponding to each edge computing task, before storing the key-value pairs corresponding to each edge computing task in the cache pool, you can also set the validity period information of the key-value pairs corresponding to each edge computing task and bind the validity period information to the corresponding key-value pairs.
[0061] When setting the validity period information of the key-value pairs corresponding to each edge computing task, one possible implementation method is:
[0062] For any edge computing task, the validity period information of the key-value pair corresponding to the edge computing task is determined according to the usage frequency of the edge computing task.
[0063] Optionally, based on the frequency of edge computing tasks, if the frequency is high, the validity period of the key-value pairs corresponding to the edge computing tasks can be set shorter to ensure data freshness. If the frequency is low, the validity period can be set longer to ensure a higher hit rate.
[0064] The field information cacheTime used to indicate the length of the valid time in the edge computing task is set to the above-mentioned validity period information.
[0065] In this embodiment, the validity period information of the key-value pairs corresponding to each edge computing task can be detected at preset periods, and the key-value pairs that have exceeded the corresponding validity period information can be cleared to release the storage resources of the occupied storage pool.
[0066] By setting a reasonable expiration date for each key-value pair, the cluster can automatically clean up expired caches, ensuring the timeliness of task execution results and avoiding cache invalidation caused by data source updates. This cleanup mechanism automatically releases resources when the cache expires, reducing ineffective storage space usage.
[0067] In the above embodiment of the present application, by obtaining the triple data corresponding to each edge computing task, wherein the triple data includes the mirror data used by the edge computing task, the startup parameters used, and the task execution environment screening data used. And according to the triple data corresponding to each edge computing task, the key feature data corresponding to each edge computing task is constructed, and then the key feature data corresponding to each edge computing task is associated with the execution result data corresponding to each edge computing task to construct the key-value pair corresponding to each edge computing task. The method of this embodiment combines the mirror data, startup parameters and task execution environment screening data into a triple, generates unique key feature data through hash operation, ensures that the execution environment and input conditions of each edge computing task are accurately identified, and avoids mismatching of cache results due to environmental differences or parameter changes. The key feature data is associated with the execution result data to form a key-value pair, so that the edge computing task execution results can be efficiently reused. When a task scheduling request with the same conditions is received, the result can be directly obtained from the cache pool, thereby reducing the resource consumption caused by repeated calculations.
[0068] Furthermore, based on the above embodiment, another method for scheduling edge computing tasks is described. Figure 4 , Figure 4 A flowchart of another method for scheduling edge computing tasks provided in an embodiment of the present application is provided. The method may include the following steps:
[0069] S401. Obtain a scheduling request for a target edge computing task.
[0070] In this embodiment, the execution subject also takes the cluster as an example, and the cluster obtains the scheduling request of the target edge computing task sent by the user terminal.
[0071] S402: Build target key feature data corresponding to the target edge computing task based on the image data, startup parameters, and task execution environment screening data used by the target edge computing task.
[0072] Based on the preset splicing rules, the image data, the startup parameters and the task execution environment screening data used by the target edge computing task are spliced to obtain the target initial key string, and the target initial key string is standardized. Specifically, a hash operation is performed on the target initial key string to generate a hash value of a fixed length, and the hash value is converted into a preset format to obtain the target key feature data corresponding to the target edge computing task. For example, the target key feature data KEY can be in the form of a triple {A, C, S}, where A represents the image data used by the target edge computing task, C represents the startup parameters used, and S represents the task execution environment screening data used.
[0073] S403: Matching is performed in a pre-established buffer pool according to the target key feature data.
[0074] In this application, since key-value pairs corresponding to multiple edge computing tasks are pre-stored in the cache pool, there is a correspondence between the key feature data and the value feature data in each key-value pair. Therefore, matching can be performed in the pre-established cache pool according to the target key feature data.
[0075] S404: If target value feature data corresponding to the target key feature data is matched in the pre-established cache pool, the target value feature data is the execution result data of the target edge computing task.
[0076] According to the target key feature data, a match is performed in a pre-established cache pool to obtain a target key-value pair that fully matches the target key feature data.
[0077] In this application, since the validity period information of each key-value pair is pre-set, the preset validity period information of the target key-value pair can also be obtained. If the current time information does not exceed the preset validity period information, it means that the value characteristic data in the target key-value pair is valid data, and the value characteristic data in the target key-value pair is determined as the target value characteristic data.
[0078] If the current time information exceeds the preset validity period information, the real-time calculation of the target edge computing task in the cluster is triggered according to the scheduling request to obtain the execution result data of the target edge computing task.
[0079] If the current time exceeds the preset validity period, the cluster automatically triggers real-time calculation to avoid calculation errors or decision deviations caused by reusing expired data.
[0080] Optionally, the cluster performs real-time calculations on the target edge computing task to obtain the execution result data of the target edge computing task, which may be:
[0081] When a cluster triggers real-time computing, it first parses the scheduling request for the target edge computing task, extracting the image data, startup parameters, and task execution environment screening data required for the task. It then uses a pre-set resource matching algorithm based on the task execution environment screening data, such as processor architecture, memory capacity, and network bandwidth requirements, to select the target edge computing device that meets the requirements from the list of available edge computing devices. For example, if a task requires processor computing power, the cluster will prioritize assigning the task to an edge computing device with corresponding processor resources available to ensure that the task runs in the appropriate environment.
[0082] Once the cluster identifies the target edge computing device, it uses containerization technology to pull the image required for the task and completes the container configuration and initialization based on the startup parameters. Within the container, the required software environment, dependency libraries, and configuration files are fully deployed, ensuring consistency and isolation across the task's runtime environment. The container then launches the task process, processing the input data according to the specified logic and parameters.
[0083] After the task is completed, the execution result data is generated on the target edge computing device. The target edge computing device sends the execution result data back to the cluster via the network. After receiving the execution result data, the cluster associates the execution result data with the corresponding key feature data based on the key feature data of the task, constructs a new key-value pair, and stores it in the cache pool for subsequent matching.
[0084] At the same time, set new validity period information for the key-value pair to facilitate quick reuse of the same task in the future.
[0085] S405. If the target key-value pair is not matched in the pre-established cache pool, the real-time calculation of the target edge computing task is triggered according to the scheduling request to obtain the execution result data of the target edge computing task.
[0086] After receiving the execution result data, the cluster associates the execution result data with the corresponding key feature data according to the key feature data of the task, constructs a new key-value pair, and stores it in the cache pool.
[0087] For the specific implementation process of this step, please refer to the content in the above steps. To avoid repetition, we will not explain it again.
[0088] In the above embodiment of the present application, unique key feature data is constructed based on the mirror data, startup parameters and environment screening data of the target edge computing task, which can accurately identify task requirements and avoid mismatching of cached results. By quickly searching in the cache pool, if the target value feature data is hit, the historical execution result data can be directly reused, thereby greatly reducing repeated calculations and reducing the waste of computing resources. If the cache pool does not hit, real-time calculation is triggered to ensure accurate execution result data. The method of this embodiment takes into account both timeliness and reusability, and improves accuracy.
[0089] To facilitate understanding of the method of this application, the following examples are briefly described. Figure 5 , Figure 5 A schematic diagram of an exemplary edge computing task provided in an embodiment of the present application.
[0090] The intelligent terminal U1 submits two scheduling requests for edge computing tasks to the cluster, and generates two key feature data based on the two scheduling requests, namely T1={A1,C1,S1} and T2={A1,C2,S1}.
[0091] The intelligent terminal U2 submitted three scheduling requests for edge computing tasks to the cluster, and generated three key feature data based on the three scheduling requests, namely T3={A1,C1,S1}, T4={A2,C3,S2} and T5={A2,C3,S2}.
[0092] The cluster matches the above five key feature data in the cache pool, and only matches the target objects with key feature data {A1, C2, S1} and {A2, C3, S2} in the cache pool, namely T c1 ={A1,C2,S1} and Tc2={A2,C3,S2}, T c1 The corresponding value feature data is R c1 , T c2 The corresponding value feature data is R c2 . It can be seen that the value characteristic data R2 corresponding to T2 is R c1 , the cluster will R c1 Sent to the smart terminal U1. Correspondingly, the value characteristic data R4 corresponding to T4 and the value characteristic data R5 corresponding to T5 are both R c2 , the cluster will R c2 Sent to the smart terminal U2.
[0093] Because the cluster doesn't match a target object with key feature data {A1, C1, S1} in the cache pool, it performs a real-time calculation based on the information in {A1, C1, S1} to obtain a result. Therefore, the value feature data R1 of key feature data T1 is the result of this calculation. The value feature data R3 of key feature data T3 is also the result of this calculation. The cluster then sends these results to smart terminals U1 and U2, respectively.
[0094] The technical effects achieved can be found in any of the above embodiments. To avoid redundancy, this embodiment will not be described again.
[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0096] This application provides a scheduling device for edge computing tasks, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of a scheduling device for edge computing tasks provided in an embodiment of the present application. The scheduling device for edge computing tasks includes:
[0097] The acquisition module 601 is used to obtain a scheduling request for a target edge computing task, where the scheduling request includes the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used.
[0098] The processing module 602 is used to filter data based on the image data, startup parameters and task execution environment used by the target edge computing task, and construct target key feature data corresponding to the target edge computing task.
[0099] The processing module 602 is also used to match the target value feature data corresponding to the target key feature data in a pre-established cache pool according to the target key feature data, and the target value feature data is the execution result data of the target edge computing task.
[0100] In one possible implementation, the processing module 602 is specifically configured to:
[0101] Based on the preset splicing rules, the image data, startup parameters, and task execution environment screening data used by the target edge computing task are spliced to obtain the target initial key string.
[0102] The target initial key string is standardized to obtain the target key feature data corresponding to the target edge computing task.
[0103] In one possible implementation, the processing module 602 is specifically configured to:
[0104] Hash the target initial key string to generate a fixed-length hash value.
[0105] Convert the hash value into a preset format to obtain the target key feature data corresponding to the target edge computing task.
[0106] In one possible implementation, the processing module 602 is specifically configured to:
[0107] According to the target key feature data, a match is performed in a pre-established cache pool to obtain a target key-value pair that fully matches the target key feature data.
[0108] Get the preset expiration date information of the target key-value pair.
[0109] If the current time information does not exceed the preset validity period information, the value characteristic data in the target key-value pair is determined as the target value characteristic data.
[0110] In one possible implementation, the processing module 602 is further configured to:
[0111] If the target key-value pair is not matched in the pre-established cache pool according to the target key feature data, the real-time calculation of the target edge computing task is triggered according to the scheduling request to obtain the execution result data of the target edge computing task.
[0112] In one possible implementation, the processing module 602 is further configured to:
[0113] If the current time information exceeds the preset validity period information, the real-time calculation of the target edge computing task is triggered according to the scheduling request to obtain the execution result data of the target edge computing task.
[0114] In one possible implementation, the processing module 602 is further configured to:
[0115] The calculated execution result data of the target edge computing task is associated with the target key feature data to generate a key-value pair of the target edge computing task. The key in the key-value pair is used to represent the target key feature data, and the value in the key-value pair is used to represent the execution result data of the calculation.
[0116] Store the key-value pairs of the target edge computing task in the cache pool.
[0117] In one possible implementation, before obtaining the scheduling request for the target edge computing task, the processing module 602 is further configured to:
[0118] Construct key-value pairs corresponding to each edge computing task.
[0119] The key-value pairs corresponding to each edge computing task are stored in the cache pool.
[0120] In one possible implementation, the processing module 602 is specifically configured to:
[0121] Get the triplet data and execution result data corresponding to each edge computing task. The triplet data includes: the image data used by the edge computing task, the startup parameters used, and the task execution environment screening data used.
[0122] According to the triple data corresponding to each edge computing task, the key feature data corresponding to each edge computing task is constructed.
[0123] The key feature data corresponding to each edge computing task is associated with the execution result data corresponding to each edge computing task, and a key-value pair corresponding to each edge computing task is constructed.
[0124] In one possible implementation, before storing the key-value pairs corresponding to each edge computing task in the cache pool, the processing module 602 is further configured to:
[0125] Set the validity period information of the key-value pairs corresponding to each edge computing task, and bind the validity period information to the corresponding key-value pairs.
[0126] In one possible implementation, the processing module 602 is specifically configured to:
[0127] For any edge computing task, the validity period information of the key-value pair corresponding to the edge computing task is determined according to the usage frequency of the edge computing task.
[0128] Set the field information used to indicate the length of valid time in the edge computing task as the validity period information.
[0129] In one possible implementation, the processing module 602 is further configured to:
[0130] Every preset period, the validity period information of the key-value pairs corresponding to each edge computing task is detected.
[0131] Clear out key-value pairs that have exceeded their validity period to free up storage resources in the storage pool.
[0132] For the description of the features in the embodiment corresponding to the scheduling device for edge computing tasks, please refer to the relevant description of the embodiment corresponding to the scheduling method for edge computing tasks, and no further details will be given here.
[0133] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7As shown, the electronic device provided in this embodiment includes: at least one processor 701 and a memory 702. Optionally, the electronic device further includes a communication component 703. The processor 701, the memory 702 and the communication component 703 are connected via a bus 704.
[0134] During the specific implementation process, at least one processor 701 executes the computer execution instructions stored in the memory 702, so that at least one processor 701 executes the above-mentioned scheduling method embodiment of the edge computing task.
[0135] The specific implementation process of the processor 701 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0136] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0137] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0138] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0139] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned edge computing task scheduling method embodiments when running.
[0140] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0141] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned edge computing task scheduling method embodiments are implemented.
[0142] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned edge computing task scheduling method embodiments.
[0143] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0144] The above is a detailed introduction to the scheduling method, electronic device, storage medium and product of an edge computing task provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method of this application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of the claims of this application.
Claims
1. A scheduling method for edge computing tasks, characterized in that: include: Construct key-value pairs corresponding to each edge computing task; For any edge computing task, determine the validity period information of the key-value pair corresponding to the edge computing task based on the usage frequency of the edge computing task; The usage frequency is inversely proportional to the validity period information; Setting the field information for indicating the effective time length in the edge computing task as the validity period information of the key-value pair corresponding to the edge computing task, and binding the validity period information to the corresponding key-value pair; Store the key-value pairs corresponding to each edge computing task in the cache pool; Obtain a scheduling request for a target edge computing task, the scheduling request including image data, startup parameters, and task execution environment screening data used by the target edge computing task; Constructing target key feature data corresponding to the target edge computing task according to the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used; According to the target key feature data, matching is performed in a pre-established cache pool to obtain a target key-value pair that completely matches the target key feature data; Obtaining preset validity period information of the target key-value pair; If the current time information does not exceed the preset validity period information, the value characteristic data in the target key-value pair is determined as the target value characteristic data corresponding to the target key characteristic data, and the target value characteristic data is the execution result data of the target edge computing task.
2. The method according to claim 1, characterized in that The constructing target key feature data corresponding to the target edge computing task according to the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used includes: Based on a preset splicing rule, the image data used by the target edge computing task, the startup parameters used, and the task execution environment screening data used are spliced to obtain a target initial key string; The target initial key character string is standardized to obtain target key feature data corresponding to the target edge computing task.
3. The method according to claim 2, characterized in that The standardizing of the target initial key string to obtain target key feature data corresponding to the target edge computing task includes: Performing a hash operation on the target initial key string to generate a hash value of fixed length; The hash value is converted into a preset format to obtain the target key feature data corresponding to the target edge computing task.
4. The method according to claim 1, wherein Also includes: If the target key-value pair is not matched in the pre-established cache pool according to the target key feature data, the real-time calculation of the target edge computing task is triggered according to the scheduling request to obtain the execution result data of the target edge computing task.
5. The method according to claim 1, wherein Also includes: If the current time information exceeds the preset validity period information, the real-time calculation of the target edge computing task is triggered according to the scheduling request to obtain the execution result data of the target edge computing task.
6. The method according to claim 4 or 5, characterized in that Also includes: Associating the calculated execution result data of the target edge computing task with the target key feature data to generate a key-value pair for the target edge computing task, where the key in the key-value pair is used to represent the target key feature data, and the value in the key-value pair is used to represent the calculated execution result data; The key-value pair of the target edge computing task is stored in the cache pool.
7. The method according to claim 1, characterized in that The key-value pairs corresponding to each edge computing task are constructed, including: Obtain triplet data and execution result data corresponding to each edge computing task, wherein the triplet data includes: the image data used by the edge computing task, the startup parameters used, and the task execution environment screening data used; According to the triple data corresponding to each edge computing task, the key feature data corresponding to each edge computing task is constructed; The key feature data corresponding to each edge computing task is associated with the execution result data corresponding to each edge computing task, and a key-value pair corresponding to each edge computing task is constructed.
8. The method according to claim 1, characterized in that Also includes: Every preset period, detect the validity period information of the key-value pairs corresponding to each edge computing task; Clear out key-value pairs that have exceeded their validity period to free up storage resources in the storage pool.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for scheduling edge computing tasks as described in any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for scheduling edge computing tasks as described in any one of claims 1 to 8 are implemented.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the scheduling method for edge computing tasks as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Edge computing task scheduling method and system in industrial internet
CN115237555A
Data calculation method and device
CN117972790A