Task implementation method and device, computer-readable storage medium, and electronic device
By receiving and verifying computing tasks in mobile edge computing, and identifying and processing invalid tasks, the problem of cloud service resource waste is solved and computing efficiency is improved.
Patent Information
- Application Number
- CN202210952782.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In mobile edge computing, invalid computing tasks will lead to a waste of cloud service resources and reduced computing efficiency. It is difficult for existing technologies to effectively identify and process invalid tasks.
By receiving computing tasks and task packages, they are combined and verified to determine the task type. If it is an invalid task, it is unloaded. If it is a valid task, the identification information is calculated and obtained to reduce repeated calculations.
The resource consumption of cloud services is reduced, and the accuracy of invalid task judgment and the computing efficiency of cloud services are improved.
Smart Images

Figure CN115292017B_ABST
Abstract
Description
Background Art
[0002] With the continuous promotion of 5G, mobile edge computing has become a general technology. By transferring computing and service functions to the edge of mobile networks, it provides real-time information transmission and efficient computing services for energy and computing-constrained terminals.
[0003] In the actual use of edge computing, the computing tasks sent by mobile terminals may be affected by multiple factors such as the sending and receiving terminals of the computing tasks, network fluctuations, etc., resulting in packet loss, incomplete task data and invalid tasks. In the task processing process, the pairing, forwarding, processing and unloading of computing tasks all require network bandwidth and server resources. When there are invalid tasks in the computing tasks, fault tolerance processing is also required. This fault tolerance processing will occupy a part of cloud computing resources. When the number of invalid tasks increases, the loss of cloud services will increase.
[0004] Therefore, a new task implementation method needs to be provided.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a task implementation method, a task implementation device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of increased cloud service loss caused by the limitations and defects of related technologies at least to a certain extent.
[0007] According to one aspect of the present disclosure, a task implementation method is provided, comprising:
[0008] Receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package;
[0009] Verifying the computing task according to the target task package, determining the task characteristics of the computing task when the verification passes, judging the computing task according to the task characteristics, and obtaining the task type of the computing task;
[0010] When the type of the computing task is an invalid task, unloading the computing task;
[0011] When the type of the computing task is a valid task, the computing task is calculated according to the target task package to obtain identification information of the computing task, and a calculation result of the computing task is obtained according to the identification information.
[0012] In an exemplary embodiment of the present disclosure, the verification includes feasibility verification, validity and integrity verification; verifying the computing task according to the target task package includes:
[0013] Obtaining a task instruction in the target task package, and performing a feasibility check on the computing task according to the task instruction;
[0014] When the feasibility check is passed, the validity and integrity of the target task package are checked;
[0015] When the feasibility check fails, the task type of the computing task is determined as an invalid task.
[0016] In an exemplary embodiment of the present disclosure, verifying the validity and integrity of the target task package includes:
[0017] Verifying the validity and integrity of the target task package through a data packet verification algorithm;
[0018] When the verification fails, determining the task type of the computing task as an invalid task;
[0019] When the verification passes, the task characteristics of the computing task are determined.
[0020] In an exemplary embodiment of the present disclosure, determining a task feature of the computing task, judging the computing task according to the task feature, and obtaining a task type of the computing task includes:
[0021] Determining the task features of the computing task through the target task package using a feature selection algorithm;
[0022] The invalid tasks and the task features of the invalid tasks included in the feature library are obtained, and a judgment is made according to the task features of the invalid tasks and the task features of the computing tasks to obtain the task type of the computing tasks.
[0023] In an exemplary embodiment of the present disclosure, judging according to the task characteristics of the invalid task and the task characteristics of the computing task to obtain the task type of the computing task includes:
[0024] Calculating the similarity between the task feature of the computing task and the task features of the invalid tasks included in the feature library;
[0025] When the similarity is in a preset rejection domain, determining the task type of the computing task as an invalid task;
[0026] When the similarity is within the preset secondary judgment domain, calculating a second similarity between the task feature of the computing task and the task feature of the invalid task, and determining the task type of the computing task according to the second similarity;
[0027] When the similarity is within a preset receiving domain, the task type of the computing task is determined as a valid task.
[0028] In an exemplary embodiment of the present disclosure, determining the task type of the computing task according to the second similarity includes:
[0029] When the second similarity is located in the preset rejection domain or in the preset second judgment domain, determining the task type of the computing task as an invalid task;
[0030] When the second similarity is within the preset acceptance domain, the task type of the computing task is determined as a valid task.
[0031] In an exemplary embodiment of the present disclosure, calculating the computing task according to the target task package to obtain identification information of the computing task includes:
[0032] Acquire valid tasks included in the feature library and task features of the valid tasks;
[0033] Calculating a third similarity between the task feature of the computing task and the task feature of the valid task;
[0034] When the third similarity is greater than a preset similarity threshold, identification information of a valid task corresponding to the third similarity is obtained, and the identification information of the valid task is determined as the identification information of the computing task.
[0035] In an exemplary embodiment of the present disclosure, obtaining a calculation result of the calculation task according to the identification information includes:
[0036] Determine whether there is a historical cache result for a valid task corresponding to the third similarity;
[0037] If it exists, the historical cache result of the valid task is used as the calculation result of the calculation task;
[0038] When it does not exist, the computing task is disassembled, and the computing task obtained by the disassembly is calculated through the computing service to obtain the calculation result.
[0039] According to one aspect of the present disclosure, there is provided a task implementation device, comprising:
[0040] A task package merging module, used for receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package;
[0041] A task type determination module is used to verify the computing task according to the target task package, determine the task characteristics of the computing task when the verification passes, judge the computing task according to the task characteristics, and obtain the task type of the computing task;
[0042] A task unloading module, used for unloading the computing task when the computing task is an invalid task;
[0043] The task calculation module is used to calculate the computing task according to the target task package when the computing task is a valid task, obtain identification information of the computing task, and obtain a calculation result of the computing task according to the identification information.
[0044] According to one aspect of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the task realization method described in any of the above exemplary embodiments is realized.
[0045] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0046] Processor; and
[0047] A memory, configured to store executable instructions of the processor;
[0048] The processor is configured to execute the task implementation method described in any of the above exemplary embodiments by executing the executable instructions.
[0049] A task implementation method provided by an embodiment of the present disclosure includes receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package; verifying the computing task according to the target task package, determining the task characteristics of the computing task when the verification passes, judging the computing task according to the task characteristics to obtain the task type of the computing task; when the type of the computing task is an invalid task, unloading the computing task; when the type of the computing task is a valid task, calculating the computing task according to the target task package to obtain identification information of the computing task, and obtaining the computing task according to the identification information. On the one hand, after receiving the computing task and the task package corresponding to the computing task, a verification is first performed, and the type of the computing task that fails the verification is determined to be an invalid task, and the invalid task is uninstalled, thereby reducing the resource consumption of the cloud service; on the other hand, after passing the verification, the task characteristics of the computing task are determined, and the computing task is judged again according to the task characteristics of the computing task, and the accuracy of invalid task judgment is improved through the task characteristics of the computing task; on the other hand, for the valid task, the identification information of the valid task is obtained, and the calculation result of the computing task is obtained according to the identification information, thereby reducing the repeated calculation of the cloud service and improving the computing efficiency of the cloud service.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0052] Figure 1 The flowchart schematically shows a method for implementing a task in a related technology according to an exemplary embodiment of the present disclosure.
[0053] Figure 2 The flowchart schematically shows a method for implementing a task according to an exemplary embodiment of the present disclosure.
[0054] Figure 3 A block diagram of a task implementation system according to an exemplary embodiment of the present disclosure is schematically shown.
[0055] Figure 4 A flowchart of a method for verifying a computing task according to a target task package according to an exemplary embodiment of the present disclosure is schematically shown.
[0056] Figure 5 A flowchart of a method for verifying the validity and integrity of a target task package according to an exemplary embodiment of the present disclosure is schematically shown.
[0057] Figure 6 A flowchart of a method for determining task characteristics of a computing task, judging the computing task according to the task characteristics, and obtaining a task type of the computing task according to an example embodiment of the present disclosure is schematically shown.
[0058] Figure 7 A flowchart schematically illustrates a method for determining the task type of a computing task based on the task characteristics of an invalid task and the task characteristics of a computing task according to an exemplary embodiment of the present disclosure.
[0059] Figure 8 A flowchart of a method for determining a task type of a computing task according to a second similarity according to an exemplary embodiment of the present disclosure is schematically shown.
[0060] Fig. 9 A flowchart for verifying a computing task according to an exemplary embodiment of the present disclosure is schematically shown.
[0061] Fig.10 A flowchart of a method for calculating a computing task according to a target task package to obtain identification information of the computing task according to an exemplary embodiment of the present disclosure is schematically shown.
[0062] Fig.11 A flowchart of a method for obtaining a computing result of a computing task according to identification information according to an exemplary embodiment of the present disclosure is schematically shown.
[0063] Fig.12 The flowchart schematically shows a method for implementing a task according to an exemplary embodiment of the present disclosure.
[0064] Fig.13 A block diagram schematically shows a task implementation device according to an exemplary embodiment of the present disclosure.
[0065] Fig.14 An electronic device for implementing the above-mentioned task implementation method according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0066] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0067] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0068] In the related art, reference Figure 1 As shown, the task implementation may include: first, the terminal sends the computing task and the data to be calculated related to the computing task to the cloud service; after the cloud service receives the computing task and the data to be calculated, the task receiving component in the cloud service integrates the data packets of the data to be calculated, and at the same time, analyzes and disassembles the computing task, and dispatches the disassembled subtasks to different computing services to complete the calculation of the subtasks; when each computing service encounters an invalid subtask during the execution of the calculation, it is necessary to dispatch the task correction component to perform fault tolerance processing on the invalid subtask, and when each computing service completes the calculation, the calculation result is sent to the result output component, and the result output component integrates the calculation results of each computing service and sends the integrated result to the terminal. Among them, when performing task correction on invalid subtasks, a part of cloud computing resources needs to be occupied, which increases the resource loss of cloud services.
[0069] Based on one or more of the above technical problems, this exemplary embodiment first provides a task implementation method, which can be run on a server, server cluster or cloud server, etc. Of course, those skilled in the art can also run the method of the present invention on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 2As shown, the task implementation method may include steps S210 to S240:
[0070] Step S210: receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package;
[0071] Step S220. Verify the computing task according to the target task package, and when the verification passes, determine the task characteristics of the computing task, judge the computing task according to the task characteristics, and obtain the task type of the computing task;
[0072] Step S230. When the type of the computing task is an invalid task, unloading the computing task;
[0073] Step S240. When the type of the computing task is a valid task, the computing task is calculated according to the target task package to obtain identification information of the computing task, and a calculation result of the computing task is obtained according to the identification information.
[0074] The above-mentioned task implementation method receives a computing task and a task package corresponding to the computing task, merges the task packages to obtain a target task package; verifies the computing task according to the target task package, determines the task characteristics of the computing task when the verification passes, judges the computing task according to the task characteristics, and obtains the task type of the computing task; when the type of the computing task is an invalid task, uninstalls the computing task; when the type of the computing task is a valid task, calculates the computing task according to the target task package to obtain the identification information of the computing task, and obtains the computing result of the computing task according to the identification information. On the one hand, after receiving the computing task and the task package corresponding to the computing task, a verification is first performed, and the type of the computing task that fails the verification is determined to be an invalid task, and the invalid task is uninstalled, thereby reducing the resource consumption of the cloud service; on the other hand, after passing the verification, the task characteristics of the computing task are determined, and the computing task is judged again according to the task characteristics of the computing task, and the accuracy of invalid task judgment is improved through the task characteristics of the computing task; on the other hand, for the valid task, the identification information of the valid task is obtained, and the calculation result of the computing task is obtained according to the identification information, thereby reducing the repeated calculation of the cloud service and improving the computing efficiency of the cloud service.
[0075] The following is a detailed explanation and description of each step involved in the task implementation method of the exemplary embodiment of the present disclosure.
[0076] First, the application scenarios and purposes of the exemplary embodiments of the present disclosure are explained and illustrated. Specifically, the exemplary embodiments of the present disclosure can be applied to edge computing, and mainly study how to reduce the resource occupation of invalid tasks on cloud services in edge computing.
[0077] In the present disclosure, the computing task received by the cloud service is used as the basis. When a computing task is received, the target task package corresponding to the computing task is verified. When the target task package fails to pass the verification, the computing task corresponding to the target task package is determined as an invalid task, that is, the corresponding computing service is not assigned to the computing task for calculation; when the target task package passes the verification, the task feature of the computing task is determined, and the computing task is judged again according to the task feature of the computing task to determine whether the computing task is similar to the task feature of the invalid task included in the feature library. When similar, the computing task is determined as an invalid task. When not similar, a valid feature similar to the task feature of the computing task in the feature library is determined, and the identification information of the valid feature is obtained. The identification information of the valid feature is determined as the identification information of the computing task. When there is a calculation result for the task corresponding to the valid feature, the calculation result is determined as the calculation result of the computing task. When there is no calculation result, a computing service is assigned to the computing task, and the calculation of the computing task is completed through the computing service, thereby reducing the resource consumption of the invalid task on the cloud service and improving the computing efficiency of the cloud service.
[0078] Next, the task realization system involved in the present disclosure is further explained and illustrated. Figure 3The task implementation system may include: a terminal 310 and a cloud service 320, and the cloud service 320 may include a task receiving component 321, a task diagnosis module 322, a task feature library 323, a result cache module 324, an automatic processing module 325, a model module 326 and a result output component 327. Among them, the terminal 310 sends a computing task and a task package corresponding to the computing task to the cloud service 320. The task receiving component in the cloud service 320 receives the computing task and the task package corresponding to the computing task, and sends the task package to the task diagnosis module 322. The task diagnosis module 322 merges the received task packages to obtain a target task package, and verifies the target task package. When the target task package passes the verification, the task characteristics of the computing task are determined, and the task characteristics of the invalid task are obtained from the task characteristic library 323. The similarity between the task characteristics of the computing task and the task characteristics of the invalid task is calculated through the feature recognition model in the model module 326. When the similarity is greater than a preset value, the computing task is determined as an invalid task, and the invalid task is uninstalled through the automatic processing module 325, and a unified parameter is returned. When the similarity between the task characteristics of the computing task and the task characteristics of the invalid task is less than a preset value, the computing task is considered to be an invalid task. When a value is reached, the task feature of the valid task in the task feature library 323 can be obtained, and the similarity between the task feature of the computing task and the task feature of the valid task can be calculated through the feature recognition model in the model module 326. When the similarity is greater than the preset value, the identification information of the valid task is obtained, and the computing task is marked with the identification information of the valid task; the task diagnosis module 322 determines whether there is a computing result for the valid task. When there is a computing result, the automatic processing module 325 retrieves the computing result of the valid task, and uses the computing result of the valid task as the computing result of the computing task. When there is no computing result, the automatic processing module 325 disassembles and schedules the computing task, distributes the computing task to multiple computing services, obtains the computing result through multiple computing services, stores the computing result in the result cache module 324, and pushes the computing result to the terminal 310 through the result output component 327.
[0079] Next, step S210 to step S240 are explained and illustrated in detail.
[0080] In step S210, a computing task and a task package corresponding to the computing task are received, and the task packages are merged to obtain a target task package.
[0081] In this exemplary embodiment, the terminal sends a computing task and a task package corresponding to the computing task to the cloud service. Since the computing task and the task package are transmitted through the network, the task package will be divided into multiple sub-task packages according to the network during the data packet transmission process. When the cloud service receives the multiple sub-task packages sent by the terminal, the multiple sub-task packages can be merged to obtain the target task package.
[0082] In step S220, the computing task is verified according to the target task package, and when the verification passes, the task characteristics of the computing task are determined, and the computing task is judged according to the task characteristics to obtain the task type of the computing task.
[0083] In this example embodiment, after merging the task packages to obtain the target task package, the target task package may be verified, wherein the verification of the target task package may include verifying the feasibility of the target task package and verifying the validity and integrity of the target task package.
[0084] refer to Figure 4 As shown, verifying the computing task according to the target task package may include:
[0085] Step S410. Obtaining the task instructions in the target task package, and performing feasibility verification on the computing task according to the task instructions;
[0086] Step S420. When the feasibility check is passed, the validity and integrity of the target task package are checked;
[0087] Step S430: When the feasibility check fails, the task type of the computing task is determined as an invalid task.
[0088] Below, step S410-step S430 will be further explained and illustrated. Specifically, when performing a feasibility check on the target task package, first, obtain the task instructions included in the target task package; then, determine the feasibility of the task instruction, that is, determine whether the calculation required to be completed in the task instruction can be completed by the cloud service; when the feasibility check passes, that is, the cloud service can complete the calculation required to be completed in the task instruction, and the validity and integrity of the target task package need to be verified; when the feasibility check fails, that is, the cloud service cannot complete the calculation required to be completed in the task instruction, and the task type of the calculation task is determined as an invalid task.
[0089] For further reference, Figure 5 As shown, verifying the validity and integrity of the target task package may include:
[0090] Step S510. Verify the validity and integrity of the target task packet through a data packet verification algorithm;
[0091] Step S520. When the verification fails, the task type of the computing task is determined as an invalid task;
[0092] Step S530. When the verification passes, determine the task characteristics of the computing task.
[0093] Below, step S510-step S530 will be further explained and illustrated. Specifically, when the validity and integrity check of the target task package is performed, the validity and integrity of the target task package can be checked by a data packet verification algorithm, wherein the data packet verification algorithm can include odd check, XOR check, CRC (Cyclic Redundancy Check, cyclic redundancy check), task package header and package tail integrity check and data byte size check, etc. For example, the validity of the target task package can be checked by odd check, XOR check, CRC check, the integrity of the target task package can be checked by task package header and package tail integrity check, and the integrity of the target task package can also be checked by data byte size check. In this example embodiment, the validity and integrity verification method of the target task package is not specifically limited; when the validity and integrity check of the target task package is not passed, the task type of the computing task is determined as an invalid task; when the validity and integrity check of the target task package is passed, the task feature of the computing task can be determined, so as to further verify the computing task according to the task feature of the computing task.
[0094] In this example embodiment, after the cloud service merges the received task packages to obtain the target task package, it performs feasibility checks, validity checks and integrity checks on the target task package, and determines the computing tasks that fail the check as invalid tasks, thereby reducing the resource consumption of the cloud service.
[0095] In this example embodiment, when the validity and integrity check of the target task packet pass, the task characteristics of the computing task can be determined. Figure 6 As shown, determining the task characteristics of the computing task, judging the computing task according to the task characteristics, and obtaining the task type of the computing task may include:
[0096] Step S610. Using a feature selection algorithm, determine the task features of the computing task through the target data packet;
[0097] Step S620: Obtain the invalid tasks and the task features of the invalid tasks included in the feature library, make a judgment based on the task features of the invalid tasks and the task features of the computing task, and obtain the task type of the computing task.
[0098] In the following, step S610 and step S620 will be further explained and illustrated. Specifically, when determining the task characteristics of a computing task, the task characteristics of the computing task can be calculated by a feature selection algorithm, wherein the feature selection algorithm can be a distance correlation coefficient judgment algorithm, a feature sorting verification algorithm, or a linear model and regularization. In this example embodiment, the feature selection algorithm is not specifically limited. After determining the task characteristics of the computing task, the task characteristics of the invalid tasks included therein can be obtained from the feature library, and the task characteristics of the invalid tasks and the task characteristics of the computing task are calculated to obtain the task type of the computing task.
[0099] For further reference, Figure 7 As shown, judging according to the task characteristics of the invalid task and the task characteristics of the computing task to obtain the task type of the computing task may include:
[0100] Step S710. Calculate the similarity between the task feature of the computing task and the task feature of the invalid task included in the feature library;
[0101] Step S720. When the similarity is in a preset rejection region, the task type of the computing task is determined as an invalid task;
[0102] Step S730. When the similarity is within the preset secondary judgment domain, a second similarity between the task feature of the computing task and the task feature of the invalid task is calculated, and the task type of the computing task is determined according to the second similarity;
[0103] Step S740: When the similarity is within the preset receiving domain, the task type of the computing task is determined as a valid task.
[0104] In the following, step S710-step S740 will be further explained and illustrated. Specifically, the similarity between the task features of the invalid task in the feature library and the task features of the computing task can be calculated. When the similarity between the task features of the computing task and the task features of the invalid task in the feature library falls within the preset rejection domain, the task type of the computing task is determined as an invalid task; when the similarity between the task features of the computing task and the task features of the invalid task falls within the preset secondary judgment domain, the second similarity between the task features of the invalid task and the task features of the computing task can be calculated again, and the task type of the computing task is determined according to the second similarity; when the similarity between the task features of the computing task and the task features of the invalid task falls within the preset acceptance domain, the task features of the computing task are determined as valid tasks. Among them, when the similarity>90%, it can be considered to fall within the preset rejection domain, when 80%≤similarity≤90%, it can be considered to fall within the preset secondary judgment domain, and when the similarity<80%, it can be considered to fall within the preset acceptance domain. In this example embodiment, the range of the preset rejection domain, the preset secondary judgment domain, and the preset acceptance domain is not specifically limited, and those skilled in the art can determine the range of each domain as needed.
[0105] For further reference, Figure 8 As shown, determining the task type of the computing task according to the second similarity may include:
[0106] Step S810. When the second similarity is located in the preset rejection domain or in the preset second judgment domain, the task type of the computing task is determined as an invalid task;
[0107] Step S820: When the second similarity is within the preset acceptance domain, the task type of the computing task is determined as a valid task.
[0108] In the following, step S810 and step S820 are further explained and illustrated. Specifically, when the second similarity is in the preset rejection domain or in the preset second judgment domain, the task type of the computing task is determined as an invalid task; when the second similarity is in the preset acceptance domain, the task type of the computing task is determined as a valid task.
[0109] In this example embodiment, when the verification of a computing task passes, the task characteristics of the computing task are determined, and whether the computing task is an invalid task is determined again based on the task characteristics of the computing task, thereby improving the accuracy of identifying the task type of the computing task, filtering invalid tasks more quickly, and reducing the resource consumption of cloud services.
[0110] Below, reference Fig. 9The verification of computing tasks disclosed in the present invention is further explained and illustrated. First, the task packages of the received computing tasks are merged to obtain the target task package; then, the target task package is verified, and the verification includes feasibility verification, validity and integrity verification. When the verification passes, the task characteristics of the computing task are determined, and the task characteristics are judged by the task characteristics of the computing task, and the similarity between the task characteristics of the computing task and the task characteristics of invalid tasks in the feature library is judged. According to the similarity, it is determined whether the computing task is an invalid task. When the computing task is an invalid task, the computing task is uninstalled; when the computing task is not an invalid task, the identification information of the computing task is determined.
[0111] In step S230, when the type of the computing task is an invalid task, the computing task is uninstalled.
[0112] In this example embodiment, after the task type of the computing task is determined to be an invalid task, the invalid task can be uninstalled, thereby reducing the waste of cloud service computing resources during the task computing process.
[0113] In step S240, when the type of the computing task is a valid task, the computing task is calculated according to the target task package to obtain identification information of the computing task, and a calculation result of the computing task is obtained according to the identification information.
[0114] In this example embodiment, when the task type of the computing task is a valid task, the computing task can be calculated to obtain the identification information of the computing task. Fig.10 As shown, calculating the computing task according to the target task package to obtain the identification information of the computing task may include:
[0115] Step S1010. Acquire valid tasks included in the feature library and task features of the valid tasks;
[0116] Step S1020. Calculate the third similarity between the task feature of the computing task and the task feature of the valid task;
[0117] Step S1030: When the third similarity is greater than a preset similarity threshold, obtain identification information of a valid task corresponding to the third similarity, and determine the identification information of the valid task as the identification information of the computing task.
[0118] In the following, step S1010 to step S1030 will be further explained and illustrated. Specifically, first obtain the valid tasks and task features of the valid tasks included in the feature library; then, calculate the third similarity between the task features of the valid tasks in the feature library and the task features of the computing tasks, and when the third similarity is greater than the preset similarity threshold, obtain the identification information of the valid task corresponding to the third similarity, and determine the identification information of the valid task corresponding to the third similarity as the identification information of the computing task. The preset similarity threshold can be 98% or 95%, and the preset similarity threshold is not specifically limited in this example embodiment.
[0119] In this example embodiment, after the identification information of the computing task is obtained, the computing result of the computing task can be obtained according to the identification information. Fig.11 As shown, obtaining the calculation result of the calculation task according to the identification information may include:
[0120] Step S1110. Determine whether there is a historical cache result for a valid task corresponding to the third similarity;
[0121] Step S1120. If it exists, use the historical cache result of the valid task as the calculation result of the calculation task;
[0122] Step S1130. When it does not exist, the computing task is disassembled, and the computing task obtained by the disassembly is calculated through the computing service to obtain the calculation result.
[0123] Below, step S1110-step S1130 will be further explained and illustrated. Specifically, first, determine whether there is a historical cache result for the valid task corresponding to the third similarity. When there is a historical cache result, determine the historical cache result as the calculation result of the calculation task; when there is no historical cache result, disassemble and schedule the calculation task, and assign the disassembled calculation task to different calculation services, and calculate through each calculation service to obtain the calculation result of the calculation task. After the calculation result is obtained, the calculation result of the calculation task is cached and sent to the terminal.
[0124] In this example embodiment, the computing service is computing the computing task obtained by the disassembly. When an abnormality occurs in the computing task, the computing service can be corrected.
[0125] In this example embodiment, by obtaining the identification information of the computing task and obtaining the computing result of the computing task through the identification information of the computing task, the same or similar computing tasks can be quickly matched with the corresponding computing results, thereby reducing repeated calculations and improving the computing efficiency of the cloud service.
[0126] The task implementation method provided by the example embodiments of the present disclosure has at least the following advantages: on the one hand, after receiving a computing task and a task package corresponding to the computing task, a verification is first performed, and the type of the computing task that fails the verification is determined to be an invalid task, and the invalid task is uninstalled, thereby reducing the resource consumption of the cloud service; on the other hand, after passing the verification, the task characteristics of the computing task are determined, and the computing task is judged again based on the task characteristics of the computing task, and the accuracy of the invalid task judgment is improved through the task characteristics of the computing task; on the other hand, for a valid task, the identification information of the valid task is obtained, and the calculation result of the computing task is obtained based on the identification information, thereby reducing the repeated calculation of the cloud service and improving the computing efficiency of the cloud service.
[0127] The following, combined Fig.12 The task implementation method of the exemplary embodiment of the present disclosure is further explained and illustrated. The task implementation method may include the following steps:
[0128] Step S1202. The terminal sends the computing task and the task package corresponding to the computing task to the cloud service;
[0129] Step S1204: The task receiving component of the cloud service receives the task package and sends the task package to the task diagnosis module;
[0130] Step S1206. The task diagnosis module merges the task packages to obtain a target task package, and verifies the target task package;
[0131] Step S1208. When the verification fails, the computing task is determined as an invalid task, and the invalid task is uninstalled through the automatic execution module;
[0132] Step S1210. When the verification passes, determine the task characteristics of a valid task in the feature library that is similar to the task characteristics of the computing task, and determine the identification information of the valid task as the identification information of the computing task;
[0133] Step S1212. Determine whether there is a historical cache result for the valid task;
[0134] Step S1214. If it exists, determine the historical cache result of the valid task as the calculation result of the calculation task;
[0135] Step S1216. If it does not exist, the computing task is disassembled and scheduled, and the computing task is settled through the computing service to obtain the computing result;
[0136] Step S1218: Cache the calculated result in the result cache module, and send the calculated result to the terminal through the result output component.
[0137] The exemplary embodiment of the present disclosure also provides a task implementation device, referring to Fig.13 As shown, it may include: a task package merging module 1310, a task type determining module 1320, a task unloading module 1330 and a task calculating module 1340. Among them:
[0138] The task package merging module 1310 is used to receive a computing task and a task package corresponding to the computing task, and merge the task packages to obtain a target task package;
[0139] The task type determination module 1320 is used to verify the computing task according to the target task package, determine the task characteristics of the computing task when the verification passes, judge the computing task according to the task characteristics, and obtain the task type of the computing task;
[0140] A task unloading module 1330, configured to unload the computing task when the computing task is an invalid task;
[0141] The task calculation module 1340 is used to calculate the computing task according to the target task package when the computing task is a valid task, obtain identification information of the computing task, and obtain a calculation result of the computing task according to the identification information.
[0142] The specific details of each module in the above-mentioned task implementation device have been described in detail in the corresponding task implementation method, so they will not be repeated here.
[0143] In an exemplary embodiment of the present disclosure, the verification includes feasibility verification, validity and integrity verification; verifying the computing task according to the target task package includes:
[0144] Obtaining a task instruction in the target task package, and performing a feasibility check on the computing task according to the task instruction;
[0145] When the feasibility check is passed, the validity and integrity of the target task package are checked;
[0146] When the feasibility check fails, the task type of the computing task is determined as an invalid task.
[0147] In an exemplary embodiment of the present disclosure, verifying the validity and integrity of the target task package includes:
[0148] Verifying the validity and integrity of the target task package through a data packet verification algorithm;
[0149] When the verification fails, determining the task type of the computing task as an invalid task;
[0150] When the verification passes, the task characteristics of the computing task are determined.
[0151] In an exemplary embodiment of the present disclosure, determining a task feature of the computing task, judging the computing task according to the task feature, and obtaining a task type of the computing task includes:
[0152] Determining the task features of the computing task through the target task package using a feature selection algorithm;
[0153] The invalid tasks and the task features of the invalid tasks included in the feature library are obtained, and a judgment is made according to the task features of the invalid tasks and the task features of the computing tasks to obtain the task type of the computing tasks.
[0154] In an exemplary embodiment of the present disclosure, judging according to the task characteristics of the invalid task and the task characteristics of the computing task to obtain the task type of the computing task includes:
[0155] Calculating the similarity between the task feature of the computing task and the task features of the invalid tasks included in the feature library;
[0156] When the similarity is in a preset rejection domain, determining the task type of the computing task as an invalid task;
[0157] When the similarity is within the preset secondary judgment domain, calculating a second similarity between the task feature of the computing task and the task feature of the invalid task, and determining the task type of the computing task according to the second similarity;
[0158] When the similarity is within a preset receiving domain, the task type of the computing task is determined as a valid task.
[0159] In an exemplary embodiment of the present disclosure, determining the task type of the computing task according to the second similarity includes:
[0160] When the second similarity is located in the preset rejection domain or in the preset second judgment domain, determining the task type of the computing task as an invalid task;
[0161] When the second similarity is within the preset acceptance domain, the task type of the computing task is determined as a valid task.
[0162] In an exemplary embodiment of the present disclosure, calculating the computing task according to the target task package to obtain identification information of the computing task includes:
[0163] Acquire valid tasks included in the feature library and task features of the valid tasks;
[0164] Calculating a third similarity between the task feature of the computing task and the task feature of the valid task;
[0165] When the third similarity is greater than a preset similarity threshold, identification information of a valid task corresponding to the third similarity is obtained, and the identification information of the valid task is determined as the identification information of the computing task.
[0166] In an exemplary embodiment of the present disclosure, obtaining a calculation result of the calculation task according to the identification information includes:
[0167] Determine whether there is a historical cache result for a valid task corresponding to the third similarity;
[0168] If it exists, the historical cache result of the valid task is used as the calculation result of the calculation task;
[0169] When it does not exist, the computing task is disassembled, and the computing task obtained by the disassembly is calculated through the computing service to obtain the calculation result.
[0170] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0171] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0172] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0173] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0174] Refer to the following Fig.14 1400 according to this embodiment of the present disclosure is described. Fig.14 The electronic device 1400 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0175] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include, but are not limited to: the at least one processing unit 1410, the at least one storage unit 1420, a bus 1430 connecting different system components (including the storage unit 1420 and the processing unit 1410), and a display unit 1440.
[0176] The storage unit stores program codes, which can be executed by the processing unit 1410, so that the processing unit 1410 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1410 can perform the following steps: Figure 2 Step S210 shown in: receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package; S220: verifying the computing task according to the target task package, and when the verification passes, determining the task characteristics of the computing task, judging the computing task according to the task characteristics, and obtaining the task type of the computing task; S230: when the type of the computing task is an invalid task, unloading the computing task; S240: when the type of the computing task is a valid task, calculating the computing task according to the target task package to obtain the identification information of the computing task, and obtaining the calculation result of the computing task according to the identification information.
[0177] The storage unit 1420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 14201 and / or a cache storage unit 14202 , and may further include a read-only storage unit (ROM) 14203 .
[0178] The storage unit 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0179] Bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0180] The electronic device 1400 may also communicate with one or more external devices 1500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1400, and / or communicate with any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1450. Furthermore, the electronic device 1400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1460. As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via a bus 1430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0181] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0182] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0183] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0184] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0185] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0186] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0187] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0188] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0189] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A task implementation method, It is characterized in that include: Receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package; Verify the computing task according to the target task package, and when the verification passes, determine the task features of the computing task through the target task package using a feature selection algorithm; obtain the invalid tasks included in the feature library and the task features of the invalid tasks, and calculate the similarity between the task features of the computing task and the task features of the invalid tasks included in the feature library; when the similarity is in a preset rejection domain, determine the task type of the computing task as an invalid task; when the similarity is in a preset secondary judgment domain, calculate the second similarity between the task features of the computing task and the task features of the invalid task, and determine the task type of the computing task according to the second similarity; when the similarity is in a preset acceptance domain, determine the task type of the computing task as a valid task; When the type of the computing task is an invalid task, unloading the computing task; When the type of the computing task is a valid task, calculating a third similarity between the task feature of the computing task and the task feature of the valid task; When the third similarity is greater than a preset similarity threshold, the identification information of the valid task corresponding to the third similarity is obtained, and the identification information of the valid task is determined as the identification information of the computing task; and the calculation result of the computing task is obtained according to the identification information.
2. The task realization method according to claim 1, It is characterized in that The verification includes feasibility verification, validity and integrity verification; Verifying the computing task according to the target task package includes: Obtaining a task instruction in the target task package, and performing a feasibility check on the computing task according to the task instruction; When the feasibility check is passed, the validity and integrity of the target task package are checked; When the feasibility check fails, the task type of the computing task is determined as an invalid task.
3. The task realization method according to claim 2, It is characterized in that Verify the validity and integrity of the target task package, including: Verifying the validity and integrity of the target task package through a data packet verification algorithm; When the verification fails, determining the task type of the computing task as an invalid task; When the verification passes, the task characteristics of the computing task are determined.
4. The task implementation method according to claim 1, It is characterized in that Determining the task type of the computing task according to the second similarity includes: When the second similarity is located in a preset rejection domain or in a preset second judgment domain, determining the task type of the computing task as an invalid task; When the second similarity is within a preset acceptance domain, the task type of the computing task is determined as a valid task.
5. The task implementation method according to claim 1, It is characterized in that Obtaining a calculation result of the calculation task according to the identification information includes: Determine whether there is a historical cache result for a valid task corresponding to the third similarity; If it exists, the historical cache result of the valid task is used as the calculation result of the calculation task; When it does not exist, the computing task is disassembled, and the computing task obtained by the disassembly is calculated through the computing service to obtain the calculation result.
6. A task implementation device, It is characterized in that include: A task package merging module, used for receiving a computing task and a task package corresponding to the computing task, merging the task packages to obtain a target task package; A task type determination module is used to verify the computing task according to the target task package, and when the verification passes, use a feature selection algorithm to determine the task characteristics of the computing task through the target task package; obtain invalid tasks included in the feature library and the task characteristics of the invalid tasks, and calculate the similarity between the task characteristics of the computing task and the task characteristics of the invalid tasks included in the feature library; when the similarity is in a preset rejection domain, determine the task type of the computing task as an invalid task; when the similarity is in a preset secondary judgment domain, calculate the second similarity between the task characteristics of the computing task and the task characteristics of the invalid task, and determine the task type of the computing task according to the second similarity; when the similarity is in a preset acceptance domain, determine the task type of the computing task as a valid task; A task unloading module, used for unloading the computing task when the computing task is an invalid task; A task calculation module, used for calculating a third similarity between a task feature of the computing task and a task feature of the valid task when the type of the computing task is a valid task; When the third similarity is greater than a preset similarity threshold, the identification information of the valid task corresponding to the third similarity is obtained, and the identification information of the valid task is determined as the identification information of the computing task; and the calculation result of the computing task is obtained according to the identification information.
7. A computer storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the task implementation method described in any one of claims 1 to 5 is implemented.
8. An electronic device, It is characterized in that include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to perform the task implementation method described in any one of claims 1-5 by executing the executable instructions.
Citation Information
Patent Citations
Sensor data flow processing method and device, medium and electronic equipment
CN111935663A
Workflow execution method and device, computer device and storage medium
CN112416476A
Task allocation method and device, server and storage medium
CN113360269A
Invalid task processing method and device, computer equipment and storage medium
CN114757278A
Task management system, task management method, and task management program
US20190138358A1
