Event recognition method, apparatus and device based on video stream, and storage medium
By collecting and analyzing the keyframe data of the camera video stream in real time, identifying and recording emergencies, the problems of event viewing delay and data loss are solved, real-time monitoring and alarm are realized, and user safety is ensured.
Patent Information
- Application Number
- PCT/CN2024/135199
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-04
- Filing Date
- 2024-11-28
- Publication Date
- 2025-06-12
AI Technical Summary
Unpredictable harm will be caused by sudden and crisis events only after they occur and end. Video data collected by general cameras cannot be traced, resulting in missing data and affecting the user's work or life.
By collecting camera video streams in real time, extracting keyframe data, determining whether a dynamic suspected event has occurred, obtaining the first frame data, determining whether the event has occurred, and determining whether the event has ended in real time, generating and storing the target video stream.
Real-time identification and recording of emergencies is realized, data loss is avoided, users can trace events in a timely manner, and alarms are promptly carried out through real-time monitoring to ensure safety.
Smart Images

Figure CN2024135199_12062025_PF_FP_ABST
Abstract
Description
Event recognition method, device, equipment and storage medium based on video stream Technical Field
[0001] The present application relates to the technical field of event recognition, and in particular to a method, apparatus, device and storage medium for event recognition based on video streams. Background Art
[0002] For the sake of public safety, cameras are now installed in streets, residential areas, corridors, and rooms across the country, covering most areas and ensuring the safety of citizens' lives and property. Generally speaking, cameras are used to monitor and record the environment. Users can access the camera's surveillance data to review, replay, or query events.
[0003] However, some sudden and crisis events occur from time to time. If the incident is reviewed after it occurs and ends, it will cause unpredictable harm. In addition, the video data collected by general cameras can only be saved for a period of time and cannot be traced back. Therefore, if the user cannot view it in time, it will lead to data loss, affecting the user's work or life. Summary of the Invention
[0004] In view of this, the present application provides an event recognition method, device, equipment and storage medium based on video stream, which is used to solve the problem that some sudden and crisis events occur from time to time. If the event process is reviewed after the event occurs and ends, it will cause unpredictable harm; in addition, the video data collected by general cameras can only be saved for a period of time and cannot be traced back. Therefore, if the user cannot view it in time, it will lead to data loss, affecting the user's work or life.
[0005] To achieve the above objectives, the following solutions are proposed:
[0006] In a first aspect, a method for event recognition based on a video stream includes:
[0007] Collect the video stream generated by the camera in real time, and extract each key frame data from the video stream in real time;
[0008] Determining whether a dynamic suspected event occurs based on each piece of key frame data, and if a dynamic suspected event occurs, obtaining the first frame data corresponding to the dynamic suspected event;
[0009] Determining whether the dynamic suspected event is a confirmed event based on the first frame data;
[0010] If the dynamic suspected event is a confirmed event, determining in real time whether the confirmed event has ended;
[0011] If the event determined to have occurred ends, a target video stream of the event determined to have occurred is generated and the target video stream is stored.
[0012] Preferably, the determining whether a dynamic suspected event occurs based on each piece of key frame data includes:
[0013] Determining adjacent key frame data from the key frame data;
[0014] Take every two adjacent key frame data as a group of adjacent frame data;
[0015] For each group of adjacent frame data, performing jitter elimination processing on the group of adjacent frame data, and comparing the latter frame data with the former frame data in the group of adjacent frame data after the jitter elimination processing;
[0016] If the latter frame data in the set of adjacent frame data is different from the former frame data, it is determined that a dynamic suspected event is generated starting from the latter frame data.
[0017] Preferably, performing jitter elimination processing on each group of adjacent frame data includes:
[0018] For each set of adjacent frame data, determining the flexible objects in the preceding frame data and the succeeding frame data in the set of adjacent frame data;
[0019] Calculating a jitter value between the flexible object in the previous frame data and the flexible object in the next frame data;
[0020] If the jitter value is less than a preset jitter threshold, jitter elimination processing is performed on the flexible object in the subsequent frame data.
[0021] Preferably, the obtaining of the first frame data corresponding to the dynamic suspected event includes:
[0022] Extracting the key frame data corresponding to the occurrence moment of the dynamic suspected event from each piece of the key frame data;
[0023] The key frame data corresponding to the occurrence moment of the dynamic suspected event is used as the start frame data;
[0024] The previous frame data corresponding to the start frame data in the entire video stream is used as the first frame data.
[0025] Preferably, judging whether the dynamic suspected event is a confirmed event based on the first frame data includes:
[0026] Taking the first frame data as a starting point, and taking each key frame data corresponding to a first preset time period after the starting point as each first intermediate frame data;
[0027] Determining whether each piece of the first intermediate frame data is identical to the first frame data;
[0028] If so, determining that the dynamic suspected event is a confirmed event;
[0029] If not, it is determined that the dynamic suspected event is not a confirmed event.
[0030] Preferably, the real-time determination of whether the determined event has ended includes:
[0031] Taking the first frame data as a starting point, and taking each key frame data between a first preset time point and a second preset time point after the starting point as each second intermediate frame data;
[0032] Determining whether there is second intermediate frame data that is identical to the first frame data;
[0033] If so, it is determined that the occurrence of the event is ended.
[0034] Preferably, generating the target video stream where the event is determined to have occurred comprises:
[0035] Taking the first frame data as a starting point, and taking each key frame data between a first preset time point and a second preset time point after the starting point as each second intermediate frame data;
[0036] Using the second intermediate frame data identical to the first frame data as each piece of end frame data;
[0037] The end frame data with the earliest occurrence time is used as the last frame data of the event determined to have occurred;
[0038] Using each key frame data between the first frame data and the last frame data in the video stream as each intermediate frame data;
[0039] The first frame data, each piece of the intermediate frame data and the last frame data are aggregated in the order of occurrence time to generate the target video stream of the determined event.
[0040] In a second aspect, an event recognition device based on a video stream includes:
[0041] The video stream acquisition module is used to acquire the video stream generated by the camera in real time and extract each key frame data from the video stream in real time;
[0042] A dynamic suspected event judgment module is used to judge whether a dynamic suspected event has occurred based on each key frame data, and if a dynamic suspected event has occurred, obtain the first frame data corresponding to the dynamic suspected event;
[0043] An event occurrence determination module is configured to determine whether the dynamic suspected event is a confirmed event based on the first frame data;
[0044] an end judgment module, configured to judge in real time whether the confirmed event has ended if the dynamic suspected event is a confirmed event;
[0045] The target video stream generating module is used to generate the target video stream of the determined event if the determined event ends, and store the target video stream.
[0046] In a third aspect, a video stream-based event recognition device includes a memory and a processor;
[0047] The memory is used to store programs;
[0048] The processor is used to execute the program to implement the various steps of the event recognition method based on video stream as described in the first aspect.
[0049] In a fourth aspect, a storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, the steps of the event recognition method based on video stream as described in the first aspect are implemented.
[0050] The invention relates to a method for detecting the occurrence of a dynamic event in a scene by detecting a scene in a scene-by-scene manner, and ... BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0052] FIG1 is an optional flow chart of a method for event recognition based on video streams provided in an embodiment of the present application;
[0053] FIG2 is an optional flow chart of another event recognition method based on video stream provided in an embodiment of the present application;
[0054] FIG3 is a schematic diagram of the structure of an event recognition system based on video streams provided in an embodiment of the present application;
[0055] FIG4 is a schematic structural diagram of a video stream-based event recognition device provided in an embodiment of the present application;
[0056] FIG5 is a structural diagram of a video stream-based event recognition device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0058] For the sake of public safety, cameras are now installed in streets, residential areas, corridors, and rooms across the country, covering most areas and ensuring the safety of citizens' lives and property. Generally speaking, cameras are used to monitor and record the environment. Users can access the camera's surveillance data to review, replay, or query events.
[0059] However, some sudden and crisis events occur from time to time. If the incident is reviewed after it occurs and ends, it will cause unpredictable harm. In addition, the video data collected by general cameras can only be saved for a period of time and cannot be traced back. Therefore, if the user cannot view it in time, it will lead to data loss, affecting the user's work or life.
[0060] An embodiment of the present invention provides a method for event recognition based on video streams. The method can be applied to various computer terminals or smart terminals. The execution subject can be a processor or server of the computer terminal or smart terminal. The method flow chart of the method is shown in FIG1 , which specifically includes:
[0061] S1: Collect the video stream generated by the camera in real time, and extract each key frame data from the video stream in real time.
[0062] In this application, a surveillance camera is kept running and the video stream generated by the camera is recorded in real time. It is understood that the video stream generated by the camera is recorded frame by frame, so each key frame data can be extracted from the video stream in real time. Moreover, the time when each key frame data occurs is coherent. Based on these consecutive key frame data, it is possible to determine whether an emergency has occurred, etc.
[0063] Real-time collection of video streams and key frame data can maximize the time, process, and end of sensitive video surveillance events, and fully record the entire process of the event.
[0064] S2: Determine whether a suspected dynamic event occurs based on each piece of key frame data; if a suspected dynamic event occurs, obtain the first frame data corresponding to the suspected dynamic event.
[0065] A suspected dynamic event occurs when a person or vehicle enters the camera's monitoring range, or when the environment or objects within the camera's original monitoring range undergo significant changes or displacements. Each keyframe data item can be used to determine whether a suspected dynamic event has occurred. If so, the first frame corresponding to the suspected dynamic event is extracted and subsequent actions are performed based on this first frame data.
[0066] S3: Determine whether the dynamic suspected event is a confirmed event based on the first frame data.
[0067] Because suspected dynamic events are determined based on the collected keyframe data, even if something seems to have occurred but cannot be considered a true event, it is still considered a suspected dynamic event. Therefore, this step requires further determination of whether the suspected dynamic event has actually occurred. The first frame of a suspected dynamic event is crucial; it can be used to compare it with the remaining frames of the suspected dynamic event to determine whether it has actually occurred.
[0068] S4: If the dynamic suspected event is a confirmed event, whether the confirmed event has ended is determined in real time.
[0069] In order to have a complete picture of the event, after a dynamic suspected event is determined to be a confirmed event, it is also necessary to determine in real time whether the event has ended, when it ended, etc., so as to record the entire process for the convenience of user tracing.
[0070] S5: If the event is determined to have ended, a target video stream of the event is generated and the target video stream is stored.
[0071] If it is determined that the event has ended, the video recorded all the time can be summarized to obtain the target video stream. This target video stream can be stored, this target video stream can also be sent to the user, and it is also possible to alarm while sending, and the present embodiment does not limit this.
[0072] The invention relates to a method for detecting the occurrence of a dynamic event in a scene by detecting a scene in a scene-by-scene manner, and ...
[0073] In the method provided in the embodiment of the present invention, the process of determining whether a dynamic suspected event has occurred based on each piece of key frame data is specifically described as follows:
[0074] Determining adjacent key frame data from the key frame data;
[0075] Take every two adjacent key frame data as a group of adjacent frame data;
[0076] For each group of adjacent frame data, performing jitter elimination processing on the group of adjacent frame data, and comparing the latter frame data with the former frame data in the group of adjacent frame data after the jitter elimination processing;
[0077] If the latter frame data in the set of adjacent frame data is different from the former frame data, it is determined that a dynamic suspected event is generated starting from the latter frame data.
[0078] Specifically, the difference between two adjacent frames can be used to determine whether a suspected dynamic event has occurred. Furthermore, small differences cannot be used as a criterion for a suspected dynamic event. Therefore, the above steps involve looking for differences between two adjacent keyframes. At the same time, since some objects may shake, each set of adjacent frame data needs to be de-jittered before looking for differences. This process is then compared to improve the accuracy of the comparison and prevent slight, minute jitter from being mistaken for a suspected dynamic event. The preceding frame data occurs earlier than the following frame data.
[0079] Furthermore, for each group of adjacent frame data, the step of performing jitter elimination processing on the group of adjacent frame data may specifically include:
[0080] For each set of adjacent frame data, determining the flexible objects in the preceding frame data and the succeeding frame data in the set of adjacent frame data;
[0081] Calculating a jitter value between the flexible object in the previous frame data and the flexible object in the next frame data;
[0082] If the jitter value is less than a preset jitter threshold, jitter elimination processing is performed on the flexible object in the subsequent frame data.
[0083] It is generally believed that flexible objects may shake, so the flexible objects in the previous frame data and the flexible objects in the next frame data of each set of adjacent frames can be directly compared. In addition, since some flexible objects inherently shake more, the preset jitter threshold cannot be too low, and can be set to 98%.
[0084] The following embodiment illustrates the process of obtaining the first frame data corresponding to the dynamic suspected event in this application.
[0085] Extracting the key frame data corresponding to the occurrence moment of the dynamic suspected event from each piece of the key frame data;
[0086] The key frame data corresponding to the occurrence moment of the dynamic suspected event is used as the start frame data;
[0087] The previous frame data corresponding to the start frame data in the entire video stream is used as the first frame data.
[0088] In order to make better use of the first frame data, this application uses the previous key frame data corresponding to the key frame data at the moment of occurrence of the dynamic suspected event as the first frame data of the dynamic suspected event. It is the last frame before the camera monitoring screen changes. It can be understood that there is no person / object / vehicle entering the camera monitoring range in the first frame data, and no object has changed significantly.
[0089] The following is a detailed description of the process of determining whether the dynamic suspected event is a confirmed event based on the first frame data in this application.
[0090] Taking the first frame data as a starting point, and taking each key frame data corresponding to a first preset time period after the starting point as each first intermediate frame data;
[0091] Determining whether each piece of the first intermediate frame data is identical to the first frame data;
[0092] If so, determining that the dynamic suspected event is a confirmed event;
[0093] If not, it is determined that the dynamic suspected event is not a confirmed event.
[0094] Specifically, the first frame data is used as the starting point, and each key frame data corresponding to the first preset time period after the starting point is used as each first intermediate frame data. It can be assumed that if each first intermediate frame data is identical to the first frame data, it means that no suspected dynamic event has actually occurred. If one or more first intermediate frame data are different from the first frame data, then it is assumed that a suspected dynamic event has indeed occurred, and this suspected dynamic event is regarded as the confirmed event.
[0095] In addition, the way to determine whether the event has ended can be to check whether the last frame data of the event is the same as the first frame data, then the collected key frame data can be compared with the first frame data in real time. When they are the same, it is considered that the event has ended. It should be noted that if the adjacent frame data after the first frame data is the same as the first frame data, it cannot be considered that the event has ended, and a suitable time period must be left before comparison. Therefore, the first preset time point and the second preset time point are set in this step. The first preset time point and the second preset time point are both moments after the first frame data that are not adjacent to the time when the first frame data occurs. Then the key frame data generated between the first preset time point and the second preset time point are used as the second intermediate frame data for comparison. That is:
[0096] Taking the first frame data as a starting point, and taking each key frame data between a first preset time point and a second preset time point after the starting point as each second intermediate frame data;
[0097] Determining whether there is second intermediate frame data that is identical to the first frame data;
[0098] If so, it is determined that the occurrence of the event is ended.
[0099] The above embodiment describes the process of determining whether the dynamic suspected event is a confirmed event based on the first frame data in this application. The following describes in detail the steps of generating the target video stream of the confirmed event in this application.
[0100] Taking the first frame data as a starting point, and taking each key frame data between a first preset time point and a second preset time point after the starting point as each second intermediate frame data;
[0101] Using the second intermediate frame data identical to the first frame data as each piece of end frame data;
[0102] The end frame data with the earliest occurrence time is used as the last frame data of the event determined to have occurred;
[0103] Using each key frame data between the first frame data and the last frame data in the video stream as each intermediate frame data;
[0104] The first frame data, each piece of the intermediate frame data and the last frame data are aggregated in the order of occurrence time to generate the target video stream of the determined event.
[0105] Specifically, if it is determined that the event ends early, there will be multiple end frame data between the first preset time point and the second preset time point. Then only the end frame data with the earliest occurrence time is the frame data generated immediately after the event is determined to have ended. Therefore, the end frame data is used as the last frame data for determining the event.
[0106] Furthermore, the overall process of the event recognition method based on video stream provided by the present application can be shown in FIG2 , please refer to FIG2 :
[0107] The video stream collected by the camera is processed in real time to determine whether a dynamic suspected event occurs, that is, the suspected event in Figure 2. If so, it is necessary to start storing each subsequent key frame data. A cache device can be used for caching and storage. Then it is necessary to determine whether the dynamic suspected event actually occurs, that is, whether the dynamic suspected event is resolved. If so, continue to collect the video stream generated by the camera in real time to determine whether a dynamic suspected event occurs. If not, the dynamic suspected event is regarded as a confirmed event. The event type of the confirmed event can be determined, and an alarm is issued. At the same time, it is determined in real time whether the confirmed event is terminated. If it is terminated, the video stream of the complete event is stored or sent to the user.
[0108] The present application also provides an event recognition system based on video stream, as shown in Figure 3. Please refer to Figure 3. The system includes a suspected event judgment module, a suspected event release module, a suspected event cache module, an event judgment and alarm module, an event termination judgment module and an event storage module.
[0109] Compared with the prior art, this application adds a suspected event judgment module, a suspected event resolution module, and a suspected event cache module.
[0110] Suspected event judgment module, used for real-time monitoring, can promptly detect whether dynamic suspected events have occurred;
[0111] The suspected event resolution module is used for secondary judgment. When it is determined that no dynamic suspected event has actually occurred, it can be resolved in a timely manner to save resources.
[0112] The suspected event caching module is used to aggregate and cache each key frame data of the event after confirming that the event has occurred.
[0113] Corresponding to the method shown in FIG1 , an embodiment of the present invention further provides a video stream-based event recognition device for implementing the method shown in FIG1 . The video stream-based event recognition device provided in the embodiment of the present invention can be used in a computer terminal or various mobile devices. The video stream-based event recognition device is described in conjunction with FIG4 . As shown in FIG4 , the device may include:
[0114] The video stream acquisition module 10 is used to acquire the video stream generated by the camera in real time and extract each key frame data from the video stream in real time;
[0115] A dynamic suspected event judgment module 20 is used to judge whether a dynamic suspected event has occurred based on each key frame data, and if a dynamic suspected event has occurred, obtain the first frame data corresponding to the dynamic suspected event;
[0116] An event occurrence determination module 30 is configured to determine whether the dynamic suspected event is a confirmed event based on the first frame data;
[0117] an end judgment module 40 for judging whether the dynamic suspected event is a confirmed event and whether the confirmed event has ended in real time if the dynamic suspected event is a confirmed event;
[0118] The target video stream generating module 50 is configured to generate a target video stream of the determined event if the determined event ends, and store the target video stream.
[0119] The invention relates to a method for detecting the occurrence of a dynamic event in a scene by detecting a scene in a scene-by-scene manner, and ...
[0120] Furthermore, an embodiment of the present application provides a video stream-based event recognition device. Optionally, FIG5 shows a hardware structure block diagram of the video stream-based event recognition device. Referring to FIG5 , the hardware structure of the video stream-based event recognition device may include: at least one processor 01, at least one communication interface 02, at least one memory 03, and at least one communication bus 04.
[0121] In the embodiment of the present application, the number of the processor 01 , the communication interface 02 , the memory 03 , and the communication bus 04 is at least one, and the processor 01 , the communication interface 02 , and the memory 03 communicate with each other through the communication bus 04 .
[0122] The processor 01 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0123] The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0124] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to execute the following event recognition method based on video stream, including:
[0125] Collect the video stream generated by the camera in real time, and extract each key frame data from the video stream in real time;
[0126] Determining whether a dynamic suspected event occurs based on each piece of key frame data, and if a dynamic suspected event occurs, obtaining the first frame data corresponding to the dynamic suspected event;
[0127] Determining whether the dynamic suspected event is a confirmed event based on the first frame data;
[0128] If the dynamic suspected event is a confirmed event, determining in real time whether the confirmed event has ended;
[0129] If the event determined to have occurred ends, a target video stream of the event determined to have occurred is generated and the target video stream is stored.
[0130] Optionally, the detailed functions and extended functions of the program may refer to the description of the event recognition method based on video stream in the method embodiment.
[0131] The present application also provides a storage medium that can store a program suitable for execution by a processor. When the program is executed, the device where the storage medium is located is controlled to execute the following video stream-based event recognition method, including:
[0132] Collect the video stream generated by the camera in real time, and extract each key frame data from the video stream in real time;
[0133] Determining whether a dynamic suspected event occurs based on each piece of key frame data, and if a dynamic suspected event occurs, obtaining the first frame data corresponding to the dynamic suspected event;
[0134] Determining whether the dynamic suspected event is a confirmed event based on the first frame data;
[0135] If the dynamic suspected event is a confirmed event, determining in real time whether the confirmed event has ended;
[0136] If the event determined to have occurred ends, a target video stream of the event determined to have occurred is generated and the target video stream is stored.
[0137] Specifically, the storage medium may be a computer-readable storage medium, and the computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM.
[0138] Optionally, the detailed functions and extended functions of the program may refer to the description of the event recognition method based on video stream in the method embodiment.
[0139] In addition, the functional modules in the various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present disclosure.
[0140] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0141] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0142] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for event recognition based on video stream, characterized in that: include: Collect the video stream generated by the camera in real time, and extract each key frame data from the video stream in real time; Determine whether a dynamic suspected event occurs based on each of the key frame data, and if a dynamic suspected event occurs, obtain the first frame data corresponding to the dynamic suspected event; Determining whether the dynamic suspected event is a confirmed event according to the first frame data; If the dynamic suspected event is a confirmed event, determining in real time whether the confirmed event has ended; If the determined event is finished, a target video stream of the determined event is generated and the target video stream is stored.
2. The method according to claim 1, characterized in that: The determining whether a dynamic suspected event occurs based on each piece of the key frame data includes: Determine each adjacent key frame data from each key frame data; Every two adjacent key frame data are regarded as a group of adjacent frame data; For each group of adjacent frame data, performing jitter elimination processing on the group of adjacent frame data, and comparing the latter frame data with the former frame data in the group of adjacent frame data after the jitter elimination processing; If the latter frame data in the group of adjacent frame data is different from the former frame data, it is determined that a dynamic suspected event is generated starting from the latter frame data.
3. The method according to claim 2, characterized in that The step of performing jitter elimination processing on each group of adjacent frame data includes: For each group of adjacent frame data, determining the flexible objects in the preceding frame data and the succeeding frame data in the group of adjacent frame data; Calculating a jitter value between the flexible object in the previous frame data and the flexible object in the next frame data; If the jitter value is less than a preset jitter threshold value, jitter elimination processing is performed on the flexible object in the subsequent frame data.
4. The method according to claim 1, characterized in that: The obtaining of the first frame data corresponding to the dynamic suspected event includes: Extracting the key frame data corresponding to the dynamic suspected event at the time of occurrence from each of the key frame data; The key frame data corresponding to the dynamic suspected event at the time of occurrence is used as the start frame data; The previous frame data corresponding to the start frame data in the entire video stream is used as the first frame data.
5. The method according to claim 1, characterized in that: The determining, based on the first frame data, whether the dynamic suspected event is a confirmed event includes: Taking the first frame data as the starting point, and taking each key frame data corresponding to a first preset time period after the starting point as each first intermediate frame data; Determine whether each of the first intermediate frame data is the same as the first frame data; If yes, then the dynamic suspected event is determined to be a confirmed event; If not, it is determined that the dynamic suspected event is not a confirmed event.
6. The method according to claim 1, characterized in that The real-time determination of whether the determined event has ended includes: Taking the first frame data as the starting point, and taking each key frame data between a first preset time point after the starting point and a second preset time point as each second intermediate frame data; Determine whether there is second intermediate frame data that is the same as the first frame data; If so, it is determined that the occurrence of the event is ended.
7. The method according to any one of claims 1 to 6, characterized in that: The generating of the target video stream for determining the occurrence of the event comprises: Taking the first frame data as the starting point, and taking each key frame data between a first preset time point after the starting point and a second preset time point as each second intermediate frame data; Using the second intermediate frame data identical to the first frame data as each piece of end frame data; Using the end frame data with the earliest occurrence time as the end frame data of the event determined to have occurred; Using each key frame data between the first frame data and the last frame data in the video stream as each intermediate frame data; The first frame data, each piece of the intermediate frame data and the last frame data are aggregated in the order of occurrence time to generate the target video stream of the determined event.
8. An event recognition device based on video stream, characterized in that: include: The video stream acquisition module is used to acquire the video stream generated by the camera in real time and extract each key frame data from the video stream in real time; A dynamic suspected event judgment module, used to judge whether a dynamic suspected event occurs based on each key frame data, and if a dynamic suspected event occurs, obtain the first frame data corresponding to the dynamic suspected event; An event determination module is used to determine whether the dynamic suspected event is a confirmed event according to the first frame data; an end judgment module, for judging in real time whether the dynamic suspected event is a confirmed event and whether the confirmed event is ended; The target video stream generating module is used to generate the target video stream of the determined event if the determined event ends, and store the target video stream.
9. An event recognition device based on video stream, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement the various steps of the event recognition method based on video stream as described in any one of claims 1-7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the event recognition method based on video stream as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Abnormal behavior identification method, target abnormality identification method, equipment and medium
CN111914661A
Safety monitoring method and device based on image recognition, equipment and storage medium
CN113807227A
Video storage method and device based on key event identification, equipment and medium
CN114139015A
Event identification method and device based on video stream, equipment and storage medium
CN117636220A
Methods and Systems for Using Pattern Recognition to Identify Potential Security Threats
US20190073885A1