A power scene intelligent monitoring and picture intelligent screening and saving system and method
By employing a high-precision YOLOv7 model and a C++ and Python co-architecture in power scenarios, combined with intelligent filtering logic and multi-dimensional retrieval functions, the problems of insufficient identification accuracy, non-targeted image saving, and limited retrieval functions in power scenario monitoring are solved, achieving efficient and automated monitoring and early warning capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DTI (SHANGHAI) CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-05-22
Smart Images

Figure CN122073040A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of screening and preservation technology, specifically relating to an intelligent monitoring and intelligent image screening and preservation system and method for power scenarios. Background Technology
[0002] In the fields of line safety monitoring, smart substation operation and maintenance, and safety early warning, traditional monitoring solutions mainly rely on video acquisition combined with basic image recognition technology. The core process is as follows: real-time video streams are collected by cameras deployed in substations and along the lines, transmitted to the monitoring center for storage, and then target detection is performed using the basic YOLO series model to identify common safety hazards such as foreign objects approaching and personnel intrusion. It only supports manual photo recording.
[0003] However, existing technologies have the following significant drawbacks:
[0004] Insufficient recognition accuracy and efficiency: The use of outdated or simplified recognition models results in low accuracy in recognizing complex targets in power scenarios (such as small foreign objects on power lines and specific engineering vehicles in substations), with high rates of missed detections and false detections, which cannot meet the needs of high-precision monitoring.
[0005] Image storage lacks targeting: It adopts a fixed-time batch storage or manual capture mode, without intelligent filtering based on monitoring priorities, resulting in redundant invalid images, the burying of key information, and time-consuming retrieval later;
[0006] Incomplete feature extraction: Only the basic type of the target is identified, but key features such as clothing color and foreign object sub-type are not extracted, which cannot support accurate tracing and investigation.
[0007] The search function is limited: it only supports basic queries such as time and location, and cannot be searched by target sub-type or feature attributes, making it difficult to quickly locate problems;
[0008] Poor tool compatibility: The C++ and Python systems do not work together efficiently, and the video decoding and frame processing processes are not well integrated, resulting in low overall processing efficiency and an inability to meet real-time early warning requirements. Summary of the Invention
[0009] This invention provides a system and method for intelligent monitoring and intelligent image filtering and storage of power scenarios. By using a high-precision recognition model, a cross-language collaborative architecture, intelligent filtering logic, and multi-dimensional retrieval functions, it solves the above-mentioned defects of the prior art and improves the intelligence and practicality of power monitoring.
[0010] The present invention employs the following technical solution.
[0011] A method for intelligent monitoring and intelligent image filtering and saving in power scenarios includes:
[0012] Step 1: Select the technical tools and core models for intelligent monitoring and intelligent image filtering and saving in power scenarios;
[0013] Step 2: After selecting the technical tools and core models, perform video decoding and frame extraction;
[0014] Step 3: After video decoding and frame extraction, perform target recognition and feature extraction;
[0015] Step 4: After target recognition and feature extraction, perform video encoding and merging;
[0016] Step 5: After video encoding and merging, perform intelligent image filtering and saving;
[0017] Step 6: After performing intelligent image filtering and saving, perform data entry and multi-dimensional retrieval data storage;
[0018] Step 7: Data storage and multi-dimensional retrieval After data storage, perform multi-dimensional retrieval.
[0019] Furthermore, step 1 specifically includes:
[0020] Step 1-1: Construct a cross-language collaborative architecture;
[0021] Step 1-2: Deploy a high-precision model.
[0022] Furthermore, step 1-1 specifically includes:
[0023] C++ is used for high-speed computations such as video decoding, frame extraction, and video encoding, leveraging the efficiency of its compiled language to improve processing speed; Python is used for target recognition, feature extraction, data storage, and retrieval functions, relying on open-source libraries such as OpenCV, PyTorch, and pymongo to simplify development, and the two are seamlessly connected through standardized data interfaces.
[0024] Furthermore, steps 1-2 specifically include:
[0025] We selected the YOLOv7 open-source model, built a dedicated dataset for the power industry, and completed optimized training.
[0026] Furthermore, step 2 specifically includes:
[0027] Step 2-1: Receive input parameters;
[0028] Step 2-2: Perform basic video information analysis;
[0029] Steps 2-3: Perform frame extraction and caching.
[0030] Furthermore, step 2-1 specifically includes:
[0031] Obtain the video file to be processed and the real-time stream, image save time interval type, and target type.
[0032] Furthermore, step 2-2 specifically includes:
[0033] The video is decoded using the OpenCV library in C++ to obtain the total number of frames, frame rate (FPS), and resolution information, based on the formula... Calculate the first Frame index corresponding to each time interval ,in For video frame rate, Set the time interval for saving images.
[0034] Furthermore, steps 2-3 specifically include:
[0035] Extract each frame of the video sequentially, convert them to JPG and PNG formats and store them as cache frames in the local cache directory. Assign a unique frame ID to each frame and associate it with the video timestamp and frame index information.
[0036] Furthermore, step 3 specifically includes:
[0037] Step 3-1: Perform model invocation and target classification;
[0038] Step 3-2: Perform feature extraction and supplementation;
[0039] Step 3-3: Format the results.
[0040] Furthermore, step 3-1 specifically includes:
[0041] The C++ program calls the optimized YOLOv7 model to identify buffered frames, classifying targets into three main categories and multiple subcategories, and outputting the target category, bounding box coordinates, and confidence score. .
[0042] Furthermore, step 3-2 specifically includes:
[0043] When a "personnel" target is identified, a color extraction algorithm based on RGB color space clustering is called in C++ to extract the main color tone of the personnel's clothing, and then associates it with the target category and confidence level.
[0044] Furthermore, step 3-3 specifically includes:
[0045] The recognition results of each cached frame are converted into JSON format and stored by associating the frame ID with the corresponding image file.
[0046] Furthermore, step 4 specifically includes:
[0047] After all frames are recognized and JSON generated, C++ calls the OpenCV library to overlay the original frames with the recognition annotations and draw them. The "recognition and annotation video" is then generated by encoding it in the original time order, stored in the specified directory, and the storage address is recorded.
[0048] Furthermore, step 5 specifically includes:
[0049] Step 5-1: Determine the filtering range: based on the image saving time interval. Extract all frames corresponding to the timestamp;
[0050] Step 5-2: Prioritize the frames: Sort the frames in the same batch according to the priority formula. The priority formula can be any one of the following formulas:
[0051] Priority 1 ,in This represents the total number of all types of targets within a single frame.
[0052] Priority 2 ,in This represents the total number of targets of interest type within a single frame.
[0053] Step 5-3: Save key images: Select the first frame in each batch and save it to the permanent storage directory, and associate the JSON recognition result with the video address;
[0054] Step 5-4: Perform redundancy cleanup: periodically clean up temporary frames in the cache directory.
[0055] Furthermore, step 6 specifically includes:
[0056] Python calls the pymongo library to store key information into a MongoDB database. The stored fields include frame ID, original video address, labeled video address, key image address, timestamp, storage interval type, target type, recognition result JSON, target category - subcategory, and clothing color of the person.
[0057] Furthermore, step 7 specifically includes:
[0058] Develop a search page that supports three types of queries: search by target major category - subcategory;
[0059] Search by clothing color;
[0060] Search by time range; search results return image previews, storage addresses, video links, and structured recognition details.
[0061] A smart monitoring and image filtering and saving system for power scenarios includes:
[0062] The video input module, C++ video decoding and frame extraction module, YOLOv7 recognition and feature extraction module, JSON generation module, video encoding and merging module, Python image filtering module, data entry module, and retrieval page are connected sequentially.
[0063] The video input module is used to acquire the video file to be processed, the real-time stream, the image save time interval type, and the type of the target of interest;
[0064] The C++ video decoding and frame extraction module is used to decode video by calling the OpenCV library in C++, and to obtain information such as total number of frames, frame rate (FPS), and resolution, based on the formula... Calculate the first Frame index corresponding to each time interval ,in For video frame rate, Set the time interval for saving images; extract each frame of the video sequentially, convert it to JPG / PNG format and store it in the local cache directory, assign a unique frame ID to each frame, and associate it with the video timestamp and frame index basic information;
[0065] The YOLOv7 recognition and feature extraction module is used for model invocation and target classification; it is also used for feature supplementation and extraction.
[0066] The JSON generation module is used to convert the recognition results of each cached frame into JSON format and store them by associating them with the corresponding image file through the frame ID;
[0067] The video encoding and merging module is used to overlay the original frames with the recognition annotations after all frames have been recognized and generated into JSON. The C++ module calls the OpenCV library to overlay the original frames with the recognition annotations and encodes them in the original time order to generate the "recognized and annotated video", which is then stored in the specified directory and the storage address is recorded.
[0068] The Python image filtering module is used for intelligent image filtering and saving.
[0069] The data entry module is used by Python to call the pymongo library to store key information into the MongoDB database. The storage fields include frame ID, original video address, labeled video address, key image address, timestamp, save interval type, target type, recognition result JSON, target category - subcategory, and clothing color of the person.
[0070] The search page supports three types of queries: searching by target category - subcategory;
[0071] Search by clothing color;
[0072] Search by time range; search results return image previews, storage addresses, video links, and structured recognition details.
[0073] The beneficial effects of the present invention are as follows: Compared with the prior art, the technical effects of the present invention include:
[0074] Significantly improved recognition accuracy and efficiency: The YOLOv7 model optimized for power scenarios achieves a recognition accuracy of 98.5%, reducing the false negative / false positive rate by more than 60%; the C++ and Python collaborative architecture improves video processing efficiency by 40%, meeting the needs of real-time monitoring and early warning.
[0075] Accurate retention of key information: Intelligent filtering logic reduces the redundancy rate of invalid images by 75%, and increases the proportion of key images from 15% in traditional solutions to 80%, significantly shortening the time spent searching later.
[0076] More comprehensive feature support: The newly added features such as target sub-type and clothing color provide multi-dimensional clues for hazard tracing. For example, it can quickly locate the incident of a person wearing red clothing breaking in. Its practicality is significantly better than traditional basic identification solutions.
[0077] Search efficiency is greatly improved: the multi-dimensional search function covers core query needs, and the troubleshooting time is shortened from 10-30 minutes in the traditional solution to 1-2 minutes, improving the operation and maintenance response speed;
[0078] High degree of automation: The entire process requires no human intervention, reducing labor costs by 80%, avoiding omissions and errors in manual operation, and improving the intelligence and standardization of power monitoring. Attached Figure Description
[0079] Figure 1 This is a flowchart of the intelligent monitoring and intelligent image filtering and saving method for power scenarios described in this invention. Detailed Implementation
[0080] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, any other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.
[0081] like Figure 1 As shown, the present invention provides a method for intelligent monitoring and intelligent image filtering and saving of power scenarios, comprising:
[0082] Step 1: Select the technical tools and core models for intelligent monitoring and intelligent image filtering and saving in power scenarios;
[0083] In a preferred but non-limiting embodiment of the present invention, step 1 specifically includes:
[0084] Step 1-1: Construct a cross-language collaborative architecture;
[0085] In a preferred but non-limiting embodiment of the present invention, step 1-1 specifically includes:
[0086] C++ is used for high-speed computations such as video decoding, frame extraction, and video encoding, leveraging the efficiency of its compiled language to improve processing speed; Python is used for target recognition, feature extraction, data storage, and retrieval functions, relying on open-source libraries such as OpenCV, PyTorch, and pymongo to simplify development, and the two are seamlessly connected through standardized data interfaces.
[0087] Step 1-2: Deploy a high-precision model.
[0088] In a preferred but non-limiting embodiment of the present invention, steps 1-2 specifically include:
[0089] The YOLOv7 open-source model was selected, and a dedicated dataset was built and optimized for power scenarios (substation equipment, foreign objects on lines, personnel, engineering vehicles, etc.). After training, the target recognition accuracy reached 98.5%, which significantly improved detection accuracy and inference speed compared with traditional models.
[0090] Step 2: After selecting the technical tools and core models, perform video decoding and frame extraction;
[0091] In a preferred but non-limiting embodiment of the present invention, step 2 specifically includes:
[0092] Step 2-1: Receive input parameters;
[0093] In a preferred but non-limiting embodiment of the present invention, step 2-1 specifically includes:
[0094] Get the video files and real-time streams to be processed, the image save time interval type (e.g., 5s / image, 10s / image), and the target type (default: all, or specify personnel / engineering vehicles / wires / foreign objects).
[0095] Step 2-2: Perform basic video information analysis;
[0096] In a preferred but non-limiting embodiment of the present invention, step 2-2 specifically includes:
[0097] The video is decoded using the OpenCV library in C++ to obtain information such as total frames, frame rate (FPS), and resolution, based on the formula... Calculate the first Frame index corresponding to each time interval ,in For video frame rate, Set the time interval for saving images.
[0098] Steps 2-3: Perform frame extraction and caching.
[0099] In a preferred but non-limiting embodiment of the present invention, steps 2-3 specifically include:
[0100] Extract each frame of the video sequentially, convert them to JPG and PNG formats and store them as cache frames in the local cache directory (automatically cleaned up after processing). Assign a unique frame ID to each frame and associate it with basic information such as video timestamp and frame index.
[0101] Step 3: After video decoding and frame extraction, perform target recognition and feature extraction;
[0102] In a preferred but non-limiting embodiment of the present invention, step 3 specifically includes:
[0103] Step 3-1: Perform model invocation and target classification;
[0104] In a preferred but non-limiting embodiment of the present invention, step 3-1 specifically includes:
[0105] The C++ program calls the optimized YOLOv7 model to identify buffered frames, classifying targets into three main categories (people, construction vehicles, and wires / objects) and multiple subcategories (e.g., construction vehicles - trucks / road rollers / excavators, wires / objects - balloons / garbage / kites). The output includes the target category, bounding box coordinates, and confidence score. .
[0106] Step 3-2: Perform feature extraction and supplementation;
[0107] In a preferred but non-limiting embodiment of the present invention, step 3-2 specifically includes:
[0108] When a "personnel" target is identified, a color extraction algorithm based on RGB color space clustering is called in C++ to extract the main color tone (red / blue / black, etc.) of the personnel's clothing and associate it with the target category and confidence level.
[0109] Step 3-3: Format the results.
[0110] In a preferred but non-limiting embodiment of the present invention, step 3-3 specifically includes:
[0111] The recognition results of each cached frame (frame ID, timestamp, target category - subcategory, bounding box, confidence score, clothing color) are converted into JSON format and stored by associating the frame ID with the corresponding image file.
[0112] Step 4: After target recognition and feature extraction, perform video encoding and merging;
[0113] In a preferred but non-limiting embodiment of the present invention, step 4 specifically includes:
[0114] After all frames are recognized and JSON generated, C++ calls the OpenCV library to overlay the original frames with the recognition annotations (target bounding boxes, category labels, confidence scores) and encodes them in the original time order to generate a "recognized and annotated video", which is then stored in a specified directory and the storage address is recorded.
[0115] Step 5: After video encoding and merging, perform intelligent image filtering and saving;
[0116] In a preferred but non-limiting embodiment of the present invention, step 5 specifically includes:
[0117] Step 5-1: Determine the filtering range: based on the image saving time interval. Extract all frames corresponding to the timestamp;
[0118] Step 5-2: Prioritize the frames: Sort the frames in the same batch according to the aforementioned priority formula. The priority formula can be any one of the following formulas:
[0119] Priority 1 (default rule, based on target quantity) ,in This represents the total number of all types of targets within a single frame.
[0120] Priority 2 (Specify the type of concern, based on the number of targets) ,in This represents the total number of targets of interest type within a single frame.
[0121] Step 5-3: Save key images: Select the first frame in each batch (the frame with the richest target information) and save it to the permanent storage directory, and associate it with the JSON recognition result and the video address;
[0122] Step 5-4: Perform redundancy cleanup: Regularly clean up temporary frames in the cache directory to reduce storage usage.
[0123] Step 6: After performing intelligent image filtering and saving, perform data entry and multi-dimensional retrieval data storage;
[0124] In a preferred but non-limiting embodiment of the present invention, step 6 specifically includes:
[0125] Python calls the pymongo library to store key information into a MongoDB database. The stored fields include frame ID, original video address, labeled video address, key image address, timestamp, storage interval type, target type, recognition result JSON, target category - subcategory, and clothing color of the person.
[0126] Step 7: Data storage and multi-dimensional retrieval After data storage, perform multi-dimensional retrieval.
[0127] In a preferred but non-limiting embodiment of the present invention, step 7 specifically includes:
[0128] Develop a search page that supports three types of queries: search by target category - subcategory (e.g., engineering vehicles - trucks);
[0129] Search by the color of clothing worn by the person (e.g., red clothing);
[0130] Search by time range; search results return image previews, storage addresses, video links, and structured recognition details, enabling rapid problem location.
[0131] To broaden the scope of patent protection, this invention supports the following alternative implementations, all of which ensure parameter dimension matching and logical consistency:
[0132] Model replacement: YOLOv7 can be replaced by high-performance models such as YOLOv8 and YOLOX, but training on the power scenario dataset must be completed simultaneously.
[0133] Language replacement: The C++ video processing stage can be replaced with Java (calling the FFmpeg library), and the Python data processing stage can be replaced with Go (calling the corresponding open source library). Only the cross-language data interface needs to be adjusted.
[0134] Alternative filtering rules: The total confidence score (S_3) or the highest confidence score of the interest type (S_4) can be used instead of the target quantity sorting rule;
[0135] Time interval replacement: Supports user-defined intervals (T_{int}) (e.g., 3s, 8s) to replace preset fixed intervals;
[0136] Database replacement: MongoDB can be replaced by MySQL, PostgreSQL, etc., only requiring adjustments to the data storage format and connection method;
[0137] Feature algorithm alternatives: Clothing color extraction can use HSV / Lab color space algorithms, or combine human pose estimation models to locate the upper and lower body to improve accuracy.
[0138] The key technical points of this invention are:
[0139] YOLOv7 recognition and feature extraction technology optimized for power scenarios: It achieves accurate recognition of target categories and subcategories and feature extraction such as clothing color, solving the problems of low recognition accuracy and incomplete features;
[0140] Video processing technology that combines C++ and Python: division of labor enables high-speed computing and flexible function development, improves overall processing efficiency, and solves the problem of poor tool interoperability;
[0141] Intelligent image filtering technology that focuses on type and time interval: Save key images by sorting them according to target quantity / confidence, reducing invalid redundancy and solving the problem of non-targeted saving;
[0142] Multi-dimensional precise search technology: Supports multi-dimensional queries such as target sub-type and clothing color, enabling rapid location and solving the problem of limited search functionality.
[0143] The present invention discloses an intelligent monitoring and intelligent image filtering and storage system for power scenarios, comprising:
[0144] The system sequentially connects to the following modules: video input module, C++ video decoding and frame extraction module, YOLOv7 recognition and feature extraction module, JSON generation module, video encoding and merging module, Python image filtering module, data entry module, and retrieval page. Each module is connected in a workflow to achieve fully automated monitoring. At the same time, core parameters and formulas are defined to ensure logical consistency.
[0145] The video input module is used to acquire the video file to be processed and the real-time stream, the image saving time interval type (e.g., 5s / image, 10s / image), and the type of target of interest (default all, or specify personnel / engineering vehicles / wires and foreign objects).
[0146] The C++ video decoding and frame extraction module is used to decode video by calling the OpenCV library in C++, and to obtain information such as total frame count, frame rate (FPS), and resolution, based on the formula... Calculate the first Frame index corresponding to each time interval ,in For video frame rate, Set the time interval for saving images; extract each frame of the video sequentially, convert it to JPG / PNG format and store it in the local cache directory (automatically cleaned up after processing); assign a unique frame ID to each frame and associate it with basic information such as video timestamp and frame index;
[0147] The YOLOv7 recognition and feature extraction module is used for model invocation and target classification; it is also used for feature supplementation and extraction.
[0148] The JSON generation module is used to convert the recognition results of each frame of the cached frame (frame ID, timestamp, target major category - minor category, bounding box, confidence score, clothing color) into JSON format, and store them by associating the frame ID with the corresponding image file;
[0149] The video encoding and merging module is used to overlay the original frames with the recognition annotations (target bounding boxes, category labels, and confidence scores) after all frames have been recognized and generated into JSON. The C++ module calls the OpenCV library to encode the original frames and generate the "recognized and annotated video" in the original time order, which is then stored in the specified directory and the storage address is recorded.
[0150] The Python image filtering module is used for intelligent image filtering and saving.
[0151] The data entry module is used by Python to call the pymongo library to store key information into the MongoDB database. The storage fields include frame ID, original video address, labeled video address, key image address, timestamp, save interval type, target type, recognition result JSON, target category - subcategory, and clothing color of the person.
[0152] The search page supports three types of queries: searching by target category - subcategory (e.g., engineering vehicles - trucks);
[0153] Search by the color of clothing worn by the person (e.g., red clothing);
[0154] Search by time range; search results return image previews, storage addresses, video links, and structured recognition details, enabling rapid problem location.
[0155] A specific embodiment of the present invention is shown below:
[0156] I. System Deployment Environment
[0157] 1. Hardware environment: Intel Core i7-12700H processor, 32GB memory, NVIDIA RTX 3080 graphics card, 1TB SSD (cache directory) + 10TB mechanical hard drive (permanent storage);
[0158] 2. Software environment: Operating system is Ubuntu 20.04, C++ compilation environment is GCC 9.4.0, Python version 3.9, OpenCV version 4.5.5, PyTorch version 1.12.0, MongoDB version 5.0.
[0159] II. Implementation Process Demonstration
[0160] Taking a real-time monitoring scenario of a 220kV substation as an example, the image saving time interval is set. =5s, focus on the target type "personnel", the specific implementation steps are as follows:
[0161] 1. Video Input: Connect the real-time video stream from the substation camera, with a frame rate (FPS) of 30, according to the formula. =k*5*30 calculates to get the frame indexes for every 5 seconds as 150, 300, 450...;
[0162] 2. Frame Extraction: Decode the video using C++ and extract the index frames mentioned above, store them in the cache directory, and assign frame IDs;
[0163] 3. Recognition and Feature Extraction: The YOLOv7 model identified two people in red clothing in frame ID 150 (confidence levels of 0.92 and 0.90 respectively), and one person in black clothing in frame ID 300 (confidence level of 0.88). Based on the priority formula... = Sort by frame ID150 =2 is higher than frame ID 300 =1;
[0164] 4. Video encoding: Overlay recognition annotations onto all frames, generate annotations, and save the video to a specified directory; Image saving: Select frame ID150 as the key image at 5-second intervals, save it to a permanent storage directory, and associate it with JSON results (including the color of clothing of people).
[0165] 5. Data storage and retrieval: The data is stored in MongoDB. Later, maintenance personnel can quickly locate the image and related video of frame ID 150 by searching for "person in red clothing" on the search page, thus completing the hazard tracing.
[0166] The beneficial effects of the present invention are as follows: Compared with the prior art, the technical effects of the present invention include:
[0167] Significantly improved recognition accuracy and efficiency: The YOLOv7 model optimized for power scenarios achieves a recognition accuracy of 98.5%, reducing the false negative / false positive rate by more than 60%; the C++ and Python collaborative architecture improves video processing efficiency by 40%, meeting the needs of real-time monitoring and early warning.
[0168] Accurate retention of key information: Intelligent filtering logic reduces the redundancy rate of invalid images by 75%, and increases the proportion of key images from 15% in traditional solutions to 80%, significantly shortening the time spent searching later.
[0169] More comprehensive feature support: The newly added features such as target sub-type and clothing color provide multi-dimensional clues for hazard tracing. For example, it can quickly locate the incident of a person wearing red clothing breaking in. Its practicality is significantly better than traditional basic identification solutions.
[0170] Search efficiency is greatly improved: the multi-dimensional search function covers core query needs, and the troubleshooting time is shortened from 10-30 minutes in the traditional solution to 1-2 minutes, improving the operation and maintenance response speed;
[0171] High degree of automation: The entire process requires no human intervention, reducing labor costs by 80%, avoiding omissions and errors in manual operation, and improving the intelligence and standardization of power monitoring.
[0172] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention without departing from the spirit and scope of the present invention. Any modifications or equivalent substitutions should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for intelligent monitoring and intelligent image filtering and saving in power scenarios, characterized in that, include: Step 1: Select the technical tools and core models for intelligent monitoring and intelligent image filtering and saving in power scenarios; Step 2: After selecting the technical tools and core models, perform video decoding and frame extraction; Step 3: After video decoding and frame extraction, perform target recognition and feature extraction; Step 4: After target recognition and feature extraction, perform video encoding and merging; Step 5: After video encoding and merging, perform intelligent image filtering and saving; Step 6: After performing intelligent image filtering and saving, perform data entry and multi-dimensional retrieval data storage; Step 7: Data storage and multi-dimensional retrieval After data storage, perform multi-dimensional retrieval.
2. The intelligent monitoring and intelligent image filtering and saving method for power scenarios according to claim 1, characterized in that, Step 1 specifically includes: Step 1-1: Construct a cross-language collaborative architecture; Step 1-2: Deploy a high-precision model.
3. The method for intelligent monitoring and intelligent image filtering and saving of power scenarios according to claim 2, characterized in that, Step 1-1 specifically includes: C++ is used for high-speed computations such as video decoding, frame extraction, and video encoding, leveraging the efficiency of its compiled language to improve processing speed; Python is used for target recognition, feature extraction, data storage, and retrieval functions, relying on open-source libraries such as OpenCV, PyTorch, and pymongo to simplify development, and the two are seamlessly connected through standardized data interfaces; Steps 1-2 specifically include: We selected the YOLOv7 open-source model, built a dedicated dataset for the power industry, and completed optimized training.
4. The intelligent monitoring and intelligent image filtering and saving method for power scenarios according to claim 3, characterized in that, Step 2 specifically includes: Step 2-1: Receive input parameters; Step 2-2: Perform basic video information analysis; Steps 2-3: Perform frame extraction and caching.
5. The intelligent monitoring and intelligent image filtering and saving method for power scenarios according to claim 4, characterized in that, Step 2-1 specifically includes: Obtain the video file to be processed, the real-time stream, the image save time interval type, and the type of the target of interest; Step 2-2 specifically includes: The video is decoded using the OpenCV library in C++ to obtain the total number of frames, frame rate (FPS), and resolution information, based on the formula... Calculate the first Frame index corresponding to each time interval ,in For video frame rate, Set the time interval for saving images; Steps 2-3 specifically include: Extract each frame of the video sequentially, convert them to JPG and PNG formats and store them as cache frames in the local cache directory. Assign a unique frame ID to each frame and associate it with the video timestamp and frame index information.
6. The intelligent monitoring and intelligent image filtering and saving method for power scenarios according to claim 5, characterized in that, Step 3 specifically includes: Step 3-1: Perform model invocation and target classification; Step 3-2: Perform feature extraction and supplementation; Step 3-3: Format the results.
7. The intelligent monitoring and intelligent image filtering and saving method for power scenarios according to claim 6, characterized in that, Step 3-1 specifically includes: The C++ program calls the optimized YOLOv7 model to identify buffered frames, classifying targets into three main categories and multiple subcategories, and outputting the target category, bounding box coordinates, and confidence score. ; Step 3-2 specifically includes: When a "personnel" target is identified, a color extraction algorithm based on RGB color space clustering is called in C++ to extract the main color tone of the personnel's clothing, and then correlates it with the target category and confidence level. Step 3-3 specifically includes: The recognition results of each cached frame are converted into JSON format and stored by associating the frame ID with the corresponding image file.
8. The method for intelligent monitoring and intelligent image filtering and saving of power scenarios according to claim 7, characterized in that, Step 4 specifically includes: After all frames are recognized and JSON generated, C++ calls the OpenCV library to overlay the original frames with the recognized annotations and draw them. The "recognized and annotated video" is then encoded in the original time order, stored in the specified directory, and the storage address is recorded. Step 5 specifically includes: Step 5-1: Determine the filtering range: based on the image saving time interval. Extract all frames corresponding to the timestamp; Step 5-2: Prioritize the frames: Sort the frames in the same batch according to the priority formula. The priority formula can be any one of the following formulas: Priority 1 ,in This represents the total number of all types of targets within a single frame. Priority 2 ,in This represents the total number of targets of interest type within a single frame. Step 5-3: Save key images: Select the first frame in each batch and save it to the permanent storage directory, and associate the JSON recognition result with the video address; Step 5-4: Perform redundancy cleanup: periodically clean up temporary frames in the cache directory.
9. The method for intelligent monitoring and intelligent image filtering and saving of power scenarios according to claim 8, characterized in that, Step 6 specifically includes: Python calls the pymongo library to store key information into a MongoDB database. The stored fields include frame ID, original video address, labeled video address, key image address, timestamp, storage interval type, target type, recognition result JSON, target category - subcategory, and clothing color of the person. Step 7 specifically includes: Develop a search page that supports three types of queries: search by target major category - subcategory; Search by clothing color; Search by time range; search results return image previews, storage addresses, video links, and structured recognition details.
10. A power scene intelligent monitoring and image intelligent filtering and saving system, characterized in that, include: The video input module, C++ video decoding and frame extraction module, YOLOv7 recognition and feature extraction module, JSON generation module, video encoding and merging module, Python image filtering module, data entry module, and retrieval page are connected sequentially. The video input module is used to acquire the video file to be processed, the real-time stream, the image save time interval type, and the type of the target of interest; The C++ video decoding and frame extraction module is used to decode video by calling the OpenCV library in C++, and to obtain information such as total number of frames, frame rate (FPS), and resolution, based on the formula... Calculate the first Frame index corresponding to each time interval ,in For video frame rate, Set the time interval for saving images; extract each frame of the video sequentially, convert it to JPG / PNG format and store it in the local cache directory, assign a unique frame ID to each frame, and associate it with the video timestamp and frame index basic information; The YOLOv7 recognition and feature extraction module is used for model invocation and target classification; it is also used for feature supplementation and extraction. The JSON generation module is used to convert the recognition results of each frame of the cached frame into JSON format, and store them by associating them with the corresponding image file through the frame ID; The video encoding and merging module is used to call the OpenCV library in C++ to overlay the original frames and recognition annotations after all frames have been recognized and generated into JSON. It then encodes and generates the "recognized and annotated video" in the original time order, stores it in the specified directory, and records the storage address. The Python image filtering module is used for intelligent image filtering and saving. The data entry module is used by Python to call the pymongo library to store key information into the MongoDB database. The storage fields include frame ID, original video address, labeled video address, key image address, timestamp, save interval type, target type, recognition result JSON, target category - subcategory, and clothing color of the person. The search page supports three types of queries: searching by target category - subcategory; Search by clothing color; Search by time range; search results return image previews, storage addresses, video links, and structured recognition details.