Task processing method and device based on edge all-in-one machine, electronic equipment and storage medium
By obtaining target task information, determining target model and generating operation configuration data, the version incompatibility problem of edge all-in-one machines when handling energy and power system tasks is solved, and the independent operation and efficient processing of the target model are achieved.
Patent Information
- Application Number
- CN202411626121.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-07
AI Technical Summary
When handling energy and power system tasks, existing edge all-in-ones face the problem of incompatibility in handling model versions, which may cause task processing failures and requires a lot of manpower to manually modify the code to avoid compatibility differences.
By obtaining the target task information sent by the target terminal, determine the target model and generate the operation configuration data, including the operation environment data and the operation dependency package, to ensure that the target model runs independently on the edge all-in-one machine and avoid version conflicts and compatibility issues.
The independent operation of the target model on the edge all-in-one machine is achieved, avoiding version conflicts and compatibility issues, improving the stability and efficiency of task processing, and reducing manpower investment.
Smart Images

Figure CN119576492A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a task processing method, device, electronic device and storage medium based on an edge all-in-one machine. Background Art
[0002] The edge computing task of the existing edge all-in-one machine is that the server packages the AI computing module and the data processing module into a task, and sends it directly to the edge all-in-one machine for task execution. The execution conditions of the task include the trigger conditions and time of task execution. The task is started when the task execution conditions are met. After the processing is completed, the processing results are uploaded to the server through the network.
[0003] However, since the AI computing module and the data processing module are in the same task, and the AI computing module will be continuously updated with the training, fine-tuning of the data and the continuous updating of the AI framework, the entire task needs to be updated. In this case, by default, except for the AI computing module, other functions have not changed, and other functions will not be confirmed. Therefore, it is impossible to check whether the modules other than the unupdated AI computing module are affected when the task is generated, and there is a risk of failure. In addition, the underlying environment of all AI computing modules on the same edge all-in-one machine is the same, but the dependent libraries executed by the AI computing modules currently have differences in versions, and the APIs supported by different versions will also be different. Therefore, in actual use, after such compatibility issues occur, a lot of manpower needs to be invested to manually modify the code or configure compatible versions to avoid differences. Summary of the invention
[0004] The present invention provides a task processing method, device, electronic device and storage medium based on an edge integrated machine to solve the problem of incompatibility of processing model versions that occurs when tasks generated by an energy power system are processed by an edge integrated machine.
[0005] According to one aspect of the present invention, a task processing method based on an edge machine is provided, comprising:
[0006] Obtain target task information sent by the target terminal; the target task information is configuration information provided by the target terminal for the edge integrated machine to execute the target task; the target task is a task of coordinating energy and power for the energy and power system; the edge integrated machine is used to provide a target model and configuration information required for the operation of the target model for the execution of the target task;
[0007] Determining a target model from a candidate model library according to the target task information; the candidate model library is composed of target models corresponding to different target tasks;
[0008] Generate operation configuration data according to the target model and the target task information; the operation configuration data is used to provide the functions and computing resources required for the operation of the target model, and the operation configuration data includes: operation environment data and operation dependency package; the operation environment data is used to provide computing resources for the operation of the target model; the operation dependency package is used to provide the function information required to be called for the operation of the target model;
[0009] The target task is processed according to the operation configuration data and the target model.
[0010] According to another aspect of the present invention, a task processing device based on an edge machine is provided, comprising:
[0011] A target task information acquisition module is used to acquire the target task information sent by the target terminal; the target task information is the configuration information provided by the target terminal for the edge integrated machine to execute the target task; the target task is the task of coordinating energy and power for the energy and power system; the edge integrated machine is used to provide the target model and the configuration information required for the operation of the target model for the execution of the target task;
[0012] A target model determination module, used to determine a target model from a candidate model library according to the target task information; the candidate model library is composed of target models corresponding to different target tasks;
[0013] An operation configuration data generation module is used to generate operation configuration data according to the target model and the target task information; the operation configuration data is used to provide the functions and computing resources required for the operation of the target model, and the operation configuration data includes: operation environment data and operation dependency package; the operation environment data is used to provide computing resources for the operation of the target model; the operation dependency package is used to provide the function information required to be called for the operation of the target model;
[0014] A processing module is used to process the target task according to the operation configuration data and the target model.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task processing method based on the edge integrated machine described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task processing method based on an edge machine as described in any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention obtains the target task information sent by the target terminal; determines the target model from the candidate model library according to the target task information; generates operation configuration data according to the target model and the target task information, which ensures the necessary resources required for the target model to run while avoiding the crash caused by version conflicts in the target model; processes the target task according to the operation configuration data and the target model, which can ensure the independent operation of different target models, and when a problem occurs in one target model, it will not interfere with the operation of other target models. By determining the target model and the operation configuration data required for the operation of the target model, this method can solve the compatibility problems generated by the target model during actual use, while also ensuring the independence of the target task processing and avoiding interference from other tasks.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flowchart of a task processing method based on an edge machine provided in an embodiment of the present invention;
[0024] Figure 2 A structural diagram of an edge all-in-one machine provided in an embodiment of the present invention;
[0025] Figure 3 A target task processing flow chart provided by an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of the structure of a task processing device based on an edge integrated machine provided in an embodiment of the present invention;
[0027] Figure 5A schematic diagram of the structure of an electronic device for implementing the task processing method based on an edge machine according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Figure 1 The flowchart of a task processing method based on an edge machine provided in an embodiment of the present invention is applicable to the case of processing tasks generated by an energy and power system through an edge machine. The method can be executed by a task processing device based on an edge machine. The task processing device based on an edge machine can be implemented in the form of hardware and / or software. The task processing device based on an edge machine can be configured in any electronic device with network communication function. Figure 1 As shown, the method includes:
[0031] S110: Acquire target task information sent by the target terminal.
[0032] The target task information is the configuration information provided by the target terminal for the edge integrated machine to perform the target task. The target task is the task of coordinating energy and power for the energy and power system.
[0033] Among them, the edge integrated machine is used to provide the target model and the configuration information required for the operation of the target model for the execution of the target task.
[0034] Furthermore, if Figure 2As shown, the edge all-in-one machine is configured with a target model management engine and a target model operating environment.
[0035] Among them, the target model operating environment is used to provide an operating environment for the operation of the target model; the target model management engine is used to manage the target model.
[0036] Among them, the target model operating environment includes: target model calculation unit, other functional modules and operating dependency packages.
[0037] Furthermore, the target model calculation unit is used to calculate the target model and parse the target task; the running dependency package is used to provide the target model with the calling functions required for the target model to run.
[0038] Furthermore, the target model calculation unit is configured with a project field. The project field includes: target model name: the name of the target model file; input definition includes: the source of the input data of the target model, the project name and the project type; output definition includes: output type, interface address, name and type of output parameters; operation configuration includes: GPU, memory, cache and other configurations required for operation and operation cycle, trigger conditions, environment variables, priority, etc.; dependency library configuration includes: the name of the dependency package required for the target model to run, the corresponding file and version number; monitoring configuration includes: log level, save path, performance monitoring items, monitoring frequency and monitoring data transmission cycle and emergency sending trigger conditions.
[0039] Among them, the target model management engine includes: a target model update unit, a target model operating environment monitoring unit, a target model operating environment exception handling unit, a target model operating dependency package generation unit, a target model operating configuration parsing unit, a target model operating log management unit, a target model operating resource allocation unit, a target model operating resource parsing unit and a target model configuration import and export unit.
[0040] Furthermore, the target model updating unit is used to update the target model; the target model operating environment monitoring unit is used to monitor the operating environment when the target model is running; the target model operating environment exception handling unit is used to handle the exception when an exception is detected in the operating environment; the target model operating dependency package generation unit is used to generate an operating dependency package; the target model operating configuration parsing unit is used to parse the target task and obtain the calling function information; the target model operating log management unit is used to manage the operating log generated when the target model is running; the target model operating resource allocation unit is used to allocate resources according to the parsed operating environment data; the target model operating resource parsing unit is used to parse the target task information to obtain the operating resource information and the target model configuration import and export unit is used to configure the target model, i.e. the corresponding operating configuration data, to other edge all-in-one machines.
[0041] Furthermore, the target model updating unit saves the target model as a local storage PB (Protocol Buffer) file, and obtains a candidate model library by matching the obtained PB file with the target task.
[0042] Among them, PB files are a data serialization protocol developed by Google for efficient storage and cross-platform transmission of structured data. The files do not include the source code for building the target model and can be independent of the training environment, so that they can be deployed and updated independently of other functional modules in the edge all-in-one machine. At the same time, PB files do not rely on a specific operating system and can adapt to cross-system compatibility.
[0043] Furthermore, the target model running resource parsing unit: adds the function of parsing the target model running environment data, so that each target model can have an independent running environment according to the business needs of the target model, and the configuration file is independent of the model. When the target model itself is not updated and only the running conditions need to be updated, the update file capacity is reduced, the network load is reduced and the performance of the update process is improved.
[0044] Furthermore, the target model running dependency package unit: adds the function of parsing the target model running dependency package, configures and generates an independent running dependency package in the corresponding target model running environment, thereby avoiding incompatibility between dependency library versions of different target models.
[0045] Furthermore, the target model operating environment: the resource status of the edge machine is retrieved through the SDK of the operating system, and compared with the resources required by the target model. If the conditions are met, it is executed according to the priority.
[0046] Furthermore, the target model operating environment monitoring unit monitors the resources used by the target model, the operating status, and the exception code when an exception occurs according to the monitoring requirements in the target model configuration.
[0047] Specifically, the edge integrated machine obtains the target task information sent by the target terminal.
[0048] S120: Determine a target model from a candidate model library according to target task information.
[0049] Among them, the candidate model library consists of target models corresponding to different target tasks.
[0050] Specifically, the reference model is matched from the candidate model library according to the target task type configured in the target task information, and whether the reference model needs to be updated is determined according to the model version information. If not, the reference model is used as the target model; if necessary, the reference model is updated and the updated reference model is used as the target model.
[0051] S130: Generate operation configuration data according to the target model and target task information.
[0052] The operation configuration data is used to provide the functions and computing resources required for the operation of the target model. The operation configuration data includes: operation environment data and operation dependency packages.
[0053] The operating environment data is used to provide computing resources for the operation of the target model, and the operating dependency package is used to provide the function information required to be called for the operation of the target model.
[0054] Specifically, the operating environment data is generated according to the resource data required for the target model to run; the operating dependency package is generated according to the function information required for the target model to run, and the obtained operating environment data and operating dependency package are generated into operating configuration data.
[0055] S140: Process the target task according to the operation configuration data and the target model.
[0056] Specifically, the target model provides an operating environment for the target model according to the operating environment data, and the target model processes the target task by calling the function required to process the target task from the operating dependency package.
[0057] For example, Figure 3 As shown in the figure, it is the processing flow of the target task. First, the edge integrated machine obtains the running task, that is, the target task information. The target model calculation unit parses the target task information, obtains the model version information, and matches the target model from the candidate model library. The target model calculation unit determines whether the target model needs to be updated. If it needs to be updated, it is updated by configuring the target model update unit in the edge integrated machine. After the update is completed, the running resource parsing unit parses the target task information to obtain the running resource information. The target model running resource allocation unit generates the running environment data according to the running resource information. The target model running configuration parsing unit parses the target task information to obtain the calling function information, and the target model running dependency package generation unit generates the running dependency package according to the calling function information. The target model calculation unit processes the target task according to the acquired running dependency package, running environment data and target model, and monitors it in real time through the target model running environment monitoring unit. If an abnormality is found, it is processed by the target model running environment abnormality processing unit. If no abnormality is found, the processing of the target task continues until the processing is completed.
[0058] Optionally, determining a target model from a candidate model library according to target task information includes steps A1-A3:
[0059] Step A1: Obtain target task type and model version information from target task information.
[0060] The model version information is the version information that the target model needs to reach in order to process the target task.
[0061] The target task type is the model information required to process the target task.
[0062] Specifically, after receiving the target task information, the edge integrated machine parses the target task information, and obtains the target task type and the version information of the target model required to execute the target task from the parsed target task information.
[0063] Step A2: Match the reference model from the candidate model library according to the target task type.
[0064] Specifically, a reference model corresponding to the target task type is matched from a candidate model library according to the target task type.
[0065] Step A3: determine the target model according to the model version information and the reference model.
[0066] Specifically, the version information of the reference model is obtained from the candidate model library, the model version information is compared with the version information of the reference model, and the target model is determined according to the comparison result.
[0067] Optionally, determining the target model according to the model version information and the reference model includes steps B1-B3:
[0068] Step B1: Compare the model version information with the version information of the reference model.
[0069] Specifically, the version information of the reference model is obtained, and the model version information is compared with the version information of the reference model.
[0070] Step B2: If they are the same, the reference model is used as the target model.
[0071] Specifically, if the version information of the reference model is the same as the model version information, it is considered that there is no need to update the reference model, and the reference model is used as the target model.
[0072] Step B3: If they are different, the reference model is updated according to the model version information, and the updated reference model is used as the target model.
[0073] Specifically, if the version information of the reference model is different from the model version information, it is considered that the reference model needs to be updated. The reference model is updated according to the model version information by the target model updating unit, and the updated reference model is used as the target model.
[0074] The above steps, updating the target model through a separate target model update unit, can avoid the problems existing in the existing task processing model, that is, the existing task processing model and the data processing module are in the same task, and the target model will be continuously updated with the training and fine-tuning of the data and the continuous updating of the model framework, which will cause the update of the entire task, and the update of the entire task will bring the risk of crashing the task processing model.
[0075] Optionally, generating operation configuration data according to the target model and target task information includes steps C1-C3:
[0076] Step C1: Determine the target model's operating resource information and calling function information based on the target model and target task information.
[0077] Specifically, the operating resource information required for processing the target task is obtained from the target task information; and the calling function information is determined according to the function called in the target model.
[0078] Among them, the operating resource information includes: CPU, memory, hard disk capacity, network bandwidth, etc.
[0079] Step C2: Generate operating environment data according to the operating resource information, and generate an operating dependency package according to the calling function information.
[0080] Specifically, the operation resource information required for running the target model is used to generate independent operation environment data; and the calling function information on which the target model operation depends is used to generate an operation dependency package.
[0081] In the above steps, the generation of running dependency packages can avoid the version differences of the dependency libraries required for the execution of the existing target model, and the APIs supported by different versions will also be different. Therefore, in actual use, when compatibility issues arise, a lot of manpower is required to manually modify the code or configure compatible versions to avoid the difference problem.
[0082] Step C3: configure the running dependency package to the running environment data to obtain the running configuration data.
[0083] Specifically, the operation dependency package is configured into the operation environment data to obtain the operation configuration data supporting the operation of the target model.
[0084] The running configuration data generated in the above steps are independent of each other.
[0085] Optionally, the target task is processed according to the operation configuration data and the target model, including steps D1-D4:
[0086] Step D1: Determine the resource usage and reference task priority in the edge machine.
[0087] The reference task priority is the processing priority of the target task corresponding to the currently running target model.
[0088] Specifically, the usage of the internal resources of the current edge all-in-one machine is obtained, and the processing priority of the currently running target model is obtained.
[0089] Step D2: Determine whether the target task meets the operating conditions based on the operating configuration data, the usage of resources in the edge all-in-one machine, and the reference task priority.
[0090] Specifically, the CPU, memory, network bandwidth and other data information are obtained from the operation configuration data, and the obtained data information is compared with the remaining CPU, memory, network bandwidth and other resource information of the current edge machine. If the remaining resource information can meet the operation conditions of the target model, the target task meets the operation conditions; if the remaining resource information does not meet the operation requirements of the target model, the reference task priority is compared with the target task priority to determine whether the operation conditions are met. That is, if the reference task priority is higher than the target task priority, the target task does not meet the operation conditions; if the reference task priority is lower than or equal to the target task priority, the target task meets the operation conditions.
[0091] Step D3: If satisfied, the target task is processed according to the operation configuration data and the target model.
[0092] Specifically, if the operating conditions are met, the target model processes the target task according to the operating configuration data.
[0093] Step D4: If not, the target task is placed in the execution queue and waits until the running conditions are met, and then the target task is processed according to the running configuration data and the target model.
[0094] Specifically, if the running conditions are not met, the target task will be placed in the execution queue and wait. When a task is processed in the edge all-in-one machine, it will be determined again whether the target task meets the running conditions. If so, the target task will be processed according to the running configuration data and the target model; if not, it will continue to wait.
[0095] Optionally, determining whether the target task meets the running conditions according to the running configuration data, the usage of the resources in the edge all-in-one machine and the reference task priority includes steps E1-E6:
[0096] Step E1: Determine the remaining resource size of the edge machine according to the usage of the resources in the edge machine.
[0097] Specifically, the size of the remaining resources is determined according to the size of the resources occupied by the edge machine when executing the current target task.
[0098] Step E2: determine the resource size required for the target model to run from the running configuration data, and determine whether the remaining resources of the edge machine can support the target model to run based on the resource size required for the target model to run and the remaining resource size of the edge machine.
[0099] Specifically, the resource size required for the target model operation is determined from the operation configuration data, and the resource size required for the target model operation is compared with the remaining resource size of the edge machine to determine whether the remaining resources of the edge machine can support the target model operation.
[0100] Step E3: If the target model can be supported to run, it is considered that the target task meets the running conditions.
[0101] Specifically, if the remaining resources of the edge machine can support the operation of the target model, it is considered that the remaining resources of the edge machine can support the operation of the target model, and the target task meets the operation conditions.
[0102] Step E4: If the target model cannot be supported, the reference task priority is compared with the target task priority.
[0103] Specifically, if the remaining resources of the edge machine cannot support the operation of the target model, it is necessary to further consider the priority of the reference task and the priority of the target task, so the reference task priority is compared with the target task priority.
[0104] Step E5: If the target task priority is higher than the reference task priority, it is considered that the target task meets the running conditions.
[0105] Specifically, if the priority of the target task is higher than the priority of the reference task, it is considered that the target task needs to be processed first, and the current executing task needs to be suspended to process the target task first. Therefore, it is considered that the target task meets the running conditions.
[0106] Step E6: If the target task priority is lower than the reference task priority, it is considered that the target task does not meet the running conditions.
[0107] Specifically, if the priority of the target task is lower than the priority of the reference task, it is considered that the target task does not need to be processed in priority, so the target task does not meet the running conditions.
[0108] The above steps consider the priority of processing tasks in order to avoid the problem that when an urgent task occurs and the remaining resources cannot meet the processing requirements of the urgent task, the urgent task is not processed in time, resulting in the problem that it cannot be completed within the time limit.
[0109] Optionally, processing the target task according to the operation configuration data and the target model further includes steps F1-F3:
[0110] Step F1: monitor the operation log generated during the target task processing process in real time through the monitoring service module.
[0111] Among them, the monitoring service module is configured in the edge integrated machine, and the monitoring service module is the target model operating environment monitoring unit in the edge integrated machine.
[0112] Specifically, the monitoring service module monitors the status of the operation log generated when the target task is processed in real time.
[0113] Step F2: If an error message appears in the operation log, a target policy is matched from a preset policy library according to the error type.
[0114] Specifically, if error information is detected in the operation log, the error type of the error information is obtained, a corresponding processing strategy is matched from a preset strategy library according to the error type, and the matched processing strategy is used as the target strategy.
[0115] Exemplarily, during the operation process, the operation log is checked through the monitoring service. If an error occurs, different exception handling countermeasures are taken according to the type and severity of the error and the exception handling policy corresponding to the target model, such as pausing, terminating, restarting the target model, notifying the administrator to confirm the operation status, etc.
[0116] Step F3: Optimize the target task processing process according to the target strategy.
[0117] Specifically, according to the target strategy, the processing process of the target task is optimized by configuring the target model operating environment exception processing unit in the edge all-in-one machine.
[0118] The above steps, real-time monitoring of the running process of the target task, helps the administrator to grasp the running status in real time. In the case of abnormal operation, the target strategy is used to shorten the corresponding cycle of the abnormality.
[0119] The technical solution of this embodiment obtains the target task information sent by the target terminal; determines the target model from the candidate model library according to the target task information; generates operation configuration data according to the target model and the target task information, which ensures the necessary resources required for the target model to run while avoiding the crash caused by version conflicts in the target model; processes the target task according to the operation configuration data and the target model, which can ensure the independent operation of different target models, and when a problem occurs in one target model, it will not interfere with the operation of other target models. By determining the target model and the operation configuration data required for the operation of the target model, this method can solve the compatibility problems generated by the target model during actual use, while also ensuring the independence of the target task processing and avoiding interference from other tasks.
[0120] Figure 4 The present invention provides a schematic diagram of a task processing device based on an edge machine according to an embodiment of the present invention. This embodiment is applicable to the case where tasks generated by an energy and power system are processed by an edge machine. The task processing device based on the edge machine can be implemented in the form of hardware and / or software. The task processing device based on the edge machine can be configured in any electronic device with network communication function. Figure 4 As shown, the device includes: a target task information acquisition module 210, a target model determination module 220, an operation configuration data generation module 230 and a processing module 240, wherein:
[0121] Target task information acquisition module 210: used to acquire target task information sent by the target terminal; the target task information is the configuration information provided by the target terminal for the edge integrated machine to perform the target task; the target task is the task of coordinating energy and power for the energy and power system; the edge integrated machine is used to provide the target model and the configuration information required for the operation of the target model for the execution of the target task;
[0122] Target model determination module 220: used to determine the target model from the candidate model library according to the target task information; the candidate model library is composed of target models corresponding to different target tasks;
[0123] The operation configuration data generation module 230 is used to generate the operation configuration data according to the target model and the target task information; the operation configuration data is used to provide the functions and computing resources required for the operation of the target model, and the operation configuration data includes: operation environment data and operation dependency package; the operation environment data is used to provide computing resources for the operation of the target model; the operation dependency package is used to provide the function information required to be called for the operation of the target model;
[0124] Processing module 240: used to process the target task according to the operation configuration data and the target model.
[0125] Optionally, the target task information acquisition module 210 includes:
[0126] Information determination unit: used to obtain target task type and model version information from target task information; the model version information is the version information that the target model needs to reach for processing the target task;
[0127] Reference model determination unit: used to match the reference model from the candidate model library according to the target task type;
[0128] Target model determination unit: used to determine the target model according to the model version information and the reference model.
[0129] Optionally, the target model determination unit includes:
[0130] Comparison subunit: used to compare the model version information with the version information of the reference model;
[0131] Target model determination subunit: used to take the reference model as the target model if they are the same;
[0132] Target model determination subunit: used to update the reference model according to the model version information if they are different, and use the updated reference model as the target model.
[0133] Optionally, the running configuration data generating module 230 includes:
[0134] Resource and function information determination unit: used to determine the target model's running resource information and calling function information according to the target model and target task information;
[0135] The operation environment data and operation dependency package determination unit is used to generate the operation environment data according to the operation resource information, and generate the operation dependency package according to the calling function information;
[0136] The operation configuration data determination unit is used to configure the operation dependency package to the operation environment data to obtain the operation configuration data.
[0137] Optionally, the processing module 240 includes:
[0138] Priority determination unit: used to determine the usage of resources in the edge machine and the reference task priority; the reference task priority is the processing priority level of the target task corresponding to the currently running target model;
[0139] Condition judgment unit: used to determine whether the target task meets the running conditions according to the running configuration data, the usage of resources in the edge all-in-one machine and the reference task priority;
[0140] Processing unit: used to process the target task according to the operation configuration data and the target model if the conditions are met;
[0141] Processing unit: if the conditions are not met, the target task is placed in the execution queue and waits until the running conditions are met, then the target task is processed according to the running configuration data and the target model.
[0142] Optional, conditional judgment unit, specifically used for:
[0143] Determine the remaining resource size of the edge machine based on the usage of resources in the edge machine;
[0144] Determine the resource size required for the target model to run from the running configuration data, and determine whether the remaining resources of the edge machine can support the target model to run according to the resource size required for the target model to run and the remaining resource size of the edge machine;
[0145] If the target model can be supported to run, the target task is considered to meet the running conditions;
[0146] If the target model cannot be supported to run, the reference task priority is compared with the target task priority;
[0147] If the target task priority is higher than the reference task priority, the target task is considered to meet the running conditions;
[0148] If the target task priority is lower than the reference task priority, it is considered that the target task does not meet the running conditions.
[0149] Optionally, the processing module 240 further includes:
[0150] An operation log generating unit is used to monitor the operation log generated by the target task processing process in real time through a monitoring service module; the monitoring service module is configured in the edge all-in-one machine;
[0151] Target policy matching unit: used to match the target policy from the preset policy library according to the error type if an error message appears in the operation log;
[0152] Optimization unit: used to optimize the task processing process according to the target strategy.
[0153] The task processing device based on the edge machine provided in the embodiment of the present invention can execute the task processing method based on the edge machine provided in any embodiment of the present invention mentioned above, and has the corresponding functions and beneficial effects of executing the task processing method based on the edge machine. For detailed process, please refer to the relevant operations of the task processing method based on the edge machine in the above embodiment.
[0154] Figure 5 A schematic diagram of the structure of an electronic device for implementing an edge-based machine-based task processing method according to an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0155] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0156] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0157] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a task processing method based on an edge machine.
[0158] In some embodiments, the edge-machine-based task processing method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the edge-machine-based task processing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the edge-machine-based task processing method in any other appropriate manner (e.g., by means of firmware).
[0159] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0160] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0161] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), 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 foregoing.
[0162] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0163] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0164] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0165] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0166] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A task processing method based on an edge machine, characterized in that: include: Obtain target task information sent by the target terminal; The target task information is configuration information provided by the target terminal for the edge device to perform the target task; The target task is to coordinate energy and power for the energy and power system; the edge integrated machine is used to provide a target model and configuration information required for the operation of the target model for the execution of the target task; Determining a target model from a candidate model library according to the target task information; the candidate model library is composed of target models corresponding to different target tasks; Generate operation configuration data according to the target model and the target task information; The operation configuration data is used to provide the functions and computing resources required for the operation of the target model, and the operation configuration data includes: operation environment data and operation dependency package; the operation environment data is used to provide computing resources for the operation of the target model; the operation dependency package is used to provide the function information required to be called for the operation of the target model; The target task is processed according to the operation configuration data and the target model.
2. The method according to claim 1, characterized in that: Determining the target model from the candidate model library according to the target task information includes: Acquire the target task type and model version information from the target task information; the model version information is the version information that the target model needs to reach for processing the target task; Matching a reference model from the candidate model library according to the target task type; The target model is determined according to the model version information and the reference model.
3. The method according to claim 2, characterized in that The determining the target model according to the model version information and the reference model includes: Compare the model version information with the version information of the reference model; If they are the same, the reference model is used as the target model; If they are different, the reference model is updated according to the model version information, and the updated reference model is used as the target model.
4. The method according to claim 1, characterized in that The generating operation configuration data according to the target model and the target task information includes: Determine the target model's operating resource information and calling function information according to the target model and target task information; Generate operating environment data according to the operating resource information, and generate an operating dependency package according to the calling function information; The operation dependency package is configured to the operation environment data to obtain operation configuration data.
5. The method according to claim 1, characterized in that The processing of the target task according to the operation configuration data and the target model includes: Determine the usage of resources in the edge integrated machine and the reference task priority; the reference task priority is the processing priority level of the target task corresponding to the currently running target model; Determine whether the target task meets the running conditions according to the running configuration data, the usage of resources in the edge all-in-one machine and the reference task priority; If satisfied, processing the target task according to the operation configuration data and the target model; If not, the target task is put into the execution queue and waits until the running condition is met, and then the target task is processed according to the running configuration data and the target model.
6. The method according to claim 5, characterized in that The determining whether the target task meets the running condition according to the running configuration data, the usage of the resources in the edge integrated machine and the reference task priority includes: Determine the remaining resource size of the edge machine according to the usage of the resources in the edge machine; Determine the resource size required for the target model to run from the running configuration data, and determine whether the remaining resources of the edge machine can support the target model to run according to the resource size required for the target model to run and the remaining resource size of the edge machine; If the target model can be supported to run, it is considered that the target task meets the running conditions; If the target model cannot be supported, the reference task priority is compared with the target task priority; If the target task priority is higher than the reference task priority, it is considered that the target task meets the running condition; If the target task priority is lower than the reference task priority, it is considered that the target task does not meet the running condition.
7. The method according to claim 1, characterized in that The processing of the target task according to the operation configuration data and the target model further includes: The operation log generated by the target task processing process is monitored in real time by a monitoring service module; the monitoring service module is configured in the edge all-in-one machine; If an error message appears in the operation log, a target strategy is matched from a preset strategy library according to the error type; The target task processing process is optimized according to the target strategy.
8. A task processing device based on an edge integrated machine, characterized in that: include: A target task information acquisition module is used to acquire the target task information sent by the target terminal; The target task information is the configuration information provided by the target terminal for the edge integrated machine to perform the target task; the target task is the task of coordinating energy and power for the energy and power system; the edge integrated machine is used to provide the target model and the configuration information required for the operation of the target model for the execution of the target task; A target model determination module, used to determine a target model from a candidate model library according to the target task information; the candidate model library is composed of target models corresponding to different target tasks; An operation configuration data generating module, used to generate operation configuration data according to the target model and the target task information; The operation configuration data is used to provide the functions and computing resources required for the operation of the target model, and the operation configuration data includes: operation environment data and operation dependency package; the operation environment data is used to provide computing resources for the operation of the target model; the operation dependency package is used to provide the function information required to be called for the operation of the target model; A processing module is used to process the target task according to the operation configuration data and the target model.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the task processing method based on the edge integrated machine as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the task processing method based on an edge machine according to any one of claims 1 to 7 when executed.