A motion detection method based on video monitoring and electronic equipment

By employing low-resolution image processing and gridded feature extraction in video surveillance equipment, combined with a deep learning model, the false alarm problem of end-side equipment was solved, achieving efficient and robust moving target detection.

CN122454486APending Publication Date: 2026-07-24AXERA SEMICON (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AXERA SEMICON (SHANGHAI) CO LTD
Filing Date
2026-05-21
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing video motion detection methods are easily affected by environmental interference such as changes in lighting, rain, snow, and flying insects in edge devices, leading to false alarms. They also consume a lot of computing resources and are difficult to deploy effectively.

Method used

By employing low-resolution image processing and gridded feature extraction, combined with a deep learning model, motion detection results are generated through similarity calculation, reducing computational and storage overhead and improving robustness.

Benefits of technology

It significantly reduces the false alarm rate, optimizes algorithm efficiency, is suitable for edge monitoring equipment with limited computing power, and provides reliable information on the area of ​​moving targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122454486A_ABST
    Figure CN122454486A_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and provides a motion detection method based on video monitoring and an electronic device.The motion detection method comprises the following steps: acquiring continuous video frame images collected by a video monitoring device, and converting the continuous video frame images into target images with low resolution; dividing the target images into a plurality of grid regions, and extracting image features in the grid regions; performing similarity calculation on the image features of a current frame and the image features of corresponding positions in historical frames, generating a motion detection result for indicating whether motion changes exist in the grid regions according to the similarity values obtained through the similarity calculation; and based on the motion detection result, extracting continuous motion regions in the grid regions, and generating a motion target region. The image features of the grid are extracted by using a deep learning model and are compared in terms of feature vectors, so that the traditional pixel-level comparison is replaced, thereby excellent robustness is achieved against interference such as illumination changes and small background disturbances, and the false alarm rate can be significantly reduced from the source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a motion detection method and electronic device based on video surveillance. Background Technology

[0002] Video motion detection is a key technology in computer vision and intelligent monitoring systems. It is mainly used to automatically identify moving targets from continuous video frames and is the foundation for advanced applications such as intelligent alarms and behavior analysis.

[0003] Existing mainstream solutions, such as background subtraction, inter-frame difference, optical flow, and deep learning methods, all face significant challenges when applied to edge monitoring scenarios (such as camera devices) with limited computing power.

[0004] When dealing with dynamic interferences commonly encountered in real-world environments, such as changes in lighting, rain and snow, insect interference, and wind blowing leaves, the system is prone to generating a large number of false alarms because it generally relies on direct comparison of underlying information such as pixel brightness and color. Summary of the Invention

[0005] This application provides a motion detection method and electronic device based on video surveillance, which can realize motion target detection under the constraint of limited computing resources on the edge and overcome false alarms caused by subtle changes in the environment.

[0006] This application provides a motion detection method based on video surveillance, comprising: Acquire continuous video frame images captured by video surveillance equipment and convert the continuous video frame images into low-resolution target images; The target image is divided into multiple grid regions, and image features within each grid region are extracted. The similarity between the image features of the current frame and the image features of the corresponding positions in historical frames is calculated, and based on the similarity value, a motion detection result is generated to indicate whether there is motion change in the grid area. Based on the motion detection results, continuous motion regions within the grid area are extracted to generate motion target regions.

[0007] In one possible implementation, the step of converting consecutive video frame images into a low-resolution target image includes: Spatial resolution downsampling is performed on consecutive video frames to generate the target image.

[0008] In one possible implementation, the step of dividing the target image into multiple grid regions includes: Divide the target image into a first number of grids along a first direction, and divide the target image into a second number of grids along a second direction; Wherein, the first direction is the direction of motion of the moving target, the second direction is perpendicular to the first direction, and the first quantity is greater than the second quantity.

[0009] In one possible implementation, the first quantity is The second quantity is , First quantity The second quantity is used to detect the inter-frame motion displacement of moving targets. Size filtering for controlling moving targets.

[0010] In one possible implementation, the step of extracting image features within the grid region includes: A deep learning feature extraction model is used to process the grid region and output image features of fixed dimensions.

[0011] In one possible implementation, the step of calculating the similarity between the image features of the current frame and the image features at corresponding positions in historical frames includes: Calculate the similarity value between the image feature vector of the grid in the i-th row and j-th column of the current frame and the feature vector of the grid in the i-th row and j-th column of the historical frame.

[0012] In one possible implementation, the step of generating motion detection results for the grid region based on the similarity calculation results includes: If the similarity value is less than a preset threshold, the motion detection result is set to the first state, which indicates that there is motion change within the grid area; If the similarity value is greater than or equal to a preset threshold, the motion detection result is set to the second state, which indicates that there is no motion change within the grid area.

[0013] In one possible implementation, the step of extracting continuous motion regions within a grid area and generating a motion target region based on motion detection results includes: Perform connected component analysis on the grid region in the first state and extract continuous grid regions as candidate motion regions; If the number of grid regions in the candidate motion region is greater than or equal to the preset number, the candidate motion region is determined as the motion target region.

[0014] In one possible implementation, the interval between the current frame and the historical frame is n frames, where n is an integer greater than or equal to 1. The interval frame number n is a configurable parameter used to adjust the sensitivity of motion detection.

[0015] This application also provides an electronic device, including: Memory, used to store instructions; The processor is used to invoke the instructions stored in memory for the aforementioned motion detection method.

[0016] This application provides a motion detection method and electronic device based on video surveillance. The motion detection method includes: acquiring continuous video frame images collected by a video surveillance device and converting the continuous video frame images into low-resolution target images; dividing the target images into multiple grid regions and extracting image features within the grid regions; calculating the similarity between the image features of the current frame and the image features at corresponding positions in historical frames, and generating a motion detection result indicating whether there is motion change in the grid regions based on the similarity value calculated; and extracting continuous motion regions within the grid regions based on the motion detection result to generate motion target regions.

[0017] In this way, by using a deep learning model to extract image features from the grid and comparing feature vector similarity instead of traditional pixel-level comparison, it exhibits excellent robustness to interferences such as changes in illumination and minor background disturbances, significantly reducing the false alarm rate from the source. At the same time, by downsampling the image and dividing it into a grid for sparse processing, the computational and storage overhead is greatly reduced, optimizing the algorithm efficiency while ensuring detection accuracy. This makes the motion detection method applicable to edge monitoring equipment with limited computing power. Furthermore, the two-stage processing of generating grid-level motion markers through feature comparison and then aggregating and extracting continuous motion regions can output complete and practical information on the moving target region, providing a direct and reliable foundation for subsequent analysis. Attached Figure Description

[0018] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 A flowchart illustrating a motion detection method based on video surveillance provided in this application embodiment. Figure 1 .

[0020] Figure 2 A flowchart illustrating a motion detection method based on video surveillance provided in this application embodiment. Figure 2 .

[0021] Figure 3 A flowchart illustrating a motion detection method based on video surveillance provided in this application embodiment. Figure 3 .

[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of this application.

[0024] It should be noted that many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.

[0025] In this application, the use of terms such as "first," "second," etc., is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features.

[0026] The various embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0027] This application relates to video motion detection, a key technology in computer vision and intelligent surveillance systems. Existing mainstream technologies include background subtraction, inter-frame differencing, optical flow, and deep learning methods. Background subtraction is sensitive to dynamic backgrounds (such as lighting changes and shadows) and requires continuous updates to the background model. Inter-frame differencing is prone to producing holes within moving targets and is insensitive to slowly moving targets. Optical flow has high computational complexity, is sensitive to noise, and is difficult to deploy on edge devices. While deep learning-based methods offer good detection results, they rely on large amounts of labeled data, consume significant computational resources, and have high deployment costs.

[0028] In practical edge-side applications (such as camera devices), due to limited computing power, background subtraction or inter-frame differencing methods are mainly used. These methods are prone to generating a large number of false alarms when dealing with scenarios such as rain, snow, insect interference, sudden changes in light, and wind blowing leaves. To solve these false alarms, the conventional approach is to add corresponding post-processing patch strategies for each cause of the false alarm. This leads to increasingly complex and conflicting strategies, consuming a lot of development and maintenance resources, with limited improvement in effectiveness.

[0029] Therefore, this application addresses how to fundamentally reduce false alarms in motion detection caused by environmental interference under limited edge computing power. Embodiments of this application provide a motion detection method and electronic device based on video surveillance, such as… Figure 1 As shown, the motion detection method includes steps S110 to S140.

[0030] Step S110: Acquire continuous video frame images captured by the video surveillance equipment, and convert the continuous video frame images into low-resolution target images.

[0031] In practical applications, video surveillance equipment (such as cameras) continuously acquires video streams, obtaining a series of continuous raw high-resolution video frame images. To reduce the computational load of subsequent processing, spatial resolution downsampling is performed on each raw image frame. For example, bilinear interpolation, nearest neighbor interpolation, and other methods can be used to reduce the image size and generate a low-resolution target image.

[0032] For example, a 1920×1080 pixel original frame can be downsampled into a 960×540 pixel target image through bilinear interpolation, thereby reducing the amount of data for subsequent processing and improving overall processing efficiency.

[0033] Step S120: Divide the target image into multiple grid regions and extract image features within the grid regions.

[0034] In practical applications, based on the scene set by the camera, a corresponding grid division method is preset, and the target image is divided using the preset grid division method.

[0035] For example, if the moving target in the scene is moving horizontally, the mesh area will be denser in the horizontal direction and sparser in the vertical direction. Conversely, if the moving target in the scene is moving vertically, the mesh area will be sparser in the vertical direction and denser in the vertical direction.

[0036] After dividing the target image into grid regions, image features are extracted for each grid region. For example, a deep learning feature extraction model can be used to process the image content within each grid region, outputting a fixed-dimensional image feature.

[0037] For example, after uniformly dividing a 960×540 pixel target image into 120 (columns) × 60 (rows) grid regions, each grid region is 8×9 pixels in size. Subsequently, a lightweight convolutional neural network is used to process each 8×9 pixel grid region to generate a 128-dimensional image feature.

[0038] In practical applications, image features are cached to save the image features of the current frame and historical frames.

[0039] Step S130: Calculate the similarity between the image features of the current frame and the image features of the corresponding positions in the historical frames, and generate a motion detection result to indicate whether there is motion change in the grid region based on the similarity value calculated.

[0040] For each grid region of the current frame, calculate the similarity between the image features of the current frame and the image features at the same location in historical frames (such as the previous frame or the nth frame before).

[0041] Based on the similarity value calculated using the similarity algorithm, a motion detection result representing whether there is motion change in the grid region is generated. For example, cosine similarity is used to calculate the similarity value, and a similarity threshold T is set (e.g., T=0.9). If the similarity value is less than T, it is determined that the grid region has undergone motion change within the corresponding time interval, i.e., there is a possibility of a moving target, and the motion detection result of the grid region is marked as a moving state; if the similarity value is greater than or equal to T, it is determined that the grid region has not undergone motion change within the corresponding time interval, and is marked as a stationary state. After traversing all grids, a motion marker map is obtained.

[0042] Step S140: Based on the motion detection results, extract continuous motion regions within the grid area to generate motion target regions.

[0043] The generated motion map is analyzed to identify all grid regions marked as motion states by motion detection results. Spatially adjacent grid regions marked as motion states (e.g., using 8-connected domains for judgment) are aggregated to form one or more connected candidate motion regions.

[0044] Each candidate motion region is filtered. For example, if the number of grid regions contained in a candidate motion region exceeds a preset threshold (such as a preset threshold of 4), the candidate motion region is determined to be a valid motion target region and the motion target region is output.

[0045] Taking pedestrian monitoring in a warehouse aisle as an example, in a linear warehouse aisle monitoring scenario, pedestrians or transport vehicles move horizontally. After the video surveillance equipment captures continuous video frame images, the video frames are downsampled and divided into grid regions, and image features of the grid regions are extracted. When a pedestrian passes through the monitoring area of ​​the equipment, the image features covered by the pedestrian's body change as the pedestrian moves. By comparing the similarity of image features of the corresponding grid regions in the current frame and historical frames, the grid region where the pedestrian is located is marked as a moving region. Subsequently, these adjacent moving grid regions are connected into a complete moving region, thereby accurately detecting the pedestrian's position, while stationary backgrounds such as walls and the ground are effectively excluded.

[0046] Taking vehicle detection in an outdoor parking lot as an example, vehicles need to move horizontally when entering and exiting parking spaces. The changes in the vehicle itself and the shadow it casts alter the image features of the corresponding grid area. By comparing feature similarity, the moving area of ​​the vehicle can be reliably detected. Even if the lighting changes slowly due to passing clouds, the comparison is based on deep learning features that are relatively robust to lighting conditions rather than pixel brightness. Therefore, it effectively avoids misinterpreting changes in overall image brightness or darkness as motion, thus reducing false positives.

[0047] In this way, by employing a deep learning model to extract image features from the grid and comparing feature vector similarity instead of traditional pixel-level comparison, it exhibits excellent robustness to interference such as changes in illumination and minor background disturbances, significantly reducing the false alarm rate at the source. Furthermore, by downsampling the image and dividing it into a grid for sparse processing, computational and storage overhead is reduced, making it suitable for edge monitoring equipment with limited computing power while maintaining detection accuracy. In addition, the two-stage processing of generating grid-level motion markers through feature comparison and then aggregating and extracting continuous motion regions outputs complete and practical information on moving target regions, providing a direct and reliable foundation for subsequent analysis.

[0048] In some embodiments, spatial resolution downsampling is used to process consecutive video frames to obtain the target image. For example, a bilinear interpolation algorithm is used to downsample the sensor output image, which originally has a resolution of 2688×1520, to a resolution of 672×380. The downsampling ratio can be configured according to actual computing power and accuracy requirements. In this way, while preserving motion information as much as possible, the computational load of subsequent feature extraction and comparison is reduced, enabling this solution to be deployed on edge video surveillance equipment with limited computing power.

[0049] In some embodiments, the step of dividing the target image into multiple grid regions includes: dividing the target image into a first number of grids along a first direction, and dividing the target image into a second number of grids along a second direction. The first direction is the direction of motion of the moving target, the second direction is perpendicular to the first direction, and the first number is greater than the second number.

[0050] The direction of motion of a moving target refers to its main direction of motion, which is the direction that the detection equipment needs to detect. In practical applications, the moving target may not move in a straight line. In this case, the direction of motion refers to the main direction of motion of the moving target. For example, when a moving target moves in a channel, its trajectory is not a straight line, but it moves along the extension direction of the channel. In this case, the direction of motion is the extension direction of the channel.

[0051] Among them, the first quantity is The second quantity is ,but First quantity The second quantity is used to detect the inter-frame motion displacement of moving targets. Size filtering for controlling moving targets.

[0052] For example, the horizontal direction is designated as the first direction, and the vertical direction as the second direction, dividing the image into 108 horizontal grids and 16 vertical grids. Thus, the first quantity N determines the horizontal displacement detection accuracy, allowing moving targets with displacements exceeding 1 / N of the image width to be detected; the second quantity M acts as a size filter, ensuring that only targets with heights exceeding 1 / M of the image height are included in the detection range.

[0053] This "dense horizontally and sparse vertically" division method is suitable for the characteristics of targets in monitoring scenarios that are mainly moving horizontally. While ensuring the detection accuracy in the horizontal direction, the vertical coarse division filters out small noise interference such as flying insects and raindrops, and reduces the total number of grids, thus reducing the amount of computation.

[0054] Of course, in practical applications, if the target in the monitoring scenario primarily moves vertically, such as in a scenario monitoring falling objects from a height, the movement of the object is mainly vertical. In this case, the vertical direction is the first direction, and the horizontal direction is the second direction, dividing the image into 108 vertical grids and 16 horizontal grids. Thus, the first quantity N determines the vertical displacement detection accuracy; moving targets with displacements exceeding 1 / N of the image width can be detected. The second quantity M acts as a size filter, only targets with heights exceeding 1 / M of the image height will be included in the detection range.

[0055] In some embodiments, a deep learning feature extraction model is used to process the grid region and output image features of fixed dimensions. For example, the deep learning feature extraction model is a trained feature descriptor network. The feature descriptor network takes an image patch (e.g., 8×8 pixels) of a single grid region as input and outputs a multi-dimensional feature vector (e.g., a 64-dimensional vector) that can characterize the semantic and texture information of the image patch through the forward propagation of the network.

[0056] In this way, by leveraging the powerful feature representation capabilities of deep learning models, highly robust features can be extracted that are insensitive to changes in lighting and minor disturbances (such as swaying leaves or ripples on the water surface), but sensitive to semantic information such as object structure and edges, thereby fundamentally improving the stability of motion discrimination.

[0057] In some embodiments, taking the grid region in the i-th row and j-th column as an example, the similarity value between the image features of the current frame and the image features of the historical frame refers to: calculating the similarity value between the image feature vector of the grid in the i-th row and j-th column of the current frame and the feature vector of the grid in the i-th row and j-th column of the historical frame.

[0058] In some embodiments, such as Figure 2 As shown, the steps for generating motion detection results for the grid region based on the similarity calculation results include steps S210 to S220.

[0059] Step S210: If the similarity value is less than a preset threshold, the motion detection result is set to the first state, which indicates that there is motion change within the grid area.

[0060] The similarity calculation can employ methods such as the reciprocal of Euclidean distance or cosine similarity. The rule for generating motion detection results based on similarity values ​​is as follows: a preset similarity threshold T is used. If the similarity value is less than T, it is determined that there is motion change in the grid region, and the motion detection result is set to the first state (motion state).

[0061] Step S220: If the similarity value is greater than or equal to a preset threshold, the motion detection result is set to the second state, which indicates that there is no motion change within the grid area.

[0062] If the similarity value is greater than or equal to T, it is determined that there is no motion change in the grid region, and the motion detection result is set to the second state (static state). In this way, by comparing the differences in image features at different positions, robust change detection that cannot be achieved by pixel-level comparison is realized.

[0063] In some embodiments, such as Figure 3 As shown, the steps of extracting continuous motion regions within the grid area and generating motion target regions based on motion detection results include steps S310 to S320.

[0064] Step S310: Perform connected component analysis on the grid region in the first state and extract continuous grid regions as candidate motion regions.

[0065] Connectivity analysis is performed on all grid regions in the first state in the motion detection result image. Adjacent first-state grid regions are aggregated to form several connected candidate motion regions.

[0066] Step S320: If the number of grid regions in the candidate motion region is greater than or equal to a preset number, the candidate motion region is determined as the motion target region.

[0067] Each candidate motion region is evaluated. If the number of grids contained in the candidate motion region is greater than or equal to a preset threshold, the candidate motion region is finally determined as the motion target region and output; otherwise, the candidate motion region is regarded as noise and discarded.

[0068] In this way, discrete grid-level motion judgment results are integrated into continuous and complete object-level motion regions, and sporadic false alarms that may be caused by minor fluctuations in feature extraction are eliminated through simple area filtering, making the output results more reliable.

[0069] In some embodiments, the interval between the current frame and the historical frame is n, where n is an integer greater than or equal to 1. The interval n is a configurable parameter used to adjust the sensitivity of motion detection, and the velocity accuracy corresponding to the interval n is... ,in, Where m is the image width, n is the number of horizontal grid lines, and n is the interval between frames. For example, setting n=1 means comparing the current frame with the previous frame. Setting n=5 means comparing the current frame with the fifth frame before that.

[0070] As n increases, it is equivalent to lengthening the comparison time window. Only targets that produce sufficient displacement (characteristic changes) within a longer time interval will be detected, thereby filtering out slow-moving targets or filtering out high-frequency jitter.

[0071] This provides a flexible speed filtering mechanism, allowing users to adjust the n value to adapt to detection scenarios with different speed requirements (such as detecting high-speed vehicles or slowly crawling insects) without changing the grid division accuracy and feature extraction computing power.

[0072] To more clearly illustrate the technical solution of this application, let's take vehicle speed screening at a crossroads as an example. At a traffic crossroads, it is necessary to detect vehicles exceeding a certain speed limit. A relatively large interval frame number n can be set. The distance a speeding vehicle moves (represented by the range of the grid area where features change) within two frame intervals will be greater than that of a normal vehicle. By setting a large value for n, the current frame is compared with a more distant historical frame (such as the previous 10th frame) in terms of image features. Only vehicles that have moved a sufficiently large distance (i.e., have a sufficiently high speed) will trigger motion markers in multiple grid areas, while vehicles at normal speeds are filtered out due to insufficient displacement, thus achieving preliminary speed screening based on the amplitude of feature changes.

[0073] Taking indoor lingering detection as an example, in key areas such as bank entrances, sales cubicles of unmanned stores, or warehouses, it is necessary to detect whether people linger for extended periods. A small interval frame number n can be set (e.g., n=1). A person standing still will not be flagged as moving because the mesh features covering their body remain almost unchanged between consecutive frames, exhibiting high similarity. Detection will only occur when the person begins to move and the features change. By combining long-term motion state analysis, it is possible to effectively distinguish between people passing through key areas and those lingering in key areas.

[0074] This application also provides an electronic device. Figure 4 As shown, Figure 4As shown, the electronic device 400 includes a memory 410 and a processor 420.

[0075] The memory 410 is used to store computer program instructions. The processor 420 is connected to the memory 410 and is used to call and execute the instructions stored in the memory 410 to implement the motion detection method described above.

[0076] Among them, electronic device 400 can be a network camera, an edge computing box, a network video recorder, or a system-on-a-chip with integrated video processing functions.

Claims

1. A motion detection method based on video surveillance, characterized in that, include: Acquire continuous video frame images captured by video surveillance equipment, and convert the continuous video frame images into low-resolution target images; The target image is divided into multiple grid regions, and image features within the grid regions are extracted; The similarity between the image features of the current frame and the image features at the corresponding positions in the historical frames is calculated, and a motion detection result indicating whether there is motion change in the grid region is generated based on the similarity value calculated. Based on the motion detection results, continuous motion regions within the grid area are extracted to generate motion target regions.

2. The motion detection method according to claim 1, characterized in that, The step of converting the continuous video frame images into a low-resolution target image includes: The target image is generated by performing spatial resolution downsampling on the continuous video frame images.

3. The motion detection method according to claim 1, characterized in that, The step of dividing the target image into multiple grid regions includes: Divide the target image into a first number of grids along a first direction, and divide the target image into a second number of grids along a second direction; Wherein, the first direction is the direction of movement of the moving target, the second direction is perpendicular to the first direction, and the first quantity is greater than the second quantity.

4. The motion detection method according to claim 3, characterized in that, The first quantity is The second quantity is , The first quantity The second quantity is used to detect the inter-frame motion displacement of a moving target. Size filtering is used to control the size of the moving target.

5. The motion detection method according to claim 3, characterized in that, The step of extracting image features within the grid region includes: The grid region is processed using a deep learning feature extraction model, which outputs image features of fixed dimensions.

6. The motion detection method according to claim 1, characterized in that, The step of calculating the similarity between the image features of the current frame and the image features at corresponding positions in historical frames includes: Calculate the similarity value between the image feature vector of the grid in the i-th row and j-th column of the current frame and the feature vector of the grid in the i-th row and j-th column of the historical frame.

7. The motion detection method according to claim 1 or 6, characterized in that, The step of generating motion detection results for the grid region based on the similarity calculation results includes: If the similarity value is less than a preset threshold, the motion detection result is set to a first state, whereby the first state indicates that there is motion change within the grid area. If the similarity value is greater than or equal to a preset threshold, the motion detection result is set to a second state, which indicates that there is no motion change within the grid area.

8. The motion detection method according to claim 7, characterized in that, Based on the motion detection results, the step of extracting continuous motion regions within the grid area and generating a motion target region includes: Perform connected component analysis on the grid region in the first state, and extract continuous grid regions as candidate motion regions; If the number of grid regions in the candidate motion region is greater than or equal to a preset number, the candidate motion region is determined as the motion target region.

9. The motion detection method according to claim 1 or 6, characterized in that, The number of frames between the current frame and the historical frame is n, where n is an integer greater than or equal to 1; The interval frame number n is a configurable parameter used to adjust the sensitivity of motion detection.

10. An electronic device, characterized in that, include: Memory, used to store instructions; A processor is configured to invoke instructions stored in the memory to execute the motion detection method according to any one of claims 1 to 9.