Disclosure of Invention
In view of the above, the invention provides a method and a device for controlling edge calculation of an image acquisition device of a power transmission line, which realize efficient image acquisition and processing by optimizing deployment and resource management of edge calculation nodes.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
In a first aspect, an embodiment of the present invention provides an edge computing control method for an image acquisition device of a power transmission line, where a plurality of edge computing nodes are deployed at preset position nodes of the power transmission line, each edge computing node is equipped with a corresponding image acquisition device and a computing module;
The control method comprises the following steps:
according to the priority and the security level of the image acquisition task, a dynamic resource allocation strategy is adopted to control the corresponding edge computing node to process the tasks with high priority and high security level preferentially;
When any edge computing node has no computing resource, the task is distributed to adjacent idle nodes through a centralized management system, or when the edge node has insufficient resources or needs deep analysis, an edge-cloud cooperative processing mechanism is triggered, and data corresponding to the processing task of the edge computing node is uploaded to a cloud server for cooperative analysis;
when the edge computing node processes the task or the cloud server processes the task, preprocessing, intelligent analysis and fault detection are carried out on the collected image, and early warning information is sent to a monitoring center and maintenance personnel in real time.
Further, according to the priority and the security level of the image acquisition task, a dynamic resource allocation strategy is adopted to control the corresponding edge computing node to process the tasks with high priority and high security level preferentially, and the method comprises the following steps:
setting task priority according to task processing timeliness, and configuring corresponding weights, wherein the task priority comprises a high-priority task weight of 3, a medium-priority task weight of 2 and a low-priority task weight of 1;
Setting the security level of the task according to the importance of the task, and configuring corresponding coefficients, wherein the high security level coefficient is 1.5, the medium security level coefficient is 1.2 and the low security level coefficient is 1;
When the task is the task priority or the task security level, controlling the corresponding edge computing node to process the task with high weight or large coefficient preferentially;
When the priority weight of the existing task and the security level coefficient of the task exist, taking the product of the priority weight of the existing task and the security level coefficient of the existing task as the total task execution score, and controlling the corresponding edge computing node to preferentially process the task with larger total task execution score according to the total task execution score.
Further, setting task priority according to the timeliness of task processing, comprising:
When a real-time fault is detected, the task priority is adjusted to a high-priority task;
setting the periodic inspection task as a medium-priority task;
The historical data analysis task or the task which needs to be processed when the system is idle is set as a low-priority task.
Further, setting a task security level according to importance of the task, comprising:
Setting the monitoring task of important equipment with great influence on safety on a power transmission line as a high safety level;
Setting a monitoring task of general equipment with smaller influence on safety on a power transmission line as a medium safety level;
and setting a non-critical area monitoring task on the power transmission line to be at a low safety level.
Further, when any edge computing node has no computing resource, the task is distributed to adjacent idle nodes through the centralized management system, and the method comprises the following steps:
Each edge computing node monitors the use condition of own computing resources in real time, and reports the resource state of the node to the centralized management system at intervals of preset time by using a heartbeat mechanism;
The centralized management system draws a dynamic resource table according to the collected resource states;
When one of the edge computing node resources has no computing resources or the resource utilization rate exceeds a threshold value, sending a resource shortage request to a centralized management system;
The centralized management system uses a neighboring node selection algorithm according to the resource state table, and selects a node with the minimum communication delay and the lowest resource utilization rate from neighboring nodes of the node based on the geographic position and the network topology structure;
according to a preset task splitting algorithm, splitting the task into a plurality of subtasks, and distributing the subtasks to selected adjacent nodes.
Further, the resource status includes information of node ID, resource usage, and current task queue length.
Further, when the edge node resources are insufficient or deep analysis is needed, triggering an edge-cloud cooperative processing mechanism, and uploading data corresponding to the processing task of the edge computing node to a cloud server for cooperative analysis, wherein the method comprises the following steps:
The centralized management system determines that when the resource utilization rate of all the edge computing nodes exceeds a threshold value or when the task queuing time exceeds a set time, or when the task processing needs complex calculation or large-scale data processing, a data compression algorithm is adopted to compress and upload task data to a cloud server;
And the cloud server receives the task data, then decomposes the task into a plurality of subtasks which can be processed in parallel, and automatically processes the subtasks or distributes the subtasks to a plurality of idle edge computing nodes through task scheduling and distribution.
In a second aspect, the embodiment of the invention also provides an edge computing control system of the power transmission line image acquisition device, which comprises a cloud server and a plurality of edge computing nodes deployed at preset position nodes of the power transmission line, wherein each edge computing node is provided with a corresponding image acquisition device and a computing module;
The control system comprises the following functional modules:
the control dynamic allocation module is used for controlling the corresponding edge computing node to preferentially process the tasks with high priority and high security level by adopting a dynamic resource allocation strategy according to the priority and the security level of the image acquisition task;
The control collaborative analysis module is used for distributing tasks of any edge computing node to adjacent idle nodes through the centralized management system when the computing resources are not available, or triggering an edge-cloud collaborative processing mechanism when the edge node resources are insufficient or deep analysis is needed, and uploading data corresponding to the processing tasks of the edge computing node to the cloud server for collaborative analysis;
the control processing feedback module is used for preprocessing, intelligently analyzing and detecting faults on the acquired images when the edge computing node processes the task or the cloud server processes the task, and sending early warning information to the monitoring center and maintainers in real time.
In a third aspect, an embodiment of the present invention further provides a computer device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
The processor is configured to implement the edge calculation control method of the transmission line image acquisition device according to any one of the first aspect when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored, which when executed by a processor, cause the processor to perform an edge calculation control method of an electric power line image acquisition device according to any one of the first aspects.
The descriptions of the second aspect to the fourth aspect of the present invention may refer to the detailed descriptions of the first aspect, and the beneficial effects of the descriptions of the second aspect to the fourth aspect may refer to the beneficial effect analysis of the first aspect, which is not repeated herein.
Compared with the prior art, the invention has the following advantages:
The real-time performance is improved, the edge computing resources are reasonably optimized, the edge computing nodes can locally process data, the data transmission delay is reduced, and the real-time detection and early warning of faults are realized.
The cost is reduced, namely the frequency and the cost of manual inspection are reduced through automatic image acquisition and intelligent analysis.
The system reliability is enhanced, namely, the dynamic resource management and the edge-cloud cooperative mechanism are improved, the reliability and the processing capacity of the system are improved, complex and changeable field environments can be dealt with, and powerful guarantee is provided for safe and stable operation of the power transmission line.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1:
According to the invention, a plurality of edge computing nodes are deployed at key nodes of a power transmission line, and each node is provided with a high-performance image acquisition device and a computing module as shown in fig. 1. All the edge computing nodes are connected with a management system of the cloud server;
Wherein, based on the geographical environment of the transmission line and the high-occurrence area of the fault, an appropriate deployment position needs to be selected to ensure full coverage of the critical area. Each edge computing node is configured with a high resolution camera, an image processing unit (GPU/FPGA) and a network module (5G/satellite communications) to ensure high quality image acquisition and high speed data transmission.
Referring to fig. 2, the embodiment of the invention discloses an edge calculation control method of an image acquisition device of a power transmission line, which comprises the following steps:
s10, according to the priority and the security level of the image acquisition task, a dynamic resource allocation strategy is adopted to control the corresponding edge computing node to process the task with high priority and high security level preferentially;
S20, when any edge computing node has no computing resource, distributing tasks to adjacent idle nodes through a centralized management system, or triggering an edge-cloud cooperative processing mechanism when the edge node has insufficient resources or needs deep analysis, and uploading data corresponding to the processing tasks of the edge computing node to a cloud server for cooperative analysis;
S30, preprocessing, intelligent analysis and fault detection are carried out on the acquired images when the edge computing node processes the task or the cloud server processes the task, and early warning information is sent to a monitoring center and maintenance personnel in real time.
According to the invention, the high-efficiency utilization of the edge computing node is realized through the intelligent resource management and scheduling algorithm, and the computing resources of the edge computing node are dynamically allocated according to the real-time performance and importance of the image acquisition task, so that the priority processing of the key task is ensured. In addition, when the computing resources of a certain node are insufficient, partial computing tasks can be distributed to adjacent nodes in a task splitting and cooperative processing mode, so that load balancing is realized. And when the processing capacity of the edge node reaches the bottleneck, partial data can be uploaded to the cloud for deep analysis, the edge and the cloud work cooperatively, and the processing capacity of the whole system is improved. Finally, denoising, enhancing and feature extraction can be carried out on the acquired image no matter when the edge computing node processes the task or the cloud server processes the task, so that the image quality and the recognition accuracy are improved. Moreover, a power transmission line fault detection model can be established by utilizing deep learning and machine vision technologies, and the problems of broken lines, foreign matters, aging and the like on the power transmission line can be rapidly identified. When a fault is detected, early warning information can be sent to a monitoring center and maintenance personnel in real time, and countermeasures can be taken in time.
According to the embodiment of the invention, the priority and the security level of the image acquisition task are considered, the resource allocation and the task scheduling are optimized, and the efficient image processing, analysis and early warning are realized by combining the edge-cloud cooperative processing.
The following describes each of the above steps in detail:
in step S10, the priority and security level of the image acquisition task consider resource allocation
1.1 Setting of priority and Security level
Each image acquisition task is distributed with different priorities and safety levels according to the importance and the emergency degree, wherein the task priority is set according to the timeliness of task processing, and the task safety level is set according to the importance of the task.
Priority, namely the emergency degree of the task, such as periodic inspection, fault early warning and the like. The emergency tasks, such as real fault monitoring, need to be processed immediately and have the highest priority. Periodic inspection tasks, such as periodic line inspection, may be processed later, priority, etc. Low priority tasks, such as historical data analysis, can be processed when the system is idle, with the lowest priority. For example, the high-priority task weight is set to be 3, the medium-priority task weight is set to be 2, and the low-priority task weight is set to be 1.
Security level, importance of tasks, such as critical equipment monitoring, general line monitoring, etc. High security levels, such as critical equipment monitoring, tasks have a significant impact on system security. The security level of the system is that the task has a certain influence on the system security if the general equipment monitors. And the security level is low, such as non-critical area monitoring, and the task has little influence on the security of the system. For example, the safety level coefficient is set to be 1.5 for the high safety level, 1.2 for the medium safety level and 1 for the low safety level.
1.2 Dynamic resource Allocation
According to the priority and the security level of the task, adopting a dynamic resource allocation strategy, wherein when the task belongs to the priority of the task or the security level of the task, the corresponding edge computing node is controlled to process the task with high weight or large coefficient preferentially;
And the high-priority task is used for preferentially distributing computing resources and ensuring the task to be processed in time. And the low-priority task is processed after the high-priority task is processed, or is processed when the resource is idle. And the tasks with high security level ensure certain computing resources even if the priority is not high so as to ensure the security.
When the priority weight of the existing task and the security level coefficient of the task exist, taking the product of the priority weight of the existing task and the security level coefficient of the existing task as the total task execution score, and calculating the total priority score of the task, wherein the total task priority score=the priority weight multiplied by the security level coefficient.
And according to the total score of task execution, controlling the corresponding edge computing node to preferentially process the task to execute the task with the larger total score.
In this step, a Multi-stage feedback queue (Multi-level Feedback Queue) algorithm based on priority weights can be used to ensure that high priority tasks can be processed quickly even when resources are strained. The time slice length can be dynamically adjusted according to the task execution time by combining a time slice dynamic Adjustment (DYNAMIC TIME SLICE Adjustment) mechanism, so that the processing efficiency of the medium priority task is improved. Finally, a dynamic priority lifting (Dynamic Priority Boosting) mechanism can be adopted to prevent low-priority tasks from waiting for a long time and improve the overall fairness of the tasks.
Through the scheme, the dynamic resource allocation and optimization based on the task priority and the security level are realized, the priority processing of the tasks with high priority and high security level is ensured, and the real-time performance, the reliability and the resource utilization rate of the system are improved.
In step S20, case 1, task allocation when the current node has no computing resources
When any edge computing node has no computing resource, the task is distributed to adjacent idle nodes through the centralized management system. The following are detailed steps and specific details including implementation of load balancing and optimal allocation algorithms:
(1) Each edge computing node monitors the use condition of own computing resources in real time, and reports the resource state of the node to the centralized management system at intervals of preset time by using a heartbeat mechanism;
(2) The centralized management system draws a dynamic resource table according to the collected resource states;
(3) When one of the edge computing node resources has no computing resources or the resource utilization rate exceeds a threshold value, sending a resource shortage request to a centralized management system;
(4) The centralized management system uses a neighboring node selection algorithm according to the resource state table, and selects a node with the minimum communication delay and the lowest resource utilization rate from neighboring nodes of the node based on the geographic position and the network topology structure;
(5) According to a preset task splitting algorithm, splitting the task into a plurality of subtasks, and distributing the subtasks to selected adjacent nodes.
Each edge computing node monitors the use condition of own computing resources in real time, and the use condition comprises a CPU, a GPU, a memory and the like. The resource status of the nodes is reported to the centralized management system at regular intervals (e.g., 5 seconds) using a heartbeat mechanism (Heartbeat Mechanism). The status report includes information such as node ID, resource usage, current task queue length, etc. The centralized management system maintains a resource state table, and records the latest resource states of all edge computing nodes.
When a certain edge computing node is under-resource (the resource usage exceeds a threshold, such as 80%), a resource-starvation request is sent to the centralized management system.
And the centralized management system selects a node with the lowest resource utilization rate from the adjacent nodes of the node according to the resource state table. A node with minimal communication delay is selected based on geographic location and network topology using a neighboring node selection algorithm (Neighbor Node Selection Algorithm).
If the task is larger, the task can be split into a plurality of subtasks, and a task splitting Algorithm (TASK SPLITTING Algorithm) is adopted for splitting. Tasks are split into subtasks using a distributed computing framework (e.g., mapReduce), which are distributed to multiple neighboring node processes. The subtasks are distributed to adjacent nodes with lowest resource utilization rate through a load balancing algorithm (Load Balancing Algorithm), so that load balancing is ensured.
In addition, to further optimize task allocation, a prediction-based load balancing algorithm (PREDICTIVE LOAD BALANCING ALGORITHM) may be employed:
based on the historical data and the current state, predicting the future load condition of each node, and performing task pre-allocation. A machine learning model (e.g., LSTM, long Short-Term Memory) is used to predict future resource usage of each node. And according to the prediction result, adjusting a task allocation strategy to avoid the task from being allocated to the node which is possibly overloaded in the future. And dynamically adjusting the allocation scheme, and continuously optimizing according to the actual execution condition.
For example, at a preset position node of a certain power transmission line, the node a receives a large number of real-time fault monitoring tasks, so that the resource utilization rate reaches 95%, and no calculation resource is available. The node A reports the resource state to the centralized management system through a heartbeat mechanism. And the centralized management system selects the node B with adjacent geographic positions, minimum network delay and only 20% of resource utilization rate as a task receiving node according to the resource state table. Node a splits the task into multiple sub-tasks and distributes the sub-tasks to node B.
By a task allocation mechanism adjacent to the idle node, the system can quickly find out the appropriate node for task allocation when the resources are insufficient, so that task backlog is avoided, and the resource utilization rate and task processing efficiency of the system are improved.
Triggering an edge-cloud cooperative processing mechanism when the edge node resources are insufficient or deep analysis is needed, and uploading data corresponding to the processing task of the edge computing node to a cloud server for cooperative analysis:
1) The centralized management system determines that when the resource utilization rate of all the edge computing nodes exceeds a threshold value or when the task queuing time exceeds a set time, or when the task processing needs complex calculation or large-scale data processing, a data compression algorithm is adopted to compress and upload task data to a cloud server;
2) And the cloud server receives the task data, then decomposes the task into a plurality of subtasks which can be processed in parallel, and automatically processes the subtasks or distributes the subtasks to a plurality of idle edge computing nodes through task scheduling and distribution.
And (3) detecting a trigger condition:
Edge-cloud collaboration is triggered when node resource usage exceeds a threshold (e.g., 80%) or task queuing time exceeds a set threshold (e.g., 10 seconds), or when deep analysis requirements are detected. Data compression algorithms (e.g., huffman coding) are employed to reduce the amount of data transmitted and upload the data over a high-speed network (e.g., 5G). After the cloud server receives the data, the task is decomposed into subtasks which can be processed in parallel by using a task decomposition algorithm (such as DIVIDE AND Conquer), the subtasks can be processed by self, and the task processing sequence and the resource allocation can be optimized by a cooperative scheduling algorithm (such as Heterogeneous EARLIEST FINISH TIME, HEFT) of the edge computing node and the cloud server.
In step S30, the result feedback is processed:
And the cloud server gathers the subtask results processed by each computing node or gathers the results processed by the cloud server to generate a final processing result.
When the edge computing node processes the task or the cloud server processes the task, preprocessing, intelligent analysis and fault detection are carried out on the collected image, and early warning information is sent to a monitoring center and maintenance personnel in real time. The following are the detailed steps:
1. Image preprocessing
The purpose of image preprocessing is to improve image quality, reduce noise, and facilitate subsequent intelligent analysis and fault detection. Gaussian filtering (Gaussian Filtering) may be used to remove noise from the image. Image contrast is enhanced using histogram equalization (Histogram Equalization). The image is segmented into foreground and background using the Otsu thresholding method.
2. Intelligent analysis
The purpose of intelligent analysis is to extract useful information from the image, such as detecting a fault point of the transmission line. For example, convolutional neural networks (Convolutional Neural Network, CNN) are used to extract image features. The pre-trained YOLO model can be reused for target detection. And the purpose of fault detection is to identify and locate faults of the transmission line, such as broken lines, branch contacts, etc.
The fault detection uses a support vector machine (Support Vector Machine, SVM) classifier to perform fault identification. Fault location, locating fault points using image processing techniques such as Edge Detection (Edge Detection) and contour Detection (Contour Detection).
3. Real-time early warning
And generating early warning information including fault type, fault position, time and the like according to the fault identification and positioning results. The early warning information is sent to the monitoring center and maintenance personnel in real time through a message queue (such as Kafka) or a push service (such as Pushbullet).
Through the detailed image preprocessing, intelligent analysis, fault detection and real-time early warning steps, the method and the system realize efficient processing and fault detection on the power transmission line image, ensure that the system can monitor and early warn in real time, and improve the maintenance efficiency and the reliability of the power transmission line. The accuracy and the response speed of fault detection are improved, and the safe operation of the power transmission line is ensured.
Example 2:
Based on the same inventive concept, referring to fig. 1, the invention also provides an edge calculation control system of the power transmission line image acquisition device, which comprises a cloud server and a plurality of edge calculation nodes deployed at preset position nodes of the power transmission line, wherein each edge calculation node is provided with a corresponding image acquisition device and calculation module;
Referring to fig. 3, the control system includes the following functional modules:
the control dynamic allocation module is used for controlling the corresponding edge computing node to preferentially process the tasks with high priority and high security level by adopting a dynamic resource allocation strategy according to the priority and the security level of the image acquisition task;
The control collaborative analysis module is used for distributing tasks of any edge computing node to adjacent idle nodes through the centralized management system when the computing resources are not available, or triggering an edge-cloud collaborative processing mechanism when the edge node resources are insufficient or deep analysis is needed, and uploading data corresponding to the processing tasks of the edge computing node to the cloud server for collaborative analysis;
the control processing feedback module is used for preprocessing, intelligently analyzing and detecting faults on the acquired images when the edge computing node processes the task or the cloud server processes the task, and sending early warning information to the monitoring center and maintainers in real time.
In this embodiment, the system dynamically allocates computing resources according to task priorities and security levels, so that tasks with high priorities and high security levels can obtain computing resources preferentially, and timely processing of critical tasks is ensured. The centralized management system monitors the resource use condition of each edge computing node in real time, ensures that tasks can be efficiently distributed to adjacent idle nodes when resources are insufficient, and realizes load balancing and optimal resource utilization. And when the edge computing node resources are insufficient or complex computation is required, the system can trigger an edge-cloud cooperative processing mechanism, upload the task to a cloud server for cooperative analysis, ensure the smooth completion of the task and improve the robustness and reliability of the system.
Through the implementation of the technical scheme and the functional module, the edge computing control system of the power transmission line image acquisition device has obvious technical advantages in the aspects of task processing efficiency, resource utilization, system robustness, real-time fault early warning and delay.
Example 3:
Based on the same inventive concept, the invention also provides a computer device, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
The processor, when executing the program stored in the memory, can implement the edge calculation control method of the transmission line image acquisition device as in embodiment 1.
As shown in fig. 4, the electronic device may include a processor (processor) 41, a communication interface (Communications Interface) 42, a memory (memory) 43, and a communication bus 44, where the processor 41, the communication interface 42, and the memory 43 perform communication with each other through the communication bus 44. Processor 41 may invoke logic instructions in memory 43 to perform an edge calculation control method of a transmission line image acquisition device, the method comprising:
s10, according to the priority and the security level of the image acquisition task, a dynamic resource allocation strategy is adopted to control the corresponding edge computing node to process the task with high priority and high security level preferentially;
S20, when any edge computing node has no computing resource, distributing tasks to adjacent idle nodes through a centralized management system, or triggering an edge-cloud cooperative processing mechanism when the edge node has insufficient resources or needs deep analysis, and uploading data corresponding to the processing tasks of the edge computing node to a cloud server for cooperative analysis;
S30, preprocessing, intelligent analysis and fault detection are carried out on the acquired images when the edge computing node processes the task or the cloud server processes the task, and early warning information is sent to a monitoring center and maintenance personnel in real time.
Further, the logic instructions in the memory 43 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
Through the detailed description of the embodiment, in the edge calculation control method of the power transmission line image acquisition device, the problems of unreasonable resource allocation, task processing delay, inaccurate fault detection and the like in the prior art can be effectively solved, and the method has obvious technical effects and practical application values.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.