Method, device, computer equipment and storage medium for detecting posting behavior based on video

By dividing the video picture and analyzing the video frame data of small blocks of target detection, the problem of large resource consumption of target posting behavior detection algorithm is solved, and more efficient detection is achieved.

CN114241351BActive Publication Date: 2025-08-22ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111320905.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-08-22
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

In the prior art, the resource consumption of target posting behavior detection algorithms is too high and there is a lack of effective solutions.

Method used

By dividing the video screen, the image blocks with preset change events were filtered as target detection blocks, the video frame data before and after the target detection blocks were analyzed, and whether there was a target posting behavior.

Benefits of technology

It effectively reduces the consumption of target posting behavior detection algorithm resources and improves the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114241351B_ABST
    Figure CN114241351B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus, computer device, and computer-readable storage medium for detecting posting behavior based on video. The method detects image blocks within a posting behavior detection area and selects image blocks where preset change events have occurred as target detection blocks. The image blocks are multiple image areas obtained by dividing the current video screen, and one image area is regarded as an image block. The method determines whether a target posting behavior exists within the posting behavior detection area based on the data of the target detection blocks in the video frames before and after the preset change event of the target detection blocks. The present application only needs to analyze the data of the target detection blocks to determine whether a target posting behavior exists. The target posting behavior can be effectively analyzed with less data, effectively reducing the resource consumption of the target posting behavior detection algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data analysis and processing, and in particular to a method, apparatus, computer equipment, and computer-readable storage medium for detecting posting behavior based on video. Background Art

[0002] With the continuous evolution of video security technology, traditional video surveillance technology is becoming increasingly intelligent, enabling deeper solutions to social problems and promoting harmonious social development. Existing technologies first determine whether a tripwire intrusion or area intrusion event has occurred. If a successful determination is made, a posting algorithm is then used to analyze the entire video frame data before and after the event to determine whether the target posting behavior exists within the current video.

[0003] However, the above-mentioned posting behavior detection has the problem of large resource consumption of the detection algorithm. With respect to the problem of large resource consumption of the target posting behavior detection algorithm in the related art, no effective solution has been proposed so far. Summary of the Invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and computer-readable storage medium for detecting posting behavior based on video to address the above technical problems, so as to solve the problem of high resource consumption of target posting behavior detection algorithm in related technologies.

[0005] In a first aspect, the present application provides a method for detecting posting behavior based on a video, comprising the following steps:

[0006] Detecting image blocks within the posting behavior detection area, and selecting image blocks where preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and each image area is regarded as one image block;

[0007] Based on data of an area where the target detection block is located in video frames before and after the preset change event occurs in the target detection block, it is determined whether there is a target posting behavior in the posting behavior detection area.

[0008] In one embodiment, the detecting of image blocks within the posting behavior detection area and selecting image blocks where preset change events have occurred as target detection blocks includes the following steps:

[0009] The image blocks in the posting behavior detection area are detected, and the image blocks that have undergone preset change events within the time range from the last detection to the current time and are currently in a stable state are selected as the target detection small blocks.

[0010] In one embodiment, before detecting the image blocks within the posting behavior detection area and selecting the image blocks in which the preset change events have occurred as target detection blocks, the method further includes:

[0011] The posting behavior detection area is determined by setting a rule frame on the video screen.

[0012] In one embodiment, a detection period for detecting the image block within the posting behavior detection area is an integer multiple of an I-frame interval of the current video.

[0013] In one embodiment, determining whether there is a target posting behavior in the posting behavior detection area based on data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block includes the following steps:

[0014] In the video frame of the current video picture, a video frame preceding the video frame in which the target detection block starts to undergo the preset change event is obtained as the first video frame, and a video frame following the video frame in which the target detection block stops changing is obtained as the second video frame;

[0015] Extracting data of the area where the target detection block is located from the first video frame and the second video frame;

[0016] The data of the area where the target detection block is located is analyzed to determine whether there is a target posting behavior in the posting behavior detection area.

[0017] In one embodiment, a video frame preceding a video frame in which the preset change event of the target detection block begins to occur and a video frame following a video frame in which the target detection block stops changing are independent frames.

[0018] In one embodiment, the preset change event includes one or more of a motion detection event, an area intrusion event, and a tripwire intrusion event.

[0019] In one embodiment, after determining whether a target posting behavior exists within the posting behavior detection area, the method further includes:

[0020] If it is determined that the target posting behavior exists in the posting behavior detection area, the start time of the target posting behavior is recorded.

[0021] In one embodiment, after determining whether a target posting behavior exists within the posting behavior detection area, the method further includes:

[0022] If it is determined that the target posting behavior exists in the posting behavior detection area, all I frames within a preset time range before the video frame in which the preset change event occurs in the target detection block and the I frame after the video frame in which the target detection block stops changing are analyzed, and whether there is a misjudgment is determined based on the analysis results.

[0023] In a second aspect, this embodiment provides a device for detecting posting behavior based on a video, the device comprising: a detection module and an analysis module:

[0024] The detection module is used to detect image blocks within the posting behavior detection area and select image blocks where preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and each image area is regarded as one image block;

[0025] The analysis module is used to determine whether there is a target posting behavior in the posting behavior detection area based on data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block occurs.

[0026] In a third aspect, a computer device is provided in this embodiment, 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 the method described in the first aspect when executing the computer program.

[0027] In a fourth aspect, a computer-readable storage medium is provided in this embodiment, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0028] The above-mentioned method, apparatus, computer equipment and computer-readable storage medium for detecting posting behavior based on video detect the image blocks in the posting behavior detection area, and select the image blocks in which preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and one image area is regarded as an image block; based on the data of the target detection blocks in the video frames before and after the preset change event of the target detection blocks, it is determined whether there is target posting behavior in the posting behavior detection area. The present application only needs to analyze the data in the area where the target detection blocks are located to determine whether there is target posting behavior, effectively analyze the target posting behavior with less data, and effectively reduce the resource consumption of the target posting behavior detection algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0030] Figure 1 This is a diagram of an application scenario of the method for detecting posting behavior based on video provided in an embodiment of the present application;

[0031] Figure 2 The process of the method for detecting posting behavior based on video provided in the embodiment of the present application is as follows Figure 1 ;

[0032] Figure 3 Schematic diagram of a method for dividing a video screen in a method for detecting posting behavior based on a video provided in an embodiment of the present application;

[0033] Figure 4 The process of the method for detecting posting behavior based on video provided in the embodiment of the present application is as follows Figure 2 ;

[0034] Figure 5 is a structural diagram of a device for detecting posting behavior based on video according to an embodiment of the present application;

[0035] Figure 6 It is a structural diagram of a computer device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is described and illustrated below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely used to explain this application and are not intended to limit this application. Based on the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without making any creative efforts are within the scope of protection of this application.

[0037] Obviously, the drawings described below are merely examples or embodiments of the present application. Those skilled in the art can, without inventive effort, apply the present application to other similar scenarios based on these drawings. Furthermore, it is also understood that, although the effort involved in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, changes in design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as an insufficiency of the content disclosed in this application.

[0038] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments unless there is a conflict.

[0039] Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by a person of ordinary skill in the technical field to which this application belongs. The words "one", "a", "the" and the like used in this application do not indicate a limit on quantity and may indicate the singular or plural. The terms "include", "comprise", "have" and any variations thereof used in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units that are inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The word "multiple" used in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.

[0040] Figure 1 This is an application scenario diagram of the method for detecting posting behavior based on video provided by an embodiment of the present application. Figure 1As shown, data can be transmitted between the server 101 and the mobile terminal 102 via the network. The mobile terminal 102 is used to collect video data of the current shooting picture and transmit it to the server 101. After the server 101 receives the video data, it detects the image blocks in the posting behavior detection area and filters out the image blocks where preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video picture, and one image area is regarded as an image block; based on the data of the target detection blocks in the video frames before and after the preset change event of the target detection blocks, it is determined whether there is a target posting behavior in the posting behavior detection area. The server 101 can be implemented by an independent server or a server cluster composed of multiple servers, and the mobile terminal 102 can be a video acquisition device such as a camera or a mobile phone.

[0041] The embodiment of the present application provides a method for detecting posting behavior based on video, which can be used in the field of data analysis and processing, such as Figure 2 As shown, the method includes the following steps:

[0042] In step S210, the image blocks in the posting behavior detection area are detected, and image blocks where preset change events have occurred are selected as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and one image area is regarded as an image block.

[0043] Specifically, not all areas of an actual video feed need to be detected. For example, if the current video feed is from a surveillance camera located on a street, the video includes the ground, which is often occupied by people and vehicles, as well as the walls on both sides of the street. Since posting naturally occurs on the walls on both sides of the street, the walls on both sides of the street can be used as posting detection areas. The posting detection areas can be adjusted based on different monitoring scenarios. The number of posting detection areas can be one or more, and can be set as needed.

[0044] Based on this, the present application divides the current video screen into multiple image regions, with each image region being considered as an image block. By analyzing the data of the image blocks within the posting behavior detection area, the application determines whether the target posting behavior has occurred. The preset change event in the present application refers to an event in which the current video screen changes within the detection area, and can be one or more of the following change events: motion detection events, area intrusion events, and tripwire intrusion events. A motion detection event refers to the use of existing video surveillance technology to dynamically detect the current video screen. If the screen within the posting behavior detection area changes, it indicates that a motion detection event has occurred within the posting behavior detection area. An area intrusion event refers to the use of existing video surveillance technology to perform area intrusion detection on the current video screen. If another object enters the posting behavior detection area, it indicates that an area intrusion event has occurred within the posting behavior detection area. A tripwire intrusion event refers to the use of existing video surveillance technology to perform tripwire intrusion detection on the current video screen. If another object crosses a preset rule line within the posting behavior detection area, it indicates that a tripwire intrusion event has occurred within the posting behavior detection area. Since there are multiple image blocks within the posting behavior detection area, if a preset change event occurs in the area where one or more image blocks are located, it is confirmed that a preset change event has occurred in the posting behavior detection area. Specifically, the information of the image blocks where the preset change event has occurred can be saved in the index of the video frame. By querying the video frame index, it can be known which image blocks have undergone the preset change event in which video frame. The above-mentioned target posting behavior can include advertisement posting behavior, poster posting behavior, and note posting behavior. Since targets such as advertisements, posters, and notes have different characteristics, the posting algorithm can further classify various types of target posting behaviors based on the data of the area where the target detection block is located in the video frame before and after the preset change of the image block.

[0045] As an implementable method, Figure 3 As shown, a schematic diagram of a method for dividing a video screen is provided. First, the posting behavior detection area can be marked on the video screen. For example, the posting behavior detection area can be marked by setting a rule frame on the video screen. The entire video screen is then divided into M rows and N columns (M and N are integers) according to its resolution. The size of each row and column is the same, thereby obtaining M times N image areas, and one image area is regarded as an image block. The image blocks whose areas are located within the posting behavior detection area and whose areas are partially located within the posting behavior detection area are used as detection objects of this application.

[0046] Furthermore, the current video image can be divided into various shapes as needed to ensure that the posting behavior detection area is distributed across multiple image blocks. Depending on how the video image is divided, the number of image blocks within the posting behavior detection area varies. Some image blocks may be located entirely within the posting behavior detection area, some may be located partially within the posting behavior detection area, and some may be located entirely outside the posting behavior detection area.

[0047] The present application detects image blocks whose entire area is within the posting behavior detection area and image blocks whose area is partially within the posting behavior detection area. As for the detection method of image blocks, it can be to continuously detect image blocks in each video frame. It can also be performed periodically on image blocks in video frames. In one detection, it is necessary to detect all image blocks to be detected in all video frames in the current cycle, and record which video frames have image blocks in which areas where preset change events have occurred. The detection cycle is generally maintained within a few seconds, which is much less than the time required for a target posting behavior. For example, the detection cycle can be 0.5 seconds, 1 second, 2 seconds, etc., and can be adjusted according to needs. By detecting image blocks, image blocks where preset change events have occurred are screened out as target detection blocks.

[0048] Step S220 , based on the data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block occurs, it is determined whether there is a target posting behavior in the posting behavior detection area.

[0049] By detecting the target detection block, the video frames before and after the target detection block undergoes a preset change event can be obtained. Using a trained posting algorithm, the data of the target detection block region in the video frames before and after the target detection block undergoes a preset change event can be analyzed to determine whether the target detection block region has been subjected to target posting behavior, thereby determining whether the target posting behavior exists within the posting behavior detection area. For example, for the detection of advertisement posting behavior, the data of the target detection block region in the video frames before and after the target detection block undergoes a preset change event can be used to determine whether an advertisement is superimposed within the target detection block. If so, the presence of an advertisement within the posting behavior detection area is determined. The data of the target detection block region in the video frames before and after the target detection block undergoes a preset change event can be data of the target detection block region in multiple video frames before and after the target detection block undergoes a preset change event, or data of the target detection block region in the most recent video frame before and after the target detection block undergoes a preset change event.

[0050] As one of the implementation methods, in order to ensure that the detection results of the target posting behavior are more accurate, in addition to detecting the data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block, the data of the area where the image blocks around the target detection block are located are also detected, so as to determine whether there is target posting behavior in the posting behavior detection area.

[0051] In the related art, a tripwire intrusion or area intrusion event is first determined, and if the determination is successful, the entire video frame data before and after the event is analyzed using a posting algorithm to determine whether there is a target posting behavior in the current video screen. This has the problem of high resource consumption of the target posting behavior detection algorithm. The present application detects the image blocks in the posting behavior detection area through the above steps S210 to S220, and filters out the image blocks where a preset change event has occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and one image area is regarded as an image block; based on the data of the target detection blocks in the video frames before and after the preset change event of the target detection blocks, it is determined whether there is a target posting behavior in the posting behavior detection area. The present application only needs to analyze the data in the area where the target detection blocks are located to determine whether there is a target posting behavior, effectively analyze the target posting behavior with less data, and effectively reduce the resource consumption of the target posting behavior detection algorithm.

[0052] In one embodiment, based on step S210 above, the image blocks within the posting behavior detection area are detected, and image blocks where a preset change event has occurred are screened out as target detection blocks. The video-based posting behavior detection method of the present application further includes the following steps:

[0053] The image blocks in the posting behavior detection area are detected, and the image blocks that have undergone preset change events and are currently in a stable state within the time range from the previous detection to the current time are selected as target detection blocks.

[0054] Specifically, an image block that has undergone a preset change event within the time range from the previous detection to the current time and is currently in a stable state indicates that the preset change event that occurred in the image block has been completed. The data of the image block is sufficient for analysis to determine whether there is a target posting behavior in the image block, so the image block is the best choice as a target detection block.

[0055] In one embodiment, before detecting the image blocks within the posting behavior detection area in step S210 and selecting image blocks in which a preset change event has occurred as target detection blocks, the method for detecting posting behavior based on video further includes the following steps:

[0056] Step S200: determining a posting behavior detection area by setting a rule frame on the video screen.

[0057] Specifically, the shape of the rule frame can be any closed polygon, and the rule frame can be set in the current video screen to determine the posting behavior detection area according to actual usage scenarios.

[0058] Furthermore, the video screen can be divided into M rows and N columns (M and N are integers) based on the current video resolution, with each row and column being of equal size, resulting in uniformly sized rectangular image blocks. Alternatively, the current video screen can be divided into various shapes as needed, ensuring that the posting behavior detection area is distributed across multiple image blocks.

[0059] The order of setting a rule frame on the video screen to determine the posting behavior detection area and dividing the current video screen into multiple image blocks is not fixed. The rule frame can be set on the video screen first to determine the posting behavior detection area, and then the current video screen can be divided into multiple image blocks. Alternatively, the current video screen can be divided into multiple image blocks first, and then the rule frame can be set on the video screen to determine the posting behavior detection area.

[0060] Through the above step S200, the location of the posting behavior detection area can be set more intuitively and accurately.

[0061] Furthermore, in one embodiment, the detection period for detecting the image blocks within the posting behavior detection area may be an integer multiple of an I-frame interval of the current video.

[0062] Specifically, for example, based on the transmission rules of video streams, if the frame rate is 25, there are 25 frames in 1 second, including 1 I-frame and 24 P-frames. The detection cycle for image block detection is based on I-frames. Therefore, at a frame rate of 25, waiting for N I-frame intervals means waiting N seconds for a detection, where N is a natural number. Because I-frames are key frames in the video, I-frame data provides more accurate information. To ensure that I-frame data is present for each image block detection, that is, to ensure more accurate detection, the detection cycle is an integer multiple of the I-frame interval of the current video.

[0063] In one embodiment, based on step S220 above, determining whether a target posting behavior exists within a posting behavior detection area based on data of the target detection block in the video frames before and after a preset change event occurs in the target detection block, the method for detecting posting behavior based on video provided by the present application includes the following steps:

[0064] S221, in the current video frame, obtaining a video frame before the video frame in which the target detection block starts to undergo a preset change event as the first video frame and obtaining a video frame after the video frame in which the target detection block stops changing as the second video frame.

[0065] S222: Extract data of the area where the target detection block is located from the first video frame and the second video frame.

[0066] S223 , analyzing the data of the area where the extracted target detection block is located to determine whether there is a target posting behavior in the posting behavior detection area.

[0067] Specifically, the data in the area where the target detection block is located can be extracted from the first video frame and the second video frame. To ensure data accuracy, the data can also be extracted from the first video frame and multiple video frames within a certain time range before the first video frame, and the second video frame and multiple videos within a certain time range after the second video frame. The data extracted from the area where the target detection block is located can be analyzed using a trained posting algorithm to determine whether the target posting behavior exists within the posting behavior detection area. For example, the extracted data is sent to a posting algorithm analyzer, which determines whether the target detection block contains the target posting behavior.

[0068] Through the above steps S221 to S223, by analyzing the data of the area where the target detection block is located, which is extracted from the video frame before the video frame in which the preset change event of the target detection block begins and the video frame after the video frame in which the target detection block stops changing, it is determined whether there is a target posting behavior in the posting behavior detection area, thereby effectively reducing the consumption of the target posting behavior detection algorithm.

[0069] Furthermore, in one embodiment, a video frame preceding a video frame in which a preset change event of the target detection block begins to occur and a video frame following a video frame in which the target detection block stops changing are independent frames.

[0070] Specifically, an independent frame refers to a frame encoded without reference to other video frames. Video frame decoding can be completed based solely on the data of this frame. An independent frame can be an I-frame in encoding schemes such as H264, H265, and H266, or a keyframe in compression schemes such as QT. If the video frames are not compressed or are encoded entirely using intra-frame compression, no distinction is made between independent and non-independent frames. Data in the area where the target detection block is located can be extracted from the first and second video frames. To ensure data accuracy, it can also be extracted from the first video frame and multiple video frames within a certain time range before the first video frame, and from the second video frame and multiple video frames within a certain time range after the second video frame. Because independent frames are key frames in the video, independent frame data provides more accurate information. By analyzing data in the area where the target detection block is located, extracted from the independent frame preceding the video frame where the preset change event occurs and the independent frame following the video frame where the target detection block stops changing, the presence of target posting behavior within the posting behavior detection area can be determined. This not only effectively reduces the overhead of the target posting behavior detection algorithm but also further improves the accuracy of target posting behavior detection.

[0071] In one embodiment, the preset change event includes one or more of a motion detection event, an area intrusion event, and a tripwire intrusion event.

[0072] Specifically, if any of the following events occurs within the posting behavior detection area: motion detection events, area intrusion events, and tripwire intrusion events, target posting behavior may exist within the posting behavior detection area, so any of the following events can be used as preset change events.

[0073] In one embodiment, after determining whether the target posting behavior exists in the posting behavior detection area in step S220, the method for detecting posting behavior based on video further includes the following steps:

[0074] If it is determined that the target posting behavior exists in the posting behavior detection area, the start time of the target posting behavior is recorded.

[0075] Specifically, the start time of a target posting behavior generally refers to the time when a preset change event occurs in the target detection block. Recording the start time of a target posting behavior facilitates subsequent querying of the target posting video and further facilitates subsequent tracing of the target posting behavior. To more clearly trace the cause of the target posting behavior, the start time of the target posting behavior can be pushed back a few seconds from the time when the preset change event occurred in the target detection block.

[0076] In one embodiment, after determining whether the target posting behavior exists in the posting behavior detection area in step S220, the method for detecting posting behavior based on video further includes the following steps:

[0077] If it is determined that there is target posting behavior in the posting behavior detection area, all I frames within a preset time range before the video frame where the target detection block undergoes a preset change event and the I frame after the video frame where the target detection block stops changing are analyzed, and whether there is a misjudgment is determined based on the analysis results.

[0078] Specifically, in real-world scenarios, advertisements, flyers, and the like may be blown onto a wall by the wind. This situation could be mistakenly identified by the posting algorithm as target posting. Therefore, it is necessary to further verify the results of the posting algorithm's analysis to avoid misjudgments. By analyzing all I frames within a preset time range before the video frame in which the target detection block undergoes a preset change event, as well as the I frame following the video frame in which the target detection block stops changing, it is possible to determine whether the target posting behavior identified by the posting algorithm is a misjudgment. The preset time can be set to five or ten minutes before the video frame in which the target detection block undergoes a preset change event.

[0079] The above steps can further confirm the target posting behavior and ensure the accuracy of the detection results.

[0080] like Figure 4 As shown, this embodiment also provides a method for detecting posting behavior based on video, and the process includes the following steps

[0081] Step S310: determining a posting behavior detection area by setting a rule frame on the video screen.

[0082] Step S320 : Divide the current video image into M rows and N columns (M and N are integers) according to its resolution, and obtain M times N image blocks of the same size and without overlapping.

[0083] Step S330 , periodically detecting the image blocks within the posting behavior detection area, and selecting the image blocks that have undergone a preset change event within the time range from the last detection to the current time and are currently in a stable state as target detection blocks.

[0084] Step S340, based on the data of the area where the target detection block is located in the I frame before and after the preset change event of the target detection block, determine whether there is a target posting behavior in the posting behavior detection area. If so, execute step S350; if not, execute step S330.

[0085] Step S350: Record the start time of the target posting behavior.

[0086] Figure 5 is a schematic diagram of an apparatus for detecting posting behavior based on video according to an embodiment of the present invention. Figure 5 As shown, a device 40 for detecting posting behavior based on a video is provided, the device comprising a detection module 41 and an analysis module 42, wherein:

[0087] Detection module 41 is configured to detect image blocks within the posting behavior detection area and select image blocks where a preset change event has occurred as target detection blocks; an image block is a plurality of image regions obtained by dividing the current video screen, with each image region being considered as an image block;

[0088] The analysis module 42 is configured to determine whether there is a target posting behavior in the posting behavior detection area based on data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block.

[0089] The above-mentioned device 40 for detecting posting behavior based on video detects image blocks within the posting behavior detection area and selects image blocks where preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and each image area is regarded as an image block; based on the data of the target detection blocks in the video frames before and after the preset change event of the target detection blocks, it is determined whether the target posting behavior exists within the posting behavior detection area. The present application only needs to analyze the data of the area where the target detection blocks are located to determine whether the target posting behavior exists, effectively analyzing the target posting behavior with less data, and effectively reducing the resource consumption of the target posting behavior detection algorithm.

[0090] In one embodiment, the detection module 41 is further configured to detect image blocks within the posting behavior detection area, and select image blocks that have undergone preset change events within a time range from the last detection to the current time and are currently in a stable state as target detection blocks.

[0091] In one embodiment, the apparatus 40 for detecting posting behavior based on video further includes a preprocessing module, which is used to determine the posting behavior detection area by setting a rule box on the video screen before detecting image blocks within the posting behavior detection area and screening out image blocks where preset change events have occurred as target detection blocks.

[0092] In one embodiment, the detection period for detecting the image blocks within the posting behavior detection area is an integer multiple of the I-frame interval of the current video.

[0093] In one embodiment, the analysis module 42 is further configured to obtain, in the current video frame, a video frame preceding a video frame in which a preset change event of the target detection block begins to occur as a first video frame, and obtain a video frame following a video frame in which the target detection block stops changing as a second video frame;

[0094] Extracting data of the area where the target detection block is located from the first video frame and the second video frame;

[0095] The data of the area where the extracted target detection block is located is analyzed to determine whether the target posting behavior exists in the posting behavior detection area.

[0096] In one embodiment, the video frame preceding the video frame in which the object detection block begins to undergo a preset change event and the video frame following the video frame in which the object detection block stops changing are independent frames. In one embodiment, the preset change event includes one or more of a motion detection event, an area intrusion event, and a tripwire intrusion event.

[0097] In one embodiment, the apparatus 40 for detecting posting behavior based on video further includes a recording module, which is configured to record the start time of the target posting behavior if it is determined that the target posting behavior exists in the posting behavior detection area after determining whether the target posting behavior exists in the posting behavior detection area.

[0098] In one embodiment, the apparatus 40 for detecting posting behavior based on video further includes a confirmation module, which, after determining whether a target posting behavior exists in a posting behavior detection area, is configured to analyze, if it is determined that the target posting behavior exists in the posting behavior detection area, all I frames within a preset time range before the video frame in which a preset change event occurs in the target detection block and the I frame after the video frame in which the target detection block stops changing, and determine whether there is a misjudgment based on the analysis result.

[0099] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. Each of the above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0100] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a set of preset configuration information. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above-mentioned method of detecting posting behavior based on video is implemented.

[0101] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for detecting posting behavior based on video is implemented. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or may be a key, trackball, or touchpad provided on the computer device housing, or may be an external keyboard, touchpad, or mouse.

[0102] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0103] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0104] Detect image blocks within the posting behavior detection area and select image blocks where preset change events have occurred as target detection blocks; where an image block is a plurality of image regions obtained by dividing the current video screen, and one image region is regarded as an image block;

[0105] Based on data of an area where the target detection block is located in video frames before and after a preset change event occurs in the target detection block, it is determined whether there is a target posting behavior in the posting behavior detection area.

[0106] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0107] The image blocks in the posting behavior detection area are detected, and the image blocks that have undergone preset change events and are currently in a stable state within the time range from the previous detection to the current time are selected as target detection blocks.

[0108] In one embodiment, before detecting image blocks within the posting behavior detection area and selecting image blocks where a preset change event has occurred as target detection blocks, the processor further implements the following steps when executing the computer program:

[0109] By setting a rule frame on the video screen, the posting behavior detection area is determined.

[0110] In one embodiment, the detection period for detecting the image blocks within the posting behavior detection area is an integer multiple of the I-frame interval of the current video.

[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0112] In the current video frame, a video frame preceding the video frame in which the target detection block starts to undergo a preset change event is obtained as the first video frame, and a video frame following the video frame in which the target detection block stops changing is obtained as the second video frame;

[0113] Extracting data of the area where the target detection block is located from the first video frame and the second video frame;

[0114] The data of the area where the extracted target detection block is located is analyzed to determine whether the target posting behavior exists in the posting behavior detection area.

[0115] In one embodiment, the video frame preceding the video frame in which the target detection block begins to undergo a preset change event and the video frame following the video frame in which the target detection block stops changing are independent frames. In one embodiment, the preset change event includes one or more of a motion detection event, an area intrusion event, and a tripwire intrusion event.

[0116] In one embodiment, after determining whether the target posting behavior exists in the posting behavior detection area, the processor further implements the following steps when executing the computer program:

[0117] If it is determined that the target posting behavior exists in the posting behavior detection area, the start time of the target posting behavior is recorded.

[0118] In one embodiment, after determining whether the target posting behavior exists in the posting behavior detection area, the processor further implements the following steps when executing the computer program:

[0119] If it is determined that there is target posting behavior in the posting behavior detection area, all I frames within a preset time range before the video frame where the target detection block undergoes a preset change event and the I frame after the video frame where the target detection block stops changing are analyzed, and whether there is a misjudgment is determined based on the analysis results.

[0120] The above-mentioned storage medium detects the image blocks in the posting behavior detection area and selects the image blocks in which the preset change events have occurred as the target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and one image area is regarded as an image block; based on the data of the target detection blocks in the video frames before and after the preset change event of the target detection blocks, it is determined whether there is a target posting behavior in the posting behavior detection area. This application only needs to analyze the data of the area where the target detection blocks are located to determine whether there is a target posting behavior, effectively analyze the target posting behavior with less data, and effectively reduce the resource consumption of the target posting behavior detection algorithm.

[0121] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0122] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.

[0123] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.

[0124] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for detecting posting behavior based on video, characterized in that: The method comprises the following steps: Detect image blocks within the posting behavior detection area and select image blocks where preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and each image area is regarded as one image block; the preset change events include one or more of motion detection events, area intrusion events, and tripwire intrusion events; determining whether there is a target posting behavior in the posting behavior detection area based on data of an area where the target detection block is located in video frames before and after the preset change event occurs in the target detection block; The determining whether there is a target posting behavior in the posting behavior detection area based on data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block includes the following steps: In the video frame of the current video picture, a video frame preceding the video frame in which the target detection block starts to undergo the preset change event is obtained as the first video frame, and a video frame following the video frame in which the target detection block stops changing is obtained as the second video frame; Extracting data of the area where the target detection block is located from the first video frame and the second video frame; The data of the area where the target detection block is located is analyzed to determine whether there is a target posting behavior in the posting behavior detection area.

2. The method for detecting posting behavior based on video according to claim 1, characterized in that: The image blocks in the posting behavior detection area are detected, and the image blocks where the preset change events have occurred are selected as target detection blocks. The following steps are included; The image blocks in the posting behavior detection area are detected, and the image blocks that have undergone preset change events and are currently in a stable state within the time range from the last detection to the current time are selected as the target detection small blocks.

3. The method for detecting posting behavior based on video according to claim 1, characterized in that: Before detecting the image blocks within the posting behavior detection area and selecting image blocks in which a preset change event has occurred as target detection blocks, the method further includes: The posting behavior detection area is determined by setting a rule frame on the video screen.

4. The method for detecting posting behavior based on video according to claim 1, characterized in that: The detection period for detecting the image block in the posting behavior detection area is an integer multiple of the I-frame interval of the current video.

5. The method for detecting posting behavior based on video according to claim 1, characterized in that: The video frame before the video frame in which the preset change event of the target detection block begins to occur and the video frame after the video frame in which the target detection block stops changing are independent frames.

6. The method for detecting posting behavior based on video according to any one of claims 1 to 4, characterized in that: After determining whether a target posting behavior exists within the posting behavior detection area, the method further includes: If it is determined that the target posting behavior exists in the posting behavior detection area, the start time of the target posting behavior is recorded.

7. The method for detecting posting behavior based on video according to any one of claims 1 to 4, characterized in that: After determining whether a target posting behavior exists within the posting behavior detection area, the method further includes: If it is determined that the target posting behavior exists in the posting behavior detection area, all I frames within a preset time range before the video frame in which the preset change event occurs in the target detection block and the I frame after the video frame in which the target detection block stops changing are analyzed, and whether there is a misjudgment is determined based on the analysis results.

8. A device for detecting posting behavior based on video, characterized in that: The device includes: a detection module and an analysis module: The detection module is configured to detect image blocks within the posting behavior detection area and select image blocks where preset change events have occurred as target detection blocks; wherein the image blocks are multiple image areas obtained by dividing the current video screen, and each image area serves as one image block; and the preset change events include one or more of motion detection events, area intrusion events, and tripwire intrusion events. The analysis module is configured to determine whether there is a target posting behavior in the posting behavior detection area based on data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block occurs; The determining whether there is a target posting behavior in the posting behavior detection area based on data of the area where the target detection block is located in the video frames before and after the preset change event of the target detection block includes the following steps: In the video frame of the current video picture, a video frame preceding the video frame in which the target detection block starts to undergo the preset change event is obtained as the first video frame, and a video frame following the video frame in which the target detection block stops changing is obtained as the second video frame; Extracting data of the area where the target detection block is located from the first video frame and the second video frame; The data of the area where the target detection block is located is analyzed to determine whether there is a target posting behavior in the posting behavior detection area.

9. A computer 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 method according to any one of claims 1 to 7 are implemented.

10. A 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 method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Moving object detection method and device and storage medium

    CN113706573A