Intrusion detection method and device based on self-learning
Through the self-learning intrusion detection method, environmental color blocks and object color blocks are constructed, and features are extracted and classified, the problem of existing security monitoring cameras requiring complex coding rules and inaccurate alarms in intrusion detection is solved, and high flexibility and high accuracy intrusion detection is achieved.
Patent Information
- Application Number
- PCT/CN2023/128123
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-22
- Filing Date
- 2023-10-31
- Publication Date
- 2025-03-27
AI Technical Summary
Existing security surveillance cameras require complex coding rules and inaccurate and timely alarms when conducting intrusion detection.
The intrusion detection method based on self-learning is adopted to construct environmental color blocks and object color blocks, extract the classification characteristics of the object color blocks, and classify and intrusion judgments are carried out according to preset classification rules to achieve rapid detection and alarm.
It improves the flexibility and accuracy of regional intrusion detection, reduces the false alarm rate of alarm information, improves the reliability and accuracy of alarm information, and lowers the threshold for use.
Smart Images

Figure CN2023128123_27032025_PF_FP_ABST
Abstract
Description
A self-learning-based intrusion detection method and device
Technical field
[0001] The present invention relates to the technical field of video surveillance, and in particular to an intrusion detection method and device based on self-learning. [Background Technology]
[0002] In the field of image communication, cameras provide crucial support for security and other aspects of our living environments. Where security cameras are installed, footage captured by cameras can be used to identify clues and reconstruct the scene after a crime or accident. Intrusion detection is a technology used in video surveillance systems to detect unauthorized activity or incidents within a specific area. Typically, these areas can be buildings, garages, offices, or other security-sensitive areas. Intrusion detection can identify behaviors such as dropping objects from high places, breaching security lines, crossing fences, and entering restricted areas.
[0003] Currently, cameras using this technology can be roughly divided into two categories. One is standard cameras, which lack algorithms and rules and only support post-event review and reconsideration after a crime or accident. The other is surveillance cameras, which support real-time alarms based on captured images or videos. However, these cameras often require complex coding from the manufacturer, and users often need professional training to set camera alarm rules or parameters. Furthermore, any changes in the camera's usage scenario or other alarm requirements require the camera to be returned to the manufacturer for new algorithm coding.
[0004] It can be seen that existing security surveillance cameras for intrusion detection still have problems such as requiring complex coding rules and inaccurate and untimely alarms.
[0005] [Summary of the invention]
[0006] The present invention provides an intrusion detection method and device based on self-learning, which are used to solve the problems in the prior art that security monitoring cameras for intrusion detection require complex coding configuration and are dependent on the scene. The intrusion detection method based on self-learning can realize rapid accident detection and alarm that is not limited to the usage scene and is easy to use.
[0007] The present invention provides an intrusion detection method based on self-learning, characterized by comprising:
[0008] Construct an environmental color block based on a collection of pixels at the same position in multiple frames of images;
[0009] Performing pixel difference processing on the target image and the environment color block to obtain an object color block, wherein the object color block is an island in the object image generated by a set of adjacent pixel points in the pixel difference set;
[0010] Extracting classification features of the object color block, classifying the classification features according to preset classification rules, and obtaining a classification result;
[0011] An intrusion determination is performed based on the classification result to obtain an intrusion detection result.
[0012] Further, after obtaining the intrusion detection result, the method includes the steps of:
[0013] If the intrusion detection result of the classification result is that it belongs to regional intrusion, an alarm message is generated;
[0014] If the intrusion detection result of the classification result is that it does not belong to regional intrusion, the classification feature corresponding to the object color block is stored in a false alarm database.
[0015] Further, performing intrusion determination and confirmation on the object color block corresponding to the alarm information to obtain a determination and confirmation result;
[0016] updating the classification features and preset classification rules corresponding to the object color block according to the determination and confirmation result;
[0017] If the determination result confirms that the area intrusion is true, the object color block is added to the image database corresponding to the classification result; and the preset classification rule is updated according to the classification rule corresponding to the classification result;
[0018] If the determination result is that the area intrusion is not true, the object color block is stored in a false alarm database.
[0019] Furthermore, the step of constructing the environment color block based on a set of pixels at the same position in multiple frames of images includes the following steps:
[0020] Obtain multiple frames of images and perform fuzzy processing to obtain a set of image pixels;
[0021] Comparing the pixel points of each picture in the picture pixel set to obtain an environment pixel set;
[0022] Obtaining the environment pixel set includes: recording and intercepting position information of identical pixels in the image pixel set to generate the environment pixel set;
[0023] Based on the environment pixel set, a picture is generated to obtain an environment color block.
[0024] Furthermore, the fuzzification process includes:
[0025] Every n*n pixels are merged into a target pixel, and the RGB values of the target pixel are the arithmetic average of the RGB values of the n*n pixels.
[0026] Furthermore, obtaining the object color block includes the steps of:
[0027] Performing a difference operation on the pixel point set of the target image and the pixel point set of the ambient color block to obtain an object pixel point set; wherein the object pixel point set is one or more non-overlapping pixel point sets in the pixel difference set;
[0028] Generate object color blocks in an image based on a set of object pixels.
[0029] Furthermore, the classification features include:
[0030] Position information, size information, color information, and quantity information.
[0031] In a second aspect, the present invention further provides an intrusion detection device based on self-learning, characterized in that it includes: an environment image processing module for constructing an environment color block based on a set of pixels at the same position in multiple frames of images;
[0032] An object image processing module is used to perform pixel difference processing on the target image and the environment color block to obtain an object color block, where the object color block is an island in the object image generated by a set of adjacent pixel points in the pixel difference set;
[0033] An image classification module is used to extract classification features of the object color blocks, classify the classification features according to preset classification rules, and obtain classification results;
[0034] The intrusion determination module is used to perform intrusion determination based on the classification result to obtain an intrusion detection result.
[0035] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-described self-learning intrusion detection methods when executing the program.
[0036] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the self-learning intrusion detection methods described above.
[0037] The self-learning intrusion detection method and device provided by the present invention obtains environmental color blocks by performing similarity comparison on multiple frames of images. Then, pixel difference processing is performed on the target image and the environmental color blocks to obtain the object color blocks. Classification features of the object color blocks are extracted and classified according to preset classification rules to obtain classification results. Intrusion determination is then performed based on the classification results to obtain intrusion detection results. This significantly improves the flexibility and accuracy of regional intrusion detection.
[0038] The present invention confirms intrusion detection based on the object color block corresponding to the alarm information, further verifying the authenticity of the alarm information. This reduces the false alarm rate and improves the reliability of the alarm information. Furthermore, the system updates the preset classification rules in real time based on the classification rules corresponding to the object color block classification results, allowing for real-time adjustment and optimization of the alarm information based on feedback, further improving the reliability and accuracy of the alarm information. This effectively solves the problems of existing security surveillance cameras for intrusion detection requiring complex coding rules and inaccurate and untimely alarms. The system has a very low barrier to entry and does not require complex training.
Brief Description of the Drawings
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] FIG1 is a schematic diagram of a process of a self-learning intrusion detection method provided by the present invention;
[0041] FIG2 is a schematic structural diagram of an electronic device provided by the present invention. [Specific implementation method]
[0042] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0043] Regional intrusion detection: A variant of intrusion detection technology within the video surveillance field, it specifically detects intrusions in specific areas of a video image, such as objects thrown from high places within a surveillance area. This technology typically combines computer vision and image processing algorithms to analyze video images in real time to determine whether a specific area has been invaded or disturbed.
[0044] Self-learning technology: Based on the principles of machine learning and pattern recognition, it aims to automatically infer useful information from large amounts of input data and make decisions, predictions, or classifications based on this information. The key to self-learning is that it adapts and adjusts itself through a data-driven approach without the need for explicit programming.
[0045] The following describes the self-learning intrusion detection method and device provided by the embodiments of the present invention in conjunction with Figures 1 and 2.
[0046] FIG1 is a flow chart of the self-learning intrusion detection method provided by the present invention, as shown in FIG1 , including but not limited to the following steps:
[0047] Step 101: Construct an environment color block based on a set of pixels at the same position in multiple frames of images.
[0048] The multiple frames of images may be captured by a camera. After the camera is started, a video stream is captured. When the video stream contains at least two frames of images, the frames are compared to extract the same pixels as the ambient color blocks.
[0049] It should be noted that thereafter, two or more frames of captured images may be reselected at regular intervals to perform comparison and update the environment color block.
[0050] Specifically, the input image frame is divided into several color block frames (also called several image labels / several image features, in layman's terms, an image is divided into several small images, each of which includes an object). The pixels of each image in the captured image frame set are compared, and the positions of the same pixels in the image frame set are recorded and intercepted. This set of same pixels is called the environmental pixel set, which usually does not change. The image in the environmental image generated by this environmental pixel set is the environmental color block.
[0051] Optionally, you can also select a picture as the ambient color block based on specific needs.
[0052] Step 102: Perform pixel difference processing on the target image and the environment color block to obtain the object color block.
[0053] Among them, the object color block is an island in the object image generated by the set of adjacent pixel points in the pixel difference set.
[0054] In this embodiment, when an object enters the monitoring area, the camera captures the target image and compares it with the environmental color block. The captured target image and the environmental image are processed to obtain the pixel difference set, and the adjacent pixel set in the difference set is extracted as the captured object color block, where the object color block is an island in the object image generated by the set of adjacent pixel points in the pixel difference set (a connected area composed of adjacent pixels).
[0055] Optionally, a picture may be selected as the object color block according to specific needs.
[0056] Step 103: extracting classification features of the object color block, classifying the classification features according to preset classification rules, and obtaining classification results.
[0057] In this embodiment, the preset parameters of the classification feature include but are not limited to the position information, color information, size information and quantity information of the image.
[0058] Specifically, firstly, all classification features of the object color blocks in the image are extracted according to the preset classification rules.
[0059] For example: Category 1 Image 1: Color block a [position coordinates (x, y) is (100, 100), color RGB is (255, 255, 255), size is (100*20), quantity is 1];
[0060] Category 1 image 2: b color block [position (x, y) is (100, 100), color RGB is (255, 225, 255), size is (100*20), number is 1].
[0061] Among them, the preset classification rules can be determined in advance based on the two pictures of category 1 and the records of historical regional invasions belonging to category 1 by constructing a data analysis model to predetermine the classification rules. For example, after analysis through a decision tree or random forest model, the classification rules that meet the requirements of this category 1 picture are predetermined, for example: color blocks a or b appear in a fixed position, have the same color and size, and are 1 in number.
[0062] Optional, category 2 image 1: c color block [position (x, y) is (100, 100), color RGB is (255, 255, 255), size is (400*20), number is 1];
[0063] Category 2 image 2: color block c [position (x, y) is (110, 100), color RGB is (155, 155, 255), size is (10*20), number is 3];
[0064] Category 2 image 3: c color block [position (x, y) is (400, 100), color RGB is (155, 205, 355), size is (300*20), number is 5].
[0065] Optionally, you can determine your own preset classification rules. For example, after analyzing the three images of category 2, you can select a classification rule that meets the requirements of category 2, such as: color block c appears in a non-fixed position, with no color requirements, no size requirements, and no limit on the number. Based on the preset classification rules, the classification features extracted from the object color blocks are classified to obtain a classification result, where the classification result includes belonging to category 1, category 2, or category n.
[0066] It is worth noting that, in theory, the more images collected and analyzed under different classifications, the higher the accuracy of regional intrusion identification. At the same time, classification supports direct editing of preset parameters in preset classification rules, such as unlimited size, quantity requirements, color requirements, location requirements, the appearance of certain color blocks, etc. Therefore, the flexibility and accuracy of regional intrusion detection are greatly improved.
[0067] Step 104: Perform intrusion determination based on the classification result to obtain an intrusion detection result.
[0068] In this embodiment, an intrusion determination is performed based on the above classification results to obtain an intrusion detection result, wherein the intrusion determination result includes whether it is a regional intrusion or not.
[0069] Based on the contents of the above embodiments, as an optional embodiment, the self-learning intrusion detection method provided by the present invention includes the following steps after obtaining the intrusion detection results: if the intrusion detection result of the classification result is that it belongs to regional intrusion, an alarm message is generated; if the intrusion detection result of the classification result is that it does not belong to regional intrusion, the classification features corresponding to the object color block are stored in the false alarm database.
[0070] In this example, after feature extraction of the object color blocks corresponding to the target image captured by the camera, the object color blocks corresponding to the captured target image or the video containing the target image can be automatically classified, where the intrusion detection results of the classification results include regional intrusion and non-regional intrusion.
[0071] For target images or videos classified as area intrusion, an alarm message is generated. For target images or videos that do not belong to area intrusion, the classification features corresponding to the object color blocks in the target images are stored in the false alarm database.
[0072] Based on the above embodiments, as an optional embodiment, the self-learning intrusion detection method provided by the present invention further includes: performing an intrusion determination and confirmation on the object color block corresponding to the alarm information, obtaining a determination and confirmation result, and updating the classification features and preset classification rules corresponding to the object color block based on the determination and confirmation result. If the determination and confirmation result confirms that an area intrusion is true, the object color block is added to the image database corresponding to the classification result; and the preset classification rules are updated based on the classification rules corresponding to the classification features. If the determination and confirmation result confirms that an area intrusion is false, the object color block is stored in a false alarm database.
[0073] In this embodiment, after receiving the alarm information, an intrusion determination and confirmation is performed on the object color block whose intrusion detection result indicates that the object color block belongs to the regional intrusion to obtain a determination and confirmation result.
[0074] Specifically, after verifying the authenticity of the alarm through a detection algorithm model or manual verification, the determination and confirmation result of the object color block is obtained. The classification features and preset classification rules corresponding to the object color block are updated based on the determination and confirmation result.
[0075] When the confirmation result is determined to be an area intrusion, the object color block is added to the image database corresponding to the classification result; and the preset classification rules are updated according to the classification rules corresponding to the classification result.
[0076] If the result of the confirmation is that the regional intrusion is not true, the object color block is stored in the false alarm database.
[0077] By confirming the intrusion judgment of the object color block corresponding to the alarm information, that is, further verifying the authenticity of the alarm information, the false alarm rate of the alarm information can be reduced and the reliability of the alarm information can be improved. By updating the preset classification rules corresponding to the classification results of the object color block in real time, the alarm information can be adjusted and optimized in real time according to the feedback, further improving the reliability and accuracy of the alarm information.
[0078] Based on the contents of the above embodiments, as an optional embodiment, the self-learning intrusion detection method provided by the present invention is based on a set of pixels at the same position in multiple frames of pictures, and constructs an environmental color block, including the steps of: obtaining multiple frames of pictures and performing fuzzy processing to obtain a picture pixel set; comparing the pixel points of each picture in the picture pixel set to obtain an environmental pixel set; obtaining the environmental pixel set includes: recording and intercepting the position information of the same pixels in the picture pixel set to generate an environmental pixel set; based on the environmental pixel set, generating a picture to obtain an environmental color block.
[0079] Step 1: Extract image frames and obtain a set of at least two image frames captured by the camera at different times;
[0080] Step 2: Fuzzy the image frame to obtain a set of image pixels.
[0081] Specifically, due to environmental factors or camera shake, the image of the same object in a camera capture and in a computer pixel representation is often different. The present invention provides a method for image blurring: Each n*n pixel is merged into a single pixel, and the RGB value of this pixel is the arithmetic mean of the RGB values of the n*n pixels. Multiple frames of images are blurred using this method to obtain a pixel set.
[0082] It is worth noting that the smaller n is, the higher the degree of restoration of the generated image. When n is 4, the pixels of a 400*400 image after blurring are 100*100, and the degree of restoration is 1 / 16. When n is infinite, the higher the calculated similarity of the image, the lower the corresponding accuracy.
[0083] The input image frame is divided into several color block frames (also called several image labels / several image features, in layman's terms, an image is divided into several small images, each of which includes an object). The pixels of each image in the captured image frame set are compared, and the positions of the same pixels in the image frame set are recorded and intercepted. This set of identical pixels is called the environmental pixel set and usually does not change.
[0084] Step 3: Compare the pixels of each image in the image pixel set to obtain the environment pixel set.
[0085] Specifically, a pixel consists of a position (x, y) and a color (r, g, b). Comparison requires comparing both position and color. An image typically consists of multiple pixels in the RGB standard. In this embodiment, for two images with the same pixel, the (r, g, b) values of the same pixel (x, y) are directly compared. For two images with different pixels, the images must be cropped to the same pixel before comparison.
[0086] The step of obtaining the environment pixel set includes recording and intercepting position information of identical pixels in the image pixel set to generate the environment pixel set.
[0087] Specifically, the pixel points of each picture in the picture frame set are compared and blurred, and the positions of the same pixels in the picture frame set are recorded and intercepted. This set of same pixels is called the environment pixel set and usually does not change (in this case, if the environment pixel set is output to the picture, the image in the picture is called the environment color block).
[0088] Step 4: Based on the environment pixel set, generate a picture to obtain an environment color block.
[0089] Specifically, the environment pixel set is output as an image to obtain an environment color block.
[0090] Based on the content of the above embodiment, as an optional embodiment, the self-learning intrusion detection method provided by the present invention for obtaining an object color block includes the following steps:
[0091] Perform a difference operation on the pixel point set of the target image and the pixel point set of the ambient color block to obtain the object pixel point set, where the object pixel point set is one or more non-overlapping pixel point sets in the pixel difference set; input the object pixel point set as an image to obtain the object color block.
[0092] In this embodiment, a difference operation is performed on the pixel point set of the target image and the pixel point set of the ambient color block to obtain the object pixel point set. After the operation, one or more non-overlapping pixel point sets will be generated, and each independent pixel point set is called an object pixel set (at this time, if the calculated pixel point set is output to the image, the isolated island in the image is called an object color block).
[0093] In order to explain the above solution in more detail, the following example uses the high-altitude object throwing video alarm as an application scenario.
[0094] In this embodiment, a security monitoring camera is selected for implementation, and the security monitoring camera includes a base, a steering hub, a protective cover and a body. The security monitoring camera is responsible for collecting pictures and videos.
[0095] S1: Install the camera and connect the power supply, waiting for the security camera system to start;
[0096] S2: After the camera is started, it will capture the video stream. When the video stream contains at least two image frames, it will start comparing frames to extract the same pixels as the environmental color block. After that, it will re-select two or more captured images for comparison and update the environmental color block at regular intervals. Optionally, this color block can also be uploaded directly by the user.
[0097] Among them, the method of extracting the environmental color block includes:
[0098] a) Extract image frames and obtain a set of at least two image frames captured by the camera at different times;
[0099] b): Fuzzy the image frame to obtain a set of image pixels.
[0100] Specifically, due to environmental factors or camera shake, the image of the same object in a camera capture and in a computer pixel representation is often different. The present invention provides a method for image blurring: Each n*n pixel is merged into a single pixel, and the RGB value of this pixel is the arithmetic mean of the RGB values of the n*n pixels. Multiple frames of images are blurred using this method to obtain a pixel set.
[0101] It is worth noting that the smaller n is, the higher the degree of restoration of the generated image. When n is 4, the pixels of a 400*400 image after blurring are 100*100, and the degree of restoration is 1 / 16. When n is infinite, the higher the calculated similarity of the image, the lower the corresponding accuracy.
[0102] The input image frame is divided into several color block frames (also called several image labels / several image features, in layman's terms, an image is divided into several small images, each of which includes an object). The pixels of each image in the captured image frame set are compared, and the positions of the same pixels in the image frame set are recorded and intercepted. This set of identical pixels is called the environmental pixel set and usually does not change.
[0103] c): Compare the pixels of each image in the image pixel set to obtain the environment pixel set.
[0104] Specifically, a pixel consists of a position (x, y) and a color (r, g, b). Comparison requires comparing both position and color. An image typically consists of multiple pixels in the RGB standard. In this embodiment, for two images with the same pixel, the (r, g, b) values of the same pixel (x, y) are directly compared. For two images with different pixels, the images must be cropped to the same pixel before comparison.
[0105] The step of obtaining the environment pixel set includes recording and intercepting position information of identical pixels in the image pixel set to generate the environment pixel set.
[0106] Specifically, the pixel points of each picture in the picture frame set are compared and blurred, and the positions of the same pixels in the picture frame set are recorded and intercepted. This set of same pixels is called the environment pixel set and usually does not change (in this case, if the environment pixel set is output to the picture, the image in the picture is called the environment color block).
[0107] d): Based on the environmental pixel set, generate a picture to obtain an environmental color block.
[0108] S3: The user creates a custom category (high-altitude objects) on a computer or mobile device and selects a video trigger to generate an alarm. Then, the user selects several videos of objects dropped from high altitude within the category and saves them. The system converts the received video into image frames and compares them with the ambient color blocks. The pixel difference between the captured image pixels and the set of ambient pixels in the ambient color blocks extracted in S2 is calculated. The adjacent pixel set in the difference is the object color block. Optionally, this color block can also be uploaded directly by the user.
[0109] Method for extracting user-defined classification features: The preset parameters of classification features include but are not limited to: position, color, size, and quantity. First, extract all the classification features of the object color blocks in the user-submitted video, for example:
[0110] Category 1 Video 1:
[0111] Frame 00:00:01: Color block a [position (x, y) is (100, 100), color RGB is (255, 255, 255), size is (100*20), number is 1];
[0112] Frame 00:00:02: Color block a [position (x, y) is (100, 120), color RGB is (255, 255, 255), size is (100*20), number is 1];
[0113] Frame 00:00:03: Color block a [position (x, y) is (100, 130), color RGB is (255, 255, 255), size is (100*20), number is 1];
[0114] Category 1 Video 2:
[0115] Frame 01:00:52: b color block [position (x, y) is (200, 100), color RGB is (255, 125, 255), size is (100*20), number is 2];
[0116] Frame 01:00:53: b color block [position (x, y) is (200, 300), color RGB is (255, 125, 255), size is (100*20), number is 1];
[0117] Based on the two videos of category 1 and their aforementioned features, a computer analysis determined that the classification rules for videos meeting category 1 are as follows: any color block, increasing position y values, varying colors, sizes, and quantities. Those skilled in the art may make adaptive adjustments as needed, and the present invention is not limited thereto.
[0118] It is worth noting that, in theory, the more videos users submit under a category, the higher the accuracy of the algorithm. At the same time, the category supports users to directly edit preset parameters, such as unlimited size, quantity requirements, color requirements, position requirements, the appearance of certain color blocks, etc.
[0119] S4: When an object is thrown from a high altitude, the camera captures a video frame and compares it with the environmental color block. The pixel difference between the frame and the environmental image is processed, and the adjacent pixel set in the difference set is extracted as the color block of the captured object.
[0120] The S3 method for extracting user-defined classification features is used to extract all classification features of the object color blocks in the camera-captured video frame. The S3 classification rules are used to classify this video classification feature and find that it belongs to category 1 (objects thrown from high altitude). At this time, the image processing system sends this information to the user interaction method, which notifies the user.
[0121] S5: After receiving the alarm, the user verifies the authenticity of the alarm information. Optionally, the classification features and classification rules are updated based on the authenticity of the alarm information fed back by the user.
[0122] In summary, the camera captures pictures and videos, and after the user classifies a small number of captured pictures, the camera learns the classification features. When capturing pictures and videos again, it can automatically extract features and compare them with the user's classified picture features, automatically classify the pictures and videos, and issue alarms for pictures and videos that are or are not in the user's classification. After receiving user feedback, it can perform self-learning to improve alarm accuracy. The method provided by the present invention allows the user to classify a small number of pictures and videos captured by the camera. After the camera extracts features from the classification, it can automatically classify and issue alarms for subsequent pictures and videos. This can effectively solve the problems of existing security monitoring cameras for intrusion detection requiring complex coding rules and inaccurate and untimely alarms.
[0123] On the other hand, the present invention also provides an intrusion detection device based on self-learning, which includes: an environment image processing module, an object image processing module, an image classification module and an intrusion determination module.
[0124] The environment image processing module is used to construct an environment color block based on a set of pixels at the same position in multiple frames of images.
[0125] The object image processing module is used to perform pixel difference processing on the target image and the environment color block to obtain the object color block.
[0126] Among them, the object color block is an island in the object image generated by the set of adjacent pixel points in the pixel difference set.
[0127] The image classification module is used to extract the classification features of the object color blocks, classify the classification features according to the preset classification rules, and obtain the classification results.
[0128] The intrusion judgment module is used to make intrusion judgments based on the classification results and obtain intrusion detection results.
[0129] It should be noted that the self-learning intrusion detection device provided in the embodiment of the present invention can execute the self-learning intrusion detection method of any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0130] FIG2 is a schematic diagram of the structure of an electronic device provided by the present invention. As shown in FIG2 , the electronic device may include: a processor 210, a communication interface 220, a memory 230, and a communication bus 240, wherein the processor 210, the communication interface 220, and the memory 230 communicate with each other via the communication bus 240. The processor 210 may call the logic instructions in the memory 230 to execute a self-learning intrusion detection method, which includes: obtaining multiple frames of images for similarity comparison to obtain an environmental color block, where the environmental color block is an image in the environmental image generated by a collection of pixels at the same position in the multiple frames of images; performing pixel difference processing on the target image and the environmental color block to obtain an object color block, where the object color block is an island in the object image generated by a collection of adjacent pixels in the pixel difference set; extracting classification features of the object color block, classifying the classification features according to preset classification rules, and obtaining a classification result; performing intrusion determination based on the classification result to obtain an intrusion detection result.
[0131] In addition, the logic instructions in the above-mentioned memory 230 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0132] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the self-learning intrusion detection method provided by the above-mentioned embodiments, the method comprising: obtaining multiple frames of images for similarity comparison to obtain an environmental color block, which is an image in the environmental image generated by a set of pixels at the same position in the multiple frames of images; performing pixel difference processing on the target image and the environmental color block to obtain an object color block, which is an island in the object image generated by a set of adjacent pixel points in the pixel difference set; extracting classification features of the object color block, classifying the classification features according to preset classification rules, and obtaining a classification result; performing intrusion judgment based on the classification result to obtain an intrusion detection result.
[0133] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include a ..." do not exclude the presence of other identical elements in the process, method, article or device comprising the elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A self-learning-based intrusion detection method, characterized in that: include: Based on the set of pixels at the same position in multiple frames, an environmental color block is constructed; Performing pixel difference set processing on the target image and the environment color block to obtain an object color block, wherein the object color block is an island in the object image generated by a set of adjacent pixel points in the pixel difference set; Extracting classification features of the color blocks of the object, classifying the classification features according to preset classification rules, and obtaining classification results; An intrusion determination is performed based on the classification result to obtain an intrusion detection result.
2. The self-learning intrusion detection method according to claim 1, characterized in that: The steps include: If the intrusion detection result of the classification result is that it belongs to regional intrusion, an alarm message is generated; If the intrusion detection result of the classification result is not a regional intrusion, the classification feature corresponding to the object color block is stored in a false alarm database.
3. The self-learning intrusion detection method according to claim 2, characterized in that: Also includes: Performing intrusion determination and confirmation on the object color block corresponding to the alarm information to obtain a determination and confirmation result; updating the classification features and preset classification rules corresponding to the object color block according to the determination and confirmation result; If the determination confirmation result is that the regional invasion is true, then the object color block is added to the image database corresponding to the classification result; and updating the preset classification rule according to the classification rule corresponding to the classification result; If the determination confirmation result is that the area intrusion is not true, the object color block is stored in the false alarm database.
4. The self-learning intrusion detection method according to claim 1, characterized in that: The step of constructing the environment color block based on a set of pixels at the same position in multiple frames of pictures includes the following steps: Obtain multiple frames of images and perform fuzzy processing to obtain a set of image pixels; Compare the pixel points of each picture in the picture pixel set to obtain an environment pixel set; The obtaining of the environment pixel set includes: recording and intercepting the position information of the same pixels in the picture pixel set to generate the environment pixel set; Based on the environment pixel set, a picture is generated to obtain an environment color block.
5. The self-learning intrusion detection method according to claim 4, characterized in that: The fuzzification process includes: Every n*n pixels are merged into a target pixel, and the RGB values of the target pixel are the arithmetic averages of the RGB values of the n*n pixels.
6. The self-learning intrusion detection method according to claim 1, characterized in that: The step of obtaining the object color block comprises: Performing a difference operation on the pixel point set of the target image and the pixel point set of the ambient color block to obtain an object pixel point set; wherein the object pixel point set is one or more non-overlapping pixel point sets in the pixel difference set; Generate object color blocks in the image based on the object pixel set.
7. The self-learning intrusion detection method according to claim 1, characterized in that: The classification features include: Position information, size information, color information, and quantity information.
8. An intrusion detection device based on self-learning, characterized in that: include: The environment image processing module is used to construct the environment color block based on the set of pixels at the same position in multiple frames of pictures; An object image processing module is used to perform pixel difference set processing on the target image and the environment color block to obtain the object color block, wherein the object color block is an island in the object image generated by a set of adjacent pixel points in the pixel difference set; An image classification module is used to extract classification features of the object color blocks, classify the classification features according to preset classification rules, and obtain classification results; The intrusion determination module is used to perform intrusion determination based on the classification result to obtain an intrusion detection result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the self-learning intrusion detection method according to any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the self-learning intrusion detection method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Intrusion detection method based on scene recognition
CN103152558A
Dynamic image background removing method and system and computer readable storage device
CN108269260A
Video compression method and device and storage medium
CN112581489A
Wake-up method for surveillance camera, surveillance camera, and non-transitory computer-readable storage medium
US20230269462A1
Cited By
Personnel intrusion detection method based on artificial intelligence loading system
CN121438231A