Alarm information generation method, device, electronic equipment and computer medium

By performing frame segmentation and video frame extraction processing on surveillance videos, and using pre-trained models to generate alarm videos, the problems of low alarm video generation efficiency, low manual annotation efficiency, and waste of equipment resources are solved, and efficient and accurate alarm videos are achieved. generation and resource conservation.

CN118053123BActive Publication Date: 2024-10-01ADDX (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410228832.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2024-10-01
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

In the existing technology, alarm video generation efficiency is low, manual annotation efficiency is low and there are deviations, and using network video recorder equipment to temporarily store surveillance videos is costly and wastes equipment resources.

Method used

By obtaining the surveillance video captured by the target camera device in the preset time period, perform frame segmentation and video frame extraction processing, use the pre-trained alarm user detection information generation model to perform video frame image detection, generate alarm video, and reduce equipment through the target cache Resource usage.

Benefits of technology

It improves the efficiency and accuracy of alarm video generation, reduces manual annotation deviations and waste of equipment resources, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118053123B_ABST
    Figure CN118053123B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose an alarm information generation method, device, electronic device and computer medium. A specific implementation of the method includes: performing frame processing on the surveillance video to generate a surveillance video frame image sequence; performing video frame extraction processing on the surveillance video frame image sequence to generate an extracted surveillance video frame image sequence; for each extracted surveillance video frame image, performing the following processing steps: in response to determining that the extracted surveillance video frame image is an image to be detected as an alarm user, inputting the extracted surveillance video frame image into a pre-trained alarm user detection information generation model; in response to determining that the first alarm user detection information represents the detection of the target alarm user, generating a selected time period corresponding to the target alarm user; obtaining a target surveillance video frame image sequence corresponding to the selected time period; generating an alarm video for the target surveillance video frame image sequence. This implementation improves the efficiency and accuracy of alarm video generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of image processing, and in particular to a method, device, electronic device and computer medium for generating alarm information. Background Art

[0002] After receiving the alarm information, it is usually necessary to retrieve the surveillance video within a period of time, and then cut out the alarm video from the retrieved surveillance video for analysis. At present, the alarm video is usually generated by analyzing it frame by frame by technicians to cut out the alarm video.

[0003] However, when the above method is used to generate an alarm video, the following technical problem often occurs: the efficiency of generating the alarm video is low due to the frame-by-frame analysis by the technicians.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0006] Some embodiments of the present disclosure propose alarm information generation methods, devices, electronic devices, and computer-readable media to solve one or more of the technical problems mentioned in the above background technology section.

[0007] In a first aspect, some embodiments of the present disclosure provide a method for generating alarm information, the method comprising: acquiring a surveillance video shot by a target camera device during a preset time period; performing frame processing on the surveillance video to generate a surveillance video frame image sequence; performing video frame extraction processing on the surveillance video frame image sequence to generate an extracted surveillance video frame image sequence; for each extracted surveillance video frame image in the extracted surveillance video frame image sequence, performing the following processing steps: in response to determining that the extracted surveillance video frame image is an image to be subjected to alarm user detection, inputting the extracted surveillance video frame image into a pre-trained alarm user detection information processing system; In the information generation model, first alarm user detection information is obtained; in response to determining that the above-mentioned first alarm user detection information represents the detection of the target alarm user, a selected time period corresponding to the above-mentioned target alarm user is generated; a target monitoring video frame image sequence corresponding to the above-mentioned selected time period is obtained, wherein the above-mentioned target monitoring video frame image sequence is a video frame image sequence generated based on the above-mentioned monitoring video frame image sequence; an alarm video for the above-mentioned target monitoring video frame image sequence is generated, and the above-mentioned alarm video and the appearance description information corresponding to the above-mentioned target alarm user are combined into alarm information, and the above-mentioned alarm information is sent to the associated alarm detection terminal.

[0008] In a second aspect, some embodiments of the present disclosure provide an alarm information generating device, which includes: an acquisition unit, configured to acquire a surveillance video shot by a target camera device within a preset time period; a framing unit, configured to perform framing processing on the surveillance video to generate a surveillance video frame image sequence; an extraction unit, configured to perform video frame extraction processing on the surveillance video frame image sequence to generate an extracted surveillance video frame image sequence; the generating unit is configured to perform the following processing steps for each extracted surveillance video frame image in the extracted surveillance video frame image sequence: in response to determining that the extracted surveillance video frame image is an image to be detected by a user for alarm, extracting the extracted surveillance video frame image; The frame image is input into a pre-trained alarm user detection information generation model to obtain first alarm user detection information; in response to determining that the first alarm user detection information represents the detection of a target alarm user, a selected time period corresponding to the target alarm user is generated; a target monitoring video frame image sequence corresponding to the selected time period is obtained, wherein the target monitoring video frame image sequence is a video frame image sequence generated based on the monitoring video frame image sequence; an alarm video for the target monitoring video frame image sequence is generated, and the alarm video is combined with the appearance description information corresponding to the target alarm user into alarm information, and the alarm information is sent to an associated alarm detection terminal.

[0009] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.

[0010] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.

[0011] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: through the alarm information generation method of some embodiments of the present disclosure, the efficiency and accuracy of alarm video generation are improved. Specifically, the reason why the efficiency of alarm video generation is low is that the efficiency of alarm video generation is low through frame-by-frame analysis by technicians. Based on this, the alarm information generation method of some embodiments of the present disclosure, first, obtains the monitoring video shot by the target camera device in a preset time period. Then, the above-mentioned monitoring video is frame-processed to generate a monitoring video frame image sequence. Thereby, it is convenient to parse the monitoring video frame by frame. Then, the above-mentioned monitoring video frame image sequence is subjected to video frame extraction processing to generate an extracted monitoring video frame image sequence. Finally, for each extracted surveillance video frame image in the above-mentioned extracted surveillance video frame image sequence, the following processing steps are performed: in response to determining that the above-mentioned extracted surveillance video frame image is an image to be detected by an alarm user, the above-mentioned extracted surveillance video frame image is input into a pre-trained alarm user detection information generation model to obtain the first alarm user detection information; in response to determining that the above-mentioned first alarm user detection information represents the detection of the target alarm user, a selected time period corresponding to the above-mentioned target alarm user is generated; a target surveillance video frame image sequence corresponding to the above-mentioned selected time period is obtained, wherein the above-mentioned target surveillance video frame image sequence is a video frame image sequence generated based on the above-mentioned surveillance video frame image sequence; an alarm video for the above-mentioned target surveillance video frame image sequence is generated, and the above-mentioned alarm video and the appearance description information corresponding to the above-mentioned target alarm user are combined into alarm information, and the above-mentioned alarm information is sent to the associated alarm detection terminal. Thus, the video frame image can be detected by the trained alarm user detection information generation model. Thereby, the efficiency and accuracy of alarm video generation are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar figure labels represent the same or similar elements. It should be understood that the drawings are schematic and that the components and elements are not necessarily drawn to scale.

[0013] Figure 1 is a flow chart of some embodiments of the alarm information generating method according to the present disclosure;

[0014] Figure 2 is a flow chart of some embodiments of the alarm information generating device according to the present disclosure;

[0015] Figure 3 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0016] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0017] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0022] Figure 1 1 is a flowchart of some embodiments of the alarm information generation method according to the present disclosure. 100 of some embodiments of the alarm information generation method according to the present disclosure is shown. The alarm information generation method comprises the following steps:

[0023] Step 101: Acquire surveillance videos shot by a target camera device during a preset time period.

[0024] In some embodiments, the execution subject (e.g., a computing device) of the alarm information generation method can obtain the surveillance video shot by the target camera device in a preset time period through a wired connection or a wireless connection method. The target camera device can be a camera installed at the monitoring location to monitor the presence of users.

[0025] Step 102: perform frame processing on the surveillance video to generate a surveillance video frame image sequence.

[0026] In some embodiments, the execution subject may perform frame processing on the surveillance video to generate a surveillance video frame image sequence, that is, each frame image of the surveillance video may be separated and processed to obtain a surveillance video frame image sequence.

[0027] Step 103: Perform video frame extraction processing on the monitoring video frame image sequence to generate an extracted monitoring video frame image sequence.

[0028] In some embodiments, the above-mentioned execution subject may perform video frame extraction processing on the above-mentioned monitoring video frame image sequence to generate an extracted monitoring video frame image sequence. The extracted monitoring video frame images in the extracted monitoring video frame image sequence are video frame images used for subsequent target alarm user detection. That is, the images subsequently input into the alarm user detection information generation model. For example, first, the above-mentioned execution subject may determine the video frame number processing speed corresponding to the alarm user detection information generation model. Then, according to the frame number processing speed, the corresponding frame extraction interval is generated. Finally, according to the frame extraction interval, the above-mentioned monitoring video frame image sequence is subjected to video frame extraction processing to generate an extracted monitoring video frame image sequence.

[0029] Step 104: for each extracted surveillance video frame image in the extracted surveillance video frame image sequence, perform the following processing steps:

[0030] Optionally, obtain a surveillance video frame image training sample set.

[0031] In some embodiments, the execution subject may obtain a surveillance video frame image training sample set, wherein the surveillance video frame image training samples in the surveillance video frame image training sample set include sample surveillance video frame images.

[0032] Furthermore, when the alarm information generation method of the present application is used for alarm user identification, the following problems often occur: a large number of annotated images are required to train the neural network model. For these problems, the conventional solution is to manually annotate each video frame image.

[0033] However, the above solutions usually have the following technical problem: manual labeling is inefficient and there are deviations in the labeling, which reduces the robustness of the model.

[0034] In response to the above-mentioned technical problem 2, it was decided to adopt the following solution.

[0035] In practice, the above execution subject can obtain the monitoring video frame image training sample set through the following steps:

[0036] The first step is to obtain a group of labeled surveillance video frame images and a set of unlabeled surveillance video frame images. Unlabeled surveillance video frame images may refer to images that are not labeled. That is, labeled surveillance video frame images are images that have labels.

[0037] In the second step, based on the above-mentioned annotated surveillance video frame image group and the above-mentioned unannotated surveillance video frame image set, the following annotation steps are performed:

[0038] 1. Extract the labeled monitoring video frame image feature vector of each labeled monitoring video frame image in the above-mentioned labeled monitoring video frame image group to obtain the labeled monitoring video frame image feature vector group. The labeled monitoring video frame image feature vector of each labeled monitoring video frame image in the above-mentioned labeled monitoring video frame image set can be extracted through a feature extraction network to obtain a labeled monitoring video frame image feature vector set. The feature extraction network can be a feature extraction model, for example, a Bert model, a VGG model, etc.

[0039] 2. Extract the unlabeled surveillance video frame image feature vector of each unlabeled surveillance video frame image in the unlabeled surveillance video frame image set to obtain the unlabeled surveillance video frame image feature vector set. The unlabeled surveillance video frame image feature vector of each unlabeled surveillance video frame image in the unlabeled surveillance video frame image set can be extracted through a feature extraction network to obtain the unlabeled surveillance video frame image feature vector set.

[0040] 3. Construct a surveillance video frame image feature tree based on the above-mentioned annotated surveillance video frame image feature vector group and the above-mentioned unannotated surveillance video frame image feature vector set. The above-mentioned surveillance video frame image feature tree includes: each annotated surveillance video frame image node and each unannotated surveillance video frame image node.

[0041] Among them, constructing a surveillance video frame image feature tree includes:

[0042] First, the annotated surveillance video frame image feature vector set and the unannotated surveillance video frame image feature vector set are determined as a surveillance video frame image feature vector set.

[0043] Then, for each surveillance video frame image feature vector in the surveillance video frame image feature vector set, the following processing steps are performed:

[0044] 1. Selecting from the above-mentioned surveillance video frame image feature vector set each surveillance video frame image feature vector whose similarity with the above-mentioned surveillance video frame image feature vector is greater than or equal to a preset similarity.

[0045] 2. Determine each selected surveillance video frame image feature vector as a similar surveillance video frame image feature vector group of the above surveillance video frame image feature vector.

[0046] Finally, a surveillance video frame image feature tree is constructed based on a similar surveillance video frame image feature vector group of each surveillance video frame image feature vector in the surveillance video frame image feature vector set. In the surveillance video frame image feature tree, the feature vector corresponding to the labeled surveillance video frame image is a labeled surveillance video frame image node, and the feature vector corresponding to the unlabeled surveillance video frame image is an unlabeled surveillance video frame image node.

[0047] 4. According to each labeled monitoring video frame image node included in the above-mentioned monitoring video frame image feature tree, a set of monitoring video frame image nodes to be labeled is selected from the above-mentioned monitoring video frame image feature tree. For each of the above-mentioned unlabeled monitoring video frame image nodes, the above-mentioned execution subject can perform the following steps: the first step is to determine the distance between the unlabeled monitoring video frame image feature vector corresponding to the above-mentioned unlabeled monitoring video frame image node and each labeled monitoring video frame image to obtain each feature distance. The second step is to determine the minimum feature distance by the minimum value of each of the above-mentioned feature distances. Then, the determined minimum feature distances can be arranged in descending order to obtain a minimum feature distance sequence. Secondly, the minimum feature distances of the number of previous targets in the above-mentioned minimum feature distance sequence can be determined as the minimum feature distances of each target. Finally, the unlabeled monitoring video frame image nodes corresponding to the above-mentioned minimum feature distances of each target can be determined as the set of monitoring video frame image nodes to be labeled.

[0048] 5. Annotate each unlabeled surveillance video frame image corresponding to the above-mentioned surveillance video frame image node set to be annotated to obtain an annotated surveillance video frame image set. The above-mentioned execution subject can display each unlabeled surveillance video frame image corresponding to the above-mentioned surveillance video frame image node set to be annotated, so as to receive the annotation information corresponding to the above-mentioned unlabeled surveillance video frame image input by the technician, so as to annotate the above-mentioned unlabeled surveillance video frame image. Here, the annotation information may include the label of the unlabeled surveillance video frame image input by the user.

[0049] In the third step, the above-mentioned annotated surveillance video frame image group is merged with the above-mentioned annotated surveillance video frame image set to obtain a merged annotated surveillance video frame image set as a surveillance video frame image training sample set.

[0050] The above-mentioned related content, as an inventive point of the present disclosure, solves the second technical problem "the manual labeling efficiency is low, and there are deviations in the labeling, which reduces the robustness of the model." The factors that reduce the robustness of the model are often as follows: the manual labeling efficiency is low, and there are deviations in the labeling. If the above factors are solved, the effect of improving the robustness of the model can be achieved. In order to achieve this effect, first, a group of labeled surveillance video frame images and a set of unlabeled surveillance video frame images are obtained. Then, based on the above-mentioned annotated surveillance video frame image group and the above-mentioned unlabeled surveillance video frame image set, the following annotation steps are performed: extract the annotated surveillance video frame image feature vector of each annotated surveillance video frame image in the above-mentioned annotated surveillance video frame image group to obtain the annotated surveillance video frame image feature vector group; extract the unlabeled surveillance video frame image feature vector of each unlabeled surveillance video frame image in the above-mentioned unlabeled surveillance video frame image set to obtain the unlabeled surveillance video frame image feature vector set; according to the above-mentioned annotated surveillance video frame image feature vector group and the above-mentioned unlabeled surveillance video frame image feature vector set, construct a surveillance video frame image feature tree, wherein the above-mentioned surveillance video frame image feature tree includes: each annotated surveillance video frame image node and each unlabeled line surveillance video frame image node; according to each annotated surveillance video frame image node included in the above-mentioned surveillance video frame image feature tree, select a surveillance video frame image node set to be annotated from the above-mentioned surveillance video frame image feature tree; annotate each unlabeled surveillance video frame image corresponding to the above-mentioned surveillance video frame image node set to be annotated to obtain a annotated surveillance video frame image set. Finally, the above-mentioned annotated surveillance video frame image group is merged with the above-mentioned annotated surveillance video frame image set to obtain a merged annotated surveillance video frame image set as a surveillance video frame image training sample set. In this way, a small amount of annotated surveillance video frame images can be used to annotate unannotated surveillance video frame images. Thus, the annotation efficiency is improved and the annotation time is shortened. Also, the automatic annotation through the surveillance video frame image features greatly improves the annotation accuracy and the robustness of the trained model.

[0051] Optionally, the initial warning user detection information generation model is trained according to the above-mentioned monitoring video frame image training sample set to obtain a trained warning user detection information generation model.

[0052] In some embodiments, the execution subject may train the initial warning user detection information generation model according to the monitoring video frame image training sample set to obtain a trained warning user detection information generation model.

[0053] In practice, the above execution entity can train the initial warning user detection information generation model through the following steps:

[0054] The first step is to select a target surveillance video frame image training sample from the surveillance video frame image training sample set. That is, a surveillance video frame image training sample can be randomly selected from the surveillance video frame image training sample set as the target surveillance video frame image training sample.

[0055] In the second step, the sample monitoring video frame images included in the target monitoring video frame image training samples are input into the initial warning user detection information generation model to obtain initial warning user detection information. The initial warning user detection information generation model may refer to an untrained completed neural network model.

[0056] The third step is to determine the loss value between the initial warning user detection information and the sample label corresponding to the target monitoring video frame image training sample through a preset loss function. For example, the loss function may be a cross entropy loss function or a hinge loss function.

[0057] In the fourth step, in response to determining that the loss value is less than or equal to the preset loss value, the initial alarm user detection information generation model is determined as the trained alarm user detection information generation model.

[0058] Step 1041, in response to determining that the extracted surveillance video frame image is an image to be subjected to alarm user detection, the extracted surveillance video frame image is input into a pre-trained alarm user detection information generation model to obtain first alarm user detection information.

[0059] In some embodiments, the execution subject may, in response to determining that the extracted surveillance video frame image is an image to be detected as an alarm user, input the extracted surveillance video frame image into a pre-trained alarm user detection information generation model to obtain first alarm user detection information. The alarm user detection information generation model may be a pre-trained neural network model that takes the extracted surveillance video frame image as input and the alarm user detection information as output. The alarm user detection information may indicate information that a target alarm user is detected or information that a target alarm user is not detected. For example, the alarm user detection information generation model may be a YOLO (You Only Look Once) model. The image to be detected as an alarm user may refer to whether the display content of the extracted surveillance video frame image to be detected includes an image of a target alarm user. The target alarm user may be a user who makes an alarm. The first alarm user detection information may be an image bounding box of the target alarm user.

[0060] Step 1042: In response to determining that the first alarm user detection information indicates that a target alarm user is detected, a selected time period corresponding to the target alarm user is generated.

[0061] In some embodiments, the execution subject may generate a selected time period corresponding to the target alarm user in response to determining that the first alarm user detection information indicates that the target alarm user is detected.

[0062] In practice, the execution subject may generate the selected time period corresponding to the target alarm user through the following steps:

[0063] In the first step, for the above-mentioned extracted surveillance video frame image, perform the following generation steps:

[0064] 1. Determine the above-mentioned extracted surveillance video frame image as the target video frame image, and determine the image to be detected for user after the target video frame image as the user image to be detected. The image to be detected for user can be an image after the target video frame image in the sequence of extracted surveillance video frame images. For example, the sequence of extracted surveillance video frame images includes: a first extracted surveillance video frame image, a second extracted surveillance video frame image, and a third extracted surveillance video frame image. If the video frame image is the second extracted surveillance video frame image, the image to be detected for user is the third extracted surveillance video frame image.

[0065] 2. Input the above-mentioned user image to be detected into the above-mentioned warning user detection information generation model to obtain second warning user detection information. The second warning user detection information may be detection information indicating whether the above-mentioned target warning user is detected in the image to be detected.

[0066] 3. In response to determining that the second warning user detection information indicates that the target warning user is not detected, a selection time period is generated according to each determined target video frame image. Each target video frame image may be an image sequence in which the target warning user has been detected in the past and each image is continuous. For example, the execution subject may directly determine the time period corresponding to each target video frame image as the selection time period.

[0067] In the second step, in response to determining that the second alarm user detection information indicates that the target alarm user is detected, the user image to be detected is determined as an extracted monitoring video frame image, and the generation step is performed again.

[0068] Step 1043, obtaining a target surveillance video frame image sequence corresponding to the above selected time period.

[0069] In some embodiments, the execution subject may obtain a target surveillance video frame image sequence corresponding to the selected time period, wherein the target surveillance video frame image sequence is a video frame image sequence generated based on the surveillance video frame image sequence.

[0070] In practice, the above-mentioned execution subject can obtain the target monitoring video frame image sequence corresponding to the above-mentioned selected time period from the associated video storage database. The above-mentioned target monitoring video frame image sequence is an image sequence generated based on the above-mentioned extracted monitoring video frame image sequence. The number of video frame images corresponding to the target monitoring video frame image sequence is greater than or equal to the number of images of the extracted monitoring video frame image subsequence in the extracted monitoring video frame image sequence corresponding to the selected time period. The target monitoring video frame image sequence includes the target video frame image sequence. The time period corresponding to the target video frame image sequence is the same as the time period corresponding to the monitoring video frame image sequence corresponding to the first alarm user detection information subsequence. The first alarm user detection information in the first alarm user detection information subsequence is information that characterizes the detection of the target alarm user. And the first first alarm user detection information in the first alarm user detection information subsequence is the first alarm user detection information corresponding to the monitoring video frame image.

[0071] Step 1044, generating an alarm video for the target surveillance video frame image sequence, combining the alarm video with the appearance description information corresponding to the target alarm user into alarm information, and sending the alarm information to the associated alarm detection terminal.

[0072] In some embodiments, the execution entity may generate an alarm video for the target surveillance video frame image sequence, and combine the alarm video with the appearance description information corresponding to the target alarm user into alarm information, and send the alarm information to the associated alarm detection terminal.

[0073] Furthermore, when the alarm information generation method of the present application is used to identify alarm users, the following problems often occur: when generating alarm videos, it is usually necessary to temporarily store surveillance videos with the help of a transfer device. For these problems, the conventional solution is to temporarily store surveillance videos with the help of a network video recorder device.

[0074] However, the above solutions usually have the following technical problem three: using network video recorder equipment to temporarily store surveillance videos is costly and requires the coordination of multiple equipment resources, wasting equipment resources.

[0075] In response to the above technical problem three, it was decided to adopt the following solution.

[0076] In practice, the above-mentioned execution subject can generate an alarm video for the above-mentioned target monitoring video frame image sequence through the following steps:

[0077] The first step is to determine the user detection information sequence corresponding to each target video frame image. One target video frame image corresponds to one user detection information.

[0078] In the second step, based on the user detection information sequence, user detection information corresponding to each target monitoring video frame image in the target monitoring video frame image sequence is generated as target user detection information to obtain a target user detection information sequence.

[0079] The second step may include the following sub-steps:

[0080] The first sub-step is to determine that there is no target surveillance video frame image sub-sequence set corresponding to the user detection information in the target surveillance video frame image sequence.

[0081] The second sub-step is to perform the following processing steps for each target monitoring video frame image sub-sequence in the target monitoring video frame image sub-sequence set:

[0082] 1. Determine a target surveillance video frame image group in the target surveillance video frame image sequence that is adjacent to the target surveillance video frame image subsequence in sequence position. The target surveillance video frame image group includes: a frame image before the earliest target surveillance video frame image in the target surveillance video frame image subsequence, and a frame image after the earliest frame image in the target surveillance video frame image subsequence.

[0083] 2. According to the number of target surveillance video frame images included in the target surveillance video frame image subsequence, perform user detection information interpolation processing on the user detection information group corresponding to the target surveillance video frame image group to obtain an interpolated user detection information subsequence as the user detection information subsequence corresponding to the target surveillance video frame image subsequence. As an example, first, according to the number of images, generate the user detection information corresponding to the intermediate frame by linear proportional completion to generate the interpolated user detection information subsequence.

[0084] The third step is to copy the target surveillance video frame image sequence in the target cache. The target cache may refer to a temporary memory.

[0085] The fourth step is to combine each target surveillance video frame image in the copied target surveillance video frame image sequence with the corresponding target user detection information in the above target user detection information sequence to generate a combined surveillance video frame image and obtain a combined surveillance video frame image sequence. The above execution subject can splice each target surveillance video frame image in the copied target surveillance video frame image sequence with the corresponding target user detection information in the above target user detection information sequence to generate a combined surveillance video frame image and obtain a combined surveillance video frame image sequence.

[0086] Step 5: Generate an alarm video based on the combined surveillance video frame image sequence. The execution subject can use a video combination plug-in to generate an alarm video for the combined surveillance video frame image sequence.

[0087] The above-mentioned related contents, as an inventive point of the present disclosure, solve the technical problem three "waste of equipment resources." The factors that waste equipment resources are often as follows: using a network video recorder device to temporarily store surveillance videos is costly and requires the cooperation of multiple equipment resources. If the above-mentioned factors are solved, the effect of reducing the waste of equipment resources can be achieved. In order to achieve this effect, first, determine the user detection information sequence corresponding to each of the above-mentioned target video frame images. Secondly, based on the above-mentioned user detection information sequence, generate the user detection information corresponding to each target surveillance video frame image in the above-mentioned target surveillance video frame image sequence as the target user detection information, and obtain the target user detection information sequence. Then, copy the above-mentioned target surveillance video frame image sequence in the target cache. Then, combine each target surveillance video frame image in the copied target surveillance video frame image sequence with the corresponding target user detection information in the above-mentioned target user detection information sequence to generate a combined surveillance video frame image, and obtain a combined surveillance video frame image sequence. Finally, generate an alarm video based on the above-mentioned combined surveillance video frame image sequence. Therefore, without using a network video recorder device, by setting the target cache and the user detection of the alarm user detection information generation model, the alarm video can be accurately generated while using less memory resources and device resources. Finally, by combining the surveillance video frame image sequence, the alarm video can be accurately generated.

[0088] Further references Figure 2 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of an alarm information generating device. These alarm information generating device embodiments are similar to Figure 1 Corresponding to the method embodiments shown, the alarm information generating device can be specifically applied to various electronic devices.

[0089] like Figure 2As shown, the alarm information generating device 200 of some embodiments includes: an acquisition unit 201, a frame division unit 202, an extraction unit 203 and a generation unit 204. The acquisition unit 201 is configured to acquire the surveillance video shot by the target camera device in a preset time period; the frame division unit 202 is configured to perform frame processing on the surveillance video to generate a surveillance video frame image sequence; the extraction unit 203 is configured to perform video frame extraction processing on the surveillance video frame image sequence to generate an extracted surveillance video frame image sequence; the generation unit 204 is configured to perform the following processing steps for each extracted surveillance video frame image in the extracted surveillance video frame image sequence: in response to determining that the extracted surveillance video frame image is an image to be detected by the user to be alarmed, the extracted surveillance video frame image is input into a pre-trained In the alarm user detection information generation model, the first alarm user detection information is obtained; in response to determining that the above-mentioned first alarm user detection information represents the detection of the target alarm user, a selected time period corresponding to the above-mentioned target alarm user is generated; a target monitoring video frame image sequence corresponding to the above-mentioned selected time period is obtained, wherein the above-mentioned target monitoring video frame image sequence is a video frame image sequence generated based on the above-mentioned monitoring video frame image sequence; an alarm video for the above-mentioned target monitoring video frame image sequence is generated, and the above-mentioned alarm video and the appearance description information corresponding to the above-mentioned target alarm user are combined into alarm information, and the above-mentioned alarm information is sent to the associated alarm detection terminal.

[0090] It is understandable that the units recorded in the alarm information generating device 200 are similar to those in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the alarm information generating device 200 and the units included therein, and will not be described in detail here.

[0091] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device (e.g., a computing device) 300 suitable for implementing some embodiments of the present disclosure. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0092] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0093] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 3 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0094] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0095] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0096] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0097] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the surveillance video shot by the target camera device in a preset time period; performs frame processing on the above-mentioned surveillance video to generate a surveillance video frame image sequence; performs video frame extraction processing on the above-mentioned surveillance video frame image sequence to generate an extracted surveillance video frame image sequence; for each extracted surveillance video frame image in the above-mentioned extracted surveillance video frame image sequence, performs the following processing steps: in response to determining that the above-mentioned extracted surveillance video frame image is an image to be detected as a user to be alarmed, input the above-mentioned extracted surveillance video frame image into a pre-trained In the alarm user detection information generation model, the first alarm user detection information is obtained; in response to determining that the above-mentioned first alarm user detection information represents the detection of the target alarm user, a selected time period corresponding to the above-mentioned target alarm user is generated; a target monitoring video frame image sequence corresponding to the above-mentioned selected time period is obtained, wherein the above-mentioned target monitoring video frame image sequence is a video frame image sequence generated based on the above-mentioned monitoring video frame image sequence; an alarm video for the above-mentioned target monitoring video frame image sequence is generated, and the above-mentioned alarm video and the appearance description information corresponding to the above-mentioned target alarm user are combined into alarm information, and the above-mentioned alarm information is sent to the associated alarm detection terminal.

[0098] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes: an acquisition unit, a framing unit, an extraction unit, and a generation unit. The names of these units do not constitute limitations on the units themselves in certain circumstances. For example, the acquisition unit may also be described as "a unit for acquiring surveillance videos shot by a target camera device during a preset time period."

[0101] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0102] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A method for generating alarm information, comprising: Obtaining surveillance video captured by a target camera device during a preset time period; Performing frame processing on the surveillance video to generate a surveillance video frame image sequence; Performing video frame extraction processing on the surveillance video frame image sequence to generate an extracted surveillance video frame image sequence; Acquire a surveillance video frame image training sample set, wherein the surveillance video frame image training samples in the surveillance video frame image training sample set include sample surveillance video frame images; According to the monitoring video frame image training sample set, the initial alarm user detection information generation model is trained to obtain a trained alarm user detection information generation model; For each extracted surveillance video frame image in the extracted surveillance video frame image sequence, the following processing steps are performed: In response to determining that the extracted surveillance video frame image is an image to be subjected to alarm user detection, inputting the extracted surveillance video frame image into a pre-trained alarm user detection information generation model to obtain first alarm user detection information; In response to determining that the first alarm user detection information indicates that a target alarm user is detected, generating a selected time period corresponding to the target alarm user; Acquire a target surveillance video frame image sequence corresponding to the selected time period, wherein the target surveillance video frame image sequence is a video frame image sequence generated based on the surveillance video frame image sequence; Generate an alarm video for the target surveillance video frame image sequence, combine the alarm video with the appearance description information corresponding to the target alarm user into alarm information, and send the alarm information to an associated alarm detection terminal; The step of generating the selected time period corresponding to the target alarm user includes: For the extracted surveillance video frame image, the following generation steps are performed: Determine the extracted monitoring video frame image as a target video frame image, and determine an image to be subjected to user detection that is located after the target video frame image as a user image to be detected; Inputting the to-be-detected user image into the warning user detection information generation model to obtain second warning user detection information; In response to determining that the second alarm user detection information indicates that the target alarm user is not detected, generating a selection time period according to each determined target video frame image; In response to determining that the second alarm user detection information indicates that the target alarm user is detected, determining the to-be-detected user image as an extracted surveillance video frame image, and performing the generating step again; The step of generating an alarm video for the target surveillance video frame image sequence includes: Determine a user detection information sequence corresponding to each target video frame image; According to the user detection information sequence, generating user detection information corresponding to each target monitoring video frame image in the target monitoring video frame image sequence as target user detection information, and obtaining a target user detection information sequence; Copying the target monitoring video frame image sequence in the target cache; Combining each target surveillance video frame image in the copied target surveillance video frame image sequence with the corresponding target user detection information in the target user detection information sequence to generate a combined surveillance video frame image, thereby obtaining a combined surveillance video frame image sequence; Generate an alarm video according to the combined surveillance video frame image sequence; Wherein, generating user detection information corresponding to each target surveillance video frame image in the target surveillance video frame image sequence according to the user detection information sequence as target user detection information, and obtaining the target user detection information sequence includes: Determining that there is no target surveillance video frame image subsequence set corresponding to user detection information in the target surveillance video frame image sequence; For each target monitoring video frame image subsequence in the target monitoring video frame image subsequence set, the following processing steps are performed: Determine a target surveillance video frame image group in the target surveillance video frame image sequence that has a sequence position proximity relationship with the target surveillance video frame image subsequence; According to the number of target monitoring video frame images included in the target monitoring video frame image subsequence, performing user detection information interpolation processing on the user detection information group corresponding to the target monitoring video frame image group, and obtaining an interpolated user detection information subsequence as the user detection information subsequence corresponding to the target monitoring video frame image subsequence; The step of obtaining a surveillance video frame image training sample set includes: Obtaining a group of labeled surveillance video frame images and a set of unlabeled surveillance video frame images; Based on the annotated surveillance video frame image group and the unannotated surveillance video frame image set, the following annotation steps are performed: Extracting a labeled monitoring video frame image feature vector of each labeled monitoring video frame image in the labeled monitoring video frame image group to obtain a labeled monitoring video frame image feature vector group; Extracting an unlabeled surveillance video frame image feature vector of each unlabeled surveillance video frame image in the unlabeled surveillance video frame image set to obtain an unlabeled surveillance video frame image feature vector set; According to the annotated surveillance video frame image feature vector group and the unannotated surveillance video frame image feature vector set, a surveillance video frame image feature tree is constructed, wherein the surveillance video frame image feature tree includes: each annotated surveillance video frame image node and each unannotated surveillance video frame image node; According to each annotated surveillance video frame image node included in the surveillance video frame image feature tree, selecting a surveillance video frame image node set to be annotated from the surveillance video frame image feature tree; Performing labeling processing on each unlabeled surveillance video frame image corresponding to the to-be-labeled surveillance video frame image node set to obtain a labeled surveillance video frame image set; The annotated surveillance video frame image group and the annotated surveillance video frame image set are merged to obtain a merged annotated surveillance video frame image set as a surveillance video frame image training sample set; wherein, the initial alarm user detection information generation model is trained according to the surveillance video frame image training sample set to obtain a trained alarm user detection information generation model, including: Selecting a target surveillance video frame image training sample from the surveillance video frame image training sample set; Inputting the sample monitoring video frame image included in the target monitoring video frame image training sample into the initial warning user detection information generation model to obtain initial warning user detection information; Determine the loss value between the initial warning user detection information and the sample label corresponding to the target monitoring video frame image training sample through a preset loss function; In response to determining that the loss value is less than or equal to a preset loss value, the initial warning user detection information generation model is determined as a trained warning user detection information generation model.

2. An alarm information generating device, applied to the method according to claim 1, comprising: An acquisition unit is configured to acquire the surveillance video captured by the target camera device in a preset time period; A frame division unit is configured to perform frame division processing on the monitoring video to generate a monitoring video frame image sequence; An extraction unit is configured to perform video frame extraction processing on the monitoring video frame image sequence to generate an extracted monitoring video frame image sequence; The generating unit is configured to perform the following processing steps for each extracted monitoring video frame image in the extracted monitoring video frame image sequence: in response to determining that the extracted monitoring video frame image is an image to be subjected to alarm user detection, inputting the extracted monitoring video frame image into a pre-trained alarm user detection information generating model to obtain first alarm user detection information; In response to determining that the first alarm user detection information represents the detection of a target alarm user, a selected time period corresponding to the target alarm user is generated; a target monitoring video frame image sequence corresponding to the selected time period is acquired, wherein the target monitoring video frame image sequence is a video frame image sequence generated based on the monitoring video frame image sequence; an alarm video for the target monitoring video frame image sequence is generated, and the alarm video is combined with the appearance description information corresponding to the target alarm user into alarm information, and the alarm information is sent to an associated alarm detection terminal.

3. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as claimed in claim 1.

4. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to claim 1 is implemented.